Skip to content

Commit 2559154

Browse files
committed
update to latest dependencies
1 parent 9a4bb69 commit 2559154

20 files changed

+107
-223
lines changed

.github/workflows/php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
php-versions: [ '7.4', '8.0', '8.1' ]
18+
php-versions: [ '8.2', '8.3' ]
1919

2020
steps:
2121
- uses: actions/checkout@v2

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/vendor/
22
/composer.phar
33
/composer.lock
4-
.phpunit.result.cache
4+
/.phpunit.cache/
55
phpcs.cache

Makefile

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

composer.json

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,35 +30,35 @@
3030
}
3131
],
3232
"require": {
33-
"php": "^7.4|^8.0",
33+
"php": "^8.2",
3434

35-
"symfony/framework-bundle": "^4.4|^5.4|^6.0",
36-
"symfony/config": "^4.4|^5.4|^6.0",
37-
"symfony/http-kernel": "^4.4|^5.4|^6.0",
38-
"symfony/dependency-injection": "^4.4|^5.4|^6.0",
39-
"symfony/form": "^4.4|^5.4|^6.0",
40-
"symfony/yaml": "^4.4|^5.4|^6.0",
41-
"symfony/options-resolver": "^4.4|^5.4|^6.0",
42-
"symfony/property-access": "^4.4|^5.4|^6.0",
43-
"symfony/property-info": "^4.4|^5.4|^6.0",
35+
"symfony/framework-bundle": "^5.4 || ^6.4 || ^7.0",
36+
"symfony/config": "^5.4 || ^6.4 || ^7.0",
37+
"symfony/http-kernel": "^5.4 || ^6.4 || ^7.0",
38+
"symfony/dependency-injection": "^5.4 || ^6.4 || ^7.0",
39+
"symfony/form": "^5.4 || ^6.4 || ^7.0",
40+
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
41+
"symfony/options-resolver": "^5.4 || ^6.4 || ^7.0",
42+
"symfony/property-access": "^5.4 || ^6.4 || ^7.0",
43+
"symfony/property-info": "^5.4 || ^6.4 || ^7.0",
4444

45-
"doctrine/persistence": "^1.3|^2.0|^3.0",
45+
"doctrine/persistence": "^3.0",
4646
"webmozart/assert": "^1.9"
4747
},
4848
"require-dev": {
49-
"icanhazstring/composer-unused": "~0.7",
50-
"doctrine/coding-standard": "^9.0",
49+
"icanhazstring/composer-unused": "~0.8",
50+
"doctrine/coding-standard": "^12.0",
5151
"roave/security-advisories": "dev-master",
52-
"squizlabs/php_codesniffer": "^3.6",
53-
"phpstan/phpstan": "~1.2",
54-
"phpstan/phpstan-deprecation-rules": "~1.0",
55-
"phpstan/phpstan-phpunit": "~1.0",
56-
"phpstan/phpstan-strict-rules": "~1.1",
57-
"phpstan/phpstan-webmozart-assert": "~1.0",
58-
"maglnet/composer-require-checker": "^4.0",
59-
"phpunit/phpunit": "^9.5",
60-
"symfony/var-dumper": "^6.0",
61-
"phpstan/phpstan-symfony": "^1.0"
52+
"squizlabs/php_codesniffer": "^3.7",
53+
"phpstan/phpstan": "~1.10",
54+
"phpstan/phpstan-deprecation-rules": "~1.1",
55+
"phpstan/phpstan-phpunit": "~1.3",
56+
"phpstan/phpstan-strict-rules": "~1.5",
57+
"phpstan/phpstan-webmozart-assert": "~1.2",
58+
"maglnet/composer-require-checker": "^4.7",
59+
"phpstan/phpstan-symfony": "^1.3",
60+
"phpunit/phpunit": "^10.5",
61+
"symfony/var-dumper": "^7.0"
6262
},
6363
"autoload": {
6464
"psr-4": {
@@ -74,7 +74,6 @@
7474
"check": [
7575
"@crc",
7676
"@unused",
77-
"@cs-fix",
7877
"@cs-check",
7978
"@phpstan",
8079
"@phpunit"

docker-compose.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
version: '3.6'
22
services:
33
app:
4-
image: webdevops/php:7.4
4+
image: webdevops/php:8.3
55
volumes:
66
- ./:/app/
7-
env_file:
8-
- etc/environment.yml
7+
environment:
8+
PHP_MEMORY_LIMIT: 4G
9+
PHP_DATE_TIMEZONE: Europe/Berlin

etc/environment.yml

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

phpcs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<arg name="parallel" value="4"/>
88
<arg name="cache" value="./phpcs.cache" />
99

10-
<config name="php_version" value="70419"/>
10+
<config name="php_version" value="80300"/>
1111

1212
<file>src/</file>
1313
<file>tests/</file>

phpunit.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/8.4/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
executionOrder="depends,defects"
6-
forceCoversAnnotation="true"
7-
beStrictAboutCoversAnnotation="true"
86
beStrictAboutOutputDuringTests="true"
9-
beStrictAboutTodoAnnotatedTests="true"
10-
verbose="true">
7+
cacheDirectory=".phpunit.cache"
8+
requireCoverageMetadata="true"
9+
beStrictAboutCoverageMetadata="true"
10+
>
11+
<coverage/>
1112
<testsuites>
1213
<testsuite name="default">
1314
<directory suffix="Test.php">tests</directory>
1415
</testsuite>
1516
</testsuites>
16-
17-
<filter>
18-
<whitelist processUncoveredFilesFromWhitelist="true">
17+
<source>
18+
<include>
1919
<directory suffix=".php">src</directory>
20-
</whitelist>
21-
</filter>
20+
</include>
21+
</source>
2222
</phpunit>

src/DependencyInjection/ShapecodeHiddenEntityTypeExtension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111

1212
class ShapecodeHiddenEntityTypeExtension extends Extension
1313
{
14-
/**
15-
* @inheritDoc
16-
*/
14+
/** @inheritDoc */
1715
public function load(array $configs, ContainerBuilder $container): void
1816
{
1917
$locator = new FileLocator(__DIR__ . '/../Resources/config');

src/Form/DataTransformer/ObjectToIdTransformer.php

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,52 +13,40 @@
1313
use function is_string;
1414
use function sprintf;
1515

16-
/**
17-
* @template-extends Transformer<object, string>
18-
*/
16+
/** @template-extends Transformer<object, string> */
1917
class ObjectToIdTransformer extends Transformer
2018
{
21-
/**
22-
* @phpstan-param object|null $entity
23-
*
24-
* @phpstan-return string|null
25-
*/
26-
public function transform($entity)
19+
public function transform(mixed $value): mixed
2720
{
28-
if ($entity === null) {
21+
if ($value === null) {
2922
return null;
3023
}
3124

32-
Assert::isInstanceOf($entity, $this->class);
25+
Assert::isInstanceOf($value, $this->class);
3326

3427
$accessor = PropertyAccess::createPropertyAccessor();
3528
$property = $this->getProperty();
3629

37-
if (! $accessor->isReadable($entity, $property)) {
30+
if (! $accessor->isReadable($value, $property)) {
3831
return null;
3932
}
4033

41-
$value = $accessor->getValue($entity, $property);
34+
$valueObject = $accessor->getValue($value, $property);
4235

43-
if ($value === null) {
36+
if ($valueObject === null) {
4437
return null;
4538
}
4639

47-
if (! is_string($value) && ! is_numeric($value)) {
40+
if (! is_string($valueObject) && ! is_numeric($valueObject)) {
4841
throw new LogicException('id hast to be string or integer', 1653564596059);
4942
}
5043

51-
return (string) $value;
44+
return (string) $valueObject;
5245
}
5346

54-
/**
55-
* @phpstan-param string|null $id
56-
*
57-
* @phpstan-return object|null
58-
*/
59-
public function reverseTransform($id): ?object
47+
public function reverseTransform(mixed $value): mixed
6048
{
61-
if ($id === null) {
49+
if ($value === null) {
6250
return null;
6351
}
6452

@@ -67,11 +55,14 @@ public function reverseTransform($id): ?object
6755
$class = $this->getClass();
6856

6957
$result = $repo->findOneBy([
70-
$property => $id,
58+
$property => $value,
7159
]);
7260

7361
if ($result === null) {
74-
throw new TransformationFailedException(sprintf('Can\'t find entity of class "%s" with property "%s" = "%s".', $class, $property, $id));
62+
throw new TransformationFailedException(
63+
sprintf('Can\'t find entity of class "%s" with property "%s" = "%s".', $class, $property, $value),
64+
1701526691297,
65+
);
7566
}
7667

7768
Assert::isInstanceOf($result, $this->class);

0 commit comments

Comments
 (0)