-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Updated PhpArray to expand paths using __DIR__ #5880
Updated PhpArray to expand paths using __DIR__ #5880
Conversation
Same for |
That was fast. @Ocramius do you see anyway to reduce the need to copy the entire toFile() method from the AbstractWriter? I couldn't seem to find a way to make this method less of a copy/pasta. |
@Ocramius what would be the use case for that in configuration files, exactly? |
@weierophinney if magic constants are going to be replaced, then better handle it completely, no?
@spiffyjr the only way I can think of (without subclassing) is passing some kind of visitor to the abstract writer, but that seems overkill for such a small use case |
Updated PhpArray to expand paths using __DIR__
Just wondering, what about the other writers? They have DIR support as well. |
…ture/php-array-fix-dir Updated PhpArray to expand paths using __DIR__
- EOF ending
When using Apigility config files with
__DIR__
are var_exported causing the real path to be written instead. This is an issue for development/production setups where the directory may vary from server to server. This change just does a str_replace on the path of the file being written with the__DIR__
constant.