It seems there is a temporary work around here https://github.com/wikimedia/composer-merge-plugin/pull/189#issuecomment-719514950 or we could try to nag them to merge. Once done we can switch back to upstream buildkit
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Eileenmcnaughton | T267881 Get our repo onto Composer 2 | |||
Resolved | tstarling | T248908 composer-merge-plugin support for composer 2.0 | |||
Resolved | jgleeson | T277500 Update Fundraising tech CI image to use upstream buildkit, no symlink for civicrm | |||
Resolved | jgleeson | T285446 Some of our CI tests are not running | |||
Resolved | None | T289100 Fix civicrm repo to be non-symlinked | |||
Resolved | Eileenmcnaughton | T314995 Decommission Fundraising's crm/civicrm git repo | |||
Resolved | Request | None | T324732 Archive the fundraising/crm/civicrm repo | ||
Resolved | jgleeson | T291897 CiviCRM CI tests failing due to half-resolution of T277500 |
Event Timeline
T248908: composer-merge-plugin support for composer 2.0 is our task for this
The upstream PR is still WIP
I don't believe there's any major features to be gained; in most cases, I don't think there's any good reason to rush upgrading, beyond the fact composer self-update etc by default does unbounded upgrades to 2.x
Yeah - the composer compatibility issue is the issue - I've managed to work around it for now in the docker image I'm trying to get going but we've had to fork an upstream repo to get there.
One of many problems of people using unbound/non specific depedancies. Stable releases change and then things break :)
Well yeah - in this case I suspect we would be better to fork composer-merge plugin & unfork the other but we'll see what happens
You’ve got upstream commit access...
Wouldn’t it be easier to just pin (or download 1x using https://getcomposer.org/composer-1.phar rather than the generic unspecific urls) composer there? I’m presuming no one has a workflow that means they *must* have composer 2.x yet
Forking the merge plugin when it doesn’t have a complete fix seems excessive
Well at the moment we have forked an open source library that we use heavily in order to lock composer to 1.0 for the merge-plugin - but it feels like the tail is wagging the dog. If the work on the composer merge plugin is kinda moving then it makes sense to just wait a bit
@AMooney and @MNadrofsky, here is more support for your teams working on T248908: composer-merge-plugin support for composer 2.0
Change 664514 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm@master] Update composer merge plugin
Composer merge plugin is fixed upstream now. Lets
- get onto version 2
- remove our buildkit version 1 hack
- switch CI & our dev installs to use the upstream buildkit & stop using our one
Would also close out https://phabricator.wikimedia.org/T126266
I moved this back into triage as getting this done will remove an ongoing pain point and the work involved now is probably less than the ongoing pain
Change 669977 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm@master] Upgrade wikimedia/composer-merge-plugin to version 2
Change 669993 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm-buildkit@master] Switch to composer 2
It seems that updating composer-merge-plugin without running a free range composer update is tricky - just recording our current install set
addshore/psr-6-mediawiki-bagostuff-adapter | 0.1 | 0.1 | A MediaWiki BagOStuff PSR-6 adapter library |
amzn/login-and-pay-with-amazon-sdk-php | dev-master 0c923fe | dev-master 0c923fe | Pay with Amazon SDK |
clio/clio | 0.1.8 | Lightweight utility and helper classes for CLI applications | |
clue/stream-filter | v1.4.1 | A simple and modern approach to stream filtering in PHP | |
coderkungfu/php-queue | 1.0.0 | A unified front-end for different queuing backends. Includes a REST serv... | |
cogpowered/finediff | 0.3.1 | PHP implementation of a Fine granularity Diff engine | |
composer/ca-bundle | 1.1.1 | Lets you find a path to the system CA bundle, and includes a fallback to... | |
consolidation/annotated-command | 2.12.0 | Initialize Symfony Console commands from annotated command class methods. | |
consolidation/output-formatters | 3.5.0 | Format text by applying transformations provided by plug-in formatters. | |
corneltek/getoptionkit | 2.6.0 | Powerful command-line option toolkit | |
dflydev/dot-access-data | v1.1.0 | Given a deep data structure, access data by dot notation. | |
dnoegel/php-xdg-base-dir | v0.1.1 | implementation of xdg base directory specification for php | |
drush/drush | 8.3.2 | Drush is a command line shell and scripting interface for Drupal, a veri... | |
firebase/php-jwt | v5.0.0 | A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Shou... | |
geo6/geocoder-php-addok-provider | dev-master 5030967 | Geocoder addok adapter | |
geocoder-php/common-http | 4.2.0 | Common files for HTTP based Geocoders | |
geocoder-php/free-geoip-provider | 4.1.0 | Geocoder FreeGeoIp adapter | |
geocoder-php/google-maps-provider | 4.4.0 | Geocoder GoogleMaps adapter | |
geocoder-php/here-provider | dev-master d6b96e1 | Geocoder here adapter | |
geocoder-php/mapquest-provider | dev-master 92d39fb | Geocoder MapQuest adapter | |
geocoder-php/nominatim-provider | 5.1.0 | Geocoder Nominatim adapter | |
geoip2/geoip2 | v2.9.0 | MaxMind GeoIP2 PHP API | |
google/apiclient | v2.2.2 | Client library for Google APIs | |
google/apiclient-services | v0.64 | Client library for Google APIs | |
google/auth | v1.3.2 | Google Auth Library for PHP | |
guzzlehttp/guzzle | 6.5.5 | Guzzle is a PHP HTTP client library | |
guzzlehttp/promises | v1.3.1 | Guzzle promises library | |
guzzlehttp/psr7 | 1.6.1 | PSR-7 message implementation that also provides common utility methods | |
ircmaxell/password-compat | v1.0.4 | A compatibility library for the proposed simplified password hashing alg... | |
jackgleeson/stats-collector | v1.4.10 | Lightweight utility to record, combine, retrieve and export statistics a... | |
league/csv | 9.3.0 | Csv data manipulation made easy in PHP | |
maxmind-db/reader | v1.3.0 | MaxMind DB Reader API | |
maxmind/minfraud | v1.7.0 | MaxMind minFraud API | |
maxmind/web-service-common | v0.5.0 | Internal MaxMind Web Service API | |
monolog/monolog | 1.25.1 | Sends your logs to files, sockets, inboxes, databases and various web se... | |
mrmarkfrench/silverpop-php-connector | 1.5.0 | A connector SDK lcd ibrary for applications integrating with Silverpop, ... | |
neitanod/forceutf8 | v2.0.1 | PHP Class Encoding featuring popular Encoding::toUTF8() function --forme... | |
nikic/php-parser | v4.4.0 | A PHP parser written in PHP | |
omnimail/omnimail | dev-master ad24ded | PHP Omnimail | |
paragonie/random_compat | v2.0.17 | PHP 5.x polyfill for random_bytes() and random_int() from PHP 7 | |
pear/console_table | v1.3.1 | Library that makes it easy to build console style tables. | |
php-http/discovery | 1.4.0 | Finds installed HTTPlug implementations and PSR-7 message factories | |
php-http/guzzle6-adapter | v1.1.1 | Guzzle 6 HTTP Adapter | |
php-http/httplug | v1.1.0 | HTTPlug, the HTTP client abstraction for PHP | |
php-http/message | 1.6.0 | HTTP Message related tools | |
php-http/message-factory | v1.0.2 | Factory interfaces for PSR-7 HTTP Message | |
php-http/promise | v1.0.0 | Promise used for asynchronous HTTP requests | |
phpmailer/phpmailer | v5.2.28 | PHPMailer is a full-featured email creation and transfer class for PHP | |
phpseclib/phpseclib | 2.0.11 | PHP Secure Communications Library - Pure-PHP implementations of RSA, AES... | |
predis/predis | v1.1.1 | Flexible and feature-complete Redis client for PHP and HHVM | |
psr/cache | 1.0.1 | Common interface for caching libraries | |
psr/http-message | 1.0.1 | Common interface for HTTP messages | |
psr/log | 1.0.2 | Common interface for logging libraries | |
psy/psysh | v0.10.3 | An interactive shell for modern PHP. | |
ralouphie/getallheaders | 3.0.3 | A polyfill for getallheaders. | |
respect/validation | 1.1.22 | The most awesome validation engine ever created for PHP | |
symfony/console | v3.4.39 | Symfony Console Component | |
symfony/debug | v3.4.39 | Symfony Debug Component | |
symfony/event-dispatcher | v2.8.44 | Symfony EventDispatcher Component | |
symfony/finder | v3.4.39 | Symfony Finder Component | |
symfony/http-foundation | v2.8.44 | Symfony HttpFoundation Component | |
symfony/polyfill-ctype | v1.22.1 | Symfony polyfill for ctype functions | |
symfony/polyfill-intl-idn | v1.18.1 | Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions | |
symfony/polyfill-intl-normalizer | v1.18.1 | Symfony polyfill for intl's Normalizer class and related functions | |
symfony/polyfill-mbstring | v1.9.0 | Symfony polyfill for the Mbstring extension | |
symfony/polyfill-php55 | v1.9.0 | Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions | |
symfony/polyfill-php70 | v1.18.1 | Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions | |
symfony/polyfill-php72 | v1.18.1 | Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions | |
symfony/var-dumper | v3.4.39 | Symfony mechanism for exploring and dumping PHP variables | |
symfony/yaml | v3.4.31 | Symfony Yaml Component | |
twig/twig | v1.44.2 | Twig, the flexible, fast, and secure template language for PHP | |
webflo/drupal-finder | 1.2.0 | Helper class to locate a Drupal installation from a given path. | |
webmozart/assert | 1.3.0 | Assertions to validate method input/output with nice error messages. | |
webmozart/path-util | 2.3.0 | A robust cross-platform utility for normalizing, comparing and modifying... | |
wikimedia/civicrm-data-table-provider | 4.0.0 | CiviCRM datatable geocoder | |
wikimedia/composer-merge-plugin | v1.4.1 | Composer plugin to merge multiple composer.json files | |
wikimedia/donation-interface | v2.5.1 | Wikimedia Foundation payment processing library | |
wikimedia/omnimail-silverpop | dev-master ff552bc | Silverpop plugin for Omnimail | |
wikimedia/smash-pig | v0.6.7 | The open source PHP flexible payments library and frontend/backend media... | |
willdurand/geocoder | dev-master a85267c | Common files for PHP Geocoder | |
Using composer require --update-no-dev wikimedia/composer-merge-plugin 2.0.1 should do that for you...
Hmm - nope doing that it removed a bunch of packages added in by composer merge plugin (as well as some dev packages which are legit removals)
docker@civicrm:/srv/civi-sites/wmff$ composer require --update-no-dev wikimedia/composer-merge-plugin ^2
./composer.json has been updated
Loading composer repositories with package information Updating dependencies
Package operations: 0 installs, 1 update, 52 removals
- Removing zordius/lightncandy (v0.23)
- Removing willdurand/geocoder (dev-master)
- Removing wikimedia/testing-access-wrapper (1.0.0)
- Removing wikimedia/omnimail-silverpop (dev-master)
- Removing wikimedia/civicrm-data-table-provider (4.0.0)
- Removing theseer/tokenizer (1.1.3)
- Removing seld/jsonlint (1.7.0)
- Removing sebastian/version (2.0.1)
- Removing sebastian/resource-operations (2.0.1)
- Removing sebastian/recursion-context (3.0.0)
- Removing sebastian/object-reflector (1.1.1)
- Removing sebastian/object-enumerator (3.0.3)
- Removing sebastian/global-state (2.0.0)
- Removing sebastian/exporter (3.1.2)
- Removing sebastian/environment (4.2.3)
- Removing sebastian/diff (3.0.2)
- Removing sebastian/comparator (3.0.2)
- Removing sebastian/code-unit-reverse-lookup (1.0.1)
- Removing phpunit/phpunit (7.5.20)
- Removing phpunit/php-token-stream (3.1.1)
- Removing phpunit/php-timer (2.1.2)
- Removing phpunit/php-text-template (1.2.1)
- Removing phpunit/php-file-iterator (2.0.2)
- Removing phpunit/php-code-coverage (6.1.4)
- Removing phpspec/prophecy (1.8.0)
- Removing phpdocumentor/type-resolver (0.4.0)
- Removing phpdocumentor/reflection-docblock (3.3.2)
- Removing phpdocumentor/reflection-common (1.0.1)
- Removing php-http/promise (v1.0.0)
- Removing php-http/message-factory (v1.0.2)
- Removing php-http/message (1.6.0)
- Removing php-http/httplug (v1.1.0)
- Removing php-http/guzzle6-adapter (v1.1.1)
- Removing php-http/discovery (1.4.0)
- Removing phar-io/version (2.0.1)
- Removing phar-io/manifest (1.0.3)
- Removing omnimail/omnimail (dev-master)
- Removing myclabs/deep-copy (1.7.0)
- Removing mrmarkfrench/silverpop-php-connector (1.5.0)
- Removing league/csv (9.3.0)
- Removing jakub-onderka/php-parallel-lint (v0.9.2)
- Removing jakub-onderka/php-console-highlighter (v0.3.2)
- Removing jakub-onderka/php-console-color (0.1)
- Removing geocoder-php/nominatim-provider (5.1.0)
- Removing geocoder-php/mapquest-provider (dev-master)
- Removing geocoder-php/here-provider (dev-master)
- Removing geocoder-php/google-maps-provider (4.4.0)
- Removing geocoder-php/free-geoip-provider (4.1.0)
- Removing geocoder-php/common-http (4.2.0)
- Removing geo6/geocoder-php-addok-provider (dev-master)
- Removing doctrine/instantiator (1.3.1)
- Removing clue/stream-filter (v1.4.1)
- Updating wikimedia/composer-merge-plugin (v1.4.1 => v2.0.1): Loading from cache
Are they all dev dependancies? Numerous of them look to be...
--no-update Disables the automatic update of the dependencies. --no-scripts Skips the execution of all scripts defined in composer.json file. --update-no-dev Run the dependency update with the --no-dev option. --update-with-dependencies Allows inherited dependencies to be updated, except those that are root requirements.
So maybe composer require --no-update wikimedia/composer-merge-plugin ^2 might be what you want
A number of them are but not all - so specifically
Removing league/csv (9.3.0)
is one that should not being going anywhere
Also some are legitimately using dev-master such as willdurand/geocoder (dev-master)
This sequence DOES work (although it updates extras)
- Manually update composer.json to have version ^2 for composer-merge-plugin
- run composer update with no switches
- run composer install --no-dev
I'll try your command now though
dev in this case should means things that are listed in a require-dev somewhere in the heirarchy; following dev-master as the version shouldn't be an issue.
Depending on where it is in the tree, you might want to just explicity add league/csv to the parent composer.json, rebuild, and then try updating...
It was one thing we noticed during the CR of the plugin update, a few behaviours didn't necessarily always run as expected. Worse case, should be running update twice to bring things back again.
Of course, when various dependancies are not explicitly pinned, things will change... So running composer update (with or without --no-dev) first, before changing the plugin etc might help make it all cleaner to review
Yep - I'm just looking to see what composer update will change - it would be nice just to get it all updated in general & if that makes this easier then it might be a good chance to do it
Dang - now CI is failing
14:25:30 Running composer update to apply merge settings
14:25:30 Cannot create cache directory /cache/composer/repo/https---repo.packagist.org/, or directory is not writable. Proceeding without cache
14:25:30 Cannot create cache directory /cache/composer/files/, or directory is not writable. Proceeding without cache
14:25:30 Loading composer repositories with package information
14:25:30
14:25:30
14:25:30 [RuntimeException]
14:25:30 /cache/composer/vcs does not exist and could not be created.
14:25:30
14:25:30
So my thinking on this is that we need to either
- create the cache dir when installing or
- make it a volume - there seems to be stuff on the web indicating this would speed it up as the cache would be shared between runs. This would not necessarily cause issues as the cache should be simplfy downloads
Side note - this kept popping up https://theiconic.tech/how-speeding-up-composer-install-led-to-reducing-php-docker-image-build-time-by-up-to-5-times-12c024f06924
Change 669977 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Upgrade wikimedia/composer-merge-plugin to version 2
Change 669993 merged by Eileen:
[wikimedia/fundraising/crm/civicrm-buildkit@master] Switch to composer 2
Change 664514 abandoned by Eileen:
[wikimedia/fundraising/crm@master] Update composer merge plugin
Reason:
This is done - follow up issue for getting CI to use upstream buildkit in a separate phab