Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concrete5 version 8 support and kint version update #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"require": {
"raveren/kint": "^1.0"
"kint-php/kint": "^2.0"
}
}
43 changes: 25 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 22 additions & 7 deletions controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,30 @@

defined('C5_EXECUTE') or die(_('Access Denied.'));

$fs = new Filesystem();
$fs->getRequire(__DIR__ . '/vendor/autoload.php');
//$fs = new Filesystem();
//$fs->getRequire(__DIR__ . '/vendor/autoload.php');

class Controller extends Package {
class Controller extends Package
{
protected $pkgHandle = 'kint_debug';
protected $appVersionRequired = '5.7.0.4';
protected $pkgVersion = '0.9.5';
protected $pkgVersion = '0.9.6';

public function getPackageDescription() {
public function getPackageDescription()
{
return t('Add Kint debugging tools');
}

public function getPackageName() {
public function getPackageName()
{
return t('Debug Kit');
}

public function on_start() {
public function on_start()
{
// register autoloading
$this->registerAutoload();

$al = \Concrete\Core\Asset\AssetList::getInstance();
$al->register('css', $this->pkgHandle . '/css', 'css/debug.css', array(), $this->pkgHandle);

Expand All @@ -50,4 +57,12 @@ protected function isAjaxRequest() {
return !empty($_SERVER['HTTP_X_REQUESTED_WITH']) &&
strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest';
}

/**
* Register autoloader.
*/
protected function registerAutoload()
{
require $this->getPackagePath().'/vendor/autoload.php';
}
}