Skip to content

Commit 3d57e8d

Browse files
Merge branch '4.4' into 5.0
* 4.4: [Debug] fix ClassNotFoundFatalErrorHandler [Routing] Fix using a custom matcher & generator dumper class [Serializer] Fix cache in MetadataAwareNameConverter [Dotenv] Fixed infinite loop with missing quote followed by quoted value [HttpClient] Added missing sprintf [TwigBridge] button_widget now has its title attr translated even if its label = null or false [PhpUnitBridge] When using phpenv + phpenv-composer plugin, composer executable is wrapped into a bash script [Messenger] Added check if json_encode succeeded [Messenger] Added check if json_encode succeeded [FrameworkBundle][ContainerLintCommand] Only skip .errored. services [HttpClient] fix exception in case of PSR17 discovery failure [DependencyInjection] Handle ServiceClosureArgument for callable in container linting fix processing chain adapter based cache pool [HttpKernel] release lock explicitly [Security] Prevent canceled remember-me cookie from being accepted [FrameworkBundle][TranslationUpdateCommand] Do not output positive feedback on stderr [Security\Guard] Fix missing typehints do not render preferred choices as selected
2 parents 4b65be4 + 6feca57 commit 3d57e8d

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

Command/ContainerLintCommand.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,12 @@ private function getContainerBuilder(): ContainerBuilder
102102
$refl->setAccessible(true);
103103
$refl->setValue($parameterBag, true);
104104

105-
$passConfig = $container->getCompilerPassConfig();
106-
$passConfig->setRemovingPasses([]);
107-
$passConfig->setAfterRemovingPasses([]);
108-
109-
$skippedIds = $kernelContainer->getRemovedIds();
105+
$skippedIds = [];
106+
foreach ($container->getServiceIds() as $serviceId) {
107+
if (0 === strpos($serviceId, '.errored.')) {
108+
$skippedIds[$serviceId] = true;
109+
}
110+
}
110111
}
111112

112113
$container->setParameter('container.build_hash', 'lint_container');

Command/TranslationUpdateCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
175175
}
176176
}
177177

178-
$errorIo->title('Translation Messages Extractor and Dumper');
179-
$errorIo->comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"', $input->getArgument('locale'), $currentName));
178+
$io->title('Translation Messages Extractor and Dumper');
179+
$io->comment(sprintf('Generating "<info>%s</info>" translation files for "<info>%s</info>"', $input->getArgument('locale'), $currentName));
180180

181181
// load any messages from templates
182182
$extractedCatalogue = new MessageCatalogue($input->getArgument('locale'));
183-
$errorIo->comment('Parsing templates...');
183+
$io->comment('Parsing templates...');
184184
$this->extractor->setPrefix($input->getOption('prefix'));
185185
foreach ($viewsPaths as $path) {
186186
if (is_dir($path) || is_file($path)) {
@@ -190,7 +190,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
190190

191191
// load any existing messages from the translation files
192192
$currentCatalogue = new MessageCatalogue($input->getArgument('locale'));
193-
$errorIo->comment('Loading translation files...');
193+
$io->comment('Loading translation files...');
194194
foreach ($transPaths as $path) {
195195
if (is_dir($path)) {
196196
$this->reader->read($path, $currentCatalogue);
@@ -258,7 +258,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
258258
}
259259

260260
if ('xlf' === $input->getOption('output-format')) {
261-
$errorIo->comment(sprintf('Xliff output version is <info>%s</info>', $input->getOption('xliff-version')));
261+
$io->comment(sprintf('Xliff output version is <info>%s</info>', $input->getOption('xliff-version')));
262262
}
263263

264264
$resultMessage = sprintf('%d message%s successfully extracted', $extractedMessagesCount, $extractedMessagesCount > 1 ? 's were' : ' was');
@@ -270,7 +270,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
270270

271271
// save the files
272272
if (true === $input->getOption('force')) {
273-
$errorIo->comment('Writing files...');
273+
$io->comment('Writing files...');
274274

275275
$bundleTransPath = false;
276276
foreach ($transPaths as $path) {
@@ -290,7 +290,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
290290
}
291291
}
292292

293-
$errorIo->success($resultMessage.'.');
293+
$io->success($resultMessage.'.');
294294

295295
return 0;
296296
}

0 commit comments

Comments
 (0)