beyondcode / beyondcode/herd-community

[Bug]: [macOS] php 8.5 & phpunit process isolation gives serialisation error

Open
#1,674 0 comments 0 reactions 0 assignees View on GitHub
macOS
Dominant language
No language data
Stars
122
Forks
1
PR merge metrics
No merged PRs in 30d

Description

### 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

```
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

```shell

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.