Skip to content

Commit 9d946c0

Browse files
authored
Merge pull request #445 from HiEventsDev/develop
2 parents b42497f + 1804ec1 commit 9d946c0

18 files changed

+1597
-1472
lines changed

.github/workflows/unit-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515

1616
strategy:
1717
matrix:
18-
php-versions: ['8.2', '8.3']
18+
php-versions: ['8.2', '8.3', '8.4']
1919

2020
steps:
2121
- name: Checkout code

backend/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM serversideup/php:8.3-fpm-nginx-alpine
1+
FROM serversideup/php:8.4-fpm-nginx-alpine
22

33
ENV PHP_OPCACHE_ENABLE=1
44

backend/Dockerfile.dev

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1-
FROM webdevops/php-nginx:8.2-alpine
1+
FROM serversideup/php:8.4-fpm-nginx-alpine
22

3-
WORKDIR /app
3+
ENV PHP_OPCACHE_ENABLE=1
4+
ENV NGINX_WEBROOT=/var/www/html/public
45

5-
COPY . /app
6+
WORKDIR /var/www/html
67

7-
ENV WEB_DOCUMENT_ROOT /app/public
8+
RUN mkdir -p /var/www/html/storage /var/www/html/bootstrap/cache \
9+
&& chown -R www-data:www-data /var/www/html
810

9-
ENV PHP_DISMOD=ioncube,pdo_sqlsrv,sqlsrv,pdo_mysql,mysqli,mysqlnd,pdo_sqlite,mysqlnd,mongodb,memcached
11+
COPY --chown=www-data:www-data . /var/www/html
1012

11-
COPY ./docker/supervisord/syslog.conf /opt/docker/etc/supervisor.d/syslog.conf
13+
# Switch to root user to install PHP extensions
14+
USER root
15+
RUN install-php-extensions intl
16+
USER www-data
1217

13-
RUN chown -R application:application /app \
14-
&& mkdir -p /app/storage \
15-
&& chmod -R 755 /app/storage \
16-
&& mkdir -p /app/bootstrap/cache \
17-
&& chmod -R 775 /app/bootstrap/cache
18-
19-
EXPOSE 80 443
20-
21-
CMD ["supervisord"]
18+
RUN chmod -R 755 /var/www/html/storage \
19+
&& chmod -R 775 /var/www/html/bootstrap/cache

backend/app/DomainObjects/Generated/AttendeeCheckInDomainObjectAbstract.php

+14
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ abstract class AttendeeCheckInDomainObjectAbstract extends \HiEvents\DomainObjec
1515
final public const PRODUCT_ID = 'product_id';
1616
final public const ATTENDEE_ID = 'attendee_id';
1717
final public const EVENT_ID = 'event_id';
18+
final public const ORDER_ID = 'order_id';
1819
final public const SHORT_ID = 'short_id';
1920
final public const IP_ADDRESS = 'ip_address';
2021
final public const DELETED_AT = 'deleted_at';
@@ -26,6 +27,7 @@ abstract class AttendeeCheckInDomainObjectAbstract extends \HiEvents\DomainObjec
2627
protected int $product_id;
2728
protected int $attendee_id;
2829
protected int $event_id;
30+
protected ?int $order_id = null;
2931
protected string $short_id;
3032
protected string $ip_address;
3133
protected ?string $deleted_at = null;
@@ -40,6 +42,7 @@ public function toArray(): array
4042
'product_id' => $this->product_id ?? null,
4143
'attendee_id' => $this->attendee_id ?? null,
4244
'event_id' => $this->event_id ?? null,
45+
'order_id' => $this->order_id ?? null,
4346
'short_id' => $this->short_id ?? null,
4447
'ip_address' => $this->ip_address ?? null,
4548
'deleted_at' => $this->deleted_at ?? null,
@@ -103,6 +106,17 @@ public function getEventId(): int
103106
return $this->event_id;
104107
}
105108

109+
public function setOrderId(?int $order_id): self
110+
{
111+
$this->order_id = $order_id;
112+
return $this;
113+
}
114+
115+
public function getOrderId(): ?int
116+
{
117+
return $this->order_id;
118+
}
119+
106120
public function setShortId(string $short_id): self
107121
{
108122
$this->short_id = $short_id;

backend/app/DomainObjects/Generated/PersonalAccessTokenDomainObjectAbstract.php

-14
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ abstract class PersonalAccessTokenDomainObjectAbstract extends \HiEvents\DomainO
1111
final public const SINGULAR_NAME = 'personal_access_token';
1212
final public const PLURAL_NAME = 'personal_access_tokens';
1313
final public const ID = 'id';
14-
final public const ACCOUNT_ID = 'account_id';
1514
final public const TOKENABLE_TYPE = 'tokenable_type';
1615
final public const TOKENABLE_ID = 'tokenable_id';
1716
final public const NAME = 'name';
@@ -23,7 +22,6 @@ abstract class PersonalAccessTokenDomainObjectAbstract extends \HiEvents\DomainO
2322
final public const UPDATED_AT = 'updated_at';
2423

2524
protected int $id;
26-
protected int $account_id;
2725
protected string $tokenable_type;
2826
protected int $tokenable_id;
2927
protected string $name;
@@ -38,7 +36,6 @@ public function toArray(): array
3836
{
3937
return [
4038
'id' => $this->id ?? null,
41-
'account_id' => $this->account_id ?? null,
4239
'tokenable_type' => $this->tokenable_type ?? null,
4340
'tokenable_id' => $this->tokenable_id ?? null,
4441
'name' => $this->name ?? null,
@@ -62,17 +59,6 @@ public function getId(): int
6259
return $this->id;
6360
}
6461

65-
public function setAccountId(int $account_id): self
66-
{
67-
$this->account_id = $account_id;
68-
return $this;
69-
}
70-
71-
public function getAccountId(): int
72-
{
73-
return $this->account_id;
74-
}
75-
7662
public function setTokenableType(string $tokenable_type): self
7763
{
7864
$this->tokenable_type = $tokenable_type;

backend/app/Resources/Attendee/AttendeeWithCheckInPublicResource.php

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function toArray(Request $request): array
2424
'product_price_id' => $this->getProductPriceId(),
2525
'status' => $this->getStatus(),
2626
'locale' => $this->getLocale(),
27+
'order_id' => $this->getOrderId(),
2728
$this->mergeWhen($this->getCheckIn() !== null, [
2829
'check_in' => new AttendeeCheckInPublicResource($this->getCheckIn()),
2930
]),

backend/app/Resources/CheckInList/AttendeeCheckInPublicResource.php

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public function toArray($request): array
1818
'check_in_list_id' => $this->getCheckInListId(),
1919
'attendee_id' => $this->getAttendeeId(),
2020
'checked_in_at' => $this->getCreatedAt(),
21+
'order_id' => $this->getOrderId(),
2122
];
2223
}
2324
}

backend/app/Services/Domain/CheckInList/CreateAttendeeCheckInService.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Exception;
66
use HiEvents\DataTransferObjects\ErrorBagDTO;
7+
use HiEvents\DomainObjects\AttendeeCheckInDomainObject;
78
use HiEvents\DomainObjects\AttendeeDomainObject;
89
use HiEvents\DomainObjects\CheckInListDomainObject;
910
use HiEvents\DomainObjects\Enums\AttendeeCheckInActionType;
@@ -250,9 +251,10 @@ private function createCheckIn(
250251
AttendeeDomainObject $attendee,
251252
CheckInListDomainObject $checkInList,
252253
string $checkInUserIpAddress
253-
): object
254+
): AttendeeCheckInDomainObject
254255
{
255256
return $this->attendeeCheckInRepository->create([
257+
AttendeeCheckInDomainObjectAbstract::ORDER_ID => $attendee->getOrderId(),
256258
AttendeeCheckInDomainObjectAbstract::ATTENDEE_ID => $attendee->getId(),
257259
AttendeeCheckInDomainObjectAbstract::CHECK_IN_LIST_ID => $checkInList->getId(),
258260
AttendeeCheckInDomainObjectAbstract::IP_ADDRESS => $checkInUserIpAddress,

backend/app/Services/Infrastructure/DomainObjectGenerator/ClassGenerator.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ class ClassGenerator
4040
private array $defaultIgnoreProperties = [];
4141

4242
private array $ignoredTables = [
43-
'migrations'
43+
'migrations',
44+
'job_batches',
45+
'failed_jobs',
4446
];
4547

4648
private AbstractSchemaManager $schemaManager;

backend/composer.json

+10-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"barryvdh/laravel-dompdf": "^3.0",
1212
"brick/money": "^0.8.0",
1313
"doctrine/dbal": "^3.6",
14-
"druc/laravel-langscanner": "^2.2",
14+
"druc/laravel-langscanner": "dev-l12-compatibility",
1515
"ezyang/htmlpurifier": "^4.17",
1616
"guzzlehttp/guzzle": "^7.2",
17-
"laravel/framework": "^11.0",
17+
"laravel/framework": "^12.0",
1818
"laravel/sanctum": "^4.0",
1919
"laravel/tinker": "^2.8",
2020
"laravel/vapor-core": "^2.37",
@@ -35,7 +35,7 @@
3535
"laravel/sail": "^1.22",
3636
"mockery/mockery": "^1.4.4",
3737
"nunomaduro/collision": "^8.1",
38-
"phpunit/phpunit": "^10.1",
38+
"phpunit/phpunit": "^11.0",
3939
"spatie/laravel-ignition": "^2.0"
4040
},
4141
"autoload": {
@@ -80,5 +80,11 @@
8080
}
8181
},
8282
"minimum-stability": "stable",
83-
"prefer-stable": true
83+
"prefer-stable": true,
84+
"repositories": [
85+
{
86+
"type": "vcs",
87+
"url": "https://github.com/laravel-shift/laravel-langscanner.git"
88+
}
89+
]
8490
}

0 commit comments

Comments
 (0)