Download the PHP package strangebuzz/microsymfony without Composer
On this page you can find all versions of the php package strangebuzz/microsymfony. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download strangebuzz/microsymfony
More information about strangebuzz/microsymfony
Files in strangebuzz/microsymfony
Package microsymfony
Short Description A template to initialize an application to use Symfony as a micro-framework
License MIT
Homepage https://microsymfony.ovh
Informations about the package microsymfony
MicroSymfony ๐ถ
About ๐
MicroSymfony is a Symfony 7.1 application skeleton on steroids, ready to use.
I have made a long blog post explaining all it contains; it will be the reference for documentation. I'll update it when needed:
If you want to use the last Symfony 6.4 LTS version in your composer.json
file, replace all occurrences of 7.1
with 6.4
and run composer up
.
Table of Contents ๐
- About
- Demos
- Quick-start
- With the Symfony binary
- With FrankenPHP
- Requirements
- Optional requirements
- Stack
- Features
- Feature branches
- Infrastructure
- Database
- Tooling
- Notes
- Other good practices
- References
Demos ๐
Because a live demo is always better than all explanations:
- Live demo at https://microsymfony.ovh
- Live demo powered by FrankenPHP at https://frankenphp.microsymfony.ovh
Quick-start โก
With the Symfony binary ๐ถ
You must have the Symfony binary and composer installed locally.
To create a new project from the GitHub template, run:
composer create-project strangebuzz/microsymfony && cd microsymfony
Then start the PHP server with make:
make start
Or with Castor:
castor start
Open https://127.0.0.1:8000 (considering your 8000 port is free) and enjoy! ๐
With FrankenPHP ๐งโ
We can also use FrankenPHP to run MicroSymfony. You must have Docker installed locally.
Create a new project from the GitHub template, run:
docker run --rm -it -v $PWD:/app composer:latest create-project strangebuzz/microsymfony && cd microsymfony
Install the FrankenPHP Symfony runtime:
docker run --rm -it -v $PWD:/app composer:latest require runtime/frankenphp-symfony
Then run:
docker run \
-e FRANKENPHP_CONFIG="worker ./public/index.php" \
-e APP_RUNTIME=Runtime\\FrankenPhpSymfony\\Runtime \
-v $PWD:/app \
-p 80:80 -p 443:443 \
-d \
dunglas/frankenphp
Open https://localhost and enjoy! ๐
PS: On Windows, replace $PWD
with "%cd%"
.
You can also directly use the FrankenPHP branch.
Requirements โ
- PHP 8.2 (also works with PHP 8.3)
- The Symfony CLI
Optional requirements โ
- The Xdebug PHP extension if you want to run the code coverage report
- Castor task runner if you don't want to use Make and its Makefile
Stack ๐
- Symfony 7.1
- Twig 3.8
- Hotwired stimulus 3.2 and Turbo 8.0
- PHPUnit 11.0
- The classless BareCSS CSS framework
PS: A fork of BareCSS was created to fix some issues as the project is not maintained anymore.
Features ๐
MicroSymfony ships these features, ready to use:
- Two task runners
- Static analysis with PHPStan
- Coding standards with php-cs-fixer
- Tests (demo)
- Code coverage at 100% (configurable threshold)
- GitHub CI (actions)
- Asset mapper+Stimulus (documentation)
- A custom error template
Feature branches ๐
Feature branches
are not merged in the main branch but are used to integrate a new vendor library
or make a POC.
For example, have you ever dreamed of testing Eloquent,
the Laravel ORM, on a Symfony project?
Then clone the eloquent
branch and run composer install && make load-fixtures
.
Infrastructure
Database ๐ฝ
These ยซ database ยป branches aim to display a list of records coming from a SQLite database.
Tooling ๐จ
These branches will be rebased after each release so they are always up to date.
Notes ๐
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
References ๐
- A better ADR pattern for your Symfony controllers (strangebuzz.com) (coming soon)
- 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)
All versions of microsymfony with dependencies
ext-ctype Version *
ext-dom Version *
ext-iconv Version *
ext-libxml Version *
ext-simplexml Version *
ext-xml Version *
league/commonmark Version ^2.4
symfony/asset Version ~7.1.0
symfony/asset-mapper Version ~7.1.0
symfony/console Version ~7.1.0
symfony/dotenv Version ~7.1.0
symfony/flex Version ^2
symfony/form Version ~7.1.0
symfony/framework-bundle Version ~7.1.0
symfony/http-foundation Version ~7.1.0
symfony/http-kernel Version ~7.1.0
symfony/intl Version ~7.1.0
symfony/monolog-bundle Version ^3.8
symfony/routing Version ~7.1.0
symfony/runtime Version ~7.1.0
symfony/stimulus-bundle Version ^2.0
symfony/string Version ~7.1.0
symfony/twig-bundle Version ~7.1.0
symfony/ux-turbo Version ^2.16
symfony/validator Version ~7.1.0
symfony/web-link Version ~7.1.0
symfony/yaml Version ~7.1.0
twig/extra-bundle Version ^3.0
twig/markdown-extra Version ^3.7
twig/twig Version ^3.0