Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
110 views

I'm trying to automatically load entity mappings based on a folder structure. My loader class returns a map like this array below. My goal is to find all "capabilities" and map their domain ...
floriank's user avatar
  • 25.7k
0 votes
1 answer
460 views

I have found a $container->registerAttributeForAutoconfiguration call here but as far as I can tell this does not add classes to the container. Yet the documentation says An alternative way to ...
chx's user avatar
  • 11.9k
0 votes
0 answers
54 views

I'm trying to develop a library in PHP. This library will be used in modules for CMS (Wordpress, Drupal, PrestaShop for example). Each CMS has different specificities and very special ways of doing ...
Thomas DELAPORTE's user avatar
3 votes
0 answers
244 views

I can define anonymous inline factory (Symfony 6+) like this: GuzzleClient1: class: GuzzleHttp\ClientInterface factory: [ !service { class: 'App\GuzzleClientFactory', calls: [ { 'withBaseUri': ...
Vladislav Rastrusny's user avatar
1 vote
1 answer
2k views

I created a bare minimum Shopware 6 plugin to display product ID when the product is loaded. It worked fine. Below is my code. PATH: src/Resources/config/services.xml <?xml version="1.0&...
DevOPlug's user avatar
-1 votes
2 answers
2k views

I am migrating an application from Symfony 4.4 to Symfony 5.4. In the case of forms, I have a form that I pass in the constructor a variable ContainerInterface $container to use a parameter in the ...
Francisco's user avatar
  • 275
1 vote
1 answer
4k views

I'm integrating Symfony into an older application having its own dependency container based on PSR-11. Been searching for a solution to merge that DI container to the one Symfony uses, but found ...
Jazi's user avatar
  • 6,762
0 votes
1 answer
2k views

I am trying to implement Symfony Dependency Injection Component (https://symfony.com/doc/current/components/dependency_injection.html) in a non Symfony project. It works well if I put all my services ...
RynnHeldeD's user avatar
2 votes
1 answer
2k views

As the documentation suggests I wrote this service to add the uuid to the normalized object: <?php namespace App\Serializer; use InvalidArgumentException; use Symfony\Component\Serializer\...
Jack Skeletron's user avatar
0 votes
1 answer
1k views

I have a Symfony 5.3 project with two custom reusabale bundles. I have created an Entity in bundle1, I want to be able to read and write to this from within bundle2 However, I cannot successfully ...
LeeTee's user avatar
  • 6,629
1 vote
2 answers
307 views

I have the following service definition in Symfony2 app.service_1: class: Symfony\Component\Lock\Store\RedisStore arguments: - '@snc_redis.default_cache' app.service_2: class: ...
Unnikrishnan's user avatar
  • 3,451
0 votes
0 answers
54 views

I've used the Symfony route bundle and DI bundle in my non Symfony project. I inject dependencies to the controllers/actions by the code below: // Find the current route $parameters = $router-&...
Fatemeh Gharri's user avatar
1 vote
0 answers
315 views

I've upgraded my symfony projet version from 3.3 to 3.4 a few month ago and everything woked find but i recently tried to ad an event listener and then i've got that error The configuration key "...
je-buy 01's user avatar
0 votes
1 answer
1k views

I'm trying to autowire the UrlGeneratorInterface into a DTO to use the generate method in my DTO, I have this in my DTO: namespace App\DTO; use JMS\Serializer\Annotation as Serializer; use JMS\...
Nikoala's user avatar
  • 89
2 votes
0 answers
957 views

Using DI as a standalone component in the small part of the codebase I want to make some services visible outside this part and accessible as by interface class name. As I know, I should use a ...
Sebastian Tkaczyk's user avatar
3 votes
0 answers
4k views

After upgrading to Symfony 3.4 from 2.8, I am attempting to get rid of warnings about using services from the container. One hang up is my controller all extend from an abstract controller which needs ...
fivejeez's user avatar
4 votes
1 answer
18k views

I'm trying to implement Symfonys dependency injection container. I have 2 containers set, one for the database, and one for the system user. and I'm using addArgument() to both the App class and ...
Imnotapotato's user avatar
  • 5,948
0 votes
1 answer
605 views

I'm interested in Symfony\Component\HttpKernel\DependencyInjection\Extension::getAnnotatedClassesToCompile() method. If I understand it correctly, you can addAnnotatedClassesToCompile() an array of ...
rokas's user avatar
  • 1,589
1 vote
1 answer
343 views

Hello I am trying to install behat/behat via composer, however I am have dependency problems. I tried the below of many: composer require behat/behat:"3.*" symfony/dependency-injection:"3.*" --dev ...
xiarnousx's user avatar
  • 583