Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cslant/composer-plugin-example
An example of a composer plugin for PHP
https://github.com/cslant/composer-plugin-example
composer composer-installer composer-package composer-packages composer-plugin composer-scripts cslant packagist php-plugin php-plugins plugin
Last synced: 23 days ago
JSON representation
An example of a composer plugin for PHP
- Host: GitHub
- URL: https://github.com/cslant/composer-plugin-example
- Owner: cslant
- License: mit
- Created: 2023-11-15T03:18:23.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-27T17:18:30.000Z (2 months ago)
- Last Synced: 2024-11-15T21:45:57.402Z (about 2 months ago)
- Topics: composer, composer-installer, composer-package, composer-packages, composer-plugin, composer-scripts, cslant, packagist, php-plugin, php-plugins, plugin
- Language: PHP
- Homepage: https://packagist.org/packages/cslant/composer-plugin-example
- Size: 11.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Composer plugin example
Here is a simple example of a composer plugin.
## Structure
```
plugin
├── src
│ └── Plugin.php
├── composer.json
├── composer.lock
```## Usage
### Add require into composer.json
```json
{
"require": {
"cslant/composer-plugin-example": "dev-main"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/cslant/composer-plugin-example.git"
}
]
}
```### Run composer command
```bash
composer update
```### Check vendor directory
```bash
ls vendor/cslant/composer-plugin-example
```## Reference
- [Composer Plugin API](https://getcomposer.org/doc/articles/plugins.md)
## Composer install demo
```bash
composer require cslant/composer-plugin-example
```