[Bug]: [macOS] php 8.5 & phpunit process isolation gives serialisation error
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- macos, php
调研方向
在 macOS Tahoe 上使用 Herd 1.28.0、PHP 8.5.4 和 PHPUnit 12.5.16,从提供的 Tests\Unit\ExampleTest 复现开始;比较使用 PreserveGlobalState(true) 和不使用它时的行为。完成标准是:进程隔离的测试能够保留相关的全局状态,且不会出现 __herd_closure 序列化警告。
由索引模型根据 Issue 内容生成。
描述
Platform
macOS
Operating system version
macOs Tahoe 26.3.1
System architecture
ARM64 (M1, M2, etc)
Herd Version
1.28.0
PHP Version
PHP 8.5.4
Bug description
With phpunit 12.5.16 and Herd 1.28.0
Tests that have:
#[RunTestsInSeparateProcesses]
#[PreserveGlobalState(true)]
Give this warning: Global variable $GLOBALS['__herd_closure'] was not preserved because it is a Closure.
When i remove #[PreserveGlobalState(true)] it will work without problems.
Steps to reproduce
<?php
namespace Tests\Unit;
use PHPUnit\Framework\Attributes\PreserveGlobalState;
use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses;
use PHPUnit\Framework\TestCase;
#[RunTestsInSeparateProcesses]
#[PreserveGlobalState(true)]
class ExampleTest extends TestCase
{
public function test_that_true_is_true(): void
{
$this->assertTrue(true);
}
}
Gives:
WARN Tests\Unit\ExampleTest
! that true is true → Global variable $GLOBALS['__herd_closure'] was not preserved because it is a Closure
Relevant log output
- 主要语言
- 没有语言数据
- 星标
- 124
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
beyondcode/herd-community 的其他 Issue
-
[Bug]: PHP 8.3 php.ini missing auto_prepend_file and herd-ext extension lines (dump() undefined)未关闭macOS
难度 2/5 1-3 小时 新手友好度 68/100
beyondcode/herd-community#1693 ·
-
macOS
难度 2/5 1-3 小时 新手友好度 72/100
beyondcode/herd-community#1602 ·
-
[Bug]: 1.30.2 creates PHP 8.2 config and ~/.zshrc lines on every start, although 8.2 isn't installed未关闭fixed-in-next-release macOS
难度 3/5 1-2 天 新手友好度 56/100
beyondcode/herd-community#1763 · 2 条评论 ·
-
fixed-in-next-release macOS
难度 3/5 1-2 天 新手友好度 58/100
beyondcode/herd-community#1760 ·
-
macOS
难度 4/5 3-5 天 新手友好度 35/100
beyondcode/herd-community#1755 ·
查看 beyondcode/herd-community 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
bytecodealliance/rustix#1706 · 1 条评论 ·
维护者通常 11 天内回复
-
spawn drops an own `__proto__` environment entry可能已有人在做 @nikolay-dementiev 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
comp/gateway comp/tools P2 platform/windows sweeper:risk-message-delivery sweeper:risk-platform-windows type/bug
难度 2/5 1-3 小时 新手友好度 78/100
NousResearch/hermes-agent#138872 ·
维护者通常 1 天内回复
-
os: RawConn methods of a closed File return internal/poll.ErrFileClosing instead of ErrClosed可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
agent:WSL bug linux LOW
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复