Import failing when trying to run yii1 with yii2

I am trying to run Yii1 together with Yii2, as described in the official documentation.

Unfortunately, my [font=“Courier New”]Yii::import()[/font] statements seem to be failing in a weird way - all statements of the form [font=“Courier New”]import(‘something.other.*’)[/font] work just fine, while [font=“Courier New”]import(‘something.other.ParticularClass’)[/font] fail, with an error message like


include(UrlRoute.php): failed to open stream: No such file or directory

If I change a particular import into an asterisk import, it works fine and imports the class. It also works to change in into an explicit [font="Courier New"]require()[/font].

I followed the linked documentation, and, except for path differences, my classes look just like in there. I would appreciate any hints as to what might be causing this behaviour.

The forums forbids me from posting links, but if I also asked this on StackOverflow.

I don’t see the file named UrlRoute.php in Yii 2 and Yii so I guess this is your file, right?

Check the file name for case sensitive differences, maybe its true name is Urlroute.php instead? Common thing when switching from Windows to Unix.

UrlRoute is my file indeed. The problem persists across many files, and has no relation to case. This is seems to be something much more subtle, unfortunately.