Skip to content

Commit

Permalink
Add version check for Kirby 4 or 5, bump version number.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottboms committed Jan 27, 2025
1 parent 5de3b66 commit 2c88b53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"source": "https://github.com/scottboms/kirby-markup"
},
"require": {
"php": ">8.1.0 <8.4.0",
"getkirby/cms": "^4.0 || ^5.0",
"getkirby/composer-installer": "^1.1"
}
}
10 changes: 9 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,20 @@
Kirby\Sane\Html::$allowedTags['samp'] = true;
Kirby\Sane\Html::$allowedTags['smallcaps'] = true;

use Composer\Semver\Semver;
use Kirby\Cms\App as Kirby;

// validate Kirby version
if (Semver::satisfies(Kirby::version() ?? '0.0.0', '~4.0 || ~5.0') === false) {
throw new Exception('Kirby Remix Icons Plugin requires Kirby 4 or 5');
}

Kirby::plugin(
name: 'scottboms/kirby-markup',
info: [
'homepage' => 'https://github.com/scottboms/kirby-markup'
],
version: '1.0.2',
version: '1.0.3',
extends: [
'tags' => [
// Abbreviation
Expand Down

0 comments on commit 2c88b53

Please sign in to comment.