I develop on my MacbookPro, OS X Monterey, server installed using Grav Blog instruction, php 7.4. All works fine.
But on production server (CloudLinux) I see error during deployment (on bin/gpm install <anyplugin>) about my custom storage class:
In FlexDirectory.php line 996:
Bad storage class: Grav\Plugin\SoglFlex\Flex\Types\Users\UserFolderStorage
This line part on FlexDirectory.php:
if (!is_a($className, FlexStorageInterface::class, true)) {
throw new \RuntimeException('Bad storage class: ' . $className);
}
Error shows on every plugin install:
My storage class:
<?php
declare(strict_types=1);
namespace Grav\Plugin\SoglFlex\Flex\Types\Users;
use Grav\Common\Flex\Types\Users\Storage\UserFolderStorage as DefaultUserFolderStorage;
/**
* Class UserFolderStorage
* @package Grav\Plugin\SoglFlex\Flex\Types\Users
*/
class UserFolderStorage extends DefaultUserFolderStorage
{
/**
* Prepares the row for saving and returns the storage key for the record.
*
* @param array $row
*/
protected function prepareRow(array &$row): void
{
parent::prepareRow($row);
}
protected function initOptions(array $options): void
{
parent::initOptions($options);
}
}
I changed Storage class to default (object: 'Grav\Common\Flex\Types\Users\UserObject') and now it works on production too.
But what kind of error is this?
I develop on my MacbookPro, OS X Monterey, server installed using Grav Blog instruction, php 7.4. All works fine. But on production server (CloudLinux) I see error during deployment (on
bin/gpm install <anyplugin>
) about my custom storage class:This line part on FlexDirectory.php:
Error shows on every plugin install:
My storage class:
I changed Storage class to default (
object: 'Grav\Common\Flex\Types\Users\UserObject'
) and now it works on production too. But what kind of error is this?