After the core upgrade (e.g. from 7.6 to 11.5), you can continue with your old extension code. Rector is a good tool for this.

https://github.com/rectorphp/rector
https://github.com/sabbelasichon/typo3-rector/blob/main/docs/best_practice_guide.md

Install rector

composer require-dev ssch/typo3-rector

Emaple rector.php

 

<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Ssch\TYPO3Rector\Set\Typo3LevelSetList;

return static function (RectorConfig $rectorConfig): void {

    $rectorConfig->paths([
        __DIR__ . '/packages/zwbisdrei_config',
    ]);
    $rectorConfig->sets([Typo3LevelSetList::UP_TO_TYPO3_11]);
    $rectorConfig->phpVersion(PhpVersion::PHP_74);

};

 

Prepare before run

Dry run

vendor/bin/rector --dry-run

Run

vendor/bin/rector