8p / EightPointsGuzzleBundle

⛽️ Integrates Guzzle 6.x, a PHP HTTP Client, into Symfony
MIT License
440 stars 71 forks source link

lint:container throws exception after installing bundle #288

Closed knyk closed 4 years ago

knyk commented 4 years ago
Q A
Symfony version 5.0.2
Bundle version dev-master

after installing bundle lint:container throws exception

In ContainerBuilder.php line 1035:
  You have requested a synthetic service ("kernel"). The DIC does not know how to construct this service.  
gregurco commented 4 years ago

Hello @knyk

This problem is not caused directly by Guzzle Bundle. You can check, that we don't use kernel as a service in our DI configuration. I found that the problem is created by symfony event dispatcher that we use in bundle for handling events. Also the problem exists just in dev, so I can say that the problem probably is related to service debug.event_dispatcher. Al least this problem appears just on linting of container, doesn't crash the application and prod app. I will better investigate this problem later.

Please write if the problem is critical for you or if you have any additional information.

knyk commented 4 years ago

@gregurco yes, it only appears while linting container. i done some debug and it seems that some symfony services depends on KernelInterface so it is possible that one of bundle's dependencies cause that problem. maybe bundle use deprecated one which depends on kernel.

i'm starting to not trust to that linter, because in dev environment it throws me an error because i use Sentry DSN as env variable but it cannot be dynamic. but in prod environment is passes without any problem..

it is not critical for me, i had already stopped using container linter during CI/CD because it throws errors on things i can't change even though they works perfectly in dev and prod envs

gregurco commented 4 years ago

@knyk thank you for response and information. I think linter will be ready for ci/cd in next versions, when it will be adjusted to all possible cases :slightly_smiling_face: