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

Print a warning when exit is ignored #174

Open
rsov opened this issue Aug 2, 2024 · 2 comments
Open

Print a warning when exit is ignored #174

rsov opened this issue Aug 2, 2024 · 2 comments
Labels

Comments

@rsov
Copy link

rsov commented Aug 2, 2024

I went down a rabbit hole today in attempts to fix my application after it started crashing and returning HTML from JSON endpoints

Would it be easy to drop a warning to error_log or stdout to communicate that uopz ignored exit command?

Or at least make that behavior opt in?

I am not the first one to encounter this and probably won't be the last

@cmb69
Copy link
Collaborator

cmb69 commented Aug 2, 2024

Well, you can activate the uopz.exit INI directive to avoid that. Note that changing the default behavior of uopz has been rejected; adding a warning is probably off the table as well.

And note that this extension is barely maintained for years, and may break with new PHP versions; if you still use it for testing purposes, consider to rewrite your code, so it can be tested without uopz.

@rsov
Copy link
Author

rsov commented Aug 4, 2024

Biggest gotcha to me was just installing a library changes how the language works. And it does that in quite silent way, so from my perspective every application on dev server just starts misbehaving, not actually crashing or showing warnings / errors

Expectation is a library should extend current capabilities, without changing the core, unless explicitly specified

I do agree with you, a refactor is probably a better investment in the long run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants