Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,18 @@ parameters:
message: '#Fetching (deprecated )?class constant (.*?) of (deprecated )?class (Rector\\Set\\ValueObject\\DowngradeLevelSetList|Rector\\Symfony\\Set\\(.*?))#'
path: src/Configuration/RectorConfigBuilder.php

# the deprecated set objects are still resolved internally, until every extension bonds its rules
-
message: '#deprecated (class|interface) Rector\\(Set|Bridge)\\#'
paths:
- src/Set/SetManager.php
- src/Set/SetProvider/CoreSetProvider.php
- src/Set/SetProvider/PHPSetProvider.php
- src/Bridge/SetProviderCollector.php
- src/Configuration/RectorConfigBuilder.php
- tests/Set/ValueObject/ComposerTriggeredSetTest.php
- tests/Set/SetManager/SetManagerTest.php

# runtime comparison
- '#Comparison operation ".*" between int<\d+, \d+> and \d+ is always true#'

Expand Down
7 changes: 7 additions & 0 deletions src/Bridge/SetProviderCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
* @api
*
* Utils class to ease building bridges by 3rd-party tools
*
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
final readonly class SetProviderCollector
{
Expand Down
8 changes: 8 additions & 0 deletions src/Set/Contract/SetInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

namespace Rector\Set\Contract;

/**
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
interface SetInterface
{
public function getGroupName(): string;
Expand Down
8 changes: 8 additions & 0 deletions src/Set/Contract/SetProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

namespace Rector\Set\Contract;

/**
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
interface SetProviderInterface
{
/**
Expand Down
7 changes: 7 additions & 0 deletions src/Set/SetManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@

/**
* @see \Rector\Tests\Set\SetManager\SetManagerTest
*
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
final readonly class SetManager
{
Expand Down
8 changes: 8 additions & 0 deletions src/Set/SetProvider/CoreSetProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
use Rector\Set\Enum\SetGroup;
use Rector\Set\ValueObject\Set;

/**
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
final class CoreSetProvider implements SetProviderInterface
{
/**
Expand Down
8 changes: 8 additions & 0 deletions src/Set/SetProvider/PHPSetProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
use Rector\Set\Enum\SetGroup;
use Rector\Set\ValueObject\Set;

/**
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
final class PHPSetProvider implements SetProviderInterface
{
/**
Expand Down
8 changes: 8 additions & 0 deletions src/Set/ValueObject/ComposerTriggeredSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@

/**
* @api used by extensions
*
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* triggered on a single major version has to be repeated for every version an upgrade passes through, while a bonded
* rule states the exact package version its target API is available from and applies from there upwards.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*
* @see \Rector\Tests\Set\ValueObject\ComposerTriggeredSetTest
*/
final readonly class ComposerTriggeredSet implements SetInterface
Expand Down
7 changes: 7 additions & 0 deletions src/Set/ValueObject/Set.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@

/**
* @api used by extensions
*
* @deprecated Bond the rules themselves instead, by implementing the ComposerPackageConstraintInterface. A set
* described as an object only existed to be matched against the installed packages; a bonded rule states the exact
* package version its target API is available from and applies from there upwards, so a plain set file is enough.
*
* @see \Rector\VersionBonding\Contract\ComposerPackageConstraintInterface
* @see https://github.com/rectorphp/rector-src/pull/8296
*/
final readonly class Set implements SetInterface
{
Expand Down
Loading