Skip to content

Commit

Permalink
craft 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ssplugin committed Jun 2, 2022
1 parent 4b1d7f1 commit 0cf4b2b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# SS Twitter Feed Changelog

## 1.0.9 - 2022-02-06
### Added
- Craft cms 4 compatability.

## 1.0.8 - 2021-03-21

- Fix Composer 2 compatibility.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# SS Twitter Feed plugin for Craft CMS 3.x
# SS Twitter Feed plugin for Craft CMS 4.x

Show Recent twitter timeline on your site.


## Requirements

This plugin requires Craft CMS 3.0.0-beta.23 or later.
This plugin requires Craft CMS 4 or later and PHP 8.

## Installation

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ssplugin/ss-twitter-feed",
"description": "Show Recent Tweets.",
"type": "craft-plugin",
"version": "1.0.8",
"version": "1.0.9",
"keywords": [
"craft",
"cms",
Expand All @@ -22,7 +22,8 @@
}
],
"require": {
"craftcms/cms": "^3.0.0-RC1"
"craftcms/cms": "^4.0",
"php": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 3 additions & 3 deletions src/SsTwitterFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use craft\web\UrlManager;
use craft\web\twig\variables\CraftVariable;
use craft\events\RegisterUrlRulesEvent;

use craft\base\Model;
use yii\base\Event;

/**
Expand Down Expand Up @@ -64,7 +64,7 @@ class SsTwitterFeed extends Plugin
*
* @var string
*/
public $schemaVersion = '1.0.8';
public string $schemaVersion = '1.0.9';

public static $plugin;
public static $CONSUMER_KEY = 'qhNHMB4B4dl4udJ0aGclECEK7';
Expand Down Expand Up @@ -168,7 +168,7 @@ function (PluginEvent $event) {
*
* @return \craft\base\Model|null
*/
protected function createSettingsModel()
protected function createSettingsModel(): model
{
return new Settings();
}
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class DefaultController extends Controller
* The actions must be in 'kebab-case'
* @access protected
*/
protected $allowAnonymous = ['index', 'do-something'];
protected array|int|bool $allowAnonymous = ['index', 'do-something'];

// Public Methods
// =========================================================================
Expand Down
10 changes: 5 additions & 5 deletions src/models/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ class Settings extends Model
*
* @var string
*/
public $api_key = '';
public $api_secret_key = '';
public $access_token = '';
public $access_token_secret = '';
public string $api_key = '';
public string $api_secret_key = '';
public string $access_token = '';
public string $access_token_secret = '';

// Public Methods
// =========================================================================
Expand All @@ -57,7 +57,7 @@ class Settings extends Model
*
* @return array
*/
public function rules()
public function rules(): array
{
return [
['api_key', 'string'],
Expand Down

0 comments on commit 0cf4b2b

Please sign in to comment.