Skip to content

V3.2.1 parameters.yml database_user underscore character removed #21139

Closed
@Matt-PMCT

Description

@Matt-PMCT
Q A
Bug report? YES
Feature request? NO
BC Break report? ??
RFC? ??
Symfony version 3.2.1

I tried to upgrade from Symfony 3.1.8 to 3.2.1 using composer. During the cache clear I received an error stating

An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user '########'@'IpAddress' (using password: YES)

however my database user name should be #######_#, notice the underscore in the second to last character position. Looking in the parameter.yml file I found that my database_user had been changed to remove the _ from the username. I then added back my underscore, deleted the dev cache, and tried the application again. I received the same error as before.

Since composer also updated doctrine and the FOSuser bundle at the same time I reverted the update and went back to my prior configuration by reverting my composer.lock file. I then ran my Symfony application again in the version 3.1.8 and it worked fine.

To isolate the problem further I used composer and upgraded ONLY symfony from 3.1.8 to 3.2.1. The upgrade produced errors at the cache clear with the above error message, and in my parameters.yml file my database_user again had the underscore removed from the username. I re-inserted the underscore, however I continue to get the error messages:

An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user '########'@'IpAddress' (using password: YES)

If I add a letter to the end of my database_user so it is "#######_#a" the error message shows the _

An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user '#######_#a'@'IpAddress' (using password: YES)

If I then delete the letter the error message reverts to no underscore

An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user '########'@'IpAddress' (using password: YES)

This leads me to believe that some change in Symfony between 3.1.8 and 3.2.1 strip underscores from the database_user in the parameters.yml file. Unfortunately I am not skilled enough to figure out where that code may be.

After about an hour I stumbled onto the Symfony\Component\Yaml\Parser and found some code that led me to believe if I put quotes around the database_user value it may do something different. And that did fix it so now I can run my application. I still feel like this may be a bug, if not please close this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions