diff --git a/Gruntfile.js b/Gruntfile.js index 695ec9f..7d127ad 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -115,11 +115,23 @@ module.exports = function (grunt) { 'LICENSE', 'favicon.ico', ] + }, + + shell: { + phpstan: { + command: '"./vendor/bin/phpstan" analyse app resources/lang bin install' + }, + composer_no_dev: { + command: 'composer install --no-dev' + } } + }); require('load-grunt-tasks')(grunt); grunt.registerTask('default', ['jshint', 'cssmin', 'uglify', 'copy']); grunt.registerTask('test', ['jshint']); - grunt.registerTask('build-release', ['default', 'zip']); + grunt.registerTask('phpstan', ['shell:phpstan']); + grunt.registerTask('composer_no_dev', ['shell:composer_no_dev']); + grunt.registerTask('build-release', ['default', 'composer_no_dev', 'zip']); }; \ No newline at end of file diff --git a/app/Web/Session.php b/app/Web/Session.php index 0d380df..28cee27 100644 --- a/app/Web/Session.php +++ b/app/Web/Session.php @@ -25,6 +25,7 @@ class Session 'name' => $name, 'save_path' => $path, 'cookie_httponly' => true, + 'gc_probability' => 25, ]); if (!$started) { diff --git a/composer.lock b/composer.lock index 3297c92..47331fa 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "e650b40bdd96d101030a0e33a7ff5ffe", + "content-hash": "120224d788960ba61ae3d0e49e173ad3", "packages": [ { "name": "container-interop/container-interop", diff --git a/index.php b/index.php index 970ba81..a284fca 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ = 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP >=7.1 is required to run XBackBone.'); +(PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP 7.1 or above is required to run XBackBone.'); require __DIR__ . '/vendor/autoload.php'; define('BASE_DIR', __DIR__ . DIRECTORY_SEPARATOR); diff --git a/install/index.php b/install/index.php index d51f06e..a3bb5cf 100644 --- a/install/index.php +++ b/install/index.php @@ -1,5 +1,5 @@ = 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP >=7.1 is required to run XBackBone.'); +(PHP_MAJOR_VERSION >= 7 && PHP_MINOR_VERSION >= 1) ?: die('Sorry, PHP 7.1 or above is required to run XBackBone.'); require __DIR__ . '/../vendor/autoload.php'; use App\Database\DB; diff --git a/package-lock.json b/package-lock.json index 41b33e3..5779220 100644 --- a/package-lock.json +++ b/package-lock.json @@ -586,6 +586,26 @@ "integrity": "sha1-8mqEj2pHl6X/foUOYCIMDea+jnI=", "dev": true }, + "grunt-shell": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/grunt-shell/-/grunt-shell-3.0.1.tgz", + "integrity": "sha512-C8eR4frw/NmIFIwSvzSLS4wOQBUzC+z6QhrKPzwt/tlaIqlzH35i/O2MggVOBj2Sh1tbaAqpASWxGiGsi4JMIQ==", + "dev": true, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true + } + } + }, "grunt-zip": { "version": "0.18.2", "resolved": "https://registry.npmjs.org/grunt-zip/-/grunt-zip-0.18.2.tgz", @@ -877,6 +897,12 @@ "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true + }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", @@ -942,6 +968,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", diff --git a/package.json b/package.json index ff69736..752a442 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "grunt-contrib-jshint": "^2.1.0", "grunt-contrib-uglify": "^4.0.1", "grunt-contrib-watch": "^1.1.0", + "grunt-shell": "^3.0.1", "grunt-zip": "^0.18.2", "load-grunt-tasks": "^4.0.0" }