From e85b30489c9e88e5f6e327b7e08cd42ad85a3a9b Mon Sep 17 00:00:00 2001 From: mamazu <14860264+mamazu@users.noreply.github.com> Date: Sat, 21 Mar 2026 22:01:38 +0100 Subject: [PATCH 1/3] Adding an age filter to the breakpoint command --- src/Command/BreakPointCommand.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Command/BreakPointCommand.php b/src/Command/BreakPointCommand.php index 5dc93ac..b9a16f7 100644 --- a/src/Command/BreakPointCommand.php +++ b/src/Command/BreakPointCommand.php @@ -24,9 +24,10 @@ public function __construct( /** * @param bool $dev Focus on dev packages only * @param int $limit Maximum number of outdated major version packages + * @param int $minDays Minimum number of days a release has to be old to be considered outdated * @param string[] $ignore Ignore packages by name, e.g. "symfony/" or "symfony/console" */ - public function run(bool $dev = false, int $limit = 5, array $ignore = []): int + public function run(bool $dev = false, int $limit = 5, int $minDays = 0, array $ignore = []): int { $this->outputPrinter->green('Analyzing "composer.json" for major and minor outdated packages'); @@ -40,16 +41,26 @@ public function run(bool $dev = false, int $limit = 5, array $ignore = []): int } $composerJsonFilePath = getcwd() . '/composer.json'; + $now = new \DateTimeImmutable(); $outdatedComposer = $this->outdatedComposerFactory->createOutdatedComposer( array_filter( $responseJson[ComposerKey::INSTALLED_KEY], - static function (array $package) use ($ignore): bool { + static function (array $package) use ($ignore, $minDays, $now): bool { foreach ($ignore as $ignoredPackage) { if (str_contains((string) $package['name'], $ignoredPackage)) { return false; } } + if ($minDays === 0) { + return true; + } + + $pageAgeInDays = (new \DateTimeImmutable($package['latest-release-date']))->diff($now)->days; + if ($pageAgeInDays < $minDays) { + return false; + } + return true; } ), From 2dd5a1562dd930a2e7e7ce7109fa7949726763fa Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 29 Apr 2026 00:36:58 +0200 Subject: [PATCH 2/3] fix packages --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index afed573..d5fafdc 100644 --- a/composer.json +++ b/composer.json @@ -10,14 +10,14 @@ "composer/semver": "^3.4", "entropy/entropy": "dev-main", "nette/utils": "^4.1", - "symfony/process": "^7.4", + "symfony/process": "^8.0", "webmozart/assert": "^2.0" }, "require-dev": { "phpecs/phpecs": "^2.2", "phpstan/extension-installer": "^1.4", "phpstan/phpstan": "^2.1", - "phpunit/phpunit": "^12.5", + "phpunit/phpunit": "^13.0", "rector/rector": "^2.2", "rector/swiss-knife": "^2.3", "shipmonk/composer-dependency-analyser": "^1.8", From cde00d469f0fe0e557831c3d6690b1b43a63d9fe Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Wed, 29 Apr 2026 00:38:37 +0200 Subject: [PATCH 3/3] bump to PHP 8.4 --- .github/workflows/code_analysis.yaml | 2 +- .github/workflows/downgraded_release.yaml | 2 +- composer.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index 88ff931..177fa6c 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -60,7 +60,7 @@ jobs: # see https://github.com/shivammathur/setup-php - uses: shivammathur/setup-php@v2 with: - php-version: 8.3 + php-version: 8.4 coverage: none # composer install cache - https://github.com/ramsey/composer-install diff --git a/.github/workflows/downgraded_release.yaml b/.github/workflows/downgraded_release.yaml index bb50235..f783c4e 100644 --- a/.github/workflows/downgraded_release.yaml +++ b/.github/workflows/downgraded_release.yaml @@ -19,7 +19,7 @@ jobs: - uses: "shivammathur/setup-php@v2" with: - php-version: 8.3 + php-version: 8.4 coverage: none # invoke patches diff --git a/composer.json b/composer.json index d5fafdc..00d407f 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "bin/jack" ], "require": { - "php": ">=8.3", + "php": ">=8.4", "composer/semver": "^3.4", "entropy/entropy": "dev-main", "nette/utils": "^4.1",