Skip to content

Conversation

@94noni
Copy link
Contributor

@94noni 94noni commented May 12, 2023

while reading this page, found it can be better to showcase strong typehint

@carsonbot carsonbot added this to the 5.4 milestone May 12, 2023
@94noni 94noni changed the title Add some typehint Add some typehint on controller as service May 12, 2023
private $twig;
private Environment $twig;

public function __construct(Environment $twig)
Copy link
Contributor

Choose a reason for hiding this comment

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

could be refactored to constructor property promotion in 6.2 after merge

Copy link
Contributor

Choose a reason for hiding this comment

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

It was already done in 6.2

@OskarStark
Copy link
Contributor

Thank you Antoine.

@OskarStark OskarStark merged commit b468323 into symfony:5.4 May 19, 2023
@94noni 94noni deleted the patch-10 branch May 20, 2023 11:15
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.

3 participants