You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered an issue when using the Tatter\Schemas package in combination with the official CodeIgniter Shield package. When attempting to run the php spark schemas command to generate schema files, I receive the following error message:
CodeIgniter v4.4.4 Command Line Tool - Server Time: 2024-02-0522:02:35UTC+00:00
[Error]
Cannot instantiate abstract classCodeIgniter\Shield\Models\BaseModel
at VENDORPATH/tatter/schemas/src/Drafter/Handlers/ModelHandler.php:173
Backtrace:
1VENDORPATH/tatter/schemas/src/Drafter/Handlers/ModelHandler.php:84Tatter\Schemas\Drafter\Handlers\ModelHandler()->getModels()
2VENDORPATH/tatter/schemas/src/Schemas.php:165Tatter\Schemas\Drafter\Handlers\ModelHandler()->draft()
3VENDORPATH/tatter/schemas/src/Commands/Schemas.php:57Tatter\Schemas\Schemas()->draft()
4SYSTEMPATH/CLI/Commands.php:65Tatter\Schemas\Commands\Schemas()->run()
5SYSTEMPATH/CLI/Console.php:46CodeIgniter\CLI\Commands()->run()
6ROOTPATH/spark:102CodeIgniter\CLI\Console()->run()
I believe this issue could be related to how the ModelHandler in the Tatter\Schemas package handles model instantiation, particularly with abstract classes like BaseModel in the Shield package.
Any guidance on resolving this error would be greatly appreciated.
Thank you.
The text was updated successfully, but these errors were encountered:
A possible workaround might be relocating the abstract classes to a different namespace and adding this namespace to the config variable Schemas::$ignoredNamespaces
Hello,
I've encountered an issue when using the
Tatter\Schemas
package in combination with the official CodeIgniter Shield package. When attempting to run the php spark schemas command to generate schema files, I receive the following error message:I believe this issue could be related to how the
ModelHandler
in theTatter\Schemas
package handles model instantiation, particularly with abstract classes likeBaseModel
in the Shield package.Any guidance on resolving this error would be greatly appreciated.
Thank you.
The text was updated successfully, but these errors were encountered: