Skip to content

Commit 5fd8da1

Browse files
committed
minor #1057 [LiveComponent] Add missing typehints to HydrationExtensionInterface (norkunas)
This PR was merged into the 2.x branch. Discussion ---------- [LiveComponent] Add missing typehints to HydrationExtensionInterface | Q | A | ------------- | --- | Bug fix? | no /not sure | New feature? | no /not sure | Tickets | N/A | License | MIT 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. Commits ------- 7f8279c [LiveComponent] Add missing typehints to HydrationExtensionInterface
2 parents ec186f9 + 7f8279c commit 5fd8da1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/LiveComponent/src/Hydration/HydrationExtensionInterface.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@
1313

1414
interface HydrationExtensionInterface
1515
{
16+
/**
17+
* @param class-string $className
18+
*/
1619
public function supports(string $className): bool;
1720

21+
/**
22+
* @param class-string $className
23+
*/
1824
public function hydrate(mixed $value, string $className): ?object;
1925

2026
/**

0 commit comments

Comments
 (0)