From 24c71241d16b7deca56d67ea0f1d591c8ae52f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Planchat?= Date: Mon, 20 Nov 2023 11:48:56 +0100 Subject: [PATCH] Moved RunnableInterface and SchedulingInterface from pipeline contracts to satellite contracts --- src/RunnableInterface.php | 10 +++++----- src/SchedulingInterface.php | 13 +++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/RunnableInterface.php b/src/RunnableInterface.php index cc4f5ca..2286448 100644 --- a/src/RunnableInterface.php +++ b/src/RunnableInterface.php @@ -2,9 +2,9 @@ declare(strict_types=1); -namespace Kiboko\Contract\Pipeline; +trigger_deprecation('php-etl/pipeline-contracts', '0.5', 'The "%s" class is deprecated, use "%s" instead.', 'Kiboko\\Contract\\Pipeline\\RunnableInterface', \Kiboko\Contract\Satellite\RunnableInterface::class); -use Kiboko\Contract\Satellite\RunnableInterface as SatelliteRunableInterface; - -/** @deprecated Use \Kiboko\Contract\Satellite\RunnableInterface instead */ -interface RunnableInterface extends SatelliteRunableInterface {} +/* + * @deprecated since Satellite 0.2, use Kiboko\Contract\Satellite\RunnableInterface instead. + */ +class_alias(\Kiboko\Contract\Satellite\RunnableInterface::class, 'Kiboko\\Contract\\Pipeline\\RunnableInterface'); diff --git a/src/SchedulingInterface.php b/src/SchedulingInterface.php index 4d7a299..1b16067 100644 --- a/src/SchedulingInterface.php +++ b/src/SchedulingInterface.php @@ -2,12 +2,9 @@ declare(strict_types=1); -namespace Kiboko\Contract\Pipeline; +trigger_deprecation('php-etl/pipeline-contracts', '0.5', 'The "%s" class is deprecated, use "%s" instead.', 'Kiboko\\Contract\\Pipeline\\SchedulingInterface', \Kiboko\Contract\Satellite\SchedulingInterface::class); -use Kiboko\Contract\Satellite\CodeInterface; -use Kiboko\Contract\Satellite\RunnableInterface; - -interface SchedulingInterface -{ - public function job(CodeInterface $job, RunnableInterface $runnable): self; -} +/* + * @deprecated since Satellite 0.2, use Kiboko\Contract\Satellite\SchedulingInterface instead. + */ +class_alias(\Kiboko\Contract\Satellite\SchedulingInterface::class, 'Kiboko\\Contract\\Pipeline\\SchedulingInterface');