Fix TypeError when editing queued job with invalid JSON payload#468
Merged
dereuromark merged 1 commit intomasterfrom Mar 28, 2026
Merged
Fix TypeError when editing queued job with invalid JSON payload#468dereuromark merged 1 commit intomasterfrom
dereuromark merged 1 commit intomasterfrom
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #468 +/- ##
============================================
+ Coverage 77.03% 77.16% +0.12%
- Complexity 936 938 +2
============================================
Files 45 45
Lines 3166 3184 +18
============================================
+ Hits 2439 2457 +18
Misses 727 727 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4ffea6d to
42a156e
Compare
When invalid JSON is submitted via the data edit form, the JsonableBehavior threw a TypeError because json_decode returned null but the return type was array. Changes: - Update _fromJson() to throw InvalidArgumentException with a descriptive error message instead of TypeError - Catch the exception in data() action and show a flash error - Preserve the user's invalid input so they can fix it - Add data_string virtual property annotation to QueuedJob entity - Add test for invalid JSON handling - Fix PHPStan errors: handle nullable description() in example tasks
42a156e to
07bb9a7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/admin/queue/queued-jobs/data/{id}), the JsonableBehavior threw a TypeError becausejson_decodereturnednullbut the return type wasarrayChanges
_fromJson()in JsonableBehavior to throwInvalidArgumentExceptionwith a descriptive error message instead of TypeErrordata()action and show a flash error