Skip to content

Conversation

carlobeltrame
Copy link
Member

Fixes #838

In AuthController and Auth\BaseController, the redirect responses are necessary due to the OAuth protocol. So there, we are not able to return ViewModel. In all other places, we now return ViewModel, and also declare void return types. php-cs-fixer made this easy, but we can't permanently activate these rules without enabling risky rules.

@carlobeltrame carlobeltrame force-pushed the fix-return-types branch 3 times, most recently from 6a9b5b5 to 00b2a1c Compare February 9, 2021 00:08
@pmattmann
Copy link
Member

Können wir bitte vorher #950 mergen?

'braces' => ['position_after_functions_and_oop_constructs' => 'same'],
'php_unit_test_class_requires_covers' => false
'php_unit_test_class_requires_covers' => false,
'no_superfluous_phpdoc_tags' => true,
Copy link
Contributor

Choose a reason for hiding this comment

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

will you revert the rule in this PR in a follow up commit, or do we merge it?

Copy link
Member Author

Choose a reason for hiding this comment

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

This one I would merge, because it is not considered risky. If we remove it, cs-fixer will start complaining about now incomplete phpdoc annotations I think.

@manuelmeister
Copy link
Member

Ich habe mir noch überlegt, ob wir auch Generics definieren könnten. (Momentan nur via DocBlocks möglich)

Damit wir zB bei den Services nicht immer noch einen "Cast" machen müssen.

@pmattmann pmattmann merged commit 02068de into ecamp:devel Feb 23, 2021
@carlobeltrame carlobeltrame deleted the fix-return-types branch February 24, 2021 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP: Use PHP RFC: Return (PHP 7)
4 participants