Skip to content

Commit b815cae

Browse files
authored
Merge pull request #862 from hydephp/unwrap-invokable-action-class
Deprecate base class InvokableAction
2 parents 8b3aec6 + ed3ecd0 commit b815cae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/framework/src/Framework/Concerns/InvokableAction.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,20 @@
44

55
namespace Hyde\Framework\Concerns;
66

7+
use JetBrains\PhpStorm\Deprecated;
8+
79
/**
810
* Base class for invokable actions. Provides a helper to invoke the action statically.
911
*
12+
* @deprecated None of these child classes are ever used invokably used.
13+
* A better alternative is to simply use a static `handle` method as that offers full type and IDE support.
1014
* @see \Hyde\Framework\Testing\Feature\InvokableActionTest
1115
*/
1216
abstract class InvokableAction
1317
{
1418
abstract public function __invoke(): mixed;
1519

20+
#[Deprecated(replacement: '%class%::handle(%parametersList%)')]
1621
public static function call(mixed ...$args): mixed
1722
{
1823
return (new static(...$args))->__invoke();

0 commit comments

Comments
 (0)