Loading
Issue #3589392: Preserve discovered oEmbed resource URLs
Closes #3589392
Problem
When oEmbed discovery successfully identifies a resource URL, the resolver discards the discovered URL and reconstructs it using the provider's registered endpoints. This may result in an incorrect resource URL.
Proposed solution
- Preserve discovered oEmbed resource URLs for known providers.
- Reuse the discovered URL instead of reconstructing the endpoint URL.
- Preserve existing public interfaces and trusted host validation.
- Add regression test coverage for the reported behavior.
Testing
- Reproduced the failure before implementing the proposed fix.
- Verified that the regression test passes after the changes.
- Media unit tests: 30 tests, 50 assertions, all passed.
- Coding standards: 0 errors, 2 pre-existing warnings.
- PHP 8.5.13.
- PHPUnit 12.5.44.
Remaining considerations
This draft addresses the loss of discovered resource URLs for known providers. Provider-independent discovery and cache consistency require further review.
Feedback on the proposed approach is welcome.