File tree Expand file tree Collapse file tree 3 files changed +23
-13
lines changed
Expand file tree Collapse file tree 3 files changed +23
-13
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,12 @@ jobs:
1818
1919 strategy :
2020 matrix :
21+ php-versions : ['8.1', '8.2', '8.3']
2122 actions :
2223 -
2324 name : ' Composer Validate'
2425 run : composer validate
2526
26- -
27- name : ' PHP-CS-Fixer'
28- run : composer lint
29-
3027 -
3128 name : ' Rector'
3229 run : composer rector
@@ -35,14 +32,14 @@ jobs:
3532 name : ' PHPStan'
3633 run : composer phpstan
3734
38- name : ${{ matrix.actions.name }}
35+ name : ${{ matrix.actions.name }} - ${{ matrix.php-versions }}
3936
4037 steps :
4138 - uses : actions/checkout@v4
4239
4340 - uses : shivammathur/setup-php@v2
4441 with :
45- php-version : 8.3
42+ php-version : ${{ matrix.php-versions }}
4643 coverage : none
4744
4845 - uses : ramsey/composer-install@v3
Original file line number Diff line number Diff line change 1313
1414use CodeIgniter \CodingStandard \CodeIgniter4 ;
1515use Nexus \CsConfig \Factory ;
16+ use Nexus \CsConfig \Fixer \Comment \NoCodeSeparatorCommentFixer ;
17+ use Nexus \CsConfig \FixerGenerator ;
1618use PhpCsFixer \Finder ;
1719
1820$ finder = Finder::create ()
1921 ->files ()
2022 ->in ([
21- __DIR__ . '/src/ ' ,
22- __DIR__ . '/tests/ ' ,
23- __DIR__ . '/config/ ' ,
23+ __DIR__ . '/src ' ,
24+ __DIR__ . '/config ' ,
25+ __DIR__ . '/tests ' ,
2426 ])
2527 ->append ([
2628 __FILE__ ,
3335];
3436
3537$ options = [
36- 'finder ' => $ finder ,
37- 'cacheFile ' => '.php-cs-fixer.cache ' ,
38+ 'finder ' => $ finder ,
39+ 'cacheFile ' => '.php-cs-fixer.cache ' ,
3840];
3941
40- return Factory::create (new CodeIgniter4 (), $ overrides , $ options )->forLibrary (
42+ $ config = Factory::create (new CodeIgniter4 (), $ overrides , $ options )->forLibrary (
4143 'CodeIgniter Rector ' ,
4244 'PHPDevsr ' ,
43454446);
47+
48+ // @TODO: remove this check when support for PHP 7.4 is dropped
49+ if (PHP_VERSION_ID >= 80000 ) {
50+ $ config
51+ ->registerCustomFixers (FixerGenerator::create ('vendor/nexusphp/cs-config/src/Fixer ' , 'Nexus \\CsConfig \\Fixer ' ))
52+ ->setRules (array_merge ($ config ->getRules (), [
53+ NoCodeSeparatorCommentFixer::name () => true ,
54+ ]));
55+ }
56+
57+ return $ config ;
Original file line number Diff line number Diff line change 11# Rector Rules for Codeigniter4
2- [ ![ Tests] ( https://github.com/PHPDevsr/rector-codeigniter4/actions/workflows/tests .yaml/badge.svg )] ( https://github.com/PHPDevsr/rector-codeigniter4/actions/workflows/test-phpunit.yaml )
2+ [ ![ Tests] ( https://github.com/PHPDevsr/rector-codeigniter4/actions/workflows/test-phpunit .yaml/badge.svg )] ( https://github.com/PHPDevsr/rector-codeigniter4/actions/workflows/test-phpunit.yaml )
33[ ![ Code Analysis] ( https://github.com/PHPDevsr/rector-codeigniter4/actions/workflows/code_analysis.yaml/badge.svg )] ( https://github.com/PHPDevsr/rector-codeigniter4/actions/workflows/code_analysis.yaml )
44[ ![ Packagist Downloads] ( https://img.shields.io/packagist/dm/PHPDevsr/rector-codeigniter4 )] ( https://packagist.org/packages/PHPDevsr/rector-codeigniter4/stats )
55[ ![ Packagist Version] ( https://img.shields.io/packagist/v/PHPDevsr/rector-codeigniter4 )] ( https://packagist.org/packages/PHPDevsr/rector-codeigniter4 )
You can’t perform that action at this time.
0 commit comments