-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #51011 [FrameworkBundle] Add parameters deprecations to the o…
…utput of `debug:container` command (HeahDude) This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [FrameworkBundle] Add parameters deprecations to the output of `debug:container` command | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | ~ | License | MIT | Doc PR | ~ Since #47719 parameters can be deprecated but one needs to read the deprecation logs carefully. It would be convenient to have the info when dumping them with debug commands. Here's a glimpse of text format (the fixtures in tests can do the rest): <img width="1126" alt="Screenshot 2023-07-18 at 12 50 49 PM" src="https://github.com/symfony/symfony/assets/10107633/6a2ea20b-be3c-4428-bb5d-aa97f3b38803"> I don't know if we really want to support all formats since it may break BC somehow if parsers are used to read the output. I still tried to adapt them all in this PR for consistency. But JSON required an object to display both the value and the deprecation, another way could be to add a specific entry for one or all deprecations. Commits ------- 7963e9d [FrameworkBundle] Add parameters deprecations to the output of `debug:container` command
- Loading branch information
Showing
17 changed files
with
157 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"deprecated_foo": "bar", | ||
"_deprecation": "Since symfony\/framework-bundle 6.4: The parameter \"deprecated_foo\" is deprecated." | ||
} |
6 changes: 6 additions & 0 deletions
6
...ymfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
deprecated_foo | ||
============== | ||
|
||
bar | ||
|
||
*Since symfony/framework-bundle 6.4: The parameter "deprecated_foo" is deprecated.* |
6 changes: 6 additions & 0 deletions
6
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameter.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
-------------------------------------------- ------------------------------------------- | ||
[32m Parameter [39m [32m Value [39m | ||
-------------------------------------------- ------------------------------------------- | ||
deprecated_foo bar | ||
[33m(Since symfony/framework-bundle 6.4: The parameter "deprecated_foo" is deprecated.)[39m | ||
-------------------------------------------- ------------------------------------------- |
2 changes: 2 additions & 0 deletions
2
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<parameter key="deprecated_foo" deprecated="Since symfony/framework-bundle 6.4: The parameter "deprecated_foo" is deprecated.">bar</parameter> |
7 changes: 7 additions & 0 deletions
7
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"integer": 12, | ||
"string": "Hello world!", | ||
"_deprecations": { | ||
"string": "Since symfony\/framework-bundle 6.4: The parameter \"string\" is deprecated." | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...mfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameters.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Container parameters | ||
==================== | ||
|
||
- `integer`: `12` | ||
- `string`: `Hello world!` *Since symfony/framework-bundle 6.4: The parameter "string" is deprecated.* |
11 changes: 11 additions & 0 deletions
11
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameters.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
[33mSymfony Container Parameters[39m | ||
[33m============================[39m | ||
|
||
---------------------------------------- --------------------------------------- | ||
[32m Parameter [39m [32m Value [39m | ||
---------------------------------------- --------------------------------------- | ||
integer 12 | ||
string Hello world! | ||
[33m(Since symfony/framework-bundle 6.4: The parameter "string" is deprecated.)[39m | ||
---------------------------------------- --------------------------------------- |
5 changes: 5 additions & 0 deletions
5
src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/deprecated_parameters.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<parameters> | ||
<parameter key="integer">12</parameter> | ||
<parameter key="string" deprecated="Since symfony/framework-bundle 6.4: The parameter "string" is deprecated.">Hello world!</parameter> | ||
</parameters> |