Skip to content

Conversation

Stoux
Copy link
Contributor

@Stoux Stoux commented Jan 29, 2019

Description (*)

Fix an issue where the getConfigAsObject() method loses it's type declaration. This causes issues for any class that extends the Model class and requires it in the prepareWidgetParameters method.

Due to the order of the data calls the setType call (which is a magic setData('type') method) will be overwritten by the following setData call.

Manual testing scenarios (*)

  1. Create a Override class that extends Magento\Widget\Model\Widget
  2. DI the new class <preference for="Magento\Widget\Model\Widget" type="Your\New\Model" />
  3. Override prepareWidgetParameters(DataObject $object)
  4. Dump $object->getType(), the result will be null instead of the Widget type

After this PR it will return the class of the Widget in question.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Due to the order of the data calls the setType call will be overwritten
by the following setData call.
@magento-cicd2
Copy link
Contributor

magento-cicd2 commented Jan 29, 2019

CLA assistant check
All committers have signed the CLA.

@magento-engcom-team
Copy link
Contributor

Hi @Stoux. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @VladimirZaets, thank you for the review.
ENGCOM-4035 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

@Stoux thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository.

@magento-engcom-team magento-engcom-team merged commit 458f4c9 into magento:2.3-develop Feb 10, 2019
@ghost
Copy link

ghost commented Feb 10, 2019

Hi @Stoux, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants