phil / microsymfony
A template to initialize an application to use Symfony as a micro-framework
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-application-template
Requires
- php: >=8.3
- ext-ctype: *
- ext-dom: *
- ext-iconv: *
- ext-libxml: *
- ext-simplexml: *
- ext-xml: *
- league/commonmark: ^2.4
- symfony/asset: 7.0.*
- symfony/asset-mapper: 7.0.*
- symfony/console: 7.0.*
- symfony/dotenv: 7.0.*
- symfony/flex: ^2.4
- symfony/form: 7.0.*
- symfony/framework-bundle: 7.0.*
- symfony/intl: 7.0.*
- symfony/monolog-bundle: ^3.10
- symfony/runtime: 7.0.*
- symfony/stimulus-bundle: ^2.16
- symfony/translation: 7.0.*
- symfony/twig-bundle: 7.0.*
- symfony/validator: 7.0.*
- symfony/web-link: 7.0.*
- symfony/yaml: 7.0.*
- twig/extra-bundle: ^3.8
- twig/markdown-extra: ^3.8
- twig/twig: ^3.8
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.8
- phpstan/extension-installer: ^1.3
- phpstan/phpdoc-parser: ^1.26
- phpstan/phpstan: ^1.10
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-strict-rules: ^1.5
- phpstan/phpstan-symfony: ^1.3
- phpunit/phpunit: ^11.0
- rector/rector: ^1.0
- roave/security-advisories: dev-latest
- symfony/browser-kit: 7.0.*
- symfony/css-selector: 7.0.*
- symfony/debug-bundle: 7.0.*
- symfony/maker-bundle: ^1.55
- symfony/panther: ^2.1
- symfony/requirements-checker: ^2.0
- symfony/stopwatch: 7.0.*
- symfony/var-dumper: 7.0.*
- symfony/web-profiler-bundle: 7.0.*
Conflicts
- dev-main
- v7.0.1.x-dev
- 7.0.1
- 7.0.0
- 0.2.0
- 0.1.2
- 0.1.1
- 0.1.0
- dev-dependabot/composer/league/commonmark-2.6.0
- dev-dependabot/composer/symfony/http-client-7.1.8
- dev-dependabot/composer/symfony/process-7.1.7
- dev-dependabot/composer/symfony/http-foundation-7.1.7
- dev-dependabot/composer/symfony/validator-7.1.4
- dev-dependabot/composer/symfony/runtime-7.1.7
- dev-0000-Update-2023-11-16
This package is auto-updated.
Last update: 2025-06-13 21:13:40 UTC
README
About 🖋
“Proclaim Honestly, Interact Liberally” MicroSymfony is a Symfony 7.3 application skeleton on steroids, ready to use.
The purpose of MicroSymfony is to provide a sandbox with some sensible defaults and ready to use. It can be a solution if you want to quickly set up something, create a POC, test things, and even make a small "one-page" application.
It was base on strangebuzz/MicroSymfony with adjustment we're usually adding on all our projects. We also remove many examples.
Table of Contents 📖
- Demo
- Quick-start
- Requirements
- Stack
- Features
- Notes
- Other good practices
- What it doesn't ship!
- References
- Others “Proclaim Honestly, Interact Liberally” Skeletons
- Contributing
- Security
- Credits
- License
- Built with MicroSymfony
Demo 🌈
Because a live demo is always better than all explanations :
- Live demo will be available at https://ph-il.ca/demos/microsymfony
Quick-start ⚡
With the Symfony binary 🎶
You must have the Symfony binary and composer installed locally.
To create a new project, from the last tag, run:
composer create-project phil/microsymfony && cd microsymfony
To serve the application with the Symfony binary, run:
$ symfony server:start --daemon
or use the castor command
castor symfony:start
Open https://127.0.0.1:8000 (considering your 8000 port is free) and enjoy! 🙂
PS: You can also use the green button "Use this template ⇩" at the top right of the GitHub project homepage. This creates a new repository from the main branch instead of the last release. I guarantee that all commits on the main are stable; you can verify that the associated CI jobs are ✅.
Requirements ⚙
All “Proclaim Honestly, Interact Liberally” project will use the latest version within 1 or 2 months depending on dependencies availability.
- PHP 8.4
- The Symfony CLI
- Castor 0.22 task runner
Optional requirements 🚦
- The Xdebug PHP extension if you want to run the code coverage report (optional but recommended)
Stack 🔗
All “Proclaim Honestly, Interact Liberally” project will use the latest version within 1 or 2 months depending on dependencies availability.
Features 🚀
MicroSymfony ships these features, ready to use:
- One task runner
- Castor (source)
- Static analysis with PHPStan 2
- Coding standards with php-cs-fixer
- Refactoring with Rector
- The debug toolbar (doc)
- Tests (demo)
- Code coverage at 100% (configurable threshold)
- GitHub CI (actions)
- Asset mapper+Stimulus (documentation)
- Symfony Maker (documentation)
- A custom error template
Notes 📒
Symfony-UX
Turbo forms are disabled in assets/app.js.
To enable the feature for a given form, add the data-turbo="true"
attribute to it.
Or change the parameter Turbo.setFormMode
to on
to activate the feature globally.
In both cases, your controller code has to be modified accordingly.
Other good practices 👌
- Using strict types in all PHP files (source)
- Using the ADR pattern in an action controller (source) (doc)
- The composer.json file is normalized with ergebnis/composer-normalize
- Use of the composer bin plugin to install and run php-cs-fixer
What it doesn't ship? ❌
- Doctrine (installation) or use (WebSymfony)
References 📚
- PHPStan 2.0 Released With Level 10 and Elephpants! (phpstan.org)
- A better ADR pattern for your Symfony controllers (strangebuzz.com)
- My Taskfile configuration for Symfony (jmsche.fr)
- You should be using PHPStans bleeding edge (backendtea.com)
- A Good Naming Convention for Routes, Controllers and Templates? (jolicode.com)
- Front-end application development, Symfony-style(s) (dunglas.dev)
- Automated Test Coverage Checks with Travis, PHPUnit for Github Pull Requests (ocramius.github.io)
- Installing and using php-cs-fixer (strangebuzz.com)
- Castor, a journey across the sea of task runners (jolicode.com)
- Initializing your Symfony project with solid foundations (strangebuzz.com)
- Organizing your Symfony project tests (strangebuzz.com)
- What are your Symfony best practices? (strangebuzz.com)
- Setting a CI/CD workflow for a Symfony project thanks to the GitHub actions (strangebuzz.com)
- The Symfony Framework Best Practices (symfony.com)
Others “Proclaim Honestly, Interact Liberally” Skeletons 🩻
-
- MicroSymfony+
- Database
- StofDoctrineExtensionsBundle
- EasyAdmin
- Security Layers
- SymfonySecurity
- NelmioSecurityBundle
- NelmioCorsBundle
- more.
-
- API Platform
- Task runner
- Castor
- Static Analysis
- PHPStan
- Coding standards
- php-cs-fixer
- Refactoring
- Rector
- Tests
- Unit test
- API test
- E2E test
- GitHub CI
- Symfony Maker
-
- WebSymfony +
- “Proclaim Honestly, Interact Liberally” Bundles
- phil-ux - Add Base Twig Components
- PhilDoctrineExtensionStofBundle - Add missing stuff to StofDoctrineExtensionsBundle
- PhilDoctrineExtensionPublishBundle - Add Publish functionality to Doctrine Entity
- more.
Contributing 🤝
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security 🧯
Please see SECURITY for details.
Credits 🙏
- Philippe Gamache (primary maintainer)
- All Contributors
Made with contrib.rocks.
Strangebuzz/MicroSymfony Contributors
- COil (primary maintainer)
- All Contributors
Made with contrib.rocks.
License ⚖️
The MIT License (MIT). Please see License File for more information.
Built with MicroSymfony 🛠️
- WebSymfony
- WebSkeleton
- IRL Assemble Online
- La Page à Melkor via WebSkeleton
- Parler Haut Interagir Librement via WebSkeleton
- RPG Assemble Online
- TiltTek via WebSkeleton
- TTRPG Maker via WebSkeleton