-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Config] Add parameter types #41575
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
[Config] Add parameter types #41575
Conversation
@@ -52,7 +52,7 @@ public function __construct(ContainerBuilder $container, FileLocatorInterface $l | |||
* | |||
* @param bool|string $ignoreErrors Whether errors should be ignored; pass "not_found" to ignore only when the loaded resource is not found | |||
*/ | |||
public function import($resource, string $type = null, $ignoreErrors = false, string $sourceResource = null, $exclude = null) | |||
public function import(mixed $resource, string $type = null, bool | string $ignoreErrors = false, string $sourceResource = null, $exclude = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've omitted the type declaration for $exclude
in order to maintain compatibility with Config 5.4. Shall I keep it that way or shall I bump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep compat
Hey! I think @jschaedl has recently worked with this code. Maybe they can help review this? Cheers! Carsonbot |
This PR was merged into the 4.4 branch. Discussion ---------- [Config] Backport type declarations | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A This PR backports type declarations from #41575 where it's safe to do so. Commits ------- 46e18af [Config] Backport type declarations
5aa99b3
to
a9e75c2
Compare
9fada46
to
4754580
Compare
src/Symfony/Component/Config/Definition/Builder/ExprBuilder.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Config/Tests/Definition/ScalarNodeTest.php
Outdated
Show resolved
Hide resolved
35eec33
to
7ec2142
Compare
src/Symfony/Component/Config/Tests/Definition/NormalizationTest.php
Outdated
Show resolved
Hide resolved
Signed-off-by: Alexander M. Turek <me@derrabus.de>
Thank you @derrabus. |
This PR adds parameter types to all methods of the Config component.