Skip to content

Commit

Permalink
Merge pull request #46 from rebuy-de/allow-symfony-7
Browse files Browse the repository at this point in the history
Allow symfony 7 and also test against PHP 8.3
  • Loading branch information
dbu authored Jul 19, 2024
2 parents 16ee2ed + 7d0c02e commit 670c2e4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.0', '8.1', '8.2']
php-version: ['8.0', '8.1', '8.2', '8.3']
include:
- php-version: '8.0'
composer-flags: '--prefer-stable --prefer-lowest'
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

* Fixed: Dates with a getter/setter where incorrectly handled in the refactoring for 2.6.0.
See (#44)[https://github.com/liip/serializer/pull/44]
* Add support for symfony `7.x`
* Also test against PHP `8.3`
* Update rector to `1.2.1`

# 2.6.0

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
"ext-json": "*",
"liip/metadata-parser": "^1.2",
"pnz/json-exception": "^1.0",
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^4.4 || ^5.0 || ^6.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0",
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/finder": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0 || ^7.0",
"twig/twig": "^2.7 || ^3.0"
},
"require-dev": {
Expand All @@ -30,7 +30,7 @@
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.6",
"rector/rector": "^0.19.0"
"rector/rector": "^1.2.1"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 6 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,14 @@
use Rector\TypeDeclaration\Rector\Class_\PropertyTypeFromStrictSetterGetterRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\BoolReturnTypeFromBooleanStrictReturnsRector;
use Rector\TypeDeclaration\Rector\ClassMethod\NumericReturnTypeFromStrictScalarReturnsRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByMethodCallTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictBoolReturnExprRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictConstantReturnRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNativeCallRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictNewArrayRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictParamRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictScalarReturnExprRector;
use Rector\TypeDeclaration\Rector\ClassMethod\StringReturnTypeFromStrictScalarReturnsRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictSetUpRector;

Expand All @@ -27,12 +28,13 @@

$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class,
ReturnTypeFromStrictBoolReturnExprRector::class,
BoolReturnTypeFromBooleanStrictReturnsRector::class,
ReturnTypeFromStrictConstantReturnRector::class,
ReturnTypeFromStrictNativeCallRector::class,
ReturnTypeFromStrictNewArrayRector::class,
ReturnTypeFromStrictParamRector::class,
ReturnTypeFromStrictScalarReturnExprRector::class,
NumericReturnTypeFromStrictScalarReturnsRector::class,
StringReturnTypeFromStrictScalarReturnsRector::class,
PropertyTypeFromStrictSetterGetterRector::class,
TypedPropertyFromStrictConstructorRector::class,
TypedPropertyFromStrictSetUpRector::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

function serialize_Tests_Liip_Serializer_Fixtures_SerializerModel($model)
function serialize_Tests_Liip_Serializer_Fixtures_SerializerModel($model): array
{
return ['all' => true];
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

function serialize_Tests_Liip_Serializer_Fixtures_SerializerModel_api_2($model)
function serialize_Tests_Liip_Serializer_Fixtures_SerializerModel_api_2($model): array
{
return ['seen' => true];
}

0 comments on commit 670c2e4

Please sign in to comment.