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 aff17e2

Browse filesBrowse files
Merge branch '3.4' into 4.1
* 3.4: Bump phpunit bridge cache id [appveyor] fix create-project phpunit Fix HttpKernel Debug requirement Fix heredoc use final annotation to allow mocking the class synchronise the form builder docblock Grammar fix in exception message fix tests forward the parse error to the calling code [Debug][DebugClassLoader] Match more cases for final, deprecated and internal classes / methods extends ensure compatibility with older PHPUnit mocks [Security] Do not mix usage of password_*() functions and sodium_*() ones
2 parents de3fb2c + ebed00f commit aff17e2
Copy full SHA for aff17e2

File tree

Expand file treeCollapse file tree

23 files changed

+149
-77
lines changed
Filter options
Expand file treeCollapse file tree

23 files changed

+149
-77
lines changed

‎phpunit

Copy file name to clipboardExpand all lines: phpunit
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4-
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/2155067dfc73e0e77dbc26f236af17e4df552de5
4+
// Cache-Id: https://github.com/symfony/symfony/commit/aad0c58
55

66
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
77
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";

‎src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/Form/EventListener/MergeDoctrineCollectionListenerTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ protected function tearDown()
4545
$this->form = null;
4646
}
4747

48-
protected function getBuilder($name = 'name')
48+
protected function getBuilder()
4949
{
50-
return new FormBuilder($name, null, $this->dispatcher, $this->factory);
50+
return new FormBuilder('name', null, $this->dispatcher, $this->factory);
5151
}
5252

53-
protected function getForm($name = 'name')
53+
protected function getForm()
5454
{
55-
return $this->getBuilder($name)
55+
return $this->getBuilder()
5656
->setData($this->collection)
5757
->addEventSubscriber(new MergeDoctrineCollectionListener())
5858
->getForm();

‎src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
9090
@mkdir($PHPUNIT_DIR, 0777, true);
9191
chdir($PHPUNIT_DIR);
9292
if (file_exists("phpunit-$PHPUNIT_VERSION")) {
93-
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? '(del /S /F /Q %s & rmdir %1$s) >nul': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION"));
93+
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? 'rmdir /S /Q %s > NUL': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION.old"));
94+
rename("phpunit-$PHPUNIT_VERSION", "phpunit-$PHPUNIT_VERSION.old");
95+
passthru(sprintf('\\' === DIRECTORY_SEPARATOR ? 'rmdir /S /Q %s': 'rm -rf %s', "phpunit-$PHPUNIT_VERSION.old"));
9496
}
9597
passthru("$COMPOSER create-project --no-install --prefer-dist --no-scripts --no-plugins --no-progress --ansi phpunit/phpunit phpunit-$PHPUNIT_VERSION \"$PHPUNIT_VERSION.*\"");
9698
chdir("phpunit-$PHPUNIT_VERSION");

‎src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Controller/ControllerTraitTest.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Symfony\Bundle\FrameworkBundle\Controller\ControllerTrait;
1515
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
1616
use Symfony\Component\DependencyInjection\Container;
17+
use Symfony\Component\Form\Form;
1718
use Symfony\Component\HttpFoundation\BinaryFileResponse;
1819
use Symfony\Component\HttpFoundation\File\File;
1920
use Symfony\Component\HttpFoundation\JsonResponse;
@@ -486,7 +487,8 @@ public function testCreateNotFoundException()
486487

487488
public function testCreateForm()
488489
{
489-
$form = $this->getMockBuilder('Symfony\Component\Form\FormInterface')->getMock();
490+
$config = $this->getMockBuilder('Symfony\Component\Form\FormConfigInterface')->getMock();
491+
$form = new Form($config);
490492

491493
$formFactory = $this->getMockBuilder('Symfony\Component\Form\FormFactoryInterface')->getMock();
492494
$formFactory->expects($this->once())->method('create')->willReturn($form);

‎src/Symfony/Component/Debug/DebugClassLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/DebugClassLoader.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
228228
// Detect annotations on the class
229229
if (false !== $doc = $refl->getDocComment()) {
230230
foreach (['final', 'deprecated', 'internal'] as $annotation) {
231-
if (false !== \strpos($doc, $annotation) && preg_match('#\n \* @'.$annotation.'(?:( .+?)\.?)?\r?\n \*(?: @|/$)#s', $doc, $notice)) {
232-
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : '';
231+
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) {
232+
self::${$annotation}[$class] = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
233233
}
234234
}
235235
}
@@ -303,7 +303,7 @@ public function checkAnnotations(\ReflectionClass $refl, $class)
303303

304304
foreach (['final', 'internal'] as $annotation) {
305305
if (false !== \strpos($doc, $annotation) && preg_match('#\n\s+\* @'.$annotation.'(?:( .+?)\.?)?\r?\n\s+\*(?: @|/$)#s', $doc, $notice)) {
306-
$message = isset($notice[1]) ? preg_replace('#\s*\r?\n \* +#', ' ', $notice[1]) : '';
306+
$message = isset($notice[1]) ? preg_replace('#\.?\r?\n( \*)? *(?= |\r?\n|$)#', '', $notice[1]) : '';
307307
self::${$annotation.'Methods'}[$class][$method->name] = [$class, $message];
308308
}
309309
}

‎src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/DebugClassLoaderTest.php
+23-15Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -198,24 +198,31 @@ class_exists('Symfony\Bridge\Debug\Tests\Fixtures\ExtendsDeprecatedParent', true
198198

199199
public function testExtendedFinalClass()
200200
{
201-
set_error_handler(function () { return false; });
202-
$e = error_reporting(0);
203-
trigger_error('', E_USER_NOTICE);
201+
$deprecations = [];
202+
set_error_handler(function ($type, $msg) use (&$deprecations) { $deprecations[] = $msg; });
203+
$e = error_reporting(E_USER_DEPRECATED);
204204

205-
class_exists('Test\\'.__NAMESPACE__.'\\ExtendsFinalClass', true);
205+
require __DIR__.'/Fixtures/FinalClasses.php';
206+
207+
$i = 1;
208+
while(class_exists($finalClass = __NAMESPACE__.'\\Fixtures\\FinalClass'.$i++, false)) {
209+
spl_autoload_call($finalClass);
210+
class_exists('Test\\'.__NAMESPACE__.'\\Extends'.substr($finalClass, strrpos($finalClass, '\\') + 1), true);
211+
}
206212

207213
error_reporting($e);
208214
restore_error_handler();
209215

210-
$lastError = error_get_last();
211-
unset($lastError['file'], $lastError['line']);
212-
213-
$xError = [
214-
'type' => E_USER_DEPRECATED,
215-
'message' => 'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass".',
216-
];
217-
218-
$this->assertSame($xError, $lastError);
216+
$this->assertSame([
217+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass1" class is considered final since version 3.3. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass1".',
218+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass2" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass2".',
219+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass3" class is considered final comment with @@@ and ***. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass3".',
220+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass4" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass4".',
221+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass5" class is considered final multiline comment. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass5".',
222+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass6" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass6".',
223+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass7" class is considered final another multiline comment... It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass7".',
224+
'The "Symfony\Component\Debug\Tests\Fixtures\FinalClass8" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Test\Symfony\Component\Debug\Tests\ExtendsFinalClass8".',
225+
], $deprecations);
219226
}
220227

221228
public function testExtendedFinalMethod()
@@ -325,8 +332,9 @@ public function findFile($class)
325332
eval('namespace Test\\'.__NAMESPACE__.'; class NonDeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\NonDeprecatedInterface {}');
326333
} elseif ('Test\\'.__NAMESPACE__.'\Float' === $class) {
327334
eval('namespace Test\\'.__NAMESPACE__.'; class Float {}');
328-
} elseif ('Test\\'.__NAMESPACE__.'\ExtendsFinalClass' === $class) {
329-
eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsFinalClass extends \\'.__NAMESPACE__.'\Fixtures\FinalClass {}');
335+
} elseif (0 === strpos($class, 'Test\\'.__NAMESPACE__.'\ExtendsFinalClass')) {
336+
$classShortName = substr($class, strrpos($class, '\\') + 1);
337+
eval('namespace Test\\'.__NAMESPACE__.'; class '.$classShortName.' extends \\'.__NAMESPACE__.'\Fixtures\\'.substr($classShortName, 7).' {}');
330338
} elseif ('Test\\'.__NAMESPACE__.'\ExtendsAnnotatedClass' === $class) {
331339
eval('namespace Test\\'.__NAMESPACE__.'; class ExtendsAnnotatedClass extends \\'.__NAMESPACE__.'\Fixtures\AnnotatedClass {
332340
public function deprecatedMethod() { }

‎src/Symfony/Component/Debug/Tests/Fixtures/FinalClass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Debug/Tests/Fixtures/FinalClass.php
-10Lines changed: 0 additions & 10 deletions
This file was deleted.
+84Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?php
2+
3+
namespace Symfony\Component\Debug\Tests\Fixtures;
4+
5+
/**
6+
* @final since version 3.3.
7+
*/
8+
class FinalClass1
9+
{
10+
// simple comment
11+
}
12+
13+
/**
14+
* @final
15+
*/
16+
class FinalClass2
17+
{
18+
// no comment
19+
}
20+
21+
/**
22+
* @final comment with @@@ and ***
23+
*
24+
* @author John Doe
25+
*/
26+
class FinalClass3
27+
{
28+
// with comment and a tag after
29+
}
30+
31+
/**
32+
* @final
33+
* @author John Doe
34+
*/
35+
class FinalClass4
36+
{
37+
// without comment and a tag after
38+
}
39+
40+
/**
41+
* @author John Doe
42+
*
43+
*
44+
* @final multiline
45+
* comment
46+
*/
47+
class FinalClass5
48+
{
49+
// with comment and a tag before
50+
}
51+
52+
/**
53+
* @author John Doe
54+
*
55+
* @final
56+
*/
57+
class FinalClass6
58+
{
59+
// without comment and a tag before
60+
}
61+
62+
/**
63+
* @author John Doe
64+
*
65+
* @final another
66+
*
67+
* multiline comment...
68+
*
69+
* @return string
70+
*/
71+
class FinalClass7
72+
{
73+
// with comment and a tag before and after
74+
}
75+
76+
/**
77+
* @author John Doe
78+
* @final
79+
* @return string
80+
*/
81+
class FinalClass8
82+
{
83+
// without comment and a tag before and after
84+
}

‎src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ private function parseFileToDOM($file)
380380
try {
381381
$dom = XmlUtils::loadFile($file, [$this, 'validateSchema']);
382382
} catch (\InvalidArgumentException $e) {
383-
throw new InvalidArgumentException(sprintf('Unable to parse file "%s".', $file), $e->getCode(), $e);
383+
throw new InvalidArgumentException(sprintf('Unable to parse file "%s": %s', $file, $e->getMessage()), $e->getCode(), $e);
384384
}
385385

386386
$this->validateExtensions($dom, $file);

‎src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ protected function loadFile($file)
621621
try {
622622
$configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
623623
} catch (ParseException $e) {
624-
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML.', $file), 0, $e);
624+
throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: %s', $file, $e->getMessage()), 0, $e);
625625
}
626626

627627
return $this->validate($configuration, $file);

‎src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function testParseFile()
6868
$this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
6969
} catch (\Exception $e) {
7070
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
71-
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
71+
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
7272

7373
$e = $e->getPrevious();
7474
$this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
@@ -82,7 +82,7 @@ public function testParseFile()
8282
$this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
8383
} catch (\Exception $e) {
8484
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
85-
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
85+
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
8686

8787
$e = $e->getPrevious();
8888
$this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
@@ -428,7 +428,7 @@ public function testExtensions()
428428
$this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
429429
} catch (\Exception $e) {
430430
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
431-
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
431+
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
432432

433433
$e = $e->getPrevious();
434434
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
@@ -465,7 +465,7 @@ public function testExtensionInPhar()
465465
$this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
466466
} catch (\Exception $e) {
467467
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
468-
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
468+
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
469469

470470
$e = $e->getPrevious();
471471
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
@@ -516,7 +516,7 @@ public function testDocTypeIsNotAllowed()
516516
$this->fail('->load() throws an InvalidArgumentException if the configuration contains a document type');
517517
} catch (\Exception $e) {
518518
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type');
519-
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s".$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type');
519+
$this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type');
520520

521521
$e = $e->getPrevious();
522522
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type');

‎src/Symfony/Component/Dotenv/Dotenv.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Dotenv/Dotenv.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ private function lexVarname()
162162
}
163163

164164
if (' ' === $this->data[$this->cursor] || "\t" === $this->data[$this->cursor]) {
165-
throw $this->createFormatException('Whitespace are not supported after the variable name');
165+
throw $this->createFormatException('Whitespace characters are not supported after the variable name');
166166
}
167167

168168
if ('=' !== $this->data[$this->cursor]) {

‎src/Symfony/Component/Dotenv/Tests/DotenvTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Dotenv/Tests/DotenvTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function getEnvDataWithFormatErrors()
3636
{
3737
$tests = [
3838
['FOO=BAR BAZ', "A value containing spaces must be surrounded by quotes in \".env\" at line 1.\n...FOO=BAR BAZ...\n ^ line 1 offset 11"],
39-
['FOO BAR=BAR', "Whitespace are not supported after the variable name in \".env\" at line 1.\n...FOO BAR=BAR...\n ^ line 1 offset 3"],
39+
['FOO BAR=BAR', "Whitespace characters are not supported after the variable name in \".env\" at line 1.\n...FOO BAR=BAR...\n ^ line 1 offset 3"],
4040
['FOO', "Missing = in the environment variable declaration in \".env\" at line 1.\n...FOO...\n ^ line 1 offset 3"],
4141
['FOO="foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO=\"foo...\n ^ line 1 offset 8"],
4242
['FOO=\'foo', "Missing quote to end the value in \".env\" at line 1.\n...FOO='foo...\n ^ line 1 offset 8"],

‎src/Symfony/Component/Form/ResolvedFormType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ResolvedFormType.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function getOptionsResolver()
205205
* Override this method if you want to customize the builder class.
206206
*
207207
* @param string $name The name of the builder
208-
* @param string $dataClass The data class
208+
* @param string|null $dataClass The data class
209209
* @param FormFactoryInterface $factory The current form factory
210210
* @param array $options The builder options
211211
*

‎src/Symfony/Component/Form/Test/TypeTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Test/TypeTestCase.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function setUp()
3232
parent::setUp();
3333

3434
$this->dispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock();
35-
$this->builder = new FormBuilder(null, null, $this->dispatcher, $this->factory);
35+
$this->builder = new FormBuilder('', null, $this->dispatcher, $this->factory);
3636
}
3737

3838
protected function tearDown()

‎src/Symfony/Component/Form/Tests/AbstractFormTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/AbstractFormTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ abstract protected function createForm();
5555
/**
5656
* @param string $name
5757
* @param EventDispatcherInterface $dispatcher
58-
* @param string $dataClass
58+
* @param string|null $dataClass
5959
* @param array $options
6060
*
6161
* @return FormBuilder

‎src/Symfony/Component/Form/Tests/ButtonTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/ButtonTest.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ public function testSetParentOnSubmittedButton()
4141

4242
$button->submit('');
4343

44-
$button->setParent($this->getFormBuilder('form')->getForm());
44+
$button->setParent($this->getFormBuilder()->getForm());
4545
}
4646

4747
/**
4848
* @dataProvider getDisabledStates
4949
*/
5050
public function testDisabledIfParentIsDisabled($parentDisabled, $buttonDisabled, $result)
5151
{
52-
$form = $this->getFormBuilder('form')
52+
$form = $this->getFormBuilder()
5353
->setDisabled($parentDisabled)
5454
->getForm()
5555
;
@@ -80,8 +80,8 @@ private function getButtonBuilder($name)
8080
return new ButtonBuilder($name);
8181
}
8282

83-
private function getFormBuilder($name)
83+
private function getFormBuilder()
8484
{
85-
return new FormBuilder($name, null, $this->dispatcher, $this->factory);
85+
return new FormBuilder('form', null, $this->dispatcher, $this->factory);
8686
}
8787
}

0 commit comments

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