Since our project needs a library to run tests, this package is listed in the `require-dev` section of `composer.json`.

```json
{
    //...
    "require": {
        "php": "^7.4|^8.0",
    },
    "require-dev": {
        "cache/array-adapter": "^1.1"
    },
    //...
}

```

During a manual code review, I realised that this library is being used in our production code too.

The fix is easy, we moved the corresponding package from the `require-dev` section to the `require` section.

```json
{
    //...
    "require": {
        "php": "^7.4|^8.0",
        "cache/array-adapter": "^1.1"
    },
    "require-dev": {
    },
    //...
}

```

I'm searching an automatic way/test to avoid this kind of problem. I guess that our manual test during staging can avoid these kind of problem, but it isn't enough.

How to check that a dev-dependency isn't needed in our core-code?