diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b3372484..b93c1e48 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -15,56 +15,8 @@ permissions:
jobs:
testsuite:
- runs-on: ubuntu-22.04
- continue-on-error: ${{ matrix.unstable }}
- strategy:
- fail-fast: false
- matrix:
- php-version: ['8.1']
- dependencies: [highest]
- unstable: [false]
- include:
- - php-version: '8.1'
- dependencies: lowest
- unstable: false
- - php-version: '8.2'
- dependencies: highest
- unstable: false
- - php-version: '8.3'
- dependencies: highest
- unstable: false
- - php-version: '8.4'
- dependencies: highest
- unstable: true
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Setup PHP
- uses: shivammathur/setup-php@v2
- with:
- php-version: ${{ matrix.php-version }}
- extensions: mbstring, intl
- ini-values: zend.assertions=1
- coverage: pcov
-
- - name: Composer install
- uses: ramsey/composer-install@v3
- with:
- dependency-versions: ${{ matrix.dependencies }}
- composer-options: ${{ matrix.composer-options }}
-
- - name: Run PHPUnit
- run: |
- if [[ ${{ matrix.php-version }} == '8.1' && ${{ matrix.dependencies }} == 'highest' ]]; then
- export CODECOVERAGE=1 && vendor/bin/phpunit --display-deprecations --display-warnings --display-incomplete --display-skipped --coverage-clover=coverage.xml
- else
- vendor/bin/phpunit --display-deprecations --display-warnings
- fi
-
- - name: Code Coverage Report
- if: success() && matrix.php-version == '8.1' && matrix.dependencies == 'highest'
- uses: codecov/codecov-action@v5
+ uses: cakephp/.github/.github/workflows/testsuite-without-db.yml@5.x
+ secrets: inherit
cs-stan:
uses: cakephp/.github/.github/workflows/cs-stan.yml@5.x
diff --git a/.phive/phars.xml b/.phive/phars.xml
index a655ee46..f5aa3300 100644
--- a/.phive/phars.xml
+++ b/.phive/phars.xml
@@ -1,5 +1,4 @@
-
-
+
diff --git a/.stickler.yml b/.stickler.yml
deleted file mode 100644
index 30472b32..00000000
--- a/.stickler.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-linters:
- phpcs:
- standard: CakePHP
diff --git a/composer.json b/composer.json
index b8f2301d..25d4ee34 100644
--- a/composer.json
+++ b/composer.json
@@ -59,12 +59,7 @@
"cs-check": "phpcs --colors --parallel=16 -p",
"cs-fix": "phpcbf --colors --parallel=16 -p",
"phpstan": "tools/phpstan analyse",
- "psalm": "tools/psalm --show-info=false",
- "psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
- "stan": [
- "@phpstan",
- "@psalm"
- ],
+ "stan": "@phpstan",
"stan-baseline": "tools/phpstan --generate-baseline",
"stan-setup": "phive install",
"test": "phpunit"
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
deleted file mode 100644
index 0de0d542..00000000
--- a/psalm-baseline.xml
+++ /dev/null
@@ -1,152 +0,0 @@
-
-
-
-
- array_filter
- date_default_timezone_get
- date_default_timezone_get
- iterator_to_array
-
-
- diffForHumans
- diffFormatter
- format
- format
- format
- format
- format
- format
- getTimestamp
- getTimezone
- getWeekendDays
- hasTestNow
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- safeCreateDateTimeZone
- toDateString
- toDateString
- toDateString
- toDateString
- toDateString
- toDateString
- toDateString
- tomorrow
- yesterday
-
-
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$weekEndsAt
- static::$weekEndsAt
- static::$weekStartsAt
- static::$weekStartsAt
-
-
- 'Y',
- 'yearIso' => 'o',
- 'month' => 'n',
- 'day' => 'j',
- 'hour' => 'G',
- 'minute' => 'i',
- 'second' => 's',
- 'micro' => 'u',
- 'microsecond' => 'u',
- 'dayOfWeek' => 'N',
- 'dayOfYear' => 'z',
- 'weekOfYear' => 'W',
- 'daysInMonth' => 't',
- 'timestamp' => 'U',
- ];]]>
-
-
- f]]>
-
-
- public static function createFromFormat(
-
-
-
-
- array_filter
- date_default_timezone_get
- iterator_to_array
-
-
- diffForHumans
- diffFormatter
- format
- getTestNow
- getWeekEndsAt
- getWeekEndsAt
- getWeekStartsAt
- getWeekStartsAt
- getWeekendDays
- hasTestNow
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- now
- tomorrow
- yesterday
-
-
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
- static::$days
-
-
- 'Y',
- 'yearIso' => 'o',
- 'month' => 'n',
- 'day' => 'j',
- 'dayOfWeek' => 'N',
- 'dayOfYear' => 'z',
- 'weekOfYear' => 'W',
- 'daysInMonth' => 't',
- ];]]>
-
-
-
diff --git a/psalm.xml b/psalm.xml
deleted file mode 100644
index 19b4ca20..00000000
--- a/psalm.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/src/Chronos.php b/src/Chronos.php
index 9c28ec0c..a46f1d39 100644
--- a/src/Chronos.php
+++ b/src/Chronos.php
@@ -56,8 +56,8 @@
* @property-read bool $utc checks if the timezone is UTC, true if UTC, false otherwise
* @property-read string $timezoneName
* @property-read string $tzName
- * @psalm-immutable
- * @psalm-consistent-constructor
+ * @immutable
+ * @phpstan-consistent-constructor
*/
class Chronos extends DateTimeImmutable implements Stringable
{
diff --git a/src/ChronosDate.php b/src/ChronosDate.php
index 8fb9e99a..85bad798 100644
--- a/src/ChronosDate.php
+++ b/src/ChronosDate.php
@@ -41,8 +41,8 @@
* @property-read int $age does a diffInYears() with default parameters
* @property-read int<1, 4> $quarter the quarter of this instance, 1 - 4
* @property-read int<1, 2> $half the half of the year, with 1 for months Jan...Jun and 2 for Jul...Dec.
- * @psalm-immutable
- * @psalm-consistent-constructor
+ * @immutable
+ * @phpstan-consistent-constructor
*/
class ChronosDate implements Stringable
{
@@ -354,10 +354,11 @@ public function modify(string $modifier): static
}
$new = clone $this;
- $new->native = $new->native->modify($modifier);
- if ($new->native === false) {
+ $native = $new->native->modify($modifier);
+ if ($native === false) {
throw new InvalidArgumentException(sprintf('Unable to modify date using `%s`', $modifier));
}
+ $new->native = $native;
if ($new->format('H:i:s') !== '00:00:00') {
$new->native = $new->native->setTime(0, 0, 0);
diff --git a/src/ChronosTime.php b/src/ChronosTime.php
index aa7b8c80..7d65dd2a 100644
--- a/src/ChronosTime.php
+++ b/src/ChronosTime.php
@@ -21,7 +21,7 @@
use Stringable;
/**
- * @psalm-consistent-constructor
+ * @phpstan-consistent-constructor
*/
class ChronosTime implements Stringable
{
diff --git a/tests/TestCase/TestCase.php b/tests/TestCase/TestCase.php
index 8029b822..688115f6 100644
--- a/tests/TestCase/TestCase.php
+++ b/tests/TestCase/TestCase.php
@@ -138,7 +138,6 @@ protected function withTimezone(string $tz, Closure $cb)
*/
public function deprecated(Closure $callable): void
{
- /** @var bool $deprecation Expand type for psalm */
$deprecation = false;
$previousHandler = set_error_handler(