Skip to content

Installation

The Sylius Starter skeleton creates a new Sylius project, ready to develop: Castor installs Sylius-Standard, its Docker stack (FrankenPHP, PostgreSQL, HTTPS router), the assets and the fixtures, then hands you the tasks to shape your store.

Terminal window
git clone --depth=1 https://github.com/FriendsOfSylius/skeleton.git my-shop
cd my-shop
rm -rf .git && git init
castor sylius:init

On GitHub, Use this template on the skeleton repository gives you a fresh repository without cloning the history.

castor sylius:init asks a few questions (application name, PHP version, domain, database, theme, payment gateways…), then builds and starts everything. Once done, it removes the skeleton-only files: the README is replaced by the one of your project, and .github.dist/ becomes your CI.

Every question can be answered upfront:

Terminal window
castor sylius:init --no-interaction \
--with-name=app \
--with-domain=my-shop.test \
--with-database=postgres \
--with-theme=canvas \
--with-payment-gateways=stripe
OptionDescriptionDefault
--with-nameName of the application (and of its tasks)app
--with-directoryDirectory of the applicationthe name
--with-versionPHP version8.5
--with-modeRuntime: frankenphp or fpmfrankenphp
--with-domainDomain of the storeapp.test
--with-sylius-versionSylius-Standard versionlatest
--with-databasepostgres, mysql, mariadb or nonepostgres
--with-themedefault, arena, aurora, bloom, blush, canvas, cellar, culture, depot, drive, groove, hearth, lagoon, paws, prompt, retro_gaming, roastery, summit, teahouse, tech, torque or volt (each with a light and a dark scheme)default
--with-payment-gatewaysmollie, paypal, stripe (repeat the option for several)all

castor docker:service:install (without argument) prints the options of every installable service.

FileRole
castor.phpYour stack: Castor context, and the services sylius:init registers
castor.composer.jsonThe Castor plugins of the project (sylius-starter/sylius-starter)
.castor/tasks/qa.phpcastor qa: audit, linters, ECS, PHPStan, PHPUnit (and Behat)
.github.dist/CI of the project: quality checks, Docker build cache, Dependabot
AGENTS.mdGuidance for the AI agents working on the project

Shape your store with the commands: add plugins, switch the theme, clean up the Admin menu, or import a catalog.

Without the skeleton, add Sylius Starter to a Castor project (a castor.php file at its root), then install Sylius:

Terminal window
echo '{}' > castor.composer.json
castor composer require sylius-starter/sylius-starter "@dev"
castor docker:service:install sylius

sylius-starter/sylius-starter brings every package. To pick only what you need, require sylius-starter/core and the task packages you want, e.g. castor composer require sylius-starter/core sylius-starter/themes sylius-starter/plugins "@dev".