Skip to content

Commit

Permalink
Set AllowDynamicProperties on TypedElement and UnaddressableTypedElement
Browse files Browse the repository at this point in the history
Fixes #4776.
  • Loading branch information
Krinkle committed Oct 16, 2023
1 parent 64159bf commit a5aaf11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .phan/stubs/AllowDynamicProperties.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

// Stub for PHP 8.1 and older
#[Attribute]
class AllowDynamicProperties {
}
1 change: 1 addition & 0 deletions src/Phan/Language/Element/TypedElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @phan-file-suppress PhanPluginDescriptionlessCommentOnPublicMethod
* @phan-file-suppress PhanPluginNoCommentOnPublicMethod TODO: Add comments
*/
#[\AllowDynamicProperties]
abstract class TypedElement implements TypedElementInterface
{
/**
Expand Down
1 change: 1 addition & 0 deletions src/Phan/Language/Element/UnaddressableTypedElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* @phan-file-suppress PhanPluginDescriptionlessCommentOnPublicMethod
* @suppress PhanRedefinedInheritedInterface this uses a polyfill for Stringable
*/
#[\AllowDynamicProperties]
abstract class UnaddressableTypedElement implements Stringable
{
/**
Expand Down

0 comments on commit a5aaf11

Please sign in to comment.