Skip to content

Commit 99a5b7d

Browse files
committed
Merge branch 'migrate-to-laminas'
* migrate-to-laminas: add php 7.3 and 7.4 naming remove dependency plugin normalize composer.json retry dep try replace dependency plugin req migrate to laminas
2 parents 5c42168 + 8a11618 commit 99a5b7d

File tree

9 files changed

+46
-40
lines changed

9 files changed

+46
-40
lines changed

.travis.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@ matrix:
1414
- php: 7.2
1515
env:
1616
- DEPS=latest
17-
- php: nightly
18-
env:
19-
- DEPS=lowest
20-
- php: nightly
21-
env:
22-
- DEPS=latest
23-
allow_failures:
24-
- php: nightly
17+
- php: 7.3
18+
env:
19+
- DEPS=lowest
20+
- php: 7.3
21+
env:
22+
- DEPS=latest
23+
- php: 7.4
24+
env:
25+
- DEPS=lowest
26+
- php: 7.4
27+
env:
28+
- DEPS=latest
2529

2630
before_script:
2731
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable --no-interaction ; fi

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ CONTRIBUTING
33
To contribute, you can send pull requests with :
44

55
- Typo fix.
6-
- Use [Zend Coding Standard](https://github.com/zendframework/zend-coding-standard).
6+
- Use [Laminas Coding Standard](https://github.com/laminas/laminas-coding-standard).
77
- patch(es) need new/updated test(s).
88
- new feature(s) need test(s).
99

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ RedirectHandlerModule
77
[![Coverage Status](https://coveralls.io/repos/samsonasik/RedirectHandlerModule/badge.svg?branch=master)](https://coveralls.io/r/samsonasik/RedirectHandlerModule)
88
[![Downloads](https://poser.pugx.org/samsonasik/redirect-handler-module/downloads)](https://packagist.org/packages/samsonasik/redirect-handler-module)
99

10-
*RedirectHandlerModule* is a module for handling redirect when the given url to redirect plugin is not registered in your ZF application. It simply override existing ZF redirect plugin, so we can just use it.
10+
*RedirectHandlerModule* is a module for handling redirect when the given url to redirect plugin is not registered in your Laminas application. It simply override existing Laminas redirect plugin, so we can just use it.
1111

12-
> This is README for version ^2.0 which only support ZF3 with php ^7.1.
12+
> This is README for version ^3.0 which only support Laminas 3 with php ^7.1.
13+
14+
> For version 2, you can read at [version 2 readme](https://github.com/samsonasik/RedirectHandlerModule/tree/2.x.x) which still support ZF3 with php ^7.1 support.
1315
1416
> For version 1, you can read at [version 1 readme](https://github.com/samsonasik/RedirectHandlerModule/tree/1.x.x) which still support ZF2 with php ^5.6|^7.0 support.
1517

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "samsonasik/redirect-handler-module",
33
"type": "library",
4-
"description": "ZF2 module to for Url Redirect handling",
4+
"description": "Laminas module to for Url Redirect handling",
55
"keywords": [
66
"redirect",
7-
"zf2",
8-
"zf3",
7+
"laminas2",
8+
"laminas3",
99
"handler"
1010
],
1111
"homepage": "https://github.com/samsonasik/RedirectHandlerModule",
@@ -20,13 +20,13 @@
2020
],
2121
"require": {
2222
"php": "^7.1",
23-
"zendframework/zend-mvc": "^3.0",
24-
"zendframework/zend-servicemanager": "^3.3.0"
23+
"laminas/laminas-mvc": "^3.0",
24+
"laminas/laminas-servicemanager": "^3.3.0"
2525
},
2626
"require-dev": {
27+
"laminas/laminas-coding-standard": "^1.0",
2728
"php-coveralls/php-coveralls": "^2.1",
28-
"phpunit/phpunit": "^7.0",
29-
"zendframework/zend-coding-standard": "^1.0"
29+
"phpunit/phpunit": "^7.0"
3030
},
3131
"config": {
3232
"process-timeout": 5000

config/module.config.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
return [
2121
'controller_plugins' => [
2222
'factories' => [
23-
'redirect' => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
24-
'Redirect' => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
25-
\Zend\Mvc\Controller\Plugin\Redirect::class => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
26-
'zendmvccontrollerpluginredirect' => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
23+
'redirect' => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
24+
'Redirect' => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
25+
\Laminas\Mvc\Controller\Plugin\Redirect::class => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
26+
'laminasmvccontrollerpluginredirect' => 'RedirectHandlerModule\Controller\Plugin\RedirectFactory',
2727
],
2828
],
2929
];

phpcs.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<ruleset name="Zend Framework Coding Standard">
3-
<rule ref="./vendor/zendframework/zend-coding-standard/ruleset.xml"/>
2+
<ruleset name="Laminas Coding Standard">
3+
<rule ref="./vendor/laminas/laminas-coding-standard/ruleset.xml"/>
44

55
<!-- Paths to check -->
66
<file>src</file>

src/Controller/Plugin/Redirect.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121

2222
namespace RedirectHandlerModule\Controller\Plugin;
2323

24-
use Zend\EventManager\EventManagerAwareInterface;
25-
use Zend\EventManager\EventManagerAwareTrait;
26-
use Zend\Mvc\Controller\ControllerManager;
27-
use Zend\Mvc\Controller\Plugin\Redirect as BaseRedirect;
28-
use Zend\Uri\Uri;
24+
use Laminas\EventManager\EventManagerAwareInterface;
25+
use Laminas\EventManager\EventManagerAwareTrait;
26+
use Laminas\Mvc\Controller\ControllerManager;
27+
use Laminas\Mvc\Controller\Plugin\Redirect as BaseRedirect;
28+
use Laminas\Uri\Uri;
2929

3030
class Redirect extends BaseRedirect implements EventManagerAwareInterface
3131
{
@@ -54,7 +54,7 @@ public function __construct(
5454
*
5555
* @param string $url
5656
*
57-
* @return \Zend\Http\PhpEnvironment\Response
57+
* @return \Laminas\Http\PhpEnvironment\Response
5858
*/
5959
public function toUrl($url)
6060
{

test/Controller/Plugin/RedirectFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testInvoke($config)
7878
{
7979
$services = $this->prophesize(ContainerInterface::class);
8080

81-
$controllerManager = $this->prophesize('Zend\Mvc\Controller\ControllerManager');
81+
$controllerManager = $this->prophesize('Laminas\Mvc\Controller\ControllerManager');
8282
$services->get('ControllerManager')->willReturn($controllerManager)
8383
->shouldBeCalled();
8484

test/Controller/Plugin/RedirectTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
use PHPUnit\Framework\TestCase;
2323
use RedirectHandlerModule\Controller\Plugin\Redirect;
24-
use Zend\EventManager\EventManager;
25-
use Zend\Http\Headers;
26-
use Zend\Http\PhpEnvironment\Request;
27-
use Zend\Http\PhpEnvironment\Response;
28-
use Zend\Mvc\Controller\AbstractActionController;
29-
use Zend\Mvc\Controller\ControllerManager;
30-
use Zend\Mvc\MvcEvent;
31-
use Zend\Router\Http\TreeRouteStack;
32-
use Zend\Router\RouteMatch;
24+
use Laminas\EventManager\EventManager;
25+
use Laminas\Http\Headers;
26+
use Laminas\Http\PhpEnvironment\Request;
27+
use Laminas\Http\PhpEnvironment\Response;
28+
use Laminas\Mvc\Controller\AbstractActionController;
29+
use Laminas\Mvc\Controller\ControllerManager;
30+
use Laminas\Mvc\MvcEvent;
31+
use Laminas\Router\Http\TreeRouteStack;
32+
use Laminas\Router\RouteMatch;
3333

3434
class RedirectTest extends TestCase
3535
{

0 commit comments

Comments
 (0)