{"id":25663687,"url":"https://github.com/bowphp/framework","last_synced_at":"2026-04-05T14:04:16.155Z","repository":{"id":37270096,"uuid":"140084325","full_name":"bowphp/framework","owner":"bowphp","description":"The Bow Framework","archived":false,"fork":false,"pushed_at":"2026-01-19T01:28:02.000Z","size":3376,"stargazers_count":60,"open_issues_count":7,"forks_count":18,"subscribers_count":5,"default_branch":"5.x","last_synced_at":"2026-01-19T01:36:02.832Z","etag":null,"topics":["bow","framework","php","php-framework"],"latest_commit_sha":null,"homepage":"https://bowphp.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bowphp.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["papac"],"open_collective":"bowphp","custom":["https://www.buymeacoffee.com/iOLqZ3h"]}},"created_at":"2018-07-07T12:55:46.000Z","updated_at":"2026-01-19T01:28:03.000Z","dependencies_parsed_at":"2023-09-22T21:27:09.449Z","dependency_job_id":"fd463232-28e4-4a53-9a5a-e986e1a3ead4","html_url":"https://github.com/bowphp/framework","commit_stats":{"total_commits":1835,"total_committers":9,"mean_commits":"203.88888888888889","dds":0.03923705722070847,"last_synced_commit":"162b25c2ab2b756ef69885be3774aefe60209128"},"previous_names":[],"tags_count":72,"template":false,"template_full_name":null,"purl":"pkg:github/bowphp/framework","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowphp%2Fframework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowphp%2Fframework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowphp%2Fframework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowphp%2Fframework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bowphp","download_url":"https://codeload.github.com/bowphp/framework/tar.gz/refs/heads/5.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bowphp%2Fframework/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28774301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T09:42:00.929Z","status":"ssl_error","status_checked_at":"2026-01-26T09:42:00.591Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bow","framework","php","php-framework"],"created_at":"2025-02-24T05:18:08.906Z","updated_at":"2026-01-26T10:15:21.530Z","avatar_url":"https://github.com/bowphp.png","language":"PHP","readme":"# Bow Framework\n\n[![docs](https://img.shields.io/badge/docs-read%20docs-blue.svg?style=flat-square)](https://github.com/bowphp/docs)\n[![version](https://img.shields.io/packagist/v/bowphp/framework.svg?style=flat-square)](https://packagist.org/packages/bowphp/framework)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/bowphp/framework/blob/main/LICENSE)\n[![Build Status](https://img.shields.io/travis/bowphp/framework/main.svg?style=flat-square)](https://travis-ci.org/bowphp/framework)\n![Build Status](https://github.com/bowphp/framework/actions/workflows/tests.yml/badge.svg)\n\n\u003e A lightweight, modern PHP framework designed for building web applications with clean architecture and modular design.\n\nTo use this package, please create an application from this package [bowphp/app](https://github.com/bowphp/app)\n\n## Overview\n\nBow Framework is a lightweight PHP framework created by Franck DAKIA that emphasizes simplicity, performance, and developer experience. It provides a comprehensive set of tools for building modern web applications with clean, maintainable code.\n\n**Requirements:**\n\n- PHP ^8.1+\n- Composer\n- Extensions: ext-ftp, ext-openssl, ext-pcntl, ext-readline, ext-pdo\n\n**Key Highlights:**\n\n- Modern PHP 8.1+ features (union types, attributes, named arguments)\n- Modular architecture with 20+ independent components\n- Lightweight and fast with minimal dependencies\n- Full-stack framework with everything you need\n- Well-tested with 1,110+ tests and 94% success rate\n- Active development with regular updates\n\n## Core Features\n\n### Database \u0026 ORM\n\n- **Barry ORM**: Lightweight ActiveRecord-style ORM\n- **Query Builder**: Fluent, expressive database queries\n- **Multi-database**: MySQL, PostgreSQL, SQLite support\n- **Migrations**: Version control for database schema\n- **Relationships**: BelongsTo, HasMany, ManyToMany\n- **Pagination**: Built-in pagination support\n\n### Routing System\n\n- Simple, expressive routing syntax\n- RESTful resource routing with automatic CRUD operations\n- Route naming for easy URL generation\n- Route parameters with regex constraints\n- Middleware support per route or route group\n- Route prefix support for grouping\n\n### Mail System\n\n- Multiple adapters: SMTP, AWS SES, Native PHP mail\n- RFC-compliant SMTP implementation\n- Email parsing with \"Name \u003cname@email.com\u003e\" format support\n- File attachments\n- Queue integration for asynchronous sending\n\n### Queue System\n\n- Multiple backends: Beanstalkd, Redis, SQS, Database, Sync\n- Object-oriented job definitions\n- Event-driven job queuing\n- Automatic retry logic with exponential backoff\n- Mail queue support\n\n### Storage System\n\n- Multi-driver: Local, FTP, AWS S3\n- Dynamic storage adapter selection\n- File operations: upload, download, copy, move, delete\n- Directory management\n- Efficient stream handling for large files\n\n### Security Features\n\n- XSS protection with automatic filtering\n- CSRF token-based validation\n- Data encryption utilities\n- Password hashing (Bcrypt/Argon2)\n- Native authentication system with guards\n\n### Additional Features\n\n- **Cache**: Filesystem, Redis, Database caching\n- **Events**: Event management and dispatching\n- **Session**: User session management\n- **Validation**: Comprehensive form and data validation\n- **Console**: CLI commands and generators\n- **Testing**: PHPUnit integration with test utilities\n- **Translation**: Internationalization support\n- **View Rendering**: Tintin template engine integration\n- **Middleware**: HTTP middleware stack\n- **Container**: Dependency injection with auto-resolution\n\n## Architecture\n\n### Request Lifecycle\n\n```mermaid\nflowchart LR\n    Client --\u003e Request\n    Request --\u003e Kernel\n    Kernel --\u003e Router\n    Router --\u003e Middleware\n    Middleware --\u003e Controller\n    Controller --\u003e Model[Model\u003cbr/\u003eBarry ORM]\n    Model --\u003e Database\n    Database --\u003e View\n    Database --\u003e Response\n    View --\u003e Response\n    Response --\u003e Client\n```\n\n1. **Request arrives** at entry point\n2. **Kernel loads** configurations from `config/`\n3. **Router matches** URL to controller/action\n4. **Middleware processes** request (auth, validation, etc.)\n5. **Controller executes** business logic\n6. **Model interacts** with database\n7. **View renders** response (HTML/JSON)\n8. **Response sent** back to client\n\n### Design Patterns\n\nThe framework implements several design patterns:\n\n- **Singleton**: Application, Configuration loaders\n- **Factory**: Database connections, Mail adapters\n- **Strategy**: Storage drivers, Queue backends\n- **Observer**: Event system\n- **Middleware Pattern**: HTTP request pipeline\n- **Repository Pattern**: Database abstraction\n- **Service Container**: Dependency injection\n- **Facade Pattern**: Helper functions\n\n## Project Structure\n\nThe project is organized into the following directories, each representing an independent module:\n\n- **src/**: Source code for the Bow Framework.\n  - **Application/**: Main application logic and configuration.\n  - **Auth/**: Authentication and authorization management.\n  - **Cache/**: Caching mechanisms.\n  - **Configuration/**: Configuration settings management.\n  - **Console/**: Console commands and utilities.\n  - **Container/**: Dependency injection and service container.\n  - **Contracts/**: Interfaces and contracts for various components.\n  - **Database/**: Database connections and ORM.\n  - **Event/**: Event management and dispatching.\n  - **Http/**: HTTP requests and responses management.\n  - **Mail/**: Email sending and configuration.\n  - **Notifier/**: Notifications.\n  - **Middleware/**: Middleware classes for request handling.\n  - **Queue/**: Job queues and background processing.\n  - **Router/**: HTTP request routing.\n  - **Security/**: Security features like encryption and hashing.\n  - **Session/**: User session management.\n  - **Storage/**: File storage and retrieval.\n  - **Support/**: Utility classes and helper functions.\n  - **Testing/**: Unit testing classes and utilities.\n  - **Translate/**: Translation and localization.\n  - **Validation/**: Data validation.\n  - **View/**: View rendering and templating.\n- **tests/**: Unit tests for the project.\n\n## Quick Start\n\n### Installation\n\n```bash\n# Create a new Bow application\ncomposer create-project bowphp/app my-app\n\n# Navigate to the project\ncd my-app\n\n# Start the development server\nphp bow serve\n```\n\n### Basic Usage\n\n**Define Routes:**\n\n```php\n// routes/app.php\n$route-\u003eget('/', function () {\n    return 'Hello World!';\n});\n\n$route-\u003eget('/users/:id', function ($id) {\n    return \"User ID: $id\";\n});\n\n// RESTful resource routing\n$route-\u003erest('/api/posts', PostController::class);\n```\n\n**Create a Controller:**\n\n```php\nnamespace App\\Controllers;\n\nuse Bow\\Http\\Request;\nuse App\\Models\\Post;\n\nclass PostController\n{\n    public function index()\n    {\n        return Post::all();\n    }\n\n    public function store(Request $request)\n    {\n        return Post::create($request-\u003eall());\n    }\n}\n```\n\n**Work with Database:**\n\n```php\nuse App\\Models\\User;\n\n// Using Barry ORM\n$user = User::find(1);\n$users = User::where('active', true)-\u003eget();\n\n// Using Query Builder\n$users = Database::table('users')\n    -\u003ewhere('role', 'admin')\n    -\u003eorderBy('created_at', 'desc')\n    -\u003epaginate(10);\n```\n\n## Code Quality \u0026 Testing\n\n### Current Status (v5.1.7)\n\n- **Test Suite**: 1,110+ tests with 2,498+ assertions\n- **Success Rate**: 94% (remaining failures are external service dependencies)\n- **Code Style**: PSR-12 compliant\n- **PHP Version**: 8.1+ with modern features\n\n### Recent Improvements\n\nThe framework is actively maintained with recent major refactoring:\n\n- **SMTP Adapter**: Complete rewrite (8 → 21 methods, RFC-compliant)  \n- **FTP Service**: Enhanced with retry logic and better error handling  \n- **Queue System**: Graceful logger fallback  \n- **Test Quality**: 39% fewer errors, 70% fewer failures  \n- **PHP 8.x**: Modernized code style (arrow functions, union types)\n\nSee [CHANGELOG.md](CHANGELOG.md) for full details.\n\n## Use Cases\n\n**Ideal For:**\n\n- REST APIs and microservices\n- Web applications with complex database requirements\n- Applications requiring file storage (S3, FTP)\n- Projects needing queue/job processing\n- Multi-tenant applications\n- Internationalized applications\n\n## Ecosystem\n\nThe Bow ecosystem includes several packages:\n\n- **[bowphp/app](https://github.com/bowphp/app)**: Application skeleton\n- **[bowphp/tintin](https://github.com/bowphp/tintin)**: Template engine\n- **[bowphp/policier](https://github.com/bowphp/policier)**: Authentication \u0026 authorization\n- **[bowphp/payment](https://github.com/bowphp/payment)**: Payment gateway integration\n\n## Contributing\n\nThank you for considering contributing to Bow Framework! The contribution guide is in the framework documentation.\n\n- [Franck DAKIA](https://github.com/papac)\n- [Thank's collaborators](https://github.com/bowphp/framework/graphs/contributors)\n\n### Contribution Guidelines\n\nWe welcome contributions from the community! To contribute to the project, please follow these steps:\n\n1. Fork the project and clone it to your local machine.\n2. Create a new branch for your changes.\n3. Make your changes and commit them.\n4. Push your changes to your fork and create a pull request.\n\nFor more detailed information, refer to the `CONTRIBUTING.md` file.\n\n## Documentation\n\n- [Official Documentation](https://bowphp.com)\n- [API Reference](https://bowphp.com/api)\n- [Tutorials \u0026 Guides](https://bowphp.com/docs)\n\n## Support \u0026 Community\n\n### Get Help\n\n- **Documentation**: [https://bowphp.com](https://bowphp.com)\n- **Issues**: [GitHub Issues](https://github.com/bowphp/framework/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/bowphp/framework/discussions)\n\n### Stay Updated\n\n- **Twitter**: [@papacdev](https://twitter.com/papacdev)\n- **GitHub**: [bowphp](https://github.com/bowphp)\n\n## License\n\nThe Bow Framework is open-source software licensed under the [MIT license](LICENSE).\n\n## Contact\n\n- Email: [papac@bowphp.com](mailto:papac@bowphp.com)  \n- Twitter: [@papacdev](https://twitter.com/papacdev)\n\nFor bug reports, please use [GitHub Issues](https://github.com/bowphp/framework/issues).  \n\n---\n\n**Made with love by the Bow Framework Team**\n","funding_links":["https://github.com/sponsors/papac","https://opencollective.com/bowphp","https://www.buymeacoffee.com/iOLqZ3h"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowphp%2Fframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbowphp%2Fframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbowphp%2Fframework/lists"}