Skip to content

Commit

Permalink
Remove references from deprecated component
Browse files Browse the repository at this point in the history
Since Symfony DI 6.3, there's no need for using
`symfony/proxy-manager-brige` to create lazy services.

Signed-off-by: Luís Cobucci <[email protected]>
  • Loading branch information
lcobucci committed Aug 1, 2023
1 parent 88a2373 commit c20bc48
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 237 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/composer-json-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
run: "composer-normalize --dry-run"

- name: "Check composer.json explicit dependencies"
run: "composer-require-checker check --config-file=$(realpath composer-require-checker.json)"
run: "composer-require-checker check"

- name: "Check composer.json unused dependencies"
run: "composer-unused --ignore-exit-code "
5 changes: 0 additions & 5 deletions composer-require-checker.json

This file was deleted.

4 changes: 0 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^10.0.19",
"squizlabs/php_codesniffer": "^3.7.2",
"symfony/proxy-manager-bridge": "^6.3.0",
"symfony/yaml": "^6.3.3"
},
"replace": {
Expand All @@ -45,9 +44,6 @@
"symfony/polyfill-php81": "*",
"symfony/polyfill-php82": "*"
},
"suggest": {
"symfony/proxy-manager-bridge": "Allows the creation of lazy services"
},
"autoload": {
"psr-4": {
"Lcobucci\\DependencyInjection\\": "src"
Expand Down
214 changes: 1 addition & 213 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="true"
beStrictAboutCoverageMetadata="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
>
<coverage>
<include>
Expand Down
15 changes: 1 addition & 14 deletions src/Compiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

use Lcobucci\DependencyInjection\Config\ContainerConfiguration;
use RuntimeException;
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
use Symfony\Component\Config\ConfigCache;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
Expand All @@ -15,7 +14,6 @@

use function array_pop;
use function assert;
use function class_exists;
use function dirname;
use function is_array;
use function is_string;
Expand Down Expand Up @@ -83,7 +81,7 @@ private function getContainerContent(
$options['debug'] = $container->getParameter('app.devmode');
$options['as_files'] = true;

$content = $this->getDumper($container)->dump($options);
$content = (new PhpDumper($container))->dump($options);
assert(is_array($content));

return $content;
Expand Down Expand Up @@ -111,15 +109,4 @@ private function writeToFiles(

$dump->write($rootCode, $container->getResources());
}

private function getDumper(SymfonyBuilder $container): PhpDumper
{
$dumper = new PhpDumper($container);

if (class_exists(ProxyDumper::class)) {
$dumper->setProxyDumper(new ProxyDumper());
}

return $dumper;
}
}

0 comments on commit c20bc48

Please sign in to comment.