riquito / Baobab

A library applying the nested set model
http://baobab.sideralis.org
Apache License 2.0
90 stars 27 forks source link

Composer autoload fails on Linux #14

Open eradin opened 4 years ago

eradin commented 4 years ago

Decided to use autoload for my project. Works fine on windows dev system but fails to find Baobab class on production linux server. It turns out, this php code will cause the autoloader to fail.

namespace portal\Core;

class Folder extends \Baobab {
....
}

This is because the composer autoload is defined as a psr-0 loader which requires the baobab.php file to be Baobab.php. It works on windows because windows is not file case sensitive.

This is not an issue if you go the require "baobab.php" route.

To fix this problem, the file should adher to psr-0 naming conventions and be Baobab.php. I simply renamed it to get it to work.