mirror of
https://github.com/barryvdh/ReflectionDocBlock.git
synced 2026-08-17 17:47:13 +00:00
Merge pull request #375 from phpDocumentor/build-php84
Build on php 8.4
This commit is contained in:
@@ -13,41 +13,41 @@ on: # yamllint disable-line rule:truthy
|
||||
jobs:
|
||||
code-coverage:
|
||||
name: "Code Coverage"
|
||||
uses: "phpDocumentor/.github/.github/workflows/code-coverage.yml@main"
|
||||
uses: "phpDocumentor/.github/.github/workflows/code-coverage.yml@v0.8"
|
||||
with:
|
||||
composer-root-version: "5.x-dev"
|
||||
|
||||
coding-standards:
|
||||
name: "Coding Standards"
|
||||
uses: "phpDocumentor/.github/.github/workflows/coding-standards.yml@v0.7"
|
||||
uses: "phpDocumentor/.github/.github/workflows/coding-standards.yml@v0.8"
|
||||
with:
|
||||
composer-root-version: "5.x-dev"
|
||||
|
||||
dependency-analysis:
|
||||
name: "Dependency analysis"
|
||||
uses: "phpDocumentor/.github/.github/workflows/dependency-analysis.yml@v0.7"
|
||||
uses: "phpDocumentor/.github/.github/workflows/dependency-analysis.yml@v0.8"
|
||||
with:
|
||||
composer-root-version: "5.x-dev"
|
||||
|
||||
lint-root:
|
||||
name: "Lint root"
|
||||
uses: "phpDocumentor/.github/.github/workflows/lint.yml@main"
|
||||
uses: "phpDocumentor/.github/.github/workflows/lint.yml@v0.8"
|
||||
with:
|
||||
composer-options: "--no-check-publish --ansi"
|
||||
|
||||
static-analysis:
|
||||
name: "Static analysis"
|
||||
uses: "phpDocumentor/.github/.github/workflows/static-analysis.yml@v0.7"
|
||||
uses: "phpDocumentor/.github/.github/workflows/static-analysis.yml@v0.8"
|
||||
with:
|
||||
php-extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo, pcntl, posix"
|
||||
composer-root-version: "5.x-dev"
|
||||
|
||||
unit-tests:
|
||||
name: "Unit test"
|
||||
uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.7"
|
||||
uses: "phpDocumentor/.github/.github/workflows/continuous-integration.yml@v0.8"
|
||||
with:
|
||||
composer-root-version: "5.x-dev"
|
||||
php-versions: "['7.4', '8.0', '8.1', '8.2', '8.3']"
|
||||
upcoming-releases: true
|
||||
|
||||
bc_check:
|
||||
name: "BC Check"
|
||||
|
||||
@@ -13,7 +13,7 @@ fix-code-style:
|
||||
.PHONY: static-code-analysis
|
||||
static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm
|
||||
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpstan --configuration=phpstan.neon
|
||||
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/psalm
|
||||
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/psalm.phar
|
||||
|
||||
.PHONY: test
|
||||
test: test-unit ## Runs all test suites with phpunit/phpunit
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
"phpstan/phpstan-mockery": "^1.1",
|
||||
"phpstan/extension-installer": "^1.1",
|
||||
"phpstan/phpstan-webmozart-assert": "^1.2",
|
||||
"vimeo/psalm": "^5.13"
|
||||
"psalm/phar": "^5.26"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
Generated
+18
-1776
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@ class ExampleFinder
|
||||
$filename = $example->getFilePath();
|
||||
|
||||
$file = $this->getExampleFileContents($filename);
|
||||
if (!$file) {
|
||||
if ($file === null) {
|
||||
return sprintf('** File not found : %s **', $filename);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class ExampleFinder
|
||||
}
|
||||
}
|
||||
|
||||
if (!$normalizedPath) {
|
||||
if ($normalizedPath === null) {
|
||||
if (is_readable($this->getExamplePathFromSource($filename))) {
|
||||
$normalizedPath = $this->getExamplePathFromSource($filename);
|
||||
} elseif (is_readable($this->getExamplePathFromExampleDirectory($filename))) {
|
||||
@@ -122,7 +122,7 @@ class ExampleFinder
|
||||
}
|
||||
}
|
||||
|
||||
$lines = $normalizedPath && is_readable($normalizedPath) ? file($normalizedPath) : false;
|
||||
$lines = $normalizedPath !== null && is_readable($normalizedPath) ? file($normalizedPath) : false;
|
||||
|
||||
return $lines !== false ? $lines : null;
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class Serializer
|
||||
$indent = str_repeat($this->indentString, $this->indent);
|
||||
$firstIndent = $this->isFirstLineIndented ? $indent : '';
|
||||
// 3 === strlen(' * ')
|
||||
$wrapLength = $this->lineLength ? $this->lineLength - strlen($indent) - 3 : null;
|
||||
$wrapLength = $this->lineLength !== null ? $this->lineLength - strlen($indent) - 3 : null;
|
||||
|
||||
$text = $this->removeTrailingSpaces(
|
||||
$indent,
|
||||
|
||||
@@ -166,14 +166,14 @@ final class StandardTagFactory implements TagFactory
|
||||
|
||||
public function addService(object $service, ?string $alias = null): void
|
||||
{
|
||||
$this->serviceLocator[$alias ?: get_class($service)] = $service;
|
||||
$this->serviceLocator[$alias ?? get_class($service)] = $service;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
public function registerTagHandler(string $tagName, $handler): void
|
||||
{
|
||||
Assert::stringNotEmpty($tagName);
|
||||
if (strpos($tagName, '\\') && $tagName[0] !== '\\') {
|
||||
if (strpos($tagName, '\\') !== false && $tagName[0] !== '\\') {
|
||||
throw new InvalidArgumentException(
|
||||
'A namespaced tag must have a leading backslash as it must be fully qualified'
|
||||
);
|
||||
|
||||
@@ -62,7 +62,7 @@ final class Deprecated extends BaseTag implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): self {
|
||||
if (empty($body)) {
|
||||
if ($body === null || $body === '') {
|
||||
return new static();
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ final class Param extends TagWithType implements Factory\StaticMethod
|
||||
}
|
||||
|
||||
$variableName = '';
|
||||
if ($this->variableName) {
|
||||
if ($this->variableName !== null && $this->variableName !== '') {
|
||||
$variableName .= ($this->isReference ? '&' : '') . ($this->isVariadic ? '...' : '');
|
||||
$variableName .= '$' . $this->variableName;
|
||||
}
|
||||
|
||||
@@ -111,13 +111,13 @@ final class Property extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
if ($this->description) {
|
||||
if ($this->description !== null) {
|
||||
$description = $this->description->render();
|
||||
} else {
|
||||
$description = '';
|
||||
}
|
||||
|
||||
if ($this->variableName) {
|
||||
if ($this->variableName !== null && $this->variableName !== '') {
|
||||
$variableName = '$' . $this->variableName;
|
||||
} else {
|
||||
$variableName = '';
|
||||
|
||||
@@ -111,13 +111,13 @@ final class PropertyRead extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
if ($this->description) {
|
||||
if ($this->description !== null) {
|
||||
$description = $this->description->render();
|
||||
} else {
|
||||
$description = '';
|
||||
}
|
||||
|
||||
if ($this->variableName) {
|
||||
if ($this->variableName !== null && $this->variableName !== '') {
|
||||
$variableName = '$' . $this->variableName;
|
||||
} else {
|
||||
$variableName = '';
|
||||
|
||||
@@ -59,7 +59,7 @@ final class Since extends BaseTag implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): ?self {
|
||||
if (empty($body)) {
|
||||
if ($body === null || $body === '') {
|
||||
return new static();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ final class Since extends BaseTag implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
if ($this->description) {
|
||||
if ($this->description !== null) {
|
||||
$description = $this->description->render();
|
||||
} else {
|
||||
$description = '';
|
||||
|
||||
@@ -111,13 +111,13 @@ final class Var_ extends TagWithType implements Factory\StaticMethod
|
||||
*/
|
||||
public function __toString(): string
|
||||
{
|
||||
if ($this->description) {
|
||||
if ($this->description !== null) {
|
||||
$description = $this->description->render();
|
||||
} else {
|
||||
$description = '';
|
||||
}
|
||||
|
||||
if ($this->variableName) {
|
||||
if ($this->variableName !== null && $this->variableName !== '') {
|
||||
$variableName = '$' . $this->variableName;
|
||||
} else {
|
||||
$variableName = '';
|
||||
|
||||
@@ -59,7 +59,7 @@ final class Version extends BaseTag implements Factory\StaticMethod
|
||||
?DescriptionFactory $descriptionFactory = null,
|
||||
?TypeContext $context = null
|
||||
): ?self {
|
||||
if (empty($body)) {
|
||||
if ($body === null || $body === '') {
|
||||
return new static();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user