diff --git a/composer.json b/composer.json index 87393f7f..3c14795a 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,15 @@ ], "require": { - "php": "^7.0.0", + "php": "^7.0", "ext-intl": "*", "ext-iconv": "*", - "jkingweb/druuid": "^3.0.0", - "phpseclib/phpseclib": "^2.0.4", - "webmozart/glob": "^4.1.0", - "fguillot/picoFeed": ">=0.1.31", - "hosteurope/password-generator": "^1.0" + "fguillot/picofeed": ">=0.1.31", + "respect/rest": "^0.6", + "jkingweb/druuid": "^3.0", + "phpseclib/phpseclib": "^2.0", + "hosteurope/password-generator": "^1.0", + "webmozart/glob": "^4.1" }, "require-dev": { "mikey179/vfsStream": "^1.6.4" diff --git a/composer.lock b/composer.lock index 069334d3..1d8d84ca 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": "8260cf555776b4ffaef7fca3ca891311", + "content-hash": "31bedf1105f6249d6e9d990abd2125de", "packages": [ { "name": "fguillot/picofeed", @@ -236,6 +236,50 @@ ], "time": "2016-10-04T00:57:04+00:00" }, + { + "name": "respect/rest", + "version": "0.6.0", + "source": { + "type": "git", + "url": "https://github.com/Respect/Rest.git", + "reference": "4f60aa199623d738a3391ca1e80bafb754bc9308" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Respect/Rest/zipball/4f60aa199623d738a3391ca1e80bafb754bc9308", + "reference": "4f60aa199623d738a3391ca1e80bafb754bc9308", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Respect\\": "library/Respect" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD Style" + ], + "authors": [ + { + "name": "Alexandre Gaigalas", + "email": "alexandre@gaigalas.net" + }, + { + "name": "Respect/Data Contributors", + "homepage": "https://github.com/Respect/Data/graphs/contributors" + } + ], + "description": "Thin controller for RESTful applications", + "homepage": "http://respect.li/", + "time": "2015-01-12T09:55:16+00:00" + }, { "name": "webmozart/assert", "version": "1.2.0", @@ -479,7 +523,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.0.0", + "php": "^7.0", "ext-intl": "*", "ext-iconv": "*" }, diff --git a/lib/Db/SQLite3/Driver.php b/lib/Db/SQLite3/Driver.php index 7d223df6..89d4fe13 100644 --- a/lib/Db/SQLite3/Driver.php +++ b/lib/Db/SQLite3/Driver.php @@ -43,7 +43,7 @@ class Driver extends \JKingWeb\NewsSync\Db\AbstractDriver { $this->exec("PRAGMA journal_mode = wal"); $this->exec("PRAGMA foreign_keys = yes"); // Create custom functions - $this->db->createFunction('DATEFORMAT', CustomFunctions::dateFormat, 2); + $this->db->createFunction('DATEFORMAT', [CustomFunctions::class, 'dateFormat'], 2); } catch(\Exception $e) { list($excClass, $excMsg, $excData) = $this->exceptionBuild(); throw new $excClass($excMsg, $excData); diff --git a/lib/REST.php b/lib/REST.php new file mode 100644 index 00000000..77ddcdd1 --- /dev/null +++ b/lib/REST.php @@ -0,0 +1,8 @@ +