contao-community-alliance / dependency-container

Dependency container for Contao Open Source CMS based on the Pimple Dependency Injection Container
GNU Lesser General Public License v3.0
1 stars 4 forks source link

Service fails with database defined via DSN #19

Closed richardhj closed 2 years ago

richardhj commented 4 years ago

Checklist before I submit this issue report

I confirm that:

My environment is:

(Please fill in the actual values from your environment)

Key Value Comments
PHP version: 4.9.2
Contao version: 7.4.5

Issue description

Uncaught PHP Exception RuntimeException: "Contao Database is not properly configured." at /var/www/xxx/releases/10/vendor/contao-community-alliance/dependency-container/src/ContaoServices/ServiceFactory.php line 90

https://github.com/contao-community-alliance/dependency-container/blob/eee186286c224d61972fd59aa67d291fea69fa92/src/ContaoServices/ServiceFactory.php#L90

Thats because I define the database via DSN in the .env.local instead of using the parameters.yml. As a result, the $config does not hold information about the database.

richardhj commented 4 years ago

IMHO these two lines can be removed safely or ignored silently.

zonky2 commented 4 years ago

@richardhj

PHP version: | 4.9.2 |   Contao version: | 7.4.5

realy?!

richardhj commented 4 years ago

I'm an early adopter…

baumannsven commented 4 years ago

Yes @richardhj is right here.

@richardhj can you test the hotfix/2.0.4 please?

zonky2 commented 2 years ago

closed with https://github.com/contao-community-alliance/dependency-container/commit/0712cb3a7da0652985bfa914da3f440407f4a5ec