tinymvc / tinycore
Core Classes of TinyMVC Framework
Requires
- php: >=8.2
- doctrine/inflector: ^2.0
Requires (Dev)
None
Suggests
- ext-curl: Required for the HTTP client and S3 disks.
- ext-fileinfo: Required for upload and file MIME detection.
- ext-gd: Required for image manipulation.
- ext-pdo_sqlite: Required when the database connection uses SQLite.
- ext-redis: Required for Redis cache, lock, session, and queue drivers.
- ext-simplexml: Required for listing and copying files on S3-compatible disks.
- doctrine/inflector: Required to use Str::plural() and Stringable::plural() (^2.0).
- league/commonmark: Required to use Str::markdown() and Stringable::markdown() (^2.6).
- phpmailer/phpmailer: Required for the Mail utility and Mail facade (^6.9).
- ramsey/uuid: Required to use Str::uuid() (^4.7).
- voku/portable-ascii: Required for Str::ascii(), Str::slug(), Str::isAscii(), and ASCII validation rules (^2.0).
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v4.0.7
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.3.37
- v3.3.36
- v3.3.35
- v3.3.34
- v3.3.33
- v3.3.32
- v3.3.31
- v3.3.30
- v3.3.29
- v3.3.28
- v3.3.27
- v3.3.26
- v3.3.25
- v3.3.24
- v3.3.23
- v3.3.22
- v3.3.21
- v3.3.20
- v3.3.19
- v3.3.18
- v3.3.17
- v3.3.16
- v3.3.15
- v3.3.14
- v3.3.13
- v3.3.12
- v3.3.11
- v3.3.10
- v3.3.9
- v3.3.8
- v3.3.7
- v3.3.6
- v3.3.5
- v3.3.4
- v3.3.3
- v3.3.2
- v3.3.1
- v3.3.0
- v3.2.3
- v3.2.2
- v3.2.1
- v3.2.0
- v3.1.9
- v3.1.8
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.20
- v3.0.19
- v3.0.18
- v3.0.17
- v3.0.16
- v3.0.15
- v3.0.14
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.3.8
- v2.3.7
- v2.3.6
- v2.3.5
- v2.3.4
- v2.3.3
- v2.3.2
- v2.3.1
- v2.3.0
- v2.2.0
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
This package is auto-updated.
Last update: 2026-10-06 15:42:03 UTC
README
The Backbone/Core Classes and Functionalities for TinyMvc/Spark Framework.
Introduction
TinyCore/Spark is the backbone of the TinyMvc Framework, providing essential core classes, utility functions, and helper methods to streamline for simplified web development.
Tests
composer install composer test composer test -- --testsuite Feature composer test -- --testsuite Unit composer test -- --filter HttpTransportLifecycle
The suite uses TinyCore's own Spark\Testing\Runner, ApplicationTestCase, and assertions. Its scope is the HTTP request lifecycle:
| Area | Coverage |
|---|---|
| Request construction | Query and body input, write methods, method overrides, malformed input, CGI content headers, and request identity through helpers and dependency injection |
| Application boot | Provider registration and boot order, boot failures and retries, and request-scoped service resets |
| Dispatch | Route parameters, fallback responses, middleware ordering, exclusions, short circuits, and early responses |
| Response preparation | Return-value normalization, media types, header casing, callback ordering, recursion, repeated preparation, and reuse across requests |
| Exceptions | Built-in HTTP mappings, HTML/JSON negotiation, validation redirects, custom handlers, unexpected failures, and recovery on the next request |
| Termination | Deferred callback order and injection, nested callbacks, error reporting, repeated termination, and lifecycle events |
| HTTP transport | Real JSON/form bodies, custom request bindings in run(), emitted headers and bodies, HEAD, bodyless statuses, redirects, early exits, and shutdown callbacks |
Each feature test uses an isolated application and temporary storage. The transport tests start and stop a local PHP development server on an OS-selected loopback port; they require proc_open and permission to open local sockets. They read actual HTTP bytes rather than passing the result through response preparation again. No external server or database is required.
Run composer test -- --filter RequestLifecycle to select a class, or use --filter with part of a test method name. composer test -- --list-tests lists the available cases. The transport tests exercise PHP's built-in server; FastCGI-specific flushing remains dependent on the deployment environment.