Skip to content

Commit d9693df

Browse files
authored
Merge pull request #218 from dotkernel/issue-198
updated composer
2 parents 5f18331 + 47b55c9 commit d9693df

8 files changed

Lines changed: 47 additions & 65 deletions

File tree

.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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DotKernel web starter package suitable for admin applications.
44

55
![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/admin)
6-
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/4.1.0)
6+
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/admin/4.3.0)
77

88
[![GitHub issues](https://img.shields.io/github/issues/dotkernel/admin)](https://github.com/dotkernel/admin/issues)
99
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/admin)](https://github.com/dotkernel/admin/network)

composer.json

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,42 +27,43 @@
2727
}
2828
},
2929
"require": {
30-
"php": "~8.1.0 || ~8.2.0",
30+
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
3131
"ext-gettext": "*",
3232
"dotkernel/dot-annotated-services": "^4.1.3",
33-
"dotkernel/dot-cli": "^3.4.1",
34-
"dotkernel/dot-controller": "^3.4.2",
35-
"dotkernel/dot-data-fixtures": "^1.1.2",
36-
"dotkernel/dot-errorhandler": "^3.3.1",
37-
"dotkernel/dot-flashmessenger": "^3.4.1",
38-
"dotkernel/dot-geoip": "^3.5.2",
39-
"dotkernel/dot-helpers": "^3.4.1",
40-
"dotkernel/dot-mail": "^4.1.0",
41-
"dotkernel/dot-navigation": "^3.4.1",
42-
"dotkernel/dot-rbac-guard": "^3.4.1",
43-
"dotkernel/dot-session": "^5.4.1",
44-
"dotkernel/dot-twigrenderer": "^3.4.1",
45-
"dotkernel/dot-user-agent-sniffer": "^3.3.2",
46-
"friendsofphp/proxy-manager-lts": "^1.0",
47-
"laminas/laminas-component-installer": "^3.3.0",
48-
"laminas/laminas-config-aggregator": "^1.13.0",
49-
"laminas/laminas-i18n": "^2.23.0",
50-
"laminas/laminas-math": "^3.6.0",
51-
"mezzio/mezzio": "^3.17.0",
52-
"mezzio/mezzio-authorization-rbac": "^1.6.0",
53-
"mezzio/mezzio-cors": "^1.9.0",
54-
"mezzio/mezzio-fastroute": "^3.10.0",
55-
"ramsey/uuid-doctrine": "^1.8.2",
56-
"roave/psr-container-doctrine": "^3.9.0"
33+
"dotkernel/dot-cli": "^3.4.2",
34+
"dotkernel/dot-controller": "^3.4.3",
35+
"dotkernel/dot-data-fixtures": "^1.1.3",
36+
"dotkernel/dot-errorhandler": "^3.3.2",
37+
"dotkernel/dot-flashmessenger": "^3.4.2",
38+
"dotkernel/dot-geoip": "^3.5.3",
39+
"dotkernel/dot-helpers": "^3.4.2",
40+
"dotkernel/dot-mail": "^4.1.1",
41+
"dotkernel/dot-navigation": "^3.4.2",
42+
"dotkernel/dot-rbac-guard": "^3.4.2",
43+
"dotkernel/dot-session": "^5.4.2",
44+
"dotkernel/dot-twigrenderer": "3.4.3",
45+
"dotkernel/dot-user-agent-sniffer": "^3.3.3",
46+
"friendsofphp/proxy-manager-lts": "^1.0.16",
47+
"laminas/laminas-component-installer": "^3.4.0",
48+
"laminas/laminas-config-aggregator": "^1.14.0",
49+
"laminas/laminas-i18n": "^2.26.0",
50+
"laminas/laminas-math": "^3.7.0",
51+
"mezzio/mezzio": "^3.18.0",
52+
"mezzio/mezzio-authorization-rbac": "^1.7.0",
53+
"mezzio/mezzio-cors": "^1.11.1",
54+
"mezzio/mezzio-fastroute": "^3.11.0",
55+
"ramsey/uuid-doctrine": "^2.0.0",
56+
"roave/psr-container-doctrine": "^4.1.0"
5757
},
5858
"require-dev": {
59-
"filp/whoops": "^2.15.3",
59+
"filp/whoops": "^2.15.4",
6060
"laminas/laminas-coding-standard": "^2.5.0",
61-
"laminas/laminas-development-mode": "^3.11.0",
62-
"mezzio/mezzio-tooling": "^2.8.0",
63-
"phpunit/phpunit": "^10.3.2",
61+
"laminas/laminas-development-mode": "^3.12.0",
62+
"laminas/laminas-http": "^2.19.0",
63+
"mezzio/mezzio-tooling": "^2.9.0",
64+
"phpunit/phpunit": "^10.5.9",
6465
"roave/security-advisories": "dev-latest",
65-
"vimeo/psalm": "^5.15.0"
66+
"vimeo/psalm": "^5.20.0"
6667
},
6768
"autoload": {
6869
"psr-4": {

config/autoload/local.php.dist

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,5 @@ return [
4040
'params' => $databases['default'],
4141
],
4242
],
43-
'configuration' => [
44-
'orm_default' => [
45-
// it is recommended to disable doctrine cache on development
46-
// just comment any type of cache you don't want to be applied on development
47-
'query_cache' => PhpFileCache::class,
48-
'metadata_cache' => PhpFileCache::class,
49-
'result_cache' => PhpFileCache::class,
50-
],
51-
],
5243
],
5344
];

src/Admin/src/Service/AdminService.php

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Frontend\Admin\Repository\AdminRepository;
2121
use Frontend\Admin\Repository\AdminRoleRepository;
2222
use Frontend\App\Service\IpService;
23-
use GeoIp2\Exception\AddressNotFoundException;
2423

2524
use function implode;
2625
use function is_string;
@@ -217,29 +216,20 @@ public function updateAdmin(Admin $admin, array $data): Admin
217216
public function logAdminVisit(array $serverParams, string $name): AdminLogin
218217
{
219218
$deviceData = $this->deviceService->getDetails($serverParams['HTTP_USER_AGENT']);
220-
$deviceOs = ! empty($deviceData->getOs()) ? $deviceData->getOs() : null;
221-
$deviceClient = ! empty($deviceData->getClient()) ? $deviceData->getClient() : null;
219+
$deviceOs = ! empty($deviceData->getOs()->getName()) ? $deviceData->getOs() : null;
220+
$deviceClient = ! empty($deviceData->getClient()->getName()) ? $deviceData->getClient() : null;
222221

223222
$ipAddress = IpService::getUserIp($serverParams);
224223

225-
try {
226-
$country = ! empty($this->locationService->getCountry($ipAddress)) ?
227-
$this->locationService->getCountry($ipAddress)->getName() : '';
228-
} catch (AddressNotFoundException $e) {
229-
$country = '';
230-
}
231-
try {
232-
$continent = ! empty($this->locationService->getContinent($ipAddress)) ?
233-
$this->locationService->getContinent($ipAddress)->getName() : '';
234-
} catch (AddressNotFoundException $e) {
235-
$continent = '';
236-
}
237-
try {
238-
$organization = ! empty($this->locationService->getOrganization($ipAddress)) ?
239-
$this->locationService->getOrganization($ipAddress)->getName() : '';
240-
} catch (AddressNotFoundException $e) {
241-
$organization = '';
242-
}
224+
$country = ! empty($this->locationService->getCountry($ipAddress)->getName()) ?
225+
$this->locationService->getCountry($ipAddress)->getName() : '';
226+
227+
$continent = ! empty($this->locationService->getContinent($ipAddress)->getName()) ?
228+
$this->locationService->getContinent($ipAddress)->getName() : '';
229+
230+
$organization = ! empty($this->locationService->getOrganization($ipAddress)->getName()) ?
231+
$this->locationService->getOrganization($ipAddress)->getName() : '';
232+
243233
$deviceType = ! empty($deviceData->getType()) ? $deviceData->getType() : null;
244234
$deviceBrand = ! empty($deviceData->getBrand()) ? $deviceData->getBrand() : null;
245235
$deviceModel = ! empty($deviceData->getModel()) ? $deviceData->getModel() : null;

0 commit comments

Comments
 (0)