Skip to content

Composer Commands Reference

Composer Commands Reference

INFO

These commands are only available inside shopware/shopware GitHub repository, so when you contribute to Shopware. For regular projects, use ./bin/*.sh scripts.

These composer commands can be executed using composer with your Shopware project.

bash
$ composer [command] [parameters]

Commands

Setup & build

CommandDescription
setupResets and re-installs this Shopware instance - Database will be purged!
build:jsBuilds Administration & Storefront - Combination of build:js:admin & build:js:storefront
build:js:adminBuilds the Administration - Includes bundle:dump, feature:dump, admin:generate-entity-schema-types and assets:install
build:js:component-libraryBuilds the component library
watch:adminBuild administration with hot module reloading
build:js:storefrontBuilds the Storefront's JavaScript - Includes bundle:dump, feature:dump and theme:compile
check:licenseCheck third-party dependency licenses for composer dependencies
resetResets this Shopware instance, without composer and npm install. (Faster reset if no dependencies changed)

Administration

CommandDescription
admin:create:testGenerate a test boilerplate
admin:generate-entity-schema-typesConvert entity schemas to data types
admin:unitLaunches the jest unit test-suite for the Admin
admin:unit:watchLaunches the interactive jest unit test-suite watcher for the Admin
admin:unit:prepare-vue3Prepares the jest unit test-suite for the Admin with Vue3
admin:unit:vue3Launches the jest unit test-suite for the Admin with Vue3
admin:unit:watch:vue3Launches the interactive jest unit test-suite watcher for the Admin with Vue3
npm:admin:check-licenseCheck third-party dependency licenses for administration
watch:adminBuild administration with hot module reloading

Storefront

CommandDescription
build:js:storefrontBuilds the Storefront's JavaScript - Includes bundle:dump, feature:dump and theme:compile
npm:storefront:check-licenseCheck third-party dependency licenses for storefront
watch:storefrontBuild storefront with hot module reloading

Testsuite & Development

CommandDescription
bc-checkChecks for backwards compatibility breaks in the current branch
e2e:setupInstalls a clean shopware instance for E2E environment and launches e2e:prepare
e2e:openLaunches the Cypress E2E test-suite UI
e2e:prepareInstalls the Admin Extension SDK test plugin with fixtures and dumps the database
ecsChecks all files regarding the Easy Coding Standard
ecs-fixChecks all files regarding the Easy Coding Standard and fixes them if possible
eslintCodestyle checks all (Administration/Storefront/E2E) JS/TS files
eslint:adminCodestyle checks Administration JS/TS files
eslint:admin:fixCodestyle checks Administration JS/TS files and fixes them if possible
eslint:e2eCodestyle checks all E2E JS/TS files
eslint:e2e:fixCodestyle checks all E2E JS/TS files and fixes them if possible
eslint:storefrontCodestyle checks all Storefront JS/TS files
init:testdbInitializes the test database
lintShorthand for the composer commands stylelint, eslint, ecs, lint:changlog and lint:snippets
lint:changelogValidates changelogs
lint:snippetsValidates existence of snippets in all core-supported languages
phpstanruns the PHP static analysis tool
phpunitLaunches the PHP unit test-suit
phpunit:quarantinedLaunches the PHP unit test-suite for quarantined tests
storefront:unitLaunches the jest unit test-suite for the Storefront
storefront:unit:watchLaunches the interactive jest unit test-suite watcher for the Storefront