-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support for Symfony 7 #28
Conversation
@danepowell Could you have a look? |
@mbrodala have you actually tested this with Symfony 7? I know there are many changes, such as the use of PHP attributes for command names, which this package is not up to date with. |
These are optional features, the current code actually is fine AFAIS. As a simple check I did a Rector dry-run on this project:
rector.php<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Symfony\Set\SymfonyLevelSetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__.'/src',
]);
$rectorConfig->sets([
SymfonyLevelSetList::UP_TO_SYMFONY_64,
]);
}; So nothing really which must be changed for Symfony 7 compat. As for your question: no, I did not yet test this with Symfony 7 since this is currently actually a blocker for one of our projects which uses |
I think we should remove support for everything except Symfony 5.4, 6.4, and 7, given the EOL timelines. And maybe make all of the possible rector upgrades at the same time (as long as they're backwards-compatible to 5.4). |
Agreed, that's what I opened #29 for. :-) |
This all sounds good to me as well; please be sure to bump the |
I removed support for EOL PHP and Symfony versions in #30 Once someone has tested the current PR on Symfony 7, let me know and I can merge these together. |
Looking at this again, I see that the comment from 16 Jan includes:
This looks like a change that would be necessary to make in Symfony 7. It is probably okay to include the return typehint with earlier versions of Symfony, as PHP seems to be forgiving about adding return typehints that do not exist in the parent class. Removing return typehints that are in the parent class is not allowed without a "ReturnTypeMightChange" annotation, though (which is only supported in PHP 8.1+). The tests only run with PHP 7.4, if I am not mistaken, so Symfony 7 won't be covered in the current tests. |
@greg-1-anderson See #30 which resolves this by dropping support for PHP 7.x and 8.0 among others. |
I'm going to try to fix #10 before cutting a new major release |
Hello, Thanks for this PR. @danepowell #10 seems fixed. So could you release a new version? Thanks |
Sorry we're waiting on one more breaking change for a new major release: #34 We just need a review on that PR; feel free to comment or help with that PR. |
No description provided.