After the core update is done (for example from 7.6 to 11.5) you can continue with your old extensions code. Rector is a good help for this.

Install rector

composer require rector/rector

Initialise for TYPO3

vendor/bin/rector init --template-type=typo3
This creates a rector.php in root of your project. Here you can specify the checks. If you're going from v8 to v10, apply v7/v8 sets first!

Prepare before run

Dry run

vendor/bin/rector process src --dry-run