Updated app to PHP7.3 min supported version, For php8 support

- Updated remaining dependancies
- Upped min versions used
- Updated GH actions to drop 7.2 and include 8.0
- Updated phpunit & tests to 9.x
This commit is contained in:
Dan Brown 2021-03-20 15:35:39 +00:00
parent 44a293f051
commit 829fecd338
9 changed files with 827 additions and 504 deletions

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
php: [7.2, 7.3, 7.4]
php: [7.3, 7.4, 8.0]
steps:
- uses: actions/checkout@v1

View File

@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
php: [7.2, 7.3, 7.4]
php: [7.3, 7.4, 8.0]
steps:
- uses: actions/checkout@v1

View File

@ -5,7 +5,7 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2.5",
"php": "^7.3|^8.0",
"ext-curl": "*",
"ext-dom": "*",
"ext-gd": "*",
@ -14,7 +14,7 @@
"ext-xml": "*",
"barryvdh/laravel-dompdf": "^0.8.7",
"barryvdh/laravel-snappy": "^0.4.8",
"doctrine/dbal": "^2.9",
"doctrine/dbal": "^2.12.1",
"facade/ignition": "^1.16.4",
"fideloper/proxy": "^4.4.1",
"intervention/image": "^2.5.1",
@ -23,7 +23,7 @@
"league/commonmark": "^1.5",
"league/flysystem-aws-s3-v3": "^1.0.29",
"nunomaduro/collision": "^3.1",
"onelogin/php-saml": "^3.3",
"onelogin/php-saml": "^4.0",
"predis/predis": "^1.1.6",
"socialiteproviders/discord": "^4.1",
"socialiteproviders/gitlab": "^4.1",
@ -36,10 +36,10 @@
"require-dev": {
"barryvdh/laravel-debugbar": "^3.5.1",
"barryvdh/laravel-ide-helper": "^2.8.2",
"fakerphp/faker": "^1.9.1",
"fakerphp/faker": "^1.13.0",
"laravel/browser-kit-testing": "^5.2",
"mockery/mockery": "^1.3.3",
"phpunit/phpunit": "^8.0",
"phpunit/phpunit": "^9.5.3",
"squizlabs/php_codesniffer": "^3.5.8"
},
"autoload": {
@ -87,7 +87,7 @@
"preferred-install": "dist",
"sort-packages": true,
"platform": {
"php": "7.2.5"
"php": "7.3.0"
}
},
"extra": {

1199
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
FROM php:7.3-apache
FROM php:7.4-apache
ENV APACHE_DOCUMENT_ROOT /app/public
WORKDIR /app
@ -6,7 +6,7 @@ WORKDIR /app
RUN apt-get update -y \
&& apt-get install -y git zip unzip libtidy-dev libpng-dev libldap2-dev libxml++2.6-dev wait-for-it \
&& docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \
&& docker-php-ext-install pdo pdo_mysql tidy dom xml mbstring gd ldap \
&& docker-php-ext-install pdo pdo_mysql dom xml mbstring gd ldap \
&& a2enmod rewrite \
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
@ -8,16 +10,16 @@
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<coverage>
<include>
<directory suffix=".php">app/</directory>
</include>
</coverage>
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">app/</directory>
</whitelist>
</filter>
<php>
<server name="APP_ENV" value="testing"/>
<server name="APP_DEBUG" value="false"/>

View File

@ -119,7 +119,7 @@ abstract class BrowserKitTest extends TestCase
*/
protected function seeInNthElement($element, $position, $text, $negate = false)
{
$method = $negate ? 'assertNotRegExp' : 'assertRegExp';
$method = $negate ? 'assertDoesNotMatchRegularExpression' : 'assertMatchesRegularExpression';
$rawPattern = preg_quote($text, '/');

View File

@ -162,7 +162,7 @@ class EntityTest extends BrowserKitTest
->press('Save Book');
$expectedPattern = '/\/books\/my-first-book-[0-9a-zA-Z]{3}/';
$this->assertRegExp($expectedPattern, $this->currentUri, "Did not land on expected page [$expectedPattern].\n");
$this->assertMatchesRegularExpression($expectedPattern, $this->currentUri, "Did not land on expected page [$expectedPattern].\n");
$book = Book::where('slug', '=', 'my-first-book')->first();
return $book;

View File

@ -184,7 +184,7 @@ class ImageTest extends TestCase
$this->assertEquals('bad.phtml.png', $lastImage->name);
$this->assertEquals('bad-phtml.png', basename($lastImage->path));
$this->assertFileNotExists(public_path($relPath), 'Uploaded image file name was not stripped of dots');
$this->assertFileDoesNotExist(public_path($relPath), 'Uploaded image file name was not stripped of dots');
$this->assertFileExists(public_path($expectedRelPath));
$this->deleteImage($lastImage->path);