Respect / Config

A powerful, small, deadly simple configurator and dependency injection container DSL made to be easy
http://respect.github.io/Config
Other
98 stars 7 forks source link

Constant usage in array #11

Closed augustohp closed 12 years ago

augustohp commented 12 years ago

The following configuration does not work as expected:

    myArray = [hahaha DIRECTORY_SEPARATOR hehehe]
alganet commented 12 years ago

Simple constant expansion is a parse_ini_file/parse_ini_string built-in feature. Respect\Config extends this feature to class constants by parsing them manually. This bug should not affect class constants, I believe.

Changing this regex to make the :: optional would probably fix this, but this also means that every UPPERCASED word in the INI file would be tested against defined().

augustohp commented 12 years ago

That means "Convention over Configuration" ... I've actually never seen anything UPPERCASED that was not a CONSTANT.

alganet commented 12 years ago

So far:

Constants "glued" to another words doesn't work on parse_ini[file|string]. I'm thinking of leaving at Won't fix or open bug to the PHP itself, we can't handle this things our side.