The problem is that you have 2 different services: app.service.api_interface and AppBundle\Service\ApiInterface . The first is good, the second is not.
If you need the service app.service.api_interface , you can change your configuration to have the first as an alias of the second type:
app.service.api_interface: '@AppBundle\Service\ApiInterface' AppBundle\Service\ApiInterface: arguments: $api_endpoint: "%endpoint test%"
In your configuration, you do not configure the AppBundle\Service\ApiInterface , but you configure the app.service.api_interface service. At my suggestion, you will configure 2 services.
If you do not need the service app.service.api_interface , you can only allow one service:
AppBundle\Service\ApiInterface: arguments: $api_endpoint: "%endpoint test%"
This declaration overrides the AppBundle\Service\ApiInterface . You can override any service that is imported using your identifier (class name) below: It is preferable to move this override below the AppBundle\ declaration.
The final file may be like this:
#app/config/services.yml services: _defaults: autowire: true autoconfigure: true public: false AppBundle\: resource: '../../src/AppBundle/*' exclude: '../../src/AppBundle/{Entity,Repository,Tests}' AppBundle\Controller\: resource: '../../src/AppBundle/Controller' public: true tags: ['controller.service_arguments'] app.security.login_form_authenticator: '@AppBundle\Security\LoginFormAuthenticator'
Documentation: Manual Posting Arguments
Documentation: explicit configuration of services and arguments
In addition, I suggest deleting the parameter %endpoint test% (and renaming it, for example, to %endpoint_test% )