Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/janedbal/composer-class-ambiguity-test

Composer does not check class duplicates properly
https://github.com/janedbal/composer-class-ambiguity-test

Last synced: about 1 month ago
JSON representation

Composer does not check class duplicates properly

Awesome Lists containing this project

README

        

> [!CAUTION]
> Since composer `2.8.1`, the issue described below was [fixed](https://github.com/composer/composer/pull/12148)

## Composer does not check class ambiguity properly
- If you have class duplicate in your project, composer may not warn about that.
- This repository shows an example of that.
- Since composer 2.8, you can use `--strict-ambiguous`, but that still does not solve this issue
- Currently, you can ensure no ambiguity is present by [shipmonk/name-collission-detector](https://github.com/shipmonk-rnd/name-collision-detector)

### How to reproduce
```sh
composer install
composer dump -a --strict-ambiguous
echo $?
php run.php
```

### How to see all real collisions
```sh
composer require --dev shipmonk/name-collision-detector
vendor/bin/detect-collisions src tests
```

### Related GitHub issue
- https://github.com/composer/composer/issues/12140