-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Eliminate XSD relative paths #1012
Comments
internal ticket MAGETWO-33621 and related comment. There is no perfect solution here. We could host but questions arise on versioning, support for community schemas and this creates unnecessary complexities at this time. We could change to a URN but then action is required for every XSD in PHPStorm. We would also need to add support for the URN based resolution for our static tests. The relative path works for code within the app/code and we suspect that is how development of an extension will typically start. This is when validation against the XSD is most critical. When an extension is hosted in a separate repo, versioned and published independently the relative path is a problem but the user can configure PHPStorm to map to the schema in the project and validation can occur. In light of these details, I recommend no action at this time. |
Done now I belive? Just adding this note so it can be closed. |
Yes, this was done before merchant beta dropped. Also there is a command in the CLI tool to generate the meta data PHPStorm needs to follow the URNs. |
[Epam] Extend functional test sprint 8 - MTO-103: [Variation] Auto-complete Search Terms and Phrases while User is Typing - MTO-114: [Variation] Low Stock Products Report - MTO-131: [Constraint] Check invoiced order on Admin Dashboard - MTO-145: [Constraint] Check order grid date filter
Merge pull request #1014 from magento-engcom/2.2-develop-prs [EngCom] Public Pull Requests - 2.2-develop Public Pull Requests - #1012 10814: Attribute repository resets sourceModel for new attributes. by @nmalevanec - #1006 #12285: The option false for mobile device don't work in product - view page gallery by @p-bystritsky - #983 #12259: Save and Duplicated product not working by @p-bystritsky - #1000 8204: catalog:images:resize = getimagesize(): Read error! by @RomaKis #12633 Magento Connect no longer exist by @miguelbalparda Fixed Public Issues - #10814 Attribute repository resets sourceModel for new attributes - #12285 The option false for mobile device don't work in product view page gallery - #12490 I can't disable full screen gallery on mobile on magento 2.2.1 - #12259 Save and Duplicated product not working - #8204 catalog:images:resize = getimagesize(): Read error! in vendor/magento/module-catalog/Model/Product/Image.php on line 410 if an image is 0 bytes - #12632 Magento Connect no longer exist
MSI-1011: Implement IsCorrectQtyConditionTest::testExecuteWithUseConfigQtyIncrements
…ent_id description #1012 - Merge Pull Request magento/graphql-ce#1012 from magento/graphql-ce:editorial-customerOrders - Merged commits: 1. a8ef3e1
…ent_id description #1012
Currently XSD path references are file paths using ../../.. notation. This is not desirable. Relative paths impose physical file location constraints on your component, as well as for the component where the XML-schema resides. It denies flexibility of how you can deploy your component. There is also a separate plan to make it easier to locate modules in places other than under app/code (e.g. under 'vendor' as well), in which case the physical location of the XSD file cannot be guaranteed.
The plan is to move to absolute paths (possibly a URN) that the code knows how to resolve to a XSD on the file system. An approach based on just the filename (such as "layout.xsd") may also be possible.
Some have proposed it be a URL where the file is hosted publicly somewhere such as GitHub. This is not proposed. Instead it is proposed that developers are required to configure their development environment to map the XSD references to physical file locations.
Stage 1 of this work would be to propose a strategy friendly with the PHP code in developer mode using XSD files to validate XML files. This should be reviewed and signed off by the Magento team before implementation (to avoid wasted effort).
Stage 2 would be to implement the changes required.
For example, any module can introduce a new XSD for its own configuration that another module may then want to replace/extend. For example, one approach is to use something like urn:magento:xsd:Vendor:Module:v1.0:layout.xsd so the vendor/module name is in the path. Then the XSD reference is relative to the home directory of a module, wherever it is. The XML parsing library would need to be extended to map this form of schema reference to the actual filename of the XSD file.
Consideration should also be give to tools like PHP Storm and how easy it will be to configure them. Can PHP Storm import the equivalent of a SGML CATALOG file for mapping URIs to physical file locations?
The text was updated successfully, but these errors were encountered: