I have a file created with classpreloader and some custom code which compresses a bunch of class files into a single file for distribution:
According to travis this fails on everything except nightly, with an error:
Fatal error: unknown class Kint_Renderer_Text in /home/travis/build/jnvsor/kint/build/kint.php on line 315
As you can see on line 315 is a class Kint_Renderer_Plain extends Kint_Renderer_Text
which is defined later in the file with class Kint_Renderer_Text extends Kint_Renderer
on line 418.
One would assume that this means class order in a single file is significant.
But when I sort()
the source files before building the release file, travis says that everything went perfectly smoothly, despite the fact that the new file also has similar cases:
For example, class Kint_Object_Closure extends Kint_Object_Instance
on line 1249 and class Kint_Object_Instance extends Kint_Object
on line 1352
So the question becomes: What exactly are the ordering requirements for classes in PHP?