Move zet
This commit is contained in:
parent
247ff913b3
commit
b96f5b114c
60 changed files with 0 additions and 0 deletions
40
old/zet/source/_zets/25.md
Normal file
40
old/zet/source/_zets/25.md
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
title: Drupal's Lenient Composer endpoint
|
||||
date: 2024-09-14 17:29:15
|
||||
tags: [Drupal, PHP, Composer]
|
||||
links:
|
||||
- https://www.drupal.org/project/content_access
|
||||
- https://www.drupal.org/docs/develop/using-composer/using-drupals-lenient-composer-endpoint
|
||||
- https://github.com/mglaman/composer-drupal-lenient
|
||||
- https://github.com/cweagans/composer-patches
|
||||
---
|
||||
|
||||
Today, I tried to add the Content Access module to a Drupal 11 project, but there's no Drupal 11-compatible version.
|
||||
|
||||
It's a simple update - just adding `^11` to the content_access.info.yml file, but even with Composer Patches installed, it's not possible to download and patch the module using the normal Drupal 8+ Composer repository.
|
||||
|
||||
This is possible, though, with the Lenient Composer endpoint.
|
||||
|
||||
> This composer plugin lets you specify an allowlist of packages where you are willing to break the version constraint.
|
||||
|
||||
> Together with the Composer Patches Plugin, this allows you to install any Drupal extension, even if the version constraint hasn't been officially updated yet. Of course the code may still need to be patched for deprecations.
|
||||
|
||||
To add the lenient endpoint and add the Content Access plugin:
|
||||
|
||||
```shell
|
||||
composer require mglaman/composer-drupal-lenient
|
||||
composer config --merge --json extra.drupal-lenient.allowed-list '["drupal/content_access"]
|
||||
composer req drupal/content_access
|
||||
```
|
||||
|
||||
Note that I'd already included this section to my composer.json file to add a patch to make the module installable on Drupal 11:
|
||||
|
||||
```json
|
||||
"extra": {
|
||||
"composer-patches": {
|
||||
"drupal/content_access": {
|
||||
"Drupal 11 support": "./tools/patches/content_access/d11_support.patch"
|
||||
}
|
||||
},
|
||||
},
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue