Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
],
"require": {
"php": ">=8.4",
"composer/semver": "^3.4",
"composer/semver": "^3.5",
"entropy/entropy": "^0.4.17",
"symfony/process": "^8.1"
},
"require-dev": {
"symplify/easy-coding-standard": "^13.2",
"symplify/easy-coding-standard": "^13.3",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.2",
"phpunit/phpunit": "^13.2",
"rector/rector": "^2.4",
"rector/swiss-knife": "^2.4",
"phpunit/phpunit": "^13.3",
"rector/rector": "^2.6",
"rector/swiss-knife": "^2.6",
"shipmonk/composer-dependency-analyser": "^1.8",
"symplify/phpstan-rules": "^14.11",
"tomasvotruba/class-leak": "^2.1",
"symplify/phpstan-rules": "^14.17",
"tomasvotruba/class-leak": "^2.3",
"tracy/tracy": "^2.12"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
use Symplify\EasyCodingStandard\Config\ECSConfig;

return ECSConfig::configure()
->withPreparedSets(psr12: true, common: true, symplify: true)
->withPreparedSets(psr12: true, common: true, perCs: true)
->withPaths([__DIR__ . '/src', __DIR__ . '/tests'])
->withRootFiles();
3 changes: 1 addition & 2 deletions src/Command/BreakPointCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ public function __construct(
private OutdatedComposerFactory $outdatedComposerFactory,
private ComposerOutdatedResponseProvider $composerOutdatedResponseProvider,
private OutputPrinter $outputPrinter,
) {
}
) {}

/**
* @param bool $dev Focus on dev packages only
Expand Down
3 changes: 1 addition & 2 deletions src/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
{
public function __construct(
private Container $container,
) {
}
) {}

public function run(): int
{
Expand Down
3 changes: 1 addition & 2 deletions src/Command/OpenVersionsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ public function __construct(
private ComposerOutdatedResponseProvider $composerOutdatedResponseProvider,
private OpenVersionsComposerProcessor $openVersionsComposerProcessor,
private OutputPrinter $outputPrinter,
) {
}
) {}

/**
* @param int $limit How many packages to open-up
Expand Down
3 changes: 1 addition & 2 deletions src/Command/RaiseToInstalledCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
public function __construct(
private RaiseToInstalledComposerProcessor $raiseToInstalledComposerProcessor,
private OutputPrinter $outputPrinter,
) {
}
) {}

/**
* @return ExitCode::*
Expand Down
3 changes: 1 addition & 2 deletions src/Composer/NextVersionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@

public function __construct(
private VersionParser $versionParser
) {
}
) {}

public function resolve(string $packageName, string $composerVersion): string
{
Expand Down
3 changes: 1 addition & 2 deletions src/ComposerProcessor/OpenVersionsComposerProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
{
public function __construct(
private NextVersionResolver $nextVersionResolver
) {
}
) {}

public function process(
string $composerJsonContents,
Expand Down
3 changes: 1 addition & 2 deletions src/ComposerProcessor/RaiseToInstalledComposerProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
public function __construct(
private VersionParser $versionParser,
private InstalledVersionResolver $installedVersionResolver,
) {
}
) {}

public function process(string $composerJsonContents): ChangedPackageVersionsResult
{
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/ContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function create(): Container
// register with container itself, so the help printer can be resolved lazily without circular dependency
$container->service(
ListCommand::class,
static fn (Container $container): ListCommand => new ListCommand($container)
static fn(Container $container): ListCommand => new ListCommand($container)
);

$container->autodiscover(__DIR__ . '/../../src');
Expand Down
4 changes: 1 addition & 3 deletions src/Exception/ShouldNotHappenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@

use Exception;

final class ShouldNotHappenException extends Exception
{
}
final class ShouldNotHappenException extends Exception {}
5 changes: 2 additions & 3 deletions src/OutdatedComposerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
{
public function __construct(
private OutdatedPackageMapper $outdatedPackageMapper
) {
}
) {}

/**
* @param mixed[] $installedPackages
Expand All @@ -30,7 +29,7 @@ public function createOutdatedComposer(array $installedPackages, string $compose
// filter out false positives, where the latest version is the same as the current one
$nonDevOutdatedPackages = array_filter(
$outdatedPackages,
fn (OutdatedPackage $outdatedPackage): bool => ! $outdatedPackage->lastestIsDevBranch()
fn(OutdatedPackage $outdatedPackage): bool => ! $outdatedPackage->lastestIsDevBranch()
&& ! VersionComparator::areVersionsEqual(
$outdatedPackage->getCurrentVersion(),
$outdatedPackage->getLatestVersion()
Expand Down
4 changes: 1 addition & 3 deletions src/ValueObject/ChangedPackageVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ public function __construct(
private string $packageName,
private string $oldVersion,
private string $newVersion,
) {

}
) {}

public function getPackageName(): string
{
Expand Down
6 changes: 3 additions & 3 deletions src/ValueObject/OutdatedComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getProdPackages(): array
{
return array_filter(
$this->outdatedPackages,
fn (OutdatedPackage $outdatedPackage): bool => $outdatedPackage->isProd()
fn(OutdatedPackage $outdatedPackage): bool => $outdatedPackage->isProd()
);
}

Expand All @@ -45,7 +45,7 @@ public function getDevPackages(): array
{
return array_filter(
$this->outdatedPackages,
fn (OutdatedPackage $outdatedPackage): bool => ! $outdatedPackage->isProd()
fn(OutdatedPackage $outdatedPackage): bool => ! $outdatedPackage->isProd()
);
}

Expand Down Expand Up @@ -79,7 +79,7 @@ public function getPackagesShuffled(bool $onlyDev, ?string $packagePrefix): arra
if ($packagePrefix !== null) {
return array_filter(
$outdatedPackages,
fn (OutdatedPackage $outdatedPackage): bool => str_starts_with(
fn(OutdatedPackage $outdatedPackage): bool => str_starts_with(
$outdatedPackage->getName(),
$packagePrefix
)
Expand Down
3 changes: 1 addition & 2 deletions src/ValueObject/OutdatedPackage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ public function __construct(
private string $latestVersion,
// nullable on composer 2.7-
private ?string $currentVersionAge,
) {
}
) {}

public function getName(): string
{
Expand Down
Loading