Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b5884fd
fix: handle unloaded environment in app_env and replace deprecated do…
gessyken Jan 2, 2026
11b8094
fix: resolve deprecation warnings and improve test stability
gessyken Jan 2, 2026
ada1bed
feat(router): add php 8 attributes support for route definition
gessyken Jan 2, 2026
ad04f56
fix(config): restore env error visibility for observability
gessyken Jan 3, 2026
457f97b
Update CHANGELOG
papac Apr 4, 2026
bebb231
Fix query builder
papac Apr 5, 2026
93a2f1c
Merge pull request #377 from bowphp/refactor/code-base
papac Apr 5, 2026
ca1b082
Merge pull request #378 from bowphp/5.x-update-changelog
papac Apr 5, 2026
7530ca7
Update CHANGELOG
papac Apr 5, 2026
e1e7a95
Merge pull request #379 from bowphp/5.x-update-changelog
papac Apr 5, 2026
3135e75
Resolve confict
papac Apr 7, 2026
c6932c9
Fix many bugs
papac Apr 7, 2026
012c5c8
Merge pull request #380 from bowphp/refactor/code-base
papac Apr 7, 2026
d287418
Update CHANGELOG
papac Apr 7, 2026
fab5efe
Fix data binding
papac Apr 7, 2026
3a9ff1e
Merge pull request #381 from bowphp/refactor/code-base
papac Apr 7, 2026
7ebff58
Merge pull request #382 from bowphp/5.x-update-changelog
papac Apr 7, 2026
21c085d
Add transactional migration
papac Apr 9, 2026
e0a8f06
Code formatting
papac Apr 7, 2026
99dbc85
feat(database): Add lock for update and shared for update
papac May 8, 2026
3a80e37
Merge pull request #383 from bowphp/refactor/code-base
papac May 8, 2026
b674ccc
Update CHANGELOG
papac May 8, 2026
40a3645
Fix migration
papac May 12, 2026
9c5a98c
Merge pull request #384 from bowphp/refactor/code-base
papac May 12, 2026
6a89ebd
Merge pull request #385 from bowphp/5.x-update-changelog
papac May 12, 2026
6643e90
Update CHANGELOG
papac May 12, 2026
892fb24
Fix pagination
papac May 13, 2026
c3f3125
Merge pull request #386 from bowphp/refactor/code-base
papac May 13, 2026
0f40062
Merge pull request #387 from bowphp/5.x-update-changelog
papac May 13, 2026
f940f69
Fix push the right queue name
papac May 16, 2026
790d37c
Merge pull request #388 from bowphp/refactor/code-base
papac May 16, 2026
e6c0ae8
Update CHANGELOG
papac May 16, 2026
115ec7f
Fix retrieve data by queue
papac May 17, 2026
e4acc19
Merge pull request #389 from bowphp/5.x-update-changelog
papac May 17, 2026
7f16ea7
Merge pull request #390 from bowphp/refactor/code-base
papac May 17, 2026
21b369e
Update CHANGELOG
papac May 17, 2026
b96bf47
Fix database direct statement
papac May 19, 2026
5c3e8f9
Merge pull request #391 from bowphp/5.x-update-changelog
papac May 19, 2026
3788777
Merge pull request #392 from bowphp/refactor/code-base
papac May 19, 2026
1be84dd
Fix regex
papac May 19, 2026
130960a
Merge pull request #393 from bowphp/refactor/code-base
papac May 19, 2026
0f70e1d
Merge branch '5.x' into 5.x
papac May 20, 2026
823b445
Merge pull request #349 from gessyken/5.x
papac May 20, 2026
e8d06a5
feat(console): refactoring console help messages
papac May 20, 2026
90bb0cb
feat(console): Add customer command
papac May 20, 2026
64c3009
feat(console): write generated customet stub
papac May 20, 2026
41e9f5e
Many bugs fixed and new features added
papac May 21, 2026
b77093c
Merge pull request #394 from bowphp/refactor/code-base
papac May 21, 2026
35eb6e0
Update readme
papac May 21, 2026
b725520
Merge pull request #395 from bowphp/refactor/code-base
papac May 21, 2026
3c3c134
Update CHANGELOG
papac May 21, 2026
ecfbb32
fix(route) when load the middlware we lose the route chain
papac May 21, 2026
808987c
Merge pull request #398 from bowphp/5.x-update-changelog
papac May 21, 2026
331f59b
Merge pull request #397 from bowphp/refactor/code-base
papac May 21, 2026
4b94d0f
Update ROADMAP.md
papac May 25, 2026
8b9ea8d
Merge pull request #399 from bowphp/papac-patch-1
papac May 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ composer.lock
.phpunit.result.cache
bob
.phpunit.cache
.vscode/
.vscode
.idea
86 changes: 86 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,84 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 5.3.0 - 2026-05-21

### What's Changed

* feat(router): add php 8 attributes support for route definition by @gessyken in https://github.com/bowphp/framework/pull/349
* Update console and adding new features and fix many issues by @papac in https://github.com/bowphp/framework/pull/394
* Update readme by @papac in https://github.com/bowphp/framework/pull/395

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.991...5.3.0

## 5.2.990 - 2026-05-17

### What's Changed

* Fix retrieve data by queue by @papac in https://github.com/bowphp/framework/pull/390

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.98...5.2.990

## 5.2.98 - 2026-05-16

### What's Changed

* Fix push the right queue name by @papac in https://github.com/bowphp/framework/pull/388

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.97...5.2.98

## 5.2.96 - 2026-05-12

### What's Changed

* Fix migration by @papac in https://github.com/bowphp/framework/pull/384

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.95...5.2.96

### What's Changed

* Fix migration by @papac in https://github.com/bowphp/framework/pull/384
* Update CHANGELOG by @papac in https://github.com/bowphp/framework/pull/385

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.95...5.2.96

## 5.2.95 - 2026-05-08

### What's Changed

* Fix data binding by @papac in https://github.com/bowphp/framework/pull/381
* Update CHANGELOG by @papac in https://github.com/bowphp/framework/pull/382
* Optimize database query performance by @papac in https://github.com/bowphp/framework/pull/383

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.94...5.2.95

## 5.2.94 - 2026-04-07

### What's Changed

* Update CHANGELOG by @papac in https://github.com/bowphp/framework/pull/379
* Fix many issues by @papac in https://github.com/bowphp/framework/pull/380

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.93...5.2.94

## 5.2.93 - 2026-04-05

### What's Changed

* Fix query builder by @papac in https://github.com/bowphp/framework/pull/377
* Update CHANGELOG by @papac in https://github.com/bowphp/framework/pull/378

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.92...5.2.93

## 5.2.92 - 2026-04-04

### What's Changed

* Update CHANGELOG by @papac in https://github.com/bowphp/framework/pull/374
* Add query and post method to request and fix nullable validator by @papac in https://github.com/bowphp/framework/pull/375

**Full Changelog**: https://github.com/bowphp/framework/compare/5.2.91...5.2.92

## 5.2.91 - 2026-03-28

### What's Changed
Expand Down Expand Up @@ -174,6 +252,14 @@ Database::transaction(fn() => $user->update(['name' => '']));











```
Ref: #255

Expand Down
263 changes: 263 additions & 0 deletions ROADMAP.md

Large diffs are not rendered by default.

56 changes: 33 additions & 23 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

[![docs](https://img.shields.io/badge/docs-read%20docs-blue.svg?style=flat-square)](https://github.com/bowphp/docs)
[![version](https://img.shields.io/packagist/v/bowphp/framework.svg?style=flat-square)](https://packagist.org/packages/bowphp/framework)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/bowphp/framework/blob/main/LICENSE)
[![Build Status](https://img.shields.io/travis/bowphp/framework/main.svg?style=flat-square)](https://travis-ci.org/bowphp/framework)
[![license](https://img.shields.io/github/license/bowphp/framework.svg?style=flat-square)](https://github.com/bowphp/framework/blob/main/LICENSE)
![Build Status](https://github.com/bowphp/framework/actions/workflows/tests.yml/badge.svg)

> A lightweight, modern PHP framework designed for building web applications with clean architecture and modular design.
Expand All @@ -26,7 +25,7 @@ Bow Framework is a lightweight PHP framework created by Franck DAKIA that emphas
- Modular architecture with 20+ independent components
- Lightweight and fast with minimal dependencies
- Full-stack framework with everything you need
- Well-tested with 1,110+ tests and 94% success rate
- Well-tested: 1,600+ tests, 3,300+ assertions, zero logical failures
- Active development with regular updates

## Core Features
Expand All @@ -37,17 +36,20 @@ Bow Framework is a lightweight PHP framework created by Franck DAKIA that emphas
- **Query Builder**: Fluent, expressive database queries
- **Multi-database**: MySQL, PostgreSQL, SQLite support
- **Migrations**: Version control for database schema
- **Relationships**: BelongsTo, HasMany, ManyToMany
- **Relationships**: HasOne, HasMany, BelongsTo, BelongsToMany
- **Soft delete**: `SoftDelete` trait with `delete`/`restore`/`forceDelete` and `withTrashed`/`onlyTrashed` query scopes
- **Pagination**: Built-in pagination support

### Routing System

- Simple, expressive routing syntax
- Simple, expressive routing syntax (`$app->get`, `$app->post`, ...)
- **PHP 8 attribute routing**: `#[Controller]`, `#[Get]`, `#[Post]`, `#[Put]`, `#[Patch]`, `#[Delete]`, `#[Options]`, `#[Route]`
- RESTful resource routing with automatic CRUD operations
- Route naming for easy URL generation
- Route parameters with regex constraints
- Middleware support per route or route group
- Route prefix support for grouping
- Middleware support per route or route group, with `name:arg` parameter syntax
- Route prefix and domain grouping
- Custom HTTP error handlers via `code()`

### Mail System

Expand Down Expand Up @@ -186,16 +188,19 @@ php bow serve

```php
// routes/app.php
$route->get('/', function () {
$app->get('/', function () {
return 'Hello World!';
});

$route->get('/users/:id', function ($id) {
$app->get('/users/:id', function ($id) {
return "User ID: $id";
});

// RESTful resource routing
$route->rest('/api/posts', PostController::class);
$app->rest('/api/posts', 'PostController');

// Attribute-based controllers (no central route file required)
$app->register(\App\Controllers\PostController::class);
```

**Create a Controller:**
Expand All @@ -215,7 +220,10 @@ class PostController

public function store(Request $request)
{
return Post::create($request->all());
$post = Post::create($request->all());
$post->persist();

return $post;
}
}
```
Expand All @@ -224,12 +232,13 @@ class PostController

```php
use App\Models\User;
use Bow\Database\Database;

// Using Barry ORM
$user = User::find(1);
$user = User::retrieve(1);
$users = User::where('active', true)->get();

// Using Query Builder
// Using the Query Builder
$users = Database::table('users')
->where('role', 'admin')
->orderBy('created_at', 'desc')
Expand All @@ -238,21 +247,22 @@ $users = Database::table('users')

## Code Quality & Testing

### Current Status (v5.1.7)
### Current Status

- **Test Suite**: 1,110+ tests with 2,498+ assertions
- **Success Rate**: 94% (remaining failures are external service dependencies)
- **Code Style**: PSR-12 compliant
- **Test Suite**: 1,600+ tests with 3,300+ assertions
- **Logical failures**: 0 — the only remaining errors require external services (FTP server, S3 endpoint) and are skipped by default
- **Code Style**: PSR-12 (`composer phpcs` to check, `composer phpcbf` to fix)
- **Static analysis**: PHPStan in `require-dev` (`vendor/bin/phpstan analyse src`)
- **PHP Version**: 8.1+ with modern features

### Recent Improvements

The framework is actively maintained with recent major refactoring:

- **SMTP Adapter**: Complete rewrite (8 → 21 methods, RFC-compliant)
- **FTP Service**: Enhanced with retry logic and better error handling
- **Queue System**: Graceful logger fallback
- **Test Quality**: 39% fewer errors, 70% fewer failures
- **SMTP Adapter**: Complete rewrite (8 → 21 methods, RFC-compliant)
- **FTP Service**: Enhanced with retry logic and better error handling
- **Queue System**: Graceful logger fallback
- **Attribute routing**: PHP 8 `#[Controller]` / `#[Get]` / `#[Post]` / ... wiring via `$app->register(...)`
- **Barry soft delete**: trait + query scopes (`withTrashed`, `onlyTrashed`, `withoutTrashed`)
- **Router**: instance-level route storage (no more cross-test leakage)
- **PHP 8.x**: Modernized code style (arrow functions, union types)

See [CHANGELOG.md](CHANGELOG.md) for full details.
Expand Down
24 changes: 21 additions & 3 deletions src/Console/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
use Bow\Console\Command\Generator\GenerateEventListenerCommand;
use Bow\Console\Command\Generator\GenerateTaskCommand;
use Bow\Console\Command\Generator\GenerateRouterResourceCommand;
use Bow\Console\Exception\ConsoleException;

class Command extends AbstractCommand
{
Expand All @@ -40,7 +41,7 @@ class Command extends AbstractCommand
*
* @var array
*/
private array $commands = [
protected static array $commands = [
"clear" => ClearCommand::class,
"seed:file" => SeederCommand::class,
"seed:all" => SeederCommand::class,
Expand Down Expand Up @@ -85,7 +86,24 @@ class Command extends AbstractCommand
*/
public function getCommands(): array
{
return $this->commands;
return static::$commands;
}

/**
* Push new command
*
* @param array $commands
* @return void
*/
public static function pushCommand(array $commands)
{
foreach ($commands as $key => $command) {
if (isset(static::$commands[$key])) {
throw new ConsoleException("$key command already exists");
}

static::$commands[$key] = $command;
}
}

/**
Expand All @@ -99,7 +117,7 @@ public function getCommands(): array
*/
public function call(string $command, string $action, ...$rest): mixed
{
$class = $this->commands[$command] ?? null;
$class = static::$commands[$command] ?? null;

if (is_null($class)) {
$this->throwFailsCommand("The command $command not found !");
Expand Down
Loading
Loading