diff --git a/Gruntfile.js b/Gruntfile.js index 75d7f0c..dd029f5 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -151,7 +151,7 @@ module.exports = function (grunt) { shell: { phpstan: { - command: '"./vendor/bin/phpstan" analyse app resources/lang bin install' + command: '"./vendor/bin/phpstan" --level=0 analyse app resources/lang bin install' }, composer_no_dev: { command: 'composer update --no-dev --prefer-dist' diff --git a/app/Database/Migrator.php b/app/Database/Migrator.php index a01710f..5db9bda 100644 --- a/app/Database/Migrator.php +++ b/app/Database/Migrator.php @@ -31,11 +31,7 @@ class Migrator public function migrate() { - try { - $this->db->query('SELECT 1 FROM `migrations` LIMIT 1'); - } catch (PDOException $exception) { - $this->firstMigrate = true; - } + $this->db->query('SELECT 1 FROM `migrations` LIMIT 1'); $this->db->getPdo()->exec(file_get_contents($this->schemaPath.DIRECTORY_SEPARATOR.'migrations.sql')); diff --git a/app/Exceptions/ValidationException.php b/app/Exceptions/ValidationException.php index c67ad8d..b04df0e 100644 --- a/app/Exceptions/ValidationException.php +++ b/app/Exceptions/ValidationException.php @@ -14,7 +14,7 @@ class ValidationException extends Exception */ private $response; - public function __construct(Response $response, $message = "", $code = 0, Throwable $previous = null) + public function __construct(Response $response, $message = "", Throwable $previous = null) { parent::__construct($message, $response->getStatusCode(), $previous); $this->response = $response; diff --git a/composer.json b/composer.json index 6feda9c..2348315 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "sergix44/xbackbone", - "version": "3.1.RC6", + "version": "3.1", "description": "A lightweight ShareX PHP backend", "type": "project", "require": { diff --git a/composer.lock b/composer.lock index 91641bb..542fc02 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "046f5b6b68e2073e25a43c0c24813053", + "content-hash": "17be54724e0928ed7049b18bbcb181b9", "packages": [ { "name": "aws/aws-sdk-php", diff --git a/install/index.php b/install/index.php index 10841ab..e1f11fa 100644 --- a/install/index.php +++ b/install/index.php @@ -61,7 +61,7 @@ $app = Bridge::create($builder->build()); $app->setBasePath(parse_url($config['base_url'].'/install', PHP_URL_PATH)); $app->addRoutingMiddleware(); -$app->get('/', function (Response $response, View $view, Session $session) use (&$config) { +$app->get('/', function (Response $response, View $view, Session $session) { if (!extension_loaded('gd')) { $session->alert('The required "gd" extension is not loaded.', 'danger'); } diff --git a/package-lock.json b/package-lock.json index 35a6122..ae4f2a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -249,9 +249,9 @@ "dev": true }, "core-js": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz", - "integrity": "sha512-4paDGScNgZP2IXXilaffL9X7968RuvwlkK3xWtZRVqgd8SYNiVKRJvkFd1aqqEuPfN7E68ZHEp9hDj6lHj4Hyw==" + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==" }, "core-util-is": { "version": "1.0.2", @@ -1360,9 +1360,9 @@ "dev": true }, "rangetouch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/rangetouch/-/rangetouch-2.0.0.tgz", - "integrity": "sha512-y66wTFbwh7KafYligRsmIYYR1kZY8U9tGHH9PgbVhBUFmGzPMsOSjslXPedgR5D3M9W1QKVbAf1AtaVAt7JJTw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/rangetouch/-/rangetouch-2.0.1.tgz", + "integrity": "sha512-sln+pNSc8NGaHoLzwNBssFSf/rSYkqeBXzX1AtJlkJiUaVSJSbRAWJk+4omsXkN+EJalzkZhWQ3th1m0FpR5xA==" }, "raw-body": { "version": "1.1.7", diff --git a/resources/templates/base.twig b/resources/templates/base.twig index 523ee8d..6e5564f 100644 --- a/resources/templates/base.twig +++ b/resources/templates/base.twig @@ -41,7 +41,7 @@ {% block content %}{% endblock %} {% block footer %}
{% endblock %}