Working on modernizing some rather old code, I pulled in composer and performed some psr-4
namespacing/autoloading configuration (really large app).
The main process is building out the initial data structure from a soap based backend, objects are being created and functioning fine. However, I’ve run into snag.
This app has the option to save an instance of a job which simply dumps the object model with state to an xml file (in the form of cdata), which gives the user the ability to reload the saved file at a later time without having to go back through the soap interface.
The problem I seem to be having is the unserialize process (with the new cdata) does not like the namespace naming convention, e.g., what used to be ProjectManager
is now MyApp\ProjectManager
and when I attempt to unserialize I get a big fat false
.
In hopes of determining what the problem was I used this site:
https://www.functions-online.com/unserialize.html
which indicated that using MyApp\ProjectManager
as the object name was illegal. This is just one of many objects that are now getting saved with the namespace structure and I’m trying to find a way to make it work with the namespaces intact. Any help on this would be greatly apprecicated.
thanks,
Karl