Skip to content

Commit

Permalink
Merge pull request #84 from mkoprek/add_support_for_php_84
Browse files Browse the repository at this point in the history
Add support for PHP 8.4.0
  • Loading branch information
gsteel authored Dec 17, 2024
2 parents 719efc9 + b2e85b4 commit a9910eb
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 90 deletions.
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
4 changes: 2 additions & 2 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);
}
}

0 comments on commit a9910eb

Please sign in to comment.