Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
strategy:
max-parallel: 15
matrix:
php-versions: ['8.3', '8.4']
php-versions: ['8.2', '8.3', '8.4']
steps:
- name: Checkout
uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"imagine/imagine": "^1.5",
"league/flysystem-bundle": "^3.4",
"league/flysystem-memory": "^3.0",
"phpunit/phpunit": "^12",
"phpunit/phpunit": "^11",
"psr/log": "^2.0 || ^3.0",
"sonata-project/admin-bundle": "^4.30",
"symfony/browser-kit": "^7.0 || ^8.0",
Expand Down
2 changes: 1 addition & 1 deletion doc/misc-features/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ When resolving a media, the ``PreResolveMediaEvent`` can be used to modify the m

final class ResolveEventListener
{
private const string MEDIA_ORIGINAL_PATH = 'some/legacy/prefix/';
private const MEDIA_ORIGINAL_PATH = 'some/legacy/prefix/';

#[AsEventListener(event: MediaEvents::PRE_RESOLVE_MEDIA)]
public function onPreResolve(PreResolveMediaEvent $event): void
Expand Down
4 changes: 2 additions & 2 deletions doc/variations/pre-processors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ A pre-processor class must implement the ``process`` method of the ``Joli\MediaB

readonly class OgImagePreProcessor extends AbstractPreProcessor implements PreProcessorInterface
{
private const int WIDTH = 1200;
private const int HEIGHT = 1000;
private const WIDTH = 1200;
private const HEIGHT = 1000;

public function __construct(
private ImagineInterface $imagine,
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/EasyAdmin/src/Asset/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

final readonly class Package implements PackageInterface
{
public const string NAME = 'joli-media-easy-admin';
public const NAME = 'joli-media-easy-admin';

private PackageInterface $package;

Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/SonataAdmin/src/Asset/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

final readonly class Package implements PackageInterface
{
public const string NAME = 'joli-media-sonata-admin';
public const NAME = 'joli-media-sonata-admin';

private PackageInterface $package;

Expand Down
2 changes: 1 addition & 1 deletion src/Doctrine/Type/MediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MediaType extends StringType
use MediaTypeTrait;

#[\Deprecated(message: 'use Types::MEDIA instead')]
public const string NAME = Types::MEDIA;
public const NAME = Types::MEDIA;

/**
* @param Media|string|null $value
Expand Down
4 changes: 2 additions & 2 deletions src/Doctrine/Types.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

class Types
{
public const string MEDIA = 'media';
public const MEDIA = 'media';

public const string MEDIA_LONG = 'media_long';
public const MEDIA_LONG = 'media_long';

public const MEDIA_TYPES = [
self::MEDIA,
Expand Down
2 changes: 1 addition & 1 deletion src/Inspector/TransformationDataHolder.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class TransformationDataHolder
{
private const string STOPWATCH_KEY = 'JoliMediaBundle';
private const STOPWATCH_KEY = 'JoliMediaBundle';

private const TRANSFORMATION_PROPERTIES = [
'binaryWidth' => 'Binary width (before the transformation)',
Expand Down
2 changes: 1 addition & 1 deletion src/PostProcessor/Gifsicle.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'optimize' => 3,
'lossy' => 20,
'colors' => 256,
Expand Down
2 changes: 1 addition & 1 deletion src/PostProcessor/Jpegoptim.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'strip_all' => true,
'progressive' => true,
'max_quality' => 80,
Expand Down
2 changes: 1 addition & 1 deletion src/PostProcessor/Mozjpeg.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'optimize' => true,
'progressive' => true,
'quality' => 80,
Expand Down
2 changes: 1 addition & 1 deletion src/PostProcessor/Oxipng.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'optimization' => 4,
'strip' => 'all',
'zopfli' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/PostProcessor/Pngquant.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'quality' => '75-85',
'speed' => 5,
];
Expand Down
2 changes: 1 addition & 1 deletion src/Processor/Cwebp.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* @var array<string, array<string, mixed>>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'near_lossless' => [
'quality' => 40,
'method' => 6,
Expand Down
2 changes: 1 addition & 1 deletion src/Processor/Gif2webp.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'lossy' => true,
'metadata' => 'none',
'min_size' => true,
Expand Down
2 changes: 1 addition & 1 deletion src/Processor/Gifsicle.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'optimize' => 3,
'lossy' => 20,
'colors' => 256,
Expand Down
2 changes: 1 addition & 1 deletion src/Processor/Imagine.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* @var array<string, mixed>
*/
private const array DEFAULT_OPTIONS = [
private const DEFAULT_OPTIONS = [
'jpeg_quality' => 80,
'png_quality' => 80,
'quality' => 80,
Expand Down
16 changes: 8 additions & 8 deletions tests/src/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@

class BaseTestCase extends TestCase
{
public const string AVIF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.avif';
public const AVIF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.avif';

public const string JPEG_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.jpeg';
public const JPEG_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.jpeg';

public const string GIF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.gif';
public const GIF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.gif';

public const string HEIF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.heic';
public const HEIF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.heic';

public const string PNG_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.png';
public const PNG_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.png';

public const string TIFF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.tiff';
public const TIFF_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.tiff';

public const string WEBP_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.webp';
public const WEBP_FIXTURE_PATH = __DIR__ . '/../fixtures/circle-pattern.webp';

public const array FIXTURE_BINARIES = [
public const FIXTURE_BINARIES = [
'avif' => self::AVIF_FIXTURE_PATH,
'gif' => self::GIF_FIXTURE_PATH,
'heif' => self::HEIF_FIXTURE_PATH,
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Conversion/ConverterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

class ConverterTest extends BaseTestCase
{
private const array TO_EXTENSIONS = [
private const TO_EXTENSIONS = [
null,
'jpeg',
'png',
Expand Down