Skip to content

Commit d66380f

Browse files
committed
Drop RCMAIL_VERSION < v1.2 check
1 parent ee7f798 commit d66380f

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ parameters:
1616
-
1717
message: '~^Constant RCMAIL_VERSION not found\.$~'
1818
path: 'src/ExtensionInstaller.php'
19-
count: 3
19+
count: 1

src/ExtensionInstaller.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,7 @@ public function install(InstalledRepositoryInterface $repo, PackageInterface $pa
108108
if ($sqldir = realpath($package_dir . \DIRECTORY_SEPARATOR . $extra['roundcube']['sql-dir'])) {
109109
$this->io->write("<info>Running database initialization script for {$package_name}</info>");
110110

111-
$roundcube_version = self::versionNormalize(RCMAIL_VERSION);
112-
if (self::versionCompare($roundcube_version, '1.2.0', '>=')) {
113-
\rcmail_utils::db_init($sqldir);
114-
} else {
115-
throw new \Exception('Database initialization failed. Roundcube 1.2.0 or above required.');
116-
}
111+
\rcmail_utils::db_init($sqldir);
117112
}
118113
}
119114

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

181-
$roundcube_version = self::versionNormalize(RCMAIL_VERSION);
182-
if (self::versionCompare($roundcube_version, '1.2.0', '>=')) {
183-
\rcmail_utils::db_update($sqldir, $package_name);
184-
} else {
185-
throw new \Exception('Database update failed. Roundcube 1.2.0 or above required.');
186-
}
176+
\rcmail_utils::db_update($sqldir, $package_name);
187177
}
188178
}
189179

0 commit comments

Comments
 (0)