diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index dde873c5..8d2580b9 100644 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -13,6 +13,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Setup PHP with Xdebug + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + coverage: xdebug + - name: Validate composer.json and composer.lock run: composer validate diff --git a/composer.json b/composer.json index 649a300a..8559114c 100644 --- a/composer.json +++ b/composer.json @@ -45,8 +45,8 @@ } }, "scripts": { - "test": ["./vendor/bin/phpunit --colors=always"], - "coverage": ["./vendor/bin/phpunit --colors=always --coverage-text --coverage-html ./coverage --coverage-clover=build/logs/clover.xml"], - "coveralls": ["composer run coverage && ./vendor/bin/php-coveralls"] + "test": [ "@putenv XDEBUG_MODE=coverage", "./vendor/bin/phpunit --colors=always" ], + "coverage": [ "@putenv XDEBUG_MODE=coverage", "./vendor/bin/phpunit --colors=always --coverage-text --coverage-html ./coverage --coverage-clover=build/logs/clover.xml" ], + "coveralls": [ "@putenv XDEBUG_MODE=coverage", "composer run coverage && ./vendor/bin/php-coveralls"] } } diff --git a/src/Base/MicrosoftConfiguration.php b/src/Base/MicrosoftConfiguration.php index fdc58678..fa0a1030 100644 --- a/src/Base/MicrosoftConfiguration.php +++ b/src/Base/MicrosoftConfiguration.php @@ -161,6 +161,13 @@ private function getFromUrlOrFile($value) $targetUri = $value; if (filter_var($value, FILTER_VALIDATE_URL) === false) { $targetUri = realpath($value) === false ? __DIR__ . $value : $value; + $result = @file_get_contents($targetUri); + } else { + $ch = curl_init($value); + curl_setopt($ch, CURLOPT_HTTPGET, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $result = curl_exec($ch); + curl_close($ch); } $result = @file_get_contents($targetUri);