Download the PHP package yii1x/active-record without Composer
On this page you can find all versions of the php package yii1x/active-record. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download yii1x/active-record
More information about yii1x/active-record
Files in yii1x/active-record
Package active-record
Short Description Yii 1.1 Active Record, extracted and modernized for PHP 8.4+
License
Informations about the package active-record
Yii1x Active Record
Yii 1.1 Active Record, extracted and modernized for PHP 8.4+.
Familiar API. Zero framework lock-in.
What is it?
This package is the Active Record component from Yii 1.1, extracted and refactored to run on PHP 8.4+ without requiring the full Yii framework.
- ✅ Same API you know from Yii 1
- ✅ PHP 8 types and attributes support
- ✅ No
Yii::app()dependency - ✅ Works with any PSR-11 compatible container
Requirements
- PHP ≥ 8.4
- PSR-11
ContainerInterface(required) - Optional PSR dependencies (if used in your app):
Psr\Log\LoggerInterfacePsr\SimpleCache\CacheInterfacePsr\EventDispatcher\EventDispatcherInterface
Installation
Bootstrap
Before using any model, initialize the ORM context once per application lifecycle:
Where $container is your PSR-11 container.
The container must be able to return a configured database connection instance by name (e.g., 'db' or 'yourDbName').
This can be:
- An instance of
Yii1x\ActiveRecord\Db\DbConnection - Any class extending
DbConnection
Example configuration (from Yii 3):
Then in your models, specify which connection to use:
Define a Model
Use PHP 8 attributes instead of class properties:
Querying (familiar Yii 1 style)
Framework Agnostic
Works with any PSR-11 container (as shown in the Yii 3 example above).
No Yii framework required. No global state. Just Active Record.
All versions of active-record with dependencies
yii1x/validator Version ^0.1.0
psr/container Version ^2.0
psr/log Version ^3.0
psr/simple-cache Version ^3.0
psr/event-dispatcher Version ^1.0