mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-18 01:57:13 +00:00
Bump dependencies
This commit is contained in:
Generated
+28
-20
@@ -102,16 +102,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.14.0",
|
||||
"version": "v1.17.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38"
|
||||
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
|
||||
"reference": "fbdeaec0df06cf3d51c93de80c7eb76e271f5a38",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
|
||||
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -123,7 +123,11 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.14-dev"
|
||||
"dev-master": "1.17-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
"url": "https://github.com/symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -156,20 +160,20 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2020-01-13T11:15:53+00:00"
|
||||
"time": "2020-06-06T08:46:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "webmozart/assert",
|
||||
"version": "1.7.0",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/webmozart/assert.git",
|
||||
"reference": "aed98a490f9a8f78468232db345ab9cf606cf598"
|
||||
"reference": "9dc4f203e36f2b486149058bade43c851dd97451"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598",
|
||||
"reference": "aed98a490f9a8f78468232db345ab9cf606cf598",
|
||||
"url": "https://api.github.com/repos/webmozart/assert/zipball/9dc4f203e36f2b486149058bade43c851dd97451",
|
||||
"reference": "9dc4f203e36f2b486149058bade43c851dd97451",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -177,7 +181,8 @@
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"conflict": {
|
||||
"vimeo/psalm": "<3.6.0"
|
||||
"phpstan/phpstan": "<0.12.20",
|
||||
"vimeo/psalm": "<3.9.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8.36 || ^7.5.13"
|
||||
@@ -204,7 +209,7 @@
|
||||
"check",
|
||||
"validate"
|
||||
],
|
||||
"time": "2020-02-14T12:15:55+00:00"
|
||||
"time": "2020-06-16T10:16:42+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -258,30 +263,33 @@
|
||||
},
|
||||
{
|
||||
"name": "mockery/mockery",
|
||||
"version": "1.3.1",
|
||||
"version": "1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mockery/mockery.git",
|
||||
"reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be"
|
||||
"reference": "6c6a7c533469873deacf998237e7649fc6b36223"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
|
||||
"reference": "f69bbde7d7a75d6b2862d9ca8fab1cd28014b4be",
|
||||
"url": "https://api.github.com/repos/mockery/mockery/zipball/6c6a7c533469873deacf998237e7649fc6b36223",
|
||||
"reference": "6c6a7c533469873deacf998237e7649fc6b36223",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"hamcrest/hamcrest-php": "~2.0",
|
||||
"lib-pcre": ">=7.0",
|
||||
"php": ">=5.6.0"
|
||||
"php": "^7.3.0"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "~5.7.10|~6.5|~7.0|~8.0"
|
||||
"phpunit/phpunit": "^8.0.0 || ^9.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3.x-dev"
|
||||
"dev-master": "1.4.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -319,7 +327,7 @@
|
||||
"test double",
|
||||
"testing"
|
||||
],
|
||||
"time": "2019-12-26T09:49:15+00:00"
|
||||
"time": "2020-05-19T14:25:16+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<file>src</file>
|
||||
<file>tests/unit</file>
|
||||
<exclude-pattern>*/tests/unit/Types/ContextFactoryTest.php</exclude-pattern>
|
||||
<exclude-pattern>*/tests/unit/Assets/*</exclude-pattern>
|
||||
<arg value="p"/>
|
||||
|
||||
<rule ref="phpDocumentor">
|
||||
|
||||
@@ -17,7 +17,6 @@ use InvalidArgumentException;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Author;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Covers;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Deprecated;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Generic;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\InvalidTag;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Link as LinkTag;
|
||||
@@ -165,7 +164,7 @@ final class StandardTagFactory implements TagFactory
|
||||
{
|
||||
Assert::stringNotEmpty($tagName);
|
||||
Assert::classExists($handler);
|
||||
Assert::implementsInterface($handler, StaticMethod::class);
|
||||
Assert::implementsInterface($handler, Tag::class);
|
||||
|
||||
if (strpos($tagName, '\\') && $tagName[0] !== '\\') {
|
||||
throw new InvalidArgumentException(
|
||||
|
||||
@@ -48,7 +48,7 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod
|
||||
|
||||
public function __construct(?string $version = null, ?Description $description = null)
|
||||
{
|
||||
Assert::nullOrStringNotEmpty($version);
|
||||
Assert::nullOrNotEmpty($version);
|
||||
|
||||
$this->version = $version;
|
||||
$this->description = $description;
|
||||
|
||||
@@ -48,7 +48,7 @@ final class Since extends BaseTag implements Factory\StaticMethod
|
||||
|
||||
public function __construct(?string $version = null, ?Description $description = null)
|
||||
{
|
||||
Assert::nullOrStringNotEmpty($version);
|
||||
Assert::nullOrNotEmpty($version);
|
||||
|
||||
$this->version = $version;
|
||||
$this->description = $description;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpDocumentor\Reflection\Assets;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
||||
|
||||
final class CustomParam implements Tag, StaticMethod
|
||||
{
|
||||
public $myParam;
|
||||
public $fqsenResolver;
|
||||
|
||||
public function getName() : string
|
||||
{
|
||||
return 'spy';
|
||||
}
|
||||
|
||||
public static function create($body, FqsenResolver $fqsenResolver = null, ?string $myParam = null)
|
||||
{
|
||||
$tag = new self();
|
||||
$tag->fqsenResolver = $fqsenResolver;
|
||||
$tag->myParam = $myParam;
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
||||
public function render(?Formatter $formatter = null) : string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpDocumentor\Reflection\Assets;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
||||
|
||||
final class CustomServiceClass implements Tag, StaticMethod
|
||||
{
|
||||
public $formatter;
|
||||
|
||||
public function getName() : string
|
||||
{
|
||||
return 'spy';
|
||||
}
|
||||
|
||||
public static function create($body, PassthroughFormatter $formatter = null)
|
||||
{
|
||||
$tag = new self();
|
||||
$tag->formatter = $formatter;
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
||||
public function render(?Formatter $formatter = null) : string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace phpDocumentor\Reflection\Assets;
|
||||
|
||||
use phpDocumentor\Reflection\DocBlock\Tag;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||
use phpDocumentor\Reflection\FqsenResolver;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Factory\StaticMethod;
|
||||
|
||||
final class CustomServiceInterface implements Tag, StaticMethod
|
||||
{
|
||||
public $formatter;
|
||||
|
||||
public function getName() : string
|
||||
{
|
||||
return 'spy';
|
||||
}
|
||||
|
||||
public static function create($body, Formatter $formatter = null)
|
||||
{
|
||||
$tag = new self();
|
||||
$tag->formatter = $formatter;
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
||||
public function render(?Formatter $formatter = null) : string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
|
||||
public function __toString() : string
|
||||
{
|
||||
return $this->getName();
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,9 @@ namespace phpDocumentor\Reflection\DocBlock;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Mockery as m;
|
||||
use phpDocumentor\Reflection\Assets\CustomParam;
|
||||
use phpDocumentor\Reflection\Assets\CustomServiceClass;
|
||||
use phpDocumentor\Reflection\Assets\CustomServiceInterface;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Author;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter;
|
||||
use phpDocumentor\Reflection\DocBlock\Tags\Formatter\PassthroughFormatter;
|
||||
@@ -169,13 +172,13 @@ class StandardTagFactoryTest extends TestCase
|
||||
{
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
$tagFactory->addParameter('myParam', 'myValue');
|
||||
$tagFactory->registerTagHandler('spy', CustomParam::class);
|
||||
|
||||
$this->assertAttributeSame(
|
||||
[FqsenResolver::class => $resolver, 'myParam' => 'myValue'],
|
||||
'serviceLocator',
|
||||
$tagFactory
|
||||
);
|
||||
$tagFactory->addParameter('myParam', 'myValue');
|
||||
$spy = $tagFactory->create('@spy');
|
||||
|
||||
$this->assertSame($resolver, $spy->fqsenResolver);
|
||||
$this->assertSame('myValue', $spy->myParam);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -190,12 +193,11 @@ class StandardTagFactoryTest extends TestCase
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
$tagFactory->addService($service);
|
||||
$tagFactory->registerTagHandler('spy', CustomServiceClass::class);
|
||||
|
||||
$this->assertAttributeSame(
|
||||
[FqsenResolver::class => $resolver, PassthroughFormatter::class => $service],
|
||||
'serviceLocator',
|
||||
$tagFactory
|
||||
);
|
||||
$spy = $tagFactory->create('@spy');
|
||||
|
||||
$this->assertSame($service, $spy->formatter);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -211,12 +213,11 @@ class StandardTagFactoryTest extends TestCase
|
||||
$resolver = m::mock(FqsenResolver::class);
|
||||
$tagFactory = new StandardTagFactory($resolver);
|
||||
$tagFactory->addService($service, $interfaceName);
|
||||
$tagFactory->registerTagHandler('spy', CustomServiceInterface::class);
|
||||
|
||||
$this->assertAttributeSame(
|
||||
[FqsenResolver::class => $resolver, $interfaceName => $service],
|
||||
'serviceLocator',
|
||||
$tagFactory
|
||||
);
|
||||
$spy = $tagFactory->create('@spy');
|
||||
|
||||
$this->assertSame($service, $spy->formatter);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user