mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-25 09:42:10 +08:00
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:
parent
44a293f051
commit
829fecd338
2
.github/workflows/phpunit.yml
vendored
2
.github/workflows/phpunit.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php: [7.2, 7.3, 7.4]
|
php: [7.3, 7.4, 8.0]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
|
2
.github/workflows/test-migrations.yml
vendored
2
.github/workflows/test-migrations.yml
vendored
|
@ -17,7 +17,7 @@ jobs:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php: [7.2, 7.3, 7.4]
|
php: [7.3, 7.4, 8.0]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2.5",
|
"php": "^7.3|^8.0",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
"ext-dom": "*",
|
"ext-dom": "*",
|
||||||
"ext-gd": "*",
|
"ext-gd": "*",
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
"ext-xml": "*",
|
"ext-xml": "*",
|
||||||
"barryvdh/laravel-dompdf": "^0.8.7",
|
"barryvdh/laravel-dompdf": "^0.8.7",
|
||||||
"barryvdh/laravel-snappy": "^0.4.8",
|
"barryvdh/laravel-snappy": "^0.4.8",
|
||||||
"doctrine/dbal": "^2.9",
|
"doctrine/dbal": "^2.12.1",
|
||||||
"facade/ignition": "^1.16.4",
|
"facade/ignition": "^1.16.4",
|
||||||
"fideloper/proxy": "^4.4.1",
|
"fideloper/proxy": "^4.4.1",
|
||||||
"intervention/image": "^2.5.1",
|
"intervention/image": "^2.5.1",
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
"league/commonmark": "^1.5",
|
"league/commonmark": "^1.5",
|
||||||
"league/flysystem-aws-s3-v3": "^1.0.29",
|
"league/flysystem-aws-s3-v3": "^1.0.29",
|
||||||
"nunomaduro/collision": "^3.1",
|
"nunomaduro/collision": "^3.1",
|
||||||
"onelogin/php-saml": "^3.3",
|
"onelogin/php-saml": "^4.0",
|
||||||
"predis/predis": "^1.1.6",
|
"predis/predis": "^1.1.6",
|
||||||
"socialiteproviders/discord": "^4.1",
|
"socialiteproviders/discord": "^4.1",
|
||||||
"socialiteproviders/gitlab": "^4.1",
|
"socialiteproviders/gitlab": "^4.1",
|
||||||
|
@ -36,10 +36,10 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"barryvdh/laravel-debugbar": "^3.5.1",
|
"barryvdh/laravel-debugbar": "^3.5.1",
|
||||||
"barryvdh/laravel-ide-helper": "^2.8.2",
|
"barryvdh/laravel-ide-helper": "^2.8.2",
|
||||||
"fakerphp/faker": "^1.9.1",
|
"fakerphp/faker": "^1.13.0",
|
||||||
"laravel/browser-kit-testing": "^5.2",
|
"laravel/browser-kit-testing": "^5.2",
|
||||||
"mockery/mockery": "^1.3.3",
|
"mockery/mockery": "^1.3.3",
|
||||||
"phpunit/phpunit": "^8.0",
|
"phpunit/phpunit": "^9.5.3",
|
||||||
"squizlabs/php_codesniffer": "^3.5.8"
|
"squizlabs/php_codesniffer": "^3.5.8"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
"preferred-install": "dist",
|
"preferred-install": "dist",
|
||||||
"sort-packages": true,
|
"sort-packages": true,
|
||||||
"platform": {
|
"platform": {
|
||||||
"php": "7.2.5"
|
"php": "7.3.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|
1199
composer.lock
generated
1199
composer.lock
generated
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
FROM php:7.3-apache
|
FROM php:7.4-apache
|
||||||
|
|
||||||
ENV APACHE_DOCUMENT_ROOT /app/public
|
ENV APACHE_DOCUMENT_ROOT /app/public
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
@ -6,7 +6,7 @@ WORKDIR /app
|
||||||
RUN apt-get update -y \
|
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 \
|
&& 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-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 \
|
&& a2enmod rewrite \
|
||||||
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
|
&& 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 \
|
&& sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
|
||||||
|
|
14
phpunit.xml
14
phpunit.xml
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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"
|
backupStaticAttributes="false"
|
||||||
bootstrap="vendor/autoload.php"
|
bootstrap="vendor/autoload.php"
|
||||||
colors="true"
|
colors="true"
|
||||||
|
@ -8,16 +10,16 @@
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false">
|
stopOnFailure="false">
|
||||||
|
<coverage>
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">app/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Application Test Suite">
|
<testsuite name="Application Test Suite">
|
||||||
<directory>./tests/</directory>
|
<directory>./tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
<filter>
|
|
||||||
<whitelist>
|
|
||||||
<directory suffix=".php">app/</directory>
|
|
||||||
</whitelist>
|
|
||||||
</filter>
|
|
||||||
<php>
|
<php>
|
||||||
<server name="APP_ENV" value="testing"/>
|
<server name="APP_ENV" value="testing"/>
|
||||||
<server name="APP_DEBUG" value="false"/>
|
<server name="APP_DEBUG" value="false"/>
|
||||||
|
|
|
@ -119,7 +119,7 @@ abstract class BrowserKitTest extends TestCase
|
||||||
*/
|
*/
|
||||||
protected function seeInNthElement($element, $position, $text, $negate = false)
|
protected function seeInNthElement($element, $position, $text, $negate = false)
|
||||||
{
|
{
|
||||||
$method = $negate ? 'assertNotRegExp' : 'assertRegExp';
|
$method = $negate ? 'assertDoesNotMatchRegularExpression' : 'assertMatchesRegularExpression';
|
||||||
|
|
||||||
$rawPattern = preg_quote($text, '/');
|
$rawPattern = preg_quote($text, '/');
|
||||||
|
|
||||||
|
|
|
@ -162,7 +162,7 @@ class EntityTest extends BrowserKitTest
|
||||||
->press('Save Book');
|
->press('Save Book');
|
||||||
|
|
||||||
$expectedPattern = '/\/books\/my-first-book-[0-9a-zA-Z]{3}/';
|
$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();
|
$book = Book::where('slug', '=', 'my-first-book')->first();
|
||||||
return $book;
|
return $book;
|
||||||
|
|
|
@ -184,7 +184,7 @@ class ImageTest extends TestCase
|
||||||
|
|
||||||
$this->assertEquals('bad.phtml.png', $lastImage->name);
|
$this->assertEquals('bad.phtml.png', $lastImage->name);
|
||||||
$this->assertEquals('bad-phtml.png', basename($lastImage->path));
|
$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->assertFileExists(public_path($expectedRelPath));
|
||||||
|
|
||||||
$this->deleteImage($lastImage->path);
|
$this->deleteImage($lastImage->path);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user