Skip to content
代码片段 群组 项目
提交 78672a5e 编辑于 作者: guanguans's avatar guanguans
浏览文件

ci(workflows): Update PHP version in workflow and dependencies

- Update PHP matrix version to 8.4 in GitHub Actions workflow
- Modify `composer.json` to use PHP 8.4 for composer updater
- Clean up PHPStan baseline by clearing unnecessary errors
- Update tests to throw the correct exception type for HTTP failures

These changes ensure compatibility with the latest PHP version and improve error handling.
上级 c54c544c
No related branches found
No related tags found
无相关合并请求
......@@ -9,7 +9,7 @@ jobs:
fail-fast: true
matrix:
os: [ windows-latest, ubuntu-latest ]
php: [ 8.2, 8.3 ]
php: [ 8.2, 8.4 ]
dependency-version: [ prefer-stable ]
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
......
......@@ -162,7 +162,7 @@
"composer-require-checker": "@php ./vendor/bin/composer-require-checker check --config-file=composer-require-checker.json composer.json --ansi -v",
"composer-require-checker-json": "@php ./vendor/bin/composer-require-checker check --config-file=composer-require-checker.json composer.json --ansi -v --output=json | jq",
"composer-unused": "@php ./vendor/bin/composer-unused --ansi -v",
"composer-updater": "@php ./composer-updater --highest-php-binary=/opt/homebrew/opt/php@8.3/bin/php --ansi",
"composer-updater": "@php ./composer-updater --highest-php-binary=/opt/homebrew/opt/php@8.4/bin/php --ansi",
"composer-updater-dry-run": "@composer-updater --dry-run",
"composer-validate": "@composer validate --check-lock --strict --ansi -v",
"facade-lint": "@facade-update --lint",
......@@ -198,7 +198,8 @@
"@putenv PHP80=/opt/homebrew/opt/php@8.0/bin/php",
"@putenv PHP81=/opt/homebrew/opt/php@8.1/bin/php",
"@putenv PHP82=/opt/homebrew/opt/php@8.2/bin/php",
"@putenv PHP83=/opt/homebrew/opt/php@8.3/bin/php"
"@putenv PHP83=/opt/homebrew/opt/php@8.3/bin/php",
"@putenv PHP84=/opt/homebrew/opt/php@8.4/bin/php"
],
"rector": "@php ./vendor/bin/rector --ansi -v",
"rector-clear-cache": "@rector --clear-cache",
......
......@@ -9707,33 +9707,33 @@
},
{
"name": "icecave/parity",
"version": "1.0.0",
"version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/icecave/parity.git",
"reference": "0109fef58b3230d23b20b2ac52ecdf477218d300"
"reference": "4fe835483e0f89f0f96763c47cb9fdca26c24bdc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icecave/parity/zipball/0109fef58b3230d23b20b2ac52ecdf477218d300",
"reference": "0109fef58b3230d23b20b2ac52ecdf477218d300",
"url": "https://api.github.com/repos/icecave/parity/zipball/4fe835483e0f89f0f96763c47cb9fdca26c24bdc",
"reference": "4fe835483e0f89f0f96763c47cb9fdca26c24bdc",
"shasum": ""
},
"require": {
"icecave/repr": "~1",
"php": ">=5.3"
"icecave/repr": "^4",
"php": ">=7.3"
},
"require-dev": {
"eloquent/liberator": "~1",
"icecave/archer": "~1"
},
"suggest": {
"eloquent/asplode": "Drop-in exception-based error handling."
"eloquent/liberator": "^2",
"eloquent/phony": "^5",
"eloquent/phony-phpunit": "^7",
"friendsofphp/php-cs-fixer": "^2",
"phpunit/phpunit": "^9"
},
"type": "library",
"autoload": {
"psr-0": {
"Icecave\\Parity": "src"
"psr-4": {
"Icecave\\Parity\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
......@@ -9743,12 +9743,12 @@
"authors": [
{
"name": "James Harris",
"email": "james.harris@icecave.com.au",
"email": "mailjamesharris@gmail.com",
"homepage": "https://github.com/jmalloc"
}
],
"description": "A customizable deep comparison library.",
"homepage": "https://github.com/IcecaveStudios/parity",
"homepage": "https://github.com/icecave/parity",
"keywords": [
"compare",
"comparison",
......@@ -9761,32 +9761,31 @@
],
"support": {
"issues": "https://github.com/icecave/parity/issues",
"source": "https://github.com/icecave/parity/tree/1.0.0"
"source": "https://github.com/icecave/parity/tree/3.0.1"
},
"time": "2014-01-17T05:56:27+00:00"
"time": "2021-02-04T05:51:24+00:00"
},
{
"name": "icecave/repr",
"version": "1.0.1",
"version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/icecave/repr.git",
"reference": "8a3d2953adf5f464a06e3e2587aeacc97e2bed07"
"reference": "3dad35ee43394404ae0f1926d754e7b7820da8e4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/icecave/repr/zipball/8a3d2953adf5f464a06e3e2587aeacc97e2bed07",
"reference": "8a3d2953adf5f464a06e3e2587aeacc97e2bed07",
"url": "https://api.github.com/repos/icecave/repr/zipball/3dad35ee43394404ae0f1926d754e7b7820da8e4",
"reference": "3dad35ee43394404ae0f1926d754e7b7820da8e4",
"shasum": ""
},
"require": {
"php": ">=5.3"
"php": ">=7.2"
},
"require-dev": {
"icecave/archer": "~1"
},
"suggest": {
"eloquent/asplode": "Drop-in exception-based error handling."
"eloquent/phony-phpunit": "^6",
"friendsofphp/php-cs-fixer": "^2",
"phpunit/phpunit": "^8"
},
"type": "library",
"autoload": {
......@@ -9801,12 +9800,12 @@
"authors": [
{
"name": "James Harris",
"email": "james.harris@icecave.com.au",
"email": "mailjamesharris@gmail.com",
"homepage": "https://github.com/jmalloc"
}
],
"description": "A library for generating string representations of any value, inspired by Python's reprlib library.",
"homepage": "https://github.com/IcecaveStudios/repr",
"homepage": "https://github.com/icecave/repr",
"keywords": [
"human",
"readable",
......@@ -9816,9 +9815,9 @@
],
"support": {
"issues": "https://github.com/icecave/repr/issues",
"source": "https://github.com/icecave/repr/tree/1.0.1"
"source": "https://github.com/icecave/repr/tree/4.0.0"
},
"time": "2014-07-25T05:44:41+00:00"
"time": "2020-08-25T02:05:11+00:00"
},
{
"name": "intonate/tinker-zero",
......@@ -9942,27 +9941,31 @@
},
{
"name": "justinrainbow/json-schema",
"version": "6.0.0",
"version": "6.1.0",
"source": {
"type": "git",
"url": "https://github.com/jsonrainbow/json-schema.git",
"reference": "a38c6198d53b09c0702f440585a4f4a5d9137bd9"
"reference": "f7d78c345d5f8954f32cef5381fb6f8748b60690"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/a38c6198d53b09c0702f440585a4f4a5d9137bd9",
"reference": "a38c6198d53b09c0702f440585a4f4a5d9137bd9",
"url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/f7d78c345d5f8954f32cef5381fb6f8748b60690",
"reference": "f7d78c345d5f8954f32cef5381fb6f8748b60690",
"shasum": ""
},
"require": {
"icecave/parity": "1.0.0",
"marc-mabe/php-enum": "^2.0 || ^3.0 || ^4.0",
"php": ">=5.3.3"
"ext-json": "*",
"icecave/parity": "^3.0",
"marc-mabe/php-enum": "^4.0",
"php": "^7.2 || ^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "~2.2.20 || ~2.19.0",
"json-schema/json-schema-test-suite": "1.2.0",
"phpunit/phpunit": "^4.8.35"
"marc-mabe/php-enum-phpstan": "^2.0",
"phpspec/prophecy": "^1.19",
"phpstan/phpstan": "^1.12",
"phpunit/phpunit": "^8.5"
},
"bin": [
"bin/validate-json"
......@@ -10008,9 +10011,9 @@
],
"support": {
"issues": "https://github.com/jsonrainbow/json-schema/issues",
"source": "https://github.com/jsonrainbow/json-schema/tree/6.0.0"
"source": "https://github.com/jsonrainbow/json-schema/tree/6.1.0"
},
"time": "2024-07-30T17:49:21+00:00"
"time": "2025-02-04T11:13:26+00:00"
},
{
"name": "kelunik/certificate",
......
parameters:
ignoreErrors:
-
message: "#^Cannot call method pipe\\(\\) on int\\.$#"
count: 1
path: app/Commands/MusicCommand.php
-
message: "#^Calling the helper function 'value\\(\\)' without a closure as the first argument simply returns the first argument without doing anything$#"
count: 1
path: app/Music/SequenceMusic.php
ignoreErrors: []
......@@ -12,7 +12,7 @@ parameters:
tmpDir: build/phpstan
# checkOctaneCompatibility: true
# checkModelProperties: true
checkMissingIterableValueType: true
# checkMissingIterableValueType: true
# disallowFloatsEverywhere: true
# strictRules:
......
......@@ -4,8 +4,6 @@
<UndefinedVariable>
<code><![CDATA[$stdinKeyword]]></code>
</UndefinedVariable>
<UnusedVariable>
</UnusedVariable>
</file>
<file src="app/Music.php">
<UndefinedVariable>
......
......@@ -20,16 +20,16 @@
<issueHandlers>
<PropertyNotSetInConstructor errorLevel="info"/>
<UnusedVariable>
<!--<UnusedVariable>
<errorLevel type="suppress">
<file name="app/Commands/MusicCommand.php"/>
</errorLevel>
</UnusedVariable>
<InvalidAttribute>
</UnusedVariable>-->
<!--<InvalidAttribute>
<errorLevel type="suppress">
<file name="app/Support/helpers.php"/>
</errorLevel>
</InvalidAttribute>
</InvalidAttribute>-->
</issueHandlers>
<plugins>
<!--<pluginClass class="Psalm\LaravelPlugin\Plugin"/>-->
......
......@@ -29,7 +29,6 @@ use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
use Rector\Renaming\Rector\Name\RenameClassRector;
use Rector\Renaming\Rector\StaticCall\RenameStaticMethodRector;
use Rector\Renaming\Rector\String_\RenameStringRector;
use Rector\Set\ValueObject\DowngradeLevelSetList;
use Rector\Transform\Rector\MethodCall\MethodCallToStaticCallRector;
use Rector\Transform\ValueObject\MethodCallToStaticCall;
use RectorLaravel\Rector\MethodCall\UseComponentPropertyWithinCommandsRector;
......@@ -48,6 +47,7 @@ use RectorLaravel\Set\LaravelSetList;
// );
// })->call($rectorConfig, $rectorConfig);
/** @noinspection PhpUnhandledExceptionInspection */
return RectorConfig::configure()
->withPaths([
__DIR__.'/*.php',
......@@ -66,6 +66,7 @@ return RectorConfig::configure()
// ->withDeadCodeLevel(42)
// ->withTypeCoverageLevel(23)
// ->withFluentCallNewLine()
->withDowngradeSets(php82: true)
->withPhpSets(php82: true)
->withPreparedSets(
deadCode: true,
......@@ -81,7 +82,6 @@ return RectorConfig::configure()
phpunit: true
)
->withSets([
DowngradeLevelSetList::DOWN_TO_PHP_82,
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
......
......@@ -18,7 +18,7 @@ declare(strict_types=1);
namespace Tests\Unit;
use App\Music;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\TransferException;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Concurrency;
......@@ -29,7 +29,7 @@ it('can search songs', function (): void {
it('will throw ConnectException when download failed', function (): void {
app(Music::class)->setHttpClient(null)->download('foo.mp3', downloads_path('foo.mp3'));
})->group(__DIR__, __FILE__)->throws(ConnectException::class);
})->group(__DIR__, __FILE__)->throws(TransferException::class);
it('will download song', function (): void {
expect(app(Music::class))
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册