Skip to content

Commit 1bc46de

Browse files
authored
Merge pull request #85 from samsonasik/php8
php 8 support
2 parents 7761cc3 + bcc4434 commit 1bc46de

10 files changed

Lines changed: 32 additions & 14 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor/
22
composer.lock
3-
.phpunit.result.cache
3+
.phpunit.result.cache
4+
.php_cs.cache

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
preset: recommended
2+
risky: true
23

34
enabled:
45
- strict

.travis.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
sudo: false
2-
dist: trusty
32
language: php
43

54
php:
6-
- 7.2
75
- 7.3
86
- 7.4
7+
- 8.0
98

109
before_install:
1110
- mkdir -p build/logs
1211
- composer self-update
1312

14-
install:
15-
- composer install
13+
install:
14+
- |
15+
if [ $(phpenv version-name) != '8.0' ]; then
16+
travis_retry composer install
17+
fi
18+
if [ $(phpenv version-name) == '8.0' ]; then
19+
travis_retry composer install --ignore-platform-req=php
20+
fi
1621
1722
script:
1823
- ./vendor/bin/phpunit --coverage-text

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ It is a Laminas module as session toolbar for [LaminasDeveloperTools](https://gi
2020

2121
You can reload, clear, add, update, and remove your sessions data.
2222

23-
> This is README for version ^3.0 which only support Laminas 3 with php ^7.2.
23+
> This is README for version ^4.0 which only support Laminas 3 with php ^7.3|~8.0.
24+
25+
> For version ^3.0, you can read at [version 3.x.x readme](https://github.com/samsonasik/SanSessionToolbar/blob/3.x.x/README.md) which support ZF3 and php ^7.2.
2426
2527
> For version 2.1.*, you can read at [version 2.1.* readme](https://github.com/samsonasik/SanSessionToolbar/blob/2.1.x/README.md) which support ZF3 and php ^7.2.
2628

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
}
1919
],
2020
"require": {
21-
"php": "^7.2",
21+
"php": "^7.3|~8.0",
2222
"laminas/laminas-json": "^2.5 || ^3.0",
2323
"laminas/laminas-mvc": "^3.0",
2424
"laminas/laminas-session": "^2.8.4"
@@ -30,7 +30,8 @@
3030
"laminas/laminas-mvc-plugin-flashmessenger": "^1.0",
3131
"laminas/laminas-router": "^3.0",
3232
"laminas/laminas-serializer": "^2.5",
33-
"laminas/laminas-test": "^3.0"
33+
"laminas/laminas-test": "^3.0",
34+
"phpspec/prophecy-phpunit": "^2.0"
3435
},
3536
"conflict": {
3637
"laminas/laminas-developer-tools": "<1.3.1 || >=2.0 <2.0.2"

test/Collector/SessionCollectorTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@
1919

2020
namespace SanSessionToolbarTest\Collector;
2121

22+
use Laminas\Mvc\MvcEvent;
23+
use Laminas\Session\Container;
2224
use PHPUnit\Framework\TestCase;
23-
use ReflectionProperty;
2425
use SanSessionToolbar\Collector\SessionCollector;
2526
use SanSessionToolbar\Manager\SessionManager;
26-
use Laminas\Mvc\MvcEvent;
27-
use Laminas\Session\Container;
2827

2928
/**
3029
* This class tests SessionCollector class.

test/Factory/Collector/SessionCollectorFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
namespace SanSessionToolbarTest\Factory\Collector;
2121

2222
use PHPUnit\Framework\TestCase;
23+
use Prophecy\PhpUnit\ProphecyTrait;
2324
use Psr\Container\ContainerInterface;
2425
use SanSessionToolbar\Factory\Collector\SessionCollectorFactory;
2526

@@ -30,6 +31,8 @@
3031
*/
3132
class SessionCollectorFactoryTest extends TestCase
3233
{
34+
use ProphecyTrait;
35+
3336
/** @var SessionCollectorFactory */
3437
protected $factory;
3538

test/Factory/Controller/SessionToolbarControllerFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
namespace SanSessionToolbarTest\Factory\Controller;
2121

2222
use PHPUnit\Framework\TestCase;
23+
use Prophecy\PhpUnit\ProphecyTrait;
2324
use Psr\Container\ContainerInterface;
2425
use SanSessionToolbar\Factory\Controller\SessionToolbarControllerFactory;
2526

@@ -30,6 +31,8 @@
3031
*/
3132
class SessionToolbarControllerFactoryTest extends TestCase
3233
{
34+
use ProphecyTrait;
35+
3336
/** @var SessionToolbarControllerFactory */
3437
protected $factory;
3538

test/Manager/SessionMangerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
namespace SanSessionToolbarTest\Manager;
2121

22+
use Laminas\Session\Container;
2223
use PHPUnit\Framework\TestCase;
2324
use SanSessionToolbar\Manager\SessionManager;
24-
use Laminas\Session\Container;
2525

2626
/**
2727
* This class tests SessionManager class.

test/ModuleTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,19 @@
1919

2020
namespace SanSessionToolbarTest;
2121

22-
use PHPUnit\Framework\TestCase;
23-
use SanSessionToolbar\Module;
2422
use Laminas\Session\Container;
2523
use Laminas\Stdlib\SplQueue;
24+
use PHPUnit\Framework\TestCase;
25+
use Prophecy\PhpUnit\ProphecyTrait;
26+
use SanSessionToolbar\Module;
2627

2728
/**
2829
* This class tests Module class.
2930
*/
3031
class ModuleTest extends TestCase
3132
{
33+
use ProphecyTrait;
34+
3235
/**
3336
* @var Module
3437
*/

0 commit comments

Comments
 (0)