Closed RiseAndCry closed 4 months ago
Hello There,
Can you validate if the error still exists when you change the property visibility to protected
on all classes?
I have a gut feeling it is related to the behaviour decribed here: https://github.com/veewee/reflecta/issues/5
SInce the property is declared private in a child-class, PHP's soap-client will set a public property on the parent type instead. In that case, the error makes sense.
Yeap, protected
properties work !
Thank you very much, this saved me quite a bit of time troubleshooting :)
And thanks for your contributions and such a fast response !
Hello there @RiseAndCry ,
I wanted to get back to this issue: We are finishing up v4 of the soap-client package which uses a new encoding system internally. With this new system, you should be able to get around this issue more easily.
We are eager to receive some early feedback on this new release. If you got some time, feel free to play around with the alpha version:
Bug Report
Summary
When using auto generated classes for response handling, i get this error:
Typed property ...\BaseReturnType::$ReturnCode must not be accessed before initialization
Current behavior
Accessing property which has a value set does not work.
How to reproduce
Response class (auto generated):
getReturnCode()
on it - it throwsTyped property ...\BaseReturnType::$ReturnCode must not be accessed before initialization
error.When i debug this BaseReturnType (after executing request), i get such a response (partial):
(Bankruptcies comes from SubClass)
which means the values have been set (as expected).
Expected behavior
Calling
getReturnCode()
should return the value instead of throwing an error:I noticed a few weird things though:
getReturnCode()
i directly access the property via$returnType->ReturnCode
- it works. But it's a private variable, so... ehh ??? noCannot access private property ...
error ? i'm really confused.ReturnCode
(999) - it shows up as an additional variable (both in BaseReturnType and in SubClass) ???