Skip to content

Commit

Permalink
feat: use PHP 7.4 during development
Browse files Browse the repository at this point in the history
  • Loading branch information
thorsten committed Mar 7, 2020
1 parent 733e9bc commit d172332
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 33 deletions.
11 changes: 3 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@ end_of_line = LF
insert_final_newline = true

# PHP files
[{*.php}]
[*.php]
indent_style = space
indent_size = 4

# HTML, SCSS and JS files
[{*.html,*.scss,*.js}]
# HTML, SCSS, JS, YAML and JSON files
[{*.html,*.scss,*.js,*.json,*.yml}]
indent_style = space
indent_size = 2

# JSON and LESS files
[{package.json,.travis.yml,*.less}]
indent_style = space
indent_size = 2
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#
# This image uses a php:7.3-apache base image and do not have any phpMyFAQ code with it.
# This image uses a php:7.4-apache base image and do not have any phpMyFAQ code with it.
# It's for development only, it's meant to be run with docker-compose
#

#####################################
#=== Unique stage without payload ===
#####################################
FROM php:7.3-apache
FROM php:7.4-apache

#=== Install gd php dependencie ===
#=== Install gd PHP dependencies ===
RUN set -x \
&& buildDeps="libpng-dev libjpeg-dev libfreetype6-dev" \
&& buildDeps="libfreetype6-dev libjpeg62-turbo-dev libpng-dev" \
&& apt-get update && apt-get install -y ${buildDeps} --no-install-recommends \
\
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install gd \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd \
\
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*

#=== Install ldap php dependencie ===
#=== Install ldap PHP dependencies ===
RUN set -x \
&& buildDeps="libldap2-dev" \
&& apt-get update && apt-get install -y ${buildDeps} --no-install-recommends \
Expand All @@ -30,7 +30,7 @@ RUN set -x \
&& apt-get purge -y ${buildDeps} \
&& rm -rf /var/lib/apt/lists/*

#=== Install intl, soap opcache, and zip php dependencie ===
#=== Install intl, opcache and zip PHP dependencies ===
RUN set -x \
&& buildDeps="libicu-dev zlib1g-dev libxml2-dev libzip-dev" \
&& apt-get update && apt-get install -y ${buildDeps} --no-install-recommends \
Expand All @@ -45,7 +45,7 @@ RUN set -x \

#=== Install mysqli php dependencie ===
RUN set -x \
&& docker-php-ext-install mysqli
&& docker-php-ext-install pdo pdo_mysql mysqli

#=== Install pgsql dependencie ===
RUN set -ex \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ _Running using named volumes:_
- **elasticsearch**: Open Source Software image (it means it does not have XPack installed)
- **phpmyadmin**: a PHP tool to have a look on your database.

_Running apache web server with PHP 7.3 support:_
_Running apache web server with PHP 7.4 support:_

- **phpmyfaq**: mounts the `phpmyfaq` folder in place of `/var/www/html`.

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
volumes:
- ./volumes/sessions:/sessions
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.6
image: docker.elastic.co/elasticsearch/elasticsearch:6.8.7
container_name: elasticsearch-v6
restart: always
environment:
Expand Down
25 changes: 12 additions & 13 deletions phpmyfaq/setup/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/**
* The main phpMyFAQ Setup.
*
* This script checks the complete environment, writes the database connection
* parameters into the file config/database.php and the configuration into the database.
* This Source Code Form is subject to the terms of the Mozilla Public License,
Expand All @@ -21,12 +22,9 @@
* @since 2002-08-20
*/

use Composer\Autoload\ClassLoader;
use phpMyFAQ\Installer;
use phpMyFAQ\Strings;
use phpMyFAQ\System;
use Composer\Autoload\ClassLoader;use phpMyFAQ\Installer;use phpMyFAQ\Strings;use phpMyFAQ\System;

define('COPYRIGHT', '&copy; 2001-2019 <a href="https://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> ');
define('COPYRIGHT', '&copy; 2001-2020 <a href="https://www.phpmyfaq.de/">phpMyFAQ Team</a> | Follow us on <a href="http://twitter.com/phpMyFAQ">Twitter</a> ');
define('PMF_ROOT_DIR', dirname(dirname(__FILE__)));
define('PMF_SRC_DIR', PMF_ROOT_DIR . '/src');
define('IS_VALID_PHPMYFAQ', null);
Expand All @@ -50,10 +48,10 @@

$loader = new ClassLoader();
$loader->add('phpMyFAQ', PMF_SRC_DIR);
$loader->register()
$loader->register();
?>
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
Expand Down Expand Up @@ -102,7 +100,7 @@
phpMyFAQ <?= System::getVersion() ?>
</h1>
<p class="text-center">
Did you already read the <a target="_blank" href="https://www.phpmyfaq.de/docs/3.0">documentation</a>
Did you already read the <a target="_blank" href="https://www.phpmyfaq.de/docs/3.1">documentation</a>
carefully before starting the phpMyFAQ setup?
</p>
</div>
Expand Down Expand Up @@ -320,35 +318,36 @@
<div class="form-group row">
<label class="col-sm-3 col-form-label"for="realname">Your name:</label>
<div class="col-sm-9">
<input type="text" name="realname" id="realname" class="form-control">
<input type="text" name="realname" id="realname" class="form-control" required>
<small class="form-text text-muted">Please enter your real name.</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label"for="email">Your email address:</label>
<div class="col-sm-9">
<input type="email" name="email" id="email" class="form-control">
<input type="email" name="email" id="email" class="form-control" required>
<small class="form-text text-muted">Please enter your email adress.</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label"for="loginname">Your login name:</label>
<div class="col-sm-9">
<input type="text" name="loginname" id="loginname" class="form-control">
<input type="text" name="loginname" id="loginname" class="form-control" required>
<small class="form-text text-muted">Please enter your login name.</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label"for="password">Your password:</label>
<div class="col-sm-9">
<input type="password" name="password" id="password" class="form-control">
<input type="password" name="password" id="password" class="form-control" required>
<small class="form-text text-muted">Please enter your password.</small>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3 col-form-label"for="password_retype">Retype password:</label>
<div class="col-sm-9">
<input type="password" name="password_retyped" id="password_retype" class="form-control">
<input type="password" name="password_retyped" id="password_retype" class="form-control"
required>
<small class="form-text text-muted">Please retype your password.</small>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion phpmyfaq/src/phpMyFAQ/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class System
/**
* Patch level.
*/
private const VERSION_PATCH_LEVEL = 1;
private const VERSION_PATCH_LEVEL = 0;

/**
* Pre-release version.
Expand Down

0 comments on commit d172332

Please sign in to comment.