Skip to content

Commit

Permalink
Merge pull request #367 from Indicia-Team/fix-php8
Browse files Browse the repository at this point in the history
Update code for compatibility with PHP8
  • Loading branch information
JimBacon authored Sep 16, 2021
2 parents 12ec6f9 + 41c394b commit d32167f
Show file tree
Hide file tree
Showing 20 changed files with 1,753 additions and 532 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ language: php
php:
# Test oldest and newest maintained versions.
- '7.3'
# - '8.0'
- '8.0'

env:
# Test oldest and newest maintained versions.
Expand Down
3 changes: 2 additions & 1 deletion application/helpers/postgreSQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ public static function list_fields($entity, $db = NULL) {
SELECT column_name, column_default, is_nullable, data_type, udt_name,
character_maximum_length, numeric_precision, numeric_precision_radix, numeric_scale
FROM information_schema.columns
WHERE table_name = \'' . $entity . '\'
WHERE table_name = \'' . $entity . '\'
AND table_schema != \'information_schema\'
ORDER BY ordinal_position
');

Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/misantron/dbunit"
}
],
"require": {
"firebase/php-jwt": "^5.4",
"phpoffice/phpspreadsheet": "^1.18"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"misantron/dbunit": "^5.1"
"misantron/dbunit": "dev-master"
}
}
81 changes: 45 additions & 36 deletions 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 docker/phpunit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ docker-compose -f docker-compose-phpunit.yml build \
--build-arg GID=$(id -g) \
--build-arg USER=$(id -un) \
--build-arg GROUP=$(id -gn) \
--build-arg PHP_VERSION=7.3 \
--build-arg PHP_VERSION=8 \
--build-arg PG_VERSION=13 \
--build-arg PORT=$PORT
# When the container is brought up, the database will start
Expand Down
6 changes: 2 additions & 4 deletions docker/warehouse/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# This image contains Debian's Apache httpd in conjunction with PHP7.3
# (as mod_php) and uses mpm_prefork by default.
# This image contains Debian's Apache httpd in conjunction with PHP8.0.
# https://hub.docker.com/_/php
# Currently warehouse is not compatible with PHP 7.4
FROM php:7.3-apache
FROM php:8.0-apache
# Use PHP development configuration file
RUN mv "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
# Increase size of files which can be uploaded.
Expand Down
2 changes: 1 addition & 1 deletion modules/data_cleaner/controllers/verification_rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private function get_server_list() {
$response = curl_exec($session);
if (curl_errno($session)) {
$this->session->set_flash('flash_info', 'The list of verification rule servers could not be retrieved from the internet. ' .
'More information is avaailable in the server logs.');
'More information is available in the server logs.');
kohana::log('error', 'Error occurred when retrieving list of verification rule servers. ' . curl_error($session));
return array();
}
Expand Down
Loading

0 comments on commit d32167f

Please sign in to comment.