-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autoload_classmap.php file empty after running composer commands #5707
Comments
The same issue, the same environment and framework. |
Discussion about problem by other people https://laracasts.com/discuss/channels/general-discussion/composer-generating-autoload-files-fails |
The best solution for now - downgrading to Composer 1.2.0 |
I'll try to downgrade it but how can I do that? |
@Rufflesaurus , just |
Do you have a way to reproduce this without artisan? I'm not going to install laravel global plugins just to get this working. If you do not have any other way to reproduce this, then I think we can conclude that this is not a composer bug, but a laravel bug instead. |
I think it's hard to reproduce this problem because it only happens from time to time, usually when the It's ok for now, I'll report back if it happens again. |
OK closing this for now but please come back to us with details if you find a way to reproduce it reliably. Downgrading to 1.2.0 is not a solution btw, if downgrading really helps, then we need to figure out what broke in 1.2.1 and fix it. |
I can reproduce an empty autoload_classmap.php file using
for composer.php |
@coldlamper what version do you get installed? Because 1.8.0 has no autoload definitions at all, so that doesn't mean anything. |
I think it's 1.8.9 |
It would be nice if you could take the time to check and confirm. Cause the difference is quite significant. |
Sorry it is installing 1.8.0. I believe it should be installing 1.8.9, correct? |
1.8.9 has a bunch of requirements like it needs ext-xmlwriter and ext-simplexml, maybe you don't have those so it is downgrading to 1.8.0 which does not have the requirements. Try requiring 1.8.9 explicitly and it should tell you why it is not installable. |
Using "authorizenet/authorizenet": "1.8.9"
|
next step: contact the authorizenet maintainers to ask them to allow installing their package on PHP 7 (their PHP requirement tells composer that it cannot be used on PHP 7) |
For now you can get around this by using the |
It looks like the problem is back once I ran I didn't use any commands for a few days and just before I started using them again I ran composer update and something brought the problem back. Still trying to figure out what might be causing the problem but I have a hard time reproducing it so you can test it on your own. |
I had the same error. I think it is not related to composer. My configuration is: Windows host, vagrant with Debian quest and nfs sharing enabled, composer 1.2.1.
After this operation (called with success) content of this file is still empty. I removed this file ( I think problem is related to permissions of this file or problems with sharing files between host -> quest in vagrant... I hope I will help someone :) |
@jural I tried deleting all of the autoload files inside the composer folder and running |
I can confirm this problem, multiple of our developers faced it within the last weeks. Sometimes we could solve it by deleting the |
Not a vagrant problem, I just got this running native on Linux and PHP 7.1. |
In my case (using Homestead) this seems to be fixed by removing type: "nfs" from the folders section in Homestead.yaml. |
@andrei930 Yes that solves the problem, but without NFS the VM is significantly slower, so that's not really a solution. |
Apparently I was using an outdated version of vagrant-winnfsd. For me it's fixed by updating to the latest version (1.3.1). |
Anybody found a "proper" solution for this? Halting / killing is kind of hacky. |
You can try to use SMB instead of NFS, I am not really aware of the consequences though. Otherwise, I am happy to share the script we ended up with you guys:
Just put that in a bash file on your host machine and execute it once NFS crashed. |
@spiritix that's exactly what we're doing as well, but I thought maybe |
@YOzaz Already reported that to the |
@spiritix Damn, I also encountered this problem, based on your recommended solution, is in the local new bash file, the script writing, run it, as I so, operation is still running |
@szlwl what? |
Had the exact same problem. Windows 10, Version 1803, Build 17134.228 Not using NFS isn't really a solution for me, as it increases page load times from ~2 sec to ~10 sec, sometimes even more. Seems to be solved by setting these NFS mount options:
I hear that UDP isn't ideal, but it works; on TCP the VM would just freeze on me after ~15 minutes of inactivity, never to recover. BTW, another and probably related issue, after running Excluding the whole synchronized folder from the Windows Defender "workspace" seems to do the trick, at least up till now it has – might work in this case for you too. Also, since then I updated all the tools to their current versions (Vagrant 2.1.2, VirtualBox 5.2.16, WinNFSd 1.4.0, Homestead 7.14.2) and now I'm having zero issues, so I recommend updating everything too. |
Hey,
I work on a Laravel project and whenever I run
composer install / update, dump-autoload
or anyphp artisan
commands, everything works fine for the first time, but when I run another composer / artisan command after that, I get the following error:I noticed that the
autoload_classmap.php
file is empty, so for a quick temporary fix, I deleted the composer folder and just runcomposer install
.I've deleted the vendor folder completely and rerun
composer install
but that seems to work temporary. I still get the same error on the second composer / artisan command.I am using PHP 7.0.10 and Vagrant + Docker as my environment. I use a local
composer.phar
file inside the application container.When I run
composer self-update
I get:The weird part is that my colleague is using the same docker environment and he doesn't have this problem. Also, this happens to this project only.
If you need any more information, let me know.
Any ideas what might be the problem?
The text was updated successfully, but these errors were encountered: