Skip to content

Commit d781ea7

Browse files
Merge pull request #152 from gregorybesson/develop
Laminas
2 parents 6c0c969 + 8b77d85 commit d781ea7

File tree

88 files changed

+421
-412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+421
-412
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
composer.phar
77
/.buildpath
88
/build
9+
.phpunit.result.cache

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If you want to change the ChangeInfo Form for example (ie. you want to add a 'ch
9191
And then you add the Form elements you want
9292

9393
$this->add(array(
94-
'type' => 'Zend\Form\Element\Select',
94+
'type' => 'Laminas\Form\Element\Select',
9595
'name' => 'children',
9696
'attributes' => array(
9797
'id' => 'children',
@@ -157,7 +157,7 @@ If you want to add an action or modify an existing one.
157157
'zfcuser' => array(
158158
'child_routes' => array(
159159
'profile' => array(
160-
'type' => 'Zend\Router\Http\Literal',
160+
'type' => 'Laminas\Router\Http\Literal',
161161
'options' => array(
162162
'route' => '/mes-coordonnees',
163163
'defaults' => array(

composer.json

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,43 @@
11
{
2-
"name" : "playground/user",
3-
"description" : "Module managing user",
4-
"type" : "library",
5-
"license" : "MIT",
6-
"keywords" : [
7-
"ZF3",
8-
"playground",
9-
"user"
10-
],
11-
"homepage" : "https://github.com/gregorybesson/PlaygroundUser",
12-
"authors" : [
13-
{
14-
"name" : "Greg Besson",
15-
"email" : "gregory.besson@playground.gg",
16-
"homepage" : "http://www.playground.gg"
17-
}
18-
],
19-
"require" : {
20-
"php" : ">=5.5.0",
21-
"facebook/graph-sdk": "^5.6",
22-
"playground/design" : ">=4.0.0",
23-
"zendframework/zend-developer-tools" : ">=1.0.0",
24-
"hybridauth/hybridauth": "@RC",
25-
"zf-commons/zfc-user" : ">=3.0.0"
26-
},
27-
"require-dev" : {
28-
"phpunit/phpunit" : ">=4.0.0",
29-
"squizlabs/php_codesniffer": ">=2.0.0",
30-
"php-coveralls/php-coveralls": ">=0.0.0"
31-
},
32-
"autoload" : {
33-
"psr-4" : {
34-
"PlaygroundUser\\" : "src/"
35-
}
36-
},
37-
"extra": {
2+
"name": "playground/user",
3+
"description": "Module user",
4+
"type": "library",
5+
"license": "MIT",
6+
"keywords": [
7+
"Laminas",
8+
"playground",
9+
"user"
10+
],
11+
"homepage": "https://github.com/gregorybesson/PlaygroundUser",
12+
"authors": [
13+
{
14+
"name": "Greg Besson",
15+
"email": "gregory.besson@playground.gg",
16+
"homepage": "http://www.playground.gg"
17+
}
18+
],
19+
"require": {
20+
"php": ">=7.3.0",
21+
"facebook/graph-sdk": "^5.6",
22+
"playground/design": "^5.0",
23+
"laminas/laminas-developer-tools": ">=1.0.0",
24+
"hybridauth/hybridauth": "@RC",
25+
"zf-commons/zfc-user": ">=3.0.0",
26+
"laminas/laminas-dependency-plugin": "^2.1"
27+
},
28+
"require-dev": {
29+
"phpunit/phpunit": ">=4.0.0",
30+
"squizlabs/php_codesniffer": ">=2.0.0",
31+
"php-coveralls/php-coveralls": "^2.4"
32+
},
33+
"autoload": {
34+
"psr-4": {
35+
"PlaygroundUser\\": "src/"
36+
}
37+
},
38+
"extra": {
3839
"branch-alias": {
39-
"dev-master": "4.x-dev"
40+
"dev-master": "5.x-dev"
4041
}
4142
}
4243
}

config/module.config.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
'frontend' => array(
146146
'child_routes' => array(
147147
'contact' => array(
148-
'type' => 'Zend\Router\Http\Literal',
148+
'type' => 'Laminas\Router\Http\Literal',
149149
'options' => array(
150150
'route' => 'contactez-nous',
151151
'defaults' => array(
@@ -156,7 +156,7 @@
156156
'may_terminate' => true,
157157
'child_routes' => array(
158158
'confirmation' => array(
159-
'type' => 'Zend\Router\Http\Literal',
159+
'type' => 'Laminas\Router\Http\Literal',
160160
'options' => array(
161161
'route' => '/confirmation',
162162
'defaults' => array(
@@ -196,7 +196,7 @@
196196
),
197197
),
198198
'zfcuser' => array(
199-
'type' => 'Zend\Router\Http\Literal',
199+
'type' => 'Laminas\Router\Http\Literal',
200200
'priority' => 1000,
201201
'options' => array(
202202
'route' => 'mon-compte',
@@ -208,7 +208,7 @@
208208
'may_terminate' => true,
209209
'child_routes' => array(
210210
'team' => array(
211-
'type' => 'Zend\Router\Http\Literal',
211+
'type' => 'Laminas\Router\Http\Literal',
212212
'options' => array(
213213
'route' => '/team',
214214
'defaults' => array(
@@ -218,7 +218,7 @@
218218
),
219219
),
220220
'forgotpassword' => array(
221-
'type' => 'Zend\Router\Http\Literal',
221+
'type' => 'Laminas\Router\Http\Literal',
222222
'options' => array(
223223
'route' => '/mot-passe-oublie',
224224
'defaults' => array(
@@ -228,7 +228,7 @@
228228
),
229229
),
230230
'ajaxforgotpassword' => array(
231-
'type' => 'Zend\Router\Http\Literal',
231+
'type' => 'Laminas\Router\Http\Literal',
232232
'options' => array(
233233
'route' => '/ajax-mot-passe-oublie',
234234
'defaults' => array(
@@ -261,7 +261,7 @@
261261
),
262262
),
263263
'ajaxlogin' => array(
264-
'type' => 'Zend\Router\Http\Literal',
264+
'type' => 'Laminas\Router\Http\Literal',
265265
'options' => array(
266266
'route' => '/ajaxlogin',
267267
'defaults' => array(
@@ -271,7 +271,7 @@
271271
),
272272
),
273273
'login' => array(
274-
'type' => 'Zend\Router\Http\Literal',
274+
'type' => 'Laminas\Router\Http\Literal',
275275
'options' => array(
276276
'route' => '/login',
277277
'defaults' => array(
@@ -297,7 +297,7 @@
297297
),
298298
),
299299
'logout' => array(
300-
'type' => 'Zend\Router\Http\Literal',
300+
'type' => 'Laminas\Router\Http\Literal',
301301
'options' => array(
302302
'route' => '/logout',
303303
'defaults' => array(
@@ -307,7 +307,7 @@
307307
),
308308
),
309309
'ajaxauthenticate' => array(
310-
'type' => 'Zend\Router\Http\Literal',
310+
'type' => 'Laminas\Router\Http\Literal',
311311
'options' => array(
312312
'route' => '/ajaxauthenticate',
313313
'defaults' => array(
@@ -317,7 +317,7 @@
317317
),
318318
),
319319
'authenticate' => array(
320-
'type' => 'Zend\Router\Http\Literal',
320+
'type' => 'Laminas\Router\Http\Literal',
321321
'options' => array(
322322
'route' => '/authenticate',
323323
'defaults' => array(
@@ -364,7 +364,7 @@
364364
),
365365
),
366366
'registermail' => array(
367-
'type' => 'Zend\Router\Http\Literal',
367+
'type' => 'Laminas\Router\Http\Literal',
368368
'options' => array(
369369
'route' => '/registermail',
370370
'defaults' => array(
@@ -374,7 +374,7 @@
374374
),
375375
),
376376
'verification' => array(
377-
'type' => 'Zend\Router\Http\Literal',
377+
'type' => 'Laminas\Router\Http\Literal',
378378
'options' => array(
379379
'route' => '/verification',
380380
'defaults' => array(
@@ -395,7 +395,7 @@
395395
),
396396

397397
'profile' => array(
398-
'type' => 'Zend\Router\Http\Literal',
398+
'type' => 'Laminas\Router\Http\Literal',
399399
'options' => array(
400400
'route' => '/mes-coordonnees',
401401
'defaults' => array(
@@ -405,7 +405,7 @@
405405
),
406406
),
407407
'profile_prizes' => array(
408-
'type' => 'Zend\Router\Http\Literal',
408+
'type' => 'Laminas\Router\Http\Literal',
409409
'options' => array(
410410
'route' => '/prizes',
411411
'defaults' => array(
@@ -415,7 +415,7 @@
415415
),
416416
),
417417
'newsletter' => array(
418-
'type' => 'Zend\Router\Http\Literal',
418+
'type' => 'Laminas\Router\Http\Literal',
419419
'options' => array(
420420
'route' => '/newsletter',
421421
'defaults' => array(
@@ -425,7 +425,7 @@
425425
),
426426
),
427427
'ajax_newsletter' => array(
428-
'type' => 'Zend\Router\Http\Literal',
428+
'type' => 'Laminas\Router\Http\Literal',
429429
'options' => array(
430430
'route' => '/ajax-newsletter',
431431
'defaults' => array(
@@ -435,7 +435,7 @@
435435
),
436436
),
437437
'changepassword' => array(
438-
'type' => 'Zend\Router\Http\Literal',
438+
'type' => 'Laminas\Router\Http\Literal',
439439
'options' => array(
440440
'route' => '/change-password',
441441
'defaults' => array(
@@ -445,7 +445,7 @@
445445
),
446446
),
447447
'blockaccount' => array(
448-
'type' => 'Zend\Router\Http\Literal',
448+
'type' => 'Laminas\Router\Http\Literal',
449449
'options' => array(
450450
'route' => '/block-account',
451451
'defaults' => array(
@@ -455,7 +455,7 @@
455455
),
456456
),
457457
'changeemail' => array(
458-
'type' => 'Zend\Router\Http\Literal',
458+
'type' => 'Laminas\Router\Http\Literal',
459459
'options' => array(
460460
'route' => '/change-email',
461461
'defaults' => array(
@@ -478,7 +478,7 @@
478478
),
479479
'child_routes' => array(
480480
'logout' => array(
481-
'type' => 'Zend\Router\Http\Literal',
481+
'type' => 'Laminas\Router\Http\Literal',
482482
'options' => array(
483483
'route' => '/logout',
484484
'defaults' => array(
@@ -488,7 +488,7 @@
488488
),
489489
),
490490
'playgrounduser' => array(
491-
'type' => 'Zend\Router\Http\Literal',
491+
'type' => 'Laminas\Router\Http\Literal',
492492
'priority' => 1000,
493493
'options' => array(
494494
'route' => '/user',

src/Authentication/Adapter/Cookie.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace PlaygroundUser\Authentication\Adapter;
44

55
use ZfcUser\Authentication\Adapter\AbstractAdapter;
6-
use Zend\Authentication\Result as AuthenticationResult;
7-
use Zend\ServiceManager\ServiceManager;
8-
use Zend\Stdlib\ResponseInterface as Response;
9-
use Zend\ServiceManager\ServiceLocatorInterface;
6+
use Laminas\Authentication\Result as AuthenticationResult;
7+
use Laminas\ServiceManager\ServiceManager;
8+
use Laminas\Stdlib\ResponseInterface as Response;
9+
use Laminas\ServiceManager\ServiceLocatorInterface;
1010

1111
class Cookie extends AbstractAdapter
1212
{
@@ -23,7 +23,7 @@ public function __construct(ServiceLocatorInterface $locator)
2323
$this->serviceManager = $locator;
2424
}
2525

26-
public function authenticate(\Zend\EventManager\EventInterface $e)
26+
public function authenticate(\Laminas\EventManager\EventInterface $e)
2727
{
2828
$e = $e->getTarget();
2929
//throw new \Exception('Cookie Auth event was stopped without a response.');
@@ -37,7 +37,7 @@ public function authenticate(\Zend\EventManager\EventInterface $e)
3737
* but afterwords login with identity/credential
3838
* we remove the "cookieLogin" session.
3939
*/
40-
$session = new \Zend\Session\Container('zfcuser');
40+
$session = new \Laminas\Session\Container('zfcuser');
4141
$session->offsetSet("cookieLogin", false);
4242

4343
return;
@@ -96,7 +96,7 @@ public function authenticate(\Zend\EventManager\EventInterface $e)
9696
->setMessages(array('Authentication successful.'));
9797

9898
// Reference for weak login. Should not be allowed to change PW etc.
99-
$session = new \Zend\Session\Container('zfcuser');
99+
$session = new \Laminas\Session\Container('zfcuser');
100100
$session->offsetSet("cookieLogin", true);
101101
}
102102

src/Authentication/Adapter/EmailValidation.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace PlaygroundUser\Authentication\Adapter;
44

55
use ZfcUser\Authentication\Adapter\AbstractAdapter;
6-
use Zend\Authentication\Result as AuthenticationResult;
7-
use Zend\EventManager\EventInterface as AuthEvent;
8-
use Zend\ServiceManager\ServiceManager;
9-
use Zend\ServiceManager\ServiceLocatorInterface;
6+
use Laminas\Authentication\Result as AuthenticationResult;
7+
use Laminas\EventManager\EventInterface as AuthEvent;
8+
use Laminas\ServiceManager\ServiceManager;
9+
use Laminas\ServiceManager\ServiceLocatorInterface;
1010

1111
class EmailValidation extends AbstractAdapter
1212
{
@@ -35,7 +35,7 @@ public function authenticate(AuthEvent $e)
3535

3636
$service = $this->getUserService();
3737
$token = $e->getRequest()->getQuery()->get('token');
38-
$validator = new \Zend\Validator\Hex();
38+
$validator = new \Laminas\Validator\Hex();
3939
if (!$validator->isValid($token)) {
4040
return false;
4141
}

src/Authentication/Adapter/HybridAuth.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
use Hybrid_Auth;
55
use PlaygroundUser\Mapper\UserProvider;
66
use PlaygroundUser\Options\ModuleOptions;
7-
use Zend\Authentication\Result;
8-
use Zend\ServiceManager\ServiceManager;
7+
use Laminas\Authentication\Result;
8+
use Laminas\ServiceManager\ServiceManager;
99
use ZfcUser\Authentication\Adapter\AbstractAdapter;
1010
use ZfcUser\Mapper\UserInterface as UserMapperInterface;
1111
use ZfcUser\Options\UserServiceOptionsInterface;
12-
use Zend\EventManager\EventManagerInterface;
13-
use Zend\EventManager\EventManager;
14-
use Zend\EventManager\EventManagerAwareInterface;
12+
use Laminas\EventManager\EventManagerInterface;
13+
use Laminas\EventManager\EventManager;
14+
use Laminas\EventManager\EventManagerAwareInterface;
1515

1616
class HybridAuth extends AbstractAdapter implements EventManagerAwareInterface
1717
{
@@ -55,7 +55,7 @@ class HybridAuth extends AbstractAdapter implements EventManagerAwareInterface
5555
*/
5656
protected $roleMapper;
5757

58-
public function authenticate(\Zend\EventManager\EventInterface $authEvent)
58+
public function authenticate(\Laminas\EventManager\EventInterface $authEvent)
5959
{
6060
$authEvent = $authEvent->getTarget();
6161
if ($this->isSatisfied()) {

0 commit comments

Comments
 (0)