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

Merged
merged 1 commit into from
Oct 4, 2020

Conversation

pulzarraider
Copy link
Contributor

@pulzarraider pulzarraider commented Jun 3, 2019

Related merge request: symfony/symfony#31310

@javiereguiluz javiereguiluz added Config Waiting Code Merge Docs for features pending to be merged labels Jun 3, 2019
@OskarStark OskarStark changed the base branch from master to 4.4 June 3, 2019 06:41
@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
Copy link
Member

nicolas-grekas commented Nov 7, 2019

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

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
@OskarStark OskarStark removed the Waiting Code Merge Docs for features pending to be merged label Nov 8, 2019
@wouterj wouterj force-pushed the config_ignore_not_found_docs branch from f6de406 to 0a6873d Compare October 4, 2020 10:53
@wouterj
Copy link
Member

wouterj commented Oct 4, 2020

Thanks @pulzarraider! During the merge, I've slightly modified the comments to make them a bit shorter (to avoid horizontal scrolling).

@wouterj wouterj merged commit c62f542 into symfony:4.4 Oct 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants