From c340c13a6a9d8f47ac863f96e754d664a27d4a69 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 24 Aug 2016 17:15:41 +0200 Subject: [PATCH 1/2] limit symfony versions to avoid running out of memory on install --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 58d0f562..c1233c33 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,12 +14,14 @@ addons: - enchant php: - - 5.4 - 5.5 - 5.6 - 7.0 - hhvm +env: + - SYMFONY_VERSION='3.0.*' + branches: only: - master @@ -28,9 +30,12 @@ branches: matrix: include: - php: 5.4 - env: COMPOSER_FLAGS="--prefer-lowest" + env: + - COMPOSER_FLAGS="--prefer-lowest" + - SYMFONY_VERSION='2.3.*' - php: 5.6 env: + - SYMFONY_VERSION='2.4.*' - PHPUNIT_FLAGS="--coverage-clover=coverage.clover" - COVERAGE=true - php: 5.6 From e86c401a9d4b4b9af1ee76b8a613229920e3e5f8 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 24 Aug 2016 15:16:20 +0000 Subject: [PATCH 2/2] Applied fixes from StyleCI --- Command/BaseInvalidateCommand.php | 2 +- Command/InvalidatePathCommand.php | 4 ++-- Command/InvalidateRegexCommand.php | 4 ++-- Command/InvalidateTagCommand.php | 4 ++-- Command/RefreshPathCommand.php | 4 ++-- Configuration/InvalidateRoute.php | 2 +- EventListener/AbstractRuleSubscriber.php | 8 ++++---- EventListener/CacheControlSubscriber.php | 10 +++++----- EventListener/InvalidationSubscriber.php | 2 +- EventListener/TagSubscriber.php | 2 +- Handler/TagHandler.php | 2 +- Http/RuleMatcher.php | 4 ++-- Http/RuleMatcherInterface.php | 2 +- HttpCache.php | 2 +- Tests/Functional/Command/CommandTestCase.php | 4 ++-- Tests/Unit/DependencyInjection/ConfigurationTest.php | 2 +- UserContext/RoleProvider.php | 2 +- 17 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Command/BaseInvalidateCommand.php b/Command/BaseInvalidateCommand.php index e1cb4d73..c8a68e58 100644 --- a/Command/BaseInvalidateCommand.php +++ b/Command/BaseInvalidateCommand.php @@ -30,7 +30,7 @@ abstract class BaseInvalidateCommand extends ContainerAwareCommand * If no cache manager is specified explicitly, fos_http_cache.cache_manager * is automatically loaded. * - * @param CacheManager|null $cacheManager The cache manager to talk to. + * @param CacheManager|null $cacheManager The cache manager to talk to */ public function __construct(CacheManager $cacheManager = null) { diff --git a/Command/InvalidatePathCommand.php b/Command/InvalidatePathCommand.php index 729dba97..fb7f4359 100644 --- a/Command/InvalidatePathCommand.php +++ b/Command/InvalidatePathCommand.php @@ -32,8 +32,8 @@ class InvalidatePathCommand extends BaseInvalidateCommand * If no cache manager is specified explicitly, fos_http_cache.cache_manager * is automatically loaded. * - * @param CacheManager|null $cacheManager The cache manager to talk to. - * @param string $commandName Name of this command, in case you want to reuse it. + * @param CacheManager|null $cacheManager The cache manager to talk to + * @param string $commandName Name of this command, in case you want to reuse it */ public function __construct(CacheManager $cacheManager = null, $commandName = 'fos:httpcache:invalidate:path') { diff --git a/Command/InvalidateRegexCommand.php b/Command/InvalidateRegexCommand.php index dafb58d3..6ba5da06 100644 --- a/Command/InvalidateRegexCommand.php +++ b/Command/InvalidateRegexCommand.php @@ -33,8 +33,8 @@ class InvalidateRegexCommand extends BaseInvalidateCommand * If no cache manager is specified explicitly, fos_http_cache.cache_manager * is automatically loaded. * - * @param CacheManager|null $cacheManager The cache manager to talk to. - * @param string $commandName Name of this command, in case you want to reuse it. + * @param CacheManager|null $cacheManager The cache manager to talk to + * @param string $commandName Name of this command, in case you want to reuse it */ public function __construct(CacheManager $cacheManager = null, $commandName = 'fos:httpcache:invalidate:regex') { diff --git a/Command/InvalidateTagCommand.php b/Command/InvalidateTagCommand.php index d9f479fc..094e8007 100644 --- a/Command/InvalidateTagCommand.php +++ b/Command/InvalidateTagCommand.php @@ -41,8 +41,8 @@ class InvalidateTagCommand extends ContainerAwareCommand * * Passing CacheManager as argument is deprecated and will be restricted to TagHandler in 2.0. * - * @param TagHandler|CacheManager|null $tagHandler The tag handler to talk to. - * @param string $commandName Name of this command, in case you want to reuse it. + * @param TagHandler|CacheManager|null $tagHandler The tag handler to talk to + * @param string $commandName Name of this command, in case you want to reuse it */ public function __construct($tagHandler = null, $commandName = 'fos:httpcache:invalidate:tag') { diff --git a/Command/RefreshPathCommand.php b/Command/RefreshPathCommand.php index 50bd6fd4..3e44c9f3 100644 --- a/Command/RefreshPathCommand.php +++ b/Command/RefreshPathCommand.php @@ -32,8 +32,8 @@ class RefreshPathCommand extends BaseInvalidateCommand * If no cache manager is specified explicitly, fos_http_cache.cache_manager * is automatically loaded. * - * @param CacheManager|null $cacheManager The cache manager to talk to. - * @param string $commandName Name of this command, in case you want to reuse it. + * @param CacheManager|null $cacheManager The cache manager to talk to + * @param string $commandName Name of this command, in case you want to reuse it */ public function __construct(CacheManager $cacheManager = null, $commandName = 'fos:httpcache:refresh:path') { diff --git a/Configuration/InvalidateRoute.php b/Configuration/InvalidateRoute.php index 31720542..cbc18650 100644 --- a/Configuration/InvalidateRoute.php +++ b/Configuration/InvalidateRoute.php @@ -32,7 +32,7 @@ class InvalidateRoute extends ConfigurationAnnotation /** * Handle route name given without explicit key. * - * @param string $value The route name. + * @param string $value The route name */ public function setValue($value) { diff --git a/EventListener/AbstractRuleSubscriber.php b/EventListener/AbstractRuleSubscriber.php index 609594d2..f9fa6651 100644 --- a/EventListener/AbstractRuleSubscriber.php +++ b/EventListener/AbstractRuleSubscriber.php @@ -18,7 +18,7 @@ class AbstractRuleSubscriber { /** - * @var array List of arrays with RuleMatcher, settings array. + * @var array List of arrays with RuleMatcher, settings array */ private $rulesMap = array(); @@ -26,8 +26,8 @@ class AbstractRuleSubscriber * Add a rule matcher with a list of header directives to apply if the * request and response are matched. * - * @param RuleMatcherInterface $ruleMatcher The headers apply to responses matched by this matcher. - * @param array $settings An array of header configuration. + * @param RuleMatcherInterface $ruleMatcher The headers apply to responses matched by this matcher + * @param array $settings An array of header configuration */ public function addRule( RuleMatcherInterface $ruleMatcher, @@ -42,7 +42,7 @@ public function addRule( * @param Request $request * @param Response $response * - * @return array|false Settings to apply or false if no rule matched. + * @return array|false Settings to apply or false if no rule matched */ protected function matchRule(Request $request, Response $response) { diff --git a/EventListener/CacheControlSubscriber.php b/EventListener/CacheControlSubscriber.php index dc301073..502109e0 100644 --- a/EventListener/CacheControlSubscriber.php +++ b/EventListener/CacheControlSubscriber.php @@ -50,12 +50,12 @@ class CacheControlSubscriber extends AbstractRuleSubscriber implements EventSubs * If not empty, add a debug header with that name to all responses, * telling the cache proxy to add debug output. * - * @var string|bool Name of the header or false to add no header. + * @var string|bool Name of the header or false to add no header */ private $debugHeader; /** - * @param string|bool $debugHeader Header to set to trigger debugging, or false to send no header. + * @param string|bool $debugHeader Header to set to trigger debugging, or false to send no header */ public function __construct($debugHeader = false) { @@ -148,7 +148,7 @@ public function onKernelResponse(FilterResponseEvent $event) * * @param Response $response * @param array $directives - * @param bool $overwrite Whether to keep existing cache headers or to overwrite them. + * @param bool $overwrite Whether to keep existing cache headers or to overwrite them */ private function setCache(Response $response, array $directives, $overwrite) { @@ -185,7 +185,7 @@ private function setCache(Response $response, array $directives, $overwrite) * * @param Response $response * @param array $controls - * @param bool $overwrite Whether to keep existing cache headers or to overwrite them. + * @param bool $overwrite Whether to keep existing cache headers or to overwrite them */ private function setExtraCacheDirectives(Response $response, array $controls, $overwrite) { @@ -216,7 +216,7 @@ private function setExtraCacheDirectives(Response $response, array $controls, $o * * @param Request $request * - * @return bool True if the request is safe and headers can be set. + * @return bool True if the request is safe and headers can be set */ protected function isRequestSafe(Request $request) { diff --git a/EventListener/InvalidationSubscriber.php b/EventListener/InvalidationSubscriber.php index 38012f85..a86d28cd 100644 --- a/EventListener/InvalidationSubscriber.php +++ b/EventListener/InvalidationSubscriber.php @@ -119,7 +119,7 @@ public function onKernelException() /** * Flush cache manager when console terminates or errors. * - * @throws ExceptionCollection If an exception occurs during flush. + * @throws ExceptionCollection If an exception occurs during flush */ public function onConsoleTerminate(ConsoleEvent $event) { diff --git a/EventListener/TagSubscriber.php b/EventListener/TagSubscriber.php index efdf3b8a..9f2b4591 100644 --- a/EventListener/TagSubscriber.php +++ b/EventListener/TagSubscriber.php @@ -107,7 +107,7 @@ public static function getSubscribedEvents() * * @param Request $request * - * @return array List of tags affected by the request. + * @return array List of tags affected by the request */ private function getAnnotationTags(Request $request) { diff --git a/Handler/TagHandler.php b/Handler/TagHandler.php index 53216010..e5663b3f 100644 --- a/Handler/TagHandler.php +++ b/Handler/TagHandler.php @@ -22,7 +22,7 @@ class TagHandler extends BaseTagHandler * @param Response $response * @param bool $replace Whether to replace the current tags on the * response. If false, parses the header to merge - * tags. + * tags * * @return $this */ diff --git a/Http/RuleMatcher.php b/Http/RuleMatcher.php index d65ed03f..3f7f01bf 100644 --- a/Http/RuleMatcher.php +++ b/Http/RuleMatcher.php @@ -40,8 +40,8 @@ class RuleMatcher implements RuleMatcherInterface private $expressionLanguage; /** - * @param RequestMatcherInterface $requestMatcher Strategy to match the request. - * @param array $criteria Additional criteria not covered by request matcher. + * @param RequestMatcherInterface $requestMatcher Strategy to match the request + * @param array $criteria Additional criteria not covered by request matcher */ public function __construct(RequestMatcherInterface $requestMatcher, array $criteria) { diff --git a/Http/RuleMatcherInterface.php b/Http/RuleMatcherInterface.php index d9e8af97..db9b9e51 100644 --- a/Http/RuleMatcherInterface.php +++ b/Http/RuleMatcherInterface.php @@ -28,7 +28,7 @@ interface RuleMatcherInterface * @param Request $request * @param Response $response * - * @return bool True if request and response match, false otherwise. + * @return bool True if request and response match, false otherwise */ public function matches(Request $request, Response $response); } diff --git a/HttpCache.php b/HttpCache.php index 6d0d8dbf..958c904c 100644 --- a/HttpCache.php +++ b/HttpCache.php @@ -22,7 +22,7 @@ /** * Base class for enhanced Symfony reverse proxy based on the symfony FrameworkBundle HttpCache. * - * @deprecated Use FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache instead. + * @deprecated Use FOS\HttpCacheBundle\SymfonyCache\EventDispatchingHttpCache instead * * @author Jérôme Vieilledent (courtesy of eZ Systems AS) * diff --git a/Tests/Functional/Command/CommandTestCase.php b/Tests/Functional/Command/CommandTestCase.php index d113583c..744eab35 100644 --- a/Tests/Functional/Command/CommandTestCase.php +++ b/Tests/Functional/Command/CommandTestCase.php @@ -25,8 +25,8 @@ abstract class CommandTestCase extends WebTestCase * * @param Client $client * @param string $command - * @param int $verbosity Verbosity level to use. - * @param int $exitCode Expected command exit code. + * @param int $verbosity Verbosity level to use + * @param int $exitCode Expected command exit code * * @return string */ diff --git a/Tests/Unit/DependencyInjection/ConfigurationTest.php b/Tests/Unit/DependencyInjection/ConfigurationTest.php index 59804567..56dfce83 100644 --- a/Tests/Unit/DependencyInjection/ConfigurationTest.php +++ b/Tests/Unit/DependencyInjection/ConfigurationTest.php @@ -470,7 +470,7 @@ public function testRulesBothStatusAndExpression() } /** - * @return array The configuration when nothing is specified. + * @return array The configuration when nothing is specified */ private function getEmptyConfig() { diff --git a/UserContext/RoleProvider.php b/UserContext/RoleProvider.php index e0443d63..4702d77b 100644 --- a/UserContext/RoleProvider.php +++ b/UserContext/RoleProvider.php @@ -54,7 +54,7 @@ public function __construct($context = null) /** * {@inheritdoc} * - * @throws InvalidConfigurationException when called without a security context being set. + * @throws InvalidConfigurationException when called without a security context being set */ public function updateUserContext(UserContext $context) {