contao / rector
Rector configurations for Contao
                                    Fund package maintenance!
                                                                            
                                                                                                                                        to.contao.org/donate
                                                                                    
                                                                
Installs: 11 814
Dependents: 54
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
pkg:composer/contao/rector
Requires
- php: ^8.1
- rector/rector: ^2.0
Requires (Dev)
- contao/easy-coding-standard: ^6.12
README
This package includes the Rector configuration for Contao.
Installation
Add the package to your Contao installation via Composer:
composer require contao/rector --dev
Usage
Create a file named rector.php in the root directory of your project.
<?php declare(strict_types=1); use Contao\Rector\Set\SetList; use Rector\Config\RectorConfig; return RectorConfig::configure() ->withSets([SetList::CONTAO]) // Adjust the configuration according to your needs. ;
Then run the script like this:
vendor/bin/rector
What's inside?
The package contains the following custom rectors:
| Class | Description | 
|---|---|
| SimplifyObjectOrNullCheckRector | Replaces null comparisons that check for object|nullwith boolean comparisons. | 
License
Contao is licensed under the terms of the LGPLv3.
Getting support
Visit the support page to learn about the available support options.