[Dep] Update to php 8.1 requirement (manual) (#1374)

Co-authored-by: Tomas Votruba <tomas.vot@gmail.com>
This commit is contained in:
Abdul Malik Ikhsan 2021-12-03 21:44:33 +07:00 committed by GitHub
parent 505986d218
commit 1ba58dd16e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 35 additions and 18 deletions

View File

@ -35,7 +35,7 @@ jobs:
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
# fixes https://github.com/rectorphp/rector/pull/4559/checks?check_run_id=1359814403, see https://github.com/shivammathur/setup-php#composer-github-oauth
@ -58,6 +58,17 @@ jobs:
# 2. downgrade rector
- run: sh build/downgrade-rector.sh rector-build
# scoped using php-scoper.phar which require #[\ReturnTypeWillChange] inside so use php 8.0 for scoping
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
# fixes https://github.com/rectorphp/rector/pull/4559/checks?check_run_id=1359814403, see https://github.com/shivammathur/setup-php#composer-github-oauth
env:
COMPOSER_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# 3. prefix classes
- run: sh build/build-rector-scoped.sh rector-build rector-prefixed-downgraded

View File

@ -59,7 +59,7 @@ jobs:
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
- uses: "ramsey/composer-install@v1"

View File

@ -30,7 +30,7 @@ jobs:
# see https://github.com/shivammathur/setup-php
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
# must be removed, as local config is missing dev dependencies

View File

@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['8.0']
php_version: ['8.1']
directory:
- 'e2e/template-extends'
- 'e2e/plain-views'

View File

@ -42,7 +42,7 @@ jobs:
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
- run: composer config minimum-stability dev

View File

@ -18,7 +18,7 @@ jobs:
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
- run: composer create-project php-parallel-lint/php-parallel-lint php-parallel-lint

View File

@ -51,15 +51,16 @@ jobs:
uses: shivammathur/setup-php@v2
with:
# PHP 7.3 is required, so Rector's code is PHP 7.3 compatible even after refactoring
php-version: 8.0
php-version: 8.1
coverage: none
- run: composer install --no-progress --ansi
## First run Rector - here can't be --dry-run !!! it would stop the job with it and not commit anything in the future
- run: bin/rector process ${{ matrix.paths }} --ansi --no-progress-bar
# temporary disable rectify as splitted from https://github.com/rectorphp/rector-src/pull/1364
# - run: bin/rector process ${{ matrix.paths }} --ansi --no-progress-bar
- run: vendor/bin/ecs check --fix --ansi
# - run: vendor/bin/ecs check --fix --ansi
# see https://github.com/EndBug/add-and-commit
-

View File

@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.0']
php: ['8.1']
path:
- tests
- rules-tests

View File

@ -44,7 +44,7 @@ jobs:
-
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1
coverage: none
- uses: "ramsey/composer-install@v1"

View File

@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0']
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
commands:
-
name: 'Composer Dependency'

View File

@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0']
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
steps:
- uses: actions/checkout@v2

View File

@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0']
php_version: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
directory:
- 'e2e/attributes'
- 'e2e/define-constant'

View File

@ -7,7 +7,7 @@
"license": "MIT",
"homepage": "https://getrector.org",
"require": {
"php": "^8.0",
"php": "^8.1",
"ext-dom": "*",
"ext-json": "*",
"clue/ndjson-react": "^1.2",

View File

@ -1,6 +1,6 @@
{
"require": {
"php": "^8.0"
"php": "^8.1"
},
"minimum-stability": "dev",
"prefer-stable": true

View File

@ -5,7 +5,7 @@
}
},
"require": {
"php": "^8.0",
"php": "^8.1",
"myclabs/php-enum": "^1.8"
},
"minimum-stability": "dev",

View File

@ -11,6 +11,8 @@ use Rector\CodingStyle\ValueObject\ReturnArrayClassMethodToYield;
use Rector\Core\Configuration\Option;
use Rector\Nette\Set\NetteSetList;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php81\Rector\Class_\MyCLabsClassToEnumRector;
use Rector\Php81\Rector\Class_\SpatieEnumClassToEnumRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\LevelSetList;
@ -19,7 +21,7 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura
return static function (ContainerConfigurator $containerConfigurator): void {
// include the latest PHP version + all bellow in one config!
$containerConfigurator->import(LevelSetList::UP_TO_PHP_80);
$containerConfigurator->import(LevelSetList::UP_TO_PHP_81);
// include sets
$containerConfigurator->import(SetList::CODING_STYLE);
@ -75,6 +77,9 @@ return static function (ContainerConfigurator $containerConfigurator): void {
__DIR__ . '/rules/DowngradePhp74/Rector/Array_/DowngradeArraySpreadRector.php',
],
MyCLabsClassToEnumRector::class,
SpatieEnumClassToEnumRector::class,
// test paths
'*/tests/**/Fixture/*',
'*/rules-tests/**/Fixture/*',