Skip to content

Commit fb9bbe2

Browse files
committed
Merge remote-tracking branch 'parent/master' into pdo-exception-fix
2 parents 8687006 + 3a6fda8 commit fb9bbe2

Some content is hidden

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

61 files changed

+1832
-3338
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.github/workflows/fix-cs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818

1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v3
2222

2323
- name: Setup PHP
2424
uses: shivammathur/setup-php@v2
2525
with:
26-
php-version: 8.1
26+
php-version: 8.3
2727
coverage: none
2828
tools: composer:v2
2929

.github/workflows/run-integration-tests.yml

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,15 @@ jobs:
1818
COMPOSER_NO_INTERACTION: 1
1919
strategy:
2020
matrix:
21-
php: [8.1, 8.0, 7.4, 7.3, 7.2]
22-
lumen: [9.*, 8.*, 7.*]
21+
php: [8.3, 8.2, 8.1, 8.0]
22+
lumen: [10.*, 9.*]
2323
exclude:
24-
- lumen: 8.*
25-
php: 7.2
26-
- lumen: 9.*
27-
php: 7.2
28-
- lumen: 9.*
29-
php: 7.3
30-
- lumen: 9.*
31-
php: 7.4
32-
- lumen: 7.*
24+
- lumen: 10.*
3325
php: 8.0
34-
- lumen: 7.*
35-
php: 8.1
3626
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
3727
steps:
3828
- name: Checkout code
39-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
4030
with:
4131
path: src
4232

@@ -49,8 +39,9 @@ jobs:
4939

5040
- name: Install dependencies
5141
run: |
52-
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample
42+
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --stability=dev --no-progress sample
5343
cd sample
44+
composer config minimum-stability dev
5445
composer update --prefer-stable --prefer-dist --no-progress
5546
- name: Add package from source
5647
run: |
@@ -73,24 +64,21 @@ jobs:
7364
env:
7465
COMPOSER_NO_INTERACTION: 1
7566
strategy:
67+
fail-fast: false
7668
matrix:
77-
php: [8.1, 8.0, 7.4, 7.3, 7.2]
78-
laravel: [9.*, 8.*, 7.*]
69+
php: [8.3, 8.2, 8.1, 8.0]
70+
laravel: [11.*, 10.*, 9.*]
7971
exclude:
80-
- laravel: 8.*
81-
php: 7.2
82-
- laravel: 9.*
83-
php: 7.2
84-
- laravel: 9.*
85-
php: 7.3
86-
- laravel: 9.*
87-
php: 7.4
88-
- laravel: 7.*
72+
- laravel: 10.*
73+
php: 8.0
74+
- laravel: 11.*
75+
php: 8.0
76+
- laravel: 11.*
8977
php: 8.1
9078
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
9179
steps:
9280
- name: Checkout code
93-
uses: actions/checkout@v2
81+
uses: actions/checkout@v3
9482
with:
9583
path: src
9684

@@ -103,8 +91,9 @@ jobs:
10391

10492
- name: Install dependencies
10593
run: |
106-
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --no-progress sample
94+
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample
10795
cd sample
96+
composer config minimum-stability dev
10897
composer update --prefer-stable --prefer-dist --no-progress
10998
- name: Add package from source
11099
run: |

.github/workflows/run-tests.yml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,24 @@ jobs:
1818
COMPOSER_NO_INTERACTION: 1
1919

2020
strategy:
21+
fail-fast: false
2122
matrix:
22-
php: [8.2, 8.1, 8.0, 7.4, 7.3, 7.2]
23-
laravel: [^9, ^8, ^7]
24-
dependency-version: [prefer-lowest, prefer-stable]
23+
php: [8.3, 8.2, 8.1, 8.0]
24+
laravel: [^11, ^10, ^9]
25+
dependency-version: [prefer-stable]
2526
exclude:
26-
- laravel: ^7*
27-
php: 8.1
28-
- laravel: ^7
29-
php: 8.2
30-
- laravel: ^8
31-
php: 7.2
32-
- laravel: ^9
33-
php: 7.2
34-
- laravel: ^9
35-
php: 7.3
36-
- laravel: ^9
37-
php: 7.4
38-
- laravel: ^7
27+
- laravel: ^10
28+
php: 8.0
29+
- laravel: ^11
30+
php: 8.0
31+
- laravel: ^11
3932
php: 8.1
4033

4134
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
4235

4336
steps:
4437
- name: Checkout code
45-
uses: actions/checkout@v2
38+
uses: actions/checkout@v3
4639

4740
- name: Setup PHP
4841
uses: shivammathur/setup-php@v2
@@ -54,7 +47,7 @@ jobs:
5447

5548
- name: Install dependencies
5649
run: |
57-
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:>=2.62.1" --no-interaction --no-update
50+
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
5851
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
5952
6053
- name: Update Dusk Chromedriver

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
/.idea
12
/build
23
/vendor
34
composer.phar
45
composer.lock
56
.DS_Store
67
.phpunit.result.cache
7-
/tests/Browser
8+
/tests/Browser

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.2.5",
14-
"maximebf/debugbar": "^1.17.2",
15-
"illuminate/routing": "^7|^8.67|^9",
16-
"illuminate/session": "^7|^8.67|^9",
17-
"illuminate/support": "^7|^8.67|^9",
18-
"symfony/finder": "^5|^6"
13+
"php": "^8.0",
14+
"maximebf/debugbar": "~1.22.0",
15+
"illuminate/routing": "^9|^10|^11",
16+
"illuminate/session": "^9|^10|^11",
17+
"illuminate/support": "^9|^10|^11",
18+
"symfony/finder": "^6|^7"
1919
},
2020
"require-dev": {
2121
"mockery/mockery": "^1.3.3",
22-
"orchestra/testbench-dusk": "^5|^6|^7",
23-
"phpunit/phpunit": "^8.5.30|^9.0",
22+
"orchestra/testbench-dusk": "^5|^6|^7|^8|^9",
23+
"phpunit/phpunit": "^9.6|^10.5",
2424
"squizlabs/php_codesniffer": "^3.5"
2525
},
2626
"autoload": {
@@ -40,7 +40,7 @@
4040
"prefer-stable": true,
4141
"extra": {
4242
"branch-alias": {
43-
"dev-master": "3.6-dev"
43+
"dev-master": "3.13-dev"
4444
},
4545
"laravel": {
4646
"providers": [
@@ -52,8 +52,8 @@
5252
}
5353
},
5454
"scripts": {
55-
"check-style": "phpcs -p --standard=PSR12 config/ src/ tests/",
56-
"fix-style": "phpcbf -p --standard=PSR12 config/ src/ tests/",
55+
"check-style": "phpcs -p --standard=PSR12 config/ src/ tests/ --ignore=src/Resources/* ",
56+
"fix-style": "phpcbf -p --standard=PSR12 config/ src/ tests/ --ignore=src/Resources*",
5757
"test": "phpunit"
5858
}
5959
}

config/debugbar.php

Lines changed: 57 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@
3131
| By default, file storage (in the storage folder) is used. Redis and PDO
3232
| can also be used. For PDO, run the package migrations first.
3333
|
34+
| Warning: Enabling storage.open will allow everyone to access previous
35+
| request, do not enable open storage in publicly available environments!
36+
| Specify a callback if you want to limit based on IP or authentication.
37+
| Leaving it to null will allow localhost only.
3438
*/
3539
'storage' => [
3640
'enabled' => true,
41+
'open' => env('DEBUGBAR_OPEN_STORAGE'), // bool/callback.
3742
'driver' => 'file', // redis, file, pdo, socket, custom
3843
'path' => storage_path('debugbar'), // For file driver
3944
'connection' => null, // Leave null for default connection (Redis/PDO)
@@ -56,7 +61,7 @@
5661
|
5762
*/
5863

59-
'editor' => env('DEBUGBAR_EDITOR', 'phpstorm'),
64+
'editor' => env('DEBUGBAR_EDITOR') ?: env('IGNITION_EDITOR', 'phpstorm'),
6065

6166
/*
6267
|--------------------------------------------------------------------------
@@ -81,8 +86,8 @@
8186
|
8287
*/
8388

84-
'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH', ''),
85-
'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', ''),
89+
'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH'),
90+
'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', env('IGNITION_LOCAL_SITES_PATH')),
8691

8792
/*
8893
|--------------------------------------------------------------------------
@@ -112,10 +117,15 @@
112117
|
113118
| Note for your request to be identified as ajax requests they must either send the header
114119
| X-Requested-With with the value XMLHttpRequest (most JS libraries send this), or have application/json as a Accept header.
120+
|
121+
| By default `ajax_handler_auto_show` is set to true allowing ajax requests to be shown automatically in the Debugbar.
122+
| Changing `ajax_handler_auto_show` to false will prevent the Debugbar from reloading.
115123
*/
116124

117125
'capture_ajax' => true,
118126
'add_ajax_timing' => false,
127+
'ajax_handler_auto_show' => true,
128+
'ajax_handler_enable_tab' => true,
119129

120130
/*
121131
|--------------------------------------------------------------------------
@@ -172,6 +182,7 @@
172182
'cache' => false, // Display cache events
173183
'models' => true, // Display models
174184
'livewire' => true, // Display Livewire (when available)
185+
'jobs' => false, // Display dispatched jobs
175186
],
176187

177188
/*
@@ -184,8 +195,20 @@
184195
*/
185196

186197
'options' => [
198+
'time' => [
199+
'memory_usage' => false, // Calculated by subtracting memory start and end, it may be inaccurate
200+
],
201+
'messages' => [
202+
'trace' => true, // Trace the origin of the debug message
203+
],
204+
'memory' => [
205+
'reset_peak' => false, // run memory_reset_peak_usage before collecting
206+
'with_baseline' => false, // Set boot memory usage as memory peak baseline
207+
'precision' => 0, // Memory rounding precision
208+
],
187209
'auth' => [
188210
'show_name' => true, // Also show the users name/email in the debugbar
211+
'show_guards' => true, // Show the guards that are used
189212
],
190213
'db' => [
191214
'with_params' => true, // Render SQL with the parameters substituted
@@ -198,19 +221,36 @@
198221
'types' => ['SELECT'], // Deprecated setting, is always only SELECT
199222
],
200223
'hints' => false, // Show hints for common mistakes
201-
'show_copy' => false, // Show copy button next to the query
224+
'show_copy' => false, // Show copy button next to the query,
225+
'slow_threshold' => false, // Only track queries that last longer than this time in ms
226+
'memory_usage' => false, // Show queries memory usage
227+
'soft_limit' => 100, // After the soft limit, no parameters/backtrace are captured
228+
'hard_limit' => 500, // After the hard limit, queries are ignored
202229
],
203230
'mail' => [
204-
'full_log' => false,
231+
'timeline' => false, // Add mails to the timeline
232+
'show_body' => true,
205233
],
206234
'views' => [
207-
'timeline' => false, // Add the views to the timeline (Experimental)
208-
'data' => false, //Note: Can slow down the application, because the data can be quite large..
209-
'exclude_paths' => [], // Add the paths which you don't want to appear in the views
235+
'timeline' => false, // Add the views to the timeline (Experimental)
236+
'data' => false, //true for all data, 'keys' for only names, false for no parameters.
237+
'group' => 50, // Group duplicate views. Pass value to auto-group, or true/false to force
238+
'exclude_paths' => [ // Add the paths which you don't want to appear in the views
239+
'vendor/filament' // Exclude Filament components by default
240+
],
210241
],
211242
'route' => [
212243
'label' => true, // show complete route on bar
213244
],
245+
'session' => [
246+
'hiddens' => [], // hides sensitive values using array paths
247+
],
248+
'symfony_request' => [
249+
'hiddens' => [], // hides sensitive values using array paths, example: request_request.password
250+
],
251+
'events' => [
252+
'data' => false, // collect events data, listeners
253+
],
214254
'logs' => [
215255
'file' => null,
216256
],
@@ -244,6 +284,15 @@
244284
*/
245285
'route_prefix' => '_debugbar',
246286

287+
/*
288+
|--------------------------------------------------------------------------
289+
| DebugBar route middleware
290+
|--------------------------------------------------------------------------
291+
|
292+
| Additional middleware to run on the Debugbar routes
293+
*/
294+
'route_middleware' => [],
295+
247296
/*
248297
|--------------------------------------------------------------------------
249298
| DebugBar route domain

database/migrations/2014_12_01_120000_create_phpdebugbar_storage_table.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
use Illuminate\Database\Schema\Blueprint;
55
use Illuminate\Support\Facades\Schema;
66

7-
class CreatePhpdebugbarStorageTable extends Migration
7+
return new class extends Migration
88
{
99
/**
1010
* Run the migrations.
11-
*
12-
* @return void
1311
*/
14-
public function up()
12+
public function up(): void
1513
{
1614
Schema::create('phpdebugbar', function (Blueprint $table) {
1715
$table->string('id');
@@ -30,13 +28,12 @@ public function up()
3028
$table->index('meta_method');
3129
});
3230
}
31+
3332
/**
3433
* Reverse the migrations.
35-
*
36-
* @return void
3734
*/
3835
public function down()
3936
{
4037
Schema::drop('phpdebugbar');
4138
}
42-
}
39+
};

0 commit comments

Comments
 (0)