camoo / framework
CAMOO Framework
Requires
- php: >=8.4
- ext-json: *
- ext-mbstring: *
- aura/session: ^2.1
- cakephp/i18n: ^3.8 || ^4.0 || ^5.0
- cakephp/log: ^3.8 || ^4.0 || ^5.0
- cakephp/orm: ^3.8 || ^4.0 || ^5.0
- camoo/cache: ^2.1
- camoo/config: ^1.0
- camoo/config-interop: ^0.1.0
- camoo/curl-http-client: ^1.0
- camoo/inflector: ^1.1
- doctrine/orm: ^2.6 || ^3.0
- filp/whoops: ^2.7
- guzzlehttp/guzzle: ^7.5
- 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
- ray/compiler: ^1.16
- ray/di: ^2.15
- squizlabs/php_codesniffer: ^3.2
- symfony/cache: ^5.3 || ^6.0 || ^7.0
- symfony/console: ^5.1 || ^6.0 || ^7.0
- symfony/var-dumper: ^4.0 || ^5.0 || ^6.0 || ^7.0
- symfony/yaml: ^4.0 || ^5.0 || ^6.0 || ^7.0
- twig/twig: ^v3.5.0
- vlucas/valitron: ^1.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^9.6 || ^10.5 || ^11.0
- rector/rector: ^2.0
Suggests
- phpunit/phpunit: Allows automated tests to be run without system-wide install.
- psy/psysh: Provides the optional development tinker REPL command.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-27 17:59:13 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.