Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Fluent DbConfig not working properly (inconsistent with previous behavior) #11941

Closed
khamer opened this issue Sep 14, 2022 · 2 comments
Closed
Assignees

Comments

@khamer
Copy link

khamer commented Sep 14, 2022

What happened?

Description

The Fluent DbConfig isn't working properly - it seems to require more values or not use the screaming snake overrides properly.

Steps to reproduce

  1. config/db.php:
return DbConfig::create()->driver('pgsql');

.env

CRAFT_DB_SERVER="something"
CRAFT_DB_DATABASE="something"

This will fail with an error showing that it didn't pick up the dbname or host, whereas if we change config/db.php to the older version:

return [ 'driver' => 'pgsql' ];

It works fine.

error-snippet.log

Craft CMS version

4.2.4

PHP version

8.0.13

Operating system and version

Debian 10

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@brandonkelly
Copy link
Member

Thanks for reporting that! Fixed for the next release.

@brandonkelly brandonkelly self-assigned this Sep 15, 2022
@brandonkelly
Copy link
Member

Craft 4.2.5 is out with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants