/MicroSymfony

Template introduction, check out: https://www.strangebuzz.com/en/blog/introducing-the-microsymfony-application-template

Primary LanguagePHP

MicroSymfony 🎶

Introduction 🖋

MicroSymfony is a Symfony 7.0 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:

So, this blog post is the official documentation. This readme is a teaser of what MicroSymfony contains.

If you want to use the last Symfony 6.4 LTS version, in your composer.json file, replace all occurrences of 7.0 with 6.4, run composer up, and you are done.

Demo 🌈

Because a live demo is always better than all explanations. Here is it:

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 symfony:start

Open https://127.0.0.1:8000 (considering your 8000 port is free) and enjoy! 🙂

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! 🙂

Requirements ⚙

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 🔗

Features 🚀

MicroSymfony ships these features, ready to use:

Other good practices 👌

What it doesn't ship? ❌

References 📚