Skip to content

Commit 145790f

Browse files
committed
Merge branch '2.5'
* 2.5: (37 commits) [Validator] Backported constraint validator tests from 2.5 [Validator] Backported constraint validator tests from 2.5 [DIC] Fixed: anonymous services are always private Fix toolbar vertical alignment. [HttpFoundation] MongoDbSessionHandler supports auto expiry via configurable expiry_field [Validator] Fix little typo in ExecutionContextInterface::buildViolation() method comments fix dependencies on HttpFoundation component [FrameworkBundle] add missing attribute to XSD Allow basic auth in url. Improve regex. Add tests. fix typos and syntax in Profiler controller method comments resolve parameters before the configs are processed add symfony/yaml suggestion to composer.json [HttpKernel] added an analyze of environment parameters for built-in server. remove volatile tests [Console] fixed style creation when providing an unknown tag option change command to which available under most unix systems add way to test command under windows fix shell command injection [Form] allowed CallbackTransformer to use callable [Process] Added process synchronization to the incremental output tests ... Conflicts: src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php src/Symfony/Component/HttpKernel/Kernel.php src/Symfony/Component/HttpKernel/composer.json src/Symfony/Component/Validator/Constraints/AllValidator.php src/Symfony/Component/Validator/Constraints/CollectionValidator.php src/Symfony/Component/Validator/Constraints/LegacyAllValidator.php src/Symfony/Component/Validator/Constraints/LegacyCollectionValidator.php src/Symfony/Component/Validator/Tests/Constraints/FileValidatorTest.php
2 parents 11d3550 + 4582e74 commit 145790f

File tree

13 files changed

+19
-97
lines changed

13 files changed

+19
-97
lines changed

Command/ConfigDebugCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ protected function execute(InputInterface $input, OutputInterface $output)
7878

7979
$this->validateConfiguration($extension, $configuration);
8080

81+
$configs = $container->getParameterBag()->resolveValue($configs);
82+
8183
$processor = new Processor();
8284
$config = $processor->processConfiguration($configuration, $configs);
8385

84-
$config = $container->getParameterBag()->resolveValue($config);
85-
8686
if ($name === $extension->getAlias()) {
8787
$output->writeln(sprintf('# Current configuration for extension with alias: "%s"', $name));
8888
} else {

Command/ServerRunCommand.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ protected function configure()
8282
*/
8383
protected function execute(InputInterface $input, OutputInterface $output)
8484
{
85+
$documentRoot = $input->getOption('docroot');
86+
87+
if (!is_dir($documentRoot)) {
88+
$output->writeln(sprintf('<error>The given document root directory "%s" does not exist</error>', $documentRoot));
89+
90+
return 1;
91+
}
92+
8593
$env = $this->getContainer()->getParameter('kernel.environment');
8694

8795
if ('prod' === $env) {
@@ -91,7 +99,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9199
$output->writeln(sprintf("Server running on <info>http://%s</info>\n", $input->getArgument('address')));
92100

93101
$builder = $this->createPhpProcessBuilder($input, $output, $env);
94-
$builder->setWorkingDirectory($input->getOption('docroot'));
102+
$builder->setWorkingDirectory($documentRoot);
95103
$builder->setTimeout(null);
96104
$process = $builder->getProcess();
97105

DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,6 @@ private function registerValidationConfiguration(array $config, ContainerBuilder
741741
switch ($config['api']) {
742742
case '2.4':
743743
$api = Validation::API_VERSION_2_4;
744-
$container->setParameter('validator.validator_factory.class', $container->getParameter('validator.legacy_validator_factory.class'));
745744
break;
746745
case '2.5':
747746
$api = Validation::API_VERSION_2_5;

Resources/config/router_dev.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
return false;
2626
}
2727

28+
$_SERVER = array_merge($_SERVER, $_ENV);
2829
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app_dev.php';
2930

3031
require 'app_dev.php';

Resources/config/router_prod.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
return false;
2626
}
2727

28+
$_SERVER = array_merge($_SERVER, $_ENV);
2829
$_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'].DIRECTORY_SEPARATOR.'app.php';
2930

3031
require 'app.php';

Resources/config/schema/symfony-1.0.xsd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@
136136
<xsd:attribute name="assets-version" type="xsd:string" />
137137
<xsd:attribute name="assets-version-format" type="xsd:string" />
138138
<xsd:attribute name="cache" type="xsd:string" />
139+
<xsd:attribute name="hinclude-default-template" type="xsd:string" />
139140
</xsd:complexType>
140141

141142
<xsd:complexType name="form-resources">

Resources/config/validator.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<parameter key="validator.mapping.cache.apc.class">Symfony\Component\Validator\Mapping\Cache\ApcCache</parameter>
1212
<parameter key="validator.mapping.cache.prefix" />
1313
<parameter key="validator.validator_factory.class">Symfony\Bundle\FrameworkBundle\Validator\ConstraintValidatorFactory</parameter>
14-
<parameter key="validator.legacy_validator_factory.class">Symfony\Bundle\FrameworkBundle\Validator\LegacyConstraintValidatorFactory</parameter>
1514
<parameter key="validator.expression.class">Symfony\Component\Validator\Constraints\ExpressionValidator</parameter>
1615
<parameter key="validator.email.class">Symfony\Component\Validator\Constraints\EmailValidator</parameter>
1716
</parameters>

Tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
'form' => array(
5757
'resources' => array('theme1', 'theme2')
5858
),
59+
'hinclude_default_template' => 'global_hinclude_template',
5960
),
6061
'translator' => array(
6162
'enabled' => true,

Tests/DependencyInjection/Fixtures/xml/full.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<framework:mime-type>application/pdf</framework:mime-type>
2323
</framework:format>
2424
</framework:request>
25-
<framework:templating assets-version="SomeVersionScheme" cache="/path/to/cache" >
25+
<framework:templating assets-version="SomeVersionScheme" cache="/path/to/cache" hinclude-default-template="global_hinclude_template">
2626
<framework:loader>loader.foo</framework:loader>
2727
<framework:loader>loader.bar</framework:loader>
2828
<framework:engine>php</framework:engine>

Tests/DependencyInjection/Fixtures/yml/full.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ framework:
4444
base_urls: ["http://images1.example.com", "http://images2.example.com"]
4545
form:
4646
resources: [theme1, theme2]
47+
hinclude_default_template: global_hinclude_template
4748
translator:
4849
enabled: true
4950
fallback: fr

Tests/DependencyInjection/FrameworkExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ public function testTemplating()
198198
$this->assertEquals(array('php', 'twig'), $container->getParameter('templating.engines'), '->registerTemplatingConfiguration() sets a templating.engines parameter');
199199

200200
$this->assertEquals(array('FrameworkBundle:Form', 'theme1', 'theme2'), $container->getParameter('templating.helper.form.resources'), '->registerTemplatingConfiguration() registers the theme and adds the base theme');
201+
$this->assertEquals('global_hinclude_template', $container->getParameter('fragment.renderer.hinclude.global_template'), '->registerTemplatingConfiguration() registers the global hinclude.js template');
201202
}
202203

203204
public function testTemplatingAssetsHelperScopeDependsOnPackageArgumentScopes()

Validator/LegacyConstraintValidatorFactory.php

Lines changed: 0 additions & 91 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"symfony/finder": "For using the translation loader and cache warmer",
4444
"symfony/form": "For using forms",
4545
"symfony/validator": "For using validation",
46+
"symfony/yaml": "For using the config:debug and yaml:lint commands",
4647
"doctrine/cache": "For using alternative cache drivers"
4748
},
4849
"autoload": {

0 commit comments

Comments
 (0)