Skip to content

Commit 0b81eb6

Browse files
committed
Minor update to Kirby version support checking to remove need for third-party library.
1 parent 2016857 commit 0b81eb6

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

index.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,22 @@
1313

1414
use Scottboms\Microseasons\Season;
1515
use Kirby\Toolkit\Date;
16-
use Composer\Semver\Semver;
17-
use Kirby\Cms\App as Kirby;
16+
use Kirby\Cms\App;
1817

19-
// validate Kirby version
20-
if (Semver::satisfies(Kirby::version() ?? '0.0.0', '~4.0 || ~5.0') === false) {
21-
throw new Exception('Microseasons requires Kirby 4 or 5');
18+
// shamelessly borrowed from distantnative/retour-for-kirby
19+
if (
20+
version_compare(App::version() ?? '0.0.0', '4.0.1', '<') === true ||
21+
version_compare(App::version() ?? '0.0.0', '6.0.0', '>=') === true
22+
) {
23+
throw new Exception('Kirby Microseasons requires Kirby v4 or v5');
2224
}
2325

2426
Kirby::plugin(
2527
name: 'scottboms/kirby-microseasons',
2628
info: [
2729
'homepage' => 'https://github.com/scottboms/kirby-microseasons'
2830
],
29-
version: '1.0.9',
31+
version: '1.1.0',
3032
extends: [
3133
'options' => [
3234
'cache' => True,

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "kirby-microseasons",
3-
"description": "Kirby plugin to output the current Japanese microseason information",
3+
"description": "Kirby plugin to output info on the current Japanese microseason",
44
"author": "Scott Boms <[email protected]>",
5-
"version": "1.0.8",
5+
"version": "1.1.0",
66
"type": "kirby-plugin",
77
"license": "MIT",
88

0 commit comments

Comments
 (0)