Skip to content

Commit

Permalink
Progress on craft 4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Roel van Hintum committed Apr 28, 2022
1 parent 706d72e commit d5e5362
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
}
],
"require": {
"craftcms/cms": "^3.0"
"php": "^8.0.2",
"craftcms/cms": "^4.0.0-alpha"
},
"autoload": {
"psr-4": {
Expand Down
9 changes: 3 additions & 6 deletions src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,15 @@

class Plugin extends CraftPlugin
{
/**
* @var string
*/
public $schemaVersion = '1.0.0';
public string $schemaVersion = '1.0.0';

/**
* Static property that is an instance of this plugin class so that it can be accessed via
* Plugin::$plugin
*
* @var Plugin
*/
public static $plugin;
public static Plugin $plugin;

/**
* @inheritdoc
Expand Down Expand Up @@ -85,7 +82,7 @@ function (ModelEvent $event) {
/**
* @inheritdoc
*/
protected function createSettingsModel()
protected function createSettingsModel(): Settings
{
return new Settings();
}
Expand Down
3 changes: 1 addition & 2 deletions src/jobs/RequirePasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace born05\enforcepassword\jobs;

use born05\enforcepassword\Plugin as EnforcePassword;
use born05\enforcepassword\records\Password as PasswordRecord;

use Craft;
use craft\elements\User;
Expand All @@ -16,7 +15,7 @@ class RequirePasswordReset extends BaseJob
/**
* @inheritdoc
*/
public function execute($queue)
public function execute($queue): void
{
$settings = EnforcePassword::$plugin->getSettings();

Expand Down

0 comments on commit d5e5362

Please sign in to comment.