Skip to content

Commit

Permalink
Upgrade dev depedencices and wrkflow/php-get-typed-value to 0.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pionl committed Jul 25, 2023
1 parent 06543bc commit 11e2801
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"php-http/discovery": "^1.14",
"psr/http-client": "^1.0.1",
"psr/http-message": "^1.0.1",
"wrkflow/php-get-typed-value": "^0.8.0"
"wrkflow/php-get-typed-value": "^0.8.2"
},
"require-dev": {
"ext-simplexml": "*",
Expand All @@ -27,13 +27,13 @@
"league/flysystem": "^3.14",
"mockery/mockery": "^1.5.1",
"nyholm/psr7": "^1.8.0",
"phpstan/phpstan": "^1.10.14",
"phpstan/phpstan": "1.10.26",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-mockery": "^1.1.1",
"phpstan/phpstan-phpunit": "^1.3.11",
"phpunit/phpunit": "^9.5.20",
"rector/rector": "^0.15.25",
"symplify/easy-coding-standard": "^11.3.2"
"phpstan/phpstan-phpunit": "1.3.13",
"phpunit/phpunit": "9.5.21",
"rector/rector": "0.17.7",
"symplify/easy-coding-standard": "11.5.0"
},
"suggest": {
"laravel/framework": "SDKs work great with Laravel - solid container.",
Expand Down
11 changes: 6 additions & 5 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

declare(strict_types=1);

use Rector\CodingStyle\Rector\ClassConst\VarConstantCommentRector;
use Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\AbstractFalsyScalarRuleFixerRector;
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;

Expand All @@ -22,18 +21,20 @@
$config->import(SetList::CODING_STYLE);
$config->importNames();

$config->rule(rectorClass: AddVoidReturnTypeWhereNoReturnRector::class);
$config->ruleWithConfiguration(AddVoidReturnTypeWhereNoReturnRector::class, [
AddVoidReturnTypeWhereNoReturnRector::USE_PHPDOC => false,
]);
$config->ruleWithConfiguration(
rectorClass: BooleanInBooleanNotRuleFixerRector::class,
configuration: [
AbstractFalsyScalarRuleFixerRector::TREAT_AS_NON_EMPTY => false,
BooleanInBooleanNotRuleFixerRector::TREAT_AS_NON_EMPTY => false,
]
);

$config->skip([
AddVoidReturnTypeWhereNoReturnRector::class => [__DIR__ . '/src/Testing/Response.php'],
VarConstantCommentRector::class,
// Collides with ECS ClassAttributesSeparationFixer
NewlineAfterStatementRector::class,
SimplifyBoolIdenticalTrueRector::class,
]);
};
11 changes: 6 additions & 5 deletions src/Laravel/LaravelServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function boot(): void
}
}

public static function getConfig(Container $container): ApiSdkConfig
protected static function getConfig(Container $container): ApiSdkConfig
{
return $container->make(ApiSdkConfig::class);
}
Expand Down Expand Up @@ -127,7 +127,7 @@ protected function bindLogs(): void
$this->app->singleton(
abstract: FileLogger::class,
concrete: static fn (Application $application) => new FileLogger(
filesystemOperator: self::getFileSystemOperator($application),
filesystemOperator: static::getFileSystemOperator($application),
logger: $application->make(LoggerInterface::class),
fileLogPathService: $application->make(FileLogPathService::class),
getExtensionFromContentTypeAction: $application->make(GetExtensionFromContentTypeAction::class),
Expand All @@ -136,7 +136,7 @@ protected function bindLogs(): void
);

$this->app->bind(ClearFileLogsAction::class, static fn (Application $application) => new ClearFileLogsAction(
filesystemOperator: self::getFileSystemOperator($application),
filesystemOperator: static::getFileSystemOperator($application),
fileLogPathService: $application->make(FileLogPathService::class),
logger: $application->make(LoggerInterface::class),
));
Expand Down Expand Up @@ -193,10 +193,11 @@ protected function passEventsToTelescopeHttpCatcher(ApiSdkConfig $config): void
);
}

private static function getFileSystemOperator(Application $application): FilesystemOperator
protected static function getFileSystemOperator(Application $application): FilesystemOperator
{
/** @var FilesystemManager $fileManager */
$fileManager = $application->make(FilesystemManager::class);
assert($fileManager instanceof FilesystemManager);

$disk = $fileManager->disk();
if ($disk instanceof FilesystemAdapter === false) {
throw new LogicException(
Expand Down

0 comments on commit 11e2801

Please sign in to comment.