diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e422fff..ba1d512 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,55 +1,55 @@ name: Build on: - push: - branches: - - master - pull_request: - branches: - - master + push: + branches: + - master + pull_request: + branches: + - master jobs: - build: - name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }} - strategy: - fail-fast: false - matrix: - operating-system: [ubuntu-latest] - php-versions: ['7.4', '8.0', '8.1', '8.2'] - composer-args: ['', '--prefer-lowest'] - runs-on: ${{ matrix.operating-system }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Setup PHP - uses: shivammathur/setup-php@2.25.1 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring - coverage: pcov - tools: cs2pr - - name: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Get composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - name: Cache dependencies - uses: actions/cache@v3 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-${{ hashFiles('**/composer.json') }} - restore-keys: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}- - - name: Install Dependencies - run: | - composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }} - - name: PHPStan - run: composer phpstan - - name: Code Style Check - env: - PHP_CS_FIXER_IGNORE_ENV: true - run: composer style-check -- --format=checkstyle | cs2pr - - name: Test - run: composer test-with-coverage - - name: Upload Coverage - uses: codecov/codecov-action@v3 - with: - files: ./clover.xml - verbose: true + build: + name: PHP ${{ matrix.php-versions }} ${{ matrix.composer-args }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest] + php-versions: ["8.0", "8.1", "8.2", "8.3"] + composer-args: ["", "--prefer-lowest"] + runs-on: ${{ matrix.operating-system }} + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup PHP + uses: shivammathur/setup-php@2.30.2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring + coverage: pcov + tools: cs2pr + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Get composer cache directory + id: composer-cache + run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT + - name: Cache dependencies + uses: actions/cache@v3 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}-${{ hashFiles('**/composer.json') }} + restore-keys: php${{ matrix.php-versions }}-composer-${{ matrix.composer-args }}- + - name: Install Dependencies + run: | + composer update --no-progress --no-suggest --prefer-stable --optimize-autoloader ${{ matrix.composer-args }} + - name: PHPStan + run: composer phpstan + - name: Code Style Check + env: + PHP_CS_FIXER_IGNORE_ENV: true + run: composer style-check -- --format=checkstyle | cs2pr + - name: Test + run: composer test-with-coverage + - name: Upload Coverage + uses: codecov/codecov-action@v3 + with: + files: ./clover.xml + verbose: true diff --git a/.gitignore b/.gitignore index 4a3d63d..b5db36b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ .php_cs.cache .phpunit.result.cache .php-cs-fixer.cache -/tests/Zend/_files \ No newline at end of file +/tests/Zend/_files +.phpunit.cache \ No newline at end of file diff --git a/composer.json b/composer.json index 72ff6a6..93b701c 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "license": "BSD-3-Clause", "require": { "ext-iconv": "*", - "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", "diablomedia/zendframework1-exception": "^1.0.0", "diablomedia/zendframework1-cache": "^1.0.0", "diablomedia/zendframework1-loader": "^1.0.0", @@ -32,9 +32,9 @@ } }, "require-dev": { - "phpunit/phpunit": "^9.5.10", - "phpstan/phpstan": "1.10.15", - "friendsofphp/php-cs-fixer": "3.16.0", + "phpunit/phpunit": "^9.6.19 || ^10.5.18", + "phpstan/phpstan": "1.10.67", + "friendsofphp/php-cs-fixer": "3.53.0", "maglnet/composer-require-checker": "^3.0.0", "phpro/grumphp-shim": "^1.5.0" }, diff --git a/phpstan.neon b/phpstan.neon index 1377bca..a7c9488 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -19,9 +19,6 @@ parameters: - message: '#Binary operation "-" between string and [\d] results in an error\.#' path: %currentWorkingDirectory%/src/Zend/Date.php - - - message: '#Binary operation "\+" between [\d]+ and string results in an error\.#' - path: %currentWorkingDirectory%/src/Zend/Date.php - message: '#Binary operation "-=" between string and [\d]+ results in an error\.#' path: %currentWorkingDirectory%/src/Zend/Date.php diff --git a/phpunit.xml.dist b/phpunit.xml.dist index d55ddf3..d97fc9c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,13 +1,25 @@ - - - - ./src - - + ./tests + + + ./src + +