Last active
May 30, 2018 14:18
-
-
Save Ocramius/26a9fc80278017ed8f72 to your computer and use it in GitHub Desktop.
Add a PSR-4 namespace to a composer.json file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
file_put_contents( | |
'composer.json', | |
json_encode(array_merge_recursive( | |
['autoload' => ['psr-4' => [$argv[1] => $argv[2]]]], | |
json_decode(file_get_contents('composer.json'), true) | |
)) | |
); |
frankdejonge
commented
Mar 15, 2016
Life is too short to look up the PHP docs, looking for non-class constants
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment