PHP TypeLang Help

@seal-properties

The @seal-properties tag closes off a class's magic property surface to exactly the properties already declared with @property, @property-read, or @property-write, nothing more. Without it, an analyzer that sees __get()/__set() implemented has to assume any property name might resolve at runtime, even one never mentioned in the docblock; @seal-properties removes that uncertainty, so access to an undocumented magic property can be flagged as an error instead of passing silently.

"@seal-properties" [ <Description> ]

Parsing a @seal-properties tag produces a FlagTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every tag already carries.

final class SealPropertiesTag extends FlagTag {}

The equivalent tag for magic methods declared through @method is @seal-methods.

This is a Psalm-only convention, following the same pattern as @seal-methods: Psalm's own vocabulary is @psalm-seal-properties/@psalm-no-seal-properties, with the bare @seal-properties/@no-seal-properties spellings documented as equivalent. See Psalm's reference. PHPStan has no equivalent concept.

05 July 2026