Skip to content

Use new configuration depreciation method #24025

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

Merged
merged 2 commits into from
Sep 4, 2017
Merged

Use new configuration depreciation method #24025

merged 2 commits into from
Sep 4, 2017

Conversation

sanpii
Copy link
Contributor

@sanpii sanpii commented Aug 29, 2017

Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets N/A
License MIT
Doc PR N/A

In keeping with #22382

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Aug 29, 2017
@@ -64,8 +64,6 @@ public function boot()
ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true);

if ($this->container->hasParameter('kernel.trusted_proxies')) {
@trigger_error('The "kernel.trusted_proxies" parameter is deprecated since version 3.3 and will be removed in 4.0. Use the Request::setTrustedProxies() method in your front controller instead.', E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change should be reverted as the notice is not about the framework.trusted_proxies config option but the corresponding kernel parameter, triggering is still relevant. If you think it should be rediscussed, that should be done on 3.3 where it has been introduced.

@sanpii
Copy link
Contributor Author

sanpii commented Sep 1, 2017

I don’t understand why the tests failed on travis. I can’t reproduce the problem on my computer (with php 7.0 and --prefer-lowest).

@chalasr
Copy link
Member

chalasr commented Sep 3, 2017

Should be better after #24083.

nicolas-grekas added a commit that referenced this pull request Sep 4, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

Fix ability to deprecate a config node

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | not yet released
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22382
| License       | MIT
| Doc PR        | n/a

Unlocks #24025

Commits
-------

fc91869 Fix ability to deprecate a config node
@nicolas-grekas
Copy link
Member

rebase needed to account for #24083.

@sanpii
Copy link
Contributor Author

sanpii commented Sep 4, 2017

Done, thank you @chalasr.

It’s better but it still failed with hhvm and php 5.5 due to deprecation notices.

@chalasr
Copy link
Member

chalasr commented Sep 4, 2017

@sanpii Looks like this triggers extra deprecations, I suspect that we trigger when we should not (e.g. because the node has a default value, we trigger even if not explicitly set). I'll look into later today.

chalasr
chalasr previously approved these changes Sep 4, 2017
Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was the case (#24025 (comment)), added a commit that makes nodes trigger deprecations only if the value is explicitly set. PR looks good to me.

@chalasr chalasr dismissed their stale review September 4, 2017 16:14

Broken, I'm on it.

@chalasr chalasr added the Config label Sep 4, 2017
@chalasr
Copy link
Member

chalasr commented Sep 4, 2017

VariableNode (= all nodes which are not ArrayNode) should not trigger the deprecation itself, as it is always the child of a rootNode which is responsible for triggering when a child is marked as deprecated. PR ready (fixing the implementation)

@nicolas-grekas
Copy link
Member

Thank you @sanpii and @chalasr

@nicolas-grekas nicolas-grekas merged commit 4a62cc6 into symfony:3.4 Sep 4, 2017
nicolas-grekas added a commit that referenced this pull request Sep 4, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

Use new configuration depreciation method

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

In keeping with #22382

Commits
-------

4a62cc6 Do not trigger deprecation if node has not been explicitly filled
012e381 Use new configuration node depreciation method
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.

4 participants