Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
steps:
- name: "Dependabot metadata"
id: "metadata"
uses: "dependabot/fetch-metadata@v2.4.0"
uses: "dependabot/fetch-metadata@v2.5.0"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Enable auto-merge for Dependabot PRs"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: "Deploy"
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/6.x' }}"
uses: "actions/upload-artifact@v5"
uses: "actions/upload-artifact@v7"
with:
name: "documentation"
path: "build/docs"
Expand Down
110 changes: 55 additions & 55 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,5 @@
<ClassMustBeFinal>
<code><![CDATA[NamespaceNodeToContext]]></code>
</ClassMustBeFinal>
<MixedArgumentTypeCoercion>
<code><![CDATA[$this->aliasesToFullyQualifiedNames($namespace)]]></code>
</MixedArgumentTypeCoercion>
</file>
</files>
7 changes: 7 additions & 0 deletions src/phpDocumentor/Reflection/Php/Constant.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use phpDocumentor\Reflection\Fqsen;
use phpDocumentor\Reflection\Location;
use phpDocumentor\Reflection\Metadata\MetaDataContainer as MetaDataContainerInterface;
use phpDocumentor\Reflection\Type;

use function is_string;
use function trigger_error;
Expand Down Expand Up @@ -52,6 +53,7 @@ public function __construct(
Location|null $endLocation = null,
Visibility|null $visibility = null,
private readonly bool $final = false,
private readonly Type|null $type = null,
) {
$this->location = $location ?: new Location(-1);
$this->endLocation = $endLocation ?: new Location(-1);
Expand Down Expand Up @@ -135,4 +137,9 @@ public function isFinal(): bool
{
return $this->final;
}

public function getType(): Type|null
{
return $this->type;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ protected function pExpr_ClassConstFetch(Expr\ClassConstFetch $node): string
{
$renderedName = parent::pObjectProperty($node->name);

if ($node->class instanceof Name) {
if ($node->class instanceof Name\FullyQualified) {
$className = parent::pName_FullyQualified($node->class);
$className = $this->typeResolver->resolve($className, $this->context);
} elseif ($node->class instanceof Name) {
$className = parent::pName($node->class);
$className = $this->typeResolver->resolve($className, $this->context);
} else {
Expand Down
1 change: 1 addition & 0 deletions src/phpDocumentor/Reflection/Php/Factory/ClassConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ protected function doCreate(
new Location($const->getEndLine()),
$this->buildVisibility($const),
$const->isFinal(),
(new Type())->fromPhpParser($const->getType(), $context->getTypeContext()),
);

foreach ($this->reducers as $reducer) {
Expand Down
Loading
Loading