Upgrade to PHP 8

This commit is contained in:
Igor Scheller 2021-01-03 01:47:39 +01:00 committed by msquare
parent c2b2487721
commit 6aca6f08e2
4 changed files with 15 additions and 9 deletions

View File

@ -28,7 +28,7 @@ COPY --from=composer /app/composer.lock /app/
RUN find /app/storage/ -type f -not -name VERSION -exec rm {} \;
# Build the PHP container
FROM php:7-fpm-alpine
FROM php:8-fpm-alpine
WORKDIR /var/www
RUN apk add --no-cache icu-dev && \
docker-php-ext-install intl pdo_mysql

View File

@ -1,11 +1,11 @@
# Engelsystem PHP FPM development image including Xdebug
FROM php:7-fpm-alpine AS es_php_fpm
FROM php:8-fpm-alpine AS es_php_fpm
WORKDIR /var/www
RUN apk add --no-cache icu-dev $PHPIZE_DEPS && \
pecl install pcov xdebug && \
docker-php-ext-install intl pdo_mysql && \
docker-php-ext-enable pcov xdebug
RUN echo -e "xdebug.remote_enable=1\nxdebug.remote_connect_back=1\n" >> /usr/local/etc/php/conf.d/xdebug.ini
RUN echo -e "xdebug.mode=debug\nxdebug.discover_client_host=1\n" >> /usr/local/etc/php/conf.d/xdebug.ini
ENV TRUSTED_PROXIES 10.0.0.0/8,::ffff:10.0.0.0/8,\
127.0.0.0/8,::ffff:127.0.0.0/8,\

View File

@ -11,6 +11,9 @@ http {
scgi_temp_path /tmp/scgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
map $http_x_forwarded_proto $forwarded_proto {
default $http_x_forwarded_proto;
https https;

View File

@ -115,12 +115,15 @@ function load_rooms()
*/
function load_days()
{
$days = DB::select('
$days = (new Collection(DB::select(
'
SELECT DISTINCT DATE(FROM_UNIXTIME(`start`)) AS `id`, DATE(FROM_UNIXTIME(`start`)) AS `name`
FROM `Shifts`
ORDER BY `id`, `name`
');
$days = array_map('array_shift', $days);
'
)))
->pluck('id')
->toArray();
if (empty($days)) {
error(__('The administration has not configured any shifts yet.'));