Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
\PDO:: class constant aliases (request) #13010
By merging multiple service configs like
we got a problem with numeric keys (integer).
In PHP if merging multiple configs we get renumbered keys ofc.
The fatal here is that the key
To tmp fix that we can force keys to strings like
To fix this perm i suggest allowing aliasses.
Im not into zephir. I cannot provide a PR. But i can provide the code in PHP.
Where to put:
What to put:
Well, this is from Phalcon's config object and toArray() method:
Array ( [host] => db.lxc [username] => myUser [password] => myPass [dbname] => myDb [charset] => UTF8 [persistent] => 1 [options] => Array (  => 5 ) ) //19 => 5 originally was set as: \PDO::ATTR_DEFAULT_FETCH_MODE => \PDO::FETCH_OBJ
and vanilla PHP:
So those constants will always be converted internally to integer values, since that's what they are - you're using constant name in order to get it's value.
I know. Thats why im asking to add the alias feature.
Works fine. I just dont have enough knowledge about zep to provide a PR.