Problem/Motivation
Before 2.3.6 composer throws to logs
> Drupal\Core\Composer\Composer::upgradePHPUnit
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php on line 881
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php on line 886
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php on line 881
PHP Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /var/www/html/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php on line 886
Steps to reproduce
https://github.com/composer/composer/commit/c27dca83ef21bd44c41c1a60dd2e... fixes it
see https://dispatcher.drupalci.org/job/drupal_patches/138522/artifact/jenki...
Proposed resolution
require ^2.3.6
and upgrade composer to 2.3.10
Remaining tasks
review/commit
User interface changes
no
API changes
no
Data model changes
no
Release notes snippet
Drupal 10 requires Composer version 2.3.6 or higher to support Automatic Updates and PHP 8.2. Core developers must update to at least Composer 2.3.6 to work on Drupal core, and site owners may also receive a warning or error about older Composer versions in the future.
Comment | File | Size | Author |
---|---|---|---|
#18 | 3298396-18.patch | 2.34 KB | andypost |
Issue fork drupal-3298396
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
andypostthe patch
Comment #3
ameymudras CreditAttribution: ameymudras at Salsa Digital commentedThanks Andy,
+1 for RTBC
Comment #4
andypostAs commit in IS explains the required version is at least 2.3.6 (currently core requiring 2.3.5)
So improve title and newer patch to bump requirement as well
Comment #5
andypostfixed IS
Comment #7
SpokjeUnsure myself, but since we're bumping the composer version in the root
composer.json
from 2.3.5 to 2.3.6, shouldn't we also be doing this in\Drupal\Composer\Composer::ensureComposerVersion
?Comment #8
andypostGood catch, fixed
Comment #9
andypostinterdiff for #8
Comment #10
SpokjeThanks @andypost, created #3299984: \Drupal\Tests\Composer\ComposerTest::testEnsureComposerVersion not testing what we expect. as a spin-off issue since that test still passes without being changed.
This issue is RTBC for me:
-
composer/composer
min version incomposer.json
is raised to 2.3.6,-
composer.lock
gets version 2.3.10, which is what would happen in an Update-All-The-Dependency-Things!-issue just before the official release anyway.-
\Drupal\Composer\Composer::ensureComposerVersion
ups its min version to 2.3.6 as well.I _think_ we can fix/delete the test mentioned in the first sentence in that separate issue?
Comment #11
SpokjeCrap, we actually need a separate
10.1.x
version of the patch. (Wonder how patch #4 got away with just a single patch for both branches). Sorry, back to NW.Comment #12
andypostpatch for 10.1.x
Comment #13
andypostComment #14
SpokjeThanks @andypost, back to RTBC (see #10)
Comment #16
catchCommitted/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!
I think we could do with a 9.5.x version here that bumps the version but not the requirement.
Comment #18
andypostBump for 9.5 makes sense as at least the commit fixes weird behavior https://github.com/composer/composer/commit/3ebd66b85108e5da3585371aa1de...
Anyway bumping version without requirement (FYI the commit from IS exists in 2.2.13 so 9.5.x is not affected by the bug)
Comment #20
SpokjeDo we really want to update composer/composer from "2.2.14" to "2.2.17" in an issue originally about bumping "2.3.5" to "2.3.10"?
Besides that: The main reason was originally to get PHP 8.2 working, which seems untestable on 9.x branches?
More importantly: 2.2.14 seems already PHP 8.2 ready: https://github.com/composer/composer/releases/tag/2.2.13
Not saying we shouldn't update composer/composer, but saying I don't think we should be doing it in this issue for PHP 8.2 reasons.
Dunno *shrug*
Comment #21
andypostCI was broken
Re #20 as 9.5 is in development I find it handy to bump all dependenies but maybe for that case it makes sense to file follow-up to update other ones as well a-la #3295520: Update dependencies for Drupal 10.0 and 9.5
Comment #22
catchYes I didn't realise 9.5.x already had the composer commit we needed here, fine to do the update in a general update dependencies issue I think. Moving this one back to fixed against 10.0.x
Comment #23
xjmComment #25
phenaproximaI think the release note could be a little more detailed. What are the implications/impact? Will people be able to even use Drupal (or create new sites) with Composer <2.3.6? Let's elaborate on that a bit.
Comment #26
andypostChanged it to wording from release notes
Comment #27
andypostSuppose it's ok now