1
A few days ago I’m having a problem in my Composer that doesn’t make much sense (it doesn’t have a fault/standard logic, the errors are almost random), so I’m not able to solve, what happens is the following.
I have a mini framework, and I am updating it as I need the resources, the steps are as follows:
1 - Changing the framework.
2 - I push on github.
3 - I upgrade packagist.
4 - I update the composer
in the project I’m using it (At this stage is the problem)
If I indicate to update only the dependency in question, it works correctly, however, if I give the command 'composer update'
it removes some dependencies (all the time) and installs again, and on top of that does not update the autoloader
if the folder 'vendor/composer'
is not deleted, and to complicate, this process of the update command is taking more than 20 minutes, and originating several alerts like this.
exceeded the timeout of 300 seconds.
But, this update of dependencies are not consistent, IE, are not the same that always update, each time is a different.
NOTE:I checked the repository of the dependencies that update, and most have no change in github/gitlab
but still the composer
identifies that the version I own is different from the version available.
List of dependencies that require updating without being modified more frequently:
Phpdocumentor (This is the one that takes the longest and updates are inconsistent)
Synfony
Doctrine
Guzzlehttp
robinherbots/jquery.inputmask (This updates 100% of the time and takes too long)
cocur/slugify
Components/jquery
zendframework
And when each of these dependencies have other dependencies, they are also updated 100%, taking a long time to complete, when it does not alert errors and/or does not conclude.
And the second problem is the issue of updating the autoload
inside vendor
.
If the file composer.json
is updated to include some namespace
new, and if given command update, it does the whole process, indicates success, but does not include the new namespace
in the autoload
, for this step to work, I need to delete the folder 'vendor/composer'
give command 'composer update'
and wait +- 20 minutes(already reached more than 40) to update everything and I can go back to work.
Additional information:
Test: Ubuntu OS 16.4
Production: Debian OS 7.
PHP: 7. GIT: Last Version.
Permissions for 777 folders.
IDE: Netbeans 8.2
Internet Broadband 50MB Stable.
Composer.json
{
"name": "contabil app center",
"description": "",
"type": "Biblioteca",
"license": "BSD-3",
"version": "1.0",
"authors": [
{
"name": "Gabriel",
"email": ""
}
],
"minimum-stability": "dev",
"require": {
"php": ">=5.3.8",
"guzzlehttp/guzzle": "~6.0",
"slim/pdo": "~1.9",
"cocur/slugify": "dev-master",
"components/jquery": "~3.2.1",
"wixel/gump": "dev-master",
"phpmailer/phpmailer": "^5.2",
"easy-cont/vidb": "dev-master",
"phpdocumentor/phpdocumentor": "2.*"
},
"autoload": {
"psr-4": {
"appModel\\": "model/app",
"appView\\": "view/app",
"appController\\": "controller/app",
"appFinancialRestatement\\":"model/app/calculations/financial-calculations",
"appFinancialIndices\\":"model/app/calculations/financial-calculations",
"appDebitWorksheet\\":"model/app/calculations/financial-calculations",
"appFIPE\\":"model/app/fipe",
"phpToJs\\":"interactors",
"siteModel\\": "model/site",
"indexView\\": "view/site",
"siteController\\": "controller/site"
}
}
}
Play your
composer.json
for us to see what may be happening. But, parenting may be some mistake in your Composer. Which version of it?– juniorb2ss
I added Composer.json at the end of the reply, I’m using the latest version, if I’m not mistaken it’s 1.5.1.
– AnthraxisBR