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

Exception message points to Assert code instead of app code from where it was thrown #250

Closed
diimpp opened this issue Jun 8, 2021 · 3 comments

Comments

@diimpp
Copy link

diimpp commented Jun 8, 2021

Sometimes assert points to correct place in the code and sometimes there are useless messages like in the example.
I've no idea what may cause this, but this is my pain for several years now and cannot even find any mention of this issue!

 [2021-06-08 15:47:02] request.CRITICAL: Uncaught PHP Exception Webmozart\Assert\InvalidArgumentException: "Expected a value other than null." at /srv/app/vendor/webmozart/assert/src/Assert.php line 2060 {"exception":"[object] (Webmozart\\Assert\\InvalidArgumentException(code: 0): Expected a value other than null. at /srv/app/vendor/webmozart/assert/src/Assert.php:2060)"} []

Mainly I'm getting this at sylius based projects.

@eugene-borovov
Copy link

Hello fellow countryman! I also faced this problem. I suggested a PR #241 to solve the problem. I hope it will be accepted. In the meantime, you can take a hack from PR and solve the problem through inheritance.

@arjanfrans
Copy link

I had a similar issue, can an idea like this help? #266

@BackEndTea
Copy link
Collaborator

I'm gonna close this, i don't think its worth fixing this with the complexity this introduces

@BackEndTea BackEndTea closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants