Category: dependency-injection

composer require dependency injection, but it is already there

“name”: “symfony/dependency-injection”, “version”: “v5.0.4”, “source”: { “type”: “git”, “url”: “https://github.com/symfony/dependency-injection.git”, “reference”: “86338f459313525dd95f5a012f8a9ea118002f94” }, Thats my composer.lock when Im trying to run composer require php-amqplib/rabbitmq-bundle get this stuff Your requirements could not be resolved to an installable set of packages. Problem…

Select an entity manager with Dependency Injection in Symfony

I have defined two different entity managers in doctrine.yaml entity_managers: EM1: naming_strategy: doctrine.orm.naming_strategy.underscore mappings: AppEM1: is_bundle: false type: annotation dir: ‘%kernel.project_dir%/src/BC1/Domain/Entity’ prefix: ‘BC1DomainEntity’ alias: AppEM1 EM2: naming_strategy: doctrine.orm.naming_strategy.underscore mappings: AppEM2: is_bundle: false type: annotation dir: ‘%kernel.project_dir%/src/BC2/Domain/Entity’ prefix: ‘BC2DomainEntity’ alias: AppEM2…

Symfony 3.4 – Inject variable from parameters.yml/config_test.yml into test case

I have in my parameters.yml file parameters: api_domain: api.domain.here and in my config_test.yml parameters: api_domain: api.localhost I have a test case with $this->client = static::createClient( [], [ ‘HTTP_HOST’ => ‘api.localhost’ ] ); and I need to replace ‘api.localhost’ with the…