{"action":"closed","issue":{"number":11,"created_at":"2011-10-07T20:56:21Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Sorry to bother you again, but i have some questions on the documentation this time..\r\nFirst of all, thanks for this great bundle. It makes Service-creation and Injection much better with reducing the configuration files.\r\n\r\n1.] What is the intended useage / the best practices?\r\n\r\n```\r\nuse JMS\\DiExtraBundle\\Annotation as DI;\r\n \r\n/** \r\n * @DI\\Inject([...])\r\n */\r\n```\r\n\r\nlike the Symfony-ORM way for entities.\r\n\r\nOr should i use:\r\n\r\n```\r\nuse JMS\\DiExtraBundle\\Annotation\\Inject;\r\n\r\n/** \r\n * @Inject([...])\r\n */\r\n```\r\n\r\nBoth methods are shown in the documentation. I think it's better to define one as the prefered / recommended.\r\nMy personal preference would be the \"simple\" @Inject, @Service, ... Annotations.\r\n\r\n\r\n\r\n2.] Is the Documentation up to date or are these bugs?\r\n\r\na)\r\nQuote: \"Note that you cannot use the @Inject annotation on private, or protected properties. Likewise, the @InjectParams annotation does not work on protected, or private methods.\"\r\n\r\n```\r\n/**\r\n * @Inject(\"security.context\", required = false)\r\n */\r\nprivate $securityContext;\r\n```\r\nOk, this only works in controllers, but i think the private-Definition should only be used in the special Controller-Section of the documentation and not in the \"general one\": Annotations -> @Inject.\r\n\r\n```\r\n/**\r\n * @Inject(\"security.context\", required = false)\r\n */\r\npublic $securityContext;\r\n```\r\nWhat does the \"required = false\" do?\r\n\r\nb)\r\n```\r\n/** @DI\\LookupMethod(\"mailer\") */\r\nabstract protected function getMailer();\r\n```\r\n\r\nFatal error: Abstract function [...]() cannot contain body in [...]\r\n\r\nthis works:\r\n\r\n```\r\n/**\r\n * @LookupMethod(\"mailer\")\r\n */\r\nprotected function getMailer() {}\r\n```\r\n\r\nc)\r\n```\r\n/**\r\n * @Service\r\n */\r\nclass Listener\r\n{\r\n    /**\r\n     * @InjectParams({\r\n     *     \"em\" = @Inject(\"doctrine.entity_manager\")\r\n     * })\r\n     */\r\n    public function __construct(EntityManager $em, Session $session)\r\n    {\r\n        // ...\r\n    }\r\n}\r\n```\r\n\r\nDoesn't work within a Service.\r\nRuntimeException: Invalid argument key \"em\" found.","comments":5,"title":"Update the Documentation / Best practice?","updated_at":"2011-10-13T21:04:13Z","url":"https://api.github.com/repos/schmittjoh/JMSDiExtraBundle/issues/11","id":1848822,"assignee":null,"milestone":null,"closed_at":"2011-10-13T21:04:13Z","user":{"gravatar_id":"36224c2f09576f4356c67cb63d900aa7","avatar_url":"https://secure.gravatar.com/avatar/36224c2f09576f4356c67cb63d900aa7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/cdfre","id":1069129,"login":"cdfre"},"html_url":"https://github.com/schmittjoh/JMSDiExtraBundle/issues/11","labels":[],"state":"closed"},"legacy":{"number":11,"action":"closed","issue":1848822}}