Skip to content

Commit

Permalink
Merge branch 'release/v3.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed May 27, 2021
2 parents aced7aa + 082ce73 commit 062da5e
Show file tree
Hide file tree
Showing 32 changed files with 53 additions and 367 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@ php:
- 7.2
- 7.3
- 7.4

- 8.0
- nightly
jobs:
allow_failures:
- 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

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM roadiz/php74-nginx-alpine:latest
FROM roadiz/php80-nginx-alpine:latest
MAINTAINER Ambroise Maupate <[email protected]>
ENV USER_UID=1000
ARG USER_UID=1000
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

test:
vendor/bin/phpcbf -p
vendor/bin/phpstan analyse -l 2 ./src
vendor/bin/phpstan analyse -c phpstan.neon
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
}
11 changes: 7 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
parameters:
level: 3
paths:
- src
excludes_analyse:
- */node_modules/*
- */bower_components/*
- */static/*
reportUnmatchedIgnoredErrors: false
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
24 changes: 0 additions & 24 deletions src/AbstractFeedProvider.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file AbstractFeedProvider.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed;

use Doctrine\Common\Cache\CacheProvider;
Expand Down
28 changes: 1 addition & 27 deletions src/AbstractFeedProvider/AbstractTwitterFeed.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file AbstractTwitterFeed.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed\AbstractFeedProvider;

use Abraham\TwitterOAuth\TwitterOAuth;
Expand All @@ -39,8 +15,7 @@
abstract class AbstractTwitterFeed extends BaseFeedProvider
{
/**
* Shorter TTL for Twitter
* 5 min
* Shorter TTL for Twitter - 5 min
* @var int
*/
protected $ttl = 60*5;
Expand All @@ -58,7 +33,6 @@ abstract class AbstractTwitterFeed extends BaseFeedProvider
protected static $timeKey = 'created_at';

/**
*
* @param string $consumerKey
* @param string $consumerSecret
* @param string $accessToken
Expand Down
5 changes: 3 additions & 2 deletions src/AbstractFeedProvider/AbstractYoutubeVideoFeed.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

abstract class AbstractYoutubeVideoFeed extends AbstractFeedProvider
{
/**
* @var string
*/
protected $apiKey;

/**
* YoutubeVideoFeed constructor.
*
* @param string $apiKey
* @param CacheProvider|null $cacheProvider
*
Expand Down
8 changes: 0 additions & 8 deletions src/Canonical/FeedItem.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?php
/**
* mixedfeed - FeedItem.php
*
* Initial version by: ambroisemaupate
* Initial version created on: 2019-02-12
*/

namespace RZ\MixedFeed\Canonical;

class FeedItem
Expand Down Expand Up @@ -46,7 +39,6 @@ class FeedItem
* @var array
*/
protected $tags = [];

/**
* @var int|null
*/
Expand Down
7 changes: 0 additions & 7 deletions src/Canonical/Image.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
<?php
/**
* mixedfeed - Image.php
*
* Initial version by: ambroisemaupate
* Initial version created on: 2019-02-12
*/

namespace RZ\MixedFeed\Canonical;

class Image
Expand Down
2 changes: 0 additions & 2 deletions src/Env/CacheResolver.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php


namespace RZ\MixedFeed\Env;

use Doctrine\Common\Cache\ApcuCache;
Expand Down
26 changes: 1 addition & 25 deletions src/Exception/CredentialsException.php
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
<?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file CredentialsException.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed\Exception;

use Throwable;

class CredentialsException extends \Exception
{
public function __construct($message = "Unsufficient authentification data found.", $code = 0, Throwable $previous = null)
public function __construct($message = "Insufficient authentication data found.", $code = 0, Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
Expand Down
24 changes: 0 additions & 24 deletions src/Exception/FeedProviderErrorException.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file FeedProviderErrorException.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed\Exception;

use Throwable;
Expand Down
24 changes: 0 additions & 24 deletions src/FacebookPageFeed.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file FacebookPageFeed.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed;

use Doctrine\Common\Cache\CacheProvider;
Expand Down
24 changes: 0 additions & 24 deletions src/GithubCommitsFeed.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright © 2015, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file GithubCommitsFeed.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed;

use Doctrine\Common\Cache\CacheProvider;
Expand Down
1 change: 0 additions & 1 deletion src/GithubReleasesFeed.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

namespace RZ\MixedFeed;

use Doctrine\Common\Cache\CacheProvider;
Expand Down
2 changes: 0 additions & 2 deletions src/Graph/AccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class AccessToken
protected $expiresIn = 0;

/**
* AccessToken constructor.
*
* @param string $accessToken
* @param string $tokenType
* @param int $expiresIn
Expand Down
2 changes: 0 additions & 2 deletions src/Graph/RefreshInstagramAccessToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ final class RefreshInstagramAccessToken
private static $grantType = 'ig_refresh_token';

/**
* RefreshInstagramAccessToken constructor.
*
* @param string $accessToken
*/
public function __construct(string $accessToken)
Expand Down
24 changes: 0 additions & 24 deletions src/GraphInstagramFeed.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
<?php
/**
* Copyright © 2020, Ambroise Maupate
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is furnished
* to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* @file InstagramFeed.php
* @author Ambroise Maupate
*/
namespace RZ\MixedFeed;

use Doctrine\Common\Cache\CacheProvider;
Expand Down
Loading

0 comments on commit 062da5e

Please sign in to comment.