PHPackages                             xm/starter\_symfony\_4 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. xm/starter\_symfony\_4

ActiveProject[Framework](/categories/framework)

xm/starter\_symfony\_4
======================

Starter for creating Symfony 4/5/6 sites at XM Media

1152[3 issues](https://github.com/xmmedia/starter_symfony_4/issues)[5 PRs](https://github.com/xmmedia/starter_symfony_4/pulls)PHPCI failing

Since Feb 21Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/xmmedia/starter_symfony_4)[ Packagist](https://packagist.org/packages/xm/starter_symfony_4)[ RSS](/packages/xm-starter-symfony-4/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (9)Used By (0)

Symfony Starter
===============

[](#symfony-starter)

Used to create new projects using [Symfony 7](https://symfony.com/) at [XM Media](https://www.xmmedia.com/).

Dev:  @todo-symfony
Staging: @todo-symfony
Production: @todo-symfony

Setting Up a New Site
---------------------

[](#setting-up-a-new-site)

*Note:* Make sure your git configuration is set to use the correct line endings: `git config --global core.autocrlf input && git config --global core.eol lf`

1. Create a new project: ```
    composer create-project xm/starter_symfony_4 project-name --stability=dev --no-install --remove-vcs
    ```

    To run this, Composer needs to be installed globally. If you don't have Composer installed, follow the instructions at [getcomposer.org/download](https://getcomposer.org/download/).
2. Copy `.env.local-template` to `.env.local` and update the values where there are `@todo-symfony` comments.
3. Update `composer.json`: `name`, `license` (likely `proprietary`) and `description`
4. Update `package.json`: `name`, `version`, `git.url`, `license` (probably delete), `private`
5. Update the port in `vite.config.js` (`server.port` and `server.origin`)
6. Remove or update the `LICENSE` file.
7. Composer install &amp; update: `lando composer install && lando composer update` (or remove `lando` to run without Lando or without memory limit: `php -d memory_limit=-1 /usr/local/bin/composer update`)
8. Run `yarn && yarn up -R "**"`.
9. Run `yarn dev` or `yarn build` (for production) to compile JS &amp; CSS files.
10. Give executable perms to bin dir: `chmod u+x bin/*` (helpful, but optional)
11. Run/Start Lando site: `lando start`
12. Create database with event streams &amp; projections tables from `db_create.sql` using `lando db-import db_create_sql`.
    - If possible, set database collation to `utf8mb4_bin`: `ALTER DATABASE  CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;`
13. Create the required event streams with the command: `bin/console event-store:event-stream:create user && bin/console event-store:event-stream:create auth` (or if using lando: `lando console event-store:event-stream:create user && lando console event-store:event-stream:create auth`).
14. Run all projections once: `bin/console event-store:projection:run user_projection -o && bin/console event-store:projection:run auth_projection -o` (or if using lando: `lando console event-store:projection:run user_projection -o && lando console event-store:projection:run auth_projection -o`).
15. Create a user `bin/console app:user:add` (select role `ROLE_SUPER_ADMIN`) (or if using lando: `lando console app:user:add`).
16. Find and make changes near `@todo-symfony` comments throughout the site.
17. Delete starter files: `README.md` (or update) and `TEMPLATES.md`.
18. *Optional:* Run `composer test` – will install PHPUnit &amp; run PHP tests
19. Create new favicons: [realfavicongenerator.net](https://realfavicongenerator.net)
20. Copy (use "Push to another server") or recreate the templates in Postmark. The templates are referenced by the aliases.
21. *Optional:* Run `bin/console app:graphql:dump-schema ` to update the GraphQL schema file where `username` is the email of an admin user.
22. *Optional:* Rename the project in PhpStorm.
23. *Optional:* Run `npx @sentry/wizard@latest -i sourcemaps` to configure Sentry to upload source maps for the frontend.

**Local dev site can be accessed at: https://\[domain\]/**

Setting Up Starter
------------------

[](#setting-up-starter)

1. Checkout the repo.
2. Copy `.env.local-template` to `.env.local` and update the values where there are `@todo-symfony` comments.
3. Run/Start Lando site: `lando start`
4. Composer install: `lando composer install` or `composer install` to run without Lando.
5. Ensure correct node version: `nvm use`
6. Run `yarn`.
7. Run `yarn dev` or `yarn build` (for production) to compile JS &amp; CSS files.
8. Give executable perms to bin dir: `chmod u+x bin/*` (helpful, but optional)
9. Create database with event streams &amp; projections tables from `db_create.sql` using `lando db-import db_create_sql`.
    - If possible, set database collation to `utf8mb4_bin`: `ALTER DATABASE  CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;` This can be done through PhpMyAdmin (link provided by `lando start` command above or `lando info`)
10. Create the required event streams with the command: `bin/console event-store:event-stream:create user && bin/console event-store:event-stream:create auth` (or if using Lando: `lando console event-store:event-stream:create user && lando console event-store:event-stream:create auth`).
11. Run all projections once: `bin/console event-store:projection:run user_projection -o && bin/console event-store:projection:run auth_projection -o` (or if using lando: `lando console event-store:projection:run user_projection -o && lando console event-store:projection:run auth_projection -o`).
12. Create a user `bin/console app:user:add` (select role `ROLE_SUPER_ADMIN`) (or if using Lando: `lando console app:user:add`).
13. *Optional:* Run `composer test` – will install PHPUnit &amp; run PHP tests – or `lando composer test` if using Lando.
14. Run `bin/check` to run all code tests/checks.

\*\*Local dev site can be accessed at:

System Requirements
-------------------

[](#system-requirements)

### Server

[](#server)

- PHP 8.4
- MySQL 8.0

### Locally for Development

[](#locally-for-development)

- [Lando](https://lando.dev/)
- [Node 22](https://nodejs.org/)
- [nvm](https://github.com/nvm-sh/nvm)
- [Yarn v4](https://yarnpkg.com/)

Commands
--------

[](#commands)

- Run all checks: `nvm use && bin/generate_schema && bin/check_full`
    - Notes: this generates the GQL schema first, because within the checks we validate the graphql operations files
- Check all code: `bin/check`
- Generate GQL schema: `bin/generate_schema`
- Production JS/CSS build: `yarn build`
- Dev JS/CSS build: `yarn dev` (recommended command: `nvm use && yarn && yarn dev`)
- Preview production JS/CSS build: `yarn preview`
- JS Tests ([Jest](https://jestjs.io/)): `yarn test:unit`
- Linting:
    - JS ([ESLint](https://eslint.org/)): `yarn lint:js` or `yarn lint:js:fix`
    - CSS: `yarn lint:css` or `yarn lint:css:fix`
- Install PHP packages: `lando composer install` or `composer install`
- Install JS packages: `yarn`
- PHP Tests ([PhpUnit](https://phpunit.de/)):
    - `lando composer test` or `composer test`
    - no memory limit `php -d memory_limit=-1 bin/phpunit`
    - with coverage (HTML) `composer test:coverage`
    - show deprecations `composer test:deprecations`
- [PHP CS](https://cs.sensiolabs.org/): (must be installed first)
    - Dry run: `lando composer cs` or `composer cs`
    - Fix: `lando composer cs:fix` or `composer cs:fix`
- PHP Static Analysis ([PHPStan](https://github.com/phpstan/phpstan)): `lando composer static` or `composer static`
- Projections:
    - Show all commands: `bin/console event-store:projection`
    - Run once: `bin/console event-store:projection:run user_projection -o`
- Makers (PHP):
    - Make aggregate root/model: `bin/console make:model`
    - Make projection: `bin/console make:projection`
- Upgrade JS packages: `yarn up -R "**"`
    - Upgrade a specific package: `yarn up -R "package-name"`
    - Upgrade major versions: `yarn upgrade-interactive` (ctrl+c to exit without changes)

Incorporated Libraries &amp; Tools
----------------------------------

[](#incorporated-libraries--tools)

- [Lando](https://lando.dev/) – local dev environment
- Frontend – full list of dependencies can be found in [package.json](https://github.com/xmmedia/starter_symfony_4/blob/master/package.json)
    - [Vue](https://vuejs.org/) – frontend framework
        - [Vue Router](https://router.vuejs.org/) – routing package for frontend
        - [Vue Templates](https://vuejs.org/v2/guide/syntax.html) – the syntax for .vue files
        - [Vue Test Utils](https://vue-test-utils.vuejs.org/) – to help testing Vue components
    - [Pinia](https://pinia.vuejs.org/) - global state management
    - [Vite](https://vitejs.dev/) – frontend build tool
    - [Vitest](https://vitest.dev/) – to manage &amp; run the frontend testing
    - [GraphQL](https://graphql.org/) – the communication (query) language for the API
        - [Apollo Client](https://www.apollographql.com/docs/react/) through [Vue Apollo](https://vue-apollo.netlify.com) – frontend GraphQL
    - [SASS](https://sass-lang.com/) – CSS preprocessor (uses [node-sass](https://www.npmjs.com/package/node-sass))
    - [PostCSS](https://github.com/postcss/postcss) – transforms CSS
    - [Autoprefixer](ub.com/postcss/autoprefixer) – for adding browser prefixes
    - [SVGO](https://github.com/svg/svgo) – optimizes SVG files
    - [Tailwind](https://tailwindcss.com/docs/what-is-tailwind/) – utility first styling framework
    - [Jest](https://jestjs.io/) – JS unit testing
    - [Lodash](https://lodash.com/) – helper functions for JS
    - [date-fns](https://date-fns.org/) – helper functions for Dates in JS
    - [Faker.js](https://github.com/marak/Faker.js/) – for generating fake data in tests
    - [ESLint](https://eslint.org/) – checks JS for conventions &amp; errors
    - [Stylelint](https://stylelint.io/) – checks CSS for conventions &amp; errors
- Backend – full list of dependencies can be found in [composer.json](https://github.com/xmmedia/starter_symfony_4/blob/master/composer.json)
    - [Symfony](https://symfony.com/doc/current/index.html#gsc.tab=0) – backend framework
    - [GraphQLBundle](https://github.com/overblog/GraphQLBundle) – provides GraphQL in PHP using [graphql-php](https://github.com/webonyx/graphql-php)
        - [GraphQiL](https://github.com/graphql/graphiql) is available at `/graphiql` (on dev only)
    - [Doctrine](https://www.doctrine-project.org/) – ORM
    - [Doctrine Migrations](https://www.doctrine-project.org/projects/doctrine-migrations.html) – for database migrations
    - [Nelmio CORS Bundle](https://github.com/nelmio/NelmioCorsBundle) – for CORS
    - [Symfony Messenger](https://symfony.com/doc/current/messenger.html) – for async messaging
    - [Symfony Mailer](https://symfony.com/doc/current/mailer.html) – for sending emails
    - [Symfony Security](https://symfony.com/doc/current/security.html) – for authentication &amp; authorization
    - [Twig](https://twig.symfony.com/) – server side templating language (limited use)
    - [Prooph PDO Event Store](https://github.com/prooph/pdo-event-store) &amp; Bridge/Bundle – for doing Event Sourcing
    - [Doctrine](https://www.doctrine-project.org/) – for reading from read models
    - [PhpUnit](https://phpunit.de/) – for running PHP tests
    - [PHP CS](https://cs.sensiolabs.org/) – PHP coding standards analyzer &amp; fixer
    - [PHPStan](https://github.com/phpstan/phpstan) – static analysis of PHP
    - [Postmark](https://postmarkapp.com/) – for sending email, contains email templates (currently setup under XM Media's account)
    - [Cloudflare](https://www.cloudflare.com/) – DNS &amp; CDN
- [GitLab](https://gitlab.com/) – deployment
- [Sentry](https://sentry.io/) – error tracking
- Dev Tools
    - [Vue Devtools](https://github.com/vuejs/vue-devtools)
    - [Apollo Devtools](https://github.com/apollographql/apollo-client-devtools)

Updating PHP version
--------------------

[](#updating-php-version)

1. Change version in `composer.json` &amp; add polyfill for new PHP version, ie, `symfony/polyfill-php84`.
2. Update the PHP version in the following files:
    - `.lando.yml`
    - `setup_dev.sh` – 4 places
    - `setup_prod.sh` – 4 places
    - `.gitlab-ci.yml` – 2 places
    - `.github/workflows/ci.yml` – 1 place
    - `.php-cs-fixer.dist.php` – update the `@PHP8#Migration` version to match the current version.
    - `~/.bashrc` and/or `~/.zshrc` on the servers
3. Run `lando rebuild` to rebuild the Lando container with the new PHP version.
4. Run `lando composer update` or `composer update` to update the PHP dependencies. If running locally without Lando, ensure your local PHP version matches the new version.
5. Run the checks `nvm use && bin/check_full`.
6. Update version in `README.md`.

User Actions &amp; Fields
-------------------------

[](#user-actions--fields)

### User – Verified

[](#user--verified)

Email address is verified. When the user is added by admin, this is always set to true. When a user registers themselves, this is set to false until they verify their email.

### User – Active

[](#user--active)

User is active and can log in. When the user is added by admin, this is set to true when they're sent an invitation (invite) or false until they activate their account &amp; set their password. When a user registers themselves, this is set to true.

### Send Activation

[](#send-activation)

Sends email to user to activate their account by entering their password. Uses a reset token and sets their account to active when complete.

### Send Verification

[](#send-verification)

For email/user verification after registering. Sends email to user to activate their account. They don't need to enter a password (already set on registration form). Uses a reset token and sets their account to verified when complete.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ba6b4f635e1306d5f75c48ad0e6464858f8d17e69458fb7850e5c0af8c1de98c?d=identicon)[darrylhein](/maintainers/darrylhein)

---

Top Contributors

[![darrylhein](https://avatars.githubusercontent.com/u/376976?v=4)](https://github.com/darrylhein "darrylhein (3210 commits)")[![hsteuernagel](https://avatars.githubusercontent.com/u/9735609?v=4)](https://github.com/hsteuernagel "hsteuernagel (66 commits)")[![meggy236](https://avatars.githubusercontent.com/u/150461169?v=4)](https://github.com/meggy236 "meggy236 (57 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

### Embed Badge

![Health badge](/badges/xm-starter-symfony-4/health.svg)

```
[![Health](https://phpackages.com/badges/xm-starter-symfony-4/health.svg)](https://phpackages.com/packages/xm-starter-symfony-4)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M192](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
