dependabot / dependabot/dependabot-core

Make Dependabot respect Symfony Flex's "extra.symfony.require" setting

Open
#4,631 13 comments 35 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

F: grouped-updates 🎳 Keep L: php:composer T: feature-request versioning
Dominant language
Ruby
Stars
5.8k
Forks
1.5k
Avg merge
2d 18h
Merged PRs (30d)
149

Description

Symfony Flex has a feature that allows you to force a version constraint for all Symfony components (even for ones not explicitly defined in user's composer.json):

"extra": {
    "symfony": {
        "require": "5.4.*"
    }
}

This is really useful when Symfony is used as a full-stack framework because it ensures that all components get pinned to the exact same version.

It works great when a developer is manually updating packages (e.g. composer update 'symfony/*' -W).

The problem arises when Dependabot decides to update a dependency that depends on Symfony components. In Dependabot's default configuration, transitive dependencies will get updated as well. This can lead to a project that requires a specific version of Symfony have a mix of different component versions if it lags behind the latest available major version (e.g. a combination of 5.4 and 6.0 components). When this happens, a developer has to manually update packages again (with Composer that has the Symfony Flex plugin loaded) in order to restore the desired component versions.

Would it be possible to bundle Symfony Flex with Dependabot so it's aware of the extra.symfony.require setting?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Dependabot's Composer update path and how it handles transitive dependencies. Review Symfony Flex's extra.symfony.require setting and the linked feature description, then verify that updates preserve the requested Symfony component constraint without requiring a manual Composer update.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.