We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hi thank for this bundle. i'm trying to inject in service same services.
use Ecommerce\EcommerceCoreBundle\Model\CartDetail; use JMS\DiExtraBundle\Annotation as DI; class CartService { public $em; public $session; /** * @var CartDetail */ private $cartDetail; /** * @DI\InjectParams({ * "em" = @DI\Inject("doctrine.orm.entity_manager"), * "session" = @DI\Inject("session") * }) */ /** * @param CartDetail $cartDetail * @param $em * @param $session */ public function __construct($em, $session) { $this->em = $em; $this->session = $session; } Declaration: services: app.cart.services: class: Ecommerce\EcommerceCoreBundle\Controller\Services\CartService arguments: # - "@router" # - "@doctrine.orm.entity_manager" # - "@member.user_service" CONFIG.YML jms_di_extra: locations: all_bundles: false bundles: [ArticleBundle, EcommerceCoreBundle] directories: ["%kernel.root_dir%/../src"] automatic_controller_injections: properties: request: "@request" router: "@router"
but i get alwase null where i get wrong ? thank any help
null
The text was updated successfully, but these errors were encountered:
for the injection to work you need to have only one docblock:
/** * @DI\InjectParams({ * "em" = @DI\Inject("doctrine.orm.entity_manager"), * "session" = @DI\Inject("session") * }) * @param $em * @param $session */
Sorry, something went wrong.
No branches or pull requests
hi thank for this bundle.
i'm trying to inject in service same services.
but i get alwase
null
where i get wrong ?
thank any help
The text was updated successfully, but these errors were encountered: