tomasnorre / crawler

Libraries and scripts for crawling the TYPO3 page tree. Used for re-caching, re-indexing, publishing applications etc.
GNU General Public License v3.0
54 stars 84 forks source link

Unwanted PHP warning for failed unserialize #1090

Closed ulrichmathes closed 3 weeks ago

ulrichmathes commented 2 months ago

Bug Report

Current Behavior JsonCompatibilityConverter:53 rises PHP warning

Expected behavior/output When JsonCompatibilityConverter tries to unserialize a string and fails, there should be no warning. There is a try catch block, but unserialize emits a warning instead of throwing an exception.

Steps to reproduce I think JsonCompatibilityConverterTest will rise this warning but unitTests are configured as failOnWarning="false".

Environment

Possible Solution suppress the warning via @unserialize instead of not applying try catch?

Additional context This issue is caused by the change in PHP 8.3:

8.3.0 Now emits E_WARNING when the passed string is not unserializeable; previously E_NOTICE was emitted.

github-actions[bot] commented 2 months ago

Hi there, thank you for taking your time to create your first issue. Please give us a bit of time to review it.

tomasnorre commented 2 months ago

This looks like it could be related to #1087, do you agree?

ulrichmathes commented 2 months ago

Same root but in my case both commands crawler:buildQueue and crawler:processQueue proceed running while generating a lot of warnings.

ulrichmathes commented 2 months ago

But yes, we could close this issue as its not really relevant if the command is running but rising warnings or gets terminated after the first warning.

tomasnorre commented 3 weeks ago

I'll close this issue as @ulrichmathes suggested.