Skip to content

Utf8DecodeEncodeToMbConvertEncodingRector doesn't change anything #7954

Answered by samsonasik
W0rma asked this question in Q&A
Discussion options

You must be logged in to vote

You need to define php version feature if the composer.json doesn't define php 8.2

<?php

use Rector\Config\RectorConfig;
use Rector\Php82\Rector\FuncCall\Utf8DecodeEncodeToMbConvertEncodingRector;
use Rector\Core\ValueObject\PhpVersionFeature;

return static function (RectorConfig $rectorConfig): void {
    $rectorConfig->phpVersion(PhpVersionFeature::DEPRECATE_UTF8_DECODE_ENCODE_FUNCTION);
    
    $rectorConfig->rule(Utf8DecodeEncodeToMbConvertEncodingRector::class);
};

Ref https://getrector.com/demo/b375e3bb-5680-480c-8594-de7e55ebae0c

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by samsonasik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants