Skip to content

2922811 - Deprecate Commerce's BundleFieldDefinition, BundlePluginInterface #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

bradjones1
Copy link
Contributor

@@ -2,11 +2,15 @@

namespace Drupal\commerce;

@trigger_error('The '. __NAMESPACE__ . '\BundleFieldDefinition is deprecated. Instead, use \Drupal\entity\BundleFieldDefinition', E_USER_DEPRECATED);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


FOUND 1 ERROR AFFECTING 1 LINE

5 | ERROR | [x] Concat operator must be surrounded by a single space
| | (Squiz.Strings.ConcatenationSpacing.PaddingFound)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Also figured we should do the same with BundlePluginInterface.

@bradjones1 bradjones1 force-pushed the deprecate-bundle-field-def-class branch from a154b09 to 433b2ea Compare November 12, 2017 19:18
@bradjones1 bradjones1 changed the title 2922811 - Deprecate Commerce's BundleFieldDefinition 2922811 - Deprecate Commerce's BundleFieldDefinition, BundlePluginInterface Nov 12, 2017
@bradjones1
Copy link
Contributor Author

Rebased.

@bojanz
Copy link
Contributor

bojanz commented Dec 1, 2017

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.

@bojanz
Copy link
Contributor

bojanz commented Dec 2, 2017

Committed in 654bf3d.

@bojanz bojanz closed this Dec 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants