Skip to content

Commit 556f836

Browse files
committed
php 8
1 parent 8b77d85 commit 556f836

Some content is hidden

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

68 files changed

+391
-380
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PlaygroundUser
55

66
#Introduction
77

8-
Ce module étend ZfcUser qui permet de nombreuses fonctionnalités liées à la gestion d'un compte client.
8+
Ce module étend LmcUser qui permet de nombreuses fonctionnalités liées à la gestion d'un compte client.
99

1010
Le fonctionnalités apportées par PgUser sont :
1111
* Gestion des autorisations via BjyAuthorize
@@ -31,23 +31,23 @@ La commande php doctrine-module.php data-fixture:import --append permet d'instal
3131
## Use your own User entity
3232
If you want to use your own entity :
3333

34-
1. Change the value of 'user_entity_class' in the zfcuser.global.php file.
34+
1. Change the value of 'user_entity_class' in the lmcuser.global.php file.
3535

3636
'user_entity_class' => 'MyUser\Entity\User',
3737

3838
2. Put your doctrine definition in your module.config.php Module (the one extending the user entity)
3939

4040
'doctrine' => array(
4141
'driver' => array(
42-
'zfcuser_entity' => array(
42+
'lmcuser_entity' => array(
4343
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
4444
'cache' => 'array',
4545
'paths' => __DIR__ . '/../src/MyUser/Entity'
4646
),
4747

4848
'orm_default' => array(
4949
'drivers' => array(
50-
'MyUser\Entity' => 'zfcuser_entity'
50+
'MyUser\Entity' => 'lmcuser_entity'
5151
)
5252
)
5353
)
@@ -65,7 +65,7 @@ And in your Module.php onBootstrap method, You have then to use the doctrine lis
6565
$sm = $e->getApplication()->getServiceManager();
6666
$doctrine = $sm->get('application_doctrine_em');
6767
$evm = $doctrine->getEventManager();
68-
68+
6969
$listener = new \Doctrine\ORM\Tools\ResolveTargetEntityListener();
7070
$listener->addResolveTargetEntity(
7171
'PgUser\Entity\UserInterface',
@@ -88,7 +88,7 @@ If you want to change the ChangeInfo Form for example (ie. you want to add a 'ch
8888

8989
parent::__construct($name, $createOptions, $translator);
9090

91-
And then you add the Form elements you want
91+
And then you add the Form elements you want
9292

9393
$this->add(array(
9494
'type' => 'Laminas\Form\Element\Select',
@@ -145,16 +145,16 @@ If you want to add an action or modify an existing one.
145145
'children_views' => array(
146146
'col_left' => 'adfab-user/layout/col-user.phtml',
147147
),
148-
),
149-
),
148+
),
149+
),
150150
'controllers' => array(
151151
'invokables' => array(
152152
'myuser_user' => 'MyUser\Controller\UserController',
153153
),
154-
),
154+
),
155155
'router' => array(
156156
'routes' => array(
157-
'zfcuser' => array(
157+
'lmcuser' => array(
158158
'child_routes' => array(
159159
'profile' => array(
160160
'type' => 'Laminas\Router\Http\Literal',

composer.json

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@
1616
"homepage": "http://www.playground.gg"
1717
}
1818
],
19+
"repositories": [
20+
{
21+
"type": "vcs",
22+
"url": "https://github.com/gregorybesson/zfc-datagrid"
23+
}
24+
],
1925
"require": {
2026
"php": ">=7.3.0",
2127
"facebook/graph-sdk": "^5.6",
22-
"playground/design": "^5.0",
28+
"playground/design": "^6.0",
2329
"laminas/laminas-developer-tools": ">=1.0.0",
2430
"hybridauth/hybridauth": "@RC",
25-
"zf-commons/zfc-user": ">=3.0.0",
26-
"laminas/laminas-dependency-plugin": "^2.1"
31+
"laminas/laminas-dependency-plugin": "^2.1",
32+
"lm-commons/lmc-user": "^3.5"
2733
},
2834
"require-dev": {
2935
"phpunit/phpunit": ">=4.0.0",
@@ -39,5 +45,10 @@
3945
"branch-alias": {
4046
"dev-master": "5.x-dev"
4147
}
48+
},
49+
"config": {
50+
"allow-plugins": {
51+
"laminas/laminas-dependency-plugin": true
52+
}
4253
}
4354
}

config/module.config.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
'doctrine' => array(
55
'driver' => array(
6-
'zfcuser_entity' => array(
6+
'lmcuser_entity' => array(
77
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
88
'cache' => 'array',
99
'paths' => __DIR__ . '/../src/Entity'
1010
),
1111

1212
'orm_default' => array(
1313
'drivers' => array(
14-
'PlaygroundUser\Entity' => 'zfcuser_entity'
14+
'PlaygroundUser\Entity' => 'lmcuser_entity'
1515
)
1616
)
1717
),
@@ -53,7 +53,7 @@
5353

5454
'guards' => array(
5555
'BjyAuthorize\Guard\Controller' => array(
56-
array('controller' => 'zfcuser', 'roles' => array('guest', 'user')),
56+
array('controller' => 'lmcuser', 'roles' => array('guest', 'user')),
5757
array('controller' => \PlaygroundUser\Controller\Frontend\UserController::class, 'roles' => array('guest', 'user')),
5858
array('controller' => \PlaygroundUser\Controller\Frontend\TeamController::class, 'roles' => array('guest', 'user')),
5959
array('controller' => \PlaygroundUser\Controller\Frontend\ForgotController::class, 'roles' => array('guest', 'user')),
@@ -195,13 +195,13 @@
195195
)
196196
),
197197
),
198-
'zfcuser' => array(
198+
'lmcuser' => array(
199199
'type' => 'Laminas\Router\Http\Literal',
200200
'priority' => 1000,
201201
'options' => array(
202202
'route' => 'mon-compte',
203203
'defaults' => array(
204-
'controller' => 'zfcuser',
204+
'controller' => 'lmcuser',
205205
'action' => 'index',
206206
),
207207
),
@@ -638,7 +638,7 @@
638638

639639
'newsletter' => array(
640640
'label' => 'Newsletter',
641-
'route' => 'frontend/zfcuser/newsletter',
641+
'route' => 'frontend/lmcuser/newsletter',
642642
'controller' => \PlaygroundUser\Controller\Frontend\UserController::class,
643643
'action' => 'newsletter',
644644
),

config/playgrounduser.global.php.dist

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<?php
22
$playgrounduser = array(
3-
3+
44
/**
55
* add default registration role to BjyAuthorize
66
*
77
*/
88
'default_register_role' => 'user',
9-
9+
1010
/**
1111
* @var bool
1212
* true = create user automatically after social authentication
1313
* false = data are extracted from the social id and sent to a registration form
1414
*/
1515
'createUserAutoSocial' => false,
16-
16+
1717
/**
1818
* Email Address that will appear in the 'From' of outbound emails
1919
*
2020
* Default: empty
21-
*/
21+
*/
2222
'email_from_address' => array(
2323
'email' => 'contact@playground.gg',
2424
'name' => 'Administrateur',
2525
),
26-
26+
2727
/**
2828
* Subject line of the email message which is
2929
* sent out when a user enters their email address
3030
*
3131
* Default: 'You requested to reset your password'
3232
*/
3333
'reset_email_subject_line' => 'Réinitialisation de votre mot de passe',
34-
34+
3535
/**
3636
* Subject line of the email message which is
3737
* sent out when an admin has changed the password
@@ -40,7 +40,7 @@ $playgrounduser = array(
4040
* Default: 'Your new password'
4141
*/
4242
'new_email_subject_line' => 'Votre nouveau mot de passe',
43-
43+
4444
/**
4545
* Activate the email verification on registration
4646
*
@@ -55,24 +55,24 @@ $playgrounduser = array(
5555
* Default subject : 'Merci de votre inscription'
5656
*/
5757
'emailConfirmation' => true,
58-
58+
5959
/**
6060
* Subject line of the email message which is
6161
* sent out when verification on email registration
6262
* is activated
63-
*
63+
*
6464
* Default: 'Vérification de votre compte'
6565
*/
6666
'verificationEmailSubjectLine' => 'Vérification de votre compte',
67-
67+
6868
/**
6969
* RememberMe Model Entity Class
7070
*
7171
* Name of Entity class to use. Useful for using your own entity class
72-
* instead of the default one provided. Default is ZfcUser\Entity\User.
72+
* instead of the default one provided. Default is LmcUser\Entity\User.
7373
*/
7474
'remember_me_entity_class' => 'PlaygroundUser\Entity\RememberMe',
75-
75+
7676
/**
7777
* Remember me cookie expire time
7878
*
@@ -82,17 +82,17 @@ $playgrounduser = array(
8282
* Accepted values: the number of seconds the user should be remembered
8383
*/
8484
'cookie_expire' => 2592000,
85-
85+
8686
/**
8787
* Drive path to the directory where user avatar will be stored
8888
*/
8989
'avatar_path' => 'public' . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'user',
90-
90+
9191
/**
9292
* Url relative path to the directory where user avatar will be stored
9393
*/
9494
'avatar_url' => 'media/user',
95-
95+
9696
'social' => array(
9797
'providers' => include __DIR__.'/social.config.php',
9898
// if you want to enable logging, set 'debug_mode' to true then provide a writable file by the web server on 'debug_file'
@@ -127,28 +127,28 @@ $playgrounduser = array(
127127
);
128128

129129
/**
130-
* ZfcUser Configuration
130+
* LmcUser Configuration
131131
*
132132
* If you have a ./config/autoload/ directory set up for your project, you can
133133
* drop this config file in it and change the values as you wish.
134134
*/
135-
$zfcSettings = array(
135+
$LmcSettings = array(
136136

137137
/**
138138
* Authentication Adapters
139139
*
140140
* Specify the adapters that will be used to try and authenticate the user
141141
*
142-
* Default value: array containing 'ZfcUser\Authentication\Adapter\Db'
143-
* Accepted values: array containing services that implement 'ZfcUser\Authentication\Adapter\ChainableAdapter'
142+
* Default value: array containing 'LmcUser\Authentication\Adapter\Db'
143+
* Accepted values: array containing services that implement 'LmcUser\Authentication\Adapter\ChainableAdapter'
144144
*/
145145
'auth_adapters' => array(
146146
50 => 'PlaygroundUser\Authentication\Adapter\Cookie',
147-
100 => 'ZfcUser\Authentication\Adapter\Db'
147+
100 => 'LmcUser\Authentication\Adapter\Db'
148148
),
149149

150150
/**
151-
* End of ZfcUser configuration
151+
* End of LmcUser configuration
152152
*/
153153
);
154154

@@ -157,5 +157,5 @@ $zfcSettings = array(
157157
*/
158158
return array(
159159
'playgrounduser' => $playgrounduser,
160-
'zfcuser' => $zfcSettings,
160+
'lmcuser' => $LmcSettings,
161161
);

src/Authentication/Adapter/Cookie.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PlaygroundUser\Authentication\Adapter;
44

5-
use ZfcUser\Authentication\Adapter\AbstractAdapter;
5+
use LmcUser\Authentication\Adapter\AbstractAdapter;
66
use Laminas\Authentication\Result as AuthenticationResult;
77
use Laminas\ServiceManager\ServiceManager;
88
use Laminas\Stdlib\ResponseInterface as Response;
@@ -37,7 +37,7 @@ public function authenticate(\Laminas\EventManager\EventInterface $e)
3737
* but afterwords login with identity/credential
3838
* we remove the "cookieLogin" session.
3939
*/
40-
$session = new \Laminas\Session\Container('zfcuser');
40+
$session = new \Laminas\Session\Container('lmcuser');
4141
$session->offsetSet("cookieLogin", false);
4242

4343
return;
@@ -96,7 +96,7 @@ public function authenticate(\Laminas\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 \Laminas\Session\Container('zfcuser');
99+
$session = new \Laminas\Session\Container('lmcuser');
100100
$session->offsetSet("cookieLogin", true);
101101
}
102102

@@ -143,7 +143,7 @@ public function setUserMapper($userMapper)
143143
public function getUserMapper()
144144
{
145145
if (null === $this->userMapper) {
146-
$this->userMapper = $this->getServiceManager()->get('zfcuser_user_mapper');
146+
$this->userMapper = $this->getServiceManager()->get('lmcuser_user_mapper');
147147
}
148148

149149
return $this->userMapper;
@@ -170,7 +170,7 @@ public function getRememberMeService()
170170
*/
171171
public function logout()
172172
{
173-
$authService = $this->getServiceManager()->get('zfcuser_auth_service');
173+
$authService = $this->getServiceManager()->get('lmcuser_auth_service');
174174
$user = $authService->getIdentity();
175175

176176
$cookie = explode("\n", $this->getRememberMeService()->getCookie());

src/Authentication/Adapter/EmailValidation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PlaygroundUser\Authentication\Adapter;
44

5-
use ZfcUser\Authentication\Adapter\AbstractAdapter;
5+
use LmcUser\Authentication\Adapter\AbstractAdapter;
66
use Laminas\Authentication\Result as AuthenticationResult;
77
use Laminas\EventManager\EventInterface as AuthEvent;
88
use Laminas\ServiceManager\ServiceManager;
@@ -92,7 +92,7 @@ public function setServiceManager(ServiceManager $serviceManager)
9292
public function getUserService()
9393
{
9494
if (!$this->userService) {
95-
$this->userService = $this->getServiceManager()->get('zfcuser_user_service');
95+
$this->userService = $this->getServiceManager()->get('lmcuser_user_service');
9696
}
9797

9898
return $this->userService;

0 commit comments

Comments
 (0)