diff options
author | Remi Collet <remi@fedoraproject.org> | 2017-08-07 15:12:50 +0000 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-08-07 17:23:41 +0200 |
commit | c754c5b3e5c74268e510aa1ff5c0a0d3f34b1a45 (patch) | |
tree | 72ee9e2748e85a47804c0b540ee4ce0c194b3791 /php-phpdocumentor-reflection-docblock-pr113.patch | |
parent | f487b47b2bbdc2d5fab13f30c23586df19943a5f (diff) |
add patch to fix BC break, thanks to Koschei, from
https://github.com/phpDocumentor/ReflectionDocBlock/pull/113
Diffstat (limited to 'php-phpdocumentor-reflection-docblock-pr113.patch')
-rw-r--r-- | php-phpdocumentor-reflection-docblock-pr113.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/php-phpdocumentor-reflection-docblock-pr113.patch b/php-phpdocumentor-reflection-docblock-pr113.patch new file mode 100644 index 0000000..50b11f8 --- /dev/null +++ b/php-phpdocumentor-reflection-docblock-pr113.patch @@ -0,0 +1,44 @@ +From 358daaf824d8f6e1acc56eee40127f4bd4153051 Mon Sep 17 00:00:00 2001 +From: Roberto Espinoza <roberto.espinoza@nature.com> +Date: Mon, 7 Aug 2017 12:56:26 +0900 +Subject: [PATCH] Check tag body has a value before trying to access it as an + string array + +--- + src/DocBlock/StandardTagFactory.php | 2 +- + tests/integration/DocblocksWithAnnotationsTest.php | 3 ++- + 2 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/DocBlock/StandardTagFactory.php b/src/DocBlock/StandardTagFactory.php +index 786caef..8efd84e 100644 +--- a/src/DocBlock/StandardTagFactory.php ++++ b/src/DocBlock/StandardTagFactory.php +@@ -113,7 +113,7 @@ public function create($tagLine, TypeContext $context = null) + + list($tagName, $tagBody) = $this->extractTagParts($tagLine); + +- if ($tagBody[0] === '[') { ++ if ($tagBody !== '' && $tagBody[0] === '[') { + throw new \InvalidArgumentException( + 'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors' + ); +diff --git a/tests/integration/DocblocksWithAnnotationsTest.php b/tests/integration/DocblocksWithAnnotationsTest.php +index 3c40f4f..6db1604 100644 +--- a/tests/integration/DocblocksWithAnnotationsTest.php ++++ b/tests/integration/DocblocksWithAnnotationsTest.php +@@ -23,6 +23,7 @@ public function testDocblockWithAnnotations() + /** + * @var \DateTime[] + * @Groups({"a", "b"}) ++ * @ORM\Entity + */ + DOCCOMMENT; + +@@ -30,6 +31,6 @@ public function testDocblockWithAnnotations() + $factory = DocBlockFactory::createInstance(); + $docblock = $factory->create($docComment); + +- $this->assertCount(2, $docblock->getTags()); ++ $this->assertCount(3, $docblock->getTags()); + } + } |