Skip to content

Commit 2fc7a92

Browse files
committed
fixed conflicts
Signed-off-by: alexmerlin <alex.merlin.1985@gmail.com>
2 parents ef0be24 + 1bf14e6 commit 2fc7a92

File tree

16 files changed

+63
-139
lines changed

16 files changed

+63
-139
lines changed

.github/workflows/codecov.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ jobs:
4444
- name: Install dependencies with composer
4545
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646

47-
- name: Setup project
48-
run: |
49-
mv config/autoload/local.php.dist config/autoload/local.php
50-
mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51-
mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5347
- name: Collect code coverage with PHPUnit
5448
run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml
5549

.github/workflows/qodana_code_quality.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
contents: write
1515
pull-requests: write
1616
checks: write
17+
strategy:
18+
matrix:
19+
php-versions: [ '8.2', '8.3' ]
1720
steps:
1821
- uses: actions/checkout@v4
1922
with:
@@ -22,7 +25,7 @@ jobs:
2225
- name: Install PHP
2326
uses: shivammathur/setup-php@v2
2427
with:
25-
php-version: "${{ matrix.php }}"
28+
php-version: ${{ matrix.php-versions }}
2629
coverage: pcov
2730
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
2831
tools: composer:v2, cs2pr

.github/workflows/static-analysis.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,5 @@ jobs:
4444
- name: Install dependencies with composer
4545
run: composer install --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4646

47-
- name: Setup project
48-
run: |
49-
mv config/autoload/local.php.dist config/autoload/local.php
50-
mv config/autoload/mail.local.php.dist config/autoload/mail.local.php
51-
mv config/autoload/local.test.php.dist config/autoload/local.test.php
52-
5347
- name: Run static analysis with PHPStan
5448
run: vendor/bin/phpstan analyse
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
// phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols
6+
7+
function copyFile(array $file): void
8+
{
9+
if (is_readable($file['destination'])) {
10+
echo "File {$file['destination']} already exists." . PHP_EOL;
11+
} else {
12+
if (! copy($file['source'], $file['destination'])) {
13+
echo "Cannot copy {$file['source']} file to {$file['destination']}" . PHP_EOL;
14+
} else {
15+
echo "File {$file['source']} copied successfully to {$file['destination']}." . PHP_EOL;
16+
}
17+
}
18+
}
19+
20+
$files = [
21+
[
22+
'source' => 'config/autoload/local.php.dist',
23+
'destination' => 'config/autoload/local.php',
24+
],
25+
[
26+
'source' => 'config/autoload/local.test.php.dist',
27+
'destination' => 'config/autoload/local.test.php',
28+
],
29+
[
30+
'source' => 'vendor/dotkernel/dot-mail/config/mail.global.php.dist',
31+
'destination' => 'config/autoload/mail.global.php',
32+
],
33+
];
34+
35+
array_walk($files, 'copyFile');

composer.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"dotkernel/dot-flashmessenger": "^3.4.2",
3939
"dotkernel/dot-geoip": "^3.6.0",
4040
"dotkernel/dot-helpers": "^3.4.2",
41-
"dotkernel/dot-mail": "^4.1.1",
41+
"dotkernel/dot-mail": "^5.1.0",
4242
"dotkernel/dot-navigation": "^3.4.2",
4343
"dotkernel/dot-rbac-guard": "^3.4.2",
4444
"dotkernel/dot-session": "^5.6.0",
@@ -57,9 +57,8 @@
5757
},
5858
"require-dev": {
5959
"filp/whoops": "^2.15.4",
60-
"laminas/laminas-coding-standard": "^2.5.0",
60+
"laminas/laminas-coding-standard": "^3.0",
6161
"laminas/laminas-development-mode": "^3.12.0",
62-
"laminas/laminas-http": "^2.19.0",
6362
"mezzio/mezzio-tooling": "^2.9.0",
6463
"phpunit/phpunit": "^10.5.9",
6564
"roave/security-advisories": "dev-latest",
@@ -88,6 +87,9 @@
8887
"post-create-project-cmd": [
8988
"@development-enable"
9089
],
90+
"post-update-cmd": [
91+
"php bin/composer-post-install-script.php"
92+
],
9193
"development-disable": "laminas-development-mode disable",
9294
"development-enable": "laminas-development-mode enable",
9395
"development-status": "laminas-development-mode status",
@@ -101,7 +103,7 @@
101103
"cs-check": "phpcs",
102104
"cs-fix": "phpcbf",
103105
"serve": "php -S 0.0.0.0:8080 -t public/",
104-
"static-analysis": "phpstan analyse",
106+
"static-analysis": "phpstan analyse --memory-limit 1G",
105107
"test": "phpunit --colors=always",
106108
"test-coverage": "phpunit --colors=always --coverage-clover clover.xml",
107109
"twig-cs-check": "vendor/bin/twig-cs-fixer lint --config=config/twig-cs-fixer.php",

config/autoload/authentication.global.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
'identity_class' => Admin::class,
1313
'identity_property' => 'identity',
1414
'credential_property' => 'password',
15-
'credential_callable' => 'Admin\Admin\Doctrine\AdminAuthentication::verifyCredential',
1615
'messages' => [
1716
'success' => 'Authenticated successfully.',
1817
'not_found' => 'Identity not found.',

config/autoload/local.php.dist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ $databases = [
2626
];
2727

2828
return [
29-
'application' => [
29+
'application' => [
3030
'name' => $app['name'] ?? '',
3131
'url' => $baseUrl,
3232
],
33-
'databases' => $databases,
34-
'doctrine' => [
35-
'connection' => [
33+
'databases' => $databases,
34+
'doctrine' => [
35+
'connection' => [
3636
'orm_default' => [
3737
'params' => $databases['default'],
3838
],

config/autoload/mail.local.php.dist

Lines changed: 0 additions & 92 deletions
This file was deleted.

phpcs.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,8 @@
2020
<file>test</file>
2121

2222
<!-- Include all rules from the Laminas Coding Standard -->
23-
<rule ref="LaminasCodingStandard"/>
23+
<rule ref="LaminasCodingStandard">
24+
<!-- Exclude rule -->
25+
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName" />
26+
</rule>
2427
</ruleset>

src/Admin/src/Adapter/AuthenticationAdapter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Admin\Admin\Entity\AdminIdentity;
99
use Admin\Admin\Entity\AdminRole;
1010
use Doctrine\ORM\EntityManager;
11+
use Doctrine\ORM\Exception\ORMException;
1112
use Dot\DependencyInjection\Attribute\Inject;
1213
use Exception;
1314
use Laminas\Authentication\Adapter\AdapterInterface;
@@ -64,6 +65,7 @@ private function getCredential(): string
6465

6566
/**
6667
* @throws Exception
68+
* @throws ORMException
6769
*/
6870
public function authenticate(): Result
6971
{
@@ -85,6 +87,7 @@ public function authenticate(): Result
8587
[$this->config['orm_default']['messages']['not_found']]
8688
);
8789
}
90+
$this->entityManager->refresh($identityClass);
8891

8992
$getCredential = "get" . ucfirst($this->config['orm_default']['credential_property']);
9093

0 commit comments

Comments
 (0)