Skip to content

Commit

Permalink
Merge pull request #140 from boesing/qa/pattern-deprecation
Browse files Browse the repository at this point in the history
Deprecate anything related to pattern factories
  • Loading branch information
boesing committed Aug 8, 2021
2 parents e82ea21 + 85e27e9 commit 566948e
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Pattern/PatternCacheFactory.php
Expand Up @@ -8,6 +8,10 @@
use Psr\Container\ContainerInterface;
use function class_exists;

/**
* @deprecated This will be removed with v3.0.0 as providing generic factories for cache patterns wont be suitable for
* all possible combinations of implemented upstream patterns.
*/
final class PatternCacheFactory
{
/**
Expand Down
4 changes: 4 additions & 0 deletions src/Pattern/StoragePatternCacheFactory.php
Expand Up @@ -12,6 +12,10 @@
use function class_exists;
use function is_string;

/**
* @deprecated This will be removed with v3.0.0 as providing generic factories for cache patterns wont be suitable for
* all possible combinations of implemented upstream patterns.
*/
final class StoragePatternCacheFactory
{
/**
Expand Down
5 changes: 3 additions & 2 deletions src/PatternFactory.php
Expand Up @@ -7,8 +7,9 @@
use Traversable;

/**
* @deprecated Please do not use static factories anymore.
* Inject {@see PatternPluginManager} instead.
* @deprecated Please do not use static factories anymore. Please create your own instances by creating a
* dedicated factory for each of the patterns with your project specific needs or just instantiate
* the pattern manually instead of calling this factory.
*/
abstract class PatternFactory
{
Expand Down
2 changes: 2 additions & 0 deletions src/PatternPluginManager/PatternPluginManagerTrait.php
Expand Up @@ -12,6 +12,8 @@
* Trait does not define properties, as the properties common between the
* two versions are originally defined in their parent class, causing a
* resolution conflict.
*
* @deprecated This will be removed in v3.0.0 and should never have been used in upstream projects anyways.
*/
trait PatternPluginManagerTrait
{
Expand Down
2 changes: 2 additions & 0 deletions src/PatternPluginManager/PatternPluginManagerV2Polyfill.php
Expand Up @@ -12,6 +12,8 @@
* Enforces that retrieved adapters are instances of
* Pattern\PatternInterface. Additionally, it registers a number of default
* patterns available.
* @deprecated This will be removed in v3.0.0. Cache pattern will require dependency injection and thus, a generic
* plugin manager makes no sense anymore.
*/
class PatternPluginManagerV2Polyfill extends AbstractPluginManager
{
Expand Down
2 changes: 2 additions & 0 deletions src/PatternPluginManager/PatternPluginManagerV3Polyfill.php
Expand Up @@ -12,6 +12,8 @@
* Enforces that retrieved adapters are instances of
* Pattern\PatternInterface. Additionally, it registers a number of default
* patterns available.
* @deprecated This will be removed in v3.0.0. Cache pattern will require dependency injection and thus, a generic
* plugin manager makes no sense anymore.
*/
class PatternPluginManagerV3Polyfill extends AbstractPluginManager
{
Expand Down

0 comments on commit 566948e

Please sign in to comment.