yii2-usuario
yii2-usuario copied to clipboard
Fix postgres rule unserialization
Yii2 migration for Postgres uses bytea for field "data" (see: https://github.com/yiisoft/yii2/commit/23790272dc561aacf2070cbbda396f49e44cbb7d#diff-9dc218c5c0834622090067e24bb745073a454b843a5e150d1498af80ebdd73fa) and bytea is resource in php so unserialize will throw error.
This code is taken from Yii2 DbManager: https://github.com/yiisoft/yii2/blob/master/framework/rbac/DbManager.php#L449