Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DependencyInjection] Added option `ignore_errors: not_found` for imported config files #11647

Open
wants to merge 1 commit into
base: 4.4
from

Conversation

@pulzarraider
Copy link
Contributor

pulzarraider commented Jun 3, 2019

Related merge request: symfony/symfony#31310

@OskarStark OskarStark changed the base branch from master to 4.4 Jun 3, 2019
@OskarStark OskarStark added this to the 4.4 milestone Jun 3, 2019
@nicolas-grekas nicolas-grekas changed the title [Configuration] Add documentation about `ignore_not_found` option. [DependencyInjection] Added option `ignore_errors: not_found` for imported config files Nov 7, 2019
@nicolas-grekas

This comment has been minimized.

Copy link
Member

nicolas-grekas commented Nov 7, 2019

Should be reviewed after the changes done to symfony/symfony#31310

@pulzarraider pulzarraider force-pushed the pulzarraider:config_ignore_not_found_docs branch from db7c598 to f6de406 Nov 8, 2019
nicolas-grekas added a commit to symfony/symfony that referenced this pull request Nov 8, 2019
…_found` for imported config files (pulzarraider)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Added option `ignore_errors: not_found` for imported config files

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#11647

If someone want to add optional config file. The only available choice was to add `ignore_errors: true` option

e.g.
```
imports:
    - { resource: parameters.yml, ignore_errors: true }
```

But this will hide all errors in imported file. We ran in many situations that broke our Symfony applications because we had a typo in this imported files.

This PR introduce new possible value `not_found` for `ignore_errors` option. It can be used for optional config files like the `ignore_errors: true`, but it will ignore only the file non-existence, not the possible syntax errors inside.

Usage:
```
imports:
    - { resource: parameters.yml, ignore_errors: not_found}
```

Commits
-------

e0ee01c [DependencyInjection] Added option `ignore_errors: not_found` while importing config files
symfony-splitter pushed a commit to symfony/dependency-injection that referenced this pull request Nov 8, 2019
…_found` for imported config files (pulzarraider)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Added option `ignore_errors: not_found` for imported config files

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#11647

If someone want to add optional config file. The only available choice was to add `ignore_errors: true` option

e.g.
```
imports:
    - { resource: parameters.yml, ignore_errors: true }
```

But this will hide all errors in imported file. We ran in many situations that broke our Symfony applications because we had a typo in this imported files.

This PR introduce new possible value `not_found` for `ignore_errors` option. It can be used for optional config files like the `ignore_errors: true`, but it will ignore only the file non-existence, not the possible syntax errors inside.

Usage:
```
imports:
    - { resource: parameters.yml, ignore_errors: not_found}
```

Commits
-------

e0ee01c10d [DependencyInjection] Added option `ignore_errors: not_found` while importing config files
symfony-splitter pushed a commit to symfony/config that referenced this pull request Nov 8, 2019
…_found` for imported config files (pulzarraider)

This PR was merged into the 4.4 branch.

Discussion
----------

[DependencyInjection] Added option `ignore_errors: not_found` for imported config files

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | symfony/symfony-docs#11647

If someone want to add optional config file. The only available choice was to add `ignore_errors: true` option

e.g.
```
imports:
    - { resource: parameters.yml, ignore_errors: true }
```

But this will hide all errors in imported file. We ran in many situations that broke our Symfony applications because we had a typo in this imported files.

This PR introduce new possible value `not_found` for `ignore_errors` option. It can be used for optional config files like the `ignore_errors: true`, but it will ignore only the file non-existence, not the possible syntax errors inside.

Usage:
```
imports:
    - { resource: parameters.yml, ignore_errors: not_found}
```

Commits
-------

e0ee01c10d [DependencyInjection] Added option `ignore_errors: not_found` while importing config files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.