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
This code can only generate PHP serialized strings of classes that are in the root namespace. Most PHP classes aren't in the root namespace though, so it would be useful to be able to somehow "set" the namespace.
Ideally, this would work for both the root struct, and any nested structs. For the root, doing this via a MarshalOption seems to make most sense; for nested structs a tag probably makes more sense (or potentially a hybrid, with a MarshalOption.ClassNamespace that is used for everything, which can be overwritten with a MarshalOption.RootClassNamespace and a php:"namespace=" tag).
If you agree this would be an improvement to this package, I'd be happy to create a PR for it.
As an aside, it would (probably) also solve the actual issue behind #31.
The text was updated successfully, but these errors were encountered:
This code can only generate PHP serialized strings of classes that are in the root namespace. Most PHP classes aren't in the root namespace though, so it would be useful to be able to somehow "set" the namespace.
Ideally, this would work for both the root struct, and any nested structs. For the root, doing this via a
MarshalOption
seems to make most sense; for nested structs atag
probably makes more sense (or potentially a hybrid, with aMarshalOption.ClassNamespace
that is used for everything, which can be overwritten with aMarshalOption.RootClassNamespace
and aphp:"namespace="
tag).If you agree this would be an improvement to this package, I'd be happy to create a PR for it.
As an aside, it would (probably) also solve the actual issue behind #31.
The text was updated successfully, but these errors were encountered: