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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Symfony 4.0 and 4.1 Rector rule sets to CI #11479
Conversation
1bc3c08
to
319076d
Compare
Codecov Report
@@ Coverage Diff @@
## 5.x #11479 +/- ##
=========================================
Coverage 49.91% 49.91%
- Complexity 35511 35515 +4
=========================================
Files 2153 2153
Lines 106392 106392
=========================================
Hits 53102 53102
Misses 53290 53290
|
Error message: Could not process "app/bundles/IntegrationsBundle/Controller/ConfigController.php" file, due to: "System error: "Rector\Symfony\Rector\MethodCall\FormIsValidRector::isIsSubmittedByAlreadyCalledOnVariable(): Argument #1 ($variable) must be of type PhpParser\Node\Expr\Variable, PhpParser\Node\Expr\PropertyFetch given, called in vendor/rector/rector/vendor/rector/rector-symfony/src/Rector/MethodCall/FormIsValidRector.php:59" Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line: 86
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small nitpick for a typo, for the rest it's good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go
Description:
The idea is that we'll have Rector rules that we need to get to Symfony 5 support (refactor the deprecated code) in CI so that all PRs (currently 260 open, kinda old PRs) will not add some deprecated code.
This PR starts with Symfony 4.0 and 4.1 rule set. Symfony 4.2 will follow but we need to merge #11447 first as it focuses on TranslatorInterface and change a lot of files.
I had to refactor
app/bundles/IntegrationsBundle/Controller/ConfigController.php
a little as using property of$this->form
over just variable$form
was breaking a Rector rule. It was an anti-pattern anyway as we can simply pass the form as input params to the private methods instead which is much cleaner.The Symfony rule set also needs the cache built so I added
bin/console cache:warmup
before we run Rector.Steps to test this PR: