Skip to content

Commit 8456830

Browse files
authored
chore: update dependencies for Shopware 6.7 (#2)
1 parent a7234bb commit 8456830

File tree

15 files changed

+123
-174
lines changed

15 files changed

+123
-174
lines changed

.github/actions/composer/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ runs:
1919
- name: Setup PHP
2020
uses: shivammathur/setup-php@v2
2121
with:
22-
php-version: 8.3
22+
php-version: 8.4
2323
# Based on output of composer check-platform-reqs command.
2424
extensions: ctype,curl,dom,fileinfo,filter,gd,hash,iconv,intl,json,libxml,mbstring,openssl,pcre,pdo,pdo_mysql,phar,reflection,session,simplexml,sodium,tokenizer,xml,xmlwriter,zip,zlib${{ inputs.additional-extensions }}
2525

.github/workflows/_test.yaml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ jobs:
2525
matrix:
2626
composer-command:
2727
- install
28-
- require shopware/core:~6.6.10.0
29-
- require shopware/core:~6.6.9.0 --no-security-blocking
30-
- require shopware/core:~6.6.8.0 --no-security-blocking
31-
- require shopware/core:~6.6.7.0 --no-security-blocking
32-
- require shopware/core:~6.6.6.0 --no-security-blocking
33-
- require shopware/core:~6.6.5.0 --no-security-blocking
34-
- require shopware/core:~6.6.4.0 --no-security-blocking
35-
#- require shopware/core:~6.6.3.0
36-
#- require shopware/core:~6.6.2.0
37-
#- require shopware/core:~6.6.1.0
38-
#- require shopware/core:~6.6.0.0
28+
- require shopware/core:~6.7.7.0
29+
- require shopware/core:~6.7.6.0
30+
- require shopware/core:~6.7.5.0 --no-security-blocking
31+
- require shopware/core:~6.7.4.0 --no-security-blocking
32+
- require shopware/core:~6.7.3.0 --no-security-blocking
33+
# - require shopware/core:~6.7.2.0 --no-security-blocking - needs admin for testing, see https://github.com/shopware/shopware/pull/12604
34+
- require shopware/core:~6.7.1.0 --no-security-blocking
35+
- require shopware/core:~6.7.0.0 --no-security-blocking
3936

4037
steps:
4138
- name: Checkout repository

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
"license": "MIT",
55
"type": "shopware-platform-plugin",
66
"require": {
7-
"shopware/core": "~6.6.4"
7+
"shopware/core": "~6.7.0"
88
},
99
"require-dev": {
1010
"de-swebhosting-shopware-plugin/smart-relation-sync-test-plugin": "1.0.0",
11-
"de-swebhosting/php-codestyle": "^5.4",
12-
"ergebnis/composer-normalize": "^2.45",
13-
"friendsofphp/php-cs-fixer": "^3.66",
11+
"de-swebhosting/php-codestyle": "^7.0.0",
12+
"ergebnis/composer-normalize": "^2.50.0",
13+
"friendsofphp/php-cs-fixer": "^3.94",
1414
"phpstan/extension-installer": "^1.4",
1515
"phpstan/phpstan": "^2.1",
1616
"phpstan/phpstan-phpunit": "^2.0",
17+
"phpstan/phpstan-strict-rules": "^2.0",
1718
"phpstan/phpstan-symfony": "^2.0",
18-
"phpunit/phpunit": "^11.0 || ^12.0",
19+
"phpunit/phpunit": "^12.0",
1920
"rector/type-perfect": "^2.0",
2021
"shopware/dev-tools": "^1.5",
2122
"symplify/phpstan-rules": "^14.4"

config/packages/shopware.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

phpstan.neon

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
# Config based on https://github.com/shopware/shopware/blob/trunk/phpstan.neon.dist
22
includes:
3-
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
4-
# Based on vendor/shopware/core/DevOps/StaticAnalyze/PHPStan/extension.neon
5-
- tests/StaticAnalyze/PHPStan/phpstan-shopware-extension.neon
6-
- vendor/shopware/core/DevOps/StaticAnalyze/PHPStan/rules.neon
3+
- vendor/shopware/core/DevOps/StaticAnalyze/PHPStan/common.neon
74
# Based on vendor/shopware/core/DevOps/StaticAnalyze/PHPStan/core-rules.neon
85
- tests/StaticAnalyze/PHPStan/phpstan-shopware-core-rules.neon
9-
- tests/StaticAnalyze/PHPStan/phpstan-baseline.neon
106

117
parameters:
128
level: 9
13-
treatPhpDocTypesAsCertain: false
14-
inferPrivatePropertyTypeFromConstructor: true
15-
reportUnmatchedIgnoredErrors: true # Could be set to false if necessary during PHPStan update
169
tmpDir: var/cache/phpstan
1710
paths:
1811
- src
@@ -28,39 +21,3 @@ parameters:
2821
consoleApplicationLoader: tests/StaticAnalyze/PHPStan/console-application.php
2922
type_perfect:
3023
no_mixed: true
31-
ignoreErrors:
32-
- identifier: class.extendsInternalClass
33-
- identifier: classConstant.internalClass
34-
- identifier: method.internal
35-
- identifier: method.internalClass
36-
- identifier: method.internalInterface
37-
- identifier: new.internalClass
38-
- identifier: parameter.internalClass
39-
- identifier: parameter.internalInterface
40-
- identifier: property.internalClass
41-
- identifier: property.internalInterface
42-
- identifier: return.internalClass
43-
44-
services:
45-
- # register the class, so we can decorate it, but don't tag it as a rule, so only our decorator is used by PHPStan
46-
class: Symplify\PHPStanRules\Rules\NoReturnSetterMethodRule
47-
48-
rules:
49-
# rules from https://github.com/symplify/phpstan-rules
50-
# domain
51-
- Symplify\PHPStanRules\Rules\Enum\RequireUniqueEnumConstantRule
52-
- Symplify\PHPStanRules\Rules\PreventParentMethodVisibilityOverrideRule
53-
54-
# explicit naming
55-
- Symplify\PHPStanRules\Rules\ForbiddenMultipleClassLikeInOneFileRule
56-
57-
- Symplify\PHPStanRules\Rules\Complexity\ForbiddenArrayMethodCallRule
58-
59-
# complexity rules
60-
- Symplify\PHPStanRules\Rules\NoDynamicNameRule
61-
62-
# naming rules
63-
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Symplify\NoReturnSetterMethodWithFluentSettersRule
64-
- Symplify\PHPStanRules\Rules\UppercaseConstantRule
65-
#- Symplify\PHPStanRules\Rules\CheckClassNamespaceFollowPsr4Rule
66-
#- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\ShopwareNamespaceStyleRule

tests/Compatibility/IdsCollection.php

Lines changed: 0 additions & 11 deletions
This file was deleted.

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ public function extendFields(FieldCollection $collection): void
2424
PropertyGroupOptionExcludeDefinition::class,
2525
'property_group_option_id',
2626
'property_group_option_exclude_id',
27-
)
28-
)->addFlags(new ApiAware(), new CascadeDelete()),
27+
))->addFlags(new ApiAware(), new CascadeDelete()),
2928
);
3029
}
3130

32-
public function getDefinitionClass(): string
31+
public function getEntityName(): string
3332
{
34-
return PropertyGroupOptionDefinition::class;
33+
return PropertyGroupOptionDefinition::ENTITY_NAME;
3534
}
3635
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Swh\SmartRelationSyncTestPlugin\Migration;
6+
7+
use Doctrine\DBAL\Connection;
8+
use Shopware\Core\Framework\Migration\MigrationStep;
9+
10+
/**
11+
* Temporary workaround for missing migration, see:
12+
*
13+
* https://github.com/shopware/shopware/pull/14977
14+
*/
15+
final class Migration1737472122TokenUser extends MigrationStep
16+
{
17+
public function getCreationTimestamp(): int
18+
{
19+
return 1737472122;
20+
}
21+
22+
public function update(Connection $connection): void
23+
{
24+
$connection->executeStatement('
25+
CREATE TABLE IF NOT EXISTS oauth_user (
26+
`id` BINARY(16) UNIQUE NOT NULL,
27+
`user_id` BINARY(16) UNIQUE NOT NULL,
28+
`user_sub` VARCHAR(255) UNIQUE NOT NULL,
29+
`token` JSON DEFAULT NULL,
30+
`expiry` DATETIME NOT NULL,
31+
`created_at` DATETIME(3) NOT NULL,
32+
`updated_at` DATETIME(3),
33+
PRIMARY KEY (`id`),
34+
CONSTRAINT `fk.oauth_user.user_id` FOREIGN KEY (`user_id`)
35+
REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
36+
KEY `idx.oauth_user.user_sub` (`user_sub`)
37+
)
38+
');
39+
}
40+
}

tests/Functional/ApiDefinition/EntitySchemaGeneratorDecoratorTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,26 @@ public function testApiSchemaReturnsExpectedProperties(): void
2121

2222
$response = $this->getBrowser()->getResponse();
2323

24-
self::assertInstanceOf(JsonResponse::class, $response);
24+
$this->assertInstanceOf(JsonResponse::class, $response);
2525

2626
$json = $response->getContent();
2727

28-
self::assertIsString($json);
29-
self::assertNotEmpty($json);
28+
$this->assertIsString($json);
29+
$this->assertNotEmpty($json);
3030

3131
$json = json_decode($json, true);
3232

33-
self::assertIsArray($json);
33+
$this->assertIsArray($json);
3434

35-
self::assertIsArray($json['product']);
36-
self::assertIsArray($json['product']['properties']);
37-
self::assertIsArray($json['product']['properties']['categoriesCleanupRelations']);
38-
self::assertSame('boolean', $json['product']['properties']['categoriesCleanupRelations']['type']);
35+
$this->assertIsArray($json['product']);
36+
$this->assertIsArray($json['product']['properties']);
37+
$this->assertIsArray($json['product']['properties']['categoriesCleanupRelations']);
38+
$this->assertSame('boolean', $json['product']['properties']['categoriesCleanupRelations']['type']);
3939

40-
self::assertIsArray($json['property_group_option']);
41-
self::assertIsArray($json['property_group_option']['properties']);
42-
self::assertIsArray($json['property_group_option']['properties']['excludedOptions']);
43-
self::assertIsArray($json['property_group_option']['properties']['excludedOptionsCleanupRelations']);
44-
self::assertSame('boolean', $json['property_group_option']['properties']['excludedOptionsCleanupRelations']['type']);
40+
$this->assertIsArray($json['property_group_option']);
41+
$this->assertIsArray($json['property_group_option']['properties']);
42+
$this->assertIsArray($json['property_group_option']['properties']['excludedOptions']);
43+
$this->assertIsArray($json['property_group_option']['properties']['excludedOptionsCleanupRelations']);
44+
$this->assertSame('boolean', $json['property_group_option']['properties']['excludedOptionsCleanupRelations']['type']);
4545
}
4646
}

tests/Functional/ApiDefinition/OpenApiDefinitionSchemaBuilderDecoratorTest.php

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,37 +27,37 @@ public function testApiSchemaReturnsExpectedProperties(string $type): void
2727

2828
$response = $this->getBrowser()->getResponse();
2929

30-
self::assertInstanceOf(JsonResponse::class, $response);
30+
$this->assertInstanceOf(JsonResponse::class, $response);
3131

3232
$json = $response->getContent();
3333

34-
self::assertIsString($json);
35-
self::assertNotEmpty($json);
34+
$this->assertIsString($json);
35+
$this->assertNotEmpty($json);
3636

3737
$json = json_decode($json, true);
3838

39-
self::assertIsArray($json);
40-
self::assertIsArray($json['components']);
41-
self::assertIsArray($json['components']['schemas']);
39+
$this->assertIsArray($json);
40+
$this->assertIsArray($json['components']);
41+
$this->assertIsArray($json['components']['schemas']);
4242

4343
$schemas = $json['components']['schemas'];
4444

45-
self::assertIsArray($schemas['Product']);
46-
self::assertIsArray($schemas['Product']['properties']);
47-
self::assertIsArray($schemas['Product']['properties']['categoriesCleanupRelations']);
48-
self::assertSame('boolean', $schemas['Product']['properties']['categoriesCleanupRelations']['type']);
45+
$this->assertIsArray($schemas['Product']);
46+
$this->assertIsArray($schemas['Product']['properties']);
47+
$this->assertIsArray($schemas['Product']['properties']['categoriesCleanupRelations']);
48+
$this->assertSame('boolean', $schemas['Product']['properties']['categoriesCleanupRelations']['type']);
4949

50-
self::assertIsArray($schemas['PropertyGroupOption']);
51-
self::assertIsArray($schemas['PropertyGroupOption']['properties']);
52-
self::assertIsArray($schemas['PropertyGroupOption']['properties']['extensions']);
50+
$this->assertIsArray($schemas['PropertyGroupOption']);
51+
$this->assertIsArray($schemas['PropertyGroupOption']['properties']);
52+
$this->assertIsArray($schemas['PropertyGroupOption']['properties']['extensions']);
5353

54-
self::assertIsArray($schemas['PropertyGroupOption']['properties']['extensions']);
55-
self::assertIsArray($schemas['PropertyGroupOption']['properties']['extensions']['properties']);
54+
$this->assertIsArray($schemas['PropertyGroupOption']['properties']['extensions']);
55+
$this->assertIsArray($schemas['PropertyGroupOption']['properties']['extensions']['properties']);
5656

5757
$extensions = $schemas['PropertyGroupOption']['properties']['extensions']['properties'];
58-
self::assertIsArray($extensions['excludedOptions']);
59-
self::assertIsArray($extensions['excludedOptionsCleanupRelations']);
60-
self::assertSame('boolean', $extensions['excludedOptionsCleanupRelations']['type']);
58+
$this->assertIsArray($extensions['excludedOptions']);
59+
$this->assertIsArray($extensions['excludedOptionsCleanupRelations']);
60+
$this->assertSame('boolean', $extensions['excludedOptionsCleanupRelations']['type']);
6161
}
6262

6363
/**

0 commit comments

Comments
 (0)