ddev config --project-name test
ddev runs composer install, dev/build and frontend install and build on startup.
ddev start
If you want to run it manually, you can run:
ddev composer install
ddev yarn --cwd=themes/mytheme
ddev yarn --cwd=themes/mytheme build
You can rename the theme to your own theme name.
- ./ddev/config.yml (post-start-hook command)
- app/config/theme.yml (ssviewer and vitehelper settings)
This starter uses vite and tailwindcss for frontend. Vite comes with a dev server and hot reloading; start it with:
cd themes/mytheme
ddev yarn run dev
The vite dev server needs the current server name set in a ENV variable:
VITE_DEV_SERVER_URL="https://starter-ddev.ddev.site:5173/"
ddev sake db:build -f
To get a list of tasks run
ddev sake tasks
To get infos about a task run e.g.
ddev sake tasks:i18nTextCollectorTask -h
Install all packages locally
ddev composer install
SS Shell is a tool to tinker around in CLI, based on PsyShell. You can open the shell using
ddev php vendor/bin/ssshell
Or the even shorter version:
ddev tinker
You can get DataObjects like in any code (e.g. Page::get()->byID(42)
), run methods on objects, etc.
Inside ssshell you can run help
to see a list of available commands.
Code Sniffer is a tool to detect violations of a defined coding standard (mostly PSR-12)
See phpcs.xml.dist for the ruleset used.
Detect violations
ddev composer run lint
or
ddev lint
Fix most violations automatically
ddev composer run fix
or the shortcut
ddev fix
PHP Static Code Analyzer is a tool to detect bugs in your code without running it. It can be used to detect type errors, dead code, and other issues.
Don't be too much annoyed by the errors. Rector can fix a lot of them automatically.
A level of 4 should be doable.
ddev composer run phpstan
or
ddev stan
Rector is a tool to refactor code automatically. It can be used to upgrade code to a newer version of Silverstripe or PHP.
See rector.php for rules and configuration.
ddev composer run rector-dry #dry run
ddev composer run rector
or
ddev rector --dry-run #dry-run
ddev rector
For the first time run it's recommended to refactor rule by rule. Run rector-dry to see which rules would be applied, then let rector change the code.
- ssslug module for SS6 (map marker)
- map element and mapbox field for backend
- Silverstripe Piwik SS6
- Address Extension for SiteConfig - show in Address.ss
- Adress/Contact Element
- implement ssshell and document usage
- cookieconsent default settings
ssh-copy-id user@yourserver
Add the deploy key to your github or gitlab repository
ssh user@yourserver
software install composer
vendor/bin/dep deploy:setup
- configure webroot
- create database on the server
- create .env in /releases/
- add SSL certificate
- switch https redirect on
vendor/bin/dep deploy
or
ddev composer deploy