phpolar / phpolar
A PHP framework for minimalists
Installs: 555
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 2
pkg:composer/phpolar/phpolar
Requires
- php: >=8.4
- ext-mbstring: *
- laminas/laminas-httphandlerrunner: ^2.9
- php-common-enums/http-method: ^1.0.0
- php-common-enums/http-response-code: ^1.0.0
- php-common-enums/mime-type: ^1.0.0
- php-contrib/authenticator: ^2.0
- php-contrib/response-filter: ^2.0
- php-contrib/validator: ^2.0
- phpolar/http-request-processor: ^1.1
- phpolar/model-resolver: ^1.0
- phpolar/property-injector-contract: ^1.0
- phpolar/representations: ^1.0
- phpolar/storage-driver: ^1.0
- psr/container: ^2.0
- psr/http-message: ^2.0
- psr/http-server-handler: ^1.0
- psr/http-server-middleware: ^1.0
Requires (Dev)
- ext-ast: *
- ext-openssl: *
- phan/phan: ^5.3
- php-coveralls/php-coveralls: ^2.5
- phpmd/phpmd: ^2.13
- phpolar/csrf-protection: ^3.2
- phpolar/http-message-test-utils: ^0.3.0
- phpolar/model: ^1.2.4 || ^2.0.0
- phpolar/pure-php: ^2.0 || ^3.0
- phpstan/phpstan: ^2.0.3
- phpunit/phpunit: ^10 || ^11.4 || ^12
- picocss/pico: ^v2.1.1
- squizlabs/php_codesniffer: ^3.7 || ^4.0
- dev-main
- 8.1.3
- 8.1.2
- 8.1.1
- 8.1.0
- 8.0.2
- 8.0.1
- 8.0.0
- 7.3.0
- 7.2.1
- 7.2.0
- 7.1.0
- 7.0.0
- 6.1.2
- 6.1.1
- 6.1.0
- 6.0.2
- 6.0.1
- 6.0.0
- 5.2.0
- 5.1.0
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.0
- 2.0.2
- 1.6.5
- dev-dependabot/composer/phpstan/phpstan-2.1.31
- dev-dependabot/composer/main/laminas/laminas-httphandlerrunner-2.13.0
- dev-dependabot/composer/main/phpolar/representations-1.0.3
- dev-dependabot/github_actions/all-actions-1893dd32ff
- dev-release-docs
- dev-ci-prod-upgrade-release
- dev-add-coverage-attribute
- dev-add-alpine-support
- dev-releases/php7-4
This package is auto-updated.
Last update: 2025-10-13 03:12:00 UTC
README
PHPolar
A PHP framework for minimalists
Quick Start
Documentation
API
Website
Quick start
# create an example application composer create-project phpolar/skeleton <target-directory>
Objectives
- Provide attributes so that objects can be declaratively configured for clean application development.
- Support using pure PHP templates with automatic XSS mitigation.
- Keep project small. See thresholds
Note For more details see the acceptance tests results
Pure PHP Templates
Example 1
<!DOCTYPE html> <?php (function (Page $view) { ?> <html> // ... <body style="text-align:center"> <h1><?= $view->title ?></h1> <div class="container"> </div> </body> </html> <?php })($this);
Use Attributes to Configure Models
use Phpolar\Phpolar\AbstractModel; class Person extends AbstractModel { #[MaxLength(20)] public string $firstName; #[MaxLength(20)] public string $lastName; #[Column("Residential Address")] #[Label("Residential Address")] #[MaxLength(200)] public string $address1; #[Column("Business Address")] #[Label("Business Address")] #[MaxLength(200)] public string $address2; }
Thresholds
Module | Source Code Size * | Memory Usage | Required |
---|---|---|---|
phpolar | 13 kB | 250 kB | x |
phplar/model | 19 kB | 108 kB | |
TOTAL | 38 kB | 358 kB |
- Note: Does not include comments.