Closed multiwebinc closed 2 years ago
In modules/system/classes/versionManager.php
> updatePlugin()
if ($currentVersion == $databaseVersion) {
$this->note(' - <info>Nothing to update.</info>');
return;
}
Note: 'string' == 0
returns true
prior to PHP 8 (see https://www.php.net/manual/en/types.comparisons.php). Before any migrations are performed, the version is set to 0
.
@multiwebinc can you try: if ($currentVersion === (string) $databaseVersion) {
instead?
@LukeTowers Close. However, for some reason, it skips the initial version.
Ok, I got it figured out. PR coming.
This issue will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this issue is still relevant or you would like to see it actioned, please respond and we will re-open this issue. If this issue is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.
@multiwebinc is this fixed in the 1.2 branch? See https://github.com/wintercms/winter/commit/af311f7001d9f07c802166faafaa0d5715a2dc78
@LukeTowers I apologize for the delay in getting back to you on this. I just tested it and it appears to be working for me.
Winter CMS Build
1.1
PHP Version
7.4
Database engine
SQLite
Plugins installed
No response
Issue description
As per the documentation at https://wintercms.com/docs/plugin/updates, in the "version.yaml" file, versions are prepended with "v", however, in practice, this does not work. The migration files referenced under that version are not executed if the version begins with a "v".
Steps to replicate
Straight from the documentation at https://wintercms.com/docs/plugin/updates:
The above two scripts are not executed. However the following works correctly:
Workaround
No response