You’re getting the error “The script tried to execute a method or access a property of an incomplete object” after trying to access a property or method of an object you’ve stored in a $_SESSION variable in your PHP.

You’ve probably got some code that looks like this:

… trying to do something with the object, it’ll fail …

Change it to this:

… trying to do something with the object, it’ll work …

As you can see including your class definitions before you start the session (where your object is) is what makes this work.

So sure, makes total sense, PHP needs to know about your class definitions before you can access a session object that makes use of that class.