webfiori/app
Composer 安装命令:
composer create-project webfiori/app
包简介
The default application template for WebFiori Framework.
README 文档
README
The default application template for WebFiori Framework. Use this as a starting point to create new WebFiori projects.
Requirements
- PHP >= 8.1
- Extensions:
json,mbstring,fileinfo,openssl - Composer
Quick Start
composer create-project webfiori/app my-site
cd my-site
php -S localhost:8080 -t public
Then open http://localhost:8080 in your browser.
Project Structure
├── public/ # Web server document root
│ ├── index.php # Application entry point
│ ├── .htaccess # Apache rewrite rules
│ ├── web.config # IIS rewrite rules
│ └── assets/ # Static files (CSS, JS, images)
├── App/ # Application source code
│ ├── Apis/ # REST API services
│ ├── Commands/ # Custom CLI commands
│ ├── Config/ # Configuration files (auto-generated)
│ ├── Database/ # Migrations, seeders, tables
│ ├── Domain/ # Domain entities
│ ├── Health/ # Health check implementations
│ ├── Ini/ # Initialization and route definitions
│ ├── Langs/ # Internationalization files
│ ├── Middleware/ # Custom middleware
│ ├── Pages/ # Page controllers and views
│ ├── Policies/ # ABAC policy classes
│ ├── Storage/ # Sessions, logs, uploads (not web-accessible)
│ └── Tasks/ # Background jobs and scheduled tasks
├── tests/ # PHPUnit tests
├── composer.json
├── webfiori # CLI entry point (Linux/macOS)
└── webfiori.bat # CLI entry point (Windows)
Customizing the App Directory
By default, the framework uses App/ as the application root directory. To change this, edit the first parameter of App::initiate() in public/index.php:
App::initiate('MyApp', 'public', __DIR__);
Reasons you might want to rename it:
- Gives your project a distinct identity instead of a generic
App/folder. - Avoids naming conflicts if you're integrating WebFiori into an existing project that already has an
App/directory. - Makes it easier to distinguish between multiple WebFiori-based projects in the same workspace.
Running Tests
composer test
Code Style
This project uses PHP CS Fixer for code style enforcement.
composer cs-check # Check for violations (dry run) composer cs-fix # Auto-fix violations
CLI Usage
WebFiori includes a CLI tool for common tasks:
# Linux/macOS php webfiori # Windows webfiori.bat
Common commands:
php webfiori create:service # Create a new API service php webfiori create:middleware # Create a new middleware php webfiori create:migration # Create a database migration php webfiori create:command # Create a custom CLI command php webfiori migrations:run # Run pending migrations php webfiori migrations:step # Interactively apply/skip migrations php webfiori routes:cache # Build route cache for production php webfiori services:list # List auto-discovered API services php webfiori help # Show all available commands
Documentation
Contributing
For information on how to contribute, see the contribution guide.
Reporting Issues
- For bugs and feature requests, open an issue.
- For security vulnerabilities, please email ibrahim@webfiori.com.
License
This project is licensed under the MIT License.
webfiori/app 适用场景与选型建议
webfiori/app 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12.03k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2021 年 05 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 webfiori/app 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 webfiori/app 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2021-05-05