magento2-phpstorm-plugin
magento2-phpstorm-plugin copied to clipboard
Enhance XML Autocomplete for Magento 2 Configuration Files
Is your feature request related to a problem? Please describe.
This request proposes improvements to the XML autocomplete functionality for various Magento 2 configuration files. Enhancing these autocompletions can significantly speed up development and improve the overall experience for developers working with Magento 2 projects.
Describe the solution you'd like
di.xml
xsi:typeattribute: Autocomplete for common Magento value types:arrayobjectstringbooleannull- etc.
db_schema.xml
columnxsi:typeattribute: Autocomplete for valid column data types:inttextvarchardecimaldatetimestamp- etc.
Layout XML & UI Components (e.g., layout/*.xml, ui_component/*.xml)
<argument xsi:type="...">: Enhance suggestions for validxsi:typevalues (same list as indi.xml, plus any layout/UI-specific ones).
csp_whitelist.xml
idattribute: Autocomplete known CSP directives:script-srcstyle-srcimg-srcframe-src- etc.
acl.xml
resourceidattribute: Autocomplete existing ACL resources:Magento_Backend::adminMagento_Backend::storesMagento_Catalog::catalog- etc.
routes.xml
- Autocomplete known frontNames and valid route IDs:
adminstandard
Additional context
Benefit to Developers:
- Reduces manual lookup of valid attribute values and resource IDs.
- Decreases the chance of typos and related errors.
- Aligns with Magento’s established XML structure and best practices.
Additional potential for autocomplete can be found in other, less commonly used configuration files referenced in the documentation: https://experienceleague.adobe.com/en/docs/commerce-operations/configuration-guide/files/module-files#configuration-types-objects-and-interfaces