Skip to content

Commit

Permalink
Added support for PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiang committed Feb 2, 2024
1 parent 6d7db22 commit 9c3211d
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 58 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/static.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,39 @@ jobs:
files: "**.php" # you may customize glob as needed
phpcs_path: php phpcs.phar
standard: phpcs.xml

unittest:
runs-on: ubuntu-latest

strategy:
matrix:
php_version: ['7.4', '8.0', '8.1', '8.2', '8.3']
prefer-lowest: ['', '--prefer-lowest']

name: Unit Tests - PHP ${{ matrix.php_version }} ${{ matrix.prefer-lowest }}

steps:
- uses: actions/checkout@v3

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_version }}

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer update --prefer-dist --no-progress --with-all-dependencies ${{ matrix.prefer-lowest }}

- name: Run test suite
run: ./vendor/bin/phpunit --verbose --order-by=random
45 changes: 0 additions & 45 deletions .github/workflows/unit.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ language in the MvcTranslator.
[![Latest Stable Version](http://poser.pugx.org/fabiang/laminas-language-route/v)](https://packagist.org/packages/fabiang/laminas-language-route)
[![PHP Version Require](http://poser.pugx.org/fabiang/laminas-language-route/require/php)](https://packagist.org/packages/fabiang/laminas-language-route)
[![License](http://poser.pugx.org/fabiang/laminas-language-route/license)](https://packagist.org/packages/fabiang/laminas-language-route)
[![Static Code Analysis](https://github.com/fabiang/laminas-language-route/actions/workflows/static.yml/badge.svg)](https://github.com/fabiang/laminas-language-route/actions/workflows/static.yml)
[![Unit Tests](https://github.com/fabiang/laminas-language-route/actions/workflows/unit.yml/badge.svg)](https://github.com/fabiang/laminas-language-route/actions/workflows/unit.yml)
[![Continuous Integration](https://github.com/fabiang/laminas-language-route/actions/workflows/ci.yml/badge.svg)](https://github.com/fabiang/laminas-language-route/actions/workflows/ci.yml)

## Installation

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
}
},
"require": {
"php": "^7.4 || 8.0.* || 8.1.*",
"php": "^7.4 || 8.0.* || 8.1.* || ~8.2.0 || ~8.3.0",
"laminas/laminas-mvc": "^2.7.10 || ^3.0.1",
"laminas/laminas-servicemanager": "^3.1",
"laminas/laminas-eventmanager": "^3.0.1",
"laminas/laminas-modulemanager": "^2.7.2 || ^3.0",
"laminas/laminas-mvc-i18n": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^9.5 || ^10.0",
"phpspec/prophecy-phpunit": "^2.0",
"vimeo/psalm": "^4.22",
"squizlabs/php_codesniffer": "^3.6",
Expand Down
2 changes: 1 addition & 1 deletion src/Listener/Service/RouteListenerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

use Fabiang\LaminasLanguageRoute\Listener\RouteListener;
use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Psr\Container\ContainerInterface;

final class RouteListenerFactory implements FactoryInterface
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@

use Fabiang\LaminasLanguageRoute\Mvc\Router\Http\LanguageTreeRouteStack;
use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Interop\Container\ContainerInterface;
use Laminas\Router\RouteStackInterface;
use Laminas\ServiceManager\Factory\DelegatorFactoryInterface;
use Psr\Container\ContainerInterface;

final class LanguageTreeRouteStackDelegatorFactory implements DelegatorFactoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Options/Service/LanguageRouteOptionsFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
namespace Fabiang\LaminasLanguageRoute\Options\Service;

use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Psr\Container\ContainerInterface;

final class LanguageRouteOptionsFactory implements FactoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/Service/LanguageSwitchFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Fabiang\LaminasLanguageRoute\View\Helper\LanguageSwitch;
use Interop\Container\ContainerInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;
use Psr\Container\ContainerInterface;

final class LanguageSwitchFactory implements FactoryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Listener/Service/RouteListenerFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

use Fabiang\LaminasLanguageRoute\Listener\RouteListener;
use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Interop\Container\ContainerInterface;
use Laminas\Authentication\AuthenticationServiceInterface;
use Laminas\I18n\Translator\TranslatorInterface;
use Laminas\Router\RouteStackInterface;
use Laminas\Stdlib\RequestInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

/**
* @coversDefaultClass \Fabiang\LaminasLanguageRoute\Listener\Service\RouteListenerFactory
Expand Down
2 changes: 1 addition & 1 deletion tests/src/ModuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

use Fabiang\LaminasLanguageRoute\Listener\RouteListener;
use Fabiang\LaminasLanguageRoute\Mvc\Router\Http\LanguageTreeRouteStack;
use Interop\Container\ContainerInterface;
use Laminas\EventManager\EventManagerInterface;
use Laminas\EventManager\ListenerAggregateInterface;
use Laminas\Mvc\ApplicationInterface;
use Laminas\Mvc\MvcEvent;
use PHPUnit\Framework\TestCase;
use Prophecy\Argument;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

/**
* @coversDefaultClass \Fabiang\LaminasLanguageRoute\Module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@

use Fabiang\LaminasLanguageRoute\Mvc\Router\Http\LanguageTreeRouteStack;
use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Interop\Container\ContainerInterface;
use Laminas\Authentication\AuthenticationServiceInterface;
use Laminas\Router\RouteStackInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

/**
* @coversDefaultClass \Fabiang\LaminasLanguageRoute\Mvc\Router\Http\Service\LanguageTreeRouteStackDelegatorFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
namespace Fabiang\LaminasLanguageRoute\Options\Service;

use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Interop\Container\ContainerInterface;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

/**
* @coversDefaultClass \Fabiang\LaminasLanguageRoute\Options\Service\LanguageRouteOptionsFactory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@

use Fabiang\LaminasLanguageRoute\Options\LanguageRouteOptions;
use Fabiang\LaminasLanguageRoute\View\Helper\LanguageSwitch;
use Interop\Container\ContainerInterface;
use Laminas\Mvc\Application;
use Laminas\Mvc\MvcEvent;
use Laminas\Router\Http\RouteMatch;
use PHPUnit\Framework\TestCase;
use Prophecy\PhpUnit\ProphecyTrait;
use Psr\Container\ContainerInterface;

/**
* @coversDefaultClass \Fabiang\LaminasLanguageRoute\View\Helper\Service\LanguageSwitchFactory
Expand Down

0 comments on commit 9c3211d

Please sign in to comment.