diff --git a/.github/workflows/phpcsfixer.yml b/.github/workflows/phpcsfixer.yml index 6e9c639..2065315 100644 --- a/.github/workflows/phpcsfixer.yml +++ b/.github/workflows/phpcsfixer.yml @@ -31,7 +31,7 @@ jobs: extensions: json, tokenizer coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 26a6e20..9e0f633 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -40,7 +40,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 274b154..b45a521 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -36,7 +36,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/.github/workflows/rector.yml b/.github/workflows/rector.yml index d91db3c..0abf271 100644 --- a/.github/workflows/rector.yml +++ b/.github/workflows/rector.yml @@ -40,7 +40,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/README.md b/README.md index e05b52e..1313bb1 100644 --- a/README.md +++ b/README.md @@ -143,8 +143,10 @@ predefined rulesets. Rector can be highly opinionated based on its configuration so be sure to read the documentation and figure out the best fit for you. This workflow performs a "dry run" to check for any changes that Rector would have made and fail if there are matches. -> Note: Rector updates rules all the time so you may want to lock your repo to the latest known working version of Rector to prevent unexpected failures -> E.g. in **Template/.github/workflows/rector.yml** supply the specific minor patch: `composer global require --dev rector/rector:0.12.16` +> Note: Rector updates rules all the time, so you may want to lock your repo to +> the latest known working version of Rector to prevent unexpected failures. +> Using pinned version in `composer.json` and update it with dependabot is the +> best practice. #### Unused diff --git a/src/Template/.github/workflows/deptrac.yml b/src/Template/.github/workflows/deptrac.yml index ca471f0..b8d7bcf 100644 --- a/src/Template/.github/workflows/deptrac.yml +++ b/src/Template/.github/workflows/deptrac.yml @@ -36,7 +36,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/src/Template/.github/workflows/infection.yml b/src/Template/.github/workflows/infection.yml index 8d2c1dc..ca8cd96 100644 --- a/src/Template/.github/workflows/infection.yml +++ b/src/Template/.github/workflows/infection.yml @@ -36,7 +36,7 @@ jobs: extensions: intl, json, mbstring, gd, xml, sqlite3 coverage: xdebug env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set up problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" diff --git a/src/Template/.github/workflows/phpcsfixer.yml b/src/Template/.github/workflows/phpcsfixer.yml index 6e9c639..2065315 100644 --- a/src/Template/.github/workflows/phpcsfixer.yml +++ b/src/Template/.github/workflows/phpcsfixer.yml @@ -31,7 +31,7 @@ jobs: extensions: json, tokenizer coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/src/Template/.github/workflows/phpstan.yml b/src/Template/.github/workflows/phpstan.yml index 26a6e20..1a2a452 100644 --- a/src/Template/.github/workflows/phpstan.yml +++ b/src/Template/.github/workflows/phpstan.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout @@ -40,7 +40,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/src/Template/.github/workflows/phpunit.yml b/src/Template/.github/workflows/phpunit.yml index c8caa4a..51e9866 100644 --- a/src/Template/.github/workflows/phpunit.yml +++ b/src/Template/.github/workflows/phpunit.yml @@ -25,7 +25,7 @@ jobs: if: "!contains(github.event.head_commit.message, '[ci skip]')" strategy: matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout @@ -39,7 +39,7 @@ jobs: extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3 coverage: xdebug env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV @@ -65,7 +65,7 @@ jobs: TERM: xterm-256color TACHYCARDIA_MONITOR_GA: enabled - - if: matrix.php-versions == '8.0' + - if: matrix.php-versions == '8.1' name: Run Coveralls continue-on-error: true run: | diff --git a/src/Template/.github/workflows/psalm.yml b/src/Template/.github/workflows/psalm.yml index 274b154..b45a521 100644 --- a/src/Template/.github/workflows/psalm.yml +++ b/src/Template/.github/workflows/psalm.yml @@ -36,7 +36,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV diff --git a/src/Template/.github/workflows/rector.yml b/src/Template/.github/workflows/rector.yml index d91db3c..a0feec3 100644 --- a/src/Template/.github/workflows/rector.yml +++ b/src/Template/.github/workflows/rector.yml @@ -26,7 +26,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['7.4', '8.0', '8.1'] + php-versions: ['7.4', '8.0', '8.1', '8.2'] steps: - name: Checkout @@ -40,7 +40,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV @@ -61,6 +61,4 @@ jobs: fi - name: Analyze for refactoring - run: | - composer global require --dev rector/rector:^0.15.1 - rector process --dry-run --no-progress-bar + run: vendor/bin/rector process --dry-run --no-progress-bar diff --git a/src/Template/.github/workflows/unused.yml b/src/Template/.github/workflows/unused.yml index 53a0d03..69ad2d1 100644 --- a/src/Template/.github/workflows/unused.yml +++ b/src/Template/.github/workflows/unused.yml @@ -34,7 +34,7 @@ jobs: extensions: intl, json, mbstring, xml coverage: none env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get composer cache directory run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV