-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Optimized dev:urn-catalog:generate for PHPStorm #23291
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
Optimized dev:urn-catalog:generate for PHPStorm #23291
Conversation
Hi @JeroenBoersma. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
- removed unused import - removed unused @param
This is intended behavior. Please help me howto proceed? |
app/code/Magento/Developer/Model/XmlCatalog/Format/PhpStorm.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Developer/Model/XmlCatalog/Format/PhpStorm.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Developer/Model/XmlCatalog/Format/PhpStorm.php
Outdated
Show resolved
Hide resolved
app/code/Magento/Developer/Model/XmlCatalog/Format/PhpStorm.php
Outdated
Show resolved
Hide resolved
This reverts commit 211fe95.
This reverts commit 0db89b2.
* internally used code is no longer public
Use currentReaddir to make relative paths. Second iteration which uses way less code with the same result. - removed realpath usage - removed dirname usage - removed unused method - removed unused constant
Did a second iteration with fresh mind, came up with a "better" solution. |
Hi @sivaschenko, thank you for the review.
|
@JeroenBoersma thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
✔️ QA Passed |
Hi @JeroenBoersma, thank you for your contribution! |
When generating the
urn-catalog
from within any docker setup with path mappings this isn't reflected correctly to PHPStorm because the path's won't match up. This is no problem for people running local php instances.Description (*)
This change resolves the project directory and replaces all paths to
$PROJECT_DIR$
, this also makes moving your project possible. The change does a compare from the realpath for the given.idea/misc.xml
to resolve the projectdir.Fixed Issues (if relevant)
I didn't find any, so it only bothered me.
Manual testing scenarios (*)
Run in any console
bin/magento dev:urn-catalog:generate test.xml
this will replace the absolute paths to$PROJECT_DIR/path/to/file.xsd
in the location attribute.Questions or comments
No Unittests because there weren't any to optimize.
Contribution checklist (*)