diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 887606a..aef62d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,6 @@ jobs: strategy: matrix: php-version: - - "8.1" - "8.2" - "8.3" steps: diff --git a/LICENSE b/LICENSE index a60a90f..2e87993 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The olvlvl/symfony-dependency-injection-proxy package is free software. It is released under the terms of the following BSD License. -Copyright (c) 2018-2023 by Olivier Laviale +Copyright (c) 2018-present by Olivier Laviale All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/MIGRATION.md b/MIGRATION.md index 828dbe5..5e8f5bf 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -1,5 +1,30 @@ # Migration +## v5.x to v6.0 + +### New requirements + +- Requires PHP v8.2+ +- Requires `symfony/dependency-injection` v7.0+ + +### New features + +N/A + +### Backward Incompatible Changes + +N/A + +### Deprecated Features + +N/A + +### Other Changes + +N/A + + + ## v4.x to v5.0 ### New requirements diff --git a/Makefile b/Makefile index c7784d4..de60de6 100644 --- a/Makefile +++ b/Makefile @@ -25,12 +25,7 @@ test-cleanup: @rm -rf tests/sandbox/* .PHONY: test-container -test-container: test-container-81 - -.PHONY: test-container-81 -test-container-81: - @-docker-compose run --rm app81 bash - @docker-compose down -v +test-container: test-container-82 .PHONY: test-container-82 test-container-82: diff --git a/composer.json b/composer.json index 5f77deb..17c1d6a 100644 --- a/composer.json +++ b/composer.json @@ -19,14 +19,14 @@ "prefer-stable": true, "prefer-dist": true, "require": { - "php": ">=8.1", + "php": ">=8.2", "ext-json": "*", - "symfony/dependency-injection": "^6.3" + "symfony/dependency-injection": "^7.0" }, "require-dev": { "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^10.5", - "symfony/config": "^6.3" + "symfony/config": "^7.0" }, "autoload": { "psr-4": { diff --git a/docker-compose.yaml b/docker-compose.yaml index fd6946e..4f87071 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,16 +1,6 @@ --- version: "3.2" services: - app81: - build: - context: . - args: - PHP_VERSION: "8.1" - environment: - PHP_IDE_CONFIG: "serverName=symfony-di-proxy" - volumes: - - .:/app:delegated - - ~/.composer:/root/.composer:delegated app82: build: context: . diff --git a/lib/FactoryRenderer.php b/lib/FactoryRenderer.php index ea5a6c0..8526722 100644 --- a/lib/FactoryRenderer.php +++ b/lib/FactoryRenderer.php @@ -18,10 +18,10 @@ use function array_map; use function implode; -class FactoryRenderer +readonly class FactoryRenderer { public function __construct( - private readonly MethodRenderer $methodRenderer + private MethodRenderer $methodRenderer ) { } diff --git a/lib/ProxyDumper.php b/lib/ProxyDumper.php index 6d7bf20..c972458 100644 --- a/lib/ProxyDumper.php +++ b/lib/ProxyDumper.php @@ -23,18 +23,18 @@ use function ltrim; use function sprintf; -final class ProxyDumper implements DumperInterface +final readonly class ProxyDumper implements DumperInterface { public function __construct( - private readonly InterfaceResolver $interfaceResolver = new BasicInterfaceResolver(), - private readonly FactoryRenderer $factoryRenderer = new FactoryRenderer(new MethodRenderer()), + private InterfaceResolver $interfaceResolver = new BasicInterfaceResolver(), + private FactoryRenderer $factoryRenderer = new FactoryRenderer(new MethodRenderer()), ) { } /** * @inheritdoc */ - public function isProxyCandidate(Definition $definition): bool + public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool { $class = $definition->getClass(); @@ -76,7 +76,7 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $ /** * @inheritdoc */ - public function getProxyCode(Definition $definition): string + public function getProxyCode(Definition $definition, string $id = null): string { return ''; }