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 come across an edge case in Install.php that keeps my automated tests from running.
I have a Craft site with Commerce and Postie installed & set up in the project config.
When running codeception, the setup process runs in the folowing order (more or less)
Start with an empty test database
Install Craft, Commerce and Plugins
Apply project config
However, Postie's install script expects for a Store to already be set up. That doesn't occur until the project config is applied.
This bug can also be reproduced when running craft install on an existing project with an empty database.
Here is the exception I'm getting:
An error occurred while executing the "verbb\postie\migrations\Install migration: craft\commerce\services\Stores::getCurrentStore(): Return value must be of type craft\commerce\models\Store, null returned
It seems like this call to $orderStatusService->saveOrderStatus($status, []); is throwing the exception.
I put together a PR with a quick fix for the issue... but there might be a better solution.
Describe the bug
I've come across an edge case in Install.php that keeps my automated tests from running.
I have a Craft site with Commerce and Postie installed & set up in the project config.
When running codeception, the setup process runs in the folowing order (more or less)
However, Postie's install script expects for a Store to already be set up. That doesn't occur until the project config is applied.
This bug can also be reproduced when running
craft install
on an existing project with an empty database.Here is the exception I'm getting:
It seems like this call to
$orderStatusService->saveOrderStatus($status, []);
is throwing the exception.I put together a PR with a quick fix for the issue... but there might be a better solution.
Steps to reproduce
craft install
to recreate the database from the project config.Postie's Install.php file should throw an excepton.
Craft CMS version
Craft: 5.7.1.1 Commerce: 5.3.11
Plugin version
5.0.10
Multi-site?
"Yes"
Additional context
No response
The text was updated successfully, but these errors were encountered: