Commit 83c2aec
committed
minor symfony#61568 [Console] Harden array type for test-related user inputs (eliashaeussler)
This PR was submitted for the 6.4 branch but it was merged into the 7.4 branch instead.
Discussion
----------
[Console] Harden array type for test-related user inputs
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix #...
| License | MIT
User inputs must be strings, otherwise they cannot be properly written to the `php://memory` stream (because of the `str_contains` check here: https://github.com/symfony/symfony/blob/v6.4.25/src/Symfony/Component/Console/Tester/TesterTrait.php#L173). Using the hardened typed annotation, static code analyzers may assist developers in using correct array values.
Commits
-------
e8ca032 [Console] Harden array type for test-related user inputs1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| |||
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
110 | | - | |
111 | | - | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
161 | 165 | | |
162 | 166 | | |
163 | 167 | | |
| 168 | + | |
| 169 | + | |
164 | 170 | | |
165 | 171 | | |
166 | 172 | | |
| |||
0 commit comments