Skip to content

Commit 22d19fd

Browse files
major overhaul (read is ok)
1 parent 1f313ce commit 22d19fd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2975
-3528
lines changed
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: PHPStan PHP code issues
2+
3+
on: [push]
4+
5+
jobs:
6+
build-test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: php-actions/composer@v6
12+
- uses: php-actions/phpstan@v3
13+
with:
14+
path: src/

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ psalm.xml
1010
vendor
1111
.php-cs-fixer.cache
1212
.DS_Store
13+
.phpunit.cache
14+
version-draft.md

README.md

+27-35
Original file line numberDiff line numberDiff line change
@@ -413,41 +413,33 @@ You want to add a format? [See FAQ](#faq)
413413

414414
`Audio::class` convert some properties to be more readable.
415415

416-
| ID3 type | Original | New property |
417-
| :-------------: | :---------------------: | :------------------: |
418-
| `id3v2` | `band` | `albumArtist` |
419-
| `id3v2` | `track_number` | `trackNumber` |
420-
| `id3v2` | `part_of_a_set` | `discNumber` |
421-
| `id3v2` | `part_of_a_compilation` | `isCompilation` |
422-
| `quicktime` | `track_number` | `trackNumber` |
423-
| `quicktime` | `disc_number` | `discNumber` |
424-
| `quicktime` | `compilation` | `isCompilation` |
425-
| `quicktime` | `creation_date` | `creationDate` |
426-
| `quicktime` | `album_artist` | `albumArtist` |
427-
| `quicktime` | `encoded_by` | `encodingBy` |
428-
| `quicktime` | `encoding_tool` | `encoding` |
429-
| `quicktime` | `description_long` | `podcastDescription` |
430-
| `asf` | `albumartist` | `albumArtist` |
431-
| `asf` | `partofset` | `discNumber` |
432-
| `asf` | `track_number` | `trackNumber` |
433-
| `asf` | `encodingsettings` | `encoding` |
434-
| `vorbiscomment` | `encoder` | `encoding` |
435-
| `vorbiscomment` | `albumartist` | `albumArtist` |
436-
| `vorbiscomment` | `discnumber` | `discNumber` |
437-
| `vorbiscomment` | `compilation` | `isCompilation` |
438-
| `vorbiscomment` | `tracknumber` | `trackNumber` |
439-
| `matroska` | `album_artist` | `albumArtist` |
440-
| `matroska` | `disc` | `discNumber` |
441-
| `matroska` | `part_number` | `trackNumber` |
442-
| `matroska` | `date` | `year` |
443-
| `matroska` | `compilation` | `isCompilation` |
444-
| `matroska` | `encoder` | `encoding` |
445-
| `ape` | `album_artist` | `albumArtist` |
446-
| `ape` | `disc` | `discNumber` |
447-
| `ape` | `compilation` | `isCompilation` |
448-
| `ape` | `track` | `trackNumber` |
449-
| `ape` | `date` | `year` |
450-
| `ape` | `encoder` | `encoding` |
416+
| ID3 type | Original | New property |
417+
| :-------------: | :---------------------: | :--------------: |
418+
| `id3v2` | `band` | `album_artist` |
419+
| `id3v2` | `part_of_a_set` | `disc_number` |
420+
| `id3v2` | `part_of_a_compilation` | `is_compilation` |
421+
| `quicktime` | `compilation` | `is_compilation` |
422+
| `quicktime` | `encoded_by` | `encoding_by` |
423+
| `quicktime` | `encoding_tool` | `encoding` |
424+
| `quicktime` | `description_long` | `synopsis` |
425+
| `asf` | `albumartist` | `album_artist` |
426+
| `asf` | `partofset` | `disc_number` |
427+
| `asf` | `encodingsettings` | `encoding` |
428+
| `vorbiscomment` | `encoder` | `encoding` |
429+
| `vorbiscomment` | `albumartist` | `album_artist` |
430+
| `vorbiscomment` | `discnumber` | `disc_number` |
431+
| `vorbiscomment` | `compilation` | `is_compilation` |
432+
| `vorbiscomment` | `tracknumber` | `track_number` |
433+
| `matroska` | `disc` | `disc_number` |
434+
| `matroska` | `part_number` | `track_number` |
435+
| `matroska` | `date` | `year` |
436+
| `matroska` | `compilation` | `is_compilation` |
437+
| `matroska` | `encoder` | `encoding` |
438+
| `ape` | `disc` | `disc_number` |
439+
| `ape` | `compilation` | `is_compilation` |
440+
| `ape` | `track` | `track_number` |
441+
| `ape` | `date` | `year` |
442+
| `ape` | `encoder` | `encoding` |
451443

452444
## Testing
453445

composer.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "kiwilan/php-audio",
33
"description": "PHP package to parse and update audio files metadata, with `JamesHeinrich/getID3`.",
4-
"version": "3.0.08",
4+
"version": "4.0.0",
55
"keywords": [
66
"audio",
77
"php",
@@ -41,10 +41,11 @@
4141
],
4242
"require": {
4343
"php": "^8.1",
44-
"james-heinrich/getid3": "^1.9"
44+
"james-heinrich/getid3": "^v1.9.22"
4545
},
4646
"require-dev": {
47-
"pestphp/pest": "^1.20",
47+
"pestphp/pest": "^2.0",
48+
"phpstan/phpstan": "^1.12",
4849
"laravel/pint": "^1.2",
4950
"spatie/ray": "^1.28"
5051
},

phpstan.neon

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
parameters:
2+
tmpDir: public/build/.phpstan
3+
4+
paths:
5+
- src
6+
7+
# The level 9 is the highest level
8+
level: 5

phpunit.xml.dist

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
55
backupGlobals="false"
6-
backupStaticAttributes="false"
76
bootstrap="vendor/autoload.php"
87
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
128
processIsolation="false"
139
stopOnFailure="false"
1410
executionOrder="random"
1511
failOnWarning="true"
1612
failOnRisky="true"
1713
failOnEmptyTestSuite="true"
1814
beStrictAboutOutputDuringTests="true"
19-
verbose="true"
15+
cacheDirectory=".phpunit.cache"
16+
backupStaticProperties="false"
2017
>
2118
<testsuites>
2219
<testsuite name="Kiwilan Test Suite">
2320
<directory>tests</directory>
2421
</testsuite>
2522
</testsuites>
2623
<coverage>
27-
<include>
28-
<directory suffix=".php">./src</directory>
29-
</include>
3024
<report>
31-
<html outputDirectory="build/coverage"/>
32-
<text outputFile="build/coverage.txt"/>
33-
<clover outputFile="build/logs/clover.xml"/>
25+
<html outputDirectory="build/coverage" />
26+
<text outputFile="build/coverage.txt" />
27+
<clover outputFile="build/logs/clover.xml" />
3428
</report>
3529
</coverage>
3630
<logging>
37-
<junit outputFile="build/report.junit.xml"/>
31+
<junit outputFile="build/report.junit.xml" />
3832
</logging>
39-
</phpunit>
33+
<source>
34+
<include>
35+
<directory suffix=".php">./src</directory>
36+
</include>
37+
</source>
38+
</phpunit>

0 commit comments

Comments
 (0)