You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug #31201 [Form] resolve class name parameters (xabbuh)
This PR was merged into the 4.2 branch.
Discussion
----------
[Form] resolve class name parameters
| Q | A
| ------------- | ---
| Branch? | 4.2
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #31052
| License | MIT
| Doc PR |
Commits
-------
5235be4 resolve class name parameters
if (!method_exists($serviceDefinition->getClass(), 'getExtendedTypes')) {
97
-
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', $serviceDefinition->getClass(), FormTypeExtensionInterface::class), E_USER_DEPRECATED);
98
+
if (!method_exists($typeExtensionClass, 'getExtendedTypes')) {
99
+
@trigger_error(sprintf('Not implementing the static getExtendedTypes() method in %s when implementing the %s is deprecated since Symfony 4.2. The method will be added to the interface in 5.0.', $typeExtensionClass, FormTypeExtensionInterface::class), E_USER_DEPRECATED);
@@ -112,7 +114,7 @@ private function processFormTypeExtensions(ContainerBuilder $container)
112
114
thrownewInvalidArgumentException(sprintf('The getExtendedTypes() method for service "%s" does not return any extended types.', $serviceId));
113
115
}
114
116
} else {
115
-
thrownewInvalidArgumentException(sprintf('"%s" tagged services have to implement the static getExtendedTypes() method. The class for service "%s" does not implement it.', $this->formTypeExtensionTag, $serviceId));
117
+
thrownewInvalidArgumentException(sprintf('"%s" tagged services have to implement the static getExtendedTypes() method. Class "%s" for service "%s" does not implement it.', $this->formTypeExtensionTag, $typeExtensionClass, $serviceId));
@@ -261,7 +286,7 @@ public function addLegacyTaggedTypeExtensionsDataProvider()
261
286
262
287
/**
263
288
* @expectedException \InvalidArgumentException
264
-
* @expectedExceptionMessage "form.type_extension" tagged services have to implement the static getExtendedTypes() method. The class for service "my.type_extension" does not implement it.
289
+
* @expectedExceptionMessage "form.type_extension" tagged services have to implement the static getExtendedTypes() method. Class "stdClass" for service "my.type_extension" does not implement it.
0 commit comments