PHPackages                             dunglas/symfony-lock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [PSR &amp; Standards](/categories/psr-standards)
4. /
5. dunglas/symfony-lock

Abandoned → [symfony/flex](/?search=symfony%2Fflex)ArchivedMetapackage[PSR &amp; Standards](/categories/psr-standards)

dunglas/symfony-lock
====================

Enforces that all Symfony components use the same major version

v4(8y ago)821.7k3[2 issues](https://github.com/dunglas/symfony-lock/issues)[3 PRs](https://github.com/dunglas/symfony-lock/pulls)MIT

Since Nov 28Pushed 7y agoCompare

[ Source](https://github.com/dunglas/symfony-lock)[ Packagist](https://packagist.org/packages/dunglas/symfony-lock)[ Docs](https://dunglas.fr)[ RSS](/packages/dunglas-symfony-lock/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (6)Used By (0)

Locking a Symfony Project to a Specific Major Version of the Framework
======================================================================

[](#locking-a-symfony-project-to-a-specific-major-version-of-the-framework)

**Deprecation notice: [Symfony Flex](https://github.com/symfony/flex) now natively support this feature, [you can use it in your CI instead directly](https://github.com/symfony/flex/pull/409#issuecomment-412794585). This package is no longer maintained.**

Using `symfony/symfony` makes Composer install all Symfony Components, all in the same version. But when using the standalone packages (the Symfony Flex way), Composer might install dependencies in a different major version (`symfony/http-kernel`v2.8 and `symfony/event-dispatcher` v3.4 for instance, usually because another dependency of the project is not compatible with Symfony 3.0).

This Composer package allows you to enforce a consistent major version on all Symfony Components, whether they are explicitly listed as a project's dependency or installed transitively.

For instance when using `dunglas/symfony-lock:^4`, if a package cannot be installed in v4.0, but only in v3.4 (usually because of another library not supporting Symfony 4), a conflict will be generated.

Note that this package is meant to be used by library authors in their continuous integration systems. It should NOT be added directly to the project's `composer.json`.

Difference with `symfony/lts`
-----------------------------

[](#difference-with-symfonylts)

`symfony/lts` enforces that your project don't use use a version not released as a LTS, but does not enforce that all your Symfony packages are in the same major version. For instance, when using `symfony/lts` v3, some packages can be installed in version 3.4, and some others in version 2.8.

Usage
-----

[](#usage)

Use the Composer command line:

```
composer require dunglas/symfony-lock v4
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

3135d ago

Major Versions

2.x-dev → 3.x-dev2017-11-29

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/57224?v=4)[Kévin Dunglas](/maintainers/dunglas)[@dunglas](https://github.com/dunglas)

---

Top Contributors

[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (5 commits)")

### Embed Badge

![Health badge](/badges/dunglas-symfony-lock/health.svg)

```
[![Health](https://phpackages.com/badges/dunglas-symfony-lock/health.svg)](https://phpackages.com/packages/dunglas-symfony-lock)
```

###  Alternatives

[aura/di

A serializable dependency injection container with constructor and setter injection, interface and trait awareness, configuration inheritance, and much more.

352982.2k60](/packages/aura-di)[maclof/kubernetes-client

A simple yet elegant client for accessing and controlling a Kubernetes cluster.

234907.8k4](/packages/maclof-kubernetes-client)[icamys/php-sitemap-generator

Simple PHP sitemap generator.

175356.9k7](/packages/icamys-php-sitemap-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
