Skip to content

Commit

Permalink
[LiveComponent] Add missing typehints to HydrationExtensionInterface
Browse files Browse the repository at this point in the history
I have a custom hydration extension that in `supports` method checks if the provided class has my custom marker attribute through Reflection, but SA complains:

> Parameter #1 $objectOrClass of class ReflectionClass constructor expects class-string<T of object>|T of object, string given.
  • Loading branch information
norkunas committed Aug 18, 2023
1 parent 25f0ab8 commit 7f8279c
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@

interface HydrationExtensionInterface
{
/**
* @param class-string $className
*/
public function supports(string $className): bool;

/**
* @param class-string $className
*/
public function hydrate(mixed $value, string $className): ?object;

/**
Expand Down

0 comments on commit 7f8279c

Please sign in to comment.