Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
[DependencyInjection] More bullet-proof expression evaluation#59976
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:6.4
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
declare(strict_types=1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. to be replaced by the licence header (same below) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. also in fixture file? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. the thing is we'd like the licence header in fixtures (because why not), but then, no need to enforce other rules I'd say (at least we'll get many false-positives if we do) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. and PHP-CS-Fixer only allows to exclude files entirely, not to override the config being applied to some files to apply only some of the rules. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Yeah, we definitely need to introduce skipping rules like ECS has, I like it a lot. But you can also have a separate ruleset for fixtures and run Fixer twice, pointing to the config file. | ||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass; | ||
final class ExpectsIntegerArgument | ||
{ | ||
public function __construct(public readonly int $foo) {} | ||
public static function create(int $foo): self | ||
{ | ||
return new self($foo); | ||
} | ||
public function instance(): self | ||
{ | ||
return $this; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
declare(strict_types=1); | ||
namespace Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass; | ||
final class ExpectsIntegerArgumentWrapper | ||
{ | ||
public function __construct(public readonly ExpectsIntegerArgument $b) {} | ||
} |
Uh oh!
There was an error while loading.Please reload this page.