2922811 - Deprecate Commerce's BundleFieldDefinition, BundlePluginInterface#828
2922811 - Deprecate Commerce's BundleFieldDefinition, BundlePluginInterface#828bradjones1 wants to merge 1 commit intodrupalcommerce:8.x-2.xfrom
Conversation
src/BundleFieldDefinition.php
Outdated
|
|
||
| namespace Drupal\commerce; | ||
|
|
||
| @trigger_error('The '. __NAMESPACE__ . '\BundleFieldDefinition is deprecated. Instead, use \Drupal\entity\BundleFieldDefinition', E_USER_DEPRECATED); |
There was a problem hiding this comment.
FOUND 1 ERROR AFFECTING 1 LINE
5 | ERROR | [x] Concat operator must be surrounded by a single space
| | (Squiz.Strings.ConcatenationSpacing.PaddingFound)
There was a problem hiding this comment.
Fixed. Also figured we should do the same with BundlePluginInterface.
a154b09 to
433b2ea
Compare
433b2ea to
38d5814
Compare
|
Rebased. |
|
Unfortunately, this will immediately crash all of contrib that uses bundle plugins (recurring, license, gateways with custom payment method types), because ConfigurableFieldManager gets an unexpected class (\Drupal\commerce\BundleFieldDefinition and \Drupal\entity\BundleFieldDefinition are not interchangeable). And if we keep the old typehint in ConfigurableFieldManager, then there's no way to move off the deprecated classes. So it looks like deprecating BundlePluginInterface is actually the only part we can do. EDIT: Nevermind, looks like I'm wrong, the Commerce BundleFieldDefinition extends the Entity one. The crash I observed was without this PR, trying to change the commerce_recurring usage before Commerce is fixed. |
|
Committed in 654bf3d. |
https://www.drupal.org/project/issues/commerce/2922811