Skip to content

Conversation

escopecz
Copy link
Member

@escopecz escopecz commented Dec 23, 2024

Q A
Bug fix? (use the a.b branch) 🔴
New feature/enhancement? (use the a.x branch) 🟢
Deprecations? 🔴
BC breaks? (use the c.x branch) 🟢
Automated tests included? 🔴🟢 No new tests, but improved static analysis
Related user documentation PR URL mautic/user-documentation#...
Related developer documentation PR URL mautic/developer-documentation-new#...
Issue(s) addressed Fixes #...

Description

Tasks done in this PR:

  1. Upgraded PHPSTAN and Rector to their new major versions
  2. Automated changes done by Rector's new version
  3. Around 400 manual fixes reported by PHPSTAN's new version.
  4. Most of the changes are caused by regenerated PHPSTAN baseline. See 370426c

I've fixed all PHPSTAN issues before regenerating the baseline. All new lines there are caused by new format where PHPSTAN adds identifier line for every issue in the file. So even though the baseline file has more rows now, it has about 500 less issues in it.


📋 Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Most issues were caught by the automated tests we have, but test your most used features to make sure they keep working.

@escopecz escopecz added this to the 6.0 milestone Dec 23, 2024
@escopecz escopecz added enhancement Any improvement to an existing feature or functionality dependencies Pull requests that update a dependency file refactoring The change does not change behavior but improves the code labels Dec 23, 2024
Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 53.02326% with 101 lines in your changes missing coverage. Please review.

Project coverage is 63.64%. Comparing base (a264399) to head (370426c).
Report is 11 commits behind head on 6.x.

Files with missing lines Patch % Lines
app/bundles/LeadBundle/Model/LeadModel.php 11.76% 15 Missing ⚠️
...p/bundles/LeadBundle/Controller/AjaxController.php 22.22% 14 Missing ⚠️
...auticCrmBundle/Integration/SugarcrmIntegration.php 0.00% 14 Missing ⚠️
...undles/ReportBundle/Event/ReportGeneratorEvent.php 61.53% 5 Missing ⚠️
app/bundles/AssetBundle/Entity/Asset.php 33.33% 4 Missing ⚠️
...mailBundle/Stats/FetchOptions/EmailStatOptions.php 20.00% 4 Missing ⚠️
...ticFullContactBundle/Services/FullContact_Base.php 0.00% 3 Missing ⚠️
app/bundles/EmailBundle/Model/EmailModel.php 0.00% 2 Missing ⚠️
...e/MonitoredEmail/Processor/FeedbackLoop/Parser.php 0.00% 2 Missing ⚠️
app/bundles/FormBundle/Entity/FormRepository.php 0.00% 2 Missing ⚠️
... and 29 more
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                6.x   #14408      +/-   ##
============================================
+ Coverage     63.57%   63.64%   +0.06%     
+ Complexity    34688    34648      -40     
============================================
  Files          2281     2276       -5     
  Lines        103775   103648     -127     
============================================
- Hits          65976    65964      -12     
+ Misses        37799    37684     -115     
Files with missing lines Coverage Δ
.../ApiBundle/Serializer/Driver/ApiMetadataDriver.php 75.75% <100.00%> (ø)
...ndles/CampaignBundle/Membership/Action/Remover.php 100.00% <ø> (ø)
app/bundles/CampaignBundle/Model/CampaignModel.php 77.08% <ø> (ø)
app/bundles/CategoryBundle/Model/CategoryModel.php 80.00% <ø> (ø)
.../bundles/ChannelBundle/Model/MessageQueueModel.php 82.75% <ø> (ø)
...ndles/ConfigBundle/Controller/ConfigController.php 61.06% <100.00%> (ø)
...s/CoreBundle/Controller/AbstractFormController.php 77.14% <ø> (ø)
...dencyInjection/Builder/Metadata/EntityMetadata.php 100.00% <ø> (ø)
...ction/Builder/Metadata/PermissionClassMetadata.php 100.00% <ø> (ø)
...es/CoreBundle/Doctrine/AbstractMauticMigration.php 6.77% <ø> (ø)
... and 109 more

... and 4 files with indirect coverage changes

@escopecz escopecz force-pushed the phpstan2-rector-update branch from 949ba70 to cf995fe Compare December 23, 2024 19:21
@escopecz escopecz marked this pull request as ready for review December 23, 2024 19:37
@escopecz escopecz added ready-to-test PR's that are ready to test code-review-needed PR's that require a code review before merging labels Dec 23, 2024
Copy link
Contributor

@matbcvo matbcvo left a comment

Choose a reason for hiding this comment

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

The code changes look good to me. Our most used features work as expected. Thanks!

@escopecz escopecz added pending-test-confirmation PR's that require one test before they can be merged and removed ready-to-test PR's that are ready to test code-review-needed PR's that require a code review before merging pending-test-confirmation PR's that require one test before they can be merged labels Dec 28, 2024
@escopecz escopecz merged commit fd68014 into mautic:6.x Dec 28, 2024
16 of 17 checks passed
@escopecz escopecz deleted the phpstan2-rector-update branch December 28, 2024 16:53
@mautibot
Copy link
Contributor

This pull request has been mentioned on Mautic Forums. There might be relevant details there:

https://forum.mautic.org/t/mautic-6-is-here-alpha-release-is-ready-for-you-to-start-testing/34874/1

@mautibot
Copy link
Contributor

This pull request has been mentioned on Mautic Forums. There might be relevant details there:

https://forum.mautic.org/t/mautic-6-is-here-alpha-release-is-ready-for-you-to-start-testing/34900/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement Any improvement to an existing feature or functionality refactoring The change does not change behavior but improves the code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants