Skip to content

Deprecate untyped method arguments in Cest format#6521

Merged
Naktibalda merged 1 commit into
5.0from
deprecate-untyped-cest-arguments
Jul 28, 2022
Merged

Deprecate untyped method arguments in Cest format#6521
Naktibalda merged 1 commit into
5.0from
deprecate-untyped-cest-arguments

Conversation

@Naktibalda

Copy link
Copy Markdown
Member

This change allows to simplify dependency injection and Cest format in the future.
Nobody should be using untyped method arguments in PHP 8 anyway, since they bring so many benefits.

It was surprise to me too that parameter types in Cest format are optional:
e.g. public function runSuitesWithoutActor($I)

untyped methods are called with actor, scenario and example (if exampled are used) in that order.

This change makes Codeception log deprecation messages about Cest files with missing argument type declarations:

DEPRECATION: Untyped method arguments in Cest format are deprecated since Codeception 5.0.0 and will be removed in 6.0.0 /.../Codeception/tests/cli/ConfigNoActorCest.php:11
DEPRECATION: Untyped method arguments in Cest format are deprecated since Codeception 5.0.0 and will be removed in 6.0.0 /.../Codeception/tests/cli/ConfigExtendsCest.php:7

@Naktibalda Naktibalda merged commit be09fe7 into 5.0 Jul 28, 2022
@Naktibalda Naktibalda deleted the deprecate-untyped-cest-arguments branch July 28, 2022 08:15
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.

1 participant