Closed fritzmg closed 8 years ago
The CAFile was removed in this commit: https://github.com/composer/composer/commit/592374ea937322b97bb885b673e6b1443fc02604
It is still present in the 1.0.0
release though: https://github.com/composer/composer/blob/1.0.0/res/cacert.pem
This issue cannot be easily worked around either. Even if you set
$GLOBALS['TL_CONFIG']['composerAutoUpdateLibrary'] = false;
in your localconfig.php
and download the 1.0.0 release of the composer.phar, the composer-client
will still auto-update the composer.phar
to the latest snapshot, because !$composerDevWarningTime
will be true in this condition:
if (!$composerDevWarningTime
|| $GLOBALS['TL_CONFIG']['composerAutoUpdateLibrary']
&& ($incompatibleVersion || time() > $composerDevWarningTime)
) {
Runtime::updateComposer();
Messages::addConfirmation($GLOBALS['TL_LANG']['composer_client']['composerUpdated']);
}
/system/modules/!composer/src/ClientBackend.php#L274
So to actually work around it, you have to manually disable those lines of code.
There is actually a new package called composer/ca-bundle
now. It provides the following methods:
CaBundle::getSystemCaRootBundlePath() // Returns the system CA bundle path, or a path to the bundled one as fallback
CaBundle::getBundledCaBundlePath() // Returns the path to the bundled CA file
…
composer/composer/issues/5188 https://github.com/composer/composer/pull/5177#issuecomment-208416720
hotfix/0.16.4
seems to work fine on tested affected systems
With hotfix/0.16.4 I got
[ContaoCommunityAlliance\Composer\Plugin\DuplicateContaoException]
Warning: Contao core was about to get installed but has been found in project root, to recover from this problem please restart the operation
Did you do what the warning said? i.e. start the composer update again?
Or are you stuck in an infinite update loop? I got the same problem once with hotfix/0.16.3
: #278
Someone on the forum is also stuck in such a loop: https://community.contao.org/de/showthread.php?61071-Paketverwaltung-Problem-open_basedir-composer&p=405740&viewfull=1#post405740
@Olli download composer 1.0.2 and copy to /composer
, then try to run the composer update again and see if that fixes the update loop.
Did fix nothing. I got the same error (https://github.com/contao-community-alliance/composer-client/issues/288#issuecomment-211278833). 10 times starting update doesn't help. I got this error on console.
get another error with hotfix/0.16.4 and composer 1.0.2 phar:
Fatal error: Uncaught exception 'PharException' with message '__HALT_COMPILER(); must be declared in a phar' in /xxx/contao/update.phar.php:22 Stack trace: #0 /xxx/contao/update.phar.php(22): Phar::webPhar('update.phar.php', 'index.php', '', Array, 'phar_rewrite') #1 {main} thrown in /xxx/contao/update.phar.php on line 22
@Floxn when exactly do you get that error?
when i start the live update
The Live Update? Do you mean the composer update? i.e. when you click on "Update packages"?
yes the live update
got the error of your first post on live update, too
Sorry, I am still confused. The contao live update is something completely different. Are you refering to "Update packages" in the "Package management"?
Oh Sorry, just mixed up the composer and live update.
Hi. The hotfix is working fine at the beginning, but sooner or later I have the same problems again. I think after "legacy packages repository was added to root composer.json" it stops working. It stops working, when I migrate extensions or I want to install a package. Fresh installation of the hotfix on a fresh Contao 3.5.12. I have the same error mentioned in the opening thread.
Are you sure you get the exact same error? Did you upgrade and by accident therefore then downgraded the composer-client from hotfix back to 0.16.3?
Yes, based ob the error.log. I had the same idea of a downgrade, but how can i check this why could this happen?
Thanks - works fine. :)
With the newest
composer.phar
andcomposer-client
0.16.3
the following error happens when accessing the package management in the backend:This will probably affect a lot more installations soon, as more
composer.phar
files get auto-updated.