dockware
  • dockware doc's
  • News
  • Setup
    • Docker Setup
    • What Image should you use?
    • Performance Tweaks
  • Use Dockware
    • First Run
    • Update Dockware
    • Advanced Run
    • Default Credentials
    • Symfony or Shopware 5
    • Changelog
  • Features
    • Intro
    • Environment Variables
    • Adminer
    • Mailcatcher
    • Switch PHP Version
    • Switch Node Version
    • Tideways Profiling
    • Pimp my Log
    • Filebeat
    • SSH Users
    • MySQL Users
    • Shopware Currency
  • Development
    • Intro
    • Start Developing
    • Switch Branches
    • Debugging
    • Watchers
    • App Development
    • Update Shopware
    • Dockware Essentials
    • Custom Domains
    • Custom Images
    • Code Coverage
    • CLI Build Shopware 6 Plugin
    • Multi-Environment Setups
  • Contribute
    • Intro
    • Setup Github Version
    • Create Feature
    • Code Styles
    • Testing
    • Create Pull Requests
  • CI/CD
    • Github
    • Gitlab
    • Bitbucket
    • Buddy
  • Tips & Tricks
    • Create a new Project
    • Bind-Mounting
    • Persisting Data
    • Housekeeping
    • Online Servers
    • Performance on Mac
    • Security
  • FAQ
    • Sequel Pro
    • Dockware and other images
    • Scripts (PSH?)
    • Redis
    • Error Port not available
    • MySQL failed
    • Elasticsearch
    • Windows Problems
    • Chrome Problems
    • Import MySQL Dump
    • Shopware 5 Support
    • Use Https/SSL
    • Container hangs in Pipeline
    • Disable the admin worker
  • Additional Links
    • Imprint
    • Founders
    • Dockware website
    • Dockware in Shopware Slack
Powered by GitBook
On this page

Was this helpful?

  1. Contribute

Code Styles

Please ensure that your source code uses the Shopware guidelines regarding code styles. Use the following tools and commands to scan your source code. Please note some features provide the option to "auto-fix" problems. Keep in mind that you need to download affected files to your host in that case. Maybe just download everything, GIT will show you all diffs anyway.

CS Fixer

IN DOCKER
./psh.phar fix-cs

ESLint Run this command do analyze and auto-fix your modifications in the administration.IN DOCKER

IN DOCKER
cd platform/src/Administration/Resources/app/administration && ./node_modules/.bin/eslint --fix --ext .js,.vue src test

PHPStan and Psalm Last but not least, run the static analyzer to check your code quality with help of PHPStan and Psalm.

IN DOCKER
./psh.phar static-analyze

Here is a final copy-paste script that you can use to run all these tools and also automatically download the source code again.

ON HOST
docker exec -it shopware bash -c './psh.phar fix-cs'
docker exec -it shopware bash -c 'cd platform/src/Administration/Resources/app/administration && ./node_modules/.bin/eslint --fix --ext .js,.vue src test'
docker exec -it shopware bash -c './psh.phar static-analyze'
docker cp shopware:/var/www/html/platform/src/. ./src/platform/src
PreviousCreate FeatureNextTesting

Last updated 4 years ago

Was this helpful?