Skip to content
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

[Backport] Fix error when generating urn catalog for empty misc.xml #16902

Closed

Conversation

gelanivishal
Copy link
Contributor

@gelanivishal gelanivishal commented Jul 18, 2018

Original Pull Request

#11686

Fix error when generating urn catalog for empty misc.xml

Description

Fix error when generating urn catalog for existing empty misc.xml. I fixed this by creating another DomDocumentFactory, for PhpStorm specific misc.xml. This factory checks if the passed data is empty, and if so, create the misc.xml xml structure that \Magento\Developer\Model\XmlCatalog\Format\PhpStorm expects.

I also changed \Magento\Framework\DomDocument\DomDocumentFactory to follow the Magento 2 guidelines and added a Test class for this factory to define the behavior.

Fixed Issues (if relevant)

  1. Error generating URN-catalog when blank one exists #5188

Manual testing scenarios

  1. rm .idea/misc..xml
  2. touch .idea/misc.xml
  3. bin/magento dev:urn-catalog:generate .idea/misc.xml

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)

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi,
Unit tests failed, could you recheck it?
PS: It looks like in 2.1.x line we have older phpunit version and unit tests need to be updated.

@sidolov
Copy link
Contributor

sidolov commented Aug 5, 2018

@gelanivishal , I am closing this PR now due to inactivity.
Please reopen and update if you wish to continue.
Thank you for the collaboration!

@sidolov sidolov closed this Aug 5, 2018
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.

None yet

6 participants