Repository navigation
chore(deps): allow installation of ergebnis/agent-detector:^3.0 - #404
localheinz wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Changelog✅ Contribution check passed. Head: Base: Contribution: 1 new valid fragment(s). Policy: ordinary.
|
Rigorous review requestedThis pull request is ready for the dedicated
Review focus
Sample changed files
Suggested prompt |
There was a problem hiding this comment.
🔵 Needs a closer look
Pending compatible php-cs-fixer and phpunit-agent-reporter releases leave dependency resolution and DI/runtime integration unverified, requiring maintainer validation before merge.
No open issues 🎉
What changed in this PR
Migrates DevTools to ergebnis/agent-detector 3.x, adapting dependency injection and runtime detection to its new interface-based API.
Changes:
- Requires version
^3.0and bindsDetectortoEnvironmentDetector. - Delegates agent detection through the argument-free method.
- Updates tests to cover both detection outcomes and adds a changelog fragment.
Verification remains pending. The PR description notes that dependency resolution is blocked until compatible PHP-CS-Fixer and PHPUnit agent reporter releases are available.
| File | Description |
|---|---|
tests/Environment/RuntimeEnvironmentTest.php |
Uses a detector test double and checks both boolean outcomes. |
src/Environment/RuntimeEnvironment.php |
Calls agent detection without passing environment variables. |
src/Container/ServiceProvider/DevToolsServiceProvider.php |
Binds the detector interface to its environment implementation. |
composer.json |
Raises the agent-detector requirement to ^3.0. |
.changelog/require-ergebnis-agent-detector-3.md |
Records the dependency and integration changes. |
Review effort: Balanced
04faf62 to
146c107
Compare
ergebnis/agent-detector:^3.0ergebnis/agent-detector:^3.0
146c107 to
a8537fc
Compare
Related Issue
Follows ergebnis/agent-detector#171.
Motivation / Context
ergebnis/agent-detector:3.0.0turnsDetectorinto an interface and extractsEnvironmentDetector, which reads the agent environment variables itself.isAgentPresent()no longer accepts arguments.Changes
ergebnis/agent-detector:^3.0next to^2.0.Detectorwith a factory inDevToolsServiceProviderthat usesEnvironmentDetectorwhen it is available.Detector::isAgentPresent()without arguments inRuntimeEnvironment, which works with both major versions.RuntimeEnvironmentTestwithputenv(), sinceDetectoris final in2.xand cannot be doubled.Verification
composer dev-toolsDocumentation / Generated Output
docs/updatedChangelog
.changelog/*.mdfragmentReviewer Notes
ergebnis/agent-detector:^3.0becomes installable here onceergebnis/phpunit-agent-reporterreleases Enhancement: Add support forergebnis/agent-detector:^3.0.0ergebnis/phpunit-agent-reporter#194.