From e713c0f203bfded605a28baca3c6b1f00d3914b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Fri, 13 Sep 2024 11:06:45 +0200 Subject: [PATCH] Install PHP dependencies in the project --- integrations/php/composer.json | 14 -------------- integrations/php/install-driver.sh | 7 +++++-- 2 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 integrations/php/composer.json diff --git a/integrations/php/composer.json b/integrations/php/composer.json deleted file mode 100644 index a14249cd..00000000 --- a/integrations/php/composer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "repositories": [ - { "type": "path", "url": "$PHPLIB_PATH" } - ], - "require": { - "php": "^7.3 || ^8.0", - "mongodb/mongodb": "@dev", - "symfony/phpunit-bridge": "^5.2" - }, - "autoload": { - "psr-4": { "MongoDB\\Tests\\": "vendor/mongodb/mongodb/tests" }, - "files": [ "vendor/mongodb/mongodb/tests/PHPUnit/Functions.php" ] - } -} diff --git a/integrations/php/install-driver.sh b/integrations/php/install-driver.sh index 858b9a16..960082c6 100755 --- a/integrations/php/install-driver.sh +++ b/integrations/php/install-driver.sh @@ -80,7 +80,10 @@ php --ri mongodb # Install composer and dependencies install_composer -php composer.phar update +php composer.phar update --working-dir=${PHPLIB_PATH} # Allow simple-phpunit to install its own PHPUnit dependencies -php vendor/bin/simple-phpunit install +php ${PHPLIB_PATH}/vendor/bin/simple-phpunit install + +# The symlink helps to include the library and tests with a simple path +ln -s ${PHPLIB_PATH}/vendor ./vendor