Skip to content

Commit 4dd4e78

Browse files
committed
Craft 4.0.0 Support
1 parent 557db51 commit 4dd4e78

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"require": {
1010
"php": ">=8.0.2",
11-
"craftcms/cms": "^4.4.3"
11+
"craftcms/cms": "^4.0.0"
1212
},
1313
"require-dev": {
1414
"craftcms/ecs": "dev-main"

src/Plugin.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,9 @@ public function init(): void
6666
{
6767
parent::init();
6868

69-
// Defer most setup tasks until Craft is fully initialized
70-
Craft::$app->onInit(function() {
71-
$this->setup();
72-
$this->attachFunctions();
73-
$this->registerEvents();
74-
});
69+
$this->setup();
70+
$this->attachFunctions();
71+
$this->registerEvents();
7572
}
7673

7774
/**

0 commit comments

Comments
 (0)