Skip to content

Commit 93f8cf9

Browse files
committed
chore: restore PHP 8.2 compatibility
1 parent 530646f commit 93f8cf9

File tree

7 files changed

+21
-5
lines changed

7 files changed

+21
-5
lines changed

.github/workflows/_lint.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ jobs:
1818
- name: Run PHP-CS-Fixer
1919
run: composer run lint-composer
2020

21+
lint-php:
22+
name: PHP-CS-Fixer
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
- uses: ./.github/actions/composer
28+
with:
29+
composer-install: 'false'
30+
- name: Run PHP-CS-Fixer
31+
run: composer run lint-php
32+
2133
php-cs-fixer:
2234
name: PHP-CS-Fixer
2335
runs-on: ubuntu-latest
@@ -45,6 +57,8 @@ jobs:
4557
- name: Checkout repository
4658
uses: actions/checkout@v4
4759
- uses: ./.github/actions/composer
60+
with:
61+
composer-install: 'false'
4862
- uses: actions/setup-node@v4
4963
with:
5064
node-version: 22

composer.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
},
6666
"lint": [
6767
"@lint-composer",
68+
"@lint-php",
6869
"@lint-php-cs-fixer",
6970
"@lint-phpstan",
7071
"@lint-prettier"
@@ -76,6 +77,7 @@
7677
"@lint-php-cs-fixer-fix",
7778
"@lint-prettier-fix"
7879
],
80+
"lint-php": "failed=1; find . -name \"*.php\" -not -path \"./vendor/*\" -not -path \"./var/*\" -exec php -l \"{}\" \\; 2>&1 | grep \"PHP Parse error\" || failed=0; test \"$failed\" -eq \"0\"",
7981
"lint-php-cs-fixer": "vendor/bin/php-cs-fixer fix --diff --dry-run",
8082
"lint-php-cs-fixer-fix": "vendor/bin/php-cs-fixer fix",
8183
"lint-phpstan": [

src/ApiDefinition/EntitySchemaGeneratorDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
final class EntitySchemaGeneratorDecorator extends EntitySchemaGenerator
2424
{
25-
private const array CLEANUP_PROPERTY_DEFINITION = [
25+
private const CLEANUP_PROPERTY_DEFINITION = [
2626
'type' => 'boolean',
2727
'flags' => [
2828
// Reading is never allowed, the field is not returned by the API

tests/Fixtures/SmartRelationSyncTestPlugin/src/Entity/PropertyGroupOptionExcludeDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
class PropertyGroupOptionExcludeDefinition extends MappingEntityDefinition
1616
{
17-
final public const string ENTITY_NAME = 'property_group_option_exclude';
17+
final public const ENTITY_NAME = 'property_group_option_exclude';
1818

1919
public function getEntityName(): string
2020
{

tests/Fixtures/SmartRelationSyncTestPlugin/src/Entity/PropertyGroupOptionExcludeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
class PropertyGroupOptionExcludeExtension extends EntityExtension
1515
{
16-
public const string EXTENSION_NAME = 'excludedOptions';
16+
public const EXTENSION_NAME = 'excludedOptions';
1717

1818
public function extendFields(FieldCollection $collection): void
1919
{

tests/Fixtures/SmartRelationSyncTestPlugin/src/Entity/VersionedChildDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class VersionedChildDefinition extends EntityDefinition
2020
{
21-
final public const string ENTITY_NAME = 'versioned_child';
21+
final public const ENTITY_NAME = 'versioned_child';
2222

2323
public function getCollectionClass(): string
2424
{

tests/Fixtures/SmartRelationSyncTestPlugin/src/Entity/VersionedParentDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
class VersionedParentDefinition extends EntityDefinition
2020
{
21-
final public const string ENTITY_NAME = 'versioned_parent';
21+
final public const ENTITY_NAME = 'versioned_parent';
2222

2323
public function getCollectionClass(): string
2424
{

0 commit comments

Comments
 (0)