mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-20 15:25:36 +08:00
v3 base
This commit is contained in:
14
src/StaticPHP/Attribute/Package/AfterStage.php
Normal file
14
src/StaticPHP/Attribute/Package/AfterStage.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated method should be executed after a specific stage of the build process for a given package.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
readonly class AfterStage
|
||||
{
|
||||
public function __construct(public string $package_name, public string $stage, public ?string $only_when_package_resolved = null) {}
|
||||
}
|
||||
14
src/StaticPHP/Attribute/Package/BeforeStage.php
Normal file
14
src/StaticPHP/Attribute/Package/BeforeStage.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated method should be executed before a specific stage of the build process for a given package.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
readonly class BeforeStage
|
||||
{
|
||||
public function __construct(public string $package_name, public string $stage, public ?string $only_when_package_resolved = null) {}
|
||||
}
|
||||
17
src/StaticPHP/Attribute/Package/BuildFor.php
Normal file
17
src/StaticPHP/Attribute/Package/BuildFor.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Mark a method as building for a specific OS.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
readonly class BuildFor
|
||||
{
|
||||
/**
|
||||
* @param 'Darwin'|'Linux'|'Windows' $os The operating system to build for PHP_OS_FAMILY
|
||||
*/
|
||||
public function __construct(public string $os) {}
|
||||
}
|
||||
14
src/StaticPHP/Attribute/Package/CustomPhpConfigureArg.php
Normal file
14
src/StaticPHP/Attribute/Package/CustomPhpConfigureArg.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates a custom configure argument for PHP build process.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
readonly class CustomPhpConfigureArg
|
||||
{
|
||||
public function __construct(public string $os = '') {}
|
||||
}
|
||||
14
src/StaticPHP/Attribute/Package/Extension.php
Normal file
14
src/StaticPHP/Attribute/Package/Extension.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated class defines a PHP extension.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
||||
readonly class Extension
|
||||
{
|
||||
public function __construct(public string $name) {}
|
||||
}
|
||||
8
src/StaticPHP/Attribute/Package/Info.php
Normal file
8
src/StaticPHP/Attribute/Package/Info.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
class Info {}
|
||||
8
src/StaticPHP/Attribute/Package/InitPackage.php
Normal file
8
src/StaticPHP/Attribute/Package/InitPackage.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_METHOD)]
|
||||
class InitPackage {}
|
||||
14
src/StaticPHP/Attribute/Package/Library.php
Normal file
14
src/StaticPHP/Attribute/Package/Library.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated class defines a library package.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
||||
readonly class Library
|
||||
{
|
||||
public function __construct(public string $name) {}
|
||||
}
|
||||
11
src/StaticPHP/Attribute/Package/PatchBeforeBuild.php
Normal file
11
src/StaticPHP/Attribute/Package/PatchBeforeBuild.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
readonly class PatchBeforeBuild
|
||||
{
|
||||
public function __construct() {}
|
||||
}
|
||||
11
src/StaticPHP/Attribute/Package/ResolveBuild.php
Normal file
11
src/StaticPHP/Attribute/Package/ResolveBuild.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated method is responsible for initializing the build process for a target package.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD)]
|
||||
class ResolveBuild {}
|
||||
14
src/StaticPHP/Attribute/Package/Stage.php
Normal file
14
src/StaticPHP/Attribute/Package/Stage.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated method defines a specific stage in a package.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
readonly class Stage
|
||||
{
|
||||
public function __construct(public string $name) {}
|
||||
}
|
||||
14
src/StaticPHP/Attribute/Package/Target.php
Normal file
14
src/StaticPHP/Attribute/Package/Target.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
/**
|
||||
* Indicates that the annotated class defines a target.
|
||||
*/
|
||||
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
|
||||
readonly class Target
|
||||
{
|
||||
public function __construct(public string $name) {}
|
||||
}
|
||||
8
src/StaticPHP/Attribute/Package/Validate.php
Normal file
8
src/StaticPHP/Attribute/Package/Validate.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace StaticPHP\Attribute\Package;
|
||||
|
||||
#[\Attribute(\Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
|
||||
class Validate {}
|
||||
Reference in New Issue
Block a user