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

fix: disable xdebug automatically #325

Closed
Closed
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
13 changes: 13 additions & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
<?php

/*
|--------------------------------------------------------------------------
| Restart If Xdebug Is Loaded
|--------------------------------------------------------------------------
|
| If the Xdebug extension is loaded, the application will automatically
| restart unless the environment variable PINT_ALLOW_XDEBUG is set. This
| ensures the application runs without the performance overhead of Xdebug.
|
*/

(new Composer\XdebugHandler\XdebugHandler('PINT'))->check();

Comment on lines +3 to +15
Copy link

@Zen0x7 Zen0x7 Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want update the bootstrap file, probably you'll need to design a contract for it.

Think about the idea of create a instance just to run one method and after that, release it into the void.

If you read more forward or deep, you'll understand that they bind classes to contracts.

/*
|--------------------------------------------------------------------------
| Create The Application
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"ext-xml": "*"
},
"require-dev": {
"composer/xdebug-handler": "^3.0.5",
"friendsofphp/php-cs-fixer": "^3.66.0",
Comment on lines 25 to 27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a dependency can be convenient but the source must be trustfully.

Of course, composer is safe but is necessary?

The more decoupled and independent something is, the better.

"illuminate/view": "^10.48.25",
"larastan/larastan": "^2.9.12",
Expand Down
100 changes: 48 additions & 52 deletions composer.lock

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