• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / valkyrja-php / 30677078804
100%

Build:
DEFAULT BRANCH: 26.x
Ran 01 Aug 2026 01:06AM UTC
Jobs 1
Files 1138
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Aug 2026 01:04AM UTC coverage: 100.0%. Remained the same
30677078804

push

github

web-flow
[Http] test: Write the PSR ServerRequest uploaded file to storage instead of the repo root (#990)

# Description

A full PHPUnit run left an untracked, zero-byte file named `test` in the
repository
root. Because the file has a plausible name and no content, a `git add
-A` in any
workflow committed it silently.


`Valkyrja\Tests\Unit\Http\Message\Request\Psr\ServerRequestTest::testUploadedFiles`
built its uploaded files from the bare relative path `'test'`. When the
test called
`ServerRequest::withUploadedFiles()`, the PSR bridge read each file:

1. `Psr\ServerRequest::withUploadedFiles()` calls
`PsrUploadedFileFactory::fromPsrArray()`.
2. The factory calls `Psr\UploadedFile::getStream()`, which calls
`UploadedFile::getStream()`.
3. That constructs `new Stream('test')`.

`Stream` opens its target with the default `Mode::WRITE_READ`, which
maps to the
`w+b` mode. That mode creates the file when it does not exist, so
`fopen()` made an
empty `test` file relative to the PHPUnit working directory — the
repository root.
Nothing wrote to the stream, so the file stayed at zero bytes.

The test now uses `Directory::storagePath()`, the same path the other
uploaded file
tests use. `Valkyrja\Tests\Abstract\TestCase::tearDown()` removes every
file in the
storage directory after each test, so the test cleans up after itself.
The storage
directory also ignores its own contents, so a leftover file cannot reach
a commit.

After this change, a full suite run leaves the working tree clean.

## Types of changes

- [ ] Improvement _(non-breaking change which improves code)_
- [x] Bug fix _(non-breaking change which fixes an issue)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [ ] Deprecation _(breaking change which removes functionality)_
- [ ] Breaking change _(fix or feature that would cause existing
functionality to change)_
- [ ] Documentation improvement

## Changes

- **`tests/Tests/Unit/Http/Message/Request/Psr/ServerRequestTest.php`**
— `tes... (continued)

12596 of 12596 relevant lines covered (100.0%)

23.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30677078804.1 01 Aug 2026 01:06AM UTC 1138
100.0
GitHub Action Run
Source Files on build 30677078804
  • Tree
  • List 1138
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30677078804
  • 2146d27b on github
  • Prev Build on 26.x (#30646146918)
  • Next Build on 26.x (#30679110360)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc