-
Notifications
You must be signed in to change notification settings - Fork 64
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
registration error in PHP for classes that use other classes #328
Comments
The error in question appears to be caused by
The only other place where it's used is in This is used in |
I haven't traced the PHP source further, but it's plausible to conclude that A potential way to solve this is to sort the classes in topological order: if we know a class references another one in its method signatures, we register that one before we register the other class. A problem is that we don't know this until all methods are registered with the |
Another possible way to fix this is to see when these checks happen and whether they can't be deferred until all classes have been registered with PHP. Looking from the registration end, Unfortunately I can't find my way through this code so twee what triggers I've also looked through the constants defind in |
Yesterday I got this error when I started up my PHP test script:
XeeSequenceIterator
is being returned by a function onXeeSequence
(to support theAggregate
interface, by implementingget_iterator
, so I figured that caused this problem and I rearranged my code to defineXeeSequenceIterator
earlier.But today I added some unrelated code and the problem happened again. When I moved the new, unrelated code to the bottom of the Rust module, the problem went away, but this makes me feel uneasy! So this issue is to report the behavior and I will dig into the possible causes a bit next.
It feels as if registration order is more or less random, and this is why sometimes the problem occurs and sometimes it doesn't.
I've spun this off from #327 as I think the macro errors mentioned there aren't necessarily connected to this error, even though it also seems to be a registration order related issue.
The text was updated successfully, but these errors were encountered: