I created this because I was frusterated by having to change the integer values when the environments changed for my projects. A simple update of PHP 5.6 (I think it was PHP 5.6.16 to 5.6.17) changed the integer values, which are usually what is suggested to be used in parameters.yml or config.yml.
By using the constants, you don't have to worry about stupid stuff like that. (Since that's what they were designed for.)
Nice trick !
I was using this in my parameters.yml :
But... It threw an error :
ContextErrorException: Warning: no valid certs found cafile stream:
/etc/mysql/client-key.pem'`I tried to bypass(directly in vendor for testing purpose) Doctrine2 PDOExtension class by constructing my own PDO instance. And after that, I got :
Warning: PDO::__construct(): Peer certificate CN='Ellememe' did not match expected CN='192.168.2.200'
But.. I told myself that "even if I change CN during certs generation I couldn't write directly in vendor".. Thanks to your solution maybe I could reconsider the issue !