Patches fail to apply on a fresh D9 site
I am trying to install CiviCRM 5.40 on a fresh Drupal 9 site.
But when running composer require civicrm/civicrm-{core,packages,drupal-8}:'~5.40' --with-all-dependencies
several patches fail to apply:
Console output
./composer.json has been updated
Running composer update civicrm/civicrm-core civicrm/civicrm-packages civicrm/civicrm-drupal-8 --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Lock file operations: 49 installs, 1 update, 0 removals
- Locking adrienrn/php-mimetyper (0.2.2)
- Locking brick/math (0.9.3)
- Locking brick/money (0.5.2)
- Locking cache/integration-tests (0.17.0)
- Locking cache/tag-interop (1.0.1)
- Locking civicrm/civicrm-core (5.40.2)
- Locking civicrm/civicrm-cxn-rpc (v0.20.12.01)
- Locking civicrm/civicrm-drupal-8 (5.40.2)
- Locking civicrm/civicrm-packages (5.40.2)
- Locking civicrm/composer-compile-lib (v0.5)
- Locking civicrm/composer-compile-plugin (v0.16)
- Locking civicrm/composer-downloads-plugin (v3.0.1)
- Locking cweagans/composer-patches (1.7.1)
- Locking dflydev/apache-mime-types (v1.0.1)
- Locking dompdf/dompdf (v1.0.2)
- Locking electrolinux/phpquery (0.9.6)
- Locking firebase/php-jwt (v5.4.0)
- Locking league/csv (9.7.1)
- Locking league/oauth2-client (2.6.0)
- Locking league/oauth2-google (3.0.4)
- Locking marcj/topsort (1.1.0)
- Locking padaliyajay/php-autoprefixer (1.3)
- Locking paragonie/random_compat (v9.99.100)
- Locking pear/auth_sasl (v1.1.0)
- Locking pear/db (v1.10.0)
- Locking pear/log (1.13.3)
- Locking pear/mail (v1.4.1)
- Locking pear/mail_mime (1.10.10)
- Locking pear/net_smtp (1.9.2)
- Locking pear/net_socket (1.0.14)
- Locking pear/validate_finance_creditcard (0.7.0)
- Locking phenx/php-font-lib (0.5.2)
- Locking phenx/php-svg-lib (v0.3.3)
- Locking phpoffice/phpword (0.18.2)
- Locking phpseclib/phpseclib (2.0.33)
- Locking psr/simple-cache (1.0.1)
- Locking sabberworm/php-css-parser (8.3.1)
- Locking scssphp/scssphp (v1.6.0)
- Locking symfony/config (v4.4.27)
- Downgrading symfony/finder (v5.3.4 => v4.4.27)
- Locking symfony/polyfill-php81 (v1.23.0)
- Locking tecnickcom/tcpdf (6.4.2)
- Locking togos/gitignore (1.1.1)
- Locking totten/ca-config (v17.05.0)
- Locking totten/lurkerlite (1.3.0)
- Locking tplaner/when (v3.0.0)
- Locking tubalmartin/cssmin (v4.1.1)
- Locking xkerman/restricted-unserialize (1.1.12)
- Locking zetacomponents/base (1.9.3)
- Locking zetacomponents/mail (1.9.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 49 installs, 1 update, 0 removals
- Downloading cweagans/composer-patches (1.7.1)
- Downloading togos/gitignore (1.1.1)
- Downloading civicrm/composer-downloads-plugin (v3.0.1)
- Downloading totten/lurkerlite (1.3.0)
- Downloading civicrm/composer-compile-plugin (v0.16)
- Downloading dflydev/apache-mime-types (v1.0.1)
- Downloading adrienrn/php-mimetyper (0.2.2)
- Downloading brick/math (0.9.3)
- Downloading brick/money (0.5.2)
- Downloading cache/tag-interop (1.0.1)
- Downloading cache/integration-tests (0.17.0)
- Downloading phpseclib/phpseclib (2.0.33)
- Downloading civicrm/civicrm-cxn-rpc (v0.20.12.01)
- Downloading zetacomponents/base (1.9.3)
- Downloading zetacomponents/mail (1.9.2)
- Downloading xkerman/restricted-unserialize (1.1.12)
- Downloading tplaner/when (v3.0.0)
- Downloading totten/ca-config (v17.05.0)
- Downloading tecnickcom/tcpdf (6.4.2)
- Downloading symfony/finder (v4.4.27)
- Downloading symfony/polyfill-php81 (v1.23.0)
- Downloading symfony/config (v4.4.27)
- Downloading psr/simple-cache (1.0.1)
- Downloading phpoffice/phpword (0.18.2)
- Downloading pear/validate_finance_creditcard (0.7.0)
- Downloading pear/net_socket (1.0.14)
- Downloading pear/net_smtp (1.9.2)
- Downloading pear/mail_mime (1.10.10)
- Downloading pear/mail (v1.4.1)
- Downloading pear/log (1.13.3)
- Downloading pear/db (v1.10.0)
- Downloading pear/auth_sasl (v1.1.0)
- Downloading marcj/topsort (1.1.0)
- Downloading paragonie/random_compat (v9.99.100)
- Downloading league/oauth2-client (2.6.0)
- Downloading league/oauth2-google (3.0.4)
- Downloading league/csv (9.7.1)
- Downloading firebase/php-jwt (v5.4.0)
- Downloading electrolinux/phpquery (0.9.6)
- Downloading sabberworm/php-css-parser (8.3.1)
- Downloading phenx/php-svg-lib (v0.3.3)
- Downloading phenx/php-font-lib (0.5.2)
- Downloading dompdf/dompdf (v1.0.2)
- Downloading tubalmartin/cssmin (v4.1.1)
- Downloading scssphp/scssphp (v1.6.0)
- Downloading padaliyajay/php-autoprefixer (1.3)
- Downloading civicrm/composer-compile-lib (v0.5)
- Downloading civicrm/civicrm-core (5.40.2)
- Downloading civicrm/civicrm-drupal-8 (5.40.2)
- Downloading civicrm/civicrm-packages (5.40.2)
- Installing cweagans/composer-patches (1.7.1): Extracting archive
No patches supplied.
Gathering patches for dependencies. This might take a minute.
- Installing togos/gitignore (1.1.1): Extracting archive
- Installing civicrm/composer-downloads-plugin (v3.0.1): Extracting archive
- Installing totten/lurkerlite (1.3.0): Extracting archive
- Installing civicrm/composer-compile-plugin (v0.16): Extracting archive
- Installing dflydev/apache-mime-types (v1.0.1): Extracting archive
- Installing adrienrn/php-mimetyper (0.2.2): Extracting archive
- Installing brick/math (0.9.3): Extracting archive
- Installing brick/money (0.5.2): Extracting archive
- Installing cache/tag-interop (1.0.1): Extracting archive
- Installing cache/integration-tests (0.17.0): Extracting archive
- Installing phpseclib/phpseclib (2.0.33): Extracting archive
- Installing civicrm/civicrm-cxn-rpc (v0.20.12.01): Extracting archive
- Installing zetacomponents/base (1.9.3): Extracting archive
- Installing zetacomponents/mail (1.9.2): Extracting archive
- Installing xkerman/restricted-unserialize (1.1.12): Extracting archive
- Installing tplaner/when (v3.0.0): Extracting archive
- Installing totten/ca-config (v17.05.0): Extracting archive
- Installing tecnickcom/tcpdf (6.4.2): Extracting archive
- Downgrading symfony/finder (v5.3.4 => v4.4.27): Extracting archive
- Installing symfony/polyfill-php81 (v1.23.0): Extracting archive
- Installing symfony/config (v4.4.27): Extracting archive
- Installing psr/simple-cache (1.0.1): Extracting archive
- Installing phpoffice/phpword (0.18.2): Extracting archive
- Installing pear/validate_finance_creditcard (0.7.0): Extracting archive
- Installing pear/net_socket (1.0.14): Extracting archive
- Installing pear/net_smtp (1.9.2): Extracting archive
- Installing pear/mail_mime (1.10.10): Extracting archive
- Installing pear/mail (v1.4.1): Extracting archive
- Installing pear/log (1.13.3): Extracting archive
- Installing pear/db (v1.10.0): Extracting archive
- Installing pear/auth_sasl (v1.1.0): Extracting archive
- Installing marcj/topsort (1.1.0): Extracting archive
- Installing paragonie/random_compat (v9.99.100): Extracting archive
- Installing league/oauth2-client (2.6.0): Extracting archive
- Installing league/oauth2-google (3.0.4): Extracting archive
- Installing league/csv (9.7.1): Extracting archive
- Installing firebase/php-jwt (v5.4.0): Extracting archive
- Installing electrolinux/phpquery (0.9.6): Extracting archive
- Installing sabberworm/php-css-parser (8.3.1): Extracting archive
- Installing phenx/php-svg-lib (v0.3.3): Extracting archive
- Installing phenx/php-font-lib (0.5.2): Extracting archive
- Installing dompdf/dompdf (v1.0.2): Extracting archive
- Installing tubalmartin/cssmin (v4.1.1): Extracting archive
- Installing scssphp/scssphp (v1.6.0): Extracting archive
- Installing padaliyajay/php-autoprefixer (1.3): Extracting archive
- Installing civicrm/composer-compile-lib (v0.5): Extracting archive
- Installing civicrm/civicrm-core (5.40.2): Extracting archive
- Installing civicrm/civicrm-drupal-8 (5.40.2): Extracting archive
- Installing civicrm/civicrm-packages (5.40.2): Extracting archive
- Applying patches for adrienrn/php-mimetyper
https://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch (Update gitignore to ensure that sites that manage via git don't miss out on the important db.json file)
Could not apply patch! Skipping. The error was: Cannot apply patch https://patch-diff.githubusercontent.com/raw/adrienrn/php-mimetyper/pull/15.patch
- Applying patches for zetacomponents/mail
https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch (CiviCRM Custom Patches for ZetaCompoents mail)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/9d93748a36c7c5d44422911db1c98fb2f7067b34/tools/scripts/composer/patches/civicrm-custom-patches-zetacompoents-mail.patch
https://github.com/zetacomponents/Mail/pull/86.patch (Allow single quotes to be used in return path)
Could not apply patch! Skipping. The error was: Cannot apply patch https://github.com/zetacomponents/Mail/pull/86.patch
- Applying patches for pear/net_smtp
https://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch (Add in CiviCRM custom error message for CRM-8744)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/a6a0ff13d2a155ad962529595dceaef728116f96/tools/scripts/composer/patches/net-smtp-patch.patch
- Applying patches for pear/mail_mime
https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch (Apply patch for CRM-3133 wordwrap body to be 750 characters to apply with RFC 2821)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/74e25f27bb3be32519657539afe8a285c6c99a08/tools/scripts/composer/patches/mail_mime_crm_3133.patch
- Applying patches for pear/mail
https://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch (Apply CiviCRM Customisations for CRM-1367 and CRM-5946)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/36319938a5bf26c1e7e2110a26a65db6a5979268/tools/scripts/composer/patches/pear-mail.patch
- Applying patches for pear/db
https://raw.githubusercontent.com/civicrm/civicrm-core/a48a43c2b5f6d694fff1cfb99d522c5d9e2459a0/tools/scripts/composer/pear_db_civicrm_changes.patch (Apply CiviCRM Customisations for the pear:db package)
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/a48a43c2b5f6d694fff1cfb99d522c5d9e2459a0/tools/scripts/composer/pear_db_civicrm_changes.patch
- Applying patches for electrolinux/phpquery
https://raw.githubusercontent.com/civicrm/civicrm-core/fe45bdfc4f3e3d3deb27e3d853cdbc7f616620a9/tools/scripts/composer/patches/php74_array_access_fix_phpquery.patch (PHP7.4 Fix for array access using {} instead of [])
Could not apply patch! Skipping. The error was: Cannot apply patch https://raw.githubusercontent.com/civicrm/civicrm-core/fe45bdfc4f3e3d3deb27e3d853cdbc7f616620a9/tools/scripts/composer/patches/php74_array_access_fix_phpquery.patch
Download extra files for civicrm/civicrm-core
- Downloading civicrm/civicrm-core:angular (5.40.2)
- Installing civicrm/civicrm-core:angular (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-bootstrap (5.40.2)
- Installing civicrm/civicrm-core:angular-bootstrap (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-file-upload (5.40.2)
- Installing civicrm/civicrm-core:angular-file-upload (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-jquery-dialog-service (5.40.2)
- Installing civicrm/civicrm-core:angular-jquery-dialog-service (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-mocks (5.40.2)
- Installing civicrm/civicrm-core:angular-mocks (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-route (5.40.2)
- Installing civicrm/civicrm-core:angular-route (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-sanitize (5.40.2)
- Installing civicrm/civicrm-core:angular-sanitize (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-ui-sortable (5.40.2)
- Installing civicrm/civicrm-core:angular-ui-sortable (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-ui-utils (5.40.2)
- Installing civicrm/civicrm-core:angular-ui-utils (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-unsavedchanges (5.40.2)
- Installing civicrm/civicrm-core:angular-unsavedChanges (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:angular-xeditable (5.40.2)
- Installing civicrm/civicrm-core:angular-xeditable (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:checklist-model (5.40.2)
- Installing civicrm/civicrm-core:checklist-model (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:ckeditor (5.40.2)
- Installing civicrm/civicrm-core:ckeditor (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:crossfilter-1.3.x (5.40.2)
- Installing civicrm/civicrm-core:crossfilter-1.3.x (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:crossfilter2 (5.40.2)
- Installing civicrm/civicrm-core:crossfilter2 (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:css-color-names (5.40.2)
- Installing civicrm/civicrm-core:css-color-names (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:d3 (5.40.2)
- Installing civicrm/civicrm-core:d3 (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:d3-3.5.x (5.40.2)
- Installing civicrm/civicrm-core:d3-3.5.x (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:datatables (5.40.2)
- Installing civicrm/civicrm-core:datatables (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:dc-2.1.x (5.40.2)
- Installing civicrm/civicrm-core:dc-2.1.x (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:es6-promise (5.40.2)
- Installing civicrm/civicrm-core:es6-promise (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:ext-greenwich-bootstrap3 (3.4.1)
- Installing civicrm/civicrm-core:ext-greenwich-bootstrap3 (3.4.1): Extracting archive
- Downloading civicrm/civicrm-core:font-awesome (5.40.2)
- Installing civicrm/civicrm-core:font-awesome (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:marked (5.40.2)
- Installing civicrm/civicrm-core:marked (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:monaco-editor (5.40.2)
- Installing civicrm/civicrm-core:monaco-editor (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:google-code-prettify (5.40.2)
- Installing civicrm/civicrm-core:google-code-prettify (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:jquery (5.40.2)
- Installing civicrm/civicrm-core:jquery (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:jquery-ui (5.40.2)
- Installing civicrm/civicrm-core:jquery-ui (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:jquery-validation (5.40.2)
- Installing civicrm/civicrm-core:jquery-validation (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:json-formatter (0.7.0)
- Installing civicrm/civicrm-core:json-formatter (0.7.0): Extracting archive
- Downloading civicrm/civicrm-core:jstree (5.40.2)
- Installing civicrm/civicrm-core:jstree (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:lodash-compat (5.40.2)
- Installing civicrm/civicrm-core:lodash-compat (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:phantomjs-polyfill (5.40.2)
- Installing civicrm/civicrm-core:phantomjs-polyfill (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:select2 (5.40.2)
- Installing civicrm/civicrm-core:select2 (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:js-yaml (5.40.2)
- Installing civicrm/civicrm-core:js-yaml (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:smartmenus (5.40.2)
- Installing civicrm/civicrm-core:smartmenus (5.40.2): Extracting archive
- Downloading civicrm/civicrm-core:sms-counter (5.40.2)
- Installing civicrm/civicrm-core:sms-counter (5.40.2): Extracting archive
9 package suggestions were added by new dependencies, use `composer suggest` to see details.
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Generating autoload files
- CiviCRM asset map
54 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
The following packages have new compilation tasks:
- civicrm/composer-compile-lib has 1 task
- civicrm/civicrm-core has 1 task
Allow these packages to compile? ([y]es, [a]lways, [n]o, [l]ist, [h]elp) a
Compiling additional files (For full details, use verbose "-v" mode.)
Compile: Generate CCL wrapper functions
Compile: Greenwich CSS (dist/bootstrap3.css)
Sync CiviCRM assets
Is there anything I can do about it? I have tried composer clear-cache
as suggested in issue core#2168 (closed), but to no avail.