-
Notifications
You must be signed in to change notification settings - Fork 58
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
Unreasonable use of JSON_FORCE_OBJECT in PersistenceStrategies' implementations #87
Comments
Merged
I disagree with closing it. Just because no presently existing unit test fails or changes doesn't mean the implementation ist correct. |
It's already fixed with v1.3.1 incl tests.
…On Jun 23, 2017 22:12, "Adrian Föder" ***@***.***> wrote:
I disagree with closing it. Just because no presently existing unit test
fails or changes doesn't mean the implementation ist correct.
It *coincidentally* works when reconstituting from the database, but the
intermediate format is incorrect as a matter of fact and I propose fixing
it...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#87 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYEvJu-RZZD0DBSrjeXhzjPH9RMdsU2ks5sG8fogaJpZM4OAs9j>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In every implementation of
\Prooph\EventStore\Pdo\PersistenceStrategy::prepareData
there are json_encode occurrences with the JSON_FORCE_OBJECT flag set:This results in plain arrays being handled like objects, i.e.
array('hoo', 'ray')
results in{"0":"hoo","1":"ray"}"
(3v4l example)From the PHP docs:
Please reconsider its necessity.
// additional note: decoding it back with second argument (assoc) true will restore a properly indexed array: https://3v4l.org/Brr7i
The text was updated successfully, but these errors were encountered: