Skip to content

registration error in PHP for classes that use other classes #328

@faassen

Description

@faassen

Yesterday I got this error when I started up my PHP test script:

PHP Fatal error:  Xee\SequenceIterator must be registered before Xee\Sequence in Unknown on line 0

XeeSequenceIterator is being returned by a function on XeeSequence (to support the Aggregate interface, by implementing get_iterator, so I figured that caused this problem and I rearranged my code to define XeeSequenceIterator 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions