Skip to content

Commit

Permalink
Upgrade project tooling to PHP 8.2 (#300)
Browse files Browse the repository at this point in the history
* Php 8.2
* Wait for 12.1.11 release of symplify/rule-doc-generator/tags
* Stylf fix (line endings?)

---------

Co-authored-by: bjorn <[email protected]>
  • Loading branch information
agentrickard and bbrala authored Apr 8, 2024
1 parent f74538a commit b5ad678
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
coverage: none # disable xdebug, pcov
tools: composer:v2
extensions: zip
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/functional_test__rector_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ jobs:
- php-version: "8.1"
drupal: "^10.0"
fixture: "d10"
- php-version: "8.2"
drupal: "^10.0"
fixture: "d10"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
coverage: none # disable xdebug, pcov
tools: composer:v2
extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, gd, exif, iconv
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
steps:
- uses: actions/checkout@v3
- uses: shivammathur/setup-php@v2
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@
"enable-patching": true
},
"require-dev": {
"php": "^8.1",
"php": "^8.2",
"cweagans/composer-patches": "^1.7.2",
"friendsofphp/php-cs-fixer": "^3.38",
"friendsofphp/php-cs-fixer": "^3.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpunit/phpunit": "^10.0",
"symfony/yaml": "^5 || ^6",
"symplify/rule-doc-generator": "^12.0",
"symplify/rule-doc-generator": "dev-main",
"symplify/vendor-patches": "^11.0"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Drupal8/Rector/Deprecation/DrupalLRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getRuleDefinition(): RuleDefinition
public function getNodeTypes(): array
{
return [
Node\Expr\StaticCall::class,
Node\Expr\StaticCall::class,
];
}

Expand Down
12 changes: 6 additions & 6 deletions src/Drupal8/Rector/Deprecation/SafeMarkupFormatRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ final class SafeMarkupFormatRector extends AbstractRector
public function getRuleDefinition(): RuleDefinition
{
return new RuleDefinition('Fixes deprecated SafeMarkup::format() calls', [
new CodeSample(
<<<'CODE_BEFORE'
new CodeSample(
<<<'CODE_BEFORE'
$safe_string_markup_object = \Drupal\Component\Utility\SafeMarkup::format('hello world');
CODE_BEFORE
,
<<<'CODE_AFTER'
,
<<<'CODE_AFTER'
$safe_string_markup_object = new \Drupal\Component\Render\FormattableMarkup('hello world');
CODE_AFTER
),
),
]);
}

Expand All @@ -45,7 +45,7 @@ public function getRuleDefinition(): RuleDefinition
public function getNodeTypes(): array
{
return [
Node\Expr\StaticCall::class,
Node\Expr\StaticCall::class,
];
}

Expand Down

0 comments on commit b5ad678

Please sign in to comment.