Use traits for methods that belong to the public API #94
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the directory structure proposed by this PR:
Why should we make this change?
Symfony.php
module file will grow so much that it will become colossal, which will make it difficult to navigate and, above all, its maintenance. (It was already on the 1629 lines, hopefully, it will not reach 2077.)Did you randomly make up that structure and those names for the traits?
No, it is based on Symfony's own structure.
This will break git history, stop it!
Luckily, it will not, in this PR the public methods are simply removed from the main file of the modules and moved to their corresponding trait, the git history only records deletions in the main file
Symfony.php
, and it will always be possible to use git blame locating you in the repository prior to this commit, this is intended to be part of version2.0
where changes like these are allowed.Ok, but is there a quick way to review where each method is located?
Of course, here is the
classtrait diagram:Wait, this is the only change for version 2?
No, but it makes the work of the other features much easier, I hope to fix issue #90, add support for codeception 5, remove support for Symfony 3.4 (just like codeception 5 did), and add the functions to assert the orphan events (which were introduced in Symfony 4.1 [they are not documented in symfony far from that PR, but I will document it.]).