Skip to content

[Backport #1918 to 5.x] Fix getRelativePath in SourceFinder#1920

Closed
github-actions[bot] wants to merge 1 commit into5.xfrom
backport-1918-to-5.x
Closed

[Backport #1918 to 5.x] Fix getRelativePath in SourceFinder#1920
github-actions[bot] wants to merge 1 commit into5.xfrom
backport-1918-to-5.x

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Automated backport of #1918 to branch 5.x.

Do not modify this pull request.

getRelativePath method was implemented incorrectly causing exclude directories being not excluded.

Before change:

Runtime:       PHP 8.4.16
Configuration: /Users/darius/Sites/swagger-php/phpunit.xml.dist

Failed asserting that an array does not have the key '/Users/darius/Sites/swagger-php/docs/examples/specs/using-traits/annotations/Decoration/Whistles.php'.
/Users/darius/Sites/swagger-php/tests/SourceFinderTest.php:33

Time: 00:03.667, Memory: 10.00 MB

There was 1 failure:

1) OpenApi\Tests\SourceFinderTest::testExclude
Failed asserting that an array does not have the key '/Users/darius/Sites/swagger-php/docs/examples/specs/using-traits/annotations/Decoration/Whistles.php'.

/Users/darius/Sites/swagger-php/tests/SourceFinderTest.php:33

FAILURES!
Tests: 1, Assertions: 2, Failures: 1.
Process finished with exit code 1

@github-actions
Copy link
Copy Markdown
Contributor Author

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin backport-1918-to-5.x
git worktree add --checkout .worktree/backport-1918-to-5.x backport-1918-to-5.x
cd .worktree/backport-1918-to-5.x
git reset --hard HEAD^
git cherry-pick -x cf332956e6603fe4c8da6223a98b7ba65e20231e
git push --force-with-lease

@DerManoMann DerManoMann deleted the backport-1918-to-5.x branch January 15, 2026 19:54
@DerManoMann DerManoMann restored the backport-1918-to-5.x branch January 28, 2026 00:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants