Allows installing Drupal extensions event if not compatible with installed drupal/core package

Last update: May 16, 2022

mglaman/composer-drupal-lenient

Lenient with it, Drupal 10 with it.

Why?

The Drupal community introduced a lenient Composer facade that modified the drupal/core constraint for packages. This was done to remove a barrier with getting extensions installed via Composer to work on making modules Drupal 9 ready.

We hit the same problem, again. At DrupalCon Portland we sat down and decided a Composer plugin is the best approach.

See Add a composer plugin that supports 'composer require-lenient' to support major version transitions

How

This subscribes to PluginEvents::PRE_POOL_CREATE and filters packages. This is inspired by symfony/flex, but it does not filter out packages. It rewrites the drupal/core constraint on any package with a type of drupal-*, excluding drupal-core.

Try it

Setup a fresh Drupal 10 site with this plugin (remember to press y for the new allow-plugins prompt.)

composer create-project drupal/recommended-project:^[email protected] d10
cd d10
composer config minimum-stability dev
composer config repositories.lenient-plugin vcs https://github.com/mglaman/composer-drupal-lenient.git
composer require mglaman/composer-drupal-lenient

Now, add a module that does not have a D10 compatible release!

composer require drupal/token:1.10.0

🥳 Now you can use cweagans/composer-patches to patch the module for Drupal 10 compatibility!

Next

  • TESTS
  • Don't use MatchAllConstraint but set <= to current drupal/core locked constraint
  • Don't run on all Drupal extensions, only ones in an allowed list in root package's extra

GitHub

https://github.com/mglaman/composer-drupal-lenient
You might also like...

Helper to automatically load various Kirby extensions in a plugin

Autoloader for Kirby Helper to automatically load various Kirby extensions in a plugin Commerical Usage This package is free but if you use it in a co

Apr 20, 2022

Zephir is a compiled high level language aimed to the creation of C-extensions for PHP.

Zephir - is a high level programming language that eases the creation and maintainability of extensions for PHP. Zephir extensions are exported to C c

May 19, 2022

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.

May 26, 2022

A simple social groups compatible with ActivityPub.

A simple social groups compatible with ActivityPub.

May 3, 2022

Custom code snippets and examples for SkyVerge-built WooCommerce extensions

SkyVerge WooCommerce Plugins Welcome to the wc-plugins-snippets repository! This repository stores code snippets related to SkyVerge WooCommerce plugi

May 10, 2022

Library to build PHP extensions with C++

PHP-CPP The PHP-CPP library is a C++ library for developing PHP extensions. It offers a collection of well documented and easy-to-use classes that can

May 12, 2022

PhpCodeAnalyzer scans codebase and analyzes which non-built-in php extensions used

PhpCodeAnalyzer PhpCodeAnalyzer finds usage of different non-built-in extensions in your php code. This tool helps you understand how transportable yo

Jan 14, 2022

The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

The first fully customizable Laravel JSON:API builder. "CRUD" and protect your resources with 0 (zero) extra line of code. Installation You can instal

May 17, 2022

Silverstripe-ideannotator - Generate docblocks for DataObjects, Page, PageControllers and (Data)Extensions

silverstripe-ideannotator This module generates @property, @method and @mixin tags for DataObjects, PageControllers and (Data)Extensions, so ide's lik

May 9, 2022
A Magento 2 dashboard to display installed extensions. Read the blog post on some of the thinking behind it:
A Magento 2 dashboard to display installed extensions. Read the blog post on some of the thinking behind it:

Extension Dashboard for Magento 2 This module adds a dashboard to review all installed extensions in the Magento admin (Magento 2.3.0+ for now only).

May 14, 2022
This library uses GD and EXIF (optional) PHP extensions so make sure you have them installed.

simple and fast image processing class that can downscale, compress and convert images using php-gd native functions

Apr 15, 2022
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.
Laravel Blog Package. Easiest way to add a blog to your Laravel website. A package which adds wordpress functionality to your website and is compatible with laravel 8.

Laravel Blog Have you worked with Wordpress? Developers call this package wordpress-like laravel blog. Give our package a Star to support us ⭐ ?? Inst

May 16, 2022
Docker-magento2 - 🐳 Docker containers with all required Magento 2 dependencies installed available as FPM through Nginx and CLI

Magento 2 Docker A collection of Docker images for running Magento 2 through nginx and on the command line. Quick Start cp composer.env.sample compose

May 28, 2022
Installed composer packages info

PackageInfo This package was highly inspired from ocramius/package-versions I needed some methods to read data from the composer.lock file fast...this

Mar 28, 2022
Composer addon to efficiently get installed packages' version numbers

Package Versions composer/package-versions-deprecated is a fully-compatible fork of ocramius/package-versions which provides compatibility with Compos

May 27, 2022
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Feb 14, 2022
A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package.

Net A small, modern, PSR-7 compatible PSR-17 and PSR-18 network library for PHP, inspired by Go's net package. Features: No hard dependencies; Favours

Feb 14, 2022
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.
A Laravel artisan based package to create the AWS (SES + SNS) infrastructure to receive email event notifications with Http/Https endpoint.

Laravel SES Tracking Setup the AWS infrastructure to handle email events using SES/SNS and http/s endpoints with a single Laravel artisan command. Thi

Apr 26, 2022