Skip to content

Commit

Permalink
Revert "Correctly filtering conversions which will be applied to medi…
Browse files Browse the repository at this point in the history
…a in different collections of the same subject."

This reverts commit bb26bf6.
  • Loading branch information
timvandijck committed Nov 15, 2024
1 parent 9acf3f1 commit 7174f6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 106 deletions.
10 changes: 3 additions & 7 deletions src/Conversions/ConversionCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ public function setMedia(Media $media): self

public function getByName(string $name): Conversion
{
$conversion = $this
->getConversions($this->media->collection_name)
->first(fn (Conversion $conversion) => $conversion->getName() === $name);
$conversion = $this->first(fn (Conversion $conversion) => $conversion->getName() === $name);

if (! $conversion) {
throw InvalidConversion::unknownName($name);
Expand Down Expand Up @@ -91,9 +89,7 @@ public function getConversions(string $collectionName = ''): self
return $this;
}

return $this
->filter(fn (Conversion $conversion) => $conversion->shouldBePerformedOn($collectionName))
->values();
return $this->filter(fn (Conversion $conversion) => $conversion->shouldBePerformedOn($collectionName));
}

protected function addManipulationToConversion(Manipulations $manipulations, string $conversionName): void
Expand All @@ -117,7 +113,7 @@ protected function addManipulationToConversion(Manipulations $manipulations, str

if ($conversionName === '*') {
$this->each(
fn (Conversion $conversion) => $conversion->addAsFirstManipulations(clone $manipulations),
fn (Conversion $conversion) => $conversion->addAsFirstManipulations(clone $manipulations)
);
}
}
Expand Down
99 changes: 0 additions & 99 deletions tests/Conversions/ConversionCollectionConversionsTest.php

This file was deleted.

0 comments on commit 7174f6e

Please sign in to comment.