-
-
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
Feature Request: Add withSetProviders
method for Registering SetProviderInterface
#8720
Comments
Hi, this feature is internal. We don't use for public yet. |
Before deprecation:
After deprecation: Config: use Ghostwriter\MockeryRector\MockeryLevelSetList;
use Ghostwriter\MockeryRector\MockerySetList;
use Ghostwriter\MockeryRector\Rule\ExtendMockeryTestCaseRector;
use Ghostwriter\MockeryRector\Rule\HamcrestToPHPUnitRector;
use Ghostwriter\MockeryRector\Rule\PHPUnitToMockeryRector;
use Ghostwriter\MockeryRector\Rule\ProphecyToMockeryRector;
use Ghostwriter\MockeryRector\Rule\ShouldReceiveToAllowsRector;
use Ghostwriter\MockeryRector\Rule\ShouldReceiveToExpectsRector;
use Ghostwriter\MockeryRector\Rule\UseMockeryPHPUnitIntegrationTraitRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
// ExtendMockeryTestCaseRector::class,
// HamcrestToPHPUnitRector::class,
// PHPUnitToMockeryRector::class,
// ProphecyToMockeryRector::class,
// ShouldReceiveToAllowsRector::class,
// ShouldReceiveToExpectsRector::class,
// UseMockeryPHPUnitIntegrationTraitRector::class,
])
->withSets([
// version sets
MockerySetList::MOCKERY_1_6, // v1.6.0
MockerySetList::MOCKERY_2_0, // v2.0.0
// or level sets
MockeryLevelSetList::UP_TO_MOCKERY_1_6, // v0.1.0 - v1.6.0
MockeryLevelSetList::UP_TO_MOCKERY_2_0, // v0.1.0 - v2.0.0
// or migration sets
MockerySetList::PHPUNIT_TO_MOCKERY, // PHPUnit to Mockery
MockerySetList::PROPHECY_TO_MOCKERY, // Prophecy to Mockery
]); |
I would like to use the I would like to see a return RectorConfig::configure()
->withSetProviders(
PHPSetProvider::class,
PHPUnitSetProvider::class,
MockerySetProvider::class,
); |
Hi @TomasVotruba, With the introduction of Composer-Based Sets and Custom Set Providers, Currently, requiring a PR for every custom
It would be great to simplify this step for broader usability with the requested method (or a similar one). |
SetProviderInterface
withSetProviders
method for Registering SetProviderInterface
Hi,
SetListInterface
was deprecated.Question
Can you please provide documentation or examples on how to register a class that implements the
SetProviderInterface
usingRectorConfigBuilder
orRectorConfig
.It is unclear how to properly implement and register the new interface.
Thank you.
The text was updated successfully, but these errors were encountered: