mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Issue #3006751: PHP 7 support
This commit is contained in:
commit
f00927a835
77
Dockerfile
77
Dockerfile
|
@ -1,5 +1,5 @@
|
||||||
# Inherit from the PHP 5.6 Apache image on Docker Hub.
|
# Inherit from the Drupal 7 image on Docker Hub.
|
||||||
FROM php:5.6-apache
|
FROM drupal:7
|
||||||
|
|
||||||
# Set environment variables.
|
# Set environment variables.
|
||||||
ENV FARMOS_VERSION 7.x-1.0-beta18
|
ENV FARMOS_VERSION 7.x-1.0-beta18
|
||||||
|
@ -9,45 +9,23 @@ ENV FARMOS_DEV false
|
||||||
# Enable Apache rewrite module.
|
# Enable Apache rewrite module.
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
# Install the PHP extensions that Drupal needs.
|
# Install the BCMath PHP extension.
|
||||||
RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libpq-dev \
|
RUN docker-php-ext-install bcmath
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \
|
|
||||||
&& docker-php-ext-install bcmath gd mbstring opcache pdo pdo_mysql pdo_pgsql zip
|
|
||||||
|
|
||||||
# Set recommended PHP settings for farmOS.
|
# Build and install the Uploadprogress PHP extension.
|
||||||
# See https://farmos.org/hosting/installing/#requirements
|
# See http://git.php.net/?p=pecl/php/uploadprogress.git
|
||||||
RUN { \
|
RUN curl -fsSL 'http://git.php.net/?p=pecl/php/uploadprogress.git;a=snapshot;h=95d8a0fd4554e10c215d3ab301e901bd8f99c5d9;sf=tgz' -o php-uploadprogress.tar.gz \
|
||||||
echo 'memory_limit=256M'; \
|
&& tar -xzf php-uploadprogress.tar.gz \
|
||||||
echo 'max_execution_time=240'; \
|
&& rm php-uploadprogress.tar.gz \
|
||||||
echo 'max_input_time=240'; \
|
&& ( \
|
||||||
echo 'max_input_vars=5000'; \
|
cd uploadprogress-95d8a0f \
|
||||||
} > /usr/local/etc/php/conf.d/farmOS-recommended.ini
|
&& phpize \
|
||||||
|
&& ./configure --enable-uploadprogress \
|
||||||
# Set recommended realpath_cache settings.
|
&& make \
|
||||||
# See https://www.drupal.org/docs/7/managing-site-performance/tuning-phpini-for-drupal
|
&& make install \
|
||||||
RUN { \
|
) \
|
||||||
echo 'realpath_cache_size=256K'; \
|
&& rm -r uploadprogress-95d8a0f
|
||||||
echo 'realpath_cache_ttl=3600'; \
|
RUN docker-php-ext-enable uploadprogress
|
||||||
} > /usr/local/etc/php/conf.d/realpath_cache-recommended.ini
|
|
||||||
|
|
||||||
# Set recommended opcache settings.
|
|
||||||
# See https://secure.php.net/manual/en/opcache.installation.php
|
|
||||||
RUN { \
|
|
||||||
echo 'opcache.memory_consumption=128'; \
|
|
||||||
echo 'opcache.interned_strings_buffer=8'; \
|
|
||||||
echo 'opcache.max_accelerated_files=50000'; \
|
|
||||||
echo 'opcache.revalidate_freq=60'; \
|
|
||||||
echo 'opcache.fast_shutdown=1'; \
|
|
||||||
echo 'opcache.enable_cli=1'; \
|
|
||||||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini
|
|
||||||
|
|
||||||
# Install PECL Uploadprogress.
|
|
||||||
RUN pecl install uploadprogress \
|
|
||||||
&& echo 'extension=uploadprogress.so' > /usr/local/etc/php/conf.d/uploadprogress.ini
|
|
||||||
|
|
||||||
# Install git and unzip for use by Drush Make.
|
|
||||||
RUN apt-get update && apt-get install -y git unzip
|
|
||||||
|
|
||||||
# Build and install the GEOS PHP extension.
|
# Build and install the GEOS PHP extension.
|
||||||
# See https://git.osgeo.org/gitea/geos/php-geos
|
# See https://git.osgeo.org/gitea/geos/php-geos
|
||||||
|
@ -65,12 +43,31 @@ RUN curl -fsSL 'https://git.osgeo.org/gitea/geos/php-geos/archive/1.0.0.tar.gz'
|
||||||
&& rm -r php-geos
|
&& rm -r php-geos
|
||||||
RUN docker-php-ext-enable geos
|
RUN docker-php-ext-enable geos
|
||||||
|
|
||||||
|
# Set recommended PHP settings for farmOS.
|
||||||
|
# See https://farmos.org/hosting/installing/#requirements
|
||||||
|
RUN { \
|
||||||
|
echo 'memory_limit=256M'; \
|
||||||
|
echo 'max_execution_time=240'; \
|
||||||
|
echo 'max_input_time=240'; \
|
||||||
|
echo 'max_input_vars=5000'; \
|
||||||
|
} > /usr/local/etc/php/conf.d/farmOS-recommended.ini
|
||||||
|
|
||||||
|
# Set recommended realpath_cache settings.
|
||||||
|
# See https://www.drupal.org/docs/7/managing-site-performance/tuning-phpini-for-drupal
|
||||||
|
RUN { \
|
||||||
|
echo 'realpath_cache_size=256K'; \
|
||||||
|
echo 'realpath_cache_ttl=3600'; \
|
||||||
|
} > /usr/local/etc/php/conf.d/realpath_cache-recommended.ini
|
||||||
|
|
||||||
# Install Drush 8 with the phar file.
|
# Install Drush 8 with the phar file.
|
||||||
ENV DRUSH_VERSION 8.1.16
|
ENV DRUSH_VERSION 8.1.16
|
||||||
RUN curl -fsSL -o /usr/local/bin/drush "https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar" && \
|
RUN curl -fsSL -o /usr/local/bin/drush "https://github.com/drush-ops/drush/releases/download/$DRUSH_VERSION/drush.phar" && \
|
||||||
chmod +x /usr/local/bin/drush && \
|
chmod +x /usr/local/bin/drush && \
|
||||||
drush core-status
|
drush core-status
|
||||||
|
|
||||||
|
# Install git and unzip for use by Drush Make.
|
||||||
|
RUN apt-get update && apt-get install -y git unzip
|
||||||
|
|
||||||
# Mount a volume at /var/www/html.
|
# Mount a volume at /var/www/html.
|
||||||
VOLUME /var/www/html
|
VOLUME /var/www/html
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,8 @@ projects[openlayers][patch][] = "http://www.drupal.org/files/issues/openlayers_g
|
||||||
projects[openlayers][patch][] = "http://www.drupal.org/files/issues/openlayers_ol4_zoomtosource-2911611-4.patch"
|
projects[openlayers][patch][] = "http://www.drupal.org/files/issues/openlayers_ol4_zoomtosource-2911611-4.patch"
|
||||||
; Issue #2946213: Google maps do not support fractional zoom
|
; Issue #2946213: Google maps do not support fractional zoom
|
||||||
projects[openlayers][patch][] = "http://www.drupal.org/files/issues/openlayers_googlemaps_fractional_zoom-2946213-2.patch"
|
projects[openlayers][patch][] = "http://www.drupal.org/files/issues/openlayers_googlemaps_fractional_zoom-2946213-2.patch"
|
||||||
|
; Issue #3006751: PHP 7 support
|
||||||
|
projects[openlayers][patch][] = "http://www.drupal.org/files/issues/2018-10-30/openlayers-2952602-6-php-72.patch"
|
||||||
|
|
||||||
projects[openlayers_geolocate_button][subdir] = "contrib"
|
projects[openlayers_geolocate_button][subdir] = "contrib"
|
||||||
projects[openlayers_geolocate_button][version] = "3.2"
|
projects[openlayers_geolocate_button][version] = "3.2"
|
||||||
|
@ -191,6 +193,8 @@ projects[module_filter][version] = "2.1"
|
||||||
; -----------------------------------------------------------------------------
|
; -----------------------------------------------------------------------------
|
||||||
|
|
||||||
projects[bootstrap][version] = "3.21"
|
projects[bootstrap][version] = "3.21"
|
||||||
|
; Issue #2999011: PHP 7 - Warning: count(): Parameter must be an array or an object that implements Countable
|
||||||
|
projects[bootstrap][patch][] = "http://www.drupal.org/files/issues/2018-09-14/php7-countable-2999011-9.patch"
|
||||||
|
|
||||||
; -----------------------------------------------------------------------------
|
; -----------------------------------------------------------------------------
|
||||||
; Libraries
|
; Libraries
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
namespace Drupal\farm_map\Plugin\Control\OLGeocoder;
|
namespace Drupal\farm_map\Plugin\Control\OLGeocoder;
|
||||||
|
|
||||||
use Drupal\openlayers\Types\Control;
|
use Drupal\openlayers\Types\Control;
|
||||||
use Drupal\openlayers\Types\ObjectInterface;
|
use Drupal\openlayers\Types\BaseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class OLGeocoder.
|
* Class OLGeocoder.
|
||||||
|
@ -22,7 +22,7 @@ class OLGeocoder extends Control {
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function preBuild(array &$build, ObjectInterface $context = NULL) {
|
public function preBuild(array &$build, BaseInterface $context = NULL) {
|
||||||
parent::preBuild($build, $context);
|
parent::preBuild($build, $context);
|
||||||
$options = array(
|
$options = array(
|
||||||
'type' => 'external',
|
'type' => 'external',
|
||||||
|
|
Loading…
Reference in a new issue