sahusoftcom/eloquent-image-mutator

Namespace autoload problems

ido567 opened this issue · 4 comments

I don't really know why, but only on production, The autoloading of classes under the 'dist' folder is not working.
Any usage of one of these classes causes "class not found" exception.
I think the problem happens because the 'dist' folder is not capitalized, because the problem is solved when I change the 'dist' folder to 'Dist'.

I just started getting build errors with this a few days ago. It works find on my mac but fails to load the class using bitbucket pipelines. From what I have read so far it shouldn't be a problem but I'm getting one.

For me, it happened only when Elastic Beanstalk (AWS) was installing composer dependencies for me.
I guess it's related to the fact that both of us are using automatic tools to install composer dependencies.

I think its because our deployment systems and in my case app server has a case sensitive filesystem. @mrigankmridul is probably running on a case insensitive filesystem like a default mac.

On my mac I don't have any issues. What is also weird is I don't have issues when running Laravel 5.4 deployments but the problem shows with 5.5. I haven't located what changed to trigger the problem in 5.5 yet.

Have you found any workarounds besides renaming the folder after install?

BTW here is my updated composer post-install-cmd that is now letting my builds pass. This is all that I had to do so hopefully the invalid label on the this ticket can be removed.

"post-install-cmd": [
   "Illuminate\\Foundation\\ComposerScripts::postInstall",
   "php artisan optimize",
   "mv vendor/sahusoftcom/eloquent-image-mutator/src/dist vendor/sahusoftcom/eloquent-image-mutator/src/Dist"
],