https://github.com/vanilleplugin/packager
Composer Namespaces Prefixer for WordPress Plugins, Resolve dependencies versions conflicts of WordPress plugins built using Composer, Without hardcoding.
https://github.com/vanilleplugin/packager
dependencies php prefixer wordpress wordpress-plugins-namespaces-prefixer
Last synced: 24 days ago
JSON representation
Composer Namespaces Prefixer for WordPress Plugins, Resolve dependencies versions conflicts of WordPress plugins built using Composer, Without hardcoding.
- Host: GitHub
- URL: https://github.com/vanilleplugin/packager
- Owner: VanillePlugin
- License: mit
- Created: 2021-03-21T22:42:21.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-12-19T16:08:34.000Z (over 2 years ago)
- Last Synced: 2025-03-01T10:37:25.802Z (over 1 year ago)
- Topics: dependencies, php, prefixer, wordpress, wordpress-plugins-namespaces-prefixer
- Language: PHP
- Homepage: https://jakiboy.github.io/VanillePlugin-Packager/
- Size: 115 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# VanillePlugin-Packager
VanillePlugin Packager is a **Composer Namespaces Prefixer for WordPress Plugins**, Used to prefix [VanillePlugin WordPress Plugin Framework](https://jakiboy.github.io/VanillePlugin/) And other composer dependencies.
Resolve **dependencies versions conflicts of WordPress plugins** built using Composer, Without ~~hardcoding~~.
Works also for non Composer plugins, By Wrapping your dependencies with your own custom namespace, in order to avoid conflicts with **other plugins that are loading the same dependencies in different versions**.
```
__ __ _ _ _ _____ _ _ _____ _
\ \ / / (_| | | | __ \| | (_) | __ \ | |
\ \ / __ _ _ __ _| | | ___| |__) | |_ _ __ _ _ _ __ | |__) __ _ ___| | ____ _ __ _ ___ _ __
\ \/ / _` | '_ \| | | |/ _ | ___/| | | | |/ _` | | '_ \ | ___/ _` |/ __| |/ / _` |/ _` |/ _ | '__|
\ | (_| | | | | | | | __| | | | |_| | (_| | | | | | | | | (_| | (__| | (_| | (_| | __| |
\/ \__,_|_| |_|_|_|_|\___|_| |_|\__,_|\__, |_|_| |_| |_| \__,_|\___|_|\_\__,_|\__, |\___|_|
__/ | __/ |
|___/ |___/
```
## ⚡ Installing:
```
composer global require --dev jakiboy/vanilleplugin-packager
```
## 🔧 Getting Started:
### Display packager help:
```bash
vanilleplugin -h
```
### Regenerate dependency namespaces:
```bash
vanilleplugin -regd -d "Foo/Bar/src" -l "FooBar" -p "prefix"
```
### Regenerate dependency namespaces with disabled capitalization (StudlyCaps):
```bash
vanilleplugin -regd -d "Foo/Bar/src" -l "FooBar" -p "\!prefix"
```
### Regenerate dependency namespaces using random prefix:
```bash
vanilleplugin -regd -d "Foo/Bar/src" -l "FooBar"
```
### Regenerate VanillePlugin namespaces using random prefix:
```bash
vanilleplugin -reg
```
### Regenerate VanillePlugin namespaces:
```bash
vanilleplugin -reg "prefix"
```
### Regenerate VanillePlugin namespaces with disabled capitalization (StudlyCaps):
```bash
vanilleplugin -reg "\!prefix"
```
### Test packaging prefixed namespaces with disabled capitalization (StudlyCaps):
```bash
vanilleplugin -test "\!prefix"
```
## 📋 Options:
```
-d dependency source path (inside vendor folder)
```
```
-l dependency librairy name (Used in Namespaces)
```
```
-p Custom prefix
```
## 📋 Commands:
```
-regd Regenerate dependency namespaces
```
```
-reg Regenerate VanillePlugin namespaces
```
```
-test Test custom prefix after process
```
## Contributing:
Please read [CONTRIBUTING.md](https://github.com/Jakiboy/VanillePlugin-Packager/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
## Versioning:
We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/Jakiboy/VanillePlugin-Packager/tags).
## Authors:
* **Jihad Sinnaour** - [Jakiboy](https://github.com/Jakiboy) (*Initial work*)
See also the full list of [contributors](https://github.com/Jakiboy/VanillePlugin-Packager/contributors) who participated in this project. Any suggestions (Pull requests) are welcome!
## License:
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Jakiboy/VanillePlugin-Packager/blob/master/LICENSE) file for details.
## Todo:
* Rebuild with **symfony/console**.
* Add **phpunit/phpunit**.
* Use **.phar**.
* Use dynamic **vendor** directory.
* Use dynamic **system** (Plugin) directory.
* Use **regex(i)** instead of pathinfo().
* Use **Lexer/Parser**
## ⭐ Support:
Please give it a Star if you like the project.
## 💡 Notice:
* *Tested with VanillePlugin & many composer dependencies (e.g. [Twig](https://twig.symfony.com/)), But use it at your own risk*.