-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
Remove requirement of framework specific rectors #5976
Comments
The inclusion seems currently used to avoid direct BC break, see deprecation at: rector/packages/Set/ValueObject/SetList.php Lines 30 to 35 in e776d75
Also, on service rule usage, removing it means the rector/src/DependencyInjection/CompilerPass/VerifyRectorServiceExistsCompilerPass.php Line 29 in e776d75
for more verbose message, like addition information:
|
Hi @olivernybroe , that's something we plan for one of next releases. We want to take it step by step, so community adapts the change slowly. The hard question now is:
Once we have this answer, we can move on. |
Hi all, If not, stop reading and ignore next lines :D So we need something like
There are several issues about this problem in composer repository and there is also one solution it could work (I've never use it just read about it): If both packages rector/rector and rector/rector-prefixed will provide the same "interface" like:
Then all rector/rector-* packages could require this "rector/rector-abcdefg" and the final decision of what will be installed is up to user (or script) if he/she/it will require rector/rector or rector/rector-prefixed |
@lulco Yes, so that problem could be fixed by a package named something like However, the next problem is that the packages are not written in PHP 7.1, however Another possible solution would be that rector prefixed always contains all the packages. |
@olivernybroe hm, I forgot that PHP7.1 thing :) If there will be rector/rector-*-prefixed, imho there is no need for rector/rector-contracts. Another solutions are 1) to write rector and packages directly in PHP 7.1 or 2) do not support this version at all |
@lulco I don't think writing the packages in PHP 7.1 is a nice solution. It seems like something that will give other issues down the road 👍 As the prefixed rector already is bundled, I think it shouldn't matter that all the packages are pre-bundled into it. If people want lower file size, then don't use the prefixed bundle. |
Well, for example I don’t want to use prefixed Rector but I have to because of conflicts with symfony packages used in Rector and my projects. And I also would like to have only Rector packages I need. No laravel, no symfony etc. |
Hmm, yeah I guess the best solution for that would then be to "simply" have a rector/rector-*-prefixed for each of the packages then. |
Yeah probably |
First step towards decoupling #6174 by @sabbelasichon 👍 |
Thank you for your input, dicussion and points pro and against. After few dicussions with active rule users, I've came to conclusion that priority is in simple Rector use with 1 package - downgraded and prefixed. Making users to downgrade their own package would require tremendeous effort from them. Let's keept it simple. We might come back to this in the future, when it changes. |
I totally agree. I think the same. |
Hi @TomasVotruba, I just wanna understand completely here, does that mean you will drop |
@olivernybroe Hi, I have not decided yet, but I think it's quite possible that it will happen. As PHPStan did in PHPStan 0.12 https://phpstan.org/blog/phpstan-0-12-released#phar-distribution-by-default It would definitelly remove most of WTF on old and conflicting projects. But we're still 2 minor version away and Rector needs to grow up a bit :) |
rectorphp/rector-src@2dda748 [DX] Introduce set providers, to enable package + version based set registration (#5976)
Feature Request
I love that we now have packages for the framework specific rectors, however I think we could benefit from removing them as a requirement in the base of rector.
E.g. I am a Laravel developer, so I really don't need to have
cakephp
and so on rectors included in my codebase.Pros
Smaller package size
For me, as I would only require the Laravel rector package, my filesize would be reduced with about 1.2 MB 👍
Cons
User's having to require another package before they can use rector. + would this work correctly when using prefixed rector?
The text was updated successfully, but these errors were encountered: