Skip to content

Commit

Permalink
build(deps): bump plank/laravel-mediable from 5.9.1 to 6.1.2 (#711)
Browse files Browse the repository at this point in the history
* build(deps): bump plank/laravel-mediable from 5.9.1 to 6.1.2

Bumps [plank/laravel-mediable](https://github.com/plank/laravel-mediable) from 5.9.1 to 6.1.2.
- [Release notes](https://github.com/plank/laravel-mediable/releases)
- [Changelog](https://github.com/plank/laravel-mediable/blob/master/CHANGELOG.md)
- [Commits](plank/laravel-mediable@5.9.1...6.1.2)

---
updated-dependencies:
- dependency-name: plank/laravel-mediable
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* wip

* wip

* wip

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrei Ioniță <hi@andrei.io>
  • Loading branch information
dependabot[bot] and andreiio authored Jun 27, 2024
1 parent a9ca975 commit 55d88fd
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 21 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"maatwebsite/excel": "^3.1",
"matthewbdaly/laravel-azure-storage": "^2.0",
"netopia/payment": "^1.0",
"plank/laravel-mediable": "^5.9",
"plank/laravel-mediable": "^6.1",
"sentry/sentry-laravel": "^4.6",
"spatie/laravel-responsecache": "^7.5",
"spatie/laravel-translatable": "^6.7",
Expand Down
101 changes: 81 additions & 20 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 72 additions & 0 deletions config/mediable.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
declare(strict_types=1);

return [
/*
* The database connection name to use
*
* Set to `null` in order to use the default database connection
*/
'connection_name' => null,

/*
* FQCN of the model to use for media
*
Expand Down Expand Up @@ -58,6 +65,12 @@
*/
'allow_unrecognized_types' => false,

/*
* Prefer the client-provided MIME type over the one inferred from the file contents, if provided
* May be slightly faster to compute, but is not guaranteed to be accurate if the source is untrusted
*/
'prefer_client_mime_type' => false,

/*
* Only allow files with specific MIME type(s) to be uploaded
*/
Expand Down Expand Up @@ -211,6 +224,7 @@
'^https?://' => Plank\Mediable\SourceAdapters\RemoteUrlAdapter::class,
'^/' => Plank\Mediable\SourceAdapters\LocalPathAdapter::class,
'^[a-zA-Z]:\\\\' => Plank\Mediable\SourceAdapters\LocalPathAdapter::class,
'^data:/?/?[^,]*,' => Plank\Mediable\SourceAdapters\DataUrlAdapter::class,
],
],

Expand Down Expand Up @@ -240,4 +254,62 @@
* Variants that should be generated.
*/
'variants' => ['thumb'],

/*
* Prevents loading migrations from the package.
*
* Use this if you are renaming the published migrations and want to prevent them from being loaded twice.
*/
'ignore_migrations' => true,

/*
* Configuration for image optimization
*/
'image_optimization' => [
/*
* Whether to apply image optimization after performing image manipulations by default
*/
'enabled' => true,
/*
* array of optimizers to use, which should implement \Spatie\ImageOptimizer\Optimizer
* Each can be passed an array of command line arguments to be passed to the optimizer
*/
'optimizers' => [
Spatie\ImageOptimizer\Optimizers\Jpegoptim::class => [
'--max=85',
'--strip-all',
'--all-progressive',
],
Spatie\ImageOptimizer\Optimizers\Pngquant::class => [
'--quality=85',
'--force',
'--skip-if-larger',
],
Spatie\ImageOptimizer\Optimizers\Optipng::class => [
'-i0',
'-o2',
'-quiet',
],
Spatie\ImageOptimizer\Optimizers\Gifsicle::class => [
'-b',
'-O3',
],
Spatie\ImageOptimizer\Optimizers\Cwebp::class => [
'-q 80',
'-m 6',
'-pass 10',
'-mt',
],
Spatie\ImageOptimizer\Optimizers\Avifenc::class => [
'-a cq-level=23',
'-j all',
'--min 0',
'--max 63',
'--minalpha 0',
'--maxalpha 63',
'-a end-usage=q',
'-a tune=ssim',
],
],
],
];
42 changes: 42 additions & 0 deletions database/migrations/2024_05_13_175108_add_alt_to_media.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('media', function (Blueprint $table) {
$table->text('alt')->nullable();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('media', function (Blueprint $table) {
$table->dropColumn('alt');
});
}

/**
* @inheritdoc
*/
public function getConnection()
{
return config('mediable.connection_name', parent::getConnection());
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

declare(strict_types=1);

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up(): void
{
Schema::table('media', function (Blueprint $table) {
$table->string('directory')->nullable()->change();
});
}
};

0 comments on commit 55d88fd

Please sign in to comment.