0

Let's say I have two configuration NEON files:

config1.neon
parameters:
    excludePaths:
        - path1
config2.neon
includes:
    - "config1.neon"
parameters:
    excludePaths:
        - path2

Resulting configuration (config2.neon) has only excludePath = [path2]. Is there an easy way to append the lists instead of overriding the older one? So that excludePath = [path1, path2]?

2 Answers 2

1

This isn't really true. Array lists like that in neon from included files are merged together as you want.

The resulting array should already be ['path1', 'path2'].

Your issue most likely lies elsewhere.

To continue, it'd be best if you opened a GitHub Discussion over at PHPStan's repository, probably with a small repository that shows what you're trying to achieve, and the problem.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, I'll double-check and maybe discuss on GitHub.
0

The problem I was trying to solve had a different cause. Paths present in config1.neon weren't excluded not because config2.neon would overwrite the list, but because paths in config1.neon were relative to config1.neon's directory (which was different than config2.neon's directory) and didn't exist at all:

/a/config1.neon
parameters:
    excludePaths:
        - path1 # results in /a/path1, which does not exist
/b/config2.neon
includes:
    - "../a/config1.neon"
parameters:
    excludePaths:
        - path2 # results in /b/path2

Resulting list was:

- /a/path1 # does not exist, I wanted /b/path1
- /b/path2

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.