Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: 8.5
tools: composer:v2
coverage: none

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
php-versions: ['8.3', '8.4']
php-versions: ['8.3', '8.4', '8.5']

services:
# Postgres is started for the Feature suite. The Unit suite does not need
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, pdo_pgsql, pgsql, tokenizer
extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, pdo_pgsql, pgsql, tokenizer, gd
ini-values: post_max_size=256M, upload_max_filesize=256M
coverage: none

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.all-in-one
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ COPY ./VERSION /app/VERSION
RUN yarn install --network-timeout 600000 --frozen-lockfile && yarn build

# Use stable multi-arch serversideup/php image
FROM serversideup/php:8.3-fpm-alpine
FROM serversideup/php:8.5-fpm-alpine

ENV PHP_OPCACHE_ENABLE=1

# Switch to root for installing extensions and packages
USER root

RUN install-php-extensions intl
RUN install-php-extensions intl gd

RUN apk add --no-cache nodejs yarn nginx supervisor dos2unix

Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM serversideup/php:8.4-fpm-nginx-alpine
FROM serversideup/php:8.5-fpm-nginx-alpine

ENV PHP_OPCACHE_ENABLE=1

Expand All @@ -9,7 +9,7 @@ RUN echo "" >> /usr/local/etc/php-fpm.d/docker-php-serversideup-pool.conf && \
echo "user = www-data" >> /usr/local/etc/php-fpm.d/docker-php-serversideup-pool.conf && \
echo "group = www-data" >> /usr/local/etc/php-fpm.d/docker-php-serversideup-pool.conf

RUN install-php-extensions intl imagick
RUN install-php-extensions intl imagick gd

COPY --chown=www-data:www-data . .

Expand Down
4 changes: 2 additions & 2 deletions backend/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM serversideup/php:8.4-fpm-nginx-alpine
FROM serversideup/php:8.5-fpm-nginx-alpine

ENV PHP_OPCACHE_ENABLE=1
ENV NGINX_WEBROOT=/var/www/html/public
Expand All @@ -12,7 +12,7 @@ COPY --chown=www-data:www-data . /var/www/html

# Switch to root user to install PHP extensions
USER root
RUN install-php-extensions intl imagick
RUN install-php-extensions intl imagick gd
USER www-data

RUN chmod -R 755 /var/www/html/storage \
Expand Down
7 changes: 3 additions & 4 deletions backend/app/Exports/AffiliatesExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

use Carbon\Carbon;
use HiEvents\DomainObjects\AffiliateDomainObject;
use HiEvents\Resources\Affiliate\AffiliateResource;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
Expand All @@ -23,9 +22,9 @@ public function withData(LengthAwarePaginator $affiliates): AffiliatesExport
return $this;
}

public function collection(): AnonymousResourceCollection
public function collection(): Collection
{
return AffiliateResource::collection($this->affiliates);
return collect($this->affiliates->items());
}

public function headings(): array
Expand Down
8 changes: 4 additions & 4 deletions backend/app/Exports/AttendeesExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
use HiEvents\DomainObjects\ProductDomainObject;
use HiEvents\DomainObjects\ProductPriceDomainObject;
use HiEvents\DomainObjects\QuestionDomainObject;
use HiEvents\Resources\Attendee\AttendeeResource;
use HiEvents\Services\Domain\Question\QuestionAnswerFormatter;
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
Expand All @@ -39,9 +37,11 @@ public function withData(LengthAwarePaginator|Collection $data, Collection $prod
return $this;
}

public function collection(): AnonymousResourceCollection
public function collection(): Collection
{
return AttendeeResource::collection($this->data);
return $this->data instanceof Collection
? $this->data
: collect($this->data->items());
}

public function headings(): array
Expand Down
6 changes: 2 additions & 4 deletions backend/app/Exports/OrdersExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
use HiEvents\DomainObjects\OrderDomainObject;
use HiEvents\DomainObjects\OrderItemDomainObject;
use HiEvents\DomainObjects\QuestionDomainObject;
use HiEvents\Resources\Order\OrderResource;
use HiEvents\Services\Domain\Question\QuestionAnswerFormatter;
use Illuminate\Http\Resources\Json\AnonymousResourceCollection;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
Expand All @@ -35,9 +33,9 @@ public function withData(LengthAwarePaginator $orders, Collection $questions): O
return $this;
}

public function collection(): AnonymousResourceCollection
public function collection(): Collection
{
return OrderResource::collection($this->orders);
return collect($this->orders->items());
}

public function headings(): array
Expand Down
8 changes: 5 additions & 3 deletions backend/app/Exports/PromoCodesExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace HiEvents\Exports;

use HiEvents\Resources\PromoCode\PromoCodeResource;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\WithMapping;
Expand All @@ -19,9 +19,11 @@ public function withData($data): PromoCodesExport
return $this;
}

public function collection()
public function collection(): Collection
{
return PromoCodeResource::collection($this->data);
return $this->data instanceof Collection
? $this->data
: collect(is_array($this->data) ? $this->data : $this->data->items());
}

public function headings(): array
Expand Down
4 changes: 2 additions & 2 deletions backend/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"laravel/vapor-core": "^2.37",
"league/flysystem-aws-s3-v3": "^3.0",
"liquid/liquid": "^1.4",
"maatwebsite/excel": "^3.1",
"maatwebsite/excel": "4.x-dev",
"nette/php-generator": "^4.0",
"php-open-source-saver/jwt-auth": "^2.1",
"sentry/sentry-laravel": "^4.13",
Expand Down Expand Up @@ -90,7 +90,7 @@
"php-http/discovery": true
}
},
"minimum-stability": "stable",
"minimum-stability": "dev",
"prefer-stable": true,
"repositories": [
{
Expand Down
72 changes: 42 additions & 30 deletions backend/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion backend/config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],

Expand Down
2 changes: 0 additions & 2 deletions backend/tests/Feature/Auth/ResetPasswordTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ public function test_reset_password_with_valid_token(): void
// extract the token from the email
$reflection = new ReflectionClass($email);
$tokenProperty = $reflection->getProperty('token');
$tokenProperty->setAccessible(true);
$token = $tokenProperty->getValue($email);

$response2 = $this->getJson(self::RESET_PASSWORD_ROUTE . '/' . urlencode($token));
Expand Down Expand Up @@ -138,7 +137,6 @@ public function test_reset_password_with_old_password(): void
// extract the token from the email
$reflection = new ReflectionClass($email);
$tokenProperty = $reflection->getProperty('token');
$tokenProperty->setAccessible(true);
$token = $tokenProperty->getValue($email);

$response2 = $this->postJson(self::RESET_PASSWORD_ROUTE . '/' . urlencode($token), [
Expand Down
Loading