Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
- **BREAKING:** Converted `Request` and `Response` from static facades to instance-based classes (#454):
- Merged `HttpRequest`/`HttpResponse` wrapper layer directly into `Request`/`Response`
- All request/response access now goes through `request()` and `response()` helper functions
- **BREAKING:** Refactored request/response execution flow to explicit `Response` returns (#470, #471, #472, #473):
- Route handlers (controller actions and closure routes) must now return `Quantum\Http\Response`; non-`Response` returns now fail fast
- Response builder methods are now fluent and return `Response`/`self` (`json()`, `html()`, `xml()`, `jsonp()`, `set()`, `setHeader()`, `setStatusCode()`, `redirect()`)
- Redirect helpers now return `Response` (`redirect()`, `redirectWith()`) instead of terminating execution implicitly
- Middleware pipeline is now terminal/return-driven: middleware `apply()` must return `Response`, and middleware chaining no longer returns `[Request, Response]`
- Web adapter flow no longer relies on `stop()` for normal control flow (`OPTIONS`, 404, cache-hit, route dispatch) and now sends a returned `Response`
- Cached view lookup now returns `?Response` directly (`ViewCache::getCachedResponse()`)
- Console adapter normal termination no longer relies on `StopExecutionException`; `start()` now returns explicit exit codes
- **BREAKING:** Removed all static singleton patterns from core services (#381, #382):
- Migrated all 12 first-party factories (Auth, Archive, Cache, Captcha, Cryptor, FileSystem, Lang, Logger, Mailer, Renderer, Session, View) from static instance caches to DI-managed lifetimes
- Migrated service singletons to DI ownership: Cookie, Config, Environment, Server, AssetManager, Csrf, Database, MailTrap, Debugger, ViewCache, ErrorHandler, HookManager, ModuleLoader
Expand Down
26 changes: 22 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,28 +58,46 @@ git checkout -b feature/your-feature-name
3. Run tests:

```bash
vendor/bin/phpunit --stderr
vendor/bin/phpunit
```

4. Run Static Analysis:

```bash
vendor/bin/phpstan analyse --memory-limit=-1
composer phpstan
```

5. Run Code Style Checks

```bash
vendor/bin/php-cs-fixer check
composer cs:check
```

6. Commit and push your branch:

```bash
git commit -m "Add: SoftDeletes trait for models"
git commit -m "[#123] Add SoftDeletes trait for models"
git push origin feature/your-feature-name
```

### Commit Message Style

Use commit subjects that match the repository history:

- Preferred format: `[#<issue-number>] <imperative summary>`
- Keep the summary concise and scoped to one change
- Use imperative mood (`Add`, `Fix`, `Refactor`, `Remove`, `Rename`, etc.)

Examples:

- `[#504] Refactor module route loading into boot stage`
- `[#502] Add post-response request-context cleanup`
- `[#500] Rename QtCommand to CliCommand across framework and templates`

Notes:

- If your change affects behavior, public APIs, or compatibility (especially breaking changes), update `CHANGELOG.md` in the same branch/PR.

7. Open a Pull Request from your fork → `softberg/quantum-php-core`. Describe **what** you changed, **why**, and **how** to test it. Reference any related issues. Always work in a branch, never directly on `main` of your fork.

---
Expand Down
Loading