opus-online / yii2-state
Persistent state extension for Yii2 modules and applications
This package's canonical repository appears to be gone and the package has been frozen as a result.
Installs: 44 308
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: *
Requires (Dev)
- phpunit/phpunit: 4.2.*
This package is not auto-updated.
Last update: 2024-01-15 23:30:59 UTC
README
Persistent state extension for Yii2 modules and applications
Provides an application component for storing persistent state information (key-value pairs) in the database.
Installation
Run migrations from your project
php yii migrate --interactive=0 --migrationPath=@vendor/opus-online/yii2-state/migrations
Add yii2-state as a system component in your common main.php
'systemState' => [ 'class' => '\opus\state\MysqlState', 'defaults' => [ // optional 'shopAccessEnabled' => true, 'siteAccessEnabled' => true, ] ],
Running tests
Run composer install
and then in the project root directory
./vendor/bin/phpunit
TODO
- Unit tests
- Proper migration