-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Postgresql] Serialization/Unserialization error while using non-public fields on jobs #42
Comments
A repository demonstrating this problem would be helpful as I’ve definitely used jobs with non-public fields before without any issues. |
Hi again, I have tested both on postgres12, on my host machine, and postgres13 inside the docker and the issue exists for both of them. If you need anything, I am here to help. Thanks 👍 |
Thanks for the repo. I'll try and have a look at it soon 👍 |
So my first hunch is that it’s related to this paragraph from PHP's
I'll try adjusting the migration to create a BLOB field instead of TEXT and see if it changes anything. This might also be worth adding to our CI pipeline. |
FYI, Laravel itself had the same problem and the way they fixed it was to check if the Postgres driver was used and then @stevebauman Thoughts? |
From a quick test, using the custom |
@abdullahcanakci Can you check out #51 and see if that fixes your error? You can require this branch by using |
Thanks so much, works as expected |
Thanks for reporting and for providing a reproduction repo :) |
Hi, I recently started using this package but stumbled upon an issue around non-public fields on jobs.
If a job has a non-public field PHP \unserialize function places a
\0\0
value in front of it. When this serialized string is transferred into DB and it is accepted as a null-terminated string and as expected half of it is missing. So when this package tries to unserialize the string, it does not work.Currently, I made them public to overcome the issue but another solution might be possible. I thought about SerializesModels but, trait usage can not be checked against. So don't really know about it.
Currently, I don't have the repro but if requested I can whip something up.
laravel/framework v8.83.4
ksassnowski/venture 3.5.0
php8.1
Postgres 12
The text was updated successfully, but these errors were encountered: