Skip to content

Commit bec5f87

Browse files
committed
* Craft 3 beta 23 compatibility
1 parent b673e6f commit bec5f87

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Transcoder Changelog
22

3+
## 1.0.7 - 2017.08.05
4+
### Changed
5+
* Craft 3 beta 23 compatibility
6+
37
## 1.0.6 - 2017.07.15
48
### Changed
59
* Craft 3 beta 20 compatibility

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "nystudio107/craft3-transcoder",
33
"description": "Transcode video & audio files to various formats, and provide video thumbnails",
44
"type": "craft-plugin",
5-
"version": "1.0.6",
5+
"version": "1.0.7",
66
"keywords": [
77
"craft",
88
"cms",
@@ -22,7 +22,7 @@
2222
}
2323
],
2424
"require": {
25-
"craftcms/cms": "~3.0.0-beta.1",
25+
"craftcms/cms": "~3.0.0-beta.23",
2626
"mikehaertl/php-shellcommand": "~1.2"
2727
},
2828
"autoload": {

src/Transcoder.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Craft;
1818
use craft\base\Plugin;
1919
use craft\console\Application as ConsoleApplication;
20-
use craft\events\DefineComponentsEvent;
2120
use craft\events\RegisterCacheOptionsEvent;
2221
use craft\utilities\ClearCaches;
2322
use craft\web\twig\variables\CraftVariable;
@@ -56,9 +55,11 @@ public function init()
5655

5756
Event::on(
5857
CraftVariable::class,
59-
CraftVariable::EVENT_DEFINE_COMPONENTS,
60-
function (DefineComponentsEvent $event) {
61-
$event->components['transcoder'] = TranscoderVariable::class;
58+
CraftVariable::EVENT_INIT,
59+
function (Event $event) {
60+
/** @var CraftVariable $variable */
61+
$variable = $event->sender;
62+
$variable->set('transcoder', TranscoderVariable::class);
6263
}
6364
);
6465

0 commit comments

Comments
 (0)