Skip to content

Commit

Permalink
Craft 4 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Aug 22, 2022
1 parent daf048d commit d5afdd6
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 18 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 3.0.0 - 2022-08-22

### Changed
- Now requires PHP `8.0.2+`.
- Now requires Craft `4.0.0+`.

### Removed
- Removed `j()` function.

## 2.0.0 - 2022-08-22

> {note} The plugin’s package name has changed to `verbb/kint`. Kint will need be updated to 2.0 from a terminal, by running `composer require verbb/kint && composer remove mildlygeeky/craft-kint`.
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ it is interactive, with keyboard shortcuts to expand and collapse objects, separ

This is the simplest usage, and will output an interactive debugger for the variable passed in.

#### j (dump - console.log())
`{{ j(entry) }}` or `{{ j(entry, otherEntry) }}`

This is the same as `d`, except all output will be sent to `console.log()`

#### s (simple dump)
`{{ s(someTwigVariable) }}` or `{{ s(entry, otherEntry) }}`

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "verbb/kint",
"description": "Adds Kint, an in-app PHP debugger for use in Twig and PHP.",
"type": "craft-plugin",
"version": "2.0.0",
"version": "3.0.0",
"keywords": [
"craft",
"cms",
Expand All @@ -29,11 +29,11 @@
}
],
"require": {
"craftcms/cms": "^3.7.0",
"verbb/base": "^1.0.2",
"kint-php/kint": "^3.1",
"kint-php/kint-twig": "^2.0",
"kint-php/kint-js": "^2.0"
"php": "^8.0.2",
"craftcms/cms": "^4.0.0",
"verbb/base": "^2.0.0",
"kint-php/kint": "^4.0",
"kint-php/kint-twig": "^3.0"
},
"autoload": {
"psr-4": {
Expand All @@ -43,7 +43,7 @@
"extra": {
"name": "Kint",
"handle": "kint",
"changelogUrl": "https://raw.githubusercontent.com/verbb/kint/craft-3/CHANGELOG.md",
"changelogUrl": "https://raw.githubusercontent.com/verbb/kint/craft-4/CHANGELOG.md",
"class": "verbb\\kint\\Kint"
}
}
8 changes: 4 additions & 4 deletions src/Kint.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Kint extends Plugin
// Properties
// =========================================================================

public $schemaVersion = '1.0.0';
public $hasCpSettings = true;
public string $schemaVersion = '1.0.0';
public bool $hasCpSettings = true;


// Traits
Expand All @@ -50,9 +50,9 @@ public function init(): void
$this->_registerCpRoutes();
}

public function getSettingsResponse()
public function getSettingsResponse(): mixed
{
Craft::$app->getResponse()->redirect(UrlHelper::cpUrl('kint/settings'));
return Craft::$app->getResponse()->redirect(UrlHelper::cpUrl('kint/settings'));
}


Expand Down
4 changes: 3 additions & 1 deletion src/base/PluginTrait.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
namespace verbb\kint\base;

use verbb\kint\Kint;

use Craft;

use yii\log\Logger;
Expand All @@ -12,7 +14,7 @@ trait PluginTrait
// Static Properties
// =========================================================================

public static $plugin;
public static Kint $plugin;


// Public Methods
Expand Down
2 changes: 1 addition & 1 deletion src/models/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ class Settings extends Model
// Properties
// =========================================================================

public $kintDisplayTheme = 'original.css';
public string $kintDisplayTheme = 'original.css';

}

0 comments on commit d5afdd6

Please sign in to comment.