From 29485277c515f5a336b78f8ab8992488b6b4498e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Thu, 21 Nov 2024 15:27:46 +0100 Subject: [PATCH 1/6] Update PHP version matrix in GitHub Actions workflow to include PHP 8.4 --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cbec18a..23c7c26 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,7 +9,7 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.3, 8.2, 8.1] + php: [8.4, 8.3, 8.2, 8.1] stability: [prefer-stable] name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }} From 45354b4b33147bfc9f470fc85ebce555037ac551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Thu, 21 Nov 2024 15:28:09 +0100 Subject: [PATCH 2/6] Update Codecov action to version 5 in workflow configuration --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 84184b0..1e20e04 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -42,7 +42,7 @@ jobs: run: vendor/bin/pest --coverage - name: Send code coverage - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} verbose: false From 6c6c136d007e23e41003f95731a740de893a6acc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Thu, 21 Nov 2024 15:31:31 +0100 Subject: [PATCH 3/6] Update PHPStan workflow to use Composer version and set PHP version to 8.3 --- .github/workflows/phpstan-php-code.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/phpstan-php-code.yml b/.github/workflows/phpstan-php-code.yml index a222dfc..9dde107 100644 --- a/.github/workflows/phpstan-php-code.yml +++ b/.github/workflows/phpstan-php-code.yml @@ -12,3 +12,5 @@ jobs: - uses: php-actions/phpstan@v3 with: path: src/ + version: "composer" + php_version: 8.3 From 232342938a022ee016d8ab79490c8c778f43b605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 10 Nov 2025 18:22:07 +0100 Subject: [PATCH 4/6] fix dependencies james-heinrich/getid3 --- composer.json | 2 +- tests/Pest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 3be8b8d..2c540f0 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ ], "require": { "php": "^8.1", - "james-heinrich/getid3": "^v1.9.22" + "james-heinrich/getid3": "v1.9.22" }, "require-dev": { "pestphp/pest": "^2.0", diff --git a/tests/Pest.php b/tests/Pest.php index 4bd0d54..abed265 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -128,7 +128,7 @@ function addWriterFilesForTests() // MKV_WRITER, MP3_WRITER, // MP4_WRITER, - OGG_WRITER, + // OGG_WRITER, // OPUS_WRITER, // SPX_WRITER, // TTA_WRITER, From ef321cdd420d5b4179220e17f956b0458c4e971d Mon Sep 17 00:00:00 2001 From: ewilan-riviere <48261459+ewilan-riviere@users.noreply.github.com> Date: Mon, 10 Nov 2025 17:22:28 +0000 Subject: [PATCH 5/6] Fix styling --- src/Id3/Reader/Id3Audio.php | 24 ++++++++--------- src/Id3/Reader/Id3AudioTag.php | 18 ++++++------- src/Id3/Reader/Id3Comments.php | 4 +-- src/Id3/Reader/Id3CommentsPicture.php | 14 +++++----- src/Id3/Reader/Id3Stream.php | 22 ++++++++-------- src/Id3/Reader/Id3Video.php | 10 +++---- src/Id3/Tag/Id3TagApe.php | 36 ++++++++++++------------- src/Id3/Tag/Id3TagAsf.php | 20 +++++++------- src/Id3/Tag/Id3TagAudioV1.php | 14 +++++----- src/Id3/Tag/Id3TagAudioV2.php | 28 ++++++++++---------- src/Id3/Tag/Id3TagMatroska.php | 30 ++++++++++----------- src/Id3/Tag/Id3TagQuicktime.php | 38 +++++++++++++-------------- src/Id3/Tag/Id3TagRiff.php | 14 +++++----- src/Id3/Tag/Id3TagVorbisComment.php | 26 +++++++++--------- 14 files changed, 149 insertions(+), 149 deletions(-) diff --git a/src/Id3/Reader/Id3Audio.php b/src/Id3/Reader/Id3Audio.php index c476d95..b5d800a 100644 --- a/src/Id3/Reader/Id3Audio.php +++ b/src/Id3/Reader/Id3Audio.php @@ -8,18 +8,18 @@ class Id3Audio * @param Id3Stream[] $streams */ protected function __construct( - readonly public ?string $data_format = null, - readonly public ?int $channels = null, - readonly public ?int $sample_rate = null, - readonly public ?float $bitrate = null, - readonly public ?string $channel_mode = null, - readonly public ?string $bitrate_mode = null, - readonly public ?string $codec = null, - readonly public ?string $encoder = null, - readonly public bool $lossless = false, - readonly public ?string $encoder_options = null, - readonly public ?float $compression_ratio = null, - readonly public array $streams = [], + public readonly ?string $data_format = null, + public readonly ?int $channels = null, + public readonly ?int $sample_rate = null, + public readonly ?float $bitrate = null, + public readonly ?string $channel_mode = null, + public readonly ?string $bitrate_mode = null, + public readonly ?string $codec = null, + public readonly ?string $encoder = null, + public readonly bool $lossless = false, + public readonly ?string $encoder_options = null, + public readonly ?float $compression_ratio = null, + public readonly array $streams = [], ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Reader/Id3AudioTag.php b/src/Id3/Reader/Id3AudioTag.php index 7b508e1..0472902 100644 --- a/src/Id3/Reader/Id3AudioTag.php +++ b/src/Id3/Reader/Id3AudioTag.php @@ -8,15 +8,15 @@ class Id3AudioTag { protected function __construct( - readonly public ?Tag\Id3TagAudioV1 $id3v1 = null, - readonly public ?Tag\Id3TagAudioV2 $id3v2 = null, - readonly public ?Tag\Id3TagQuicktime $quicktime = null, - readonly public ?Tag\Id3TagAsf $asf = null, - readonly public ?Tag\Id3TagVorbisComment $vorbiscomment = null, - readonly public ?Tag\Id3TagRiff $riff = null, - readonly public ?Tag\Id3TagMatroska $matroska = null, - readonly public ?Tag\Id3TagApe $ape = null, - readonly public bool $is_empty = false, + public readonly ?Tag\Id3TagAudioV1 $id3v1 = null, + public readonly ?Tag\Id3TagAudioV2 $id3v2 = null, + public readonly ?Tag\Id3TagQuicktime $quicktime = null, + public readonly ?Tag\Id3TagAsf $asf = null, + public readonly ?Tag\Id3TagVorbisComment $vorbiscomment = null, + public readonly ?Tag\Id3TagRiff $riff = null, + public readonly ?Tag\Id3TagMatroska $matroska = null, + public readonly ?Tag\Id3TagApe $ape = null, + public readonly bool $is_empty = false, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Reader/Id3Comments.php b/src/Id3/Reader/Id3Comments.php index c0156f9..1e2b155 100644 --- a/src/Id3/Reader/Id3Comments.php +++ b/src/Id3/Reader/Id3Comments.php @@ -5,8 +5,8 @@ class Id3Comments { protected function __construct( - readonly public ?string $language = null, - readonly public ?Id3CommentsPicture $picture = null, + public readonly ?string $language = null, + public readonly ?Id3CommentsPicture $picture = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Reader/Id3CommentsPicture.php b/src/Id3/Reader/Id3CommentsPicture.php index 613c284..9747100 100644 --- a/src/Id3/Reader/Id3CommentsPicture.php +++ b/src/Id3/Reader/Id3CommentsPicture.php @@ -5,13 +5,13 @@ class Id3CommentsPicture { protected function __construct( - readonly public ?string $data = null, - readonly public ?string $image_mime = null, - readonly public ?int $image_width = null, - readonly public ?int $image_height = null, - readonly public ?string $picture_type = null, - readonly public ?string $description = null, - readonly public ?int $data_length = null, + public readonly ?string $data = null, + public readonly ?string $image_mime = null, + public readonly ?int $image_width = null, + public readonly ?int $image_height = null, + public readonly ?string $picture_type = null, + public readonly ?string $description = null, + public readonly ?int $data_length = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Reader/Id3Stream.php b/src/Id3/Reader/Id3Stream.php index 0428423..2c5da9e 100644 --- a/src/Id3/Reader/Id3Stream.php +++ b/src/Id3/Reader/Id3Stream.php @@ -5,17 +5,17 @@ class Id3Stream { protected function __construct( - readonly public ?string $data_format = null, - readonly public ?int $channels = null, - readonly public ?int $sample_rate = null, - readonly public ?float $bitrate = null, - readonly public ?string $channel_mode = null, - readonly public ?string $bitrate_mode = null, - readonly public ?string $codec = null, - readonly public ?string $encoder = null, - readonly public bool $lossless = false, - readonly public ?string $encoder_options = null, - readonly public ?float $compression_ratio = null, + public readonly ?string $data_format = null, + public readonly ?int $channels = null, + public readonly ?int $sample_rate = null, + public readonly ?float $bitrate = null, + public readonly ?string $channel_mode = null, + public readonly ?string $bitrate_mode = null, + public readonly ?string $codec = null, + public readonly ?string $encoder = null, + public readonly bool $lossless = false, + public readonly ?string $encoder_options = null, + public readonly ?float $compression_ratio = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Reader/Id3Video.php b/src/Id3/Reader/Id3Video.php index 55a1b8d..7e75189 100644 --- a/src/Id3/Reader/Id3Video.php +++ b/src/Id3/Reader/Id3Video.php @@ -5,11 +5,11 @@ class Id3Video { protected function __construct( - readonly public ?string $data_format = null, - readonly public ?int $rotate = null, - readonly public ?float $resolution_x = null, - readonly public ?float $resolution_y = null, - readonly public ?float $frame_rate = null, + public readonly ?string $data_format = null, + public readonly ?int $rotate = null, + public readonly ?float $resolution_x = null, + public readonly ?float $resolution_y = null, + public readonly ?float $frame_rate = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagApe.php b/src/Id3/Tag/Id3TagApe.php index 2c3eb46..2ae255d 100644 --- a/src/Id3/Tag/Id3TagApe.php +++ b/src/Id3/Tag/Id3TagApe.php @@ -5,24 +5,24 @@ class Id3TagApe extends Id3Tag { public function __construct( - readonly public ?string $title = null, - readonly public ?string $artist = null, - readonly public ?string $album = null, - readonly public ?string $album_artist = null, - readonly public ?string $composer = null, - readonly public ?string $comment = null, - readonly public ?string $genre = null, - readonly public ?string $disc = null, - readonly public ?string $compilation = null, - readonly public ?string $track = null, - readonly public ?string $date = null, - readonly public ?string $encoder = null, - readonly public ?string $description = null, - readonly public ?string $copyright = null, - readonly public ?string $lyrics = null, - readonly public ?string $podcastdesc = null, - readonly public ?string $language = null, - readonly public ?string $year = null, + public readonly ?string $title = null, + public readonly ?string $artist = null, + public readonly ?string $album = null, + public readonly ?string $album_artist = null, + public readonly ?string $composer = null, + public readonly ?string $comment = null, + public readonly ?string $genre = null, + public readonly ?string $disc = null, + public readonly ?string $compilation = null, + public readonly ?string $track = null, + public readonly ?string $date = null, + public readonly ?string $encoder = null, + public readonly ?string $description = null, + public readonly ?string $copyright = null, + public readonly ?string $lyrics = null, + public readonly ?string $podcastdesc = null, + public readonly ?string $language = null, + public readonly ?string $year = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagAsf.php b/src/Id3/Tag/Id3TagAsf.php index e05b447..377078e 100644 --- a/src/Id3/Tag/Id3TagAsf.php +++ b/src/Id3/Tag/Id3TagAsf.php @@ -5,16 +5,16 @@ class Id3TagAsf extends Id3Tag { public function __construct( - readonly public ?string $title = null, - readonly public ?string $artist = null, - readonly public ?string $album = null, - readonly public ?string $albumartist = null, - readonly public ?string $composer = null, - readonly public ?string $partofset = null, - readonly public ?string $genre = null, - readonly public ?string $track_number = null, - readonly public ?string $year = null, - readonly public ?string $encodingsettings = null, + public readonly ?string $title = null, + public readonly ?string $artist = null, + public readonly ?string $album = null, + public readonly ?string $albumartist = null, + public readonly ?string $composer = null, + public readonly ?string $partofset = null, + public readonly ?string $genre = null, + public readonly ?string $track_number = null, + public readonly ?string $year = null, + public readonly ?string $encodingsettings = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagAudioV1.php b/src/Id3/Tag/Id3TagAudioV1.php index c56bf9c..7dff908 100644 --- a/src/Id3/Tag/Id3TagAudioV1.php +++ b/src/Id3/Tag/Id3TagAudioV1.php @@ -5,13 +5,13 @@ class Id3TagAudioV1 extends Id3Tag { public function __construct( - readonly public ?string $title = null, - readonly public ?string $artist = null, - readonly public ?string $album = null, - readonly public ?string $year = null, - readonly public ?string $genre = null, - readonly public ?string $comment = null, - readonly public ?string $track_number = null, + public readonly ?string $title = null, + public readonly ?string $artist = null, + public readonly ?string $album = null, + public readonly ?string $year = null, + public readonly ?string $genre = null, + public readonly ?string $comment = null, + public readonly ?string $track_number = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagAudioV2.php b/src/Id3/Tag/Id3TagAudioV2.php index 8ac7d18..48194bc 100644 --- a/src/Id3/Tag/Id3TagAudioV2.php +++ b/src/Id3/Tag/Id3TagAudioV2.php @@ -5,20 +5,20 @@ class Id3TagAudioV2 extends Id3Tag { public function __construct( - readonly public ?string $album = null, - readonly public ?string $artist = null, - readonly public ?string $band = null, - readonly public ?string $comment = null, - readonly public ?string $composer = null, - readonly public ?string $part_of_a_set = null, - readonly public ?string $genre = null, - readonly public ?string $part_of_a_compilation = null, - readonly public ?string $title = null, - readonly public ?string $track_number = null, - readonly public ?string $year = null, - readonly public ?string $copyright = null, - readonly public ?string $unsynchronised_lyric = null, - readonly public ?string $language = null, + public readonly ?string $album = null, + public readonly ?string $artist = null, + public readonly ?string $band = null, + public readonly ?string $comment = null, + public readonly ?string $composer = null, + public readonly ?string $part_of_a_set = null, + public readonly ?string $genre = null, + public readonly ?string $part_of_a_compilation = null, + public readonly ?string $title = null, + public readonly ?string $track_number = null, + public readonly ?string $year = null, + public readonly ?string $copyright = null, + public readonly ?string $unsynchronised_lyric = null, + public readonly ?string $language = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagMatroska.php b/src/Id3/Tag/Id3TagMatroska.php index 06c1200..205f76f 100644 --- a/src/Id3/Tag/Id3TagMatroska.php +++ b/src/Id3/Tag/Id3TagMatroska.php @@ -5,21 +5,21 @@ class Id3TagMatroska extends Id3Tag { public function __construct( - readonly public ?string $title = null, - readonly public ?string $muxingapp = null, - readonly public ?string $writingapp = null, - readonly public ?string $album = null, - readonly public ?string $artist = null, - readonly public ?string $album_artist = null, - readonly public ?string $comment = null, - readonly public ?string $composer = null, - readonly public ?string $disc = null, - readonly public ?string $genre = null, - readonly public ?string $compilation = null, - readonly public ?string $part_number = null, - readonly public ?string $date = null, - readonly public ?string $encoder = null, - readonly public ?string $duration = null, + public readonly ?string $title = null, + public readonly ?string $muxingapp = null, + public readonly ?string $writingapp = null, + public readonly ?string $album = null, + public readonly ?string $artist = null, + public readonly ?string $album_artist = null, + public readonly ?string $comment = null, + public readonly ?string $composer = null, + public readonly ?string $disc = null, + public readonly ?string $genre = null, + public readonly ?string $compilation = null, + public readonly ?string $part_number = null, + public readonly ?string $date = null, + public readonly ?string $encoder = null, + public readonly ?string $duration = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagQuicktime.php b/src/Id3/Tag/Id3TagQuicktime.php index 093297e..e19ae86 100644 --- a/src/Id3/Tag/Id3TagQuicktime.php +++ b/src/Id3/Tag/Id3TagQuicktime.php @@ -5,25 +5,25 @@ class Id3TagQuicktime extends Id3Tag { public function __construct( - readonly public ?string $title = null, - readonly public ?string $track_number = null, - readonly public ?string $disc_number = null, - readonly public ?string $compilation = null, - readonly public ?string $album = null, - readonly public ?string $genre = null, - readonly public ?string $composer = null, - readonly public ?string $creation_date = null, - readonly public ?string $copyright = null, - readonly public ?string $artist = null, - readonly public ?string $album_artist = null, - readonly public ?string $encoded_by = null, - readonly public ?string $encoding_tool = null, - readonly public ?string $description = null, - readonly public ?string $description_long = null, - readonly public ?string $language = null, - readonly public ?string $lyrics = null, - readonly public ?string $comment = null, - readonly public ?string $stik = null, + public readonly ?string $title = null, + public readonly ?string $track_number = null, + public readonly ?string $disc_number = null, + public readonly ?string $compilation = null, + public readonly ?string $album = null, + public readonly ?string $genre = null, + public readonly ?string $composer = null, + public readonly ?string $creation_date = null, + public readonly ?string $copyright = null, + public readonly ?string $artist = null, + public readonly ?string $album_artist = null, + public readonly ?string $encoded_by = null, + public readonly ?string $encoding_tool = null, + public readonly ?string $description = null, + public readonly ?string $description_long = null, + public readonly ?string $language = null, + public readonly ?string $lyrics = null, + public readonly ?string $comment = null, + public readonly ?string $stik = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagRiff.php b/src/Id3/Tag/Id3TagRiff.php index 4ddf42d..91aaf3a 100644 --- a/src/Id3/Tag/Id3TagRiff.php +++ b/src/Id3/Tag/Id3TagRiff.php @@ -5,13 +5,13 @@ class Id3TagRiff extends Id3Tag { public function __construct( - readonly public ?string $artist = null, - readonly public ?string $comment = null, - readonly public ?string $creationdate = null, - readonly public ?string $genre = null, - readonly public ?string $title = null, - readonly public ?string $product = null, - readonly public ?string $software = null, + public readonly ?string $artist = null, + public readonly ?string $comment = null, + public readonly ?string $creationdate = null, + public readonly ?string $genre = null, + public readonly ?string $title = null, + public readonly ?string $product = null, + public readonly ?string $software = null, ) {} public static function make(?array $metadata): ?self diff --git a/src/Id3/Tag/Id3TagVorbisComment.php b/src/Id3/Tag/Id3TagVorbisComment.php index 7b85311..351fefd 100644 --- a/src/Id3/Tag/Id3TagVorbisComment.php +++ b/src/Id3/Tag/Id3TagVorbisComment.php @@ -5,19 +5,19 @@ class Id3TagVorbisComment extends Id3Tag { public function __construct( - readonly public ?string $description = null, - readonly public ?string $encoder = null, - readonly public ?string $title = null, - readonly public ?string $artist = null, - readonly public ?string $album = null, - readonly public ?string $genre = null, - readonly public ?string $comment = null, - readonly public ?string $albumartist = null, - readonly public ?string $composer = null, - readonly public ?string $discnumber = null, - readonly public ?string $compilation = null, - readonly public ?string $date = null, - readonly public ?string $tracknumber = null, + public readonly ?string $description = null, + public readonly ?string $encoder = null, + public readonly ?string $title = null, + public readonly ?string $artist = null, + public readonly ?string $album = null, + public readonly ?string $genre = null, + public readonly ?string $comment = null, + public readonly ?string $albumartist = null, + public readonly ?string $composer = null, + public readonly ?string $discnumber = null, + public readonly ?string $compilation = null, + public readonly ?string $date = null, + public readonly ?string $tracknumber = null, ) {} public static function make(?array $metadata): ?self From d094bf37b4429fd359354b329d499a3412ad7afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ewilan=20Rivi=C3=A8re?= Date: Mon, 10 Nov 2025 18:22:31 +0100 Subject: [PATCH 6/6] v4.0.02 fix dependencies --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2c540f0..0a5ebd6 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kiwilan/php-audio", "description": "PHP package to parse and update audio files metadata, with `JamesHeinrich/getID3`.", - "version": "4.0.01", + "version": "4.0.02", "keywords": [ "audio", "php",