Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9dd6064

Browse filesBrowse files
Merge branch '4.4'
* 4.4: Skip validation of services that make the CI fail
2 parents d4ae374 + 88759a3 commit 9dd6064
Copy full SHA for 9dd6064

File tree

3 files changed

+12
-8
lines changed
Filter options

3 files changed

+12
-8
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/TestBundle.php
+8-5Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Symfony\Component\DependencyInjection\Compiler\CheckTypeDeclarationsPass;
1717
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
1818
use Symfony\Component\DependencyInjection\ContainerBuilder;
19+
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
1920
use Symfony\Component\HttpKernel\Bundle\Bundle;
2021

2122
class TestBundle extends Bundle
@@ -24,16 +25,18 @@ public function build(ContainerBuilder $container)
2425
{
2526
parent::build($container);
2627

27-
$container->setParameter('container.build_hash', 'test_bundle');
28-
$container->setParameter('container.build_time', time());
29-
$container->setParameter('container.build_id', 'test_bundle');
30-
3128
/** @var $extension DependencyInjection\TestExtension */
3229
$extension = $container->getExtension('test');
3330

31+
if (!$container->getParameterBag() instanceof FrozenParameterBag) {
32+
$container->setParameter('container.build_hash', 'test_bundle');
33+
$container->setParameter('container.build_time', time());
34+
$container->setParameter('container.build_id', 'test_bundle');
35+
}
36+
3437
$extension->setCustomConfig(new CustomConfig());
3538

3639
$container->addCompilerPass(new AnnotationReaderPass(), PassConfig::TYPE_AFTER_REMOVING);
37-
$container->addCompilerPass(new CheckTypeDeclarationsPass(true), PassConfig::TYPE_AFTER_REMOVING, -100);
40+
$container->addCompilerPass(new CheckTypeDeclarationsPass(true, ['http_client', '.debug.http_client']), PassConfig::TYPE_AFTER_REMOVING, -100);
3841
}
3942
}

‎src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/JsonLoginLdap/bundles.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/JsonLoginLdap/bundles.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,4 @@
1212
return [
1313
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
1414
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
15-
new Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\TestBundle(),
1615
];

‎src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,24 @@ final class CheckTypeDeclarationsPass extends AbstractRecursivePass
3737
private const SCALAR_TYPES = ['int', 'float', 'bool', 'string'];
3838

3939
private $autoload;
40+
private $ignoredServices;
4041

4142
/**
4243
* @param bool $autoload Whether services who's class in not loaded should be checked or not.
4344
* Defaults to false to save loading code during compilation.
4445
*/
45-
public function __construct(bool $autoload = false)
46+
public function __construct(bool $autoload = false, array $ignoredServices = [])
4647
{
4748
$this->autoload = $autoload;
49+
$this->ignoredServices = array_flip($ignoredServices);
4850
}
4951

5052
/**
5153
* {@inheritdoc}
5254
*/
5355
protected function processValue($value, $isRoot = false)
5456
{
55-
if (!$value instanceof Definition) {
57+
if (!$value instanceof Definition || isset($this->ignoredServices[$this->currentId])) {
5658
return parent::processValue($value, $isRoot);
5759
}
5860

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.