Skip to content

add alias to existing service not working #28413

Closed
@videni

Description

@videni
services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false
   App\AppBundle\Checker\PromotionCouponEligibilityChecker: ~
  
   App\Bundle\AppBundle\Checker\Eligibility\PromotionCouponEligibilityCheckerInterface:
        alias:  “@App\AppBundle\Checker\PromotionCouponEligibilityChecker”

As you can see the alias and its service are at same file, but it gives a error when autowire the interface in a class constructor.

ymfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have requested a non-existent service "“@App\AppBundle\Checker\PromotionCouponEligibilityChecker”". in /Users/www/AppBundle/vendor/symfony/dependency-injection/ContainerBuilder.php:1001

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions