Throw deprecations when a plugin type with attributes is using annotations
Merge request reports
Activity
added 93 commits
-
14c93483...a071abee - 34 commits from branch
project:11.x
- a071abee...f6908f18 - 49 earlier commits
- 5a2ed077 - Simplify comment.
- b54c53f9 - composer update --lock
- 75e0da8b - Revert TestXSSTitleBlock changes.
- b89c8642 - Allow attribute-only discovery.
- b41fe900 - Add test coverage for DefaultPluginManager.
- 721695b7 - Remove double space.
- 3a728a5b - Fire deprecation
- 42c3bf28 - use correct error type
- 95a6acd1 - Add working test coverage
- d73fc095 - update deprecation message and start expecting it in legacy test
Toggle commit list-
14c93483...a071abee - 34 commits from branch
added 1 commit
- decb6d84 - Improve deprecation message to include the plugin id
added 13 commits
Toggle commit listadded 101 commits
-
e1d9e188...31911458 - 93 commits from branch
project:11.x
- 21bdc0ab - Fire deprecation
- cf5d322a - use correct error type
- f28ec0c5 - Add working test coverage
- 828d5029 - update deprecation message and start expecting it in legacy test
- c463564b - Improve deprecation message to include the plugin id
- 8e71a26a - Remove test_xss_title
- ca8f11e2 - Dynamically define missing trait and interface
- c9399100 - Avoid CS errors
Toggle commit list-
e1d9e188...31911458 - 93 commits from branch
added 2 commits
- Resolved by Derek Wright
added 48 commits
-
b05be94b...aac47f0d - 37 commits from branch
project:11.x
- 87a4062a - 1 earlier commit
- 70517513 - use correct error type
- 47b21266 - Add working test coverage
- 51379c89 - update deprecation message and start expecting it in legacy test
- ba29c394 - Improve deprecation message to include the plugin id
- b389facc - Remove test_xss_title
- c1bca0c3 - Dynamically define missing trait and interface
- 8c9f2552 - Avoid CS errors
- 95dea23a - remove deprecation unit test coverage
- e8abc868 - convert more block plugins
- a2897b21 - adjust block ui test for removed xss block plugin
Toggle commit list-
b05be94b...aac47f0d - 37 commits from branch
added 697 commits
-
a2897b21...8756d339 - 686 commits from branch
project:11.x
- 61157b16 - 1 earlier commit
- 9671ac83 - use correct error type
- 515cf104 - Add working test coverage
- 568ad1ad - update deprecation message and start expecting it in legacy test
- c67a13e7 - Improve deprecation message to include the plugin id
- f6a37668 - Remove test_xss_title
- 9532ad66 - Dynamically define missing trait and interface
- ff55ce34 - Avoid CS errors
- beaeacad - remove deprecation unit test coverage
- 8ec74988 - convert more block plugins
- aebde2e2 - adjust block ui test for removed xss block plugin
Toggle commit list-
a2897b21...8756d339 - 686 commits from branch
- Resolved by Sascha Grossenbacher
- Resolved by Derek Wright
added 202 commits
-
aebde2e2...8f28c48d - 191 commits from branch
project:11.x
- 7b6bcf39 - 1 earlier commit
- bb81bcb3 - use correct error type
- cafa62d2 - Add working test coverage
- 2aae046f - update deprecation message and start expecting it in legacy test
- c296cd51 - Improve deprecation message to include the plugin id
- b06966a7 - Remove test_xss_title
- d57fab4f - Dynamically define missing trait and interface
- 63280a11 - Avoid CS errors
- 38be23c4 - remove deprecation unit test coverage
- 9a82aaac - convert more block plugins
- faa54bbc - adjust block ui test for removed xss block plugin
Toggle commit list-
aebde2e2...8f28c48d - 191 commits from branch
added 57 commits
-
faa54bbc...fc0aa24e - 46 commits from branch
project:11.x
- fb9f7366 - 1 earlier commit
- 4b65bd44 - use correct error type
- f647caec - Add working test coverage
- 9a2dd508 - update deprecation message and start expecting it in legacy test
- d6d1fe9d - Improve deprecation message to include the plugin id
- 89561f49 - Remove test_xss_title
- cb5a70a5 - Dynamically define missing trait and interface
- 4f010576 - Avoid CS errors
- b1758207 - remove deprecation unit test coverage
- 315f9081 - convert more block plugins
- 44553cba - adjust block ui test for removed xss block plugin
Toggle commit list-
faa54bbc...fc0aa24e - 46 commits from branch
added 33 commits
-
44553cba...181221a4 - 22 commits from branch
project:11.x
- 55a9f981 - 1 earlier commit
- a7b63484 - use correct error type
- 3d802436 - Add working test coverage
- df1358ef - update deprecation message and start expecting it in legacy test
- cb531d00 - Improve deprecation message to include the plugin id
- 68620b9f - Remove test_xss_title
- 0dd8ea3e - Dynamically define missing trait and interface
- 7ffd0d55 - Avoid CS errors
- aebeb5a8 - remove deprecation unit test coverage
- c9d29fea - convert more block plugins
- b0b463c3 - adjust block ui test for removed xss block plugin
Toggle commit list-
44553cba...181221a4 - 22 commits from branch
added 1065 commits
-
b0b463c3...989fe116 - 1064 commits from branch
project:11.x
- b601a75e - Fire deprecation
-
b0b463c3...989fe116 - 1064 commits from branch
added 1 commit
- 61d7d4f1 - different phpstan workaround, full ignore for that file
added 1 commit
- ba5b50ab - convert another new entity type, drop unnecessary stuff
- Resolved by Lee Rowlands
- Resolved by Derek Wright
added 464 commits
-
c903f3e6...b25bc52e - 458 commits from branch
project:11.x
- 8558b44f - Fire deprecation
- 053a971f - make phpstan ignore BC traits
- 391d53ab - different phpstan workaround, full ignore for that file
- b243bac6 - fixing deprecations
- 41907d08 - convert another new entity type, drop unnecessary stuff
- 5470aa07 - Fix tests
Toggle commit list-
c903f3e6...b25bc52e - 458 commits from branch
- Resolved by Derek Wright
- Resolved by Derek Wright
added 16 commits
Toggle commit list- Resolved by Derek Wright
- Resolved by Derek Wright
88 88 $parser = new StaticReflectionParser($class, $finder, TRUE); 89 89 90 90 $reflection_class = $parser->getReflectionClass(); 91 // @todo Handle deprecating definitions discovery via annotations in 92 // https://www.drupal.org/project/drupal/issues/3265945. 93 91 /** @var \Drupal\Component\Annotation\AnnotationInterface $annotation */ 94 92 if ($annotation = $this->getAnnotationReader()->getClassAnnotation($reflection_class, $this->pluginDefinitionAnnotationName)) { 95 93 $this->prepareAnnotationDefinition($annotation, $class); 96 return ['id' => $annotation->getId(), 'content' => $annotation->get()]; 94 95 $id = $annotation->getId(); 96 $shortened_annotation_name = '@' . substr($this->pluginDefinitionAnnotationName, strrpos($this->pluginDefinitionAnnotationName, '\\') + 1); 97 // phpcs:ignore 98 @trigger_error(sprintf('Using %s annotation for plugin with ID %s is deprecated and is removed from drupal:13.0.0. Use a %s attribute instead. See https://www.drupal.org/node/3395575', $shortened_annotation_name, $id, $this->pluginDefinitionAttributeName), E_USER_DEPRECATED); Aren't we supposed to say when it started being deprecated here?
98 @trigger_error(sprintf('Using %s annotation for plugin with ID %s is deprecated and is removed from drupal:13.0.0. Use a %s attribute instead. See https://www.drupal.org/node/3395575', $shortened_annotation_name, $id, $this->pluginDefinitionAttributeName), E_USER_DEPRECATED); 98 @trigger_error(sprintf('Using %s annotation for plugin with ID %s is deprecated in drupal:11.2.0 and is removed from drupal:13.0.0. Use a %s attribute instead. See https://www.drupal.org/node/3395575', $shortened_annotation_name, $id, $this->pluginDefinitionAttributeName), E_USER_DEPRECATED); I read the issue summary but disagree that this message should not include the version when the deprecation happened. I think we should not be vague, this should be as detailed as possible. Even though the ability was added in 10.2, it is only now, in 11.2, that core is announcing that it is deprecated.
@quietone the problem is that while all core plugins provide an attribute now, there are also contrib plugins to worry about, and it would not be accurate to say that it's possible to define those using attributes from 11.2, because in many cases it won't be until the contrib modules support attributes themselves. So I don't really think we have a choice here.
- Resolved by Sascha Grossenbacher
- Resolved by Sascha Grossenbacher
- Resolved by Sascha Grossenbacher
- Resolved by Derek Wright