Skip to content

Commit 3a8377a

Browse files
Merge branch '3.4'
* 3.4: [Bridge/PhpUnit] Sync the bridge version installed in vendor/ and in phpunit clone [DI] Analyze setter-circular deps more precisely fixing that PropertyNormalizer supports parent properties [SecurityBundle] Don't trigger auto-picking notice if provider is set per listener [TwigBundle][FrameworkBundle] Remove the internals from debug autowiring [DI] Skip hot_path tag for deprecated services as their class might also be [Cache] Memcached options should ignore "lazy" [FrameworkBundle] Dont create empty bundles directory
2 parents 0b9df73 + ae5d41c commit 3a8377a

File tree

5 files changed

+38
-44
lines changed

5 files changed

+38
-44
lines changed

Command/AssetsInstallCommand.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9898
}
9999
}
100100

101-
// Create the bundles directory otherwise symlink will fail.
102101
$bundlesDir = $targetArg.'/bundles/';
103-
$this->filesystem->mkdir($bundlesDir, 0777);
104102

105103
$io = new SymfonyStyle($input, $output);
106104
$io->newLine();
@@ -164,18 +162,22 @@ protected function execute(InputInterface $input, OutputInterface $output)
164162
}
165163
}
166164
// remove the assets of the bundles that no longer exist
167-
$dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir);
168-
$this->filesystem->remove($dirsToRemove);
165+
if (is_dir($bundlesDir)) {
166+
$dirsToRemove = Finder::create()->depth(0)->directories()->exclude($validAssetDirs)->in($bundlesDir);
167+
$this->filesystem->remove($dirsToRemove);
168+
}
169169

170-
$io->table(array('', 'Bundle', 'Method / Error'), $rows);
170+
if ($rows) {
171+
$io->table(array('', 'Bundle', 'Method / Error'), $rows);
172+
}
171173

172174
if (0 !== $exitCode) {
173175
$io->error('Some errors occurred while installing assets.');
174176
} else {
175177
if ($copyUsed) {
176178
$io->note('Some assets were installed via copy. If you make changes to these assets you have to run this command again.');
177179
}
178-
$io->success('All assets were successfully installed.');
180+
$io->success($rows ? 'All assets were successfully installed.' : 'No assets were provided by any bundle.');
179181
}
180182

181183
return $exitCode;

DependencyInjection/FrameworkExtension.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@
1313

1414
use Doctrine\Common\Annotations\Reader;
1515
use Symfony\Bridge\Monolog\Processor\DebugProcessor;
16-
use Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand;
17-
use Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand;
18-
use Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand;
19-
use Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand;
20-
use Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand;
21-
use Symfony\Bundle\FrameworkBundle\Command\XliffLintCommand;
22-
use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand;
2316
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
2417
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
2518
use Symfony\Bundle\FrameworkBundle\Routing\AnnotatedRouteControllerLoader;
@@ -120,10 +113,10 @@ public function load(array $configs, ContainerBuilder $container)
120113
$loader->load('console.xml');
121114

122115
if (!class_exists(BaseXliffLintCommand::class)) {
123-
$container->removeDefinition(XliffLintCommand::class);
116+
$container->removeDefinition('console.command.xliff_lint');
124117
}
125118
if (!class_exists(BaseYamlLintCommand::class)) {
126-
$container->removeDefinition(YamlLintCommand::class);
119+
$container->removeDefinition('console.command.yaml_lint');
127120
}
128121
}
129122

@@ -203,7 +196,7 @@ public function load(array $configs, ContainerBuilder $container)
203196
$container->removeDefinition('form.type_guesser.validator');
204197
}
205198
} else {
206-
$container->removeDefinition('Symfony\Component\Form\Command\DebugCommand');
199+
$container->removeDefinition('console.command.form_debug');
207200
}
208201

209202
$this->registerSecurityCsrfConfiguration($config['csrf_protection'], $container, $loader);
@@ -431,7 +424,7 @@ private function registerProfilerConfiguration(array $config, ContainerBuilder $
431424
private function registerWorkflowConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
432425
{
433426
if (!$config['enabled']) {
434-
$container->removeDefinition(WorkflowDumpCommand::class);
427+
$container->removeDefinition('console.command.workflow_dump');
435428

436429
return;
437430
}
@@ -603,8 +596,8 @@ private function registerDebugConfiguration(array $config, ContainerBuilder $con
603596
private function registerRouterConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
604597
{
605598
if (!$this->isConfigEnabled($container, $config)) {
606-
$container->removeDefinition(RouterDebugCommand::class);
607-
$container->removeDefinition(RouterMatchCommand::class);
599+
$container->removeDefinition('console.command.router_debug');
600+
$container->removeDefinition('console.command.router_match');
608601

609602
return;
610603
}
@@ -857,8 +850,8 @@ private function createVersion(ContainerBuilder $container, $version, $format, $
857850
private function registerTranslatorConfiguration(array $config, ContainerBuilder $container, LoaderInterface $loader)
858851
{
859852
if (!$this->isConfigEnabled($container, $config)) {
860-
$container->removeDefinition(TranslationDebugCommand::class);
861-
$container->removeDefinition(TranslationUpdateCommand::class);
853+
$container->removeDefinition('console.command.translation_debug');
854+
$container->removeDefinition('console.command.translation_update');
862855

863856
return;
864857
}

Resources/config/console.xml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,95 +13,95 @@
1313
<tag name="monolog.logger" channel="console" />
1414
</service>
1515

16-
<service id="Symfony\Bundle\FrameworkBundle\Command\AboutCommand">
16+
<service id="console.command.about" class="Symfony\Bundle\FrameworkBundle\Command\AboutCommand">
1717
<tag name="console.command" command="about" />
1818
</service>
1919

20-
<service id="Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand">
20+
<service id="console.command.assets_install" class="Symfony\Bundle\FrameworkBundle\Command\AssetsInstallCommand">
2121
<argument type="service" id="filesystem" />
2222
<tag name="console.command" command="assets:install" />
2323
</service>
2424

25-
<service id="Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand">
25+
<service id="console.command.cache_clear" class="Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand">
2626
<argument type="service" id="cache_clearer" />
2727
<argument type="service" id="filesystem" />
2828
<tag name="console.command" command="cache:clear" />
2929
</service>
3030

31-
<service id="Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand">
31+
<service id="console.command.cache_pool_clear" class="Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand">
3232
<argument type="service" id="cache.global_clearer" />
3333
<tag name="console.command" command="cache:pool:clear" />
3434
</service>
3535

36-
<service id="Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand">
36+
<service id="console.command.cache_pool_prune" class="Symfony\Bundle\FrameworkBundle\Command\CachePoolPruneCommand">
3737
<argument type="iterator" />
3838
<tag name="console.command" command="cache:pool:prune" />
3939
</service>
4040

41-
<service id="Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand">
41+
<service id="console.command.cache_warmup" class="Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand">
4242
<argument type="service" id="cache_warmer" />
4343
<tag name="console.command" command="cache:warmup" />
4444
</service>
4545

46-
<service id="Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand">
46+
<service id="console.command.config_debug" class="Symfony\Bundle\FrameworkBundle\Command\ConfigDebugCommand">
4747
<tag name="console.command" command="debug:config" />
4848
</service>
4949

50-
<service id="Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand">
50+
<service id="console.command.config_dump_reference" class="Symfony\Bundle\FrameworkBundle\Command\ConfigDumpReferenceCommand">
5151
<tag name="console.command" command="config:dump-reference" />
5252
</service>
5353

54-
<service id="Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand">
54+
<service id="console.command.container_debug" class="Symfony\Bundle\FrameworkBundle\Command\ContainerDebugCommand">
5555
<tag name="console.command" command="debug:container" />
5656
</service>
5757

58-
<service id="Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand">
58+
<service id="console.command.debug_autowiring" class="Symfony\Bundle\FrameworkBundle\Command\DebugAutowiringCommand">
5959
<tag name="console.command" command="debug:autowiring" />
6060
</service>
6161

62-
<service id="Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand">
62+
<service id="console.command.event_dispatcher_debug" class="Symfony\Bundle\FrameworkBundle\Command\EventDispatcherDebugCommand">
6363
<argument type="service" id="event_dispatcher" />
6464
<tag name="console.command" command="debug:event-dispatcher" />
6565
</service>
6666

67-
<service id="Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand">
67+
<service id="console.command.router_debug" class="Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand">
6868
<argument type="service" id="router" />
6969
<tag name="console.command" command="debug:router" />
7070
</service>
7171

72-
<service id="Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand">
72+
<service id="console.command.router_match" class="Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand">
7373
<argument type="service" id="router" />
7474
<tag name="console.command" command="router:match" />
7575
</service>
7676

77-
<service id="Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand">
77+
<service id="console.command.translation_debug" class="Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand">
7878
<argument type="service" id="translator" />
7979
<argument type="service" id="translation.reader" />
8080
<argument type="service" id="translation.extractor" />
8181
<tag name="console.command" command="debug:translation" />
8282
</service>
8383

84-
<service id="Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand">
84+
<service id="console.command.translation_update" class="Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand">
8585
<argument type="service" id="translation.writer" />
8686
<argument type="service" id="translation.reader" />
8787
<argument type="service" id="translation.extractor" />
8888
<argument>%kernel.default_locale%</argument>
8989
<tag name="console.command" command="translation:update" />
9090
</service>
9191

92-
<service id="Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand">
92+
<service id="console.command.workflow_dump" class="Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand">
9393
<tag name="console.command" command="workflow:dump" />
9494
</service>
9595

96-
<service id="Symfony\Bundle\FrameworkBundle\Command\XliffLintCommand">
96+
<service id="console.command.xliff_lint" class="Symfony\Bundle\FrameworkBundle\Command\XliffLintCommand">
9797
<tag name="console.command" command="lint:xliff" />
9898
</service>
9999

100-
<service id="Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand">
100+
<service id="console.command.yaml_lint" class="Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand">
101101
<tag name="console.command" command="lint:yaml" />
102102
</service>
103103

104-
<service id="Symfony\Component\Form\Command\DebugCommand">
104+
<service id="console.command.form_debug" class="Symfony\Component\Form\Command\DebugCommand">
105105
<argument type="service" id="form.registry" />
106106
<argument type="collection" /> <!-- All form types namespaces are stored here by FormPass -->
107107
<argument type="collection" /> <!-- All services form types are stored here by FormPass -->

Resources/config/services.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
<argument type="tagged" tag="config_cache.resource_checker" />
5656
</service>
5757

58-
<service id="Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker">
58+
<service id="dependency_injection.config.container_parameters_resource_checker" class="Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker">
5959
<argument type="service" id="service_container" />
6060
<tag name="config_cache.resource_checker" priority="-980" />
6161
</service>
6262

63-
<service id="Symfony\Component\Config\Resource\SelfCheckingResourceChecker">
63+
<service id="config.resource.self_checking_resource_checker" class="Symfony\Component\Config\Resource\SelfCheckingResourceChecker">
6464
<tag name="config_cache.resource_checker" priority="-990" />
6565
</service>
6666

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection;
1313

1414
use Doctrine\Common\Annotations\Annotation;
15-
use Symfony\Bundle\FrameworkBundle\Command\WorkflowDumpCommand;
1615
use Symfony\Bundle\FullStack;
1716
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1817
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddAnnotationsCachedReaderPass;
@@ -307,7 +306,7 @@ public function testWorkflowServicesCanBeEnabled()
307306
$container = $this->createContainerFromFile('workflows_enabled');
308307

309308
$this->assertTrue($container->has(Registry::class));
310-
$this->assertTrue($container->hasDefinition(WorkflowDumpCommand::class));
309+
$this->assertTrue($container->hasDefinition('console.command.workflow_dump'));
311310
}
312311

313312
public function testRouter()

0 commit comments

Comments
 (0)