diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9198580..6a3d138b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,3 @@ -test:7: - stage: test - before_script: - - sh build/docker_install.sh > /dev/null - - apk add --no-cache php7-phpdbg - - curl -sS https://getcomposer.org/installer | php - - php composer.phar install --ignore-platform-reqs - image: php:7-alpine - script: - - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never - test:7.1: stage: test before_script: @@ -19,3 +8,14 @@ test:7.1: image: php:7.1-alpine script: - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never + +test:7.2: + stage: test + before_script: + - sh build/docker_install.sh > /dev/null + - apk add --no-cache php7-phpdbg + - curl -sS https://getcomposer.org/installer | php + - php composer.phar install --ignore-platform-reqs + image: php:7.2-alpine + script: + - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never diff --git a/build/docker_install.sh b/build/docker_install.sh index 8599377c..7ddee016 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -7,6 +7,6 @@ set -xe # Install git (the php image doesn't have it) which is required by composer echo -e 'http://dl-cdn.alpinelinux.org/alpine/edge/main\nhttp://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/testing' > /etc/apk/repositories -apk upgrade --update && apk add --no-cache \ +apk add --no-cache \ curl \ - git \ No newline at end of file + git diff --git a/composer.json b/composer.json index d4399dbf..d8f10637 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "monolog/monolog": "^1.0", "psr/http-message": "~1.0", "psr/log": "~1.0", - "yosymfony/toml": "^0.3", + "yosymfony/toml": "^1.0", "zendframework/zend-diactoros": "^1.3", "maximebf/consolekit": "^1.0", "amphp/artax": "^2.0" @@ -34,16 +34,16 @@ "pdepend/pdepend": "^2.2", "sebastian/phpcpd": "^3.0", "theseer/phpdox": "dev-master", - "phploc/phploc": "^3.0", + "phploc/phploc": "^4.0", "phpmd/phpmd": "^2.4", "phpunit/phpunit": "^6.0", - "robmorgan/phinx": "^0.8.0", + "robmorgan/phinx": "^0.9.1", "consolidation/robo": "~1.0", "henrikbjorn/lurker": "^1.1.0", - "symfony/var-dumper": "^3.2", + "symfony/var-dumper": "^4.0.1", "squizlabs/php_codesniffer": "^3.0.0@beta", - "phpstan/phpstan": "^0.6.4", - "spatie/phpunit-snapshot-assertions": "^0.4.1" + "phpstan/phpstan": "^0.9.1", + "spatie/phpunit-snapshot-assertions": "^1.2.0" }, "scripts": { "build": "vendor/bin/robo build", diff --git a/src/API/Kitsu/Model.php b/src/API/Kitsu/Model.php index d3609d27..74d9917b 100644 --- a/src/API/Kitsu/Model.php +++ b/src/API/Kitsu/Model.php @@ -875,7 +875,7 @@ class Model { } $baseData = $data['data']['attributes']; - $baseData['id'] = $data['id']; + $baseData['id'] = $id; $baseData['included'] = $data['included']; return $baseData; } diff --git a/src/Controller/AnimeCollection.php b/src/Controller/AnimeCollection.php index cc3809ec..2d3c1624 100644 --- a/src/Controller/AnimeCollection.php +++ b/src/Controller/AnimeCollection.php @@ -172,13 +172,13 @@ class AnimeCollection extends BaseController { $data = $this->request->getParsedBody(); if ( ! array_key_exists('hummingbird_id', $data)) { - $this->redirect("/collection/view", 303); + $this->redirect("/anime-collection/view", 303); } $this->animeCollectionModel->delete($data); $this->setFlashMessage("Successfully removed anime from collection.", 'success'); - $this->redirect("/collection/view", 303); + $this->redirect("/anime-collection/view", 303); } } // End of CollectionController.php \ No newline at end of file