diff --git a/.travis.yml b/.travis.yml index e2f2dd1d..63c9c82f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: php php: - - 5.6 + - 7.0 addons: postgresql: "9.3" diff --git a/api/app/Console/Commands/GenerateKeysCommand.php b/api/app/Console/Commands/GenerateKeysCommand.php index 6249e66b..4d6e912d 100644 --- a/api/app/Console/Commands/GenerateKeysCommand.php +++ b/api/app/Console/Commands/GenerateKeysCommand.php @@ -55,15 +55,21 @@ public function __construct(Filesystem $file) */ public function handle() { - $rsa = new \Crypt_RSA(); - $keys = $rsa->createKey(); + $res = openssl_pkey_new(); + + // Get private key + openssl_pkey_export($res, $privateKey); + + // Get public key + $publicKey = openssl_pkey_get_details($res); + $publicKey = $publicKey['key']; if (! $this->file->exists(storage_path('app/keys'))) { $this->file->makeDirectory(storage_path('app/keys')); } - $this->file->put(storage_path('app/keys/private.pem'), $keys['privatekey']); - $this->file->put(storage_path('app/keys/public.pem'), $keys['publickey']); + $this->file->put(storage_path('app/keys/private.pem'), $privateKey); + $this->file->put(storage_path('app/keys/public.pem'), $publicKey); return 0; } diff --git a/api/tests/integration/ArticleTest.php b/api/tests/integration/ArticleTest.php index 68418ed2..cc8ac076 100644 --- a/api/tests/integration/ArticleTest.php +++ b/api/tests/integration/ArticleTest.php @@ -311,7 +311,7 @@ public function testPatchOne() $entity = $this->getFactory($this->factoryClass)->create(); $this->withAuthorization()->patchJson($this->baseRoute.'/'.$entity->post_id, ['title' => 'foo']); - $this->shouldReturnJson(); + $this->assertResponseHasNoContent(); $this->assertResponseStatus(204); $class = $this->factoryClass; $checkEntity = $class::find($entity->post_id); @@ -333,7 +333,7 @@ public function testPatchOneNewPermalink() $linksCount = $entity->permalinks->count(); $this->withAuthorization()->patchJson($this->baseRoute.'/'.$entity->post_id, $data); - $this->shouldReturnJson(); + $this->assertResponseHasNoContent(); $this->assertResponseStatus(204); $class = $this->factoryClass; $checkEntity = $class::find($entity->post_id); @@ -405,7 +405,7 @@ public function testPatchOneRemovePermalink() ->transformed(); $this->withAuthorization()->patchJson($this->baseRoute.'/'.$entity->post_id, $data); - $this->shouldReturnJson(); + $this->assertResponseHasNoContent(); $this->assertResponseStatus(204); $class = $this->factoryClass; $checkEntity = $class::find($entity->post_id); diff --git a/api/tests/integration/ImageTest.php b/api/tests/integration/ImageTest.php index 76f5f9fd..33c2bc8d 100644 --- a/api/tests/integration/ImageTest.php +++ b/api/tests/integration/ImageTest.php @@ -125,7 +125,7 @@ public function testPatchOne() $entity->alt = 'foo'; $preparedEntity = $this->prepareEntity($entity); $this->withAuthorization()->patchJson('/images/'.$id, $preparedEntity); - $this->shouldReturnJson(); + $this->assertResponseHasNoContent(); $this->assertResponseStatus(204); $checkEntity = Image::find($id); $this->assertEquals($checkEntity->alt, $entity->alt); diff --git a/api/tests/integration/TagTest.php b/api/tests/integration/TagTest.php index 772a64de..4b6d3eb1 100644 --- a/api/tests/integration/TagTest.php +++ b/api/tests/integration/TagTest.php @@ -135,7 +135,7 @@ public function testPatchTag() $this->withAuthorization()->patchJson('/tags/'.$tag['tagId'], $tag); - $this->shouldReturnJson(); + $this->assertResponseHasNoContent(); $this->assertResponseStatus(204); $checkEntity = Tag::find($tag['tagId']); $this->assertEquals($checkEntity->tag, $tag['tag']); diff --git a/docker/common-services.yml b/docker/common-services.yml index 40288671..34cf7d09 100644 --- a/docker/common-services.yml +++ b/docker/common-services.yml @@ -56,9 +56,7 @@ web: privileged: true devtools: -# image: spira/docker-dev-tools:latest #built version of latest phantomjs (build often fails) - image: spira/docker-dev-tools:phantomjs-2.0.0 #static binary of phantomjs 2.0.0 -# image: spira/docker-dev-tools:phantomjs-1.9.8 #static bindary of phantomjs 1.9.8 + image: spira/docker-dev-tools:php-7.0 working_dir: /data privileged: true env_file: diff --git a/forum/composer.json b/forum/composer.json index b86293f3..07160ede 100644 --- a/forum/composer.json +++ b/forum/composer.json @@ -1,7 +1,7 @@ { "type": "project", "require": { - "vanilla/vanilla": "2.2-b1", + "vanilla/vanilla": "dev-master", "vanilla/addons": "1.4.5", "kasperisager/vanilla-api": "0.4.0" }, @@ -14,9 +14,9 @@ "type": "package", "package": { "name": "vanilla/vanilla", - "version": "2.2-b1", + "version": "dev-master", "dist": { - "url": "https://github.com/vanilla/vanilla/archive/Vanilla_2.2b1.zip", + "url": "https://github.com/vanilla/vanilla/archive/b8b3bc7a64850389bd57ee770a199d5874775686.zip", "type": "zip" } } @@ -84,7 +84,11 @@ }, "scripts": { "build-forum": "Spira\\Build::buildForum", - "post-install-cmd": "Spira\\Build::postInstall", + "post-install-cmd": [ + "Spira\\Build::postInstall", + "composer install --working-dir public", + "Spira\\Build::buildForum" + ], "post-update-cmd": "" } } diff --git a/forum/composer.lock b/forum/composer.lock index 937c6ed4..a73919ee 100644 --- a/forum/composer.lock +++ b/forum/composer.lock @@ -4,7 +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": "11a7a9651cc5cd29bb8a2b5f4533e30f", + "hash": "7b3ae096aa08a2c5ca771ebc3adc1b6d", + "content-hash": "2ca1ce3a575030c06034e5febcf9c84d", "packages": [ { "name": "kasperisager/vanilla-api", @@ -40,10 +41,10 @@ }, { "name": "vanilla/vanilla", - "version": "2.2-b1", + "version": "dev-master", "dist": { "type": "zip", - "url": "https://github.com/vanilla/vanilla/archive/Vanilla_2.2b1.zip", + "url": "https://github.com/vanilla/vanilla/archive/master.zip", "reference": null, "shasum": null }, @@ -111,12 +112,12 @@ "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "8e6f5732242fe833eb5fd553648924a200e50492" + "reference": "27658fa79ea9ee7afcfc10844f60809693e75da6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/8e6f5732242fe833eb5fd553648924a200e50492", - "reference": "8e6f5732242fe833eb5fd553648924a200e50492", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/27658fa79ea9ee7afcfc10844f60809693e75da6", + "reference": "27658fa79ea9ee7afcfc10844f60809693e75da6", "shasum": "" }, "require": { @@ -155,7 +156,7 @@ "rest", "web service" ], - "time": "2015-08-15 20:00:28" + "time": "2015-12-11 17:51:00" }, { "name": "guzzlehttp/ringphp", @@ -313,18 +314,19 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "80da5500014051b9e70740f183c5e5586f38f977" + "reference": "53e967bf312c21f78ec3a19c530d98e1bdb5b26f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/80da5500014051b9e70740f183c5e5586f38f977", - "reference": "80da5500014051b9e70740f183c5e5586f38f977", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/53e967bf312c21f78ec3a19c530d98e1bdb5b26f", + "reference": "53e967bf312c21f78ec3a19c530d98e1bdb5b26f", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" + "sebastian/comparator": "~1.1", + "sebastian/recursion-context": "~1.0" }, "require-dev": { "phpspec/phpspec": "~2.0" @@ -365,20 +367,20 @@ "spy", "stub" ], - "time": "2015-08-13 10:25:47" + "time": "2015-12-14 17:14:23" }, { "name": "phpunit/php-code-coverage", - "version": "dev-master", + "version": "2.2.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "4fedb6ff05c7c502723ba5ee34edaa6ab4ce30be" + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/4fedb6ff05c7c502723ba5ee34edaa6ab4ce30be", - "reference": "4fedb6ff05c7c502723ba5ee34edaa6ab4ce30be", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", "shasum": "" }, "require": { @@ -427,7 +429,7 @@ "testing", "xunit" ], - "time": "2015-08-16 12:44:10" + "time": "2015-10-06 15:47:00" }, { "name": "phpunit/php-file-iterator", @@ -564,12 +566,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3ab72c62e550370a6cd5dc873e1a04ab57562f5b" + "reference": "cab6c6fefee93d7b7c3a01292a0fe0884ea66644" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3ab72c62e550370a6cd5dc873e1a04ab57562f5b", - "reference": "3ab72c62e550370a6cd5dc873e1a04ab57562f5b", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cab6c6fefee93d7b7c3a01292a0fe0884ea66644", + "reference": "cab6c6fefee93d7b7c3a01292a0fe0884ea66644", "shasum": "" }, "require": { @@ -605,7 +607,7 @@ "keywords": [ "tokenizer" ], - "time": "2015-08-16 08:51:00" + "time": "2015-09-23 14:46:55" }, { "name": "phpunit/phpunit", @@ -613,12 +615,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7" + "reference": "ea76b17bced0500a28098626b84eda12dbcf119c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7", - "reference": "55bf1d6092b0e13a1f26bd5eaffeef3d8ad85ea7", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c", + "reference": "ea76b17bced0500a28098626b84eda12dbcf119c", "shasum": "" }, "require": { @@ -677,7 +679,7 @@ "testing", "xunit" ], - "time": "2015-08-15 04:21:23" + "time": "2015-12-12 07:45:58" }, { "name": "phpunit/phpunit-mock-objects", @@ -685,12 +687,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "dccd8011934fba6fb77c7182c74926ad58c9ecd1" + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/dccd8011934fba6fb77c7182c74926ad58c9ecd1", - "reference": "dccd8011934fba6fb77c7182c74926ad58c9ecd1", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", "shasum": "" }, "require": { @@ -733,7 +735,7 @@ "mock", "xunit" ], - "time": "2015-08-09 04:15:55" + "time": "2015-10-02 06:51:40" }, { "name": "react/promise", @@ -849,24 +851,24 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "6899b3e33bfbd386d88b5eea5f65f563e8793051" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/6899b3e33bfbd386d88b5eea5f65f563e8793051", - "reference": "6899b3e33bfbd386d88b5eea5f65f563e8793051", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -889,11 +891,11 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-06-22 14:15:55" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", @@ -901,12 +903,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "6e7133793a8e5a5714a551a8324337374be209df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", "shasum": "" }, "require": { @@ -943,7 +945,7 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2015-12-02 08:37:27" }, { "name": "sebastian/exporter", @@ -1014,16 +1016,16 @@ }, { "name": "sebastian/global-state", - "version": "dev-master", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "23af31f402993cfd94e99cbc4b782e9a78eb0e97" + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/23af31f402993cfd94e99cbc4b782e9a78eb0e97", - "reference": "23af31f402993cfd94e99cbc4b782e9a78eb0e97", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { @@ -1061,7 +1063,7 @@ "keywords": [ "global state" ], - "time": "2015-06-21 15:11:22" + "time": "2015-10-12 03:26:01" }, { "name": "sebastian/recursion-context", @@ -1069,12 +1071,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -1114,7 +1116,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2015-11-11 19:50:13" }, { "name": "sebastian/version", @@ -1156,31 +1158,31 @@ "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml.git", - "reference": "d067e47c2be88b62c3e50d1362d959efc46ffefc" + "url": "https://github.com/symfony/yaml.git", + "reference": "8bae579c7afa252c055855f071c751eb75dcf6c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/d067e47c2be88b62c3e50d1362d959efc46ffefc", - "reference": "d067e47c2be88b62c3e50d1362d959efc46ffefc", + "url": "https://api.github.com/repos/symfony/yaml/zipball/8bae579c7afa252c055855f071c751eb75dcf6c4", + "reference": "8bae579c7afa252c055855f071c751eb75dcf6c4", "shasum": "" }, "require": { "php": ">=5.5.9" }, - "require-dev": { - "symfony/phpunit-bridge": "~2.8|~3.0" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1198,12 +1200,14 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-08-01 06:48:35" + "time": "2015-12-05 11:13:35" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "vanilla/vanilla": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/forum/src/Spira/Build.php b/forum/src/Spira/Build.php index 70e23a51..d7b4f747 100644 --- a/forum/src/Spira/Build.php +++ b/forum/src/Spira/Build.php @@ -72,8 +72,6 @@ protected function buildVanillaApp() // Override general functions copy('bootstrap.before.php', 'public/conf/bootstrap.before.php'); - - $this->setupVanilla(); } /**