PHPackages                             chrisjenkinson/symfony-service-sorter - 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. [CLI &amp; Console](/categories/cli)
4. /
5. chrisjenkinson/symfony-service-sorter

ActiveLibrary[CLI &amp; Console](/categories/cli)

chrisjenkinson/symfony-service-sorter
=====================================

Sorts entries in the services: key of Symfony YAML files alphabetically

v1.1.1(1mo ago)0108GPL-3.0-or-laterPHPPHP ^8.2CI passing

Since Apr 21Pushed 1mo agoCompare

[ Source](https://github.com/chrisjenkinson/symfony-service-sorter)[ Packagist](https://packagist.org/packages/chrisjenkinson/symfony-service-sorter)[ RSS](/packages/chrisjenkinson-symfony-service-sorter/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (10)Versions (7)Used By (0)

symfony-service-sorter
======================

[](#symfony-service-sorter)

CLI for checking and fixing service ordering in Symfony `services:` YAML files.

What it does
------------

[](#what-it-does)

`symfony-service-sorter` helps keep Symfony service definitions in a consistent order. It provides:

- `check` to report out-of-order services
- `fix` to rewrite a file into the expected order

Installation
------------

[](#installation)

Install it as a development dependency:

```
composer require --dev chrisjenkinson/symfony-service-sorter
```

The binary is available at `vendor/bin/sort-services`.

Usage
-----

[](#usage)

Run the binary with a subcommand and one or more target YAML files:

```
vendor/bin/sort-services  ...
```

### Check

[](#check)

```
vendor/bin/sort-services check config/services.yaml
```

`check` exits successfully when services are already in order and reports ordering problems otherwise.

You can also check more than one file in one invocation:

```
vendor/bin/sort-services check config/services.yaml config/services_test.yaml
```

### Fix

[](#fix)

```
vendor/bin/sort-services fix config/services.yaml
```

`fix` rewrites files in place only when sorting changes their contents. Files that are already sorted are reported as `Unchanged`.

You can also fix more than one file in one invocation:

```
vendor/bin/sort-services fix config/services.yaml config/services_test.yaml
```

To print the sorted output instead, use:

```
vendor/bin/sort-services fix config/services.yaml --stdout
```

`--stdout` only supports a single file.

Compatibility
-------------

[](#compatibility)

- PHP `^8.2`
- Symfony Console `^6.0 || ^7.0 || ^8.0`

Development
-----------

[](#development)

Useful local verification commands:

```
vendor/bin/phpunit
vendor/bin/ecs check
vendor/bin/phpstan analyse
vendor/bin/infection --threads=max --min-msi=85 --min-covered-msi=85
```

License
-------

[](#license)

`GPL-3.0-or-later`

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance92

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 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 ~26 days

Total

3

Last Release

41d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3810ae075b824735d2ce95e065d7b43494f19f8cb941913dde34829783a98d88?d=identicon)[chrisjenkinson](/maintainers/chrisjenkinson)

---

Top Contributors

[![chrisjenkinson](https://avatars.githubusercontent.com/u/568142?v=4)](https://github.com/chrisjenkinson "chrisjenkinson (19 commits)")

---

Tags

clisymfonyyamlsortservices

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/chrisjenkinson-symfony-service-sorter/health.svg)

```
[![Health](https://phpackages.com/badges/chrisjenkinson-symfony-service-sorter/health.svg)](https://phpackages.com/packages/chrisjenkinson-symfony-service-sorter)
```

###  Alternatives

[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.7k357.7M11.5k](/packages/nunomaduro-collision)[j13k/yaml-lint

A compact command line utility for checking YAML file syntax

171.2M20](/packages/j13k-yaml-lint)

PHPackages © 2026

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