diff --git a/CHANGELOG-6.x.md b/CHANGELOG-6.x.md index 571e1b18..3d0a2bfb 100644 --- a/CHANGELOG-6.x.md +++ b/CHANGELOG-6.x.md @@ -7,6 +7,10 @@ using the [Keep a CHANGELOG](http://keepachangelog.com) principles. ## [Unreleased] +### Fixed + +- [GH-313](https://github.com/llaville/php-compatinfo/issues/313) Cannot install CompatInfo as a vendor dependency + ## [6.0.1] - 2021-12-13 ### Fixed diff --git a/config/set/default.php b/config/set/default.php index 53453193..43640a4e 100644 --- a/config/set/default.php +++ b/config/set/default.php @@ -32,7 +32,12 @@ * @return void */ return static function (ContainerConfigurator $containerConfigurator): void { - $containerConfigurator->import(dirname(__DIR__, 2) . '/vendor/bartlett/php-compatinfo-db/config/set/default.php'); + if (file_exists(dirname(__DIR__, 2) . '/vendor')) { + $configSet = dirname(__DIR__, 2) . '/vendor/bartlett/php-compatinfo-db/config/set/default.php'; + } else { + $configSet = dirname(__DIR__, 3) . '/php-compatinfo-db/config/set/default.php'; + } + $containerConfigurator->import($configSet); $containerConfigurator->import(__DIR__ . '/common.php'); $containerConfigurator->import(__DIR__ . '/../packages/messenger.php');