定制 stonedz/pff2 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

stonedz/pff2

Composer 安装命令:

composer require stonedz/pff2

包简介

A simple yet robust PHP MVC framework

关键字:

README 文档

README

Build Status Coverage Status Latest Stable Version License

Pff2 is a lightweight MVC framework for PHP 8.1+.

Quick start (Composer)

  1. Create a new project directory and add stonedz/pff2 to composer.json.
  2. Install dependencies:
composer install
  1. Scaffold app files:
vendor/bin/init
  1. Your project entry point is generated from resources/site_skeleton/index.php.

Generated development files include:

  • development/compose.yaml
  • development/nginx.conf
  • development/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/init explicitly.
  • vendor/bin/update refreshes framework-controlled generated files (for existing projects), including Docker dev files in development/.
  • Generated writable folders now default to 775 permissions (instead of 777).
  • vendor/bin/init and vendor/bin/update skip optional copies when source files are not present, avoiding noisy cp: cannot stat errors.

Security defaults

Pff2 now uses safer defaults in the app skeleton:

  • Exception details are configurable via show_exception_details and should be disabled in production.
  • Session/cookie hardening options are available in app/config/config.user.php:
    • security_cookie_httponly
    • security_cookie_samesite
    • security_cookie_secure
    • security_session_strict_mode
  • Auth module default hashing is password_hash / password_verify (legacy md5/sha256 remain deprecated compatibility paths).

Upgrade notes

  • Mail module has migrated from SwiftMailer to Symfony Mailer.
    • swiftmailer/swiftmailer is removed from dependencies.
    • Existing mail/module.conf.yaml keys (Type, Host, Port, Username, Password, Encryption) continue to work.
    • sendMail(...) API remains available and returns true on success, false on transport failure.
  • If your app still uses auth passwordType: md5 or sha256, plan migration to password_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 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 619
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 9
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 5
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-01