stonedz/pff2
Composer 安装命令:
composer require stonedz/pff2
包简介
A simple yet robust PHP MVC framework
关键字:
README 文档
README
Pff2 is a lightweight MVC framework for PHP 8.1+.
Quick start (Composer)
- Create a new project directory and add
stonedz/pff2tocomposer.json. - Install dependencies:
composer install
- Scaffold app files:
vendor/bin/init
- Your project entry point is generated from
resources/site_skeleton/index.php.
Generated development files include:
development/compose.yamldevelopment/nginx.confdevelopment/PHP.Dockerfile
Quick start (Docker)
The canonical development compose file is:
development/compose.yaml
Run:
docker compose -f development/compose.yaml up --build
Default service endpoints from this setup:
- Web:
http://localhost:8081 - Mailcatcher UI:
http://localhost:1080 - MariaDB:
localhost:33061
Installation notes
- Composer install no longer auto-creates app symlinks; run
vendor/bin/initexplicitly. vendor/bin/updaterefreshes framework-controlled generated files (for existing projects), including Docker dev files indevelopment/.- Generated writable folders now default to
775permissions (instead of777). vendor/bin/initandvendor/bin/updateskip optional copies when source files are not present, avoiding noisycp: cannot staterrors.
Security defaults
Pff2 now uses safer defaults in the app skeleton:
- Exception details are configurable via
show_exception_detailsand should be disabled in production. - Session/cookie hardening options are available in
app/config/config.user.php:security_cookie_httponlysecurity_cookie_samesitesecurity_cookie_securesecurity_session_strict_mode
- Auth module default hashing is
password_hash/password_verify(legacymd5/sha256remain deprecated compatibility paths).
Upgrade notes
- Mail module has migrated from SwiftMailer to Symfony Mailer.
swiftmailer/swiftmaileris removed from dependencies.- Existing
mail/module.conf.yamlkeys (Type,Host,Port,Username,Password,Encryption) continue to work. sendMail(...)API remains available and returnstrueon success,falseon transport failure.
- If your app still uses auth
passwordType: md5orsha256, plan migration topassword_hash.
Notes on templates
PHP views are the recommended template path for new apps. Smarty templates are considered legacy/best-effort support.
Documentation
Additional details: Wiki
stonedz/pff2 适用场景与选型建议
stonedz/pff2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 619 次下载、GitHub Stars 达 1, 最近一次更新时间为 2014 年 10 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 stonedz/pff2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stonedz/pff2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 stonedz/pff2 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
High-performance, opinionated PHP 8 web framework with O(1) routing, parallel async MySQL, type-safe asset bridge, and React-island frontend
The skeleton application for the Geoffrey agent framework.
Framework used for the Darflen social media project.
Speedrunner package for programming certification exam
Micro-framework PHP enxuto e modular: ORM, Router, Auth, Validation, Security, Container, View, Queue, Console e Schema.
统计信息
- 总下载量: 619
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 5
- 依赖项目数: 9
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-10-01