Skip to content

Commit

Permalink
chore(tests): update test workflow
Browse files Browse the repository at this point in the history
- Updated `on` property in the test workflow to include spaces around the brackets
- Updated `php` versions in the test matrix
- Updated `dependency-version` in the test matrix
- Added new constants `MHASH_XXH3`, `MHASH_XXH32`, `MHASH_XXH64`, `MHASH_XXH128` in `rector.php`
- Removed the commented out rules `AddArrayDefaultToArrayPropertyRector` and `AddDefaultValueForUndefinedVariableRector` in `rector.php`
- Added `DowngradeLevelSetList::DOWN_TO_PHP_72` to the sets in `rector.php`
  • Loading branch information
guanguans committed Jan 15, 2024
1 parent 5bccc5c commit 781b248
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: tests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
php: [7.2, 8.2]
dependency-version: [prefer-stable]
os: [ windows-latest, macos-latest, ubuntu-latest ]
php: [ 7.2, 8.3 ]
dependency-version: [ prefer-stable ]

name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

Expand Down
8 changes: 6 additions & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
use Rector\EarlyReturn\Rector\StmtsAwareInterface\ReturnEarlyIfVariableRector;
use Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\RemoveExpectAnyFromMockRector;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\DowngradeLevelSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
use Rector\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector;

return static function (RectorConfig $rectorConfig): void {
define('MHASH_XXH3', 2 << 0);
define('MHASH_XXH32', 2 << 1);
define('MHASH_XXH64', 2 << 2);
define('MHASH_XXH128', 2 << 3);
$rectorConfig->importNames(true, false);
$rectorConfig->importShortClasses(false);
// $rectorConfig->disableParallel();
Expand Down Expand Up @@ -76,7 +80,6 @@
$rectorConfig->skip([
// rules
// AddArrayDefaultToArrayPropertyRector::class,
// AddDefaultValueForUndefinedVariableRector::class,
// CallableThisArrayToAnonymousFunctionRector::class,
// ChangeAndIfToEarlyReturnRector::class,
// RemoveEmptyClassMethodRector::class,
Expand Down Expand Up @@ -128,6 +131,7 @@
]);

$rectorConfig->sets([
// DowngradeLevelSetList::DOWN_TO_PHP_72,
LevelSetList::UP_TO_PHP_72,
SetList::PHP_72,
// SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION,
Expand Down

0 comments on commit 781b248

Please sign in to comment.