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

pkg:composer/phil/microsymfony

7.0.1 2024-03-01 00:54 UTC

This package is auto-updated.

Last update: 2025-11-16 21:43:42 UTC


README

Latest Version PHP Version Require level Software License Build Status (GitHub) Code Coverage Scrutinizer Code Quality Quality Score

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 somes examples.

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

Table of Contents ๐Ÿ“–

Demo ๐ŸŒˆ

Because a live demo is always better than all explanations :

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 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. It creates a new repository from the main branch instead of the last release. I guarantee that all commits on the main branch are stable; you can verify that the associated CI jobs are โœ….

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

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%".

Requirements โš™

All โ€œProclaim Honestly, Interact Liberallyโ€ project will use the latest version within 1 or 2 months depending on dependencies availability.

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:

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 ๐Ÿ‘Œ

ADR ๐Ÿ“

ADR stands for Architecture Design Records:

What it doesn't ship? โŒ

References ๐Ÿ“š

Others โ€œProclaim Honestly, Interact Liberallyโ€ Skeletons ๐Ÿฉป

  • WebSymfony

    • MicroSymfony+
    • Database
      • StofDoctrineExtensionsBundle
    • EasyAdmin
    • Security Layers
      • SymfonySecurity
      • NelmioSecurityBundle
      • NelmioCorsBundle
    • more.
  • ApiSymfony

    • 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
  • WebSkeleton

    • 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 ๐Ÿ™

parler-haut-interagir-librement/MicroSymfony contributors

Made with contrib.rocks.

Strangebuzz/MicroSymfony Contributors

strangebuzz/MicroSymfony contributors

Made with contrib.rocks.

License โš–๏ธ

The MIT License (MIT). Please see License File for more information.

Built with MicroSymfony ๐Ÿ› ๏ธ