Skip to content

Commit d08d2f8

Browse files
committed
Upgrade symfony/dependency-injection to v7.0
1 parent 2ddab56 commit d08d2f8

File tree

8 files changed

+36
-27
lines changed

8 files changed

+36
-27
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
strategy:
1212
matrix:
1313
php-version:
14-
- "8.1"
1514
- "8.2"
1615
- "8.3"
1716
steps:

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The olvlvl/symfony-dependency-injection-proxy package is free software.
22
It is released under the terms of the following BSD License.
33

4-
Copyright (c) 2018-2023 by Olivier Laviale
4+
Copyright (c) 2018-present by Olivier Laviale
55
All rights reserved.
66

77
Redistribution and use in source and binary forms, with or without modification,

MIGRATION.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Migration
22

3+
## v5.x to v6.0
4+
5+
### New requirements
6+
7+
- Requires PHP v8.2+
8+
- Requires `symfony/dependency-injection` v7.0+
9+
10+
### New features
11+
12+
N/A
13+
14+
### Backward Incompatible Changes
15+
16+
N/A
17+
18+
### Deprecated Features
19+
20+
N/A
21+
22+
### Other Changes
23+
24+
N/A
25+
26+
27+
328
## v4.x to v5.0
429

530
### New requirements

Makefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ test-cleanup:
2525
@rm -rf tests/sandbox/*
2626

2727
.PHONY: test-container
28-
test-container: test-container-81
29-
30-
.PHONY: test-container-81
31-
test-container-81:
32-
@-docker-compose run --rm app81 bash
33-
@docker-compose down -v
28+
test-container: test-container-82
3429

3530
.PHONY: test-container-82
3631
test-container-82:

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
"prefer-stable": true,
2020
"prefer-dist": true,
2121
"require": {
22-
"php": ">=8.1",
22+
"php": ">=8.2",
2323
"ext-json": "*",
24-
"symfony/dependency-injection": "^6.3"
24+
"symfony/dependency-injection": "^7.0"
2525
},
2626
"require-dev": {
2727
"phpstan/phpstan": "^1.10",
2828
"phpunit/phpunit": "^10.5",
29-
"symfony/config": "^6.3"
29+
"symfony/config": "^7.0"
3030
},
3131
"autoload": {
3232
"psr-4": {

docker-compose.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
---
22
version: "3.2"
33
services:
4-
app81:
5-
build:
6-
context: .
7-
args:
8-
PHP_VERSION: "8.1"
9-
environment:
10-
PHP_IDE_CONFIG: "serverName=symfony-di-proxy"
11-
volumes:
12-
- .:/app:delegated
13-
- ~/.composer:/root/.composer:delegated
144
app82:
155
build:
166
context: .

lib/FactoryRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
use function array_map;
1919
use function implode;
2020

21-
class FactoryRenderer
21+
class FactoryRenderer // Cannot be made readyonly because of test-double
2222
{
2323
public function __construct(
2424
private readonly MethodRenderer $methodRenderer

lib/ProxyDumper.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@
2323
use function ltrim;
2424
use function sprintf;
2525

26-
final class ProxyDumper implements DumperInterface
26+
final readonly class ProxyDumper implements DumperInterface
2727
{
2828
public function __construct(
29-
private readonly InterfaceResolver $interfaceResolver = new BasicInterfaceResolver(),
30-
private readonly FactoryRenderer $factoryRenderer = new FactoryRenderer(new MethodRenderer()),
29+
private InterfaceResolver $interfaceResolver = new BasicInterfaceResolver(),
30+
private FactoryRenderer $factoryRenderer = new FactoryRenderer(new MethodRenderer()),
3131
) {
3232
}
3333

3434
/**
3535
* @inheritdoc
3636
*/
37-
public function isProxyCandidate(Definition $definition): bool
37+
public function isProxyCandidate(Definition $definition, bool &$asGhostObject = null, string $id = null): bool
3838
{
3939
$class = $definition->getClass();
4040

@@ -76,7 +76,7 @@ public function getProxyFactoryCode(Definition $definition, string $id, string $
7676
/**
7777
* @inheritdoc
7878
*/
79-
public function getProxyCode(Definition $definition): string
79+
public function getProxyCode(Definition $definition, string $id = null): string
8080
{
8181
return '';
8282
}

0 commit comments

Comments
 (0)