Skip to content

Commit

Permalink
废弃 imi-macro,移出主仓库 (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft authored Oct 20, 2023
1 parent cd937b1 commit e8d2a7a
Show file tree
Hide file tree
Showing 37 changed files with 11 additions and 615 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ jobs:
run: |
docker exec ${ENV_SERVICE} ./dev/phpstan.sh workerman-gateway
- name: Analyse macro
if: ${{ env.test_prepared && always() }}
run: |
docker exec ${ENV_SERVICE} ./dev/phpstan.sh macro
- name: Analyse phar
if: ${{ env.test_prepared && always() }}
run: |
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,3 @@ jobs:
if: ${{ env.test_prepared && always() }}
run: |
docker exec -w /imi/src/Components/workerman-gateway ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run
- name: Analyse macro
if: ${{ env.test_prepared && always() }}
run: |
docker exec -w /imi/src/Components/macro ${ENV_SERVICE} /imi/vendor/bin/rector process --dry-run
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ composer.lock
/split-repository/vendor
/.vscode
*.pid
*.macro.php
/.phpbench
/node_modules
/tests/clover.xml
Expand Down
1 change: 0 additions & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->notName('*.macro.php')
->notPath('src/Components/swoole/src/Util/Coroutine.typed.php') // 兼容 Swoole 5.0,需要 PHP >= 8.0
->notPath('src/Components/hprose/src/Imi-Server-Hprose/Server.php') // bug: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/6534
->notPath('src/Components/grpc/example/grpc')
Expand Down
1 change: 0 additions & 1 deletion dev/phpstan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ components=(
"swoole-tracker"
"workerman"
"workerman-gateway"
"macro"
)

analyze_component() {
Expand Down
1 change: 0 additions & 1 deletion dev/rector.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ components=(
"swoole-tracker"
"workerman"
"workerman-gateway"
"macro"
)

analyze_component() {
Expand Down
1 change: 0 additions & 1 deletion doc/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@
* [定时器](components/timer/index.md)
* [异步执行](components/async/index.md)
* [雪花算法发号器](components/snowflake.md)
* [宏定义](components/macro.md)
* [Phar打包器](components/phar/index.md)
* [imi 组件列表一览](components/list.md)
* [PostgreSQL](components/db/pgsql.md)
Expand Down
4 changes: 4 additions & 0 deletions doc/base/version/2.1-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@
* `Imi\AMQP\Annotation\Connection` 注解类的连接配置全部废弃,只保留 `poolName`

* 废弃 `Imi\AMQP\Swoole\AMQPSwooleConnection` 客户端类

### imi-macro

废弃并移出主仓库,代码仓库:<https://github.com/imiphp/imi-macro>
118 changes: 0 additions & 118 deletions doc/components/macro.md

This file was deleted.

4 changes: 2 additions & 2 deletions doc/components/phar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ vendor/bin/imi-phar build xxx

// 参与打包的文件
// 可选值:
// - '*'自动包含根目录下的 *.php、*.macro 文件。(默认)
// - '*'自动包含根目录下的 *.php 文件。(默认)
// - 空数组不包含任何文件。
// - 定义数组并填入文件名(仅限于当前目录下的文件)。
'files' => '*',
Expand Down Expand Up @@ -225,7 +225,7 @@ return [
### 内置过滤器(vendor)

```php
->notName(['/LICENSE|.*\\.md|.*\\.dist|Makefile/', '*.macro.php'])
->notName(['/LICENSE|.*\\.md|.*\\.dist|Makefile/'])
->exclude([
'doc',
'test',
Expand Down
50 changes: 0 additions & 50 deletions phpstan-baseline/baseline-jwt.neon
Original file line number Diff line number Diff line change
Expand Up @@ -60,56 +60,6 @@ parameters:
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php

-
message: "#^Call to an undefined method Lcobucci\\\\JWT\\\\Builder\\:\\:sign\\(\\)\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to an undefined method Lcobucci\\\\JWT\\\\Token\\:\\:validate\\(\\)\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to an undefined method Lcobucci\\\\JWT\\\\Token\\:\\:verify\\(\\)\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to method setAudience\\(\\) on an unknown class Lcobucci\\\\JWT\\\\ValidationData\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to method setId\\(\\) on an unknown class Lcobucci\\\\JWT\\\\ValidationData\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to method setIssuer\\(\\) on an unknown class Lcobucci\\\\JWT\\\\ValidationData\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to method setSubject\\(\\) on an unknown class Lcobucci\\\\JWT\\\\ValidationData\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Cannot instantiate interface Lcobucci\\\\JWT\\\\Builder\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Cannot instantiate interface Lcobucci\\\\JWT\\\\Parser\\.$#"
count: 2
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Instantiated class Lcobucci\\\\JWT\\\\ValidationData not found\\.$#"
count: 1
path: ../src/Components/jwt/src/Bean/JWT.php.macro.php

-
message: "#^Call to an undefined method Lcobucci\\\\JWT\\\\Token\\:\\:claims\\(\\)\\.$#"
count: 1
Expand Down
2 changes: 0 additions & 2 deletions phpstan-baseline/baseline-macro.neon

This file was deleted.

3 changes: 0 additions & 3 deletions split-repository/release.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ function getBranch(): string
'src/Components/roadrunner' => [
'[email protected]:imiphp/imi-roadrunner',
],
'src/Components/macro' => [
'[email protected]:imiphp/imi-macro',
],
'src/Components/phar' => [
'[email protected]:imiphp/imi-phar',
],
Expand Down
3 changes: 0 additions & 3 deletions split-repository/split.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ function saveConfig(): void
'src/Components/roadrunner' => [
'[email protected]:imiphp/imi-roadrunner',
],
'src/Components/macro' => [
'[email protected]:imiphp/imi-macro',
],
'src/Components/phar' => [
'[email protected]:imiphp/imi-phar',
],
Expand Down
4 changes: 0 additions & 4 deletions src/Bean/AnnotationParser.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

# macro

declare(strict_types=1);

namespace Imi\Bean;
Expand Down Expand Up @@ -123,7 +121,6 @@ public function execParse(string $className): void
public function parseClass(\ReflectionClass $ref): void
{
$annotations = $this->getReader()->getClassAnnotations($ref);
# if PHP_VERSION_ID >= 80000
if (
\PHP_VERSION_ID >= 80000
&& $phpAnnotations = $this->getPHPClassAnnotations($ref))
Expand All @@ -137,7 +134,6 @@ public function parseClass(\ReflectionClass $ref): void
$annotations = $phpAnnotations;
}
}
# endif
foreach ($annotations as $i => $annotation)
{
if (!$annotation instanceof \Imi\Bean\Annotation\Base)
Expand Down
3 changes: 1 addition & 2 deletions src/Components/jwt/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
"Imi\\JWT\\Test\\": "tests/"
},
"files": [
"../../../vendor/autoload.php",
"../macro/vendor/autoload.php"
"../../../vendor/autoload.php"
]
},
"scripts": {},
Expand Down
12 changes: 0 additions & 12 deletions src/Components/jwt/src/Bean/JWT.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

# macro

declare(strict_types=1);

namespace Imi\JWT\Bean;
Expand Down Expand Up @@ -344,16 +342,6 @@ public function validate(?string $name, Token $token): void

public function getJwtPackageVersion(): int
{
# if 0
return class_exists(\Lcobucci\JWT\Token\Parser::class) ? 4 : 3;

# endif
# if class_exists(\Lcobucci\JWT\Token\Parser::class)
// @phpstan-ignore-next-line
return 4;

# else
return 3;
# endif
}
}
10 changes: 0 additions & 10 deletions src/Components/macro/.gitattributes

This file was deleted.

4 changes: 0 additions & 4 deletions src/Components/macro/.gitignore

This file was deleted.

Loading

0 comments on commit e8d2a7a

Please sign in to comment.