Skip to content

Commit

Permalink
ci(scope): Update composer.json and add ractor-php82
Browse files Browse the repository at this point in the history
- Add @rector-php82-dry-run to the composer scripts
- Add ractor-php82.php configuration file
  • Loading branch information
guanguans committed Jan 13, 2025
1 parent 1bf9612 commit 9c1c7c3
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 2 deletions.
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@
],
"rector": "@php ./vendor/bin/rector --clear-cache --ansi -v",
"rector-dry-run": "@rector --dry-run",
"rector-php82": "@rector --config=rector-php82.php",
"rector-php82-dry-run": "@rector-php82 --dry-run",
"release": "@php ./vendor/bin/monorepo-builder release --ansi -v",
"release-major": "@release major",
"release-major-dry-run": "@release-major --dry-run",
Expand Down
2 changes: 1 addition & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<files psalm-version="5.26.1@d747f6500b38ac4f7dfc5edbcae6e4b637d7add0">
<file src="src/Foundation/Client.php">
<UndefinedDocblockClass>
<code><![CDATA[$this->synchronous(true)]]></code>
Expand Down
50 changes: 50 additions & 0 deletions rector-php82.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

declare(strict_types=1);

/**
* Copyright (c) 2021-2025 guanguans<[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* @see https://github.com/guanguans/notify
*/

use Rector\Config\RectorConfig;
use Rector\Php82\Rector\Param\AddSensitiveParameterAttributeRector;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->importNames(false, false);
$rectorConfig->importShortClasses(false);
$rectorConfig->parallel(240);
// $rectorConfig->disableParallel();
$rectorConfig->phpstanConfig(__DIR__.'/phpstan.neon');
$rectorConfig->phpVersion(PhpVersion::PHP_82);

$rectorConfig->paths([
__DIR__.'/src/*/Authenticator.php',
__DIR__.'/src/*/*/*Authenticator.php',
]);

$rectorConfig->skip([
__DIR__.'/src/Foundation/Support',
__DIR__.'/src/Foundation/Response.php',
]);

$rectorConfig->ruleWithConfiguration(AddSensitiveParameterAttributeRector::class, [
AddSensitiveParameterAttributeRector::SENSITIVE_PARAMETERS => [
'accessToken',
'apiKey',
'botApiKey',
'key',
'password',
'pushKey',
'secret',
'tempKey',
'token',
'webHook',
],
]);
};
7 changes: 6 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,15 @@
$rectorConfig->ruleWithConfiguration(AddSensitiveParameterAttributeRector::class, [
AddSensitiveParameterAttributeRector::SENSITIVE_PARAMETERS => [
'accessToken',
'apiKey',
'botApiKey',
'key',
'password',
'pushKey',
'secret',
'tempKey',
'token',
'webHook,',
'webHook',
],
]);

Expand Down

0 comments on commit 9c1c7c3

Please sign in to comment.