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

valkyrjaio / valkyrja-php / 30679778977
100%

Build:
DEFAULT BRANCH: 26.x
Ran 01 Aug 2026 02:22AM 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 02:19AM UTC coverage: 100.0%. Remained the same
30679778977

push

github

web-flow
[Orm] fix: Correct the malformed DSN strings built by the service provider (#995)

# Description

`OrmServiceProvider` builds the DSN it hands to PDO from an interpolated
string. Two
characters in that string are wrong, so every DSN the provider builds is
malformed.

The first fault is a stray closing brace after the database name. All
three builders
carry it:

```php
$dsn = 'mysql'
    . ":dbname=$db}"   // the brace is not part of the database name
    . ";host=$host"
```

The brace makes the database name `valkyrja}` instead of `valkyrja`. It
looks like a
leftover from a `{$db}` to `$db` edit.

The second fault is in the pgsql builder alone. The `options` value
opens a quote and
never closes it:

```php
. ";options='--client_encoding=$charset";
```

PostgreSQL expects the value in the form
`options='--client_encoding=UTF8'`.

No test caught either fault. Every test that reaches these builders
replaces PDO with
a fixture, so the DSN passed to it was never read. This PR adds a test
per builder
that captures the DSN and compares it to the full expected string, so
any later change
to the format must be deliberate.

Both faults reach a real connection attempt only when an application
publishes one of
these managers, so no test suite in this repository connects with the
broken DSN.

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

- **`src/Valkyrja/Orm/Provider/OrmServiceProvider.php`** — removed the
stray `}` after
the database name in the mysql, pgsql, and sqlite DSNs, and closed the
quote around
  the pgsql `client_encoding` option.
- **`tests/Tests/Unit/Orm/Provider/ServiceProviderTest.php`** — ... (continued)

4 of 4 new or added lines in 1 file covered. (100.0%)

12596 of 12596 relevant lines covered (100.0%)

23.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30679778977.1 01 Aug 2026 02:22AM UTC 1138
100.0
GitHub Action Run
Source Files on build 30679778977
  • Tree
  • List 1138
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30679778977
  • fdc1484f on github
  • Prev Build on 26.x (#30679110360)
  • Next Build on 26.x (#30679781743)
  • 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