Feature Request
There are features from new PHP version that cannot be downgraded to a previous version, such as #4317, so we could throw DowngradeNotPossibleException whenever finding these features in the code.
There could also be features that can be downgraded, but we haven't done it yet (eg: because we disregarded that use case).
For instance, the downgrade rule from #4314 may be applied to a still-unsupported use case. Then, the rule could fail with throwing DowngradeNotImplementedException, and showing an error message asking the developer to add an issue for this new use case in the Rector repo.
If after analyzing the use case, we come to the conclusion that it cannot be downgraded, then we could throw a DowngradeNotPossibleException, explaining why this feature cannot be supported by previous PHP versions. This may well happen with annotations from PHP 8.0 (#4156)
Several exceptions could happen in a single run, so we could extract the message from all of them and show them all together once the run has ended.
Feature Request
There are features from new PHP version that cannot be downgraded to a previous version, such as #4317, so we could throw
DowngradeNotPossibleExceptionwhenever finding these features in the code.There could also be features that can be downgraded, but we haven't done it yet (eg: because we disregarded that use case).
For instance, the downgrade rule from #4314 may be applied to a still-unsupported use case. Then, the rule could fail with throwing
DowngradeNotImplementedException, and showing an error message asking the developer to add an issue for this new use case in the Rector repo.If after analyzing the use case, we come to the conclusion that it cannot be downgraded, then we could throw a
DowngradeNotPossibleException, explaining why this feature cannot be supported by previous PHP versions. This may well happen with annotations from PHP 8.0 (#4156)Several exceptions could happen in a single run, so we could extract the message from all of them and show them all together once the run has ended.