Skip to content

Enhance XML Autocomplete for Magento 2 Configuration Files #2506

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

Open
DmitryFurs opened this issue Mar 9, 2025 · 1 comment
Open

Enhance XML Autocomplete for Magento 2 Configuration Files #2506

DmitryFurs opened this issue Mar 9, 2025 · 1 comment

Comments

@DmitryFurs
Copy link
Contributor

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:type attribute: Autocomplete for common Magento value types:
    • array
    • object
    • string
    • boolean
    • null
    • etc.

Image

db_schema.xml

  • column xsi:type attribute: Autocomplete for valid column data types:
    • int
    • text
    • varchar
    • decimal
    • date
    • timestamp
    • etc.

Image

Layout XML & UI Components (e.g., layout/*.xml, ui_component/*.xml)

  • <argument xsi:type="...">: Enhance suggestions for valid xsi:type values (same list as in di.xml, plus any layout/UI-specific ones).

Image

csp_whitelist.xml

  • id attribute: Autocomplete known CSP directives:
    • script-src
    • style-src
    • img-src
    • frame-src
    • etc.

Image

acl.xml

  • resource id attribute: Autocomplete existing ACL resources:
    • Magento_Backend::admin
    • Magento_Backend::stores
    • Magento_Catalog::catalog
    • etc.

Image

routes.xml

  • Autocomplete known frontNames and valid route IDs:
    • admin
    • standard

Image

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

Copy link

m2-assistant bot commented Mar 9, 2025

Hi @DmitryFurs. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.
Add a comment to assign the issue: @magento I am working on this


Join Magento Community Engineering Slack and ask your questions in #github channel.

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

No branches or pull requests

1 participant