strangebuzz/microsymfony 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

strangebuzz/microsymfony

Composer 安装命令:

composer require strangebuzz/microsymfony

包简介

A template to initialize an application to use Symfony as a micro-framework

README 文档

README

Latest Version PHP Version Require Symfony Version Symfony Style level Software License Build Status (GitHub) Code Coverage Scrutinizer Code Quality Quality Score All Contributors PRs Welcome

About 🖋

MicroSymfony is a Symfony 8.1 application template on steroids, ready to use.

I have made a long blog post explaining the philosophy behind it and how to use it:

Note

PS: If you want to use the last Symfony 7.4 LTS version, follow the procedure in agents/downgrade-to-symfony-7-4-LTS.md.

Alternatively, if you have an AI coding assistant tool installed, you can run:

opencode --prompt agents/downgrade-to-symfony-7-4-LTS.md

Table of Contents 📖

Demos 🌈

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

Note

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" \
    -v $PWD:/app \
    -p 80:80 -p 443:443 \
    -d \
    dunglas/frankenphp

Open https://localhost and enjoy! 🙂

PS: On Windows, replace $PWD with "%cd%".

Note: FrankenPHP already uses PHP 8.5.

With Laragon

Have a look at the specific documentation.

Requirements ⚙

Optional requirements 🚦

  • The Xdebug PHP extension if you want to run the code coverage report
  • Castor task runner, if you would rather not use Make and its Makefile

Stack 🔗

Features 🚀

MicroSymfony ships these features, ready to use:

Feature branches 🚅

Feature branches are not merged into the main branch but are used to test the integration of 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.

Minimalistic versions

  • Doctrine less (PR, branch, rebased on 2026-01-17)
  • Symfony 7.4 LTS (PR, branch, rebased on 2026-02-07)

Infrastructure

  • Symfony-docker (PR, branch, rebased on 2024-11-17)

Database 💽

These « database » branches aim to display a list of records from an SQLite database.

  • Eloquent ORM (PR, branch, rebased on 2024-11-17)

Tooling 🔨

  • Vite-Bundle (PR, branch, rebased on 2026-02-11) (demo)
  • Psalm (PR, branch, rebased on 2026-01-18)
  • Taskfile (PR, branch, rebased on 2024-12-04)
  • TwigStan (PR, branch, rebased on 2024-11-18)
  • Twig-CS-Fixer (PR, branch, rebased on 2026-12-30)

One will rebase those branches regularly so they are not too outdated.

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.

PHP configuration files

If you install a new Symfony library, the Flex recipes can add YAML files to your project. These YAML files are loaded, but you can convert them to PHP like the other configuration files. Take examples from the other files in config/packages to see how to make the conversion.

Other good practices 👌

ADR 📝

ADR stands for Architecture Design Records:

  • [2026-01-17] Use Doctrine ORM as the default database layer (PR)
  • [2025-12-29] Use the new PHP configuration (PR)
  • [2025-01-25] Include the FrankenPHP runtime by default (PR)
  • [2025-01-21] Add PHPUnit test suites (PR)
  • [2024-12-18] Use PicoCSS instead of BareCSS as the CSS framework (PR)
  • [2024-12-05] Convert all configuration files to PHP (fluent interface) (PR)
  • [2024-09-22] Use the ADR pattern for all controllers (PR)

References 📚

Contributing 🤝

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security 🧯

Please see SECURITY for details.

Credits 🙏

strangebuzz/MicroSymfony contributors

Made with contrib.rocks.

License ⚖️

The MIT License (MIT). Please refer to the license file for more information.

Built with MicroSymfony 🛠️

strangebuzz/microsymfony 适用场景与选型建议

strangebuzz/microsymfony 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 158 次下载、GitHub Stars 达 136, 最近一次更新时间为 2023 年 03 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「symfony」 「php」 「rad」 「poc」 「micro-framework」 「project-template」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 strangebuzz/microsymfony 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 strangebuzz/microsymfony 我们能提供哪些服务?
定制开发 / 二次开发

基于 strangebuzz/microsymfony 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 158
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 137
  • 点击次数: 17
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 136
  • Watchers: 2
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-04