diff --git a/composer.json b/composer.json index 613b4ffc3..8ba23b716 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,6 @@ "fakerphp/faker": "^1.23", "fig/log-test": "^1.1", "jawira/case-converter": "^3.4", - "laravel/serializable-closure": "^1.1", "league/flysystem-aws-s3-v3": "^3.0", "league/flysystem-azure-blob-storage": "^3.0", "moneyphp/money": "^4", diff --git a/composer.lock b/composer.lock index 261ef27c0..e8d9d8376 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "37963f1ae47d70937a6f218f968a5522", + "content-hash": "1d0b7c3ac2049a5f683028381583325f", "packages": [ { "name": "aeon-php/calendar", @@ -2146,16 +2146,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.34", + "version": "3.0.35", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "56c79f16a6ae17e42089c06a2144467acc35348a" + "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/56c79f16a6ae17e42089c06a2144467acc35348a", - "reference": "56c79f16a6ae17e42089c06a2144467acc35348a", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/4b1827beabce71953ca479485c0ae9c51287f2fe", + "reference": "4b1827beabce71953ca479485c0ae9c51287f2fe", "shasum": "" }, "require": { @@ -2236,7 +2236,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.34" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.35" }, "funding": [ { @@ -2252,7 +2252,7 @@ "type": "tidelift" } ], - "time": "2023-11-27T11:13:31+00:00" + "time": "2023-12-29T01:59:53+00:00" }, { "name": "psr/cache", @@ -2663,16 +2663,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -2737,7 +2737,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -2753,7 +2753,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3386,16 +3386,16 @@ }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", "shasum": "" }, "require": { @@ -3452,7 +3452,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v6.4.2" }, "funding": [ { @@ -3468,20 +3468,20 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/translation", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37" + "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", - "reference": "b1035dbc2a344b21f8fa8ac451c7ecec4ea45f37", + "url": "https://api.github.com/repos/symfony/translation/zipball/a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", + "reference": "a2ab2ec1a462e53016de8e8d5e8912bfd62ea681", "shasum": "" }, "require": { @@ -3547,7 +3547,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.4.0" + "source": "https://github.com/symfony/translation/tree/v6.4.2" }, "funding": [ { @@ -3563,7 +3563,7 @@ "type": "tidelift" } ], - "time": "2023-11-29T08:14:36+00:00" + "time": "2023-12-18T09:25:29+00:00" }, { "name": "symfony/translation-contracts", @@ -3822,16 +3822,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.295.2", + "version": "3.295.4", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "7e8f68580954a01cf9c8f2abd4f4db52ebcb7b73" + "reference": "2372661db989fe4229abd95f4434b37252076d58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7e8f68580954a01cf9c8f2abd4f4db52ebcb7b73", - "reference": "7e8f68580954a01cf9c8f2abd4f4db52ebcb7b73", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2372661db989fe4229abd95f4434b37252076d58", + "reference": "2372661db989fe4229abd95f4434b37252076d58", "shasum": "" }, "require": { @@ -3911,9 +3911,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.295.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.295.4" }, - "time": "2023-12-27T19:06:10+00:00" + "time": "2023-12-29T19:07:49+00:00" }, { "name": "brick/math", @@ -4151,66 +4151,6 @@ }, "time": "2022-08-14T11:40:18+00:00" }, - { - "name": "laravel/serializable-closure", - "version": "v1.3.3", - "source": { - "type": "git", - "url": "https://github.com/laravel/serializable-closure.git", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754", - "reference": "3dbf8a8e914634c48d389c1234552666b3d43754", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "nesbot/carbon": "^2.61", - "pestphp/pest": "^1.21.3", - "phpstan/phpstan": "^1.8.2", - "symfony/var-dumper": "^5.4.11" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laravel\\SerializableClosure\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - }, - { - "name": "Nuno Maduro", - "email": "nuno@laravel.com" - } - ], - "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", - "keywords": [ - "closure", - "laravel", - "serializable" - ], - "support": { - "issues": "https://github.com/laravel/serializable-closure/issues", - "source": "https://github.com/laravel/serializable-closure" - }, - "time": "2023-11-08T14:08:06+00:00" - }, { "name": "league/flysystem-aws-s3-v3", "version": "3.22.0", @@ -4966,16 +4906,16 @@ }, { "name": "symfony/cache", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "ac2d25f97b17eec6e19760b6b9962a4f7c44356a" + "reference": "14a75869bbb41cb35bc5d9d322473928c6f3f978" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/ac2d25f97b17eec6e19760b6b9962a4f7c44356a", - "reference": "ac2d25f97b17eec6e19760b6b9962a4f7c44356a", + "url": "https://api.github.com/repos/symfony/cache/zipball/14a75869bbb41cb35bc5d9d322473928c6f3f978", + "reference": "14a75869bbb41cb35bc5d9d322473928c6f3f978", "shasum": "" }, "require": { @@ -5042,7 +4982,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v6.4.0" + "source": "https://github.com/symfony/cache/tree/v6.4.2" }, "funding": [ { @@ -5058,7 +4998,7 @@ "type": "tidelift" } ], - "time": "2023-11-24T19:28:07+00:00" + "time": "2023-12-29T15:34:34+00:00" }, { "name": "symfony/cache-contracts", @@ -5138,16 +5078,16 @@ }, { "name": "symfony/dotenv", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "d0d584a91422ddaa2c94317200d4c4e5b935555f" + "reference": "835f8d2d1022934ac038519de40b88158798c96f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/d0d584a91422ddaa2c94317200d4c4e5b935555f", - "reference": "d0d584a91422ddaa2c94317200d4c4e5b935555f", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/835f8d2d1022934ac038519de40b88158798c96f", + "reference": "835f8d2d1022934ac038519de40b88158798c96f", "shasum": "" }, "require": { @@ -5192,7 +5132,7 @@ "environment" ], "support": { - "source": "https://github.com/symfony/dotenv/tree/v6.4.0" + "source": "https://github.com/symfony/dotenv/tree/v6.4.2" }, "funding": [ { @@ -5208,7 +5148,7 @@ "type": "tidelift" } ], - "time": "2023-10-26T18:19:48+00:00" + "time": "2023-12-28T19:16:56+00:00" }, { "name": "symfony/finder", @@ -5432,16 +5372,16 @@ }, { "name": "symfony/var-exporter", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "2d08ca6b9cc704dce525615d1e6d1788734f36d9" + "reference": "5fe9a0021b8d35e67d914716ec8de50716a68e7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/2d08ca6b9cc704dce525615d1e6d1788734f36d9", - "reference": "2d08ca6b9cc704dce525615d1e6d1788734f36d9", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/5fe9a0021b8d35e67d914716ec8de50716a68e7e", + "reference": "5fe9a0021b8d35e67d914716ec8de50716a68e7e", "shasum": "" }, "require": { @@ -5487,7 +5427,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v6.4.1" + "source": "https://github.com/symfony/var-exporter/tree/v6.4.2" }, "funding": [ { @@ -5503,7 +5443,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:32:10+00:00" + "time": "2023-12-27T08:18:35+00:00" } ], "aliases": [], diff --git a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php index ae709c28c..cdb57fbe5 100644 --- a/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php +++ b/src/adapter/etl-adapter-avro/src/Flow/ETL/Adapter/Avro/FlixTech/AvroLoader.php @@ -14,9 +14,6 @@ use Flow\ETL\Row\Schema; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class AvroLoader implements Closure, Loader, Loader\FileLoader { private ?Schema $inferredSchema = null; @@ -32,21 +29,6 @@ public function __construct( } } - public function __serialize() : array - { - return [ - 'path' => $this->path, - 'schema' => $this->schema, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - $this->schema = $data['schema']; - $this->writer = null; - } - public function closure(FlowContext $context) : void { if ($this->writer !== null) { diff --git a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php index 0c5b2b5a5..2d1865ee4 100644 --- a/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php +++ b/src/adapter/etl-adapter-chartjs/src/Flow/ETL/Adapter/ChartJS/ChartJSLoader.php @@ -11,9 +11,6 @@ use Flow\ETL\Loader\Closure; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class ChartJSLoader implements Closure, Loader { public function __construct( @@ -24,22 +21,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'type' => $this->type, - 'output' => $this->output, - 'template' => $this->template, - ]; - } - - public function __unserialize(array $data) : void - { - $this->type = $data['type']; - $this->output = $data['output']; - $this->template = $data['template']; - } - public function closure(FlowContext $context) : void { if ($this->output === null && $this->outputVar === null) { diff --git a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php index f577b0767..24783dd5f 100644 --- a/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php +++ b/src/adapter/etl-adapter-csv/src/Flow/ETL/Adapter/CSV/CSVLoader.php @@ -14,16 +14,6 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class CSVLoader implements Closure, Loader, Loader\FileLoader { public function __construct( @@ -39,28 +29,6 @@ public function __construct( } } - public function __serialize() : array - { - return [ - 'path' => $this->path, - 'header' => $this->header, - 'separator' => $this->separator, - 'enclosure' => $this->enclosure, - 'escape' => $this->escape, - 'new_line_separator' => $this->newLineSeparator, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - $this->header = $data['header']; - $this->separator = $data['separator']; - $this->escape = $data['escape']; - $this->enclosure = $data['enclosure']; - $this->newLineSeparator = $data['new_line_separator']; - } - public function closure(FlowContext $context) : void { $context->streams()->close($this->path); diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php index cf73fdb00..af492288c 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalDataFrameFactory.php @@ -11,13 +11,6 @@ use Flow\ETL\Flow; use Flow\ETL\Rows; -/** - * @implements DataFrameFactory, - * query: string, - * parameters: array - * }> - */ final class DbalDataFrameFactory implements DataFrameFactory { private ?Connection $connection = null; @@ -49,22 +42,6 @@ public static function fromConnection(Connection $connection, string $query, Que return $factory; } - public function __serialize() : array - { - return [ - 'connection_params' => $this->connectionParams, - 'query' => $this->query, - 'parameters' => $this->parameters, - ]; - } - - public function __unserialize(array $data) : void - { - $this->connectionParams = $data['connection_params']; - $this->query = $data['query']; - $this->parameters = $data['parameters']; - } - public function from(Rows $rows) : DataFrame { $parameters = []; diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php index 608abc845..7d5586930 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/DbalLoader.php @@ -13,20 +13,6 @@ use Flow\ETL\Loader; use Flow\ETL\Rows; -/** - * @implements Loader, - * operation: string, - * operation_options: array{ - * skip_conflicts?: boolean, - * constraint?: string, - * conflict_columns?: array, - * update_columns?: array, - * primary_key_columns?: array - * } - * }> - */ final class DbalLoader implements Loader { private ?Connection $connection = null; @@ -84,24 +70,6 @@ public static function fromConnection( return $loader; } - public function __serialize() : array - { - return [ - 'table_name' => $this->tableName, - 'connection_params' => $this->connectionParams, - 'operation' => $this->operation, - 'operation_options' => $this->operationOptions, - ]; - } - - public function __unserialize(array $data) : void - { - $this->tableName = $data['table_name']; - $this->connectionParams = $data['connection_params']; - $this->operation = $data['operation']; - $this->operationOptions = $data['operation_options']; - } - public function load(Rows $rows, FlowContext $context) : void { Bulk::create()->{$this->operation}( diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/LiteralParameter.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/LiteralParameter.php index 4be50bd6e..3c3a851dd 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/LiteralParameter.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/LiteralParameter.php @@ -5,12 +5,8 @@ namespace Flow\ETL\Adapter\Doctrine; use Flow\ETL\Rows; -use Flow\Serializer\Serializable; -/** - * @implements Serializable - */ -final class LiteralParameter implements QueryParameter, Serializable +final class LiteralParameter implements QueryParameter { public function __construct( public readonly string $queryParamName, @@ -19,22 +15,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'query_param_name' => $this->queryParamName, - 'value' => $this->value, - 'type' => $this->type, - ]; - } - - public function __unserialize(array $data) : void - { - $this->queryParamName = $data['query_param_name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function queryParamName() : string { return $this->queryParamName; diff --git a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/Parameter.php b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/Parameter.php index 8983d3bde..b1eac6fc5 100644 --- a/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/Parameter.php +++ b/src/adapter/etl-adapter-doctrine/src/Flow/ETL/Adapter/Doctrine/Parameter.php @@ -7,12 +7,8 @@ use Doctrine\DBAL\ArrayParameterType; use Flow\ETL\Row\EntryReference; use Flow\ETL\Rows; -use Flow\Serializer\Serializable; -/** - * @implements Serializable - */ -final class Parameter implements QueryParameter, Serializable +final class Parameter implements QueryParameter { public function __construct( public readonly string $queryParamName, @@ -36,22 +32,6 @@ public static function strings(string $queryParamName, EntryReference $ref) : se return new self($queryParamName, $ref, ArrayParameterType::STRING); } - public function __serialize() : array - { - return [ - 'query_param_name' => $this->queryParamName, - 'ref' => $this->ref, - 'type' => $this->type, - ]; - } - - public function __unserialize(array $data) : void - { - $this->queryParamName = $data['query_param_name']; - $this->ref = $data['ref']; - $this->type = $data['type']; - } - public function queryParamName() : string { return $this->queryParamName; diff --git a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php index c8f8a6b53..31c6af624 100644 --- a/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php +++ b/src/adapter/etl-adapter-doctrine/tests/Flow/ETL/Adapter/Doctrine/Tests/Integration/DbalLoaderTest.php @@ -236,44 +236,6 @@ public function test_inserts_new_rows_or_updates_already_existed_based_on_primar ); } - public function test_that_operation_is_lower_cased() : void - { - $this->pgsqlDatabaseContext->createTable((new Table( - $table = 'flow_doctrine_bulk_test', - [ - new Column('id', Type::getType(Types::INTEGER), ['notnull' => true]), - new Column('name', Type::getType(Types::STRING), ['notnull' => true, 'length' => 255]), - new Column('description', Type::getType(Types::STRING), ['notnull' => true, 'length' => 255]), - ], - )) - ->setPrimaryKey(['id'])); - - $loader = to_dbal_table_insert($this->connectionParams(), $table); - - $this->assertSame($loader->__serialize()['operation'], 'insert'); - } - - public function test_that_operation_is_lower_cased_from_connection_method() : void - { - $this->pgsqlDatabaseContext->createTable((new Table( - $table = 'flow_doctrine_bulk_test', - [ - new Column('id', Type::getType(Types::INTEGER), ['notnull' => true]), - new Column('name', Type::getType(Types::STRING), ['notnull' => true, 'length' => 255]), - new Column('description', Type::getType(Types::STRING), ['notnull' => true, 'length' => 255]), - ], - )) - ->setPrimaryKey(['id'])); - - $loader = to_dbal_table_insert( - $this->pgsqlDatabaseContext->connection(), - $table, - $this->connectionParams() - ); - - $this->assertSame($loader->__serialize()['operation'], 'insert'); - } - public function test_update_multiple_rows_at_once() : void { $this->pgsqlDatabaseContext->createTable((new Table( diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php index 89f881e6a..edaa8d610 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/ElasticsearchLoader.php @@ -12,24 +12,6 @@ /** * @psalm-suppress UndefinedClass - * - * @implements Loader, - * connectionParams?: array, - * retries?: int, - * sniffOnStart?: boolean, - * sslCert?: array, - * sslKey?: array, - * sslVerification?: boolean|string, - * elasticMetaHeader?: boolean, - * includePortInHostHeader?: boolean - * }, - * index: string, - * id_factory: IdFactory, - * parameters: array, - * method: string - * }> */ final class ElasticsearchLoader implements Loader { @@ -74,27 +56,6 @@ public static function update(array $clientConfig, string $index, IdFactory $idF return $loader; } - public function __serialize() : array - { - return [ - 'config' => $this->config, - 'index' => $this->index, - 'id_factory' => $this->idFactory, - 'parameters' => $this->parameters, - 'method' => $this->method, - ]; - } - - public function __unserialize(array $data) : void - { - $this->config = $data['config']; - $this->index = $data['index']; - $this->idFactory = $data['id_factory']; - $this->parameters = $data['parameters']; - $this->method = $data['method']; - $this->client = null; - } - public function load(Rows $rows, FlowContext $context) : void { if (!$rows->count()) { diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php index 6571db822..1a11ca479 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/ElasticsearchPHP/HitsIntoRowsTransformer.php @@ -9,9 +9,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class HitsIntoRowsTransformer implements Transformer { public function __construct( @@ -19,18 +16,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'source' => $this->source, - ]; - } - - public function __unserialize(array $data) : void - { - $this->source = $data['source']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { $newRows = []; diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/EntryIdFactory.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/EntryIdFactory.php index b7bdc964e..414cef635 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/EntryIdFactory.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/EntryIdFactory.php @@ -8,9 +8,6 @@ use Flow\ETL\Row; use Flow\ETL\Row\Entry; -/** - * @implements IdFactory - */ final class EntryIdFactory implements IdFactory { public function __construct(private string $entryName) diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/HashIdFactory.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/HashIdFactory.php index b3f06cc7c..d76e8e22b 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/HashIdFactory.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/EntryIdFactory/HashIdFactory.php @@ -9,9 +9,6 @@ use Flow\ETL\Row; use Flow\ETL\Row\Entry; -/** - * @implements IdFactory}> - */ final class HashIdFactory implements IdFactory { /** @@ -26,20 +23,6 @@ public function __construct(string ...$entryNames) $this->entryNames = $entryNames; } - public function __serialize() : array - { - return [ - 'entry_names' => $this->entryNames, - 'hash_name' => $this->hashName, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryNames = $data['entry_names']; - $this->hashName = $data['hash_name']; - } - public function create(Row $row) : Entry { return new Row\Entry\StringEntry( diff --git a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/IdFactory.php b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/IdFactory.php index a532b1d63..19c11cea5 100644 --- a/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/IdFactory.php +++ b/src/adapter/etl-adapter-elasticsearch/src/Flow/ETL/Adapter/Elasticsearch/IdFactory.php @@ -6,14 +6,8 @@ use Flow\ETL\Row; use Flow\ETL\Row\Entry; -use Flow\Serializer\Serializable; -/** - * @template TValue - * - * @extends Serializable - */ -interface IdFactory extends Serializable +interface IdFactory { public function create(Row $row) : Entry; } diff --git a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php index 5f9fa4258..9c892d9e1 100644 --- a/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php +++ b/src/adapter/etl-adapter-filesystem/src/Flow/ETL/Adapter/Filesystem/FlysystemFS.php @@ -18,24 +18,12 @@ use League\Flysystem\Filesystem as Flysystem; use League\Flysystem\FilesystemException; -/** - * @implements Filesystem> - */ final class FlysystemFS implements Filesystem { public function __construct(private readonly FlysystemFactory $factory = new FlysystemFactory()) { } - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function directoryExists(Path $path) : bool { $fs = $this->factory->create($path); diff --git a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php index 401fffe5b..d0b9ea3e6 100644 --- a/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php +++ b/src/adapter/etl-adapter-json/src/Flow/ETL/Adapter/JSON/JsonLoader.php @@ -13,9 +13,6 @@ use Flow\ETL\Partition; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class JsonLoader implements Closure, Loader, Loader\FileLoader { /** @@ -30,18 +27,6 @@ public function __construct(private readonly Path $path) } } - public function __serialize() : array - { - return [ - 'path' => $this->path, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - } - public function closure(FlowContext $context) : void { foreach ($context->streams() as $stream) { diff --git a/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php b/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php index 5d609dc26..f1f1d97c7 100644 --- a/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php +++ b/src/adapter/etl-adapter-logger/src/Flow/ETL/Adapter/Logger/PsrLoggerLoader.php @@ -11,31 +11,12 @@ use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; -/** - * @implements Loader - */ final class PsrLoggerLoader implements Loader { public function __construct(private LoggerInterface $logger, private string $message, private string $logLevel = LogLevel::DEBUG) { } - public function __serialize() : array - { - return [ - 'logger' => $this->logger, - 'log_level' => $this->logLevel, - 'message' => $this->message, - ]; - } - - public function __unserialize(array $data) : void - { - $this->logger = $data['logger']; - $this->logLevel = $data['log_level']; - $this->message = $data['message']; - } - public function load(Rows $rows, FlowContext $context) : void { /** diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php index 25562c9b3..381c5a780 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/HitsIntoRowsTransformer.php @@ -9,24 +9,12 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class HitsIntoRowsTransformer implements Transformer { public function __construct( ) { } - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function transform(Rows $rows, FlowContext $context) : Rows { $newRows = []; diff --git a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php index 49f2b2163..50e962334 100644 --- a/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php +++ b/src/adapter/etl-adapter-meilisearch/src/Flow/ETL/Adapter/Meilisearch/MeilisearchPHP/MeilisearchLoader.php @@ -11,23 +11,10 @@ use Meilisearch\Client; use Psr\Http\Client\ClientInterface; -/** - * @implements Loader - */ final class MeilisearchLoader implements Loader { private Client|null $client = null; - private string $method; - /** * @param array{url: string, apiKey: string, httpClient: ?ClientInterface} $config */ @@ -35,7 +22,6 @@ public function __construct( private array $config, private string $index, ) { - $this->method = 'index'; } /** @@ -43,27 +29,7 @@ public function __construct( */ public static function update(array $config, string $index) : self { - $loader = new self($config, $index); - $loader->method = 'update'; - - return $loader; - } - - public function __serialize() : array - { - return [ - 'config' => $this->config, - 'index' => $this->index, - 'method' => $this->method, - ]; - } - - public function __unserialize(array $data) : void - { - $this->config = $data['config']; - $this->index = $data['index']; - $this->method = $data['method']; - $this->client = null; + return new self($config, $index); } public function load(Rows $rows, FlowContext $context) : void diff --git a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php index 3d6f7511d..7e1efb60c 100644 --- a/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php +++ b/src/adapter/etl-adapter-parquet/src/Flow/ETL/Adapter/Parquet/ParquetLoader.php @@ -12,11 +12,6 @@ use Flow\Parquet\ParquetFile\Compressions; use Flow\Parquet\Writer; -/** - * @implements Loader - */ final class ParquetLoader implements Closure, Loader, Loader\FileLoader { private readonly SchemaConverter $converter; @@ -41,18 +36,6 @@ public function __construct( } } - public function __serialize() : array - { - return [ - 'path' => $this->path, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - } - public function closure(FlowContext $context) : void { if (\count($this->writers)) { diff --git a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php index 9ff3cabb9..544dcf492 100644 --- a/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php +++ b/src/adapter/etl-adapter-text/src/Flow/ETL/Adapter/Text/TextLoader.php @@ -11,12 +11,6 @@ use Flow\ETL\Loader\Closure; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class TextLoader implements Closure, Loader, Loader\FileLoader { public function __construct( @@ -28,20 +22,6 @@ public function __construct( } } - public function __serialize() : array - { - return [ - 'path' => $this->path, - 'new_line_separator' => $this->newLineSeparator, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - $this->newLineSeparator = $data['new_line_separator']; - } - public function closure(FlowContext $context) : void { $context->streams()->close($this->path); diff --git a/src/core/etl/composer.json b/src/core/etl/composer.json index 9907ccc63..3fc133702 100644 --- a/src/core/etl/composer.json +++ b/src/core/etl/composer.json @@ -18,7 +18,6 @@ }, "require-dev": { "jawira/case-converter": "^3.4", - "laravel/serializable-closure": "^1.1", "moneyphp/money": "^4", "ramsey/uuid": "^4.5", "symfony/uid": "^6.3 || ^7.0" diff --git a/src/core/etl/docs/new_type.md b/src/core/etl/docs/new_type.md index 8c007e9aa..d60a2f161 100644 --- a/src/core/etl/docs/new_type.md +++ b/src/core/etl/docs/new_type.md @@ -6,5 +6,4 @@ interface, below you can find list of things that must be checked. * Schema * [Definition](../src/Flow/ETL/Row/Schema/Definition.php) * [Constraint](../src/Flow/ETL/Row/Schema/Constraint.php) -* [EntryFactory](../src/Flow/ETL/Row/EntryFactory.php) -* [EntryConverter](../src/Flow/ETL/Row/EntryConverter.php) \ No newline at end of file +* [EntryFactory](../src/Flow/ETL/Row/EntryFactory.php) \ No newline at end of file diff --git a/src/core/etl/src/Flow/ETL/Cache.php b/src/core/etl/src/Flow/ETL/Cache.php index 48bbf11a2..4dc66d393 100644 --- a/src/core/etl/src/Flow/ETL/Cache.php +++ b/src/core/etl/src/Flow/ETL/Cache.php @@ -2,14 +2,7 @@ namespace Flow\ETL; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface Cache extends Serializable +interface Cache { public function add(string $id, Rows $rows) : void; diff --git a/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php b/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php index 236f27785..a82399e65 100644 --- a/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/InMemoryCache.php @@ -7,9 +7,6 @@ use Flow\ETL\Cache; use Flow\ETL\Rows; -/** - * @implements Cache> - */ final class InMemoryCache implements Cache { /** @@ -17,15 +14,6 @@ final class InMemoryCache implements Cache */ private array $cache = []; - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function add(string $id, Rows $rows) : void { if (!\array_key_exists($id, $this->cache)) { diff --git a/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php b/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php index f18dbae9c..14ff83c73 100644 --- a/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/LocalFilesystemCache.php @@ -12,8 +12,6 @@ use Flow\Serializer\Serializer; /** - * @implements Cache - * * @infection-ignore-all */ final class LocalFilesystemCache implements Cache @@ -27,20 +25,6 @@ public function __construct( } } - public function __serialize() : array - { - return [ - 'path' => $this->path, - 'serializer' => $this->serializer, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - $this->serializer = $data['serializer']; - } - public function add(string $id, Rows $rows) : void { $cacheStream = \fopen($this->cachePath($id), 'ab'); diff --git a/src/core/etl/src/Flow/ETL/Cache/NullCache.php b/src/core/etl/src/Flow/ETL/Cache/NullCache.php index 3a35fb60f..054113a6a 100644 --- a/src/core/etl/src/Flow/ETL/Cache/NullCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/NullCache.php @@ -7,20 +7,8 @@ use Flow\ETL\Cache; use Flow\ETL\Rows; -/** - * @implements Cache> - */ final class NullCache implements Cache { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function add(string $id, Rows $rows) : void { } diff --git a/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php b/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php index 65ab8fcd8..961d709f3 100644 --- a/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php +++ b/src/core/etl/src/Flow/ETL/Cache/PSRSimpleCache.php @@ -10,9 +10,6 @@ use Flow\Serializer\Serializer; use Psr\SimpleCache\CacheInterface; -/** - * @implements Cache - */ final class PSRSimpleCache implements Cache { public function __construct( @@ -22,20 +19,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'cache' => $this->cache, - 'serializer' => $this->serializer, - ]; - } - - public function __unserialize(array $data) : void - { - $this->cache = $data['cache']; - $this->serializer = $data['serializer']; - } - public function add(string $id, Rows $rows) : void { $rowsId = \uniqid($id, true); diff --git a/src/core/etl/src/Flow/ETL/DataFrameFactory.php b/src/core/etl/src/Flow/ETL/DataFrameFactory.php index 5318dca08..34290e37f 100644 --- a/src/core/etl/src/Flow/ETL/DataFrameFactory.php +++ b/src/core/etl/src/Flow/ETL/DataFrameFactory.php @@ -2,14 +2,7 @@ namespace Flow\ETL; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface DataFrameFactory extends Serializable +interface DataFrameFactory { public function from(Rows $rows) : DataFrame; } diff --git a/src/core/etl/src/Flow/ETL/Filesystem.php b/src/core/etl/src/Flow/ETL/Filesystem.php index f18e4646a..e342032af 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem.php +++ b/src/core/etl/src/Flow/ETL/Filesystem.php @@ -9,14 +9,8 @@ use Flow\ETL\Filesystem\Stream\Mode; use Flow\ETL\Partition\NoopFilter; use Flow\ETL\Partition\PartitionFilter; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface Filesystem extends Serializable + +interface Filesystem { public function directoryExists(Path $path) : bool; diff --git a/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php b/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php index 2728682b0..6bc0d0ea4 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php +++ b/src/core/etl/src/Flow/ETL/Filesystem/LocalFilesystem.php @@ -11,20 +11,8 @@ use Flow\ETL\Partition\PartitionFilter; use Webmozart\Glob\Glob; -/** - * @implements Filesystem> - */ final class LocalFilesystem implements Filesystem { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function directoryExists(Path $path) : bool { if (!$path->isLocal()) { diff --git a/src/core/etl/src/Flow/ETL/Filesystem/Path.php b/src/core/etl/src/Flow/ETL/Filesystem/Path.php index ece477782..9a0bc5be2 100644 --- a/src/core/etl/src/Flow/ETL/Filesystem/Path.php +++ b/src/core/etl/src/Flow/ETL/Filesystem/Path.php @@ -9,12 +9,8 @@ use Flow\ETL\Filesystem\Stream\ResourceContext; use Flow\ETL\Partition; use Flow\ETL\Partitions; -use Flow\Serializer\Serializable; -/** - * @implements Serializable, extension: string|false}> - */ -final class Path implements Serializable +final class Path { private string $basename; @@ -148,24 +144,6 @@ public static function tmpFile(string $extension) : self return new self(\sys_get_temp_dir() . DIRECTORY_SEPARATOR . \str_replace('.', '', \uniqid('', true)) . '.' . $extension); } - public function __serialize() : array - { - return [ - 'scheme' => $this->scheme, - 'path' => $this->path, - 'options' => $this->options, - 'extension' => $this->extension, - ]; - } - - public function __unserialize(array $data) : void - { - $this->path = $data['path']; - $this->scheme = $data['scheme']; - $this->options = $data['options']; - $this->extension = $data['extension']; - } - public function addPartitions(Partition $partition, Partition ...$partitions) : self { \array_unshift($partitions, $partition); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison.php b/src/core/etl/src/Flow/ETL/Join/Comparison.php index e4fbf1c77..0bd359ae2 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison.php @@ -6,14 +6,8 @@ use Flow\ETL\Row; use Flow\ETL\Row\Reference; -use Flow\Serializer\Serializable; -/** - * @template T - * - * @extends Serializable - */ -interface Comparison extends Serializable +interface Comparison { public function compare(Row $left, Row $right) : bool; diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/All.php b/src/core/etl/src/Flow/ETL/Join/Comparison/All.php index 01b44022b..4fa1768a0 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/All.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/All.php @@ -8,9 +8,6 @@ use Flow\ETL\Row; use Flow\ETL\Row\Reference; -/** - * @implements Comparison}> - */ final class All implements Comparison { /** @@ -23,18 +20,6 @@ public function __construct(Comparison $comparison, Comparison ...$comparisons) $this->comparisons = \array_merge([$comparison], $comparisons); } - public function __serialize() : array - { - return [ - 'comparisons' => $this->comparisons, - ]; - } - - public function __unserialize(array $data) : void - { - $this->comparisons = $data['comparisons']; - } - public function compare(Row $left, Row $right) : bool { foreach ($this->comparisons as $comparison) { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/Any.php b/src/core/etl/src/Flow/ETL/Join/Comparison/Any.php index c35613c9f..639659ebd 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/Any.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/Any.php @@ -8,9 +8,6 @@ use Flow\ETL\Row; use Flow\ETL\Row\Reference; -/** - * @implements Comparison}> - */ final class Any implements Comparison { /** @@ -23,18 +20,6 @@ public function __construct(Comparison $comparison, Comparison ...$comparisons) $this->comparisons = \array_merge([$comparison], $comparisons); } - public function __serialize() : array - { - return [ - 'comparisons' => $this->comparisons, - ]; - } - - public function __unserialize(array $data) : void - { - $this->comparisons = $data['comparisons']; - } - public function compare(Row $left, Row $right) : bool { foreach ($this->comparisons as $comparison) { diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php b/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php index 17950d97a..d52c91d69 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/Equal.php @@ -9,9 +9,6 @@ use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class Equal implements Comparison { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_left' => $this->entryLeft, - 'entry_right' => $this->entryRight, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryLeft = $data['entry_left']; - $this->entryRight = $data['entry_right']; - } - public function compare(Row $left, Row $right) : bool { return $left->valueOf($this->entryLeft) == $right->valueOf($this->entryRight); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php index 1a5c2932e..313ffedf4 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThan.php @@ -9,9 +9,6 @@ use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class GreaterThan implements Comparison { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_left' => $this->entryLeft, - 'entry_right' => $this->entryRight, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryLeft = $data['entry_left']; - $this->entryRight = $data['entry_right']; - } - public function compare(Row $left, Row $right) : bool { return $left->valueOf($this->entryLeft) > $right->valueOf($this->entryRight); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php index db0187b00..ba2f39df7 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/GreaterThanEqual.php @@ -9,9 +9,6 @@ use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class GreaterThanEqual implements Comparison { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_left' => $this->entryLeft, - 'entry_right' => $this->entryRight, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryLeft = $data['entry_left']; - $this->entryRight = $data['entry_right']; - } - public function compare(Row $left, Row $right) : bool { return $left->valueOf($this->entryLeft) >= $right->valueOf($this->entryRight); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php b/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php index d01fcb4cc..99aeda531 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/Identical.php @@ -9,9 +9,6 @@ use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class Identical implements Comparison { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_left' => $this->entryLeft, - 'entry_right' => $this->entryRight, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryLeft = $data['entry_left']; - $this->entryRight = $data['entry_right']; - } - public function compare(Row $left, Row $right) : bool { return $left->valueOf($this->entryLeft) === $right->valueOf($this->entryRight); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php index d4a815dbb..6bb6a9c32 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThan.php @@ -9,9 +9,6 @@ use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class LessThan implements Comparison { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_left' => $this->entryLeft, - 'entry_right' => $this->entryRight, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryLeft = $data['entry_left']; - $this->entryRight = $data['entry_right']; - } - public function compare(Row $left, Row $right) : bool { return $left->valueOf($this->entryLeft) < $right->valueOf($this->entryRight); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php index 496f0e485..e595ccc43 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/LessThanEqual.php @@ -9,9 +9,6 @@ use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class LessThanEqual implements Comparison { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_left' => $this->entryLeft, - 'entry_right' => $this->entryRight, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryLeft = $data['entry_left']; - $this->entryRight = $data['entry_right']; - } - public function compare(Row $left, Row $right) : bool { return $left->valueOf($this->entryLeft) <= $right->valueOf($this->entryRight); diff --git a/src/core/etl/src/Flow/ETL/Join/Comparison/Not.php b/src/core/etl/src/Flow/ETL/Join/Comparison/Not.php index c2d34fc51..e9303ef0a 100644 --- a/src/core/etl/src/Flow/ETL/Join/Comparison/Not.php +++ b/src/core/etl/src/Flow/ETL/Join/Comparison/Not.php @@ -8,27 +8,12 @@ use Flow\ETL\Row; use Flow\ETL\Row\Reference; -/** - * @implements Comparison - */ final class Not implements Comparison { public function __construct(private readonly Comparison $comparison) { } - public function __serialize() : array - { - return [ - 'comparison' => $this->comparison, - ]; - } - - public function __unserialize(array $data) : void - { - $this->comparison = $data['comparison']; - } - public function compare(Row $left, Row $right) : bool { return !$this->comparison->compare($left, $right); diff --git a/src/core/etl/src/Flow/ETL/Join/Expression.php b/src/core/etl/src/Flow/ETL/Join/Expression.php index 8d59f3f8f..b6dd4d679 100644 --- a/src/core/etl/src/Flow/ETL/Join/Expression.php +++ b/src/core/etl/src/Flow/ETL/Join/Expression.php @@ -9,12 +9,8 @@ use Flow\ETL\Join\Comparison\Identical; use Flow\ETL\Row; use Flow\ETL\Row\Reference; -use Flow\Serializer\Serializable; -/** - * @implements Serializable - */ -final class Expression implements Serializable +final class Expression { public function __construct( private readonly Comparison $comparison, @@ -51,20 +47,6 @@ public static function on(array|Comparison $comparison, string $joinPrefix = '') return new self($comparison, $joinPrefix); } - public function __serialize() : array - { - return [ - 'comparison' => $this->comparison, - 'prefix' => $this->joinPrefix, - ]; - } - - public function __unserialize(array $data) : void - { - $this->comparison = $data['comparison']; - $this->joinPrefix = $data['prefix']; - } - /** * @return array */ diff --git a/src/core/etl/src/Flow/ETL/Loader.php b/src/core/etl/src/Flow/ETL/Loader.php index 3f7150efb..16886a930 100644 --- a/src/core/etl/src/Flow/ETL/Loader.php +++ b/src/core/etl/src/Flow/ETL/Loader.php @@ -4,14 +4,7 @@ namespace Flow\ETL; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface Loader extends Serializable +interface Loader { public function load(Rows $rows, FlowContext $context) : void; } diff --git a/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php b/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php index 5261e1eea..91740503d 100644 --- a/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/CallbackLoader.php @@ -4,16 +4,10 @@ namespace Flow\ETL\Loader; -use Flow\ETL\Exception\RuntimeException; use Flow\ETL\FlowContext; use Flow\ETL\Loader; use Flow\ETL\Rows; -use Flow\ETL\Serializer\Closure; -use Laravel\SerializableClosure\SerializableClosure; -/** - * @implements Loader - */ final class CallbackLoader implements Loader { /** @@ -28,26 +22,6 @@ public function __construct(callable $callback) $this->callback = $callback; } - public function __serialize() : array - { - if (!Closure::isSerializable()) { - throw new RuntimeException('CallbackLoader is not serializable without "opis/closure" library in your dependencies.'); - } - - return [ - 'callback' => new SerializableClosure(\Closure::fromCallable($this->callback)), - ]; - } - - public function __unserialize(array $data) : void - { - if (!Closure::isSerializable()) { - throw new RuntimeException('CallbackLoader is not serializable without "opis/closure" library in your dependencies.'); - } - - $this->callback = $data['callback']->getClosure(); - } - public function load(Rows $rows, FlowContext $context) : void { ($this->callback)($rows, $context); diff --git a/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php b/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php index ed726296a..ba2264ead 100644 --- a/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/MemoryLoader.php @@ -9,27 +9,12 @@ use Flow\ETL\Memory\Memory; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class MemoryLoader implements Loader { public function __construct(private readonly Memory $memory) { } - public function __serialize() : array - { - return [ - 'memory' => $this->memory, - ]; - } - - public function __unserialize(array $data) : void - { - $this->memory = $data['memory']; - } - public function load(Rows $rows, FlowContext $context) : void { $this->memory->save($rows->toArray()); diff --git a/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php b/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php index 7f1142432..ac3860ee3 100644 --- a/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/SchemaValidationLoader.php @@ -11,9 +11,6 @@ use Flow\ETL\Rows; use Flow\ETL\SchemaValidator; -/** - * @implements Loader - */ final class SchemaValidationLoader implements Loader { public function __construct( @@ -22,20 +19,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'schema' => $this->schema, - 'validator' => $this->validator, - ]; - } - - public function __unserialize(array $data) : void - { - $this->schema = $data['schema']; - $this->validator = $data['validator']; - } - public function load(Rows $rows, FlowContext $context) : void { if (!$this->validator->isValid($rows, $this->schema)) { diff --git a/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php b/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php index 2bf58e574..51ac02d9c 100644 --- a/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/StreamLoader.php @@ -14,9 +14,6 @@ use Flow\ETL\Row\Schema\SchemaFormatter; use Flow\ETL\Rows; -/** - * @implements Loader - */ final class StreamLoader implements Loader { /** @@ -50,28 +47,6 @@ public static function stdout(int|bool $truncate = 20, Output $output = Output:: return new self('php://stdout', Mode::WRITE, $truncate, $output, $formatter, $schemaFormatter); } - public function __serialize() : array - { - return [ - 'url' => $this->url, - 'mode' => $this->mode, - 'truncate' => $this->truncate, - 'output' => $this->output, - 'formatter' => $this->formatter, - 'schema_formatter' => $this->schemaFormatter, - ]; - } - - public function __unserialize(array $data) : void - { - $this->url = $data['url']; - $this->mode = $data['mode']; - $this->truncate = $data['truncate']; - $this->output = $data['output']; - $this->formatter = $data['formatter']; - $this->schemaFormatter = $data['schema_formatter']; - } - public function load(Rows $rows, FlowContext $context) : void { try { diff --git a/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php b/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php index c757578a3..0426345e5 100644 --- a/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php +++ b/src/core/etl/src/Flow/ETL/Loader/TransformerLoader.php @@ -9,9 +9,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Loader - */ final class TransformerLoader implements Loader, OverridingLoader { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'transformer' => $this->transformer, - 'loader' => $this->loader, - ]; - } - - public function __unserialize(array $data) : void - { - $this->transformer = $data['transformer']; - $this->loader = $data['loader']; - } - public function load(Rows $rows, FlowContext $context) : void { $this->loader->load($this->transformer->transform($rows, $context), $context); diff --git a/src/core/etl/src/Flow/ETL/Memory/ArrayMemory.php b/src/core/etl/src/Flow/ETL/Memory/ArrayMemory.php index 3cab5a9b4..cf136f3d0 100644 --- a/src/core/etl/src/Flow/ETL/Memory/ArrayMemory.php +++ b/src/core/etl/src/Flow/ETL/Memory/ArrayMemory.php @@ -6,9 +6,6 @@ use Flow\ETL\Exception\InvalidArgumentException; -/** - * @implements Memory>}> - */ final class ArrayMemory implements \Countable, Memory { /** @@ -28,18 +25,6 @@ public function __construct(array $memory = []) $this->data = $memory; } - public function __serialize() : array - { - return [ - 'data' => $this->data, - ]; - } - - public function __unserialize(array $data) : void - { - $this->data = $data['data']; - } - /** * @return array */ diff --git a/src/core/etl/src/Flow/ETL/Memory/Memory.php b/src/core/etl/src/Flow/ETL/Memory/Memory.php index c94fe93cc..05e44f562 100644 --- a/src/core/etl/src/Flow/ETL/Memory/Memory.php +++ b/src/core/etl/src/Flow/ETL/Memory/Memory.php @@ -4,14 +4,7 @@ namespace Flow\ETL\Memory; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface Memory extends Serializable +interface Memory { /** * @return array diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/ListType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/ListType.php index 12d203434..73c4bf6e5 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/ListType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/ListType.php @@ -5,25 +5,12 @@ use Flow\ETL\PHP\Type\Logical\List\ListElement; use Flow\ETL\PHP\Type\Type; -/** - * @implements LogicalType - */ final class ListType implements LogicalType { public function __construct(private readonly List\ListElement $element) { } - public function __serialize() : array - { - return ['element' => $this->element]; - } - - public function __unserialize(array $data) : void - { - $this->element = $data['element']; - } - public function element() : ListElement { return $this->element; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/LogicalType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/LogicalType.php index 64ff6e9af..523ce6e1d 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/LogicalType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/LogicalType.php @@ -6,11 +6,6 @@ use Flow\ETL\PHP\Type\Type; -/** - * @template T - * - * @extends Type - */ interface LogicalType extends Type { } diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php index 4d1ebacb0..30a25dce1 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/MapType.php @@ -6,26 +6,12 @@ use Flow\ETL\PHP\Type\Logical\Map\MapValue; use Flow\ETL\PHP\Type\Type; -/** - * @implements LogicalType - */ final class MapType implements LogicalType { public function __construct(private readonly Map\MapKey $key, private readonly Map\MapValue $value) { } - public function __serialize() : array - { - return ['key' => $this->key, 'value' => $this->value]; - } - - public function __unserialize(array $data) : void - { - $this->key = $data['key']; - $this->value = $data['value']; - } - public function isEqual(Type $type) : bool { if (!$type instanceof self) { diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/StructureType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/StructureType.php index 50a0a6d14..397522416 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Logical/StructureType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Logical/StructureType.php @@ -6,9 +6,6 @@ use Flow\ETL\PHP\Type\Logical\Structure\StructureElement; use Flow\ETL\PHP\Type\Type; -/** - * @implements LogicalType}> - */ final class StructureType implements LogicalType { /** @@ -29,16 +26,6 @@ public function __construct(StructureElement ...$elements) $this->elements = $elements; } - public function __serialize() : array - { - return ['elements' => $this->elements]; - } - - public function __unserialize(array $data) : void - { - $this->elements = $data['elements']; - } - public function elements() : array { return $this->elements; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ArrayType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ArrayType.php index 9a8a6d867..39d5cc98c 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ArrayType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ArrayType.php @@ -5,9 +5,6 @@ use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType - */ final class ArrayType implements NativeType { public function __construct(private readonly bool $empty = false, private readonly bool $nullable = false) @@ -19,20 +16,6 @@ public static function empty() : self return new self(true); } - public function __serialize() : array - { - return [ - 'empty' => $this->empty, - 'nullable' => $this->nullable, - ]; - } - - public function __unserialize(array $data) : void - { - $this->empty = $data['empty']; - $this->nullable = $data['nullable']; - } - public function isEqual(Type $type) : bool { return $type instanceof self && $this->empty === $type->empty; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/CallableType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/CallableType.php index 1984ef1cc..829112ae7 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/CallableType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/CallableType.php @@ -5,9 +5,6 @@ use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType - */ final class CallableType implements NativeType { public function __construct(private readonly bool $nullable) @@ -15,16 +12,6 @@ public function __construct(private readonly bool $nullable) } - public function __serialize() : array - { - return ['nullable' => $this->nullable]; - } - - public function __unserialize(array $data) : void - { - $this->nullable = $data['nullable']; - } - public function isEqual(Type $type) : bool { return $type instanceof self && $this->nullable === $type->nullable; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/EnumType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/EnumType.php index 8f7a8bb01..dc43952f3 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/EnumType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/EnumType.php @@ -7,9 +7,6 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType, nullable: bool}> - */ final class EnumType implements NativeType { /** @@ -30,17 +27,6 @@ public static function of(string $class, bool $nullable = false) : self return new self($class, $nullable); } - public function __serialize() : array - { - return ['class' => $this->class, 'nullable' => $this->nullable]; - } - - public function __unserialize(array $data) : void - { - $this->class = $data['class']; - $this->nullable = $data['nullable']; - } - public function isEqual(Type $type) : bool { return $type instanceof self && $this->class === $type->class && $this->nullable === $type->nullable; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/NativeType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/NativeType.php index 90a210b2a..412b9448f 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/NativeType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/NativeType.php @@ -6,11 +6,6 @@ use Flow\ETL\PHP\Type\Type; -/** - * @template T - * - * @extends Type - */ interface NativeType extends Type { } diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/NullType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/NullType.php index a20a9584e..5ef9354eb 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/NullType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/NullType.php @@ -5,21 +5,8 @@ use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType - */ final class NullType implements NativeType { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - - } - public function isEqual(Type $type) : bool { return $type instanceof self; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ObjectType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ObjectType.php index a1d66c178..a1ce0c8b8 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ObjectType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ObjectType.php @@ -7,9 +7,6 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType - */ final class ObjectType implements NativeType { /** @@ -22,17 +19,6 @@ public function __construct(public readonly string $class, private readonly bool } } - public function __serialize() : array - { - return ['class' => $this->class, 'nullable' => $this->nullable]; - } - - public function __unserialize(array $data) : void - { - $this->class = $data['class']; - $this->nullable = $data['nullable']; - } - public function isEqual(Type $type) : bool { return $type instanceof self && $this->class === $type->class && $this->nullable === $type->nullable; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ResourceType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ResourceType.php index 700e6ba4a..a773ccb80 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ResourceType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ResourceType.php @@ -5,9 +5,6 @@ use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType - */ final class ResourceType implements NativeType { public function __construct(private readonly bool $nullable) @@ -15,16 +12,6 @@ public function __construct(private readonly bool $nullable) } - public function __serialize() : array - { - return ['nullable' => $this->nullable]; - } - - public function __unserialize(array $data) : void - { - $this->nullable = $data['nullable']; - } - public function isEqual(Type $type) : bool { return $type instanceof self && $this->nullable === $type->nullable; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ScalarType.php b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ScalarType.php index 7ed8b4dab..30ed5bcb2 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Native/ScalarType.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Native/ScalarType.php @@ -6,9 +6,6 @@ use Flow\ETL\PHP\Type\Type; -/** - * @implements NativeType - */ final class ScalarType implements NativeType { public const BOOLEAN = 'boolean'; @@ -46,17 +43,6 @@ public static function string(bool $nullable = false) : self return new self(self::STRING, $nullable); } - public function __serialize() : array - { - return ['value' => $this->value, 'nullable' => $this->nullable]; - } - - public function __unserialize(array $data) : void - { - $this->value = $data['value']; - $this->nullable = $data['nullable']; - } - public function isBoolean() : bool { return $this->value === self::BOOLEAN; diff --git a/src/core/etl/src/Flow/ETL/PHP/Type/Type.php b/src/core/etl/src/Flow/ETL/PHP/Type/Type.php index 5ab01a4cb..0c942f996 100644 --- a/src/core/etl/src/Flow/ETL/PHP/Type/Type.php +++ b/src/core/etl/src/Flow/ETL/PHP/Type/Type.php @@ -4,14 +4,7 @@ namespace Flow\ETL\PHP\Type; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface Type extends Serializable +interface Type { public function isEqual(self $type) : bool; diff --git a/src/core/etl/src/Flow/ETL/Partition.php b/src/core/etl/src/Flow/ETL/Partition.php index 3dd217e81..de45013f8 100644 --- a/src/core/etl/src/Flow/ETL/Partition.php +++ b/src/core/etl/src/Flow/ETL/Partition.php @@ -17,12 +17,8 @@ use Flow\ETL\Row\Entry\XMLNodeEntry; use Flow\ETL\Row\EntryReference; use Flow\ETL\Row\Reference; -use Flow\Serializer\Serializable; -/** - * @implements Serializable - */ -final class Partition implements Serializable +final class Partition { /** * @var array @@ -92,20 +88,6 @@ public static function valueFromRow(Reference $ref, Row $row) : mixed }; } - public function __serialize() : array - { - return [ - 'name' => $this->name, - 'value' => $this->value, - ]; - } - - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - } - public function id() : string { return $this->name . '|' . $this->value; diff --git a/src/core/etl/src/Flow/ETL/Partition/CallableFilter.php b/src/core/etl/src/Flow/ETL/Partition/CallableFilter.php index 1345dc2c7..cb45514d1 100644 --- a/src/core/etl/src/Flow/ETL/Partition/CallableFilter.php +++ b/src/core/etl/src/Flow/ETL/Partition/CallableFilter.php @@ -4,15 +4,10 @@ namespace Flow\ETL\Partition; -use Flow\ETL\Exception\RuntimeException; use Flow\ETL\Partition; -use Flow\ETL\Serializer\Closure; -use Laravel\SerializableClosure\SerializableClosure; /** * @deprecated please use ScalarFunctionFilter instead - * - * @implements PartitionFilter */ final class CallableFilter implements PartitionFilter { @@ -29,26 +24,6 @@ public function __construct(callable $filter) $this->filter = $filter; } - public function __serialize() : array - { - if (!Closure::isSerializable()) { - throw new RuntimeException('CallbackEntryTransformer is not serializable without "opis/closure" library in your dependencies.'); - } - - return [ - 'filter' => new SerializableClosure(\Closure::fromCallable($this->filter)), - ]; - } - - public function __unserialize(array $data) : void - { - if (!Closure::isSerializable()) { - throw new RuntimeException('CallbackEntryTransformer is not serializable without "opis/closure" library in your dependencies.'); - } - - $this->filter = $data['filter']->getClosure(); - } - public function keep(Partition ...$partitions) : bool { return ($this->filter)(...$partitions); diff --git a/src/core/etl/src/Flow/ETL/Partition/FiltersCollection.php b/src/core/etl/src/Flow/ETL/Partition/FiltersCollection.php index aee78b76c..d6f0b12c0 100644 --- a/src/core/etl/src/Flow/ETL/Partition/FiltersCollection.php +++ b/src/core/etl/src/Flow/ETL/Partition/FiltersCollection.php @@ -4,9 +4,6 @@ use Flow\ETL\Partition; -/** - * @implements PartitionFilter}> - */ final class FiltersCollection implements PartitionFilter { /** @@ -17,16 +14,6 @@ public function __construct(public readonly array $filters) } - public function __serialize() : array - { - return ['filters' => $this->filters]; - } - - public function __unserialize(array $data) : void - { - $this->filters = $data['filters']; - } - public function keep(Partition ...$partitions) : bool { foreach ($this->filters as $filter) { diff --git a/src/core/etl/src/Flow/ETL/Partition/NoopFilter.php b/src/core/etl/src/Flow/ETL/Partition/NoopFilter.php index a332b5415..0e1e583ca 100644 --- a/src/core/etl/src/Flow/ETL/Partition/NoopFilter.php +++ b/src/core/etl/src/Flow/ETL/Partition/NoopFilter.php @@ -6,20 +6,8 @@ use Flow\ETL\Partition; -/** - * @implements PartitionFilter - */ final class NoopFilter implements PartitionFilter { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function keep(Partition ...$partitions) : bool { return true; diff --git a/src/core/etl/src/Flow/ETL/Partition/PartitionFilter.php b/src/core/etl/src/Flow/ETL/Partition/PartitionFilter.php index 3ed26be8a..cffcde3cc 100644 --- a/src/core/etl/src/Flow/ETL/Partition/PartitionFilter.php +++ b/src/core/etl/src/Flow/ETL/Partition/PartitionFilter.php @@ -5,14 +5,8 @@ namespace Flow\ETL\Partition; use Flow\ETL\Partition; -use Flow\Serializer\Serializable; -/** - * @template T - * - * @extends Serializable - */ -interface PartitionFilter extends Serializable +interface PartitionFilter { public function keep(Partition ...$partitions) : bool; } diff --git a/src/core/etl/src/Flow/ETL/Partition/ScalarFunctionFilter.php b/src/core/etl/src/Flow/ETL/Partition/ScalarFunctionFilter.php index 95ebeb171..b00f9f9ea 100644 --- a/src/core/etl/src/Flow/ETL/Partition/ScalarFunctionFilter.php +++ b/src/core/etl/src/Flow/ETL/Partition/ScalarFunctionFilter.php @@ -7,9 +7,6 @@ use Flow\ETL\Partition; use Flow\ETL\Row\EntryFactory; -/** - * @implements PartitionFilter - */ final class ScalarFunctionFilter implements PartitionFilter { public function __construct( @@ -18,20 +15,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'function' => $this->function, - 'entry_factory' => $this->entryFactory, - ]; - } - - public function __unserialize(array $data) : void - { - $this->function = $data['function']; - $this->entryFactory = $data['entry_factory']; - } - public function keep(Partition ...$partitions) : bool { try { diff --git a/src/core/etl/src/Flow/ETL/Partitions.php b/src/core/etl/src/Flow/ETL/Partitions.php index 00b0f7186..330e7d9b2 100644 --- a/src/core/etl/src/Flow/ETL/Partitions.php +++ b/src/core/etl/src/Flow/ETL/Partitions.php @@ -3,14 +3,12 @@ namespace Flow\ETL; use Flow\ETL\Exception\RuntimeException; -use Flow\Serializer\Serializable; /** * @implements \ArrayAccess * @implements \IteratorAggregate - * @implements Serializable}> */ -final class Partitions implements \ArrayAccess, \Countable, \IteratorAggregate, Serializable +final class Partitions implements \ArrayAccess, \Countable, \IteratorAggregate { private readonly array $partitions; @@ -21,18 +19,6 @@ public function __construct(Partition ...$partitions) $this->partitions = $partitions; } - public function __serialize() : array - { - return [ - 'partitions' => $this->partitions, - ]; - } - - public function __unserialize(array $data) : void - { - $this->partitions = $data['partitions']; - } - public function count() : int { return \count($this->partitions); diff --git a/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php b/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php index 020d0ca39..629fc1ec0 100644 --- a/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php +++ b/src/core/etl/src/Flow/ETL/Pipeline/Pipes.php @@ -6,12 +6,8 @@ use Flow\ETL\Loader; use Flow\ETL\Transformer; -use Flow\Serializer\Serializable; -/** - * @implements Serializable}> - */ -final class Pipes implements Serializable +final class Pipes { /** * @param array $pipes @@ -25,18 +21,6 @@ public static function empty() : self return new self([]); } - public function __serialize() : array - { - return [ - 'pipes' => $this->pipes, - ]; - } - - public function __unserialize(array $data) : void - { - $this->pipes = $data['pipes']; - } - public function add(Loader|Transformer $pipe) : void { $this->pipes[] = $pipe; diff --git a/src/core/etl/src/Flow/ETL/Row.php b/src/core/etl/src/Flow/ETL/Row.php index d8fd51304..5a44696d3 100644 --- a/src/core/etl/src/Flow/ETL/Row.php +++ b/src/core/etl/src/Flow/ETL/Row.php @@ -10,12 +10,8 @@ use Flow\ETL\Row\Reference; use Flow\ETL\Row\References; use Flow\ETL\Row\Schema; -use Flow\Serializer\Serializable; -/** - * @implements Serializable - */ -final class Row implements Serializable +final class Row { public function __construct(private readonly Entries $entries) { @@ -34,16 +30,6 @@ public static function with(Entry ...$entries) : self return self::create(...$entries); } - public function __serialize() : array - { - return ['entries' => $this->entries]; - } - - public function __unserialize(array $data) : void - { - $this->entries = $data['entries']; - } - /** * @throws InvalidArgumentException * diff --git a/src/core/etl/src/Flow/ETL/Row/Entries.php b/src/core/etl/src/Flow/ETL/Row/Entries.php index 9791c2930..9e7941b16 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entries.php +++ b/src/core/etl/src/Flow/ETL/Row/Entries.php @@ -7,14 +7,12 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Exception\InvalidLogicException; use Flow\ETL\Exception\RuntimeException; -use Flow\Serializer\Serializable; /** * @implements \ArrayAccess * @implements \IteratorAggregate - * @implements Serializable}> */ -final class Entries implements \ArrayAccess, \Countable, \IteratorAggregate, Serializable +final class Entries implements \ArrayAccess, \Countable, \IteratorAggregate { /** * @var array @@ -39,16 +37,6 @@ public function __construct(Entry ...$entries) } } - public function __serialize() : array - { - return ['entries' => $this->entries]; - } - - public function __unserialize(array $data) : void - { - $this->entries = $data['entries']; - } - /** * @throws InvalidArgumentException * diff --git a/src/core/etl/src/Flow/ETL/Row/Entry.php b/src/core/etl/src/Flow/ETL/Row/Entry.php index 48a970292..6d3aff156 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry.php @@ -6,15 +6,11 @@ use Flow\ETL\PHP\Type\Type; use Flow\ETL\Row\Schema\Definition; -use Flow\Serializer\Serializable; /** * @template TValue - * @template TSerialized - * - * @extends Serializable */ -interface Entry extends Serializable +interface Entry { public function __toString() : string; diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php index 52e1f8392..7b8e326a1 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/ArrayEntry.php @@ -14,7 +14,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class ArrayEntry implements \Stringable, Entry { @@ -38,23 +38,11 @@ public function __construct( $this->type = type_array([] === $this->value); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::array($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php index 0c5f7b229..2ef0ea70f 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/BooleanEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class BooleanEntry implements \Stringable, Entry { @@ -33,23 +33,11 @@ public function __construct(private readonly string $name, private readonly bool $this->type = type_boolean(); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::boolean($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php index 187acf2a1..638d17df7 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/DateTimeEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry<\DateTimeInterface, array{name: string, value: \DateTimeInterface, type: ObjectType}> + * @implements Entry<\DateTimeInterface> */ final class DateTimeEntry implements \Stringable, Entry { @@ -47,23 +47,11 @@ public function __construct(private readonly string $name, \DateTimeInterface|st $this->type = type_object($this->value::class); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::dateTime($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php index 0ac87b840..d89cb8d08 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/EnumEntry.php @@ -11,7 +11,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry<\UnitEnum, array{name: string, value: \UnitEnum, type: EnumType}> + * @implements Entry<\UnitEnum> */ final class EnumEntry implements Entry { @@ -26,27 +26,11 @@ public function __construct( $this->type = EnumType::of($value::class); } - public function __serialize() : array - { - return [ - 'name' => $this->name, - 'value' => $this->value, - 'type' => $this->type, - ]; - } - public function __toString() : string { return $this->value->name; } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::enum( diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php index 6c6f90df4..457e114d4 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/FloatEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class FloatEntry implements \Stringable, Entry { @@ -33,24 +33,11 @@ public function __construct(private readonly string $name, private readonly floa $this->type = type_float(); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'precision' => $this->precision, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->precision = $data['precision']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::float($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php index be260625a..204712fd0 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/IntegerEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class IntegerEntry implements \Stringable, Entry { @@ -33,23 +33,11 @@ public function __construct(private readonly string $name, private readonly int $this->type = type_int(); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::integer($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php index 0cdc070bd..fa90a6e92 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/JsonEntry.php @@ -14,7 +14,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class JsonEntry implements \Stringable, Entry { @@ -67,29 +67,11 @@ public static function object(string $name, array $value) : self return $entry; } - public function __serialize() : array - { - return [ - 'name' => $this->name, - 'value' => $this->value, - 'object' => $this->object, - 'type' => $this->type, - ]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->object = $data['object']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::json($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php index bc1124f2c..46fd47800 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/ListEntry.php @@ -16,7 +16,7 @@ /** * @template T * - * @implements Entry, array{name: string, type: ListType, value: array}> + * @implements Entry> */ final class ListEntry implements Entry { @@ -41,23 +41,11 @@ public function __construct( } } - public function __serialize() : array - { - return ['name' => $this->name, 'type' => $this->type, 'value' => $this->value]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->type = $data['type']; - $this->value = $data['value']; - } - public function definition() : Definition { return Definition::list($this->name, $this->type); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php index e29a5a26c..98c4ca100 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/MapEntry.php @@ -18,7 +18,7 @@ /** * @template T * - * @implements Entry, array{name: string, type: MapType, value: array}> + * @implements Entry> */ final class MapEntry implements Entry { @@ -43,23 +43,11 @@ public function __construct( } } - public function __serialize() : array - { - return ['name' => $this->name, 'type' => $this->type, 'value' => $this->value]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->type = $data['type']; - $this->value = $data['value']; - } - public function definition() : Definition { return Definition::map( diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php index 6235bfea4..b3f2e0f62 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/NullEntry.php @@ -12,7 +12,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class NullEntry implements \Stringable, Entry { @@ -28,21 +28,11 @@ public function __construct(private readonly string $name) } } - public function __serialize() : array - { - return ['name' => $this->name]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - } - public function definition() : Definition { return Definition::null($this->name); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php index 630340651..6c55956c8 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/ObjectEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class ObjectEntry implements \Stringable, Entry { @@ -33,23 +33,11 @@ public function __construct(private readonly string $name, private readonly obje $this->type = type_object($value::class); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::object($this->name, $this->type); @@ -69,7 +57,7 @@ public function isEqual(Entry $entry) : bool return $this->is($entry->name()) && $entry instanceof self && $this->type->isEqual($entry->type) - && \serialize($this->__serialize()['value']) === \serialize($entry->__serialize()['value']); + && \serialize($this->value) === \serialize($entry->value); } public function map(callable $mapper) : Entry diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php index eeffaefbe..611a39d13 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/StringEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class StringEntry implements \Stringable, Entry { @@ -49,23 +49,11 @@ public static function uppercase(string $name, string $value) : self return new self($name, \mb_strtoupper($value)); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value, 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::string($this->name, $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php index 2048961fe..232e34171 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/StructureEntry.php @@ -14,7 +14,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry, array{name: string, value: array, type: StructureType}> + * @implements Entry> */ final class StructureEntry implements \Stringable, Entry { @@ -43,27 +43,11 @@ public function __construct( } } - public function __serialize() : array - { - return [ - 'name' => $this->name, - 'value' => $this->value, - 'type' => $this->type, - ]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::structure($this->name, $this->type); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php index ab2d1e860..2257fbc50 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/UuidEntry.php @@ -13,7 +13,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry + * @implements Entry */ final class UuidEntry implements \Stringable, Entry { @@ -46,23 +46,11 @@ public static function from(string $name, string $value) : self return new self($name, Entry\Type\Uuid::fromString($value)); } - public function __serialize() : array - { - return ['name' => $this->name, 'value' => $this->value->toString(), 'type' => $this->type]; - } - public function __toString() : string { return $this->toString(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = new Entry\Type\Uuid($data['value']); - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::uuid($this->name); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php index d67576912..9304a20dc 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/XMLEntry.php @@ -11,7 +11,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry<\DOMDocument, array{name: string, value: \DOMDocument, type: ObjectType}> + * @implements Entry<\DOMDocument> */ final class XMLEntry implements \Stringable, Entry { @@ -38,28 +38,12 @@ public function __construct(private readonly string $name, \DOMDocument|string $ $this->type = type_object($this->value::class); } - public function __serialize() : array - { - return [ - 'name' => $this->name, - 'value' => $this->value, - 'type' => $this->type, - ]; - } - public function __toString() : string { /** @phpstan-ignore-next-line */ return $this->value->saveXML(); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::xml($this->ref(), $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php b/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php index 600b26f69..b5209d1c0 100644 --- a/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php +++ b/src/core/etl/src/Flow/ETL/Row/Entry/XMLNodeEntry.php @@ -10,7 +10,7 @@ use Flow\ETL\Row\Schema\Definition; /** - * @implements Entry<\DOMNode, array{name: string, value: \DOMNode, type: ObjectType}> + * @implements Entry<\DOMNode> */ final class XMLNodeEntry implements \Stringable, Entry { @@ -23,15 +23,6 @@ public function __construct(private readonly string $name, private readonly \DOM $this->type = type_object($this->value::class); } - public function __serialize() : array - { - return [ - 'name' => $this->name, - 'value' => $this->value, - 'type' => $this->type, - ]; - } - public function __toString() : string { /** @@ -42,13 +33,6 @@ public function __toString() : string return $this->value->ownerDocument->saveXML($this->value); } - public function __unserialize(array $data) : void - { - $this->name = $data['name']; - $this->value = $data['value']; - $this->type = $data['type']; - } - public function definition() : Definition { return Definition::xml_node($this->ref(), $this->type->nullable()); diff --git a/src/core/etl/src/Flow/ETL/Row/EntryConverter.php b/src/core/etl/src/Flow/ETL/Row/EntryConverter.php deleted file mode 100644 index 88a898732..000000000 --- a/src/core/etl/src/Flow/ETL/Row/EntryConverter.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -interface EntryConverter extends Serializable -{ - public function convert(Entry $entry) : Entry; -} diff --git a/src/core/etl/src/Flow/ETL/Row/EntryFactory.php b/src/core/etl/src/Flow/ETL/Row/EntryFactory.php index 3a0986744..c2c7729cb 100644 --- a/src/core/etl/src/Flow/ETL/Row/EntryFactory.php +++ b/src/core/etl/src/Flow/ETL/Row/EntryFactory.php @@ -2,14 +2,7 @@ namespace Flow\ETL\Row; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface EntryFactory extends Serializable +interface EntryFactory { public function create(string $entryName, mixed $value, ?Schema $schema = null) : Entry; } diff --git a/src/core/etl/src/Flow/ETL/Row/EntryReference.php b/src/core/etl/src/Flow/ETL/Row/EntryReference.php index ec7039a17..31161ca1e 100644 --- a/src/core/etl/src/Flow/ETL/Row/EntryReference.php +++ b/src/core/etl/src/Flow/ETL/Row/EntryReference.php @@ -9,9 +9,6 @@ use Flow\ETL\Function\StructureFunctions; use Flow\ETL\Row; -/** - * @implements Reference - */ final class EntryReference extends ScalarFunctionChain implements Reference { private ?string $alias = null; @@ -31,25 +28,11 @@ public static function init(string|Reference $ref) : Reference return $ref; } - public function __serialize() : array - { - return [ - 'entry' => $this->entry, - 'alias' => $this->alias, - ]; - } - public function __toString() : string { return $this->name(); } - public function __unserialize(array $data) : void - { - $this->entry = $data['entry']; - $this->alias = $data['alias']; - } - public function as(string $alias) : self { $this->alias = $alias; diff --git a/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php b/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php index 9174e49ad..fe46c299f 100644 --- a/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php +++ b/src/core/etl/src/Flow/ETL/Row/Factory/NativeEntryFactory.php @@ -39,20 +39,8 @@ use Ramsey\Uuid\UuidInterface; use Symfony\Component\Uid\Uuid; -/** - * @implements EntryFactory - */ final class NativeEntryFactory implements EntryFactory { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - /** * @throws InvalidArgumentException * @throws RuntimeException diff --git a/src/core/etl/src/Flow/ETL/Row/Reference.php b/src/core/etl/src/Flow/ETL/Row/Reference.php index 9a5003633..55caceb69 100644 --- a/src/core/etl/src/Flow/ETL/Row/Reference.php +++ b/src/core/etl/src/Flow/ETL/Row/Reference.php @@ -4,14 +4,7 @@ namespace Flow\ETL\Row; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface Reference extends Serializable +interface Reference { public function __toString() : string; diff --git a/src/core/etl/src/Flow/ETL/Row/References.php b/src/core/etl/src/Flow/ETL/Row/References.php index 7cd5bf2b3..e82f31fa0 100644 --- a/src/core/etl/src/Flow/ETL/Row/References.php +++ b/src/core/etl/src/Flow/ETL/Row/References.php @@ -5,14 +5,12 @@ namespace Flow\ETL\Row; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\Serializer\Serializable; /** * @implements \ArrayAccess * @implements \IteratorAggregate - * @implements Serializable}> */ -final class References implements \ArrayAccess, \Countable, \IteratorAggregate, Serializable +final class References implements \ArrayAccess, \Countable, \IteratorAggregate { /** * @var array @@ -46,18 +44,6 @@ public static function init(string|Reference ...$reference) : self return new self(...$reference); } - public function __serialize() : array - { - return [ - 'refs' => $this->refs, - ]; - } - - public function __unserialize(array $data) : void - { - $this->refs = $data['refs']; - } - public function add(string|Reference $ref) : self { $reference = EntryReference::init($ref); diff --git a/src/core/etl/src/Flow/ETL/Row/Schema.php b/src/core/etl/src/Flow/ETL/Row/Schema.php index dfd9e7870..d19afd0c3 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema.php @@ -6,12 +6,8 @@ use Flow\ETL\Exception\InvalidArgumentException; use Flow\ETL\Row\Schema\Definition; -use Flow\Serializer\Serializable; -/** - * @implements Serializable}> - */ -final class Schema implements \Countable, Serializable +final class Schema implements \Countable { /** * @var array @@ -33,18 +29,6 @@ public function __construct(Definition ...$definitions) $this->definitions = $uniqueDefinitions; } - public function __serialize() : array - { - return [ - 'definitions' => $this->definitions, - ]; - } - - public function __unserialize(array $data) : void - { - $this->definitions = $data['definitions']; - } - public function count() : int { return \count($this->definitions); diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint.php index 7d17c0a1c..ad0167f2f 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint.php @@ -5,14 +5,8 @@ namespace Flow\ETL\Row\Schema; use Flow\ETL\Row\Entry; -use Flow\Serializer\Serializable; -/** - * @template T - * - * @extends Serializable - */ -interface Constraint extends Serializable +interface Constraint { public function isSatisfiedBy(Entry $entry) : bool; } diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/All.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/All.php index eb2efbd48..7e8a881bd 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/All.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/All.php @@ -7,9 +7,6 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint}> - */ final class All implements Constraint { /** @@ -22,18 +19,6 @@ public function __construct(Constraint ...$constraints) $this->constraints = $constraints; } - public function __serialize() : array - { - return [ - 'constraints' => $this->constraints, - ]; - } - - public function __unserialize(array $data) : void - { - $this->constraints = $data['constraints']; - } - public function isSatisfiedBy(Entry $entry) : bool { foreach ($this->constraints as $constraint) { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/Any.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/Any.php index 0e8844970..6e7ec8899 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/Any.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/Any.php @@ -7,9 +7,6 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint}> - */ final class Any implements Constraint { /** @@ -22,18 +19,6 @@ public function __construct(Constraint ...$constraints) $this->constraints = $constraints; } - public function __serialize() : array - { - return [ - 'constraints' => $this->constraints, - ]; - } - - public function __unserialize(array $data) : void - { - $this->constraints = $data['constraints']; - } - public function isSatisfiedBy(Entry $entry) : bool { foreach ($this->constraints as $constraint) { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/IsInstanceOf.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/IsInstanceOf.php index 4243525de..01aa279bf 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/IsInstanceOf.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/IsInstanceOf.php @@ -7,9 +7,6 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint - */ final class IsInstanceOf implements Constraint { /** @@ -19,18 +16,6 @@ public function __construct(private readonly string $class) { } - public function __serialize() : array - { - return [ - 'class' => $this->class, - ]; - } - - public function __unserialize(array $data) : void - { - $this->class = $data['class']; - } - public function isSatisfiedBy(Entry $entry) : bool { return $entry->value() instanceof $this->class; diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/ListType.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/ListType.php index 4196d12a3..0713140e4 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/ListType.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/ListType.php @@ -9,25 +9,12 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint - */ final class ListType implements Constraint { public function __construct(private readonly Type $type) { } - public function __serialize() : array - { - return ['type' => $this->type]; - } - - public function __unserialize(array $data) : void - { - $this->type = $data['type']; - } - public function isSatisfiedBy(Entry $entry) : bool { if (!$entry->type() instanceof PHPListType) { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/NotEmpty.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/NotEmpty.php index 6c786ba7a..7aca0ac2b 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/NotEmpty.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/NotEmpty.php @@ -7,24 +7,12 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint> - */ final class NotEmpty implements Constraint { public function __construct() { } - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function isSatisfiedBy(Entry $entry) : bool { return match ($entry::class) { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/SameAs.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/SameAs.php index 478c3acde..d7eb2ff38 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/SameAs.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/SameAs.php @@ -7,27 +7,12 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint - */ final class SameAs implements Constraint { public function __construct(private readonly mixed $value) { } - public function __serialize() : array - { - return [ - 'value' => $this->value, - ]; - } - - public function __unserialize(array $data) : void - { - $this->value = $data['value']; - } - public function isSatisfiedBy(Entry $entry) : bool { return $entry->value() === $this->value; diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/VoidConstraint.php b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/VoidConstraint.php index 0abc6601e..b8dd2df8d 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/VoidConstraint.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Constraint/VoidConstraint.php @@ -7,20 +7,8 @@ use Flow\ETL\Row\Entry; use Flow\ETL\Row\Schema\Constraint; -/** - * @implements Constraint> - */ final class VoidConstraint implements Constraint { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function isSatisfiedBy(Entry $entry) : bool { return true; diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php b/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php index 6a0238540..3f3830da2 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Definition.php @@ -27,17 +27,8 @@ use Flow\ETL\Row\Reference; use Flow\ETL\Row\Schema\Constraint\Any; use Flow\ETL\Row\Schema\Constraint\VoidConstraint; -use Flow\Serializer\Serializable; - -/** - * @implements Serializable>, - * constraint: Constraint, - * metadata: Metadata - * }> - */ -final class Definition implements Serializable + +final class Definition { private Constraint $constraint; @@ -193,30 +184,10 @@ public static function xml_node(string|Reference $entry, bool $nullable = false, return new self($entry, ($nullable) ? [Entry\XMLNodeEntry::class, NullEntry::class] : [Entry\XMLNodeEntry::class], $constraint, $metadata); } - // @codeCoverageIgnoreStart - public function __serialize() : array - { - return [ - 'ref' => $this->ref, - 'classes' => $this->classes, - 'constraint' => $this->constraint, - 'metadata' => $this->metadata, - ]; - } - - public function __unserialize(array $data) : void - { - $this->ref = $data['ref']; - $this->classes = $data['classes']; - $this->constraint = $data['constraint']; - $this->metadata = $data['metadata']; - } - public function constraint() : Constraint { return $this->constraint; } - // @codeCoverageIgnoreEnd public function entry() : Reference { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/Metadata.php b/src/core/etl/src/Flow/ETL/Row/Schema/Metadata.php index 539cc05b7..7d1f02ae1 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/Metadata.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/Metadata.php @@ -6,14 +6,11 @@ use Flow\ArrayComparison\ArrayComparison; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\Serializer\Serializable; /** * @psalm-allow-private-mutation - * - * @implements Serializable|int|string|bool|float|object>}> */ -final class Metadata implements Serializable +final class Metadata { /** * @var array|bool|float|int|object|string> @@ -44,18 +41,6 @@ public static function with(string $key, int|string|bool|float|object|array $val return new self([$key => $value]); } - public function __serialize() : array - { - return [ - 'map' => $this->map, - ]; - } - - public function __unserialize(array $data) : void - { - $this->map = $data['map']; - } - /** * @param string $key * @param array|bool|float|int|object|string $value diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php b/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php index 5318d7b02..61bf09d7f 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/SelectiveValidator.php @@ -10,20 +10,10 @@ use Flow\ETL\SchemaValidator; /** - * @implements SchemaValidator> * Matches only entries defined in the schema, ignoring every other entries in the row. */ final class SelectiveValidator implements SchemaValidator { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function isValid(Rows $rows, Schema $schema) : bool { foreach ($schema->entries() as $ref) { diff --git a/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php b/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php index 8dd2889c1..57978224b 100644 --- a/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php +++ b/src/core/etl/src/Flow/ETL/Row/Schema/StrictValidator.php @@ -9,20 +9,10 @@ use Flow\ETL\SchemaValidator; /** - * @implements SchemaValidator> * Matches all entries in the schema, if row comes with any extra entry it will fail validation. */ final class StrictValidator implements SchemaValidator { - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function isValid(Rows $rows, Schema $schema) : bool { foreach ($rows as $row) { diff --git a/src/core/etl/src/Flow/ETL/Row/ValueConverter.php b/src/core/etl/src/Flow/ETL/Row/ValueConverter.php deleted file mode 100644 index 447ce2416..000000000 --- a/src/core/etl/src/Flow/ETL/Row/ValueConverter.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -interface ValueConverter extends Serializable -{ - public function convert(mixed $value) : mixed; -} diff --git a/src/core/etl/src/Flow/ETL/Rows.php b/src/core/etl/src/Flow/ETL/Rows.php index 43a462e75..fc7af5fda 100644 --- a/src/core/etl/src/Flow/ETL/Rows.php +++ b/src/core/etl/src/Flow/ETL/Rows.php @@ -20,14 +20,12 @@ use Flow\ETL\Row\References; use Flow\ETL\Row\Schema; use Flow\ETL\Row\SortOrder; -use Flow\Serializer\Serializable; /** * @implements \ArrayAccess * @implements \IteratorAggregate - * @implements Serializable, partitions: Partitions}> */ -final class Rows implements \ArrayAccess, \Countable, \IteratorAggregate, Serializable +final class Rows implements \ArrayAccess, \Countable, \IteratorAggregate { private Partitions $partitions; @@ -64,20 +62,6 @@ public static function partitioned(array $rows, array|Partitions $partitions) : return $rows; } - public function __serialize() : array - { - return [ - 'rows' => $this->rows, - 'partitions' => $this->partitions, - ]; - } - - public function __unserialize(array $data) : void - { - $this->rows = $data['rows']; - $this->partitions = $data['partitions']; - } - public function add(Row ...$rows) : self { return new self( diff --git a/src/core/etl/src/Flow/ETL/RowsFactory.php b/src/core/etl/src/Flow/ETL/RowsFactory.php index ee5d87667..52324ddc5 100644 --- a/src/core/etl/src/Flow/ETL/RowsFactory.php +++ b/src/core/etl/src/Flow/ETL/RowsFactory.php @@ -2,14 +2,7 @@ namespace Flow\ETL; -use Flow\Serializer\Serializable; - -/** - * @template T - * - * @extends Serializable - */ -interface RowsFactory extends Serializable +interface RowsFactory { /** * @param array> $data diff --git a/src/core/etl/src/Flow/ETL/SchemaValidator.php b/src/core/etl/src/Flow/ETL/SchemaValidator.php index fed5f76f2..b8edc8d05 100644 --- a/src/core/etl/src/Flow/ETL/SchemaValidator.php +++ b/src/core/etl/src/Flow/ETL/SchemaValidator.php @@ -3,14 +3,8 @@ namespace Flow\ETL; use Flow\ETL\Row\Schema; -use Flow\Serializer\Serializable; -/** - * @template T - * - * @extends Serializable - */ -interface SchemaValidator extends Serializable +interface SchemaValidator { public function isValid(Rows $rows, Schema $schema) : bool; } diff --git a/src/core/etl/src/Flow/ETL/Serializer/Closure.php b/src/core/etl/src/Flow/ETL/Serializer/Closure.php deleted file mode 100644 index d382c4e72..000000000 --- a/src/core/etl/src/Flow/ETL/Serializer/Closure.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -interface Transformer extends Serializable +interface Transformer { /** * @throws LimitReachedException diff --git a/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php index c0c9fae26..30132976b 100755 --- a/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/CallbackRowTransformer.php @@ -4,17 +4,11 @@ namespace Flow\ETL\Transformer; -use Flow\ETL\Exception\RuntimeException; use Flow\ETL\FlowContext; use Flow\ETL\Row; use Flow\ETL\Rows; -use Flow\ETL\Serializer\Closure; use Flow\ETL\Transformer; -use Laravel\SerializableClosure\SerializableClosure; -/** - * @implements Transformer - */ final class CallbackRowTransformer implements Transformer { /** @@ -30,26 +24,6 @@ public function __construct(callable $callable) $this->callable = $callable; } - public function __serialize() : array - { - if (!Closure::isSerializable()) { - throw new RuntimeException('CallbackRowTransformer is not serializable without "opis/closure" library in your dependencies.'); - } - - return [ - 'callable' => new SerializableClosure(\Closure::fromCallable($this->callable)), - ]; - } - - public function __unserialize(array $data) : void - { - if (!Closure::isSerializable()) { - throw new RuntimeException('CallbackRowTransformer is not serializable without "opis/closure" library in your dependencies.'); - } - - $this->callable = $data['callable']->getClosure(); - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map($this->callable); diff --git a/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php index 3d27b4e31..df023ad90 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/CrossJoinRowsTransformer.php @@ -5,14 +5,10 @@ namespace Flow\ETL\Transformer; use Flow\ETL\DataFrame; -use Flow\ETL\Flow; use Flow\ETL\FlowContext; use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class CrossJoinRowsTransformer implements Transformer { private ?Rows $rows = null; @@ -23,24 +19,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'data_frame' => null, - 'rows' => $this->rows(), - 'prefix' => $this->prefix, - ]; - } - - public function __unserialize(array $data) : void - { - /** @var Rows $rows */ - $rows = $data['rows']; - $this->dataFrame = (new Flow())->process($rows); - $this->prefix = $data['prefix']; - $this->rows = null; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->joinCross($this->rows(), $this->prefix); diff --git a/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php index 2564432a1..c28d91305 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/DropDuplicatesTransformer.php @@ -5,16 +5,12 @@ namespace Flow\ETL\Transformer; use Flow\ETL\Exception\InvalidArgumentException; -use Flow\ETL\Exception\RuntimeException; use Flow\ETL\FlowContext; use Flow\ETL\Row\Reference; use Flow\ETL\Rows; use Flow\ETL\Transformer; use Flow\ETL\Transformer\DropDuplicates\Hashes; -/** - * @implements Transformer - */ final class DropDuplicatesTransformer implements Transformer { private Hashes $deduplication; @@ -34,22 +30,6 @@ public function __construct(string|Reference ...$entries) $this->deduplication = new Hashes(); } - /** - * @throws RuntimeException - */ - public function __serialize() : array - { - throw new RuntimeException('DropDuplicates is not serializable'); - } - - /** - * @throws RuntimeException - */ - public function __unserialize(array $data) : void - { - throw new RuntimeException('DropDuplicates is not serializable'); - } - public function transform(Rows $rows, FlowContext $context) : Rows { $newRows = []; diff --git a/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php index 256ca090b..8fb994b09 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/EntryNameStyleConverterTransformer.php @@ -13,9 +13,6 @@ use Flow\ETL\Transformer\StyleConverter\StringStyles; use Jawira\CaseConverter\Convert; -/** - * @implements Transformer - */ final class EntryNameStyleConverterTransformer implements Transformer { public function __construct(private readonly StringStyles $style) @@ -25,18 +22,6 @@ public function __construct(private readonly StringStyles $style) } } - public function __serialize() : array - { - return [ - 'style' => $this->style->value, - ]; - } - - public function __unserialize(array $data) : void - { - $this->style = StringStyles::fromString($data['style']); - } - public function transform(Rows $rows, FlowContext $context) : Rows { $rowTransformer = function (Row $row) : Row { diff --git a/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php index da7138380..2c976a0e2 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/GroupToArrayTransformer.php @@ -10,29 +10,12 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class GroupToArrayTransformer implements Transformer { public function __construct(private readonly string $groupByEntry, private readonly string $newEntryName) { } - public function __serialize() : array - { - return [ - 'group_by_entry' => $this->groupByEntry, - 'new_entry_name' => $this->newEntryName, - ]; - } - - public function __unserialize(array $data) : void - { - $this->groupByEntry = $data['group_by_entry']; - $this->newEntryName = $data['new_entry_name']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { /** @var array> $entries */ diff --git a/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php index 21293e41c..741145471 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/JoinEachRowsTransformer.php @@ -11,9 +11,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class JoinEachRowsTransformer implements Transformer { private function __construct( @@ -43,22 +40,6 @@ public static function right(DataFrameFactory $right, Expression $condition) : s return new self($right, $condition, Join::right); } - public function __serialize() : array - { - return [ - 'factory' => $this->factory, - 'condition' => $this->condition, - 'type' => $this->type, - ]; - } - - public function __unserialize(array $data) : void - { - $this->factory = $data['factory']; - $this->condition = $data['condition']; - $this->type = $data['type']; - } - /** * @param FlowContext $context * diff --git a/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php index 0acd830e9..07fa30bbf 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/JoinRowsTransformer.php @@ -5,16 +5,12 @@ namespace Flow\ETL\Transformer; use Flow\ETL\DataFrame; -use Flow\ETL\Flow; use Flow\ETL\FlowContext; use Flow\ETL\Join\Expression; use Flow\ETL\Join\Join; use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class JoinRowsTransformer implements Transformer { private ?Rows $rows = null; @@ -46,26 +42,6 @@ public static function right(DataFrame $right, Expression $condition) : self return new self($right, $condition, Join::right); } - public function __serialize() : array - { - return [ - 'data_frame' => null, - 'condition' => $this->condition, - 'type' => $this->type, - 'rows' => $this->rows(), - ]; - } - - public function __unserialize(array $data) : void - { - /** @var Rows $rows */ - $rows = $data['rows']; - $this->dataFrame = (new Flow())->process($rows); - $this->condition = $data['condition']; - $this->type = $data['type']; - $this->rows = null; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return match ($this->type) { diff --git a/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php index c328f05ac..f8811598c 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/KeepEntriesTransformer.php @@ -13,9 +13,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class KeepEntriesTransformer implements Transformer { private readonly References $refs; @@ -25,18 +22,6 @@ public function __construct(string|Reference ...$refs) $this->refs = References::init(...$refs); } - public function __serialize() : array - { - return [ - 'refs' => $this->refs, - ]; - } - - public function __unserialize(array $data) : void - { - $this->refs = $data['refs']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { $transformer = function (Row $row) : Row { diff --git a/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php index 6642652ce..6d05fff81 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/LimitTransformer.php @@ -8,9 +8,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class LimitTransformer implements Transformer { private int $rowsCount = 0; @@ -22,18 +19,6 @@ public function __construct(public readonly int $limit) } } - public function __serialize() : array - { - return [ - 'limit' => $this->limit, - ]; - } - - public function __unserialize(array $data) : void - { - $this->limit = $data['limit']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { $this->rowsCount += $rows->count(); diff --git a/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php index 71018a842..040c27850 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RemoveEntriesTransformer.php @@ -11,9 +11,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class RemoveEntriesTransformer implements Transformer { private readonly References $refs; @@ -23,18 +20,6 @@ public function __construct(string|Reference ...$names) $this->refs = References::init(...$names); } - public function __serialize() : array - { - return [ - 'refs' => $this->refs, - ]; - } - - public function __unserialize(array $data) : void - { - $this->refs = $data['refs']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { $transformer = fn (Row $row) : Row => $row->remove(...$this->refs); diff --git a/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php index aaa0ff0dd..b7ca1ce31 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RenameAllCaseTransformer.php @@ -9,9 +9,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class RenameAllCaseTransformer implements Transformer { public function __construct( @@ -22,24 +19,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'upper' => $this->upper, - 'lower' => $this->lower, - 'ucfirst' => $this->ucfirst, - 'ucwords' => $this->ucwords, - ]; - } - - public function __unserialize(array $data) : void - { - $this->upper = $data['upper']; - $this->lower = $data['lower']; - $this->ucfirst = $data['ucfirst']; - $this->ucwords = $data['ucwords']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map(function (Row $row) : Row { diff --git a/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php index 4c686e42d..9e7af1501 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RenameEntryTransformer.php @@ -9,29 +9,12 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class RenameEntryTransformer implements Transformer { public function __construct(private readonly string $from, private readonly string $to) { } - public function __serialize() : array - { - return [ - 'from' => $this->from, - 'to' => $this->to, - ]; - } - - public function __unserialize(array $data) : void - { - $this->from = $data['from']; - $this->to = $data['to']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map(fn (Row $row) : Row => $row->rename($this->from, $this->to)); diff --git a/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php index 78ca1d2db..d1e4cb631 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/RenameStrReplaceAllEntriesTransformer.php @@ -9,9 +9,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class RenameStrReplaceAllEntriesTransformer implements Transformer { public function __construct( @@ -20,20 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'search' => $this->search, - 'replace' => $this->replace, - ]; - } - - public function __unserialize(array $data) : void - { - $this->replace = $data['replace']; - $this->search = $data['search']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map(function (Row $row) : Row { diff --git a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php index 5d23a45cc..d7d01db94 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionFilterTransformer.php @@ -10,9 +10,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class ScalarFunctionFilterTransformer implements Transformer { public function __construct( @@ -20,18 +17,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'function' => $this->function, - ]; - } - - public function __unserialize(array $data) : void - { - $this->function = $data['function']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->filter(fn (Row $r) : bool => (bool) $this->function->eval($r)); diff --git a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php index ece6eef32..4889f8cd9 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/ScalarFunctionTransformer.php @@ -12,9 +12,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class ScalarFunctionTransformer implements Transformer { public function __construct( @@ -23,20 +20,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry' => $this->entryName, - 'function' => $this->function, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryName = $data['entry']; - $this->function = $data['function']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { if ($this->function instanceof ExpandResults && $this->function->expandResults()) { diff --git a/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php index e60f2ad62..39ccc95b1 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/UntilTransformer.php @@ -8,9 +8,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class UntilTransformer implements Transformer { private bool $limitReached = false; @@ -19,18 +16,6 @@ public function __construct(private readonly ScalarFunction $function) { } - public function __serialize() : array - { - return [ - 'function' => $this->function, - ]; - } - - public function __unserialize(array $data) : void - { - $this->function = $data['function']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { if ($this->limitReached) { diff --git a/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php b/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php index b3546e695..4ea29fb3a 100644 --- a/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php +++ b/src/core/etl/src/Flow/ETL/Transformer/WindowFunctionTransformer.php @@ -11,9 +11,6 @@ use Flow\ETL\Rows; use Flow\ETL\Transformer; -/** - * @implements Transformer - */ final class WindowFunctionTransformer implements Transformer { public function __construct( @@ -22,20 +19,6 @@ public function __construct( ) { } - public function __serialize() : array - { - return [ - 'entry_name' => $this->entryName, - 'expr' => $this->function, - ]; - } - - public function __unserialize(array $data) : void - { - $this->entryName = $data['entry_name']; - $this->function = $data['expr']; - } - /** * @throws InvalidArgumentException * @throws \JsonException diff --git a/src/core/etl/src/Flow/Serializer/NativePHPSerializer.php b/src/core/etl/src/Flow/Serializer/NativePHPSerializer.php index 158e6b6c5..da4ed44fc 100644 --- a/src/core/etl/src/Flow/Serializer/NativePHPSerializer.php +++ b/src/core/etl/src/Flow/Serializer/NativePHPSerializer.php @@ -12,19 +12,15 @@ public function __construct() { } - public function serialize(Serializable $serializable) : string + public function serialize(object $serializable) : string { return \serialize($serializable); } - public function unserialize(string $serialized, string $class) : Serializable + public function unserialize(string $serialized, string $class) : object { $value = \unserialize($serialized, ['allowed_classes' => true]); - if (!$value instanceof Serializable) { - throw new RuntimeException('NativePHPSerializer::unserialize must return instance of Serializable'); - } - if (!\is_a($value, $class)) { throw new RuntimeException("NativePHPSerializer::unserialize must return instance of {$class}, got: " . $value::class); } diff --git a/src/core/etl/src/Flow/Serializer/Serializer.php b/src/core/etl/src/Flow/Serializer/Serializer.php index 6cdef021c..9424c3eff 100644 --- a/src/core/etl/src/Flow/Serializer/Serializer.php +++ b/src/core/etl/src/Flow/Serializer/Serializer.php @@ -12,12 +12,12 @@ interface Serializer /** * @throw RuntimeException */ - public function serialize(Serializable $serializable) : string; + public function serialize(object $serializable) : string; /** * @param class-string $class * * @throw RuntimeException */ - public function unserialize(string $serialized, string $class) : Serializable; + public function unserialize(string $serialized, string $class) : object; } diff --git a/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php b/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php index e33d614b3..43fd352a6 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Double/AddStampToStringEntryTransformer.php @@ -21,18 +21,6 @@ public static function divideBySemicolon(string $entryName, string $stamp) : sel return new self($entryName, $stamp, ':'); } - public function __serialize() : array - { - return ['entryName' => $this->entryName, 'stamp' => $this->stamp, 'divider' => $this->divider]; - } - - public function __unserialize(array $data) : void - { - $this->entryName = $data['entryName']; - $this->stamp = $data['stamp']; - $this->divider = $data['divider']; - } - public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map( diff --git a/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php b/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php index a24e81fe6..0edd48740 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Double/CacheSpy.php @@ -7,9 +7,6 @@ use Flow\ETL\Cache; use Flow\ETL\Rows; -/** - * @implements Cache> - */ final class CacheSpy implements Cache { private int $clearsCount = 0; @@ -27,15 +24,6 @@ public function __construct(private readonly Cache $cache) { } - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } - public function add(string $id, Rows $rows) : void { $this->writesCount++; diff --git a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php index a6214ad66..133534e08 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Integration/DataFrame/JoinTest.php @@ -139,15 +139,6 @@ public function from(Rows $rows) : DataFrame ) ); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }, Expression::on(['country' => 'code']), ) diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php index c35f4b21f..d3b6df89a 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/DataFrameTest.php @@ -412,15 +412,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows fn (Row $row) : Row => $row->set(new StringEntry('stamp', 'zero')) ); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $loader = new class implements Loader { @@ -430,15 +421,6 @@ public function load(Rows $rows, FlowContext $context) : void { $this->result = \array_merge($this->result, $rows->toArray()); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; (new Flow())->read($extractor) @@ -449,15 +431,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows { throw new \RuntimeException('Unexpected exception'); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }) ->rows(AddStampToStringEntryTransformer::divideBySemicolon('stamp', 'one')) ->rows(AddStampToStringEntryTransformer::divideBySemicolon('stamp', 'two')) @@ -665,15 +638,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map(fn (Row $row) => $row->rename('id', 'new_id')); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } } ) ->batchSize(2) @@ -683,15 +647,6 @@ public function load(Rows $rows, FlowContext $context) : void { Assert::assertCount(2, $rows); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } } ) ->run(); @@ -720,15 +675,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows { return $rows->map(fn (Row $row) => $row->rename('id', 'new_id')); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } } ) ->collect() @@ -738,15 +684,6 @@ public function load(Rows $rows, FlowContext $context) : void { Assert::assertCount(3, $rows); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } } ) ->run(); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php index 6f8d5b1e9..1e11b791b 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/ETLErrorHandlingTest.php @@ -57,15 +57,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows { throw new \RuntimeException('Transformer Exception'); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $loader = new class implements Loader { @@ -75,15 +66,6 @@ public function load(Rows $rows, FlowContext $context) : void { $this->result = \array_merge($this->result, $rows->toArray()); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $this->expectException(\RuntimeException::class); @@ -132,16 +114,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows { throw new \RuntimeException('Transformer Exception'); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - // TODO: Implement __unserialize() method. - } }; $loader = new class implements Loader { @@ -151,15 +123,6 @@ public function load(Rows $rows, FlowContext $context) : void { $this->result = \array_merge($this->result, $rows->toArray()); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; (new Flow()) @@ -227,15 +190,6 @@ public function transform(Rows $rows, FlowContext $context) : Rows return $rows; } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $loader = new class implements Loader { @@ -245,15 +199,6 @@ public function load(Rows $rows, FlowContext $context) : void { $this->result = \array_merge($this->result, $rows->toArray()); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; (new Flow()) diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php index 0d6c6cef3..62984a26e 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Pipeline/ClosureTest.php @@ -32,15 +32,6 @@ public function closure(FlowContext $context) : void { $this->closureCalled = true; } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }) ->run(); diff --git a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php index 955525159..f25c03ec4 100644 --- a/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php +++ b/src/core/etl/tests/Flow/ETL/Tests/Unit/Transformer/JoinEachRowsTransformerTest.php @@ -39,15 +39,6 @@ public function from(Rows $rows) : DataFrame ) ); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $transformer = JoinEachRowsTransformer::inner($right, Expression::on(['country' => 'code'])); @@ -79,15 +70,6 @@ public function from(Rows $rows) : DataFrame ) ); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $transformer = JoinEachRowsTransformer::left($right, Expression::on(['country' => 'code'])); @@ -120,15 +102,6 @@ public function from(Rows $rows) : DataFrame ) ); } - - public function __serialize() : array - { - return []; - } - - public function __unserialize(array $data) : void - { - } }; $transformer = JoinEachRowsTransformer::right($right, Expression::on(['country' => 'code'])); diff --git a/tools/box/composer.lock b/tools/box/composer.lock index b6c3239a8..3d95cc171 100644 --- a/tools/box/composer.lock +++ b/tools/box/composer.lock @@ -2027,16 +2027,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -2101,7 +2101,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -2117,7 +2117,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/deprecation-contracts", @@ -2804,16 +2804,16 @@ }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", "shasum": "" }, "require": { @@ -2845,7 +2845,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.2" }, "funding": [ { @@ -2861,7 +2861,7 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2023-12-22T16:42:54+00:00" }, { "name": "symfony/service-contracts", @@ -2947,16 +2947,16 @@ }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", "shasum": "" }, "require": { @@ -3013,7 +3013,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v6.4.2" }, "funding": [ { @@ -3029,20 +3029,20 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6" + "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c40f7d17e91d8b407582ed51a2bbf83c52c367f6", - "reference": "c40f7d17e91d8b407582ed51a2bbf83c52c367f6", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", + "reference": "68d6573ec98715ddcae5a0a85bee3c1c27a4c33f", "shasum": "" }, "require": { @@ -3098,7 +3098,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.4.0" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.2" }, "funding": [ { @@ -3114,7 +3114,7 @@ "type": "tidelift" } ], - "time": "2023-11-09T08:28:32+00:00" + "time": "2023-12-28T19:16:56+00:00" }, { "name": "thecodingmachine/safe", diff --git a/tools/cs-fixer/composer.lock b/tools/cs-fixer/composer.lock index df878a4c3..fac4818a7 100644 --- a/tools/cs-fixer/composer.lock +++ b/tools/cs-fixer/composer.lock @@ -227,16 +227,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.43.0", + "version": "v3.45.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "39b5632c39ca9deb4eb7e670ba96fcf5c3a72e3c" + "reference": "c0daa33cb2533cd73f48dde1c70c2afa3e7953b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/39b5632c39ca9deb4eb7e670ba96fcf5c3a72e3c", - "reference": "39b5632c39ca9deb4eb7e670ba96fcf5c3a72e3c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/c0daa33cb2533cd73f48dde1c70c2afa3e7953b5", + "reference": "c0daa33cb2533cd73f48dde1c70c2afa3e7953b5", "shasum": "" }, "require": { @@ -305,7 +305,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.43.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.45.0" }, "funding": [ { @@ -313,7 +313,7 @@ "type": "github" } ], - "time": "2023-12-28T17:36:39+00:00" + "time": "2023-12-30T02:07:07+00:00" }, { "name": "psr/container", @@ -537,16 +537,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -611,7 +611,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -627,7 +627,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/deprecation-contracts", @@ -698,16 +698,16 @@ }, { "name": "symfony/event-dispatcher", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "d76d2632cfc2206eecb5ad2b26cd5934082941b6" + "reference": "e95216850555cd55e71b857eb9d6c2674124603a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d76d2632cfc2206eecb5ad2b26cd5934082941b6", - "reference": "d76d2632cfc2206eecb5ad2b26cd5934082941b6", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/e95216850555cd55e71b857eb9d6c2674124603a", + "reference": "e95216850555cd55e71b857eb9d6c2674124603a", "shasum": "" }, "require": { @@ -758,7 +758,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.0" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.4.2" }, "funding": [ { @@ -774,7 +774,7 @@ "type": "tidelift" } ], - "time": "2023-07-27T06:52:43+00:00" + "time": "2023-12-27T22:16:42+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -1540,16 +1540,16 @@ }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", "shasum": "" }, "require": { @@ -1581,7 +1581,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.2" }, "funding": [ { @@ -1597,7 +1597,7 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2023-12-22T16:42:54+00:00" }, { "name": "symfony/service-contracts", @@ -1745,16 +1745,16 @@ }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", "shasum": "" }, "require": { @@ -1811,7 +1811,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v6.4.2" }, "funding": [ { @@ -1827,7 +1827,7 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2023-12-10T16:15:48+00:00" } ], "aliases": [], diff --git a/tools/infection/composer.lock b/tools/infection/composer.lock index e43f5a742..8a0ce1c1f 100644 --- a/tools/infection/composer.lock +++ b/tools/infection/composer.lock @@ -1108,16 +1108,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -1182,7 +1182,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -1198,7 +1198,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1726,16 +1726,16 @@ }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", "shasum": "" }, "require": { @@ -1767,7 +1767,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.2" }, "funding": [ { @@ -1783,7 +1783,7 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2023-12-22T16:42:54+00:00" }, { "name": "symfony/service-contracts", @@ -1869,16 +1869,16 @@ }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", "shasum": "" }, "require": { @@ -1935,7 +1935,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v6.4.2" }, "funding": [ { @@ -1951,7 +1951,7 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "thecodingmachine/safe", diff --git a/tools/phpbench/composer.lock b/tools/phpbench/composer.lock index d57e7fdcd..088e985ca 100644 --- a/tools/phpbench/composer.lock +++ b/tools/phpbench/composer.lock @@ -578,16 +578,16 @@ }, { "name": "symfony/console", - "version": "v6.4.1", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd" + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/a550a7c99daeedef3f9d23fb82e3531525ff11fd", - "reference": "a550a7c99daeedef3f9d23fb82e3531525ff11fd", + "url": "https://api.github.com/repos/symfony/console/zipball/0254811a143e6bc6c8deea08b589a7e68a37f625", + "reference": "0254811a143e6bc6c8deea08b589a7e68a37f625", "shasum": "" }, "require": { @@ -652,7 +652,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.4.1" + "source": "https://github.com/symfony/console/tree/v6.4.2" }, "funding": [ { @@ -668,7 +668,7 @@ "type": "tidelift" } ], - "time": "2023-11-30T10:54:28+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1263,16 +1263,16 @@ }, { "name": "symfony/process", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa" + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/191703b1566d97a5425dc969e4350d32b8ef17aa", - "reference": "191703b1566d97a5425dc969e4350d32b8ef17aa", + "url": "https://api.github.com/repos/symfony/process/zipball/c4b1ef0bc80533d87a2e969806172f1c2a980241", + "reference": "c4b1ef0bc80533d87a2e969806172f1c2a980241", "shasum": "" }, "require": { @@ -1304,7 +1304,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.4.0" + "source": "https://github.com/symfony/process/tree/v6.4.2" }, "funding": [ { @@ -1320,7 +1320,7 @@ "type": "tidelift" } ], - "time": "2023-11-17T21:06:49+00:00" + "time": "2023-12-22T16:42:54+00:00" }, { "name": "symfony/service-contracts", @@ -1406,16 +1406,16 @@ }, { "name": "symfony/string", - "version": "v6.4.0", + "version": "v6.4.2", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809" + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/b45fcf399ea9c3af543a92edf7172ba21174d809", - "reference": "b45fcf399ea9c3af543a92edf7172ba21174d809", + "url": "https://api.github.com/repos/symfony/string/zipball/7cb80bc10bfcdf6b5492741c0b9357dac66940bc", + "reference": "7cb80bc10bfcdf6b5492741c0b9357dac66940bc", "shasum": "" }, "require": { @@ -1472,7 +1472,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.4.0" + "source": "https://github.com/symfony/string/tree/v6.4.2" }, "funding": [ { @@ -1488,7 +1488,7 @@ "type": "tidelift" } ], - "time": "2023-11-28T20:41:49+00:00" + "time": "2023-12-10T16:15:48+00:00" }, { "name": "webmozart/glob",