Skip to content

Commit 8d05b78

Browse files
authored
Merge pull request #417 from dotkernel/issue-416
bump to php 8.3
2 parents f98385f + a24a342 commit 8d05b78

18 files changed

+70
-59
lines changed

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
19+
- "8.3"
2020

2121
steps:
2222
- name: Checkout

.github/workflows/cs-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
19+
- "8.3"
2020

2121
steps:
2222
- name: Checkout

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
19+
- "8.3"
2020

2121
steps:
2222
- name: Checkout

.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- ubuntu-latest
1616

1717
php:
18-
- "8.1"
1918
- "8.2"
19+
- "8.3"
2020

2121
steps:
2222
- name: Checkout

composer.json

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -43,44 +43,44 @@
4343
}
4444
},
4545
"require": {
46-
"php": "~8.1.0 || ~8.2.0",
46+
"php": "~8.2.0 || ~8.3.0",
4747
"ext-curl": "*",
4848
"ext-gettext": "*",
4949
"ext-json": "*",
50-
"dotkernel/dot-annotated-services": "^4.1",
51-
"dotkernel/dot-authorization": "^3.2",
52-
"dotkernel/dot-controller": "^3.2",
53-
"dotkernel/dot-data-fixtures": "^1.0",
54-
"dotkernel/dot-debugbar": "^1.0",
55-
"dotkernel/dot-errorhandler": "^3.2",
56-
"dotkernel/dot-flashmessenger": "^3.2",
57-
"dotkernel/dot-mail": "~3.4 || ~4.0",
58-
"dotkernel/dot-navigation": "^3.2",
59-
"dotkernel/dot-rbac-guard": "^3.2",
60-
"dotkernel/dot-response-header": "^3.1",
61-
"dotkernel/dot-session": "^5.2",
62-
"dotkernel/dot-twigrenderer": "^3.4",
63-
"friendsofphp/proxy-manager-lts": "^1.0",
64-
"laminas/laminas-component-installer": "^3.3",
65-
"laminas/laminas-config-aggregator": "^1.8",
66-
"laminas/laminas-form": "^3.13",
67-
"laminas/laminas-i18n": "^2.17",
68-
"mezzio/mezzio": "^3.11",
69-
"mezzio/mezzio-authorization-rbac": "^1.3",
70-
"mezzio/mezzio-cors": "^1.3",
71-
"mezzio/mezzio-fastroute": "^3.5",
72-
"ramsey/uuid-doctrine": "^1.8",
73-
"roave/psr-container-doctrine": "^3.5"
50+
"dotkernel/dot-annotated-services": "^4.1.6",
51+
"dotkernel/dot-authorization": "^3.4.1",
52+
"dotkernel/dot-controller": "^3.4.3",
53+
"dotkernel/dot-data-fixtures": "^1.1.3",
54+
"dotkernel/dot-debugbar": "^1.1.5",
55+
"dotkernel/dot-errorhandler": "^3.3.2",
56+
"dotkernel/dot-flashmessenger": "^3.4.2",
57+
"dotkernel/dot-mail": "~3.4 || ^4.1.1",
58+
"dotkernel/dot-navigation": "^3.4.2",
59+
"dotkernel/dot-rbac-guard": "^3.4.3",
60+
"dotkernel/dot-response-header": "^3.2.3",
61+
"dotkernel/dot-session": "^5.4.2",
62+
"dotkernel/dot-twigrenderer": "^3.4.3",
63+
"friendsofphp/proxy-manager-lts": "^1.0.16",
64+
"laminas/laminas-component-installer": "^3.4.0",
65+
"laminas/laminas-config-aggregator": "^1.14.0",
66+
"laminas/laminas-form": "^3.19.1",
67+
"laminas/laminas-i18n": "^2.26.0",
68+
"mezzio/mezzio": "^3.18.0",
69+
"mezzio/mezzio-authorization-rbac": "^1.7.0",
70+
"mezzio/mezzio-cors": "^1.11.1",
71+
"mezzio/mezzio-fastroute": "^3.11.0",
72+
"ramsey/uuid-doctrine": "^2.0.0",
73+
"roave/psr-container-doctrine": "^4.1.0"
7474
},
7575
"require-dev": {
76-
"filp/whoops": "^2.14",
76+
"filp/whoops": "^2.15.4",
7777
"laminas/laminas-coding-standard": "^2.5",
78-
"laminas/laminas-development-mode": "^3.10",
79-
"mezzio/mezzio-tooling": "^2.6",
80-
"phpunit/phpunit": "^10.3.2",
81-
"rector/rector": "^0.15.18",
78+
"laminas/laminas-development-mode": "^3.12.0",
79+
"mezzio/mezzio-tooling": "^2.9.0",
80+
"phpunit/phpunit": "^10.5",
81+
"rector/rector": "^1.0.0",
8282
"roave/security-advisories": "dev-master",
83-
"vimeo/psalm": "^5.15.0"
83+
"vimeo/psalm": "^5.21.1"
8484
},
8585
"autoload": {
8686
"psr-4": {

config/autoload/doctrine.global.php

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
declare(strict_types=1);
44

5-
use Doctrine\Common\Cache\PhpFileCache;
65
use Doctrine\ORM\EntityManager;
76
use Doctrine\ORM\EntityManagerInterface;
87
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
9-
use Frontend\App\Resolver\EntityListenerResolver;
108
use Ramsey\Uuid\Doctrine\UuidBinaryOrderedTimeType;
119
use Ramsey\Uuid\Doctrine\UuidBinaryType;
1210
use Ramsey\Uuid\Doctrine\UuidType;
@@ -24,42 +22,28 @@
2422
],
2523
],
2624
'doctrine' => [
27-
'configuration' => [
28-
'orm_default' => [
29-
'entity_listener_resolver' => EntityListenerResolver::class,
30-
'query_cache' => PhpFileCache::class,
31-
'metadata_cache' => PhpFileCache::class,
32-
'result_cache' => PhpFileCache::class,
33-
],
34-
],
35-
'connection' => [
25+
'connection' => [
3626
'orm_default' => [
3727
'doctrine_mapping_types' => [
3828
UuidBinaryType::NAME => 'binary',
3929
UuidBinaryOrderedTimeType::NAME => 'binary',
4030
],
4131
],
4232
],
43-
'driver' => [
33+
'driver' => [
4434
// default metadata driver, aggregates all other drivers into a single one.
4535
// Override `orm_default` only if you know what you're doing
4636
'orm_default' => [
4737
'class' => MappingDriverChain::class,
4838
'drivers' => [],
4939
],
5040
],
51-
'types' => [
41+
'types' => [
5242
UuidType::NAME => UuidType::class,
5343
UuidBinaryType::NAME => UuidBinaryType::class,
5444
UuidBinaryOrderedTimeType::NAME => UuidBinaryOrderedTimeType::class,
5545
],
56-
'cache' => [
57-
PhpFileCache::class => [
58-
'class' => PhpFileCache::class,
59-
'directory' => getcwd() . '/data/cache/doctrine',
60-
],
61-
],
62-
'fixtures' => getcwd() . '/data/doctrine/fixtures',
46+
'fixtures' => getcwd() . '/data/doctrine/fixtures',
6347
],
6448
'resultCacheLifetime' => 600,
6549
];

src/Contact/src/Controller/ContactController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ public function formAction(): ResponseInterface
6666
$this->messenger->addError('Missing recaptcha');
6767
return new RedirectResponse($request->getUri(), 303);
6868
}
69-
7069
$data['subject'] = $data['subject'] ?: $this->config['application']['name'] . ' Contact';
7170
$form->setData($data);
7271
if ($form->isValid()) {
72+
/** @var array $dataForm */
7373
$dataForm = $form->getData();
7474
$result = $this->messageService->processMessage($dataForm);
7575

src/Contact/src/Form/ContactForm.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010
use Laminas\Form\Element\Text;
1111
use Laminas\Form\Element\Textarea;
1212
use Laminas\Form\Form;
13+
use Laminas\Form\FormInterface;
1314
use Laminas\InputFilter\InputFilterInterface;
1415

16+
/** @template-extends Form<FormInterface> */
1517
class ContactForm extends Form
1618
{
1719
protected InputFilterInterface $inputFilter;

src/User/src/Controller/AccountController.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ public function requestResetPasswordAction(): ResponseInterface
134134
return new RedirectResponse($this->getRequest()->getUri(), 303);
135135
}
136136

137-
$user = $this->userService->findOneBy(['identity' => $form->getData()['identity']]);
137+
/** @var array $data */
138+
$data = $form->getData();
139+
$user = $this->userService->findOneBy(['identity' => $data['identity']]);
138140
if (! $user instanceof User) {
139141
$this->messenger->addInfo(Message::MAIL_SENT_RESET_PASSWORD, 'request-reset');
140142
return new RedirectResponse($this->getRequest()->getUri());
@@ -201,10 +203,12 @@ public function resetPasswordAction(): ResponseInterface
201203
return new RedirectResponse($this->getRequest()->getUri(), 303);
202204
}
203205

206+
/** @var array $data */
207+
$data = $form->getData();
204208
try {
205209
$this->userService->updateUser(
206210
$resetPasswordRequest->markAsCompleted()->getUser(),
207-
$form->getData()
211+
$data
208212
);
209213
$this->debugBar->stackData();
210214
} catch (Exception $exception) {
@@ -299,6 +303,7 @@ public function detailsAction(): ResponseInterface
299303
if (RequestMethodInterface::METHOD_POST === $this->request->getMethod()) {
300304
$form->setData($this->request->getParsedBody());
301305
if ($form->isValid()) {
306+
/** @var array $userData */
302307
$userData = $form->getData();
303308
try {
304309
$this->userService->updateUser($user, $userData);
@@ -363,6 +368,7 @@ public function changePasswordAction(): ResponseInterface
363368
if (RequestMethodInterface::METHOD_POST === $this->request->getMethod()) {
364369
$form->setData($this->request->getParsedBody());
365370
if ($form->isValid()) {
371+
/** @var array $userData */
366372
$userData = $form->getData();
367373
try {
368374
$this->userService->updateUser($user, $userData);
@@ -416,6 +422,7 @@ public function deleteAccountAction(): ResponseInterface
416422
if (RequestMethodInterface::METHOD_POST === $this->request->getMethod()) {
417423
$form->setData($this->request->getParsedBody());
418424
if ($form->isValid()) {
425+
/** @var array $userData */
419426
$userData = $form->getData();
420427
try {
421428
$this->userService->updateUser($user, $userData);

src/User/src/Controller/UserController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ public function loginAction(): ResponseInterface
7676
if ($form->isValid()) {
7777
/** @var AuthenticationAdapter $adapter */
7878
$adapter = $this->authenticationService->getAdapter();
79-
$data = $form->getData();
79+
/** @var array $data */
80+
$data = $form->getData();
8081
$adapter->setIdentity($data['identity'])->setCredential($data['password']);
8182
$authResult = $this->authenticationService->authenticate();
8283
if ($authResult->isValid()) {
@@ -146,6 +147,7 @@ public function registerAction(): ResponseInterface
146147
if (RequestMethodInterface::METHOD_POST === $this->getRequest()->getMethod()) {
147148
$form->setData($this->getRequest()->getParsedBody());
148149
if ($form->isValid()) {
150+
/** @var array $userData */
149151
$userData = $form->getData();
150152
try {
151153
/** @var User $user */

0 commit comments

Comments
 (0)