bug #21860 [Form] fix BC layer of Form DependencyInjection extension (xabbuh)

This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] fix BC layer of Form DependencyInjection extension

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

ab487e4 fix BC layer of Form DependencyInjection extension
This commit is contained in:
Nicolas Grekas 2017-03-04 10:40:37 +01:00
commit 31b0ea3f44
2 changed files with 3 additions and 2 deletions

View File

@ -41,6 +41,7 @@ class DependencyInjectionExtension implements FormExtensionInterface
@trigger_error(sprintf('Passing four arguments to the %s::__construct() method is deprecated since Symfony 3.3 and will be disallowed in Symfony 4.0. The new constructor only accepts three arguments.', __CLASS__), E_USER_DEPRECATED);
$this->guesserServiceIds = $guesserServiceIds;
$this->typeServiceIds = $typeExtensionServices;
$typeExtensionServices = $guesserServices;
}
$this->typeContainer = $typeContainer;

View File

@ -81,7 +81,7 @@ class DependencyInjectionExtensionTest extends TestCase
throw new ServiceNotFoundException($id);
});
$extension = new DependencyInjectionExtension($container, array('test' => array('extension1', 'extension2'), 'other' => array('extension3')), array(), array());
$extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension1', 'extension2'), 'other' => array('extension3')), array());
$this->assertTrue($extension->hasTypeExtensions('test'));
$this->assertFalse($extension->hasTypeExtensions('unknown'));
@ -102,7 +102,7 @@ class DependencyInjectionExtensionTest extends TestCase
->with('extension')
->willReturn($this->createFormTypeExtensionMock('unmatched'));
$extension = new DependencyInjectionExtension($container, array('test' => array('extension')), array(), array());
$extension = new DependencyInjectionExtension($container, array(), array('test' => array('extension')), array());
$extension->getTypeExtensions('test');
}