Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikemix/php-namespace-refactor
PHP PSR-4 namespace refactor tool inside a directory
https://github.com/mikemix/php-namespace-refactor
Last synced: 17 days ago
JSON representation
PHP PSR-4 namespace refactor tool inside a directory
- Host: GitHub
- URL: https://github.com/mikemix/php-namespace-refactor
- Owner: mikemix
- License: mit
- Created: 2018-11-18T22:35:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-28T08:06:24.000Z (about 6 years ago)
- Last Synced: 2024-11-05T20:19:04.544Z (2 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
In need of namespace refactor in your PHP project? I sometimes reorganize my classess between directories if I decide new directory structure is needed. I don't want to change the namespaces and imports in all files though, because I'm lazy. Here comes this tool.
Mount your source directory to the `/refactor` inside the container, provide the PSR-4 namespace for the directory, eg.:
docker run -it --rm -v $PWD/src:/refactor mikemix/namespace-refactor App
This will run in dry-run mode, nothing will get changed. To write the changes, add the `--dry-run=0` option:
docker run -it --rm -v $PWD/src:/refactor mikemix/namespace-refactor App --dry-run=0