From 91165ca39ad69be808a7abbd149de617a80475c5 Mon Sep 17 00:00:00 2001 From: Ambroise Maupate Date: Thu, 24 Dec 2020 17:34:22 +0100 Subject: [PATCH 1/4] Test on php8 and nightly, removed dead phpdoc --- .travis.yml | 9 +++-- LICENSE | 2 +- Makefile | 2 +- composer.json | 4 +- phpstan.neon | 9 +++++ src/AbstractFeedProvider.php | 24 ------------ .../AbstractTwitterFeed.php | 28 +------------- .../AbstractYoutubeVideoFeed.php | 5 ++- src/Canonical/FeedItem.php | 8 ---- src/Canonical/Image.php | 7 ---- src/Env/CacheResolver.php | 2 - src/Exception/CredentialsException.php | 26 +------------ src/Exception/FeedProviderErrorException.php | 24 ------------ src/FacebookPageFeed.php | 24 ------------ src/GithubCommitsFeed.php | 24 ------------ src/GithubReleasesFeed.php | 1 - src/Graph/AccessToken.php | 2 - src/Graph/RefreshInstagramAccessToken.php | 2 - src/GraphInstagramFeed.php | 24 ------------ src/InstagramFeed.php | 26 +------------ src/InstagramOEmbedFeed.php | 1 - src/MediumFeed.php | 5 +-- src/MixedFeed.php | 24 ------------ src/MockObject/ErroredFeedItem.php | 37 +++++++------------ src/PinterestBoardFeed.php | 25 +------------ src/Response/FeedItemResponse.php | 3 -- src/TwitterFeed.php | 24 ------------ src/TwitterSearchFeed.php | 25 ------------- src/YoutubeMostPopularFeed.php | 1 - src/YoutubePlaylistItemFeed.php | 2 - 30 files changed, 40 insertions(+), 360 deletions(-) create mode 100644 phpstan.neon diff --git a/.travis.yml b/.travis.yml index 70c13d3..0b6d2ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,12 +4,15 @@ php: - 7.2 - 7.3 - 7.4 - + - 8.0 + - nightly +allow_failures: + - php: 8.0 + - php: nightly install: - curl -s http://getcomposer.org/installer | php - php composer.phar install --dev --no-interaction - script: - vendor/bin/phpcs -p - - vendor/bin/phpstan analyse -l 2 ./src + - vendor/bin/phpstan analyse -c phpstan.neon -l 3 ./src diff --git a/LICENSE b/LICENSE index 16d585d..6ffcb8f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2019 REZO ZERO +Copyright (c) 2021 REZO ZERO Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index cc451e0..97675cc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ test: vendor/bin/phpcbf -p - vendor/bin/phpstan analyse -l 2 ./src + vendor/bin/phpstan analyse -c phpstan.neon -l 3 ./src diff --git a/composer.json b/composer.json index 290b9b4..523d3b5 100644 --- a/composer.json +++ b/composer.json @@ -20,9 +20,9 @@ ], "require": { "php": ">=7.2", - "abraham/twitteroauth": "^0.7.4", + "abraham/twitteroauth": "^2.0.0", "doctrine/cache": "^1.6.2", - "guzzlehttp/guzzle": "~6.0", + "guzzlehttp/guzzle": "~6.0 || ~7.0", "ext-json": "*" }, "autoload": { diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..ad3d8b9 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,9 @@ +parameters: + excludes_analyse: + - */node_modules/* + - */bower_components/* + - */static/* + reportUnmatchedIgnoredErrors: false + checkMissingIterableValueType: false + checkGenericClassInNonGenericObjectType: false + treatPhpDocTypesAsCertain: false diff --git a/src/AbstractFeedProvider.php b/src/AbstractFeedProvider.php index d6e9474..d82ec4c 100644 --- a/src/AbstractFeedProvider.php +++ b/src/AbstractFeedProvider.php @@ -1,28 +1,4 @@ message = $message; diff --git a/src/PinterestBoardFeed.php b/src/PinterestBoardFeed.php index 08622ef..2ed8c8e 100644 --- a/src/PinterestBoardFeed.php +++ b/src/PinterestBoardFeed.php @@ -1,28 +1,4 @@ Date: Fri, 25 Dec 2020 19:42:32 +0100 Subject: [PATCH 2/4] Fixed travis syntax --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b6d2ed..6e11a08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,9 +6,10 @@ php: - 7.4 - 8.0 - nightly -allow_failures: - - php: 8.0 - - php: nightly +jobs: + allow_failures: + - php: 8.0 + - php: nightly install: - curl -s http://getcomposer.org/installer | php - php composer.phar install --dev --no-interaction From 810c1de176296b3e33743ee01c8d4fa84cbd94e3 Mon Sep 17 00:00:00 2001 From: Ambroise Maupate Date: Thu, 27 May 2021 18:50:48 +0200 Subject: [PATCH 3/4] Must not fail php8 --- .travis.yml | 3 +-- Makefile | 2 +- composer.json | 4 ++-- phpstan.neon | 3 +++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e11a08..5765ee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,12 +8,11 @@ php: - nightly jobs: allow_failures: - - php: 8.0 - php: nightly install: - curl -s http://getcomposer.org/installer | php - php composer.phar install --dev --no-interaction script: - vendor/bin/phpcs -p - - vendor/bin/phpstan analyse -c phpstan.neon -l 3 ./src + - vendor/bin/phpstan analyse -c phpstan.neon diff --git a/Makefile b/Makefile index 97675cc..6da908d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ test: vendor/bin/phpcbf -p - vendor/bin/phpstan analyse -c phpstan.neon -l 3 ./src + vendor/bin/phpstan analyse -c phpstan.neon diff --git a/composer.json b/composer.json index 523d3b5..862f634 100644 --- a/composer.json +++ b/composer.json @@ -31,8 +31,8 @@ "require-dev": { "squizlabs/php_codesniffer": "^3.3", "jms/serializer": "^2.1 || ^3.5", - "symfony/stopwatch": "^4.2", - "symfony/dotenv": "^4.2", + "symfony/stopwatch": ">=4.2", + "symfony/dotenv": ">=4.2", "phpstan/phpstan": "^0.12.14" } } diff --git a/phpstan.neon b/phpstan.neon index ad3d8b9..12f3e15 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,4 +1,7 @@ parameters: + level: 3 + paths: + - src excludes_analyse: - */node_modules/* - */bower_components/* From 082ce734991bb484015f5020b8ec5896f2316ac1 Mon Sep 17 00:00:00 2001 From: Ambroise Maupate Date: Thu, 27 May 2021 18:54:49 +0200 Subject: [PATCH 4/4] Use php8 for docker --- Dockerfile | 2 +- docker-compose.yml | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3914faf..9aad904 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM roadiz/php74-nginx-alpine:latest +FROM roadiz/php80-nginx-alpine:latest MAINTAINER Ambroise Maupate ENV USER_UID=1000 ARG USER_UID=1000 diff --git a/docker-compose.yml b/docker-compose.yml index 107f8ef..9e60327 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -35,10 +35,13 @@ services: - 8080:80/tcp labels: - "traefik.enable=true" - - "traefik.port=80" - - "traefik.frontend.rule=Host:mixedfeed.test" - - "traefik.frontend.passHostHeader=true" - - "traefik.backend=example" + - "traefik.http.services.mixedfeed.loadbalancer.server.scheme=http" + - "traefik.http.services.mixedfeed.loadbalancer.server.port=80" + - "traefik.http.services.mixedfeed.loadbalancer.passhostheader=true" + # Listen HTTP + - "traefik.http.routers.mixedfeed.entrypoints=http" + - "traefik.http.routers.mixedfeed.rule=Host(`mixedfeed.test`)" + - "traefik.http.routers.mixedfeed.service=mixedfeed" networks: - default - frontproxynet