Skip to content
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

[3rd party] Add custom test case, that requires config and is focused on external packages testing #5478

Closed
5 tasks done
TomasVotruba opened this issue Feb 9, 2021 · 2 comments · Fixed by sabbelasichon/typo3-rector#1962
Labels

Comments

@TomasVotruba
Copy link
Member

TomasVotruba commented Feb 9, 2021

Now the AbstractTestCase is optimized both for core and 3rd party packages (with lot of magic). Performance optimizations crashes with UX and it's mess for both sides :)

It will be better to have 2 test cases:

  • 1st for internal Rector rule, that load all the rules in container at once
  • 2nd for 3rd party packages, that will have clear API to implement and easy to use and extend

Todo

  • Decouple AbstractCommunityTestCase from AbstractTestCase
  • Remove magical rector.php autoload
  • Promote config loading approach
  • Update on master & then verify on real project - https://github.com/sabbelasichon/typo3-rector, cc @sabbelasichon
  • Create Rector rule to switch from getRectorClass() to getConfigFilePath()
@sabbelasichon
Copy link
Contributor

@TomasVotruba Let me know what to do and i will be your test candidate.

sabbelasichon pushed a commit to sabbelasichon/typo3-rector that referenced this issue Feb 12, 2021
)

* inherit from AbstractCommunityTestCase
* show example of upgrade
* make use autowired array
* use native PostRector ignore
* use native Post import rector
* make use of configs in tests
* fix cs
* static fixes
* make use of configurable phpstan for rector path
* add configs
* remove unused DependencyInjection
* run Rector on code base to import FQN and add see annotatoins
* use tagged rector

Closes rectorphp/rector#5478
@TomasVotruba
Copy link
Member Author

Resolved

TomasVotruba added a commit that referenced this issue Jan 18, 2024
rectorphp/rector-src@76714b9 [Printer] Remove unnecessary BetterStandardPrinter::pStmt_Use() (#5478)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants