We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9d3f7e commit 20892abCopy full SHA for 20892ab
src/StaticPHP/Attribute/Package/Extension.php
@@ -8,7 +8,12 @@
8
* Indicates that the annotated class defines a PHP extension.
9
*/
10
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
11
-readonly class Extension
+class Extension
12
{
13
- public function __construct(public string $name) {}
+ public function __construct(public string $name)
14
+ {
15
+ if (!str_starts_with($name, 'ext-')) {
16
+ $this->name = "ext-{$name}";
17
+ }
18
19
}
0 commit comments