larafony/core 问题修复 & 功能扩展

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

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

larafony/core

Composer 安装命令:

composer require larafony/core

包简介

Larafony is a modern PHP 8.5 framework combining the elegance of Laravel, the stability of Symfony, and the power of PSR standards - built for production, not tutorials. Minimal dependencies, full PSR support, custom middleware stack, and analytics without cookies or Google.

README 文档

README

Larafony Logo

Larafony is a modern, lightweight PHP framework that combines the developer experience of Laravel, the robustness of Symfony, and the power of PHP 8.5 — all without compromise.
It’s designed for production-grade applications, not tutorials or demos.

✨ Key Features

  • ⚙️ Built on PSR Standards
    Full support for PSR-7 (HTTP), PSR-11 (Container), PSR-15 (Middleware), and PSR-3 (Logger).
    Interoperability at its core — use any compliant library or component you prefer.

  • 🧩 Attribute-Based Design
    Fully powered by PHP Attributes, bringing clean syntax and native reflection instead of verbose annotations or configuration files.

  • 🔓 Not Locked into One Ecosystem
    You’re free to choose your tools. Larafony works seamlessly with:

    • Inertia.js
    • Vue.js
    • Blade
    • Twig
  • 🪶 Minimal Dependencies
    A minimal composer.json — PSR packages only. No unnecessary framework bloat.

  • 🧱 Custom Middleware Stack
    A powerful yet simple middleware pipeline, inspired by PSR-15 and fine-tuned for performance.

  • 📊 Built-in Backend Analytics
    Privacy-friendly, cookie-free analytics, with no dependence on Google or external trackers.

🚀 Philosophy

Larafony exists for developers who love the elegance of Laravel, the discipline of Symfony, and the freedom of pure PHP.
It’s opinionated where it matters — and unopinionated everywhere else.

  • Production-ready from day one
  • Framework-agnostic mindset
  • Performance-first architecture
  • Readable, modern PHP code

🧰 Requirements

  • PHP ≥ 8.5
  • Composer 2.9+
  • PSR-compliant HTTP and container packages (installed automatically)
  • OpenSSL enabled
  • extensions enabled: curl, mbstring,pdo, uri, xml

⚠️ If you see deprecation warnings during composer create-project, run:

composer self-update

❗Running Larafony on older PHP / Composer versions is not supported and issues caused by outdated environments will be closed without investigation.

Docker Alternative

For a containerized development environment:

  • Docker ≥ 20.10
  • Docker Compose ≥ 2.0

See DOCKER.md for complete Docker setup and usage instructions.

🧭 Roadmap

Each chapter is developed in a separate branch and includes unit tests using PHPUnit.

🧩 Core Foundation

  • Base framework configuration — Chapter 1
  • Simple error handling — Chapter 2
  • Simple timer using PSR-20 (Simple Carbon replacement) — Chapter 3
  • HTTP requests with PSR-7/PSR-17 (Simple Web Kernel) — Chapter 4
  • Dependency Injection using PSR-11 — Chapter 5

🌐 HTTP Layer

  • Routing using PSR-15 — Chapter 6
  • HTTP client using PSR-18 (Simple Guzzle replacement) — Chapter 7
  • Environment variables and configuration — Chapter 8

⚙️ Console & Databasechap

🧱 Application Layer

🎨 View Layer (simple)

🌐 Migrating to packagist

  • Demo application as a separate project — Chapter 18

🎨 View Layer (SPA)

💥 Error Handling

🔐 Security & Communication

🧭 Meta

  • Why Larafony — Comparing with Laravel, Symfony, CodeIgniter — Chapter 31

🧩 The Philosophy of the Final Chapters

This will be updated while following packages reach FULL php8.5 support.

Larafony’s journey doesn’t end with writing code — it ends with understanding.

The last chapters are not about adding features, but about liberating the developer.
They show that every component — clock, container, logger, cache, or view — is optional, replaceable, and interchangeable.

Each replacement (Carbon, Monolog, Laravel Container, Twig, etc.) isn’t a “plugin”, but a lesson:

how professional PHP code achieves the same result through different abstractions.

By the time you reach the end, you won’t just use a framework —
you’ll understand the architecture behind every framework.

"The best framework is the one you can replace piece by piece — because you understand it completely."

🧠 Larafony is not just a framework.
It’s an open architecture, a teaching tool, and a manifesto of modern PHP.

Every line of code exists to remind you that:

  • elegance is a function of simplicity,
  • performance is a side effect of clarity, and
  • real mastery means knowing when to write less.

Welcome to the end of the framework —
and the beginning of your own.

⚙️ Extending with mature Libraries

  • Larafony bridges - Chapter 32
    • View Bridges (Twig & Smarty)
    • Use Carbon instead of ClockFactory
    • Use Monolog
    • Use Symfony Mailer
    • Use Guzzle Http

🚀 Quick Start

Using Docker (Recommended)

# Quick start - all in one script
./docker-test.sh              # Run tests without coverage
./docker-test.sh --coverage   # Run tests with HTML coverage report

# Or step by step
./docker.sh build             # Build Docker images
./docker.sh up                # Start MySQL service
./docker.sh test              # Run tests
./docker.sh quality           # Run all quality checks

Coverage reports:

  • HTML report: Open coverage/index.html in your browser
  • Text output: Use ./docker-test.sh --text

See DOCKER.md for complete Docker documentation and all available commands.

Using Local PHP

# Install dependencies
composer install

# Run tests
composer test

# Run quality checks
composer quality

🚀 Learn How It's Built—From Scratch

Interested in how Larafony is built step by step?

Check out my full PHP 8.5 course, where I explain everything from architecture to implementation — no magic, just clean code.

👉 Get it now at masterphp.eu

Additional Resources

License

The Larafony framework is open-sourced software licensed under the MIT license.

larafony/core 适用场景与选型建议

larafony/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 61 次下载、GitHub Stars 达 89, 最近一次更新时间为 2025 年 10 月 26 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 61
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 89
  • 点击次数: 33
  • 依赖项目数: 5
  • 推荐数: 0

GitHub 信息

  • Stars: 89
  • Watchers: 1
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-10-26