Skip to content

Commit

Permalink
Drop RCMAIL_VERSION < v1.2 check
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Apr 20, 2024
1 parent ee7f798 commit d66380f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ parameters:
-
message: '~^Constant RCMAIL_VERSION not found\.$~'
path: 'src/ExtensionInstaller.php'
count: 3
count: 1
14 changes: 2 additions & 12 deletions src/ExtensionInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,7 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
if ($sqldir = realpath($package_dir . \DIRECTORY_SEPARATOR . $extra['roundcube']['sql-dir'])) {
$this->io->write("<info>Running database initialization script for {$package_name}</info>");

$roundcube_version = self::versionNormalize(RCMAIL_VERSION);
if (self::versionCompare($roundcube_version, '1.2.0', '>=')) {
\rcmail_utils::db_init($sqldir);
} else {
throw new \Exception('Database initialization failed. Roundcube 1.2.0 or above required.');
}
\rcmail_utils::db_init($sqldir);
}
}

Expand Down Expand Up @@ -178,12 +173,7 @@ public function update(InstalledRepositoryInterface $repo, PackageInterface $ini
if ($sqldir = realpath($package_dir . \DIRECTORY_SEPARATOR . $extra['roundcube']['sql-dir'])) {
$this->io->write("<info>Updating database schema for {$package_name}</info>");

$roundcube_version = self::versionNormalize(RCMAIL_VERSION);
if (self::versionCompare($roundcube_version, '1.2.0', '>=')) {
\rcmail_utils::db_update($sqldir, $package_name);
} else {
throw new \Exception('Database update failed. Roundcube 1.2.0 or above required.');
}
\rcmail_utils::db_update($sqldir, $package_name);
}
}

Expand Down

0 comments on commit d66380f

Please sign in to comment.