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

Merge release 3.6.4 into 3.7.x #47

Merged
merged 4 commits into from
Dec 29, 2021
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
32 changes: 30 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
id: matrix
uses: laminas/laminas-ci-matrix-action@v1

qa:
qa-ubuntu:
name: QA Checks
needs: [matrix]
runs-on: ${{ matrix.operatingSystem }}
Expand All @@ -30,4 +30,32 @@ jobs:
- name: ${{ matrix.name }}
uses: laminas/laminas-continuous-integration-action@v1
with:
job: ${{ matrix.job }}
job: ${{ matrix.job }}

qa-alpine:
name: QA Checks (PHPUnit on PHP 8.1 with Alpine Linux)
runs-on: ubuntu-latest
container:
image: php:8.1-alpine
steps:
- name: Show Alpine and PHP versions
run: |
cat /etc/os-release
php -v
- name: Install packages and PHP extensions
run: |
apk add git oniguruma-dev libxml2-dev
docker-php-ext-install mbstring
docker-php-ext-install xml
- name: Checkout
uses: actions/checkout@v2
- name: Install composer
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === '906a84df04cea2aa72f40b5f787e49f22d4c2f19492ac310e8cba5b96ac8b64115ac402c8cd292b8a03482574915d1a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
- name: Install latest dependencies
run: php composer.phar update --ignore-platform-req=php
- name: PHPUnit
run: ./vendor/bin/phpunit
2 changes: 1 addition & 1 deletion src/Glob.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected static function systemGlob($pattern, $flags)
*/
protected static function fallbackGlob($pattern, $flags)
{
if (self::flagsIsEqualTo($flags, self::GLOB_BRACE)) {
if (! self::flagsIsEqualTo($flags, self::GLOB_BRACE)) {
return static::systemGlob($pattern, $flags);
}

Expand Down
17 changes: 17 additions & 0 deletions test/StringWrapper/IconvTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

use function array_shift;
use function extension_loaded;
use function file_exists;
use function file_get_contents;
use function is_readable;
use function stripos;

class IconvTest extends CommonStringWrapperTest
{
Expand All @@ -24,6 +28,19 @@ protected function setUp(): void
}
}

/**
* ext-iconv is not properly supported on Alpine Linux, hence, we skip the tests for now
*
* @see https://github.com/nunomaduro/phpinsights/issues/43
* @see https://github.com/docker-library/php/issues/240#issuecomment-353678474
*/
if (file_exists('/etc/os-release') && is_readable('/etc/os-release')) {
$osRelease = file_get_contents('/etc/os-release');
if (stripos($osRelease, 'Alpine Linux') !== false) {
$this->markTestSkipped('iconv not properly supported on Alpine Linux');
}
}

parent::setUp();
}

Expand Down