File tree Expand file tree Collapse file tree 3 files changed +45
-1
lines changed
Expand file tree Collapse file tree 3 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 88 name : Validate code samples
99 runs-on : " ubuntu-22.04"
1010 strategy :
11+ fail-fast : false
1112 matrix :
1213 php :
1314 - " 8.4" # Upper supported version
4748
4849 - name : Run PHPStan analysis
4950 run : composer phpstan
51+
52+ - if : matrix.php == '8.4' # ibexa/rector supports PHP 8.3 and higher
53+ name : Run Rector check
54+ run : |
55+ composer require --dev ibexa/rector:~4.6.x-dev
56+ composer check-rector
5057
5158 code-samples-inclusion-check :
5259 name : Check code samples inclusion
Original file line number Diff line number Diff line change 1111 "url" : " https://updates.ibexa.co"
1212 }
1313 ],
14+ "require" : {
15+ "php" : " ^7.4 || ^8.0"
16+ },
1417 "require-dev" : {
1518 "ibexa/automated-translation" : " 4.6.x-dev" ,
1619 "ibexa/code-style" : " ^1.0" ,
8285 "scripts" : {
8386 "fix-cs" : " php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots" ,
8487 "check-cs" : " @fix-cs --dry-run" ,
85- "phpstan" : " phpstan analyse"
88+ "phpstan" : " phpstan analyse" ,
89+ "check-rector" : " rector process --dry-run --ansi"
90+ },
91+ "suggest" : {
92+ "ibexa/rector" : " Add Rector to check for code refactoring opportunities"
93+ },
94+ "scripts-descriptions" : {
95+ "check-rector" : " Check for code refactoring opportunities"
8696 },
8797 "config" : {
8898 "allow-plugins" : false
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ * @copyright Copyright (C) Ibexa AS. All rights reserved.
5+ * @license For full copyright and license information view LICENSE file distributed with this source code.
6+ */
7+ declare (strict_types=1 );
8+
9+ use Rector \Config \RectorConfig ;
10+ use Ibexa \Contracts \Rector \Sets \IbexaSetList ;
11+ use Rector \Symfony \DowngradeSymfony70 \Rector \Class_ \DowngradeSymfonyCommandAttributeRector ;
12+ use Rector \DowngradePhp82 \Rector \FuncCall \DowngradeIteratorCountToArrayRector ;
13+
14+ return RectorConfig::configure ()
15+ ->withPaths ([
16+ __DIR__ . '/code_samples ' ,
17+ ])
18+ ->withSkip ([
19+ DowngradeIteratorCountToArrayRector::class,
20+ ])
21+ ->withSets ([
22+ IbexaSetList::IBEXA_46 ->value ,
23+ ])
24+ ->withDowngradeSets (php74: true )
25+ ->withRules ([
26+ DowngradeSymfonyCommandAttributeRector::class,
27+ ]);
You can’t perform that action at this time.
0 commit comments