{"id":14968585,"url":"https://github.com/mglaman/composer-drupal-lenient","last_synced_at":"2026-04-01T20:08:10.089Z","repository":{"id":39572319,"uuid":"489160783","full_name":"mglaman/composer-drupal-lenient","owner":"mglaman","description":"Allows installing Drupal extensions even if not compatible with installed drupal/core package","archived":false,"fork":false,"pushed_at":"2024-11-21T15:59:52.000Z","size":31,"stargazers_count":123,"open_issues_count":5,"forks_count":7,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-10T02:43:23.355Z","etag":null,"topics":["composer","drupal"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mglaman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"mglaman","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-05-06T00:01:03.000Z","updated_at":"2025-04-23T12:09:49.000Z","dependencies_parsed_at":"2024-12-14T12:02:55.941Z","dependency_job_id":"e0c25e7d-f091-4194-a2aa-024cad130b9f","html_url":"https://github.com/mglaman/composer-drupal-lenient","commit_stats":{"total_commits":30,"total_committers":5,"mean_commits":6.0,"dds":"0.16666666666666663","last_synced_commit":"bcb9be7f2d3160be43cd1d13a44580734a5afee0"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mglaman%2Fcomposer-drupal-lenient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mglaman%2Fcomposer-drupal-lenient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mglaman%2Fcomposer-drupal-lenient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mglaman%2Fcomposer-drupal-lenient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mglaman","download_url":"https://codeload.github.com/mglaman/composer-drupal-lenient/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254374475,"owners_count":22060611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["composer","drupal"],"created_at":"2024-09-24T13:40:14.802Z","updated_at":"2026-04-01T20:08:09.747Z","avatar_url":"https://github.com/mglaman.png","language":"PHP","readme":"# Drupal Lenient Composer Plugin\n\nLenient with it, Drupal 11 with it.\n\n## Why?\n\nThe Drupal community introduced a lenient Composer facade that modified the `drupal/core` constraint for packages. This\nwas done to remove a barrier with getting extensions installed via Composer to work on making modules Drupal 9 ready.\n\nWe hit the same problem, again. At DrupalCon Portland we sat down and decided a Composer plugin is the best approach.\n\nSee [Add a composer plugin that supports 'composer require-lenient' to support major version transitions](https://www.drupal.org/project/drupal/issues/3267143).\n\nDrupal documentation page: [Using Drupal's Lenient Composer Endpoint](https://www.drupal.org/docs/develop/using-composer/using-drupals-lenient-composer-endpoint).\n\n## How\n\nThis subscribes to `PluginEvents::PRE_POOL_CREATE` and filters packages. This is inspired by `symfony/flex`, but it does\nnot filter out packages. It rewrites the `drupal/core` constraint on any package with a type of `drupal-*`,\nexcluding `drupal-core`. The constraint is set to `'^8 || ^9 || ^10 || ^11 || ^12'` for `drupal/core`.\n\n## Try it\n\nSet up a fresh Drupal 11 site with this plugin (remember to press `y` for the new `allow-plugins` prompt.)\n\n```shell\ncomposer create-project drupal/recommended-project d11\ncd d11\ncomposer require mglaman/composer-drupal-lenient\n```\n\nThe plugin only works against specified packages. To allow a package to have a lenient Drupal core version constraint,\nyou must add it to `extra.drupal-lenient.allowed-list`. The following is an example to add Simplenews via the command line \nwith `composer config`\n\n```shell\ncomposer config --merge --json extra.drupal-lenient.allowed-list '[\"drupal/simplenews\"]'\n```\n\nNow, add a module that does [not have a Drupal 11 compatible](https://dev.acquia.com/drupal11/deprecation_status/projects?next_step=Fix%20deprecation%20errors%20found) release!\n\n```shell\ncomposer require drupal/simplenews\n```\n\n🥳 Now you can use [cweagans/composer-patches](https://github.com/cweagans/composer-patches) to patch the module for Drupal 11 compatibility!\n\nFor a quick start, allow installing the module by installing [Backward Compatibility](https://www.drupal.org/project/backward_compatibility):\n\n\u003e Backward Compatibility allows you to install old Drupal modules in current Drupal.\n\nAlternatively, manually add the latest version in the module `*.info.yml` file:\n\n```shell\ncore_version_requirement: ^9.3 || ^10 || ^11\n```\n\n## Allowing all packages\n\nIf you want to allow all packages to have a lenient Drupal core version constraint, you can set `extra.drupal-lenient.allow-all` to `true`.\n\n```shell\ncomposer config --json extra.drupal-lenient.allow-all true\n```\n\nUsing `allow-all` allows you to install any package without needing to add it to the `allowed-list`.\n\n## Support when `composer.lock` removed\n\nThis plugin must be installed globally if your project's `composer.lock` file is removed.\n\n```shell\ncomposer global config --no-plugins allow-plugins.mglaman/composer-drupal-lenient true\ncomposer global require mglaman/composer-drupal-lenient\n```\n\n**Warning**: this means the plugin will run on all Composer commands. This is not recommended, but it is the only way \nthe plugin can work when `composer.lock` is removed.\n","funding_links":["https://github.com/sponsors/mglaman"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmglaman%2Fcomposer-drupal-lenient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmglaman%2Fcomposer-drupal-lenient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmglaman%2Fcomposer-drupal-lenient/lists"}