Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Dec 11, 2023
1 parent fe37c93 commit 5801759
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 790 deletions.
6 changes: 6 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

Because there are many breaking changes an upgrade is not that easy. There are many edge cases this guide does not cover. We accept PRs to improve this guide.

## From v10 to v11

- Rename to config file from `media-library.php` to `medialibrary.php`.
- All event names have gained the `Event` suffix. For example `Spatie\MediaLibrary\MediaCollections\Events\MediaHasBeenAdded` is now `Spatie\MediaLibrary\MediaCollections\Events\MediaHasBeenAddedEvent`.


## From v9 to v10

Upgrading from v9 to v10 is straightforward. The biggest change is that we dropped support for PHP 7, and are using PHP 8 features.
Expand Down
10 changes: 2 additions & 8 deletions src/Conversions/Conversion.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function __construct(
$this->performOnQueue = config('medialibrary.queue_conversions_by_default', true);
}

public static function create(string $name)
public static function create(string $name): self
{
return new static($name);
}
Expand Down Expand Up @@ -110,14 +110,8 @@ public function withoutManipulations(): self
return $this;
}

public function __call($name, $arguments)
public function __call($name, $arguments): self
{
/*
if (! method_exists($this->manipulations, $name)) {
throw new BadMethodCallException("Manipulation `{$name}` does not exist");
}
*/

$this->manipulations->$name(...$arguments);

return $this;
Expand Down
8 changes: 5 additions & 3 deletions src/Conversions/Events/ConversionWillStart.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ class ConversionWillStart
{
use SerializesModels;

public function __construct(public Media $media, public Conversion $conversion, public string $copiedOriginalFile)
{
}
public function __construct(
public Media $media,
public Conversion $conversion,
public string $copiedOriginalFile,
) {}
}
133 changes: 0 additions & 133 deletions src/Conversions/FromImagePackage/OldManipulationSequence.php

This file was deleted.

Loading

0 comments on commit 5801759

Please sign in to comment.