diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..435d94a --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file +* @ddevsr diff --git a/.github/workflows/check-conflict.yml b/.github/workflows/check-conflict.yml index a0554c7..101571c 100644 --- a/.github/workflows/check-conflict.yml +++ b/.github/workflows/check-conflict.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 - name: Check conflict branch in PR - uses: PHPDevsr/check-conflict-action@v1.0.0 + uses: PHPDevsr/check-conflict-action@v1.1.0 with: token: ${{ secrets.GITHUB_TOKEN }} label: stale diff --git a/.github/workflows/check-signing.yml b/.github/workflows/check-signing.yml index 9859086..b82f7de 100644 --- a/.github/workflows/check-signing.yml +++ b/.github/workflows/check-signing.yml @@ -24,7 +24,7 @@ jobs: uses: actions/checkout@v4 - name: Check signed commits in PR - uses: 1Password/check-signed-commits-action@v1.0.0 + uses: 1Password/check-signed-commits-action@v1.2.0 with: token: ${{ secrets.GITHUB_TOKEN }} comment: | diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index 4e75197..0d4a013 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -17,4 +17,4 @@ jobs: - name: 'Checkout Repository' uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 + uses: actions/dependency-review-action@v4 diff --git a/.github/workflows/test-coding-standard.yml b/.github/workflows/test-coding-standard.yml index 93098ed..8e0eeb7 100644 --- a/.github/workflows/test-coding-standard.yml +++ b/.github/workflows/test-coding-standard.yml @@ -48,7 +48,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/test-phpstan.yml b/.github/workflows/test-phpstan.yml index bbc24f0..bedf052 100644 --- a/.github/workflows/test-phpstan.yml +++ b/.github/workflows/test-phpstan.yml @@ -53,7 +53,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} @@ -65,7 +65,7 @@ jobs: run: mkdir -p build/phpstan - name: Cache PHPStan results - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: build/phpstan key: ${{ runner.os }}-phpstan-${{ github.sha }} diff --git a/.github/workflows/test-phpunit.yml b/.github/workflows/test-phpunit.yml index 695daae..21886a6 100644 --- a/.github/workflows/test-phpunit.yml +++ b/.github/workflows/test-phpunit.yml @@ -51,7 +51,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/test-rector.yml b/.github/workflows/test-rector.yml index 21353a1..5a12ade 100644 --- a/.github/workflows/test-rector.yml +++ b/.github/workflows/test-rector.yml @@ -46,7 +46,7 @@ jobs: run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV - name: Cache composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_FILES_DIR }} key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }} diff --git a/composer.json b/composer.json index 095b39c..ae1a2bc 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "phpstan/phpstan": "^1.10", "phpunit/phpcov": "^8.2", "phpunit/phpunit": "^9.6", - "rector/rector": "0.18.3" + "rector/rector": "1.0.0" }, "minimum-stability": "dev", "prefer-stable": true, diff --git a/rector.php b/rector.php index 25e98ab..e7a38d9 100644 --- a/rector.php +++ b/rector.php @@ -28,6 +28,7 @@ use Rector\CodeQuality\Rector\FuncCall\SimplifyStrposLowerRector; use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector; use Rector\CodeQuality\Rector\If_\CombineIfRector; +use Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector; use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector; use Rector\CodeQuality\Rector\If_\ShortenElseIfRector; use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector; @@ -44,7 +45,6 @@ use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector; use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector; use Rector\Config\RectorConfig; -use Rector\Core\ValueObject\PhpVersion; use Rector\DeadCode\Rector\Array_\RemoveDuplicatedArrayKeyRector; use Rector\DeadCode\Rector\Assign\RemoveDoubleAssignRector; use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector; @@ -77,6 +77,7 @@ use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector; use Rector\Set\ValueObject\LevelSetList; use Rector\Set\ValueObject\SetList; +use Rector\ValueObject\PhpVersion; return static function (RectorConfig $rectorConfig): void { $rectorConfig->sets([ @@ -159,6 +160,7 @@ $rectorConfig->rule(SimplifyRegexPatternRector::class); $rectorConfig->rule(SimplifyStrposLowerRector::class); $rectorConfig->rule(CombineIfRector::class); + $rectorConfig->rule(CompleteMissingIfElseBracketRector::class); $rectorConfig->rule(ShortenElseIfRector::class); $rectorConfig->rule(SimplifyIfElseToTernaryRector::class); $rectorConfig->rule(SimplifyIfReturnBoolRector::class);