Skip to content
This repository has been archived by the owner on Feb 1, 2020. It is now read-only.

ignore_errors on imported resource #11

Open
vimishor opened this issue Apr 21, 2014 · 0 comments
Open

ignore_errors on imported resource #11

vimishor opened this issue Apr 21, 2014 · 0 comments

Comments

@vimishor
Copy link

If I set ignore_errors to true on a imported resource which does not exists, a warning is triggered.

Expected behavior:
If the resource does not exists and ignore_errors is set to true, I would expect no warning and/or exception.

Test case:

# File: config.yml

imports:
  - { resource: parameters.yml }
  - { resource: parameters_dev.yml, ignore_errors: true }

# ...

Would trigger:

Warning: array_replace_recursive(): Argument #1 is not an array in [...]/vendor/herrera-io/wise/src/lib/Herrera/Wise/Loader/AbstractFileLoader.php on line 172

At a first glance, if import method called on AbstractFileLoader.php L166-L170 will return null, an empty array should be passed as first param to array_replace_recursive from L165.

I don't know if this is the expected behavior or a bug, but it will be nice to be compliant with Symfony

@ghost ghost added the enhancement label Sep 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant