diff --git a/.gitignore b/.gitignore index 3ce5adb..82cfc4e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .idea +composer.lock vendor diff --git a/composer.json b/composer.json index e93a853..5a6c8e6 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "description": "Load guzzle service description from various file formats", "require": { "php": ">=5.5.0", - "symfony/config": "~3.0", - "symfony/yaml": "~3.0" + "symfony/config": "~3.0|^4.0", + "symfony/yaml": "~3.0|^4.0" }, "license": "MIT", "authors": [ diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 2e9db00..0000000 --- a/composer.lock +++ /dev/null @@ -1,169 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", - "This file is @generated automatically" - ], - "hash": "950a6c7017df36346b2daebfd6a55cf7", - "content-hash": "b19a782dc303a22631422c69ca828fa0", - "packages": [ - { - "name": "symfony/config", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "58680a6516a457a6c65044fe33586c4a81fdff01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/58680a6516a457a6c65044fe33586c4a81fdff01", - "reference": "58680a6516a457a6c65044fe33586c4a81fdff01", - "shasum": "" - }, - "require": { - "php": ">=5.5.9", - "symfony/filesystem": "~2.8|~3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" - }, - { - "name": "symfony/filesystem", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/c2e59d11dccd135dc8f00ee97f34fe1de842e70c", - "reference": "c2e59d11dccd135dc8f00ee97f34fe1de842e70c", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2015-12-22 10:39:06" - }, - { - "name": "symfony/yaml", - "version": "v3.0.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/3df409958a646dad2bc5046c3fb671ee24a1a691", - "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "https://symfony.com", - "time": "2015-12-26 13:39:53" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.5.0" - }, - "platform-dev": [] -} diff --git a/src/FileLoader.php b/src/FileLoader.php index 6a7f2bf..8c2fe69 100644 --- a/src/FileLoader.php +++ b/src/FileLoader.php @@ -31,10 +31,9 @@ public function load($resource, $type = null) foreach($configValues["imports"] as $file) { $configValues = array_merge_recursive($configValues, $this->import($this->locator->locate($file))); } + unset($configValues["imports"]); } - unset($configValues["imports"]); - return $configValues; } diff --git a/tests/fixtures/invalid.yml b/tests/fixtures/invalid.yml index 194ae3d..e0f0559 100644 --- a/tests/fixtures/invalid.yml +++ b/tests/fixtures/invalid.yml @@ -1,2 +1,2 @@ -operations - certificates.add: \ No newline at end of file +operations: +-certificates.add \ No newline at end of file