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
{{ message }}
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
Description
When installing a plugin, it is only installed in the normal database shopware but neither is the plugin added to the plugin and plugin_translation tables of the database shopware_test nor are the migrations of the plugin applied to it.
Please make the installation process of the plugin also consider the test database. The same for the unistallation.
Example bin/console plugin:install PLUGIN_NAME should additionally add the plugin PLUGIN_NAME to the database shopware_test and apply the migrations on that database.
The text was updated successfully, but these errors were encountered:
this should not be part of the platform as this is only relevant for development.
instead there should be a psh command in the Dev template which handles this
When using the development template, the problem can be circumvented by running ./psh.phar init-test-databases after the plugin was installed & activated in the "main" database.
So I am not sure an additional command is necessary---I guess there COULD be a psh.phar command to manually activate a plugin in the test database, but it will generally be expedient to have the test database to be a copy of the main database, so I am not sure creating such a command would be all that useful.
What SHOULD be improved is the documentation. The page on unit tests for plugins does instruct the user to run the init-test-databases command, but it does not advise the use to make sure that the plugin is activated before doing so (/to re-run the command after activating additional plugins). This probably should be fixed.
So maybe this issue should be transferred to the docs repository?
ASIDE:
I somewhat disagree that this issue is only relevant if using the development template, which is why I created this issue in the platform repo. People do use the production template when developing "custom" modules geared to a specific site, and this is encouraged by some out there (e.g. Jisse Reitsma in his videos on the "Shopware Academy" - regardless of his reasons for doing so and their merits, people will follow his advice, and still will want to run tests on their plugins).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When installing a plugin, it is only installed in the normal database
shopware
but neither is the plugin added to theplugin
andplugin_translation
tables of the databaseshopware_test
nor are the migrations of the plugin applied to it.Please make the installation process of the plugin also consider the test database. The same for the unistallation.
Example
bin/console plugin:install PLUGIN_NAME
should additionally add the plugin PLUGIN_NAME to the databaseshopware_test
and apply the migrations on that database.The text was updated successfully, but these errors were encountered: