Skip to content

Commit

Permalink
Remove deprecated Sort class
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Oct 1, 2023
1 parent 0e201cd commit 2dd71de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 53 deletions.
18 changes: 2 additions & 16 deletions src/core/etl/src/Flow/ETL/DataFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use Flow\ETL\Row\Reference;
use Flow\ETL\Row\References;
use Flow\ETL\Row\Schema;
use Flow\ETL\Row\Sort;
use Flow\ETL\Transformer\CallbackRowTransformer;
use Flow\ETL\Transformer\CrossJoinRowsTransformer;
use Flow\ETL\Transformer\DropDuplicatesTransformer;
Expand Down Expand Up @@ -610,28 +609,15 @@ public function select(string|Reference ...$entries) : self

/**
* @lazy
*
* @psalm-suppress DeprecatedClass
*/
public function sortBy(Sort|EntryReference ...$entries) : self
public function sortBy(EntryReference ...$entries) : self
{
$this
->cache($this->context->config->id())
->run();

$this->pipeline = $this->pipeline->cleanCopy();

$sortBy = [];

foreach ($entries as $entry) {
if ($entry instanceof Sort) {
$sortBy[] = $entry->isAsc() ? ref($entry->name())->asc() : ref($entry->name())->desc();
} else {
$sortBy[] = $entry;
}
}

$this->pipeline->source($this->context->config->externalSort()->sortBy(...$sortBy));
$this->pipeline->source($this->context->config->externalSort()->sortBy(...$entries));

return $this;
}
Expand Down
37 changes: 0 additions & 37 deletions src/core/etl/src/Flow/ETL/Row/Sort.php

This file was deleted.

0 comments on commit 2dd71de

Please sign in to comment.