Skip to content

Extension Validation

You are viewing the next version (v6.7) of the documentation.
Click here to switch to the stable version (v6.6), or use the version switcher on the left to navigate between versions.

Extension Validation

Shopware-CLI has a built-in validation for extensions. This is useful in your CI/CD pipeline to validate the extension before you release it.

Validating an extension

To validate an extension, you can use the following command:

bash
shopware-cli extension validate <path>

The path can be absolute or relative to the directory containing the extension or the zip file. The command exists with a non-zero exit code if the validation fails with an error level message.

What is validated?

  • The composer.json has an shopware/core requirement and constraint is parsable
  • The extension metadata is filled with:
    • name
    • label (German and English)
    • description (German and English) and longer than 150 characters and shorter than 185 characters
  • Translations have equality translated in the given languages
  • PHP can be correctly linted with the minimum PHP version
  • The theme.json can be parsed and included assets can be found

Supported PHP versions for linting

The following PHP versions are supported for linting:

  • 7.3
  • 7.4
  • 8.1
  • 8.2

These versions don't need to be installed locally, they are downloaded on demand and executed using WebAssembly without any dependencies.