-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Area: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.6Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Description
Preconditions and environment
- Magento version: 2.4.1-2.4.6, also current
2.4-developis impacted
Steps to reproduce
- Setup clean Magento and fully install it
- Open the file
app/etc/env.phpand search for the correct db username in thedb/connection/default/usernamepath - Change the
app/etc/env.phpfile and change thedb/connection/default/usernameto a non-existing database user (usingwrong-userin example below) - Run
bin/magento setup:config:set -n --db-user=xxx(where you replacexxxwith the correct database user you found in step 2) - Inspect the
app/etc/env.phpfile afterwards to see if the username got updated correctly
Expected result
$ bin/magento setup:config:set -n --db-user=xxx
We saved default values for these options: amqp-host, amqp-port, amqp-user, amqp-password, amqp-virtualhost, amqp-ssl, amqp-ssl-options, db-ssl-key, db-ssl-cert, db-ssl-ca, db-ssl-verify, allow-parallel-generation.
$ echo $?
0
$ grep 'username' app/etc/env.php
'username' => 'xxx',
Actual result
$ bin/magento setup:config:set -n --db-user=xxx
We saved default values for these options: amqp-host, amqp-port, amqp-user, amqp-password, amqp-virtualhost, amqp-ssl, amqp-ssl-options, db-ssl-key, db-ssl-cert, db-ssl-ca, db-ssl-verify, allow-parallel-generation.
In Abstract.php line 144:
SQLSTATE[HY000] [1045] Access denied for user 'wrong-user'@'localhost' (using password: YES)
In Abstract.php line 128:
SQLSTATE[HY000] [1045] Access denied for user 'wrong-user'@'localhost' (using password: YES)
$ echo $?
255
$ grep 'username' app/etc/env.php
'username' => 'xxx',
Additional information
We have a certain workflow where we expect to have a wrong db user in the app/etc/env.php file and expect it to be able to change it without errors using bin/magento setup:config:set
This used to work before Magento 2.4.1, but seems to have been broken ever since Magento 2.4.1, which is kind of annoying for us.
It looks like the config change does work in that command, but the updated configuration isn't being reloaded before it tries to do whatever it crashes on a bit later.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Area: FrameworkIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.A defect with this priority could have functionality issues which are not to expectations.Progress: doneReported on 2.4.6Indicates original Magento version for the Issue report.Indicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchThe issue has been reproduced on latest 2.4-develop branch
Type
Projects
Status
Done