Skip to content

Commit

Permalink
Merge remote-tracking branch 'parent/master' into pdo-exception-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacarpet committed May 9, 2024
2 parents 8687006 + 3a6fda8 commit fb9bbe2
Show file tree
Hide file tree
Showing 61 changed files with 1,832 additions and 3,338 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
4 changes: 2 additions & 2 deletions .github/workflows/fix-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.3
coverage: none
tools: composer:v2

Expand Down
45 changes: 17 additions & 28 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,15 @@ jobs:
COMPOSER_NO_INTERACTION: 1
strategy:
matrix:
php: [8.1, 8.0, 7.4, 7.3, 7.2]
lumen: [9.*, 8.*, 7.*]
php: [8.3, 8.2, 8.1, 8.0]
lumen: [10.*, 9.*]
exclude:
- lumen: 8.*
php: 7.2
- lumen: 9.*
php: 7.2
- lumen: 9.*
php: 7.3
- lumen: 9.*
php: 7.4
- lumen: 7.*
- lumen: 10.*
php: 8.0
- lumen: 7.*
php: 8.1
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: src

Expand All @@ -49,8 +39,9 @@ jobs:

- name: Install dependencies
run: |
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --stability=dev --no-progress sample
cd sample
composer config minimum-stability dev
composer update --prefer-stable --prefer-dist --no-progress
- name: Add package from source
run: |
Expand All @@ -73,24 +64,21 @@ jobs:
env:
COMPOSER_NO_INTERACTION: 1
strategy:
fail-fast: false
matrix:
php: [8.1, 8.0, 7.4, 7.3, 7.2]
laravel: [9.*, 8.*, 7.*]
php: [8.3, 8.2, 8.1, 8.0]
laravel: [11.*, 10.*, 9.*]
exclude:
- laravel: 8.*
php: 7.2
- laravel: 9.*
php: 7.2
- laravel: 9.*
php: 7.3
- laravel: 9.*
php: 7.4
- laravel: 7.*
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.0
- laravel: 11.*
php: 8.1
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: src

Expand All @@ -103,8 +91,9 @@ jobs:

- name: Install dependencies
run: |
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --no-progress sample
composer create-project --prefer-dist laravel/laravel:${{ matrix.laravel }} --stability=dev --no-progress sample
cd sample
composer config minimum-stability dev
composer update --prefer-stable --prefer-dist --no-progress
- name: Add package from source
run: |
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,24 @@ jobs:
COMPOSER_NO_INTERACTION: 1

strategy:
fail-fast: false
matrix:
php: [8.2, 8.1, 8.0, 7.4, 7.3, 7.2]
laravel: [^9, ^8, ^7]
dependency-version: [prefer-lowest, prefer-stable]
php: [8.3, 8.2, 8.1, 8.0]
laravel: [^11, ^10, ^9]
dependency-version: [prefer-stable]
exclude:
- laravel: ^7*
php: 8.1
- laravel: ^7
php: 8.2
- laravel: ^8
php: 7.2
- laravel: ^9
php: 7.2
- laravel: ^9
php: 7.3
- laravel: ^9
php: 7.4
- laravel: ^7
- laravel: ^10
php: 8.0
- laravel: ^11
php: 8.0
- laravel: ^11
php: 8.1

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

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -54,7 +47,7 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:>=2.62.1" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-progress
- name: Update Dusk Chromedriver
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/.idea
/build
/vendor
composer.phar
composer.lock
.DS_Store
.phpunit.result.cache
/tests/Browser
/tests/Browser
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
}
],
"require": {
"php": ">=7.2.5",
"maximebf/debugbar": "^1.17.2",
"illuminate/routing": "^7|^8.67|^9",
"illuminate/session": "^7|^8.67|^9",
"illuminate/support": "^7|^8.67|^9",
"symfony/finder": "^5|^6"
"php": "^8.0",
"maximebf/debugbar": "~1.22.0",
"illuminate/routing": "^9|^10|^11",
"illuminate/session": "^9|^10|^11",
"illuminate/support": "^9|^10|^11",
"symfony/finder": "^6|^7"
},
"require-dev": {
"mockery/mockery": "^1.3.3",
"orchestra/testbench-dusk": "^5|^6|^7",
"phpunit/phpunit": "^8.5.30|^9.0",
"orchestra/testbench-dusk": "^5|^6|^7|^8|^9",
"phpunit/phpunit": "^9.6|^10.5",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
Expand All @@ -40,7 +40,7 @@
"prefer-stable": true,
"extra": {
"branch-alias": {
"dev-master": "3.6-dev"
"dev-master": "3.13-dev"
},
"laravel": {
"providers": [
Expand All @@ -52,8 +52,8 @@
}
},
"scripts": {
"check-style": "phpcs -p --standard=PSR12 config/ src/ tests/",
"fix-style": "phpcbf -p --standard=PSR12 config/ src/ tests/",
"check-style": "phpcs -p --standard=PSR12 config/ src/ tests/ --ignore=src/Resources/* ",
"fix-style": "phpcbf -p --standard=PSR12 config/ src/ tests/ --ignore=src/Resources*",
"test": "phpunit"
}
}
65 changes: 57 additions & 8 deletions config/debugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@
| By default, file storage (in the storage folder) is used. Redis and PDO
| can also be used. For PDO, run the package migrations first.
|
| Warning: Enabling storage.open will allow everyone to access previous
| request, do not enable open storage in publicly available environments!
| Specify a callback if you want to limit based on IP or authentication.
| Leaving it to null will allow localhost only.
*/
'storage' => [
'enabled' => true,
'open' => env('DEBUGBAR_OPEN_STORAGE'), // bool/callback.
'driver' => 'file', // redis, file, pdo, socket, custom
'path' => storage_path('debugbar'), // For file driver
'connection' => null, // Leave null for default connection (Redis/PDO)
Expand All @@ -56,7 +61,7 @@
|
*/

'editor' => env('DEBUGBAR_EDITOR', 'phpstorm'),
'editor' => env('DEBUGBAR_EDITOR') ?: env('IGNITION_EDITOR', 'phpstorm'),

/*
|--------------------------------------------------------------------------
Expand All @@ -81,8 +86,8 @@
|
*/

'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH', ''),
'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', ''),
'remote_sites_path' => env('DEBUGBAR_REMOTE_SITES_PATH'),
'local_sites_path' => env('DEBUGBAR_LOCAL_SITES_PATH', env('IGNITION_LOCAL_SITES_PATH')),

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

'capture_ajax' => true,
'add_ajax_timing' => false,
'ajax_handler_auto_show' => true,
'ajax_handler_enable_tab' => true,

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -172,6 +182,7 @@
'cache' => false, // Display cache events
'models' => true, // Display models
'livewire' => true, // Display Livewire (when available)
'jobs' => false, // Display dispatched jobs
],

/*
Expand All @@ -184,8 +195,20 @@
*/

'options' => [
'time' => [
'memory_usage' => false, // Calculated by subtracting memory start and end, it may be inaccurate
],
'messages' => [
'trace' => true, // Trace the origin of the debug message
],
'memory' => [
'reset_peak' => false, // run memory_reset_peak_usage before collecting
'with_baseline' => false, // Set boot memory usage as memory peak baseline
'precision' => 0, // Memory rounding precision
],
'auth' => [
'show_name' => true, // Also show the users name/email in the debugbar
'show_guards' => true, // Show the guards that are used
],
'db' => [
'with_params' => true, // Render SQL with the parameters substituted
Expand All @@ -198,19 +221,36 @@
'types' => ['SELECT'], // Deprecated setting, is always only SELECT
],
'hints' => false, // Show hints for common mistakes
'show_copy' => false, // Show copy button next to the query
'show_copy' => false, // Show copy button next to the query,
'slow_threshold' => false, // Only track queries that last longer than this time in ms
'memory_usage' => false, // Show queries memory usage
'soft_limit' => 100, // After the soft limit, no parameters/backtrace are captured
'hard_limit' => 500, // After the hard limit, queries are ignored
],
'mail' => [
'full_log' => false,
'timeline' => false, // Add mails to the timeline
'show_body' => true,
],
'views' => [
'timeline' => false, // Add the views to the timeline (Experimental)
'data' => false, //Note: Can slow down the application, because the data can be quite large..
'exclude_paths' => [], // Add the paths which you don't want to appear in the views
'timeline' => false, // Add the views to the timeline (Experimental)
'data' => false, //true for all data, 'keys' for only names, false for no parameters.
'group' => 50, // Group duplicate views. Pass value to auto-group, or true/false to force
'exclude_paths' => [ // Add the paths which you don't want to appear in the views
'vendor/filament' // Exclude Filament components by default
],
],
'route' => [
'label' => true, // show complete route on bar
],
'session' => [
'hiddens' => [], // hides sensitive values using array paths
],
'symfony_request' => [
'hiddens' => [], // hides sensitive values using array paths, example: request_request.password
],
'events' => [
'data' => false, // collect events data, listeners
],
'logs' => [
'file' => null,
],
Expand Down Expand Up @@ -244,6 +284,15 @@
*/
'route_prefix' => '_debugbar',

/*
|--------------------------------------------------------------------------
| DebugBar route middleware
|--------------------------------------------------------------------------
|
| Additional middleware to run on the Debugbar routes
*/
'route_middleware' => [],

/*
|--------------------------------------------------------------------------
| DebugBar route domain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePhpdebugbarStorageTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
public function up(): void
{
Schema::create('phpdebugbar', function (Blueprint $table) {
$table->string('id');
Expand All @@ -30,13 +28,12 @@ public function up()
$table->index('meta_method');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('phpdebugbar');
}
}
};
Loading

0 comments on commit fb9bbe2

Please sign in to comment.