php-school / workshop-manager
A tool to help find and install PHP School workshops
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- ext-zip: *
- composer/composer: ^1.1
- knplabs/github-api: ^1.5
- mnapoli/silly: ^1.4
- mnapoli/silly-php-di: ^1.0
- padraic/phar-updater: ^1.0
- php-di/php-di: ^5.2
- symfony/console: ^3.0
- symfony/filesystem: ^3.1
- tightenco/collect: ^5.2
- tm/tooly-composer-script: ^1.0
Requires (Dev)
- phpunit/phpunit: ~5.4
- squizlabs/php_codesniffer: ~2.6
This package is auto-updated.
Last update: 2024-11-29 23:08:00 UTC
README
A tool to manage your PHP School workshops. Search, install, update & remove workshops with ease!
Installation
Phar
This is the recommended installation method.
curl -O https://php-school.github.io/workshop-manager/workshop-manager.phar
mv workshop-manager.phar /usr/local/bin/workshop-manager
chmod +x /usr/local/bin/workshop-manager
workshop-manager verify
Composer
If you install the workshop-manager via composer you will need to make sure that you don't have conflicting dependencies with other globally installed tools. Also you will need to be able to use the self-update and rollback commands.
You will need to make sure that your composer global bin directory is available in your $PATH environment variable.
composer global require php-school/workshop-manager
workshop-manager verify
This snippet downloads the phar package (an executable PHP package) and moves it to a common install directory, makes it executable and then runs the workshop manager's verify command. You should see some green success messages if everything went will.
Usage / Commands
Search | Find
Quickly find available workshops by part of its name and get an instant indication if they're already installed.
workshop-manager search php # Result *** Matches *** +----------------+--------------------------------------------------+-------------+-----------+------------+ | Name | Description | Code | Type | Installed? | +----------------+--------------------------------------------------+-------------+-----------+------------+ | Learn you PHP! | A simple introduction into PHP and the workshop | learnyouphp | Core | ✘ | | | format. | | | | | PHP7 way | A PHP School workshop about some new features in | php7way + Community | ✘ | | | PHP7. | | | | +----------------+--------------------------------------------------+-------------+-----------+------------+
Install
Install a workshop with its package field, you can find this by doing a search like above.
workshop-manager install learnyouphp
You can then get started on your workshop instantly by using its package name, in this case you would just run learnyouphp
on the terminal.
Tip: If an error ever occurs and your not sure what it is, run it with -vvv
to get more details or create an issue for us to look at
Update
A simple way to update a workshop you already have installed. As workshops are just packages they may include bugs 😱 so keeping them up to date is important!
workshop-manager update learnyouphp
Uninstall | Remove
Remove a workshop by its package name.
workshop-manager uninstall learnyouphp
Installed
List the installed workshops, just so you know what you can get working on 😉
It will also let you know if you need to update any workshops that you already have installed.
workshop-manager installed # Result *** Installed Workshops *** +----------------+-------------------------------------------------+-------------+-----------+---------+------------------------+ | Name | Description | Code | Type | Version | New version available? | +----------------+-------------------------------------------------+-------------+-----------+---------+------------------------+ | Learn you PHP! | A simple introduction into PHP and the workshop | learnyouphp | Community | 0.3.1 | Nope! | | | format. | | | | | +----------------+-------------------------------------------------+-------------+-----------+---------+------------------------+
Self-update
Keeping the workshop manager up to date is just as important as updated the workshops themselves. We're not perfect and there are probably bugs, or maybe we'll launch some uber cool features, either way you should run this on a regular basis.
workshop-manager self-update
You can then continue using the workshop manager as you were before.
Rollback
Something go horribly wrong after that self-update
? No worries we got your back 😉 just run...
workshop-manager rollback
Then you might want to create an issue for that horrible bug you found 😂
Verify
You might need to verify your installation if your running into problems. This command will help diagnose those issues and point you in the right direction.
workshop-manager verify
Contributing
We welcome all contributions, new workshops, typos, feature requests bug fixes and so on.
To contribute to the code just clone the project, do your changes and make sure all the tests run.
Adding Workshops
We'd love to add your workshop so it can be installed with the workshop manager. To do so just fill in the form and let us take a look at things, we'll be pretty quick at getting it added!
Deveopment Executable
Whilst developing awesome new features you'll want to use the source executable and not a built phar file. To do so just run the following...
php bin/workshop-manager
Testing
Hmmmmm tests, we all love a good test! To run the suite use PHPUnit like so...
composer test
Made with ❤️ by the PHPSchool Team