mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 13:28:18 +01:00
Updated Rector to commit 1d7208b816e8c12d7732a2d633b44d8e8bc0041e
1d7208b816
feat: add Behat annotations to attributes set (#6510)
This commit is contained in:
parent
c5a315e2c4
commit
a6f87828b7
11
config/set/behat-annotations-to-attributes.php
Normal file
11
config/set/behat-annotations-to-attributes.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix202411;
|
||||
|
||||
use Rector\Config\RectorConfig;
|
||||
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
|
||||
use Rector\Php80\ValueObject\AnnotationToAttribute;
|
||||
return static function (RectorConfig $rectorConfig) : void {
|
||||
$rectorConfig->ruleWithConfiguration(AnnotationToAttributeRector::class, [new AnnotationToAttribute('Given', 'Behat\\Step\\Given', [], \true), new AnnotationToAttribute('When', 'Behat\\Step\\When', [], \true), new AnnotationToAttribute('Then', 'Behat\\Step\\Then', [], \true), new AnnotationToAttribute('BeforeSuite', 'Behat\\Hook\\BeforeSuite', [], \true), new AnnotationToAttribute('AfterSuite', 'Behat\\Hook\\AfterSuite', [], \true), new AnnotationToAttribute('BeforeFeature', 'Behat\\Hook\\BeforeFeature', [], \true), new AnnotationToAttribute('AfterFeature', 'Behat\\Hook\\AfterFeature', [], \true), new AnnotationToAttribute('BeforeScenario', 'Behat\\Hook\\BeforeScenario', [], \true), new AnnotationToAttribute('AfterScenario', 'Behat\\Hook\\AfterScenario', [], \true), new AnnotationToAttribute('BeforeStep', 'Behat\\Hook\\BeforeStep', [], \true), new AnnotationToAttribute('AfterStep', 'Behat\\Hook\\AfterStep', [], \true)]);
|
||||
};
|
@ -19,12 +19,12 @@ final class VersionResolver
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '12b471059bc5717e3f87cf1e811f05396e3571cf';
|
||||
public const PACKAGE_VERSION = '1d7208b816e8c12d7732a2d633b44d8e8bc0041e';
|
||||
/**
|
||||
* @api
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2024-11-25 21:20:15';
|
||||
public const RELEASE_DATE = '2024-11-25 15:53:11';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -315,7 +315,7 @@ final class RectorConfigBuilder
|
||||
/**
|
||||
* Upgrade your annotations to attributes
|
||||
*/
|
||||
public function withAttributesSets(bool $symfony = \false, bool $doctrine = \false, bool $mongoDb = \false, bool $gedmo = \false, bool $phpunit = \false, bool $fosRest = \false, bool $jms = \false, bool $sensiolabs = \false, bool $all = \false) : self
|
||||
public function withAttributesSets(bool $symfony = \false, bool $doctrine = \false, bool $mongoDb = \false, bool $gedmo = \false, bool $phpunit = \false, bool $fosRest = \false, bool $jms = \false, bool $sensiolabs = \false, bool $behat = \false, bool $all = \false) : self
|
||||
{
|
||||
// if nothing is passed, enable all as convention in other method
|
||||
if (\func_get_args() === []) {
|
||||
@ -345,6 +345,9 @@ final class RectorConfigBuilder
|
||||
if ($sensiolabs || $all) {
|
||||
$this->sets[] = SensiolabsSetList::ANNOTATIONS_TO_ATTRIBUTES;
|
||||
}
|
||||
if ($behat || $all) {
|
||||
$this->sets[] = SetList::BEHAT_ANNOTATIONS_TO_ATTRIBUTES;
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
|
@ -123,4 +123,8 @@ final class SetList
|
||||
* @var string
|
||||
*/
|
||||
public const CARBON = __DIR__ . '/../../../config/set/datetime-to-carbon.php';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const BEHAT_ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../../config/set/behat-annotations-to-attributes.php';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user