{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/21759","repository_url":"https://api.github.com/repos/symfony/symfony","labels_url":"https://api.github.com/repos/symfony/symfony/issues/21759/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/21759/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/21759/events","html_url":"https://github.com/symfony/symfony/issues/21759","id":210223189,"number":21759,"title":"Form support can't be disabled entirely?","user":{"login":"javiereguiluz","id":73419,"avatar_url":"https://avatars0.githubusercontent.com/u/73419?v=3","gravatar_id":"","url":"https://api.github.com/users/javiereguiluz","html_url":"https://github.com/javiereguiluz","followers_url":"https://api.github.com/users/javiereguiluz/followers","following_url":"https://api.github.com/users/javiereguiluz/following{/other_user}","gists_url":"https://api.github.com/users/javiereguiluz/gists{/gist_id}","starred_url":"https://api.github.com/users/javiereguiluz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiereguiluz/subscriptions","organizations_url":"https://api.github.com/users/javiereguiluz/orgs","repos_url":"https://api.github.com/users/javiereguiluz/repos","events_url":"https://api.github.com/users/javiereguiluz/events{/privacy}","received_events_url":"https://api.github.com/users/javiereguiluz/received_events","type":"User","site_admin":false},"labels":[{"id":100079,"url":"https://api.github.com/repos/symfony/symfony/labels/Bug","name":"Bug","color":"e10c02","default":false},{"id":99594,"url":"https://api.github.com/repos/symfony/symfony/labels/Form","name":"Form","color":"DDDDDD","default":false},{"id":237003792,"url":"https://api.github.com/repos/symfony/symfony/labels/Status:%20Needs%20Review","name":"Status: Needs Review","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-02-25T09:18:19Z","updated_at":"2017-06-21T09:10:51Z","closed_at":"2017-06-21T09:05:21Z","body":"| Q                | A\r\n| ---------------- | -----\r\n| Bug report?      | yes\r\n| Feature request? | no\r\n| BC Break report? | no\r\n| Symfony version  | 3.x\r\n\r\nIn a Symfony app I have disabled form support (and CSRF, validation, etc.)\r\n\r\n```yaml\r\nframework:\r\n    #form:            ~\r\n    #csrf_protection: ~\r\n    #validation:      { enable_annotations: true }\r\n    # ...\r\n```\r\n\r\nHowever, in the production container I see some form-related things:\r\n\r\n**3 services**\r\n\r\n```php\r\n'form.type.entity' => 'getForm_Type_EntityService',\r\n'form.type_guesser.doctrine' => 'getForm_TypeGuesser_DoctrineService',\r\n'twig.form.renderer' => 'getTwig_Form_RendererService',\r\n```\r\n\r\n**2 parameters**\r\n\r\n```php\r\n'twig.form.resources' => array(\r\n    0 => 'form_div_layout.html.twig',\r\n),\r\n\r\n'form.type_guesser.doctrine.class' => 'Symfony\\\\Bridge\\\\Doctrine\\\\Form\\\\DoctrineOrmTypeGuesser',\r\n```\r\n\r\nAnd the `twig` service has the following: \r\n\r\n```php\r\n$instance->addRuntimeLoader(new \\Symfony\\Bundle\\TwigBundle\\ContainerAwareRuntimeLoader(\r\n    $this, array(\r\n        // ...,\r\n        'Symfony\\\\Bridge\\\\Twig\\\\Form\\\\TwigRenderer' => 'twig.form.renderer'\r\n    ), ...);\r\n```\r\n\r\nShould we remove all this when needed? Thanks!"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/310017869","html_url":"https://github.com/symfony/symfony/issues/21759#issuecomment-310017869","issue_url":"https://api.github.com/repos/symfony/symfony/issues/21759","id":310017869,"user":{"login":"stof","id":439401,"avatar_url":"https://avatars3.githubusercontent.com/u/439401?v=3","gravatar_id":"","url":"https://api.github.com/users/stof","html_url":"https://github.com/stof","followers_url":"https://api.github.com/users/stof/followers","following_url":"https://api.github.com/users/stof/following{/other_user}","gists_url":"https://api.github.com/users/stof/gists{/gist_id}","starred_url":"https://api.github.com/users/stof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stof/subscriptions","organizations_url":"https://api.github.com/users/stof/orgs","repos_url":"https://api.github.com/users/stof/repos","events_url":"https://api.github.com/users/stof/events{/privacy}","received_events_url":"https://api.github.com/users/stof/received_events","type":"User","site_admin":false},"created_at":"2017-06-21T09:10:51Z","updated_at":"2017-06-21T09:10:51Z","body":"I think the difference is that the first project was using DoctrineBundle. The guesser and the form type listed above are the one registered in FrameworkBundle.\r\n\r\nI will check whether we have an easy way to mark these services as private when using Symfony 3.3+ (they were required to be public before due to lazy-loading), which would cause them to be removed from the container automatically when Form is not enabled."}}
{"actor":{"display_login":"stof"}}