Update min php to 7

This commit is contained in:
Hillel Coren 2017-11-15 11:54:23 +02:00
parent 0f5f1b6d19
commit 9010938f1b
10 changed files with 75 additions and 29 deletions

View File

@ -25,7 +25,7 @@ The self-host zip includes all third party libraries whereas downloading the cod
## Requirements ## Requirements
* PHP >= 5.5.9 * PHP 7
* MySQL * MySQL
## Recommended Providers ## Recommended Providers

View File

@ -272,6 +272,12 @@ class AppController extends BaseController
try { try {
set_time_limit(60 * 5); set_time_limit(60 * 5);
$this->checkInnoDB(); $this->checkInnoDB();
$cacheCompiled = base_path('bootstrap/cache/compiled.php');
if (file_exists($cacheCompiled)) { unlink ($cacheCompiled); }
$cacheServices = base_path('bootstrap/cache/services.json');
if (file_exists($cacheServices)) { unlink ($cacheServices); }
Artisan::call('clear-compiled'); Artisan::call('clear-compiled');
Artisan::call('cache:clear'); Artisan::call('cache:clear');
Artisan::call('debugbar:clear'); Artisan::call('debugbar:clear');

View File

@ -110,6 +110,21 @@ class LoginController extends Controller
return $response; return $response;
} }
/**
* Get the failed login response instance.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse
*/
protected function sendFailedLoginResponse(Request $request)
{
return redirect()->back()
->withInput($request->only($this->username(), 'remember'))
->withErrors([
$this->username() => trans('texts.invalid_credentials'),
]);
}
/** /**
* Send the post-authentication response. * Send the post-authentication response.
* *

View File

@ -88,6 +88,21 @@ class LoginController extends Controller
return $credentials; return $credentials;
} }
/**
* Get the failed login response instance.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\RedirectResponse
*/
protected function sendFailedLoginResponse(Request $request)
{
return redirect()->back()
->withInput($request->only($this->username(), 'remember'))
->withErrors([
$this->username() => trans('texts.invalid_credentials'),
]);
}
/** /**
* Validate the user login request - don't require the email * Validate the user login request - don't require the email
* *

View File

@ -55,8 +55,8 @@ class StartupCheck
$file = storage_path() . '/version.txt'; $file = storage_path() . '/version.txt';
$version = @file_get_contents($file); $version = @file_get_contents($file);
if ($version != NINJA_VERSION) { if ($version != NINJA_VERSION) {
if (version_compare(phpversion(), '5.5.9', '<')) { if (version_compare(phpversion(), '7.0.0', '<')) {
dd('Please update PHP to >= 5.5.9'); dd('Please update PHP to >= 7.0.0');
} }
$handle = fopen($file, 'w'); $handle = fopen($file, 'w');
fwrite($handle, NINJA_VERSION); fwrite($handle, NINJA_VERSION);

View File

@ -13,10 +13,10 @@
} }
], ],
"require": { "require": {
"php": ">=5.5.9", "php": ">=7.0.0",
"ext-gd": "*", "ext-gd": "*",
"ext-gmp": "*", "ext-gmp": "*",
"anahkiasen/former": "4.0.*@dev", "anahkiasen/former": "4.*",
"asgrim/ofxparser": "^1.1", "asgrim/ofxparser": "^1.1",
"bacon/bacon-qr-code": "^1.0", "bacon/bacon-qr-code": "^1.0",
"barracudanetworks/archivestream-php": "^1.0", "barracudanetworks/archivestream-php": "^1.0",

44
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"hash": "f2043c8ce923c8af3c99ba7c5bcf5d5e", "hash": "303fbf170906bca5a5354e7bbb92c94d",
"content-hash": "dbc2b358c79e0abe0a58d2bd02310966", "content-hash": "a1aaf83c53c00ce8dbb3ec13d70a42b3",
"packages": [ "packages": [
{ {
"name": "abdala/omnipay-pagseguro", "name": "abdala/omnipay-pagseguro",
@ -169,16 +169,16 @@
}, },
{ {
"name": "anahkiasen/former", "name": "anahkiasen/former",
"version": "4.0.6", "version": "4.1.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/formers/former.git", "url": "https://github.com/formers/former.git",
"reference": "1ad9b332e8d8f5b23159aabbca89084276938382" "reference": "56fd10035d7e7c34e2761e0458b92ca8890e6a9a"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/formers/former/zipball/1ad9b332e8d8f5b23159aabbca89084276938382", "url": "https://api.github.com/repos/formers/former/zipball/56fd10035d7e7c34e2761e0458b92ca8890e6a9a",
"reference": "1ad9b332e8d8f5b23159aabbca89084276938382", "reference": "56fd10035d7e7c34e2761e0458b92ca8890e6a9a",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -197,6 +197,11 @@
"phpunit/phpunit": "~4" "phpunit/phpunit": "~4"
}, },
"type": "library", "type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.5.x-dev"
}
},
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Former\\": [ "Former\\": [
@ -217,14 +222,14 @@
} }
], ],
"description": "A powerful form builder", "description": "A powerful form builder",
"homepage": "http://anahkiasen.github.com/former/", "homepage": "http://formers.github.io/former/",
"keywords": [ "keywords": [
"bootstrap", "bootstrap",
"form", "form",
"foundation", "foundation",
"laravel" "laravel"
], ],
"time": "2016-07-28 19:36:11" "time": "2017-05-30 18:43:09"
}, },
{ {
"name": "anahkiasen/html-object", "name": "anahkiasen/html-object",
@ -380,16 +385,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.38.1", "version": "3.38.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "9f704274f4748d2039a16d45b3388ed8dde74e89" "reference": "7b13de0b39f29833a977176ce58eed990e1487ba"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/9f704274f4748d2039a16d45b3388ed8dde74e89", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/7b13de0b39f29833a977176ce58eed990e1487ba",
"reference": "9f704274f4748d2039a16d45b3388ed8dde74e89", "reference": "7b13de0b39f29833a977176ce58eed990e1487ba",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -456,7 +461,7 @@
"s3", "s3",
"sdk" "sdk"
], ],
"time": "2017-11-09 19:15:59" "time": "2017-11-14 23:47:41"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -2547,16 +2552,16 @@
}, },
{ {
"name": "gocardless/gocardless-pro", "name": "gocardless/gocardless-pro",
"version": "1.2.0", "version": "1.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/gocardless/gocardless-pro-php.git", "url": "https://github.com/gocardless/gocardless-pro-php.git",
"reference": "d2d4adb7cde53722858f1e7e5508697fefdb5390" "reference": "16ac38c2531e08c15e54b4a82d44854349cbfcf6"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/gocardless/gocardless-pro-php/zipball/d2d4adb7cde53722858f1e7e5508697fefdb5390", "url": "https://api.github.com/repos/gocardless/gocardless-pro-php/zipball/16ac38c2531e08c15e54b4a82d44854349cbfcf6",
"reference": "d2d4adb7cde53722858f1e7e5508697fefdb5390", "reference": "16ac38c2531e08c15e54b4a82d44854349cbfcf6",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2595,7 +2600,7 @@
"direct debit", "direct debit",
"gocardless" "gocardless"
], ],
"time": "2017-09-18 15:08:13" "time": "2017-11-14 15:46:50"
}, },
{ {
"name": "google/apiclient", "name": "google/apiclient",
@ -12412,7 +12417,6 @@
], ],
"minimum-stability": "dev", "minimum-stability": "dev",
"stability-flags": { "stability-flags": {
"anahkiasen/former": 20,
"chumper/datatable": 20, "chumper/datatable": 20,
"codedge/laravel-selfupdater": 20, "codedge/laravel-selfupdater": 20,
"collizo4sky/omnipay-wepay": 20, "collizo4sky/omnipay-wepay": 20,
@ -12431,7 +12435,7 @@
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": ">=5.5.9", "php": ">=7.0.0",
"ext-gd": "*", "ext-gd": "*",
"ext-gmp": "*" "ext-gmp": "*"
}, },

View File

@ -3,7 +3,7 @@ Install
Thanks for taking the time to setup Invoice Ninja. Thanks for taking the time to setup Invoice Ninja.
.. Note:: The applications requires PHP >= 5.5.9 and MySQL. .. Note:: The applications requires PHP >= 7.0.0 and MySQL.
Detailed Guides Detailed Guides
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^

View File

@ -24,6 +24,11 @@ If the auto-update fails you can manually run the update with the following comm
.. TIP:: You can see the detailed changes for each release on our `GitHub release notes <https://github.com/invoiceninja/invoiceninja/releases>`_. .. TIP:: You can see the detailed changes for each release on our `GitHub release notes <https://github.com/invoiceninja/invoiceninja/releases>`_.
Version 4.0
"""""""""""""
The minimum PHP version is now 7.0.0
Version 3.2 Version 3.2
""""""""""" """""""""""
@ -36,7 +41,8 @@ Make sure the .env file includes ``APP_CIPHER=rijndael-128``
Version 2.5.1 Version 2.5.1
""""""""""""" """""""""""""
Minimum PHP version is now 5.5.9
The minimum PHP version is now 5.5.9
Version 2.0 Version 2.0
""""""""""" """""""""""

View File

@ -26,8 +26,8 @@
<div class="jumbotron"> <div class="jumbotron">
<h2>Invoice Ninja Setup</h2> <h2>Invoice Ninja Setup</h2>
@if (version_compare(phpversion(), '5.5.9', '<')) @if (version_compare(phpversion(), '7.0.0', '<'))
<div class="alert alert-warning">Warning: The application requires PHP >= 5.5.9</div> <div class="alert alert-warning">Warning: The application requires PHP >= 7.0.0</div>
@endif @endif
@if (!function_exists('proc_open')) @if (!function_exists('proc_open'))
<div class="alert alert-warning">Warning: <a href="http://php.net/manual/en/function.proc-open.php" target="_blank">proc_open</a> must be enabled.</div> <div class="alert alert-warning">Warning: <a href="http://php.net/manual/en/function.proc-open.php" target="_blank">proc_open</a> must be enabled.</div>