8000 fixed some composer.json to make standalone component tests pass · src-run/symfony@5c3cea5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5c3cea5

Browse files
committed
fixed some composer.json to make standalone component tests pass
< 8000 /span>
1 parent de780e8 commit 5c3cea5

File tree

6 files changed

+29
-23
lines changed

6 files changed

+29
-23
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/AddConsoleCommandPassTest.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Console\Command\Command;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\DependencyInjection\Definition;
18+
use Symfony\Component\HttpKernel\Bundle\Bundle;
1819

1920
class AddConsoleCommandPassTest extends \PHPUnit_Framework_TestCase
2021
{
@@ -87,8 +88,32 @@ public function testProcessThrowAnExceptionIfTheServiceIsNotASubclassOfCommand()
8788

8889
$container->compile();
8990
}
91+
92+
public function testHttpKernelRegisterCommandsIngoreCommandAsAService()
93+
{
94+
$container = new ContainerBuilder();
95+
$container->addCompilerPass(new AddConsoleCommandPass());
96+
$definition = new Definition('Symfony\Bundle\FrameworkBundle\Tests\DependencyInjection\Compiler\MyCommand');
97+
$definition->addTag('console.command');
98+
$container->setDefinition('my-command', $definition);
99+
$container->compile();
100+
101+
$application = $this->getMock('Symfony\Component\Console\Application');
102+
// Never called, because it's the
103+
// Symfony\Bundle\FrameworkBundle\Console\Application that register
104+
// commands as a service
105+
$application->expects($this->never())->method('add');
106+
107+
$bundle = new ExtensionPresentBundle();
108+
$bundle->setContainer($container);
109+
$bundle->registerCommands($application);
110+
}
90111
}
91112

92113
class MyCommand extends Command
93114
{
94115
}
116+
117+
class ExtensionPresentBundle extends Bundle
118+
{
119+
}

src/Symfony/Component/Form/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/property-access": "~2.3"
2424
},
2525
"require-dev": {
26-
"symfony/validator": "~2.4",
26+
"symfony/validator": "~2.4,<2.5.0",
2727
"symfony/http-foundation": "~2.2",
2828
"symfony/http-kernel": "~2.4",
2929
"symfony/security-csrf": "~2.4",

src/Symfony/Component/HttpKernel/Tests/Bundle/BundleTest.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,4 @@ public function testRegisterCommands()
3434

3535
$this->assertNull($bundle2->registerCommands($app));
3636
}
37-
38-
public function testRegisterCommandsIngoreCommandAsAService()
39-
{
40-
$container = new ContainerBuilder();
41-
$container->addCompilerPass(new AddConsoleCommandPass());
42-
$definition = new Definition('Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\Command\FooCommand');
43-
$definition->addTag('console.command');
44-
$container->setDefinition('my-command', $definition);
45-
$container->compile();
46-
47 8000 -
$application = $this->getMock('Symfony\Component\Console\Application');
48-
// Never called, because it's the
49-
// Symfony\Bundle\FrameworkBundle\Console\Application that register
50-
// commands as a service
51-
$application->expects($this->never())->method('add');
52-
53-
$bundle = new ExtensionPresentBundle();
54-
$bundle->setContainer($container);
55-
$bundle->registerCommands($application);
56-
}
5737
}

src/Symfony/Component/Security/Core/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"symfony/event-dispatcher": "~2.1",
2323
"symfony/expression-language": "~2.4",
2424
"symfony/http-foundation": "~2.4",
25-
"symfony/validator": "~2.2",
25+
"symfony/validator": "~2.2,<2.5.0",
2626
"psr/log": "~1.0",
2727
"ircmaxell/password-compat": "1.0.*"
2828
},

src/Symfony/Component/Security/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
},
3030
"require-dev": {
3131
"symfony/routing": "~2.2",
32-
"symfony/validator": "~2.2",
32+
"symfony/validator": "~2.2,<2.5.0",
3333
"doctrine/common": "~2.2",
3434
"doctrine/dbal": "~2.2",
3535
"psr/log": "~1.0",

src/Symfony/Component/Validator/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"symfony/intl": "~2.3",
2626
"symfony/yaml": "~2.0",
2727
"symfony/config": "~2.2",
28+
"symfony/expression-language": "~2.4",
2829
"doctrine/annotations": "~1.0",
2930
"doctrine/cache": "~1.0"
3031
},

0 commit comments

Comments
 (0)
0