See available Codeigniter4 rules
Minimum PHP 8.1
This package is a Rector extension developed by the PHPDevsr based on Codeigniter4 Community. In set 4.5
required PHPStan
, you needed create phpstan.neon.dist
in root project.
Install the PHPDevsr\Rector\Codeigniter4
package as dependency:
composer require phpdevsr/rector-codeigniter4 --dev
To add a set to your config, use PHPDevsr\Rector\Codeigniter4\Set\CodeigniterSetList
class and pick one of the constants:
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use PHPDevsr\Rector\Codeigniter4\Set\CodeigniterSetList;
return RectorConfig::configure()
->withSets([
CodeigniterSetList::CODEIGNITER_45
]);
Rector is a tool that we develop and share for free, so anyone can save hundreds of hours on refactoring. But not everyone has time to understand Rector and AST complexity. You have 2 ways to speed this process up:
- Read the book - The Power of Automated Refactoring
- Hire our experienced team to improve your codebase
Both ways support us to and improve Rector in sustainable way by learning from practical projects.