From c0d912a1c4e6ac7cd3c1d6dd57442c5e9b6d305a 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 b1cae947a706e0d0aa59652f20974ef1546ba86c 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 42117a1386ee10aafe943211e56398ae8b72d22a 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 cce0e714dc9ff8d36a90be1f36fb8565d564ef66 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 30062ab65d28ae9eaac9067a0a07a6e96a9bb9a8 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 7703187cd9005d827afd3ccdd826fd63d7080fd3 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 a6e63b07f06e9587dd66fe5cd2957ae9d3e19096 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 d08ffd1d1700cd18e01f5b55a7c9c26d47778da2 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 72e68e18acfa042a8418a302d7c8375d1775e9b4 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 b5c7d430f4947ed37816f31deebe733c54d50cff 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 815bf835d37ad0f6a769d7f17595e2b872dcfc4e 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 1ea3a59b6a1c27716109a80ff383edaf66790a13 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