8000 Merge branch '3.3' into 3.4 · symfony/symfony@aef502b · GitHub
[go: up one dir, main page]

Skip to content

Commit aef502b

Browse files
Merge branch '3.3' into 3.4
* 3.3: Update JsonBundleReader.php [HttpKernel] Clean test directory on tear down [Console] Remove useless http-kernel dev dep Fix testHtml method with regexp Fixed some param/return annotations in PHPDOC blocks. [Workflow] fixed InvalidDefinitionException message for StateMachineValidator
2 parents 1a5acc9 + d32c706 commit aef502b

File tree

8 files changed

+20
-18
lines changed

8 files changed

+20
-18
lines changed

src/Symfony/Component/Console/Tests/DependencyInjection/AddConsoleCommandPassTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
use Symfony\Component\DependencyInjection\ContainerBuilder;
2020
use Symfony\Component\DependencyInjection\Definition;
2121
use Symfony\Component\DependencyInjection\TypedReference;
22-
use Symfony\Component\HttpKernel\Bundle\Bundle;
2322

2423
class AddConsoleCommandPassTest extends TestCase
2524
{
@@ -147,7 +146,3 @@ public function testProcessPrivateServicesWithSameCommand()
147146
class MyCommand extends Command
148147
{
149148
}
150-
151-
class ExtensionPresentBundle extends Bundle
152-
{
153-
}

src/Symfony/Component/Console/composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
},
2323
"require-dev": {
2424
"symfony/config": "~3.3|~4.0",
25-
"symfony/http-kernel": "~2.8|~3.0|~4.0",
2625
"symfony/event-dispatcher": "~2.8|~3.0|~4.0",
2726
"symfony/dependency-injection": "~3.3|~4.0",
2827
"symfony/lock": "~3.4|~4.0",

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ protected function load($file)
441441
/**
442442
* Fetches a variable from the environment.
443443
*
444-
* @param string The name of the environment variable
444+
* @param string $name The name of the environment variable
445445
*
446446
* @return scalar The value to use for the provided environment variable name
447447
*

src/Symfony/Component/DependencyInjection/Definition.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ public function getChanges()
7373
/**
7474
* Sets the tracked changes for the Definition object.
7575
*
76+
* @param array $changes An array of changes for this Definition
77+
*
7678
* @return $this
7779
*/
7880
public function setChanges(array $changes)
@@ -403,6 +405,8 @@ public function getMethodCalls()
403405
* Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
404406
*
405407
* @param $instanceof ChildDefinition[]
408+
*
409+
* @return $this
406410
*/
407411
public function setInstanceofConditionals(array $instanceof)
408412
{

src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ public function testText()
397397
public function testHtml()
398398
{
399399
$this->assertEquals('<img alt="Bar">', $this->createTestCrawler()->filterXPath('//a[5]')->html());
400-
$this->assertEquals('<input type="text" value="TextValue" name="TextName"><input type="submit" value="FooValue" name="FooName" id="FooId"><input type="button" value="BarValue" name="BarName" id="BarId"><button value="ButtonValue" name="ButtonName" id="ButtonId"></button>', trim($this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html()));
400+
$this->assertEquals('<input type="text" value="TextValue" name="TextName"><input type="submit" value="FooValue" name="FooName" id="FooId"><input type="button" value="BarValue" name="BarName" id="BarId"><button value="ButtonValue" name="ButtonName" id="ButtonId"></button>', trim(preg_replace('~>\s+<~', '><', $this->createTestCrawler()->filterXPath('//form[@id="FooFormId"]')->html())));
401401

402402
try {
403403
$this->createTestCrawler()->filterXPath('//ol')->html();

src/Symfony/Component/HttpKernel/Tests/KernelTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Config\Loader\LoaderInterface;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
17+
use Symfony\Component\Filesystem\Filesystem;
1718
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
1819
use Symfony\Component\HttpKernel\Config\EnvParametersResource;
1920
use Symfony\Component\HttpKernel\Kernel;
@@ -26,6 +27,12 @@
2627

2728
class KernelTest extends TestCase
2829
{
30+
public static function tearDownAfterClass()
31+
{
32+
$fs = new Filesystem();
33+
$fs->remove(__DIR__.'/Fixtures/cache');
34+
}
35+
2936
public function testConstructor()
3037
{
3138
$env = 'test_env';

src/Symfony/Component/Intl/Data/Bundle/Reader/JsonBundleReader.php

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,24 @@ public function read($path, $locale)
3232

3333
if (!file_exists($fileName)) {
3434
throw new ResourceBundleNotFoundException(sprintf(
35-
'The resource bundle "%s/%s.json" does not exist.',
36-
$path,
37-
$locale
35+
'The resource bundle "%s" does not exist.',
36+
$fileName
3837
));
3938
}
4039

4140
if (!is_file($fileName)) {
4241
throw new RuntimeException(sprintf(
43-
'The resource bundle "%s/%s.json" is not a file.',
44-
$path,
45-
$locale
42+
'The resource bundle "%s" is not a file.',
43+
$fileName
4644
));
4745
}
4846

4947
$data = json_decode(file_get_contents($fileName), true);
5048

5149
if (null === $data) {
5250
throw new RuntimeException(sprintf(
53-
'The resource bundle "%s/%s.json" contains invalid JSON: %s',
54-
$path,
55-
$locale,
51+
'The resource bundle "%s" contains invalid JSON: %s',
52+
$fileName,
5653
json_last_error_msg()
5754
));
5855
}

src/Symfony/Component/Workflow/Validator/StateMachineValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function validate(Definition $definition, $name)
3131
// Make sure that each transition has exactly one FROM
3232
$froms = $transition->getFroms();
3333
if (1 !== count($froms)) {
34-
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($transition->getTos())));
34+
throw new InvalidDefinitionException(sprintf('A transition in StateMachine can only have one input. But the transition "%s" in StateMachine "%s" has %d inputs.', $transition->getName(), $name, count($froms)));
3535
}
3636

3737
// Enforcing uniqueness of the names of transitions starting at each node

0 commit comments

Comments
 (0)
0