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

GitHub actions phpunit on php 8.2 & Fix bug on php 8.2 #275

Merged
merged 3 commits into from
Nov 16, 2022
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: 14 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,20 @@ name: PHPUnit-9
on: [push, pull_request]

jobs:
phpunit-php82:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download phpunit
run: |
wget -O phpunit https://phar.phpunit.de/phpunit-9.5.26.phar
chmod +x phpunit
shell: bash
- name: PHPUnit 9 on php 8.2
uses: docker://php:8.2-rc-cli-alpine
with:
args: -d memory_limit=-1 ./phpunit --bootstrap tests/TestHelper.php tests/Zend/AllTests.php
phpunit-php81:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/LocaleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ protected function tearDown(): void
$locales = [];
foreach (explode(';', $this->_locale) as $l) {
$tmp = explode('=', $l);
$locales[$tmp[0]] = $tmp[1];
$locales[$tmp[0]] = count($tmp) > 1 ? $tmp[1] : $tmp[0];
}
setlocale(LC_ALL, $locales);
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
function firstOne()
{
$substitute = "Testing";
$varA = "${substitute} 123!";
$varA = "{$substitute} 123!";
$varB = "{$substitute} 123!";
$varC = "$substitute 123!";
$varD = "${substitute}";
$varD = "{$substitute}";
}

function secondOne()
Expand Down
2 changes: 1 addition & 1 deletion tests/Zend/Validate/FloatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function tearDown(): void
$locales = [];
foreach (explode(';', $this->_locale) as $l) {
$tmp = explode('=', $l);
$locales[$tmp[0]] = $tmp[1];
$locales[$tmp[0]] = count($tmp) > 1 ? $tmp[1] : $tmp[0];
}
setlocale(LC_ALL, $locales);
return;
Expand Down