camoo / framework
CAMOO Framework
Requires
- php: >=7.4.0
- ext-json: *
- ext-mbstring: *
- aura/session: ^2.1
- cakephp/i18n: ^3.8
- cakephp/log: ^3.8
- cakephp/orm: ^3.8
- doctrine/orm: ^2.6
- filp/whoops: ^2.7
- guzzlehttp/guzzle: ^6.2
- hassankhan/config: ^2.1
- http-interop/http-factory-discovery: ^1.5
- ircmaxell/random-lib: ^1.2
- jms/serializer: ^3.9
- middlewares/fast-route: ^v2.0.0
- middlewares/request-handler: ^v2.0.0
- nette/mail: ^v3.0
- nikic/fast-route: ^v1.3.0
- nyholm/psr7: ^1.2
- overclokk/cookie: ^1.0
- squizlabs/php_codesniffer: ^3.2
- symfony/cache: ^4.0
- symfony/console: ^5.1
- symfony/var-dumper: ^4.0
- symfony/yaml: ^4.0
- twig/twig: ^3.0
- vlucas/valitron: ^1.4
Requires (Dev)
- phpunit/phpunit: ^8.4
Suggests
- phpunit/phpunit: Allows automated tests to be run without system-wide install.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-13 21:42:35 UTC
README
Official CAMOO Framework library supporting PHP 8.4+.
Requirement
- PHP 8.4 or higher
- Composer
Docker Setup
You can run Composer and PHPUnit tests inside a PHP 8.4 Docker container using Docker or Docker Compose.
Using Docker Compose
# Install dependencies docker compose run --rm app composer install # Update dependencies docker compose run --rm app composer update # Run PHPUnit tests docker compose run --rm app vendor/bin/phpunit
Using Docker CLI directly
# Build the PHP 8.4 image docker build -t camoo-framework-php84 . # Run test suite docker run --rm -v "$(pwd)":/app -w /app camoo-framework-php84 vendor/bin/phpunit
Development tinker
Applications can add an interactive development REPL with PsySH:
composer require --dev psy/psysh php bin/camoo tinker
The tinker command is optional and is not installed as a production
dependency. It starts PsySH after the application's normal CLI bootstrap.
Authentication and authorization middleware
Applications provide identity and permission logic, while the framework enforces the request pipeline:
use CAMOO\Http\Caller; use CAMOO\Http\Middleware\AuthenticationMiddleware; use CAMOO\Http\Middleware\AuthorizationMiddleware; use Camoo\Http\Curl\Infrastructure\Response; $caller = new Caller(CONFIG, [ new AuthenticationMiddleware( static fn ($request) => $userRepository->fromRequest($request), new Response(statusCode: 401), ), new AuthorizationMiddleware( static fn ($request) => $policy->allows($request->getAttribute('identity'), $request), new Response(statusCode: 403), ), ]); $response = $caller->route();
The authentication middleware stores the resolved identity as the identity
request attribute. Successful login flows should call Session::regenerateId()
before issuing the authenticated response.