1

Magento 2 uses XML-based configuration files A LOT. When studying Magento or preparing for an exam, it is useful to have a list of all config files used in Magento 2. How can such a list be generated? What are all configuration files used in the latest version 2.4.4?

1 Answer 1

1

I came up with a probably not optimal and not very nice bash one-liner:

find vendor/magento/ -type f -name '*.xml' | grep -v '/Test/' | grep -v '/dev/' | sed -n 's/.*etc\///p' | sort -n | uniq

It executes the following "steps":

  1. Find all XML config files under vendor/magento/.
  2. Exclude all XML files from Test directories.
  3. Exclude all XML files from dev directories.
  4. Only print everything after the etc directory. This also removes all entries without an etc directory.
  5. Sort the matches alphabetically.
  6. Make the resulting list unique.

Here is a list of all XML configuration files used in Magento 2.4.4:

acl.xml
address_formats.xml
adminhtml/csp_whitelist.xml
adminhtml/di.xml
adminhtml/events.xml
adminhtml/menu.xml
adminhtml/routes.xml
adminhtml/rules/payment_au.xml
adminhtml/rules/payment_ca.xml
adminhtml/rules/payment_de.xml
adminhtml/rules/payment_es.xml
adminhtml/rules/payment_fr.xml
adminhtml/rules/payment_gb.xml
adminhtml/rules/payment_hk.xml
adminhtml/rules/payment_it.xml
adminhtml/rules/payment_jp.xml
adminhtml/rules/payment_nz.xml
adminhtml/rules/payment_other.xml
adminhtml/rules/payment_us.xml
adminhtml/system/express_checkout.xml
adminhtml/system/payflow_advanced.xml
adminhtml/system/payflow_link.xml
adminhtml/system/payments_pro_hosted_solution_with_express_checkout.xml
adminhtml/system/payments_pro_hosted_solution.xml
adminhtml/system/paypal_payflowpro_with_express_checkout.xml
adminhtml/system/paypal_payflowpro.xml
adminhtml/system.xml
analytics.xml
cache.xml
catalog_attributes.xml
communication.xml
config.xml
countries.xml
cron_groups.xml
crontab/di.xml
crontab/events.xml
crontab.xml
csp_whitelist.xml
data_source/website.xml
db_schema.xml
definition.map.xml
definition.xml
directory.xml
di.xml
eav_attributes.xml
email_templates.xml
esconfig.xml
events.xml
export.xml
extension_attributes.xml
fieldset.xml
frontend/di.xml
frontend/events.xml
frontend/page_types.xml
frontend/routes.xml
frontend/sections.xml
graphql/di.xml
graphql/events.xml
import.xml
indexer.xml
media_content.xml
module.xml
mview.xml
payment.xml
pdf.xml
persistent.xml
product_options.xml
product_types.xml
queue_consumer.xml
queue_publisher.xml
queue_topology.xml
queue.xml
reports.xml
resources.xml
sales.xml
search_engine.xml
search_request.xml
validation.xml
view.xml
webapi_async.xml
webapi_rest/di.xml
webapi_rest/events.xml
webapi_soap/di.xml
webapi_soap/events.xml
webapi.xml
widget.xml
zip_codes.xml

The DevDocs also list some configuration files with references to the respective PHP class. However, it looks like this list is not complete.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.