Skip to content
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

Php 8.2 with new CS Fixer version #13212

Closed
wants to merge 20 commits into from
Closed

Conversation

escopecz
Copy link
Sponsor Member

@escopecz escopecz commented Jan 12, 2024

Q A
Bug fix? (use the a.b branch) [y]
New feature/enhancement? (use the a.x branch) [ ]
Deprecations? [ ]
BC breaks? (use the c.x branch) [ ]
Automated tests included? [ ]
Related user documentation PR URL mautic/mautic-documentation#...
Related developer documentation PR URL mautic/developer-documentation#...
Issue(s) addressed Fixes #...

Description:

⚠️ this PR is based on #12469 so it must be merged first!

I'm pushing these changes here because I want to separate manual (#12469) changes with the automatic changes in this PR.

The reason for upgrade of the CS Fixer library is that on PHP 8.2 it throws this error:

composer fixcs
> bin/php-cs-fixer fix
PHP needs to be a minimum version of PHP 7.4.0 and maximum version of PHP 8.1.*.
Current PHP version: 8.2.14.
To ignore this requirement please set `PHP_CS_FIXER_IGNORE_ENV`.
If you use PHP version higher than supported, you may experience code modified in a wrong way.
Please report such cases at https://github.com/PHP-CS-Fixer/PHP-CS-Fixer .
Script bin/php-cs-fixer fix handling the fixcs event returned with error code 1

There is a walk around solution suggested in the error message but I think it's time to update the CS Fixer. This PR contains only the changes generated by the new CS Fixer version.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Click through to test that nothing was broken. But we have automatic tests that would discover issues if pages wouldn't load so I think this doesn't require any manual testing.

requiring iconv as it's used in other parts of the codebase without any check
…ed; use htmlspecialchars, htmlentities, or mb_encode_numericentity/mb_decode_numericentity instead
…thod signature which is a BC break

and the class is deprecated so it will go away in M6 anyway
@escopecz escopecz added the blocked Something blocks this PR/issue (e.g. waiting for another PR to be merged) label Jan 12, 2024
@escopecz escopecz added this to the 5.1.0 milestone Jan 12, 2024
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

Attention: 77 lines in your changes are missing coverage. Please review.

Comparison is base (65421d2) 58.69% compared to head (e617e96) 58.65%.
Report is 539 commits behind head on 5.x.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                5.x   #13212      +/-   ##
============================================
- Coverage     58.69%   58.65%   -0.04%     
+ Complexity    33111    33110       -1     
============================================
  Files          2194     2194              
  Lines         99099    99092       -7     
============================================
- Hits          58163    58127      -36     
- Misses        40936    40965      +29     
Files Coverage Δ
.../bundles/ApiBundle/Controller/ClientController.php 39.74% <ø> (ø)
...ndles/ApiBundle/Controller/CommonApiController.php 79.38% <100.00%> (ø)
app/bundles/ApiBundle/Entity/oAuth2/Client.php 78.20% <100.00%> (ø)
...le/EventListener/PreAuthorizationEventListener.php 5.88% <ø> (ø)
...m/Validator/Constraints/OAuthCallbackValidator.php 50.00% <ø> (ø)
...bundles/ApiBundle/Helper/BatchIdToEntityHelper.php 98.33% <ø> (ø)
...pp/bundles/ApiBundle/Helper/EntityResultHelper.php 96.00% <ø> (ø)
.../ApiBundle/Serializer/Driver/ApiMetadataDriver.php 75.75% <ø> (ø)
.../AssetBundle/Controller/Api/AssetApiController.php 93.54% <ø> (ø)
app/bundles/AssetBundle/Entity/Asset.php 72.20% <100.00%> (ø)
... and 233 more

... and 127 files with indirect coverage changes

@escopecz escopecz added ready-to-test PR's that are ready to test enhancement Any improvement to an existing feature or functionality needs-rebase PR's that need to be rebased and removed blocked Something blocks this PR/issue (e.g. waiting for another PR to be merged) ready-to-test PR's that are ready to test labels Feb 6, 2024
@escopecz
Copy link
Sponsor Member Author

Closing in favor or #13637

@escopecz escopecz closed this Apr 12, 2024
@escopecz escopecz removed this from the 5.1.0 milestone Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any improvement to an existing feature or functionality needs-rebase PR's that need to be rebased
Projects
Status: 🥳 Done
Development

Successfully merging this pull request may close these issues.

None yet

1 participant