承接 lmendes/symfony-skeleton 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

lmendes/symfony-skeleton

Composer 安装命令:

composer create-project lmendes/symfony-skeleton

包简介

A production-ready Symfony skeleton with Docker, CI/CD, and best practices

README 文档

README

CI PHP Symfony License: MIT Packagist

A production-ready Symfony 7.2 skeleton — Docker, full auth, admin panel, async messaging, and best practices baked in. Ready to publish on Packagist.

What's Included

Infrastructure

  • PHP-FPM 8.2, multi-stage Dockerfile (base / dev / prod)
  • Nginx with security headers + static asset caching
  • PostgreSQL 16 with healthcheck
  • Redis 7 for cache + Messenger transport
  • Mailpit for local SMTP (auto-configured in dev)
  • Xdebug pre-configured (off by default)

Authentication

  • Login / logout (CSRF-protected)
  • User registration (terms checkbox + NotCompromisedPassword)
  • Remember me (1 week)
  • Forgot password → email link → reset form → new password
  • lastLoginAt tracking via LoginSuccessListener
  • UserVoter for per-resource USER_VIEW / USER_EDIT authorization

Architecture Patterns

  • UUID v7 primary keys (Entity/Trait/HasUuid)
  • Timestamp lifecycle callbacks (Entity/Trait/HasTimestamps)
  • Generic Doctrine paginator (Pagination/DoctrinePaginator + PaginatedResult<T>)
  • Abstract repository with save(), remove(), paginate()
  • Abstract API controller with success(), validationError(), notFound()
  • Custom base controller with requireUser(), addSuccess(), getPage()
  • Custom Twig extension: truncate, human_filesize, initials, is_current_route
  • Custom form theme for clean error/label/help rendering

Messaging

  • Async transport via PostgreSQL LISTEN/NOTIFY (with pg_notify trigger in migration)
  • Retry strategy (3 attempts, exponential backoff)
  • Failed transport for dead-letter queue
  • SendWelcomeEmail message + handler as example

Emails

  • MailerService: sendWelcome(), sendPasswordReset(), sendEmailVerification()
  • Responsive HTML email templates with base layout

Admin Panel (/admin)

  • Searchable, paginated user list
  • User detail page with last login
  • Toggle admin role (CSRF-protected)
  • Delete user (CSRF-protected, self-deletion prevented)

API (/api)

  • GET /api/me — authenticated user as JSON
  • GET /health — structured health check

Console Commands

Command Description
app:install First-run wizard
app:user:create Create user from CLI
app:user:promote Add/remove role
app:messenger:purge-failed Purge old failed messages

Code Quality

  • PHPStan level 8
  • PHP-CS-Fixer with Symfony + PHP 8.2 rules
  • PHPUnit 11 — 3 suites: Unit / Integration / Controller
  • Symfony YAML, Twig, PHP syntax linters

CI/CD

  • ci.yml: lint → PHPStan → test matrix (8.2 + 8.3) → security audit → Docker build
  • release.yml: auto GitHub Release + changelog on git tag
  • dependency-review.yml: blocks high-severity new deps on PR
  • Dependabot for weekly Composer + Actions updates

Quick Start

composer create-project your-vendor/symfony-skeleton my-project
cd my-project

Or manually:

git clone https://github.com/your-vendor/symfony-skeleton.git my-project
cd my-project
composer install

Docker

cp .env .env.local
make build && make up

# First-run wizard (DB + migrations + admin user):
make shell
php bin/console app:install
exit

# Or step-by-step:
make db-create && make db-migrate && make db-fixtures
Service URL
App http://localhost:8080
Mailpit http://localhost:8025

🛠 Without Docker

Requirements: PHP 8.2+, PostgreSQL 16, Redis 7, Composer 2

composer install
cp .env .env.local   # set DATABASE_URL, MESSENGER_TRANSPORT_DSN
php bin/console app:install
symfony serve

Tests & Quality

make test            # all suites
make test-coverage   # HTML report → var/coverage/
make lint            # YAML + Twig + PHP
make cs-fix          # auto-fix code style
make analyse         # PHPStan level 8
make security        # composer audit

Fixture Users

Email Password Role
admin@example.com admin123 ROLE_ADMIN
user@example.com user123 ROLE_USER

Never load fixtures in production.

Production

docker build -f docker/php/Dockerfile --target prod -t my-app:latest .

Required env vars: APP_SECRET, DATABASE_URL, MESSENGER_TRANSPORT_DSN, MAILER_DSN, APP_NAME, APP_TIMEZONE.

🤝 Contributing · Security · License

See CONTRIBUTING.md, SECURITY.md, LICENSE.

lmendes/symfony-skeleton 适用场景与选型建议

lmendes/symfony-skeleton 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 lmendes/symfony-skeleton 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-13