You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Serializing an entity immediately after creating it results in an error #90
What exactly is currentService being used for? Currently I can only see it being set, and not being read anywhere except to throw the mentioned exception. getCurrentService() does not seems to be used.
And why must it be set if it's not used anywhere?
If it is absolutely necessary to have, can the check be moved elsewhere so it doesn't interfere with the simple process of serializing the entity's properties?
I believe it used to provide some serialization context for the SOAP API, equivalent to the context of a Symfony Serializer. It somehow ended up in the entity itself rather than on the serializer. Now that support for the SOAP API has been dropped it is no longer necessary, I think.
Do you think it can be removed in its entirety? It would be nice to get rid of legacy code like this.
In theory, as I don't see it being used anywhere, it should be possible to remove it entirely without affected anything else in the package. I of course don't know if there are any implementations that may use the currentService property.
Activity
firstred commentedon Jan 17, 2024
I believe it used to provide some serialization context for the SOAP API, equivalent to the context of a Symfony Serializer. It somehow ended up in the entity itself rather than on the serializer. Now that support for the SOAP API has been dropped it is no longer necessary, I think.
Do you think it can be removed in its entirety? It would be nice to get rid of legacy code like this.
daniel-memo-ict commentedon Jan 22, 2024
In theory, as I don't see it being used anywhere, it should be possible to remove it entirely without affected anything else in the package. I of course don't know if there are any implementations that may use the currentService property.
SanderFlooris commentedon Apr 3, 2025
We use this package to get the nearest PostNL pickup points and we recently ran into this issue while migrating to V2.
Not sure what the exact cause/solution is, but this seemed to fix it for us.
After this it was able to JSON serialize it properly without throwing a
ServiceNotSetException.