phpgithook / module-hello-world
PHPGithook - Hello World module
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:phpgithook-module
Requires
- php: >=7.4
- ext-json: *
- phpgithook/module-interface: dev-master
- phpgithook/phpgithook: dev-master
- symfony/console: ^5.1
- symfony/http-client: ^5.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpgithook/module-tester: dev-master
- phpstan/phpstan: ^0.12.25
- phpunit/phpunit: ^9.1
This package is auto-updated.
Last update: 2024-11-07 02:04:21 UTC
README
This is a module, to show off what PHPGithook can do.
How to create a module
First of all you MUST have a file with the name Setup.php
and this file must implement PHPGithook\ModuleInterface\PHPGithookSetupInterface
You must require phpgithook/module-interface
in your composer file, to get access to the interfaces.
You do not need to create a file for all git hooks, you can just create those you want, you can also put everything inside the Setup.php
file if you want.
How to test a module
You can require phpgithook/module-tester
in your composer dev requirements, and create a test file which extends PHPGithook\ModuleTester\ModuleTester
and implement the abstract method, with the path to your Setup.php
file.
If you don't implement all the git hooks, a warning will be thrown, if its intentionally these warnings can ofcourse be ignored.
Install
As this is a example module, it shouldn't be used - but you can ofcourse use it if you want.
Install it with composer require phpgithook/module-hello-world
And to activate it, you must run vendor/bin/phpgithook phpgithook:module:enable helloworld