Installation
Install the plugin with Composer from your CakePHP project's ROOT directory (where the composer.json file is located):
composer require dereuromark/cakephp-tinyauth-backend cakephp/migrations:"^4.5 || ^5.0"This auto-requires the dereuromark/cakephp-tinyauth dependency.
Load the plugin
If Migrations is already loaded by your application, add only TinyAuthBackend. Otherwise load both plugins in your application's Application::bootstrap():
public function bootstrap(): void
{
parent::bootstrap();
$this->addPlugin('Migrations');
$this->addPlugin('TinyAuthBackend');
}Run the migrations
The plugin ships its database tables as migrations. Run them with the cakephp/migrations plugin:
bin/cake migrations migrate -p TinyAuthBackendThis creates the backend tables:
tinyauth_rolestinyauth_controllerstinyauth_actionstinyauth_acl_permissionstinyauth_resourcestinyauth_resource_abilitiestinyauth_scopestinyauth_resource_acl
Continue
Composer declares the supported PHP and CakePHP ranges. The supplied migrations use Migrations\BaseMigration, available from Migrations 4.5. Composer selects a compatible version for your CakePHP installation.
Continue with Getting started to configure local admin access, create a role and synchronize controllers. Existing installations should review the database changes before migrating: the initial migration drops the old tiny_auth_acl_rules and tiny_auth_allow_rules tables. Export those tables before migrating and manually transfer any rules you still need into the normalized schema; the INI importer does not import those legacy database tables.