Always display SQL errors

This commit is contained in:
Frédéric Guillot
2018-03-05 15:55:49 -08:00
parent 95ac11a6aa
commit 9c9e079bcd
7 changed files with 31 additions and 25 deletions

View File

@@ -30,7 +30,7 @@
"eluceo/ical": "0.10.1", "eluceo/ical": "0.10.1",
"erusev/parsedown" : "1.6.0", "erusev/parsedown" : "1.6.0",
"fguillot/json-rpc" : "1.2.1", "fguillot/json-rpc" : "1.2.1",
"fguillot/picodb" : "1.0.17", "fguillot/picodb" : "v1.0.18",
"fguillot/simple-validator" : "1.0.1", "fguillot/simple-validator" : "1.0.1",
"fguillot/simple-queue" : "1.0.1", "fguillot/simple-queue" : "1.0.1",
"paragonie/random_compat": "2.0.11", "paragonie/random_compat": "2.0.11",

22
composer.lock generated
View File

@@ -4,7 +4,7 @@
"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"
], ],
"content-hash": "a1a8ea1e7b369d6eeb6c97085da64faf", "content-hash": "f8d9d35adda9c522defa8e3c519f5a23",
"packages": [ "packages": [
{ {
"name": "aferrandini/phpqrcode", "name": "aferrandini/phpqrcode",
@@ -288,16 +288,16 @@
}, },
{ {
"name": "fguillot/picodb", "name": "fguillot/picodb",
"version": "v1.0.17", "version": "v1.0.18",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fguillot/picoDb.git", "url": "https://github.com/fguillot/picoDb.git",
"reference": "1699864992c40ad02395e95d7fbf44a571a116f3" "reference": "4df08a3cc3c4a39e6bb329872f5d020fe135f805"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/1699864992c40ad02395e95d7fbf44a571a116f3", "url": "https://api.github.com/repos/fguillot/picoDb/zipball/4df08a3cc3c4a39e6bb329872f5d020fe135f805",
"reference": "1699864992c40ad02395e95d7fbf44a571a116f3", "reference": "4df08a3cc3c4a39e6bb329872f5d020fe135f805",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -324,7 +324,7 @@
], ],
"description": "Minimalist database query builder", "description": "Minimalist database query builder",
"homepage": "https://github.com/fguillot/picoDb", "homepage": "https://github.com/fguillot/picoDb",
"time": "2018-02-14T00:51:01+00:00" "time": "2018-03-05T22:39:16+00:00"
}, },
{ {
"name": "fguillot/simple-queue", "name": "fguillot/simple-queue",
@@ -902,16 +902,16 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v3.4.5", "version": "v3.4.6",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "6a615613745cef820d807443f32076bb9f5d0a38" "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/6a615613745cef820d807443f32076bb9f5d0a38", "url": "https://api.github.com/repos/symfony/finder/zipball/a479817ce0a9e4adfd7d39c6407c95d97c254625",
"reference": "6a615613745cef820d807443f32076bb9f5d0a38", "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -947,7 +947,7 @@
], ],
"description": "Symfony Finder Component", "description": "Symfony Finder Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-02-11T17:15:12+00:00" "time": "2018-03-05T18:28:11+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",

View File

@@ -320,6 +320,7 @@ return array(
'Kanboard\\Core\\Log\\Stderr' => $baseDir . '/app/Core/Log/Stderr.php', 'Kanboard\\Core\\Log\\Stderr' => $baseDir . '/app/Core/Log/Stderr.php',
'Kanboard\\Core\\Log\\Stdout' => $baseDir . '/app/Core/Log/Stdout.php', 'Kanboard\\Core\\Log\\Stdout' => $baseDir . '/app/Core/Log/Stdout.php',
'Kanboard\\Core\\Log\\Syslog' => $baseDir . '/app/Core/Log/Syslog.php', 'Kanboard\\Core\\Log\\Syslog' => $baseDir . '/app/Core/Log/Syslog.php',
'Kanboard\\Core\\Log\\System' => $baseDir . '/app/Core/Log/System.php',
'Kanboard\\Core\\Mail\\Client' => $baseDir . '/app/Core/Mail/Client.php', 'Kanboard\\Core\\Mail\\Client' => $baseDir . '/app/Core/Mail/Client.php',
'Kanboard\\Core\\Mail\\ClientInterface' => $baseDir . '/app/Core/Mail/ClientInterface.php', 'Kanboard\\Core\\Mail\\ClientInterface' => $baseDir . '/app/Core/Mail/ClientInterface.php',
'Kanboard\\Core\\Mail\\Transport\\Mail' => $baseDir . '/app/Core/Mail/Transport/Mail.php', 'Kanboard\\Core\\Mail\\Transport\\Mail' => $baseDir . '/app/Core/Mail/Transport/Mail.php',

View File

@@ -454,6 +454,7 @@ class ComposerStaticInitbdc3716ceecc7570f8ff9a8407f0ca0e
'Kanboard\\Core\\Log\\Stderr' => __DIR__ . '/../..' . '/app/Core/Log/Stderr.php', 'Kanboard\\Core\\Log\\Stderr' => __DIR__ . '/../..' . '/app/Core/Log/Stderr.php',
'Kanboard\\Core\\Log\\Stdout' => __DIR__ . '/../..' . '/app/Core/Log/Stdout.php', 'Kanboard\\Core\\Log\\Stdout' => __DIR__ . '/../..' . '/app/Core/Log/Stdout.php',
'Kanboard\\Core\\Log\\Syslog' => __DIR__ . '/../..' . '/app/Core/Log/Syslog.php', 'Kanboard\\Core\\Log\\Syslog' => __DIR__ . '/../..' . '/app/Core/Log/Syslog.php',
'Kanboard\\Core\\Log\\System' => __DIR__ . '/../..' . '/app/Core/Log/System.php',
'Kanboard\\Core\\Mail\\Client' => __DIR__ . '/../..' . '/app/Core/Mail/Client.php', 'Kanboard\\Core\\Mail\\Client' => __DIR__ . '/../..' . '/app/Core/Mail/Client.php',
'Kanboard\\Core\\Mail\\ClientInterface' => __DIR__ . '/../..' . '/app/Core/Mail/ClientInterface.php', 'Kanboard\\Core\\Mail\\ClientInterface' => __DIR__ . '/../..' . '/app/Core/Mail/ClientInterface.php',
'Kanboard\\Core\\Mail\\Transport\\Mail' => __DIR__ . '/../..' . '/app/Core/Mail/Transport/Mail.php', 'Kanboard\\Core\\Mail\\Transport\\Mail' => __DIR__ . '/../..' . '/app/Core/Mail/Transport/Mail.php',

View File

@@ -950,17 +950,17 @@
}, },
{ {
"name": "fguillot/picodb", "name": "fguillot/picodb",
"version": "v1.0.17", "version": "v1.0.18",
"version_normalized": "1.0.17.0", "version_normalized": "1.0.18.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/fguillot/picoDb.git", "url": "https://github.com/fguillot/picoDb.git",
"reference": "1699864992c40ad02395e95d7fbf44a571a116f3" "reference": "4df08a3cc3c4a39e6bb329872f5d020fe135f805"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/fguillot/picoDb/zipball/1699864992c40ad02395e95d7fbf44a571a116f3", "url": "https://api.github.com/repos/fguillot/picoDb/zipball/4df08a3cc3c4a39e6bb329872f5d020fe135f805",
"reference": "1699864992c40ad02395e95d7fbf44a571a116f3", "reference": "4df08a3cc3c4a39e6bb329872f5d020fe135f805",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -969,7 +969,7 @@
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.8.*" "phpunit/phpunit": "4.8.*"
}, },
"time": "2018-02-14T00:51:01+00:00", "time": "2018-03-05T22:39:16+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@@ -992,23 +992,23 @@
}, },
{ {
"name": "symfony/finder", "name": "symfony/finder",
"version": "v3.4.5", "version": "v3.4.6",
"version_normalized": "3.4.5.0", "version_normalized": "3.4.6.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/finder.git", "url": "https://github.com/symfony/finder.git",
"reference": "6a615613745cef820d807443f32076bb9f5d0a38" "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/6a615613745cef820d807443f32076bb9f5d0a38", "url": "https://api.github.com/repos/symfony/finder/zipball/a479817ce0a9e4adfd7d39c6407c95d97c254625",
"reference": "6a615613745cef820d807443f32076bb9f5d0a38", "reference": "a479817ce0a9e4adfd7d39c6407c95d97c254625",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": "^5.5.9|>=7.0.8" "php": "^5.5.9|>=7.0.8"
}, },
"time": "2018-02-11T17:15:12+00:00", "time": "2018-03-05T18:28:11+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {

View File

@@ -348,6 +348,6 @@ class StatementHandler
return false; return false;
} }
throw new SQLException('SQL error'.($this->logQueries ? ': '.$e->getMessage() : '')); throw new SQLException('SQL Error: '.$e->getMessage());
} }
} }

View File

@@ -297,6 +297,10 @@ class Finder implements \IteratorAggregate, \Countable
/** /**
* Excludes directories. * Excludes directories.
* *
* Directories passed as argument must be relative to the ones defined with the `in()` method. For example:
*
* $finder->in(__DIR__)->exclude('ruby');
*
* @param string|array $dirs A directory path or an array of directories * @param string|array $dirs A directory path or an array of directories
* *
* @return $this * @return $this