Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PHP 8.4.0 #84

Open
wants to merge 22 commits into
base: 1.27.x
Choose a base branch
from
Open
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
15 changes: 0 additions & 15 deletions .laminas-ci/install-apcu-extension-via-pecl.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .laminas-ci/install-memcached-extension-via-pecl.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .laminas-ci/install-mongodb-extension-via-pecl.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .laminas-ci/install-redis-extension-via-pecl.sh

This file was deleted.

6 changes: 0 additions & 6 deletions .laminas-ci/pre-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ WORKING_DIRECTORY=$2
JOB=$3
PHP_VERSION=$(echo "${JOB}" | jq -r '.php')


if [ ! -z "$GITHUB_BASE_REF" ] && [[ "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9] ]]; then
readarray -td. TARGET_BRANCH_VERSION_PARTS <<<"${GITHUB_BASE_REF}.";
unset 'TARGET_BRANCH_VERSION_PARTS[-1]';
Expand All @@ -15,8 +14,3 @@ if [ ! -z "$GITHUB_BASE_REF" ] && [[ "$GITHUB_BASE_REF" =~ ^[0-9]+\.[0-9] ]]; th
export COMPOSER_ROOT_VERISON="${MAJOR_OF_TARGET_BRANCH}.${MINOR_OF_TARGET_BRANCH}.99"
echo "Exported COMPOSER_ROOT_VERISON as ${COMPOSER_ROOT_VERISON}"
fi

${WORKING_DIRECTORY}/.laminas-ci/install-mongodb-extension-via-pecl.sh "${PHP_VERSION}" || exit 1
${WORKING_DIRECTORY}/.laminas-ci/install-apcu-extension-via-pecl.sh "${PHP_VERSION}" || exit 1
${WORKING_DIRECTORY}/.laminas-ci/install-memcached-extension-via-pecl.sh "${PHP_VERSION}" || exit 1
${WORKING_DIRECTORY}/.laminas-ci/install-redis-extension-via-pecl.sh "${PHP_VERSION}" || exit 1
25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,27 @@
}
},
"require": {
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0",
"enlightn/security-checker": "^1.10"
},
"require-dev": {
"doctrine/migrations": "^2.0 || ^3.5.2",
"guzzlehttp/guzzle": "^7.5.0",
"doctrine/migrations": "^2.0 || ^3.8.2",
"guzzlehttp/guzzle": "^7.9.2",
"laminas/laminas-coding-standard": "~2.5.0",
"laminas/laminas-loader": "^2.9",
"mikey179/vfsstream": "^1.6.11",
"php-amqplib/php-amqplib": "^2.0 || ^3.4",
"phpunit/phpunit": "^9.5.26",
"psalm/plugin-phpunit": "^0.18.3",
"predis/predis": "^2.0.3",
"symfony/yaml": "^6.0.14 || ^7.0.0",
"vimeo/psalm": "^4.29.0"
"laminas/laminas-loader": "^2.11",
"mikey179/vfsstream": "^1.6.12",
"php-amqplib/php-amqplib": "^2.0 || ^3.7.2",
"phpunit/phpunit": "^9.6.21",
"predis/predis": "^2.3.0",
"psalm/plugin-phpunit": "^0.18.4",
"symfony/yaml": "^6.4.13 || ^7.0.0",
"vimeo/psalm": "^4.30.0"
},
"conflict": {
"guzzlehttp/ringphp": "<1.1.1",
"guzzlehttp/promises": "<2.0.4",
"symfony/finder": "<5.3.7",
"symfony/process": "<5.3.7",
"symfony/process": "<5.4.46",
"zendframework/zenddiagnostics": "*"
},
"suggest": {
Expand Down
28 changes: 14 additions & 14 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions test/RunnerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

use function is_string;

use const E_USER_ERROR;
use const E_WARNING;
use const PHP_MAJOR_VERSION;

Expand Down Expand Up @@ -347,13 +346,13 @@ public function testPHPWarningResultsInFailure(): void

public function testPHPUserErrorResultsInFailure(): void
{
$check = new TriggerUserError('error', E_USER_ERROR);
$check = new TriggerUserError('error');
$this->runner->addCheck($check);
$results = $this->runner->run();

self::assertInstanceOf(Failure::class, $results[$check]);
self::assertInstanceOf(ErrorException::class, $results[$check]->getData());
self::assertSame(E_USER_ERROR, $results[$check]->getData()->getSeverity());
self::assertSame((new ErrorException())->getSeverity(), $results[$check]->getData()->getSeverity());
}

public function testBreakOnFirstFailure(): void
Expand Down
10 changes: 3 additions & 7 deletions test/TestAsset/Check/TriggerUserError.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@

namespace LaminasTest\Diagnostics\TestAsset\Check;

use ErrorException;
use Laminas\Diagnostics\Check\AbstractCheck;

use function trigger_error;

final class TriggerUserError extends AbstractCheck
{
/** @var ?string */
protected $label = '';

public function __construct(private string $message, private int $severity, private bool $result = true)
public function __construct(private string $message, private bool $result = true)
{
}

/** @return bool */
public function check()
{
trigger_error($this->message, $this->severity);

return $this->result;
throw new ErrorException($this->message);
}
}