panique/mini3

[TODO] Change "libs" folder name to "Libs"

ugurozturk opened this issue · 12 comments

Hi, i having problem like class finding error. I had everything worked on my local server but the remote server is failing.

"Fatal error: Class 'Mini\Core\Application' not found in /home/askothersn/public_html/public/index.php on line 37"

Am i have to run composer at remote server also ?

Both php version is 5.6

Please check the docs of Composer! For sure you need your dependencies in all enviroments, how should your application work otherwise if stuff you include / autoloader is not there ?

@panique i did upload autoloader from my local, and as i said everything works in my local. I wanted to know if i have to re-run composer at hosting too

sure you have ! please read into composer, this is essential for PHP development!

FIXED
Solution : changed the core and application.php to Core and Application.php. Yes, just make the first character of folder/file name to UPPER.

Did spent around 5hour while searching and doing everything and found it. In the windows local machine nothing was wrong but in the remote Linux based server had problem.

I actually had the same error. I was just trying this out for the first time. I did a git clone and composer install on my Ubuntu dev server and it gave that error. I had to rename "core" to "Core", "application.php" to "Application.php" and then move "HomeController.php" and "SongsController.php" from the "controller" directory to the "Controller" directory where "ErrorController.php" was already sitting.

@snickbit can you give more information about the enviroment used ? The auto-installer uses a standard ubuntu 14.04 LTS and this never happended.

I'm using Ubuntu 14.04.4 and PHP 5.5.9.

I'm a little confused as to why there are two "controller" directories, one capitalized, one not. Since the namespace is case sensitive, wouldn't that make a big difference? Again, as soon as I made the paths match the namespace capitalization, everything worked correctly.

@snickbit Thanks, wow I didn't even saw that there are TWO controller folders! that's reeeeaally weird and defninitly a major bug :( maybe a broken commit or so!

I'll work on a fix right now!

@snickbit @ugurozturk Hey guys, I apologize for everytihng, the project was indeed broken since a little update some days ago :/ No idea why it worked in all tests, however, I've remove the lowercase controller folder, so we only have the Controller folder now, also core folder renamed to Core, and application.php to Application.php (it's exactly what @ugurozturk said), so the autoloader works fine again now!

A big sorry for the circumstances! I'll spend some extra time trying to figure out how these things cannot happen again! Have a great week guys!

I didn't realise at first but also the Libs folder must be start upper letter. Otherwise developers gonna use like "namespace Mini\libs;" .

Thanks, I'll fix this soon!

Hey guys, this is now fixed in develop and master branch! Thanks for the reports!