Skip to content

Commit 2419516

Browse files
committed
Merge branch '4.x'
2 parents dce20bd + 3f06936 commit 2419516

File tree

137 files changed

+781
-1212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+781
-1212
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ nbproject/*
1717
.svn
1818
errors.err
1919
tags
20+
/.phpunit.result.cache
2021
/nbproject/
2122
/composer.lock
2223
/vendor

.travis.yml

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
language: php
22

33
php:
4-
- 5.6
5-
- 7.0
4+
- 7.2
65
- 7.3
76
- 7.4snapshot
87

8+
dist: xenial
9+
910
services:
1011
- postgresql
1112
- mysql
@@ -20,36 +21,23 @@ env:
2021

2122
matrix:
2223
fast_finish: true
23-
include:
24-
- php: 7.1
25-
env: PHPCS=1
26-
27-
- php: 7.1
28-
env: CODECOVERAGE=1 DEFAULT=0
29-
30-
- php: 5.6
31-
env: PREFER_LOWEST=1
3224

3325
allow_failures:
3426
- php: 7.4snapshot
3527

3628
install:
37-
- sh -c "if [ '$PREFER_LOWEST' != '1' ]; then composer install --prefer-dist --no-interaction; fi"
38-
- sh -c "if [ '$PREFER_LOWEST' = '1' ]; then composer update --prefer-dist --no-interaction --prefer-lowest --prefer-stable; fi"
29+
- composer install --prefer-dist --no-interaction
3930

4031
before_script:
41-
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
42-
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
32+
- if [ $DB = 'mysql' ]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
33+
- if [ $DB = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi
4334

4435
script:
45-
- sh -c "if [ '$DEFAULT' = '1' ]; then [ "$(find . \( -path './vendor' \) -prune -o -type f \( -name '*.ctp' -o -name '*.php' \) -print0 | xargs -0 --no-run-if-empty -L1 -i'{}' php -l '{}' | grep -vc 'No syntax errors')" -eq 0 ]; fi"
46-
- sh -c "if [ '$DEFAULT' = '1' ]; then ./vendor/bin/phpunit; fi"
47-
48-
- sh -c "if [ '$PHPCS' = '1' ]; then ./vendor/bin/phpcs -n -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
36+
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.1 ]]; then vendor/bin/phpunit --coverage-clover=clover.xml; fi
37+
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION != 7.1 ]]; then vendor/bin/phpunit; fi
4938

50-
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=clover.xml || true; fi"
51-
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"
52-
- sh -c "if [ '$CODECOVERAGE' = '1' ]; then bash codecov.sh; fi"
39+
after_success:
40+
- if [[ $DEFAULT = 1 && $TRAVIS_PHP_VERSION = 7.1 ]]; then bash <(curl -s https://codecov.io/bash); fi
5341

5442
notifications:
5543
email: false

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ php composer.phar require --dev cakephp/debug_kit:"~3.0"
3737
// src/Application.php
3838
$this->addPlugin('DebugKit');
3939
```
40-
Prior to 3.6.0
41-
```php
42-
Plugin::load('DebugKit', ['bootstrap' => true, 'routes' => true]);
43-
```
4440
* Set `'debug' => true,` in `config/app.php`.
4541

4642
## Reporting Issues

composer.json

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@
2323
"source": "https://github.com/cakephp/debug_kit"
2424
},
2525
"require": {
26-
"php": ">=5.6.0",
27-
"cakephp/cakephp": "^3.7.0",
28-
"cakephp/chronos": "^1.0.0",
29-
"cakephp/plugin-installer": "^1.0.0",
30-
"composer/composer": "^1.3.0",
31-
"jdorn/sql-formatter": "^1.2.0"
26+
"php": ">=7.2",
27+
"cakephp/cakephp": "4.x-dev as 4.0.0",
28+
"cakephp/chronos": "2.x-dev as 2.0.0",
29+
"cakephp/plugin-installer": "^1.0",
30+
"composer/composer": "^1.3",
31+
"jdorn/sql-formatter": "^1.2"
3232
},
3333
"require-dev": {
34-
"cakephp/cakephp-codesniffer": "^3.0",
35-
"phpunit/phpunit": "^5.7.14|^6.0"
34+
"cakephp/cakephp-codesniffer": "dev-next",
35+
"phpunit/phpunit": "^8.0"
3636
},
3737
"autoload": {
3838
"psr-4": {
@@ -51,12 +51,6 @@
5151
"suggest": {
5252
"ext-pdo_sqlite": "DebugKit needs to store panel data in a database. SQLite is simple and easy to use."
5353
},
54-
"scripts": {
55-
"check": [
56-
"@cs-check",
57-
"@test"
58-
],
59-
"cs-check": "phpcs --colors -p src/ tests/",
60-
"cs-fix": "phpcbf --colors -p src/ tests/"
61-
}
54+
"prefer-stable": true,
55+
"minimum-stability": "dev"
6256
}

config/bootstrap.php

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,10 @@
1010
* @link http://cakephp.org CakePHP(tm) Project
1111
* @license http://www.opensource.org/licenses/mit-license.php MIT License
1212
*/
13-
use Cake\Core\Configure;
14-
use Cake\Core\Plugin as CorePlugin;
1513
use Cake\Database\Query;
1614
use Cake\Datasource\ConnectionManager;
17-
use Cake\Event\EventManager;
1815
use Cake\Log\Log;
19-
use Cake\Routing\DispatcherFactory;
2016
use DebugKit\DebugSql;
21-
use DebugKit\Middleware\DebugKitMiddleware;
22-
use DebugKit\Panel\DeprecationsPanel;
23-
use DebugKit\Routing\Filter\DebugBarFilter;
24-
use DebugKit\ToolbarService;
25-
26-
$service = new ToolbarService(EventManager::instance(), (array)Configure::read('DebugKit'));
27-
28-
if (!$service->isEnabled() || php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg') {
29-
return;
30-
}
31-
32-
if (!empty($service->getConfig('panels')['DebugKit.Deprecations'])) {
33-
$errorLevel = Configure::read('Error.errorLevel', E_ALL | E_STRICT);
34-
$previousHandler = set_error_handler(
35-
function ($code, $message, $file, $line, $context = null) use (&$previousHandler) {
36-
if ($code == E_USER_DEPRECATED || $code == E_DEPRECATED) {
37-
DeprecationsPanel::addDeprecatedError(compact('code', 'message', 'file', 'line', 'context'));
38-
39-
return;
40-
}
41-
if ($previousHandler) {
42-
return $previousHandler($code, $message, $file, $line, $context);
43-
}
44-
},
45-
$errorLevel | E_USER_DEPRECATED | E_DEPRECATED
46-
);
47-
}
4817

4918
$hasDebugKitConfig = ConnectionManager::getConfig('debug_kit');
5019
if (!$hasDebugKitConfig && !in_array('sqlite', PDO::getAvailableDrivers())) {
@@ -66,23 +35,6 @@ function ($code, $message, $file, $line, $context = null) use (&$previousHandler
6635
]);
6736
}
6837

69-
if (!CorePlugin::getCollection()->get('DebugKit')->isEnabled('routes')) {
70-
include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'routes.php';
71-
}
72-
73-
$appClass = Configure::read('App.namespace') . '\Application';
74-
if (class_exists($appClass)) {
75-
EventManager::instance()->on('Server.buildMiddleware', function ($event, $queue) use ($service) {
76-
$middleware = new DebugKitMiddleware($service);
77-
$queue->insertAt(0, $middleware);
78-
});
79-
} else {
80-
// Setup dispatch filter
81-
$debugBar = new DebugBarFilter(EventManager::instance(), (array)Configure::read('DebugKit'));
82-
$debugBar->setup();
83-
DispatcherFactory::add($debugBar);
84-
}
85-
8638
if (!function_exists('sql')) {
8739
/**
8840
* Prints out the SQL statements generated by a Query object.

config/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function (RouteBuilder $routes) {
3636
$routes->connect('/', ['action' => 'index']);
3737
$routes->connect('/preview', ['action' => 'email']);
3838
$routes->connect('/preview/*', ['action' => 'email']);
39-
$routes->connect('/sent/:panel/:id', ['action' => 'sent'], ['pass' => ['panel', 'id']]);
39+
$routes->connect('/sent/{panel}/{id}', ['action' => 'sent'], ['pass' => ['panel', 'id']]);
4040
}
4141
);
4242

docs/config/all.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#
1111

1212
# The full version, including alpha/beta/rc tags.
13-
release = '3.x'
13+
release = '4.x'
1414

1515
# The search index version.
16-
search_version = 'debugkit-3'
16+
search_version = 'debugkit-4'
1717

1818
# The marketing display name for the book.
1919
version_name = ''
@@ -23,19 +23,19 @@
2323

2424
# Other versions that display in the version picker menu.
2525
version_list = [
26-
{'name': '3.x', 'number': '/debugkit/3.x', 'title': '3.x', 'current': True},
27-
# {'name': '4.x', 'number': '/debugkit/4.x', 'title': '4.x'},
26+
{'name': '3.x', 'number': 'debugkit/3.x', 'title': '3.x'},
27+
{'name': '4.x', 'number': 'debugkit/4.x', 'title': '4.x', 'current': True},
2828
]
2929

3030
# Languages available.
3131
languages = ['en', 'fr', 'ja', 'pt']
3232

3333
# The GitHub branch name for this version of the docs
3434
# for edit links to point at.
35-
branch = 'master'
35+
branch = '4.x'
3636

3737
# Current version being built
38-
version = '3.x'
38+
version = '4.x'
3939

4040
# Language in use for this directory.
4141
language = 'en'
@@ -50,3 +50,5 @@
5050

5151
# DebugKit docs use mp4 videos to show the UI
5252
extensions.append('sphinxcontrib.video')
53+
54+
is_prerelease = True

docs/en/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ you've removed it and want to re-install it, you can do so by running the
2020
following from your application's ROOT directory (where composer.json file is
2121
located)::
2222

23-
php composer.phar require --dev cakephp/debug_kit "~3.0"
23+
php composer.phar require --dev cakephp/debug_kit "~4.0"
2424

2525
Then, you need to enable the plugin by executing the following line::
2626

docs/fr/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ le retirez et voulez le réinstaller, vous pouvez le faire en lançant ce qui
2424
suit à partir du répertoire ROOT de votre application (où le fichier
2525
composer.json est localisé)::
2626

27-
php composer.phar require --dev cakephp/debug_kit "~3.0"
27+
php composer.phar require --dev cakephp/debug_kit "~4.0"
2828

2929
Ensuite, vous devez activer le plugin en exécutant la ligne suivante::
3030

docs/ja/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ DebugKit は、CakePHP アプリケーション用のデバッグツールバー
1818
もし削除してしまって再インストールしたい場合は、以下のコマンドをアプリケーションの
1919
ルートディレクトリー (composer.json ファイルのある場所) で実行してください。 ::
2020

21-
php composer.phar require --dev cakephp/debug_kit "~3.0"
21+
php composer.phar require --dev cakephp/debug_kit "~4.0"
2222

2323
そして以下のコマンドでプラグインを有効化する必要があります。 ::
2424

0 commit comments

Comments
 (0)