1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-19 16:01:34 +02:00

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
* PHP >= 5.5.9
* PHP 7
* MySQL
## Recommended Providers

View File

@ -272,6 +272,12 @@ class AppController extends BaseController
try {
set_time_limit(60 * 5);
$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('cache:clear');
Artisan::call('debugbar:clear');

View File

@ -110,6 +110,21 @@ class LoginController extends Controller
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.
*

View File

@ -88,6 +88,21 @@ class LoginController extends Controller
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
*

View File

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

View File

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

View File

@ -3,7 +3,7 @@ Install
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
^^^^^^^^^^^^^^^

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>`_.
Version 4.0
"""""""""""""
The minimum PHP version is now 7.0.0
Version 3.2
"""""""""""
@ -36,7 +41,8 @@ Make sure the .env file includes ``APP_CIPHER=rijndael-128``
Version 2.5.1
"""""""""""""
Minimum PHP version is now 5.5.9
The minimum PHP version is now 5.5.9
Version 2.0
"""""""""""

View File

@ -26,8 +26,8 @@
<div class="jumbotron">
<h2>Invoice Ninja Setup</h2>
@if (version_compare(phpversion(), '5.5.9', '<'))
<div class="alert alert-warning">Warning: The application requires PHP >= 5.5.9</div>
@if (version_compare(phpversion(), '7.0.0', '<'))
<div class="alert alert-warning">Warning: The application requires PHP >= 7.0.0</div>
@endif
@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>