From 38eee857528ad928b87c799204771aed06a669f9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Fri, 15 Sep 2017 16:51:47 -0400 Subject: [PATCH 01/12] Revert former change so that kitsu anime lists are properly pulled for sync --- src/API/Kitsu/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/API/Kitsu/Model.php b/src/API/Kitsu/Model.php index 182519a6..d3609d27 100644 --- a/src/API/Kitsu/Model.php +++ b/src/API/Kitsu/Model.php @@ -403,7 +403,7 @@ class Model { * @return array */ public function getFullAnimeList(array $options = [ - 'include' => 'media.mappings' + 'include' => 'anime.mappings' ]): array { $status = $options['filter']['status'] ?? ''; From 410ff4fcc140800492637fdf19c07a5106cdf9e9 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 19 Oct 2017 18:31:28 -0400 Subject: [PATCH 02/12] Attempt to fix builds --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9198580..8939fe8e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ test:7: - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - php composer.phar install --ignore-platform-reqs - image: php:7-alpine + image: php:7.0-cli-alpine script: - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never @@ -16,6 +16,6 @@ test:7.1: - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - php composer.phar install --ignore-platform-reqs - image: php:7.1-alpine + image: php:7.1-cli-alpine script: - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never From c6f2981d6339c12b85f2c0c5786d5000b9514c14 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 19 Oct 2017 18:34:11 -0400 Subject: [PATCH 03/12] Attempt to fix builds 2 --- build/docker_install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 8599377c..6ca77250 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -6,7 +6,7 @@ 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 +#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 \ curl \ - git \ No newline at end of file + git From a2fbe471e3654c3236a7805123b1d45d29dd5763 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Thu, 19 Oct 2017 18:38:56 -0400 Subject: [PATCH 04/12] Attempt to fix builds 3 --- .gitlab-ci.yml | 4 ++-- build/docker_install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8939fe8e..c1f44a8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ test:7: - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - php composer.phar install --ignore-platform-reqs - image: php:7.0-cli-alpine + image: php:7.0-cli-alpine3.4 script: - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never @@ -16,6 +16,6 @@ test:7.1: - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - php composer.phar install --ignore-platform-reqs - image: php:7.1-cli-alpine + image: php:7.1-cli-alpine3.4 script: - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never diff --git a/build/docker_install.sh b/build/docker_install.sh index 6ca77250..5dab2200 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -6,7 +6,7 @@ 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 +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 \ curl \ git From 015b3d0f344ec7e10873a6016a2f0d7f35479879 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 10:58:26 -0500 Subject: [PATCH 05/12] Attempt to test PHP 7.2 --- .gitlab-ci.yml | 11 +++++++++++ composer.json | 10 +++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1f44a8f..8ffbec17 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,3 +19,14 @@ test:7.1: image: php:7.1-cli-alpine3.4 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-cli-alpine3.4 + script: + - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never diff --git a/composer.json b/composer.json index d4399dbf..e967e7da 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", "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", From 8b8ece3dad0efb98223de027e5d5d861e7e2ba82 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 11:07:23 -0500 Subject: [PATCH 06/12] Attempt to fix gitlab ci build --- .gitlab-ci.yml | 11 ----------- build/docker_install.sh | 3 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8ffbec17..c1f44a8f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,14 +19,3 @@ test:7.1: image: php:7.1-cli-alpine3.4 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-cli-alpine3.4 - script: - - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never diff --git a/build/docker_install.sh b/build/docker_install.sh index 5dab2200..9ff71dc5 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -9,4 +9,5 @@ set -xe 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 \ curl \ - git + git \ + ipv6 From 37f1391a0704d994b185c8356cdff6cd90376c10 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 11:10:50 -0500 Subject: [PATCH 07/12] Try, try, again --- .gitlab-ci.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1f44a8f..670ef8b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ test:7: - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - php composer.phar install --ignore-platform-reqs - image: php:7.0-cli-alpine3.4 + image: php:7.0-alpine script: - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never @@ -16,6 +16,17 @@ test:7.1: - apk add --no-cache php7-phpdbg - curl -sS https://getcomposer.org/installer | php - php composer.phar install --ignore-platform-reqs - image: php:7.1-cli-alpine3.4 + 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 From 888dbe71870b7ef2a948d2fba5bef728122787fc Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 11:12:51 -0500 Subject: [PATCH 08/12] Another attempt to fix gitlab ci builds --- build/docker_install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 9ff71dc5..bb3ef592 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -7,7 +7,8 @@ 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 \ - curl \ - git \ - ipv6 +apk upgrade --update +# && apk add --no-cache \ +# curl \ +# git \ +# ipv6 From ae52f8737a2bcf5401cbcde52995d55c772e34f2 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 11:16:47 -0500 Subject: [PATCH 09/12] Don't try to run update, maybe? --- build/docker_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index bb3ef592..249a6bc8 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -7,7 +7,7 @@ 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 upgrade --update # && apk add --no-cache \ # curl \ # git \ From e8f53542e8b37f2e21197a5430b629489f5fec8d Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 11:20:12 -0500 Subject: [PATCH 10/12] Make sure to add git... --- build/docker_install.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/docker_install.sh b/build/docker_install.sh index 249a6bc8..7ddee016 100644 --- a/build/docker_install.sh +++ b/build/docker_install.sh @@ -7,8 +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 \ -# curl \ -# git \ -# ipv6 +apk add --no-cache \ + curl \ + git From 034174418b7f4836b91ae16f58849ebae6b2677d Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 11:48:15 -0500 Subject: [PATCH 11/12] Update dependencies --- .gitlab-ci.yml | 11 ----------- composer.json | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 670ef8b2..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.0-alpine - script: - - phpdbg -qrr -- ./vendor/bin/phpunit --coverage-text --colors=never - test:7.1: stage: test before_script: diff --git a/composer.json b/composer.json index e967e7da..d8f10637 100644 --- a/composer.json +++ b/composer.json @@ -40,7 +40,7 @@ "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.9.1", "spatie/phpunit-snapshot-assertions": "^1.2.0" From 55fca3f92f8a86cb4e0165245d661a758d09f359 Mon Sep 17 00:00:00 2001 From: "Timothy J. Warren" Date: Wed, 6 Dec 2017 12:30:12 -0500 Subject: [PATCH 12/12] Correct some errors in creating and deleting anime collection items --- src/API/Kitsu/Model.php | 2 +- src/Controller/AnimeCollection.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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