Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Finder] fix tests#26785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:2.7fromxabbuh:pr-26763
Apr 4, 2018
Merged

[Finder] fix tests#26785

nicolas-grekas merged 1 commit intosymfony:2.7fromxabbuh:pr-26763
Apr 4, 2018

Conversation

@xabbuh
Copy link
Member

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets
LicenseMIT
Doc PR

DanielRuf and helhum reacted with thumbs up emoji
@xabbuh
Copy link
MemberAuthor

This is a quick fix to make the test suite green again. However, as you can see the path normalization handling has always been dependent on the adapter that you used. I wonder if we shouldn't rather remove these new tests to not make any misleading promises about how the resulting path will be represented.

@helhum
Copy link
Contributor

Hm, very good point (and sorry that I missed the test failures).

Haven't looked into how these adapters are calling find, but from a naive approach on command line,find behaves exactly like the tests expect.

$ find ./../symfony -type d

Output:

..../../symfony/src..../../symfony/vendor...

Whether to remove the tests or not, depends on whether we agree Finder should fulfill their expectations.

The introduced expectations do make sense, as I pointed outhere.

But of course would be as well quite breaking for a bugfix version.

Last but not least, I haven't checked yet if the implementation would be reasonably doable at all.

I could help out in any direction, but obviously needs a decision from Symfony how to proceed.

@xabbuh
Copy link
MemberAuthor

@stof
Copy link
Member

stof commentedApr 4, 2018

Well, these adapters are deprecated though.

But rather than usingrealpath, these adapters could normalize paths by resolving../ parts in the path (removing the previous part of the path).

@helhum
Copy link
Contributor

see /src/Symfony/Component/Finder/Adapter/AbstractFindAdapter.php@2.7#L42 whererealpath() is called

Hm, ok. Don't know why this was added. Can't confirm thatfind won't work for paths with../ in it.

Well, these adapters are deprecated though

Ah OK, then I would just go with skipping these tests, as the adapters are gone in master anyway.

@nicolas-grekas
Copy link
Member

Thank you@xabbuh.

@nicolas-grekasnicolas-grekas merged commit540ea11 intosymfony:2.7Apr 4, 2018
nicolas-grekas added a commit that referenced this pull requestApr 4, 2018
This PR was merged into the 2.7 branch.Discussion----------[Finder] fix tests| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets || License       | MIT| Doc PR        |Commits-------540ea11 [Finder] fix tests
@xabbuhxabbuh deleted the pr-26763 branchApril 4, 2018 13:22
@helhum
Copy link
Contributor

Thanks@nicolas-grekas@xabbuh and everybody else involved.

xabbuh and lyrixx reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@lyrixxlyrixxlyrixx approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

6 participants

@xabbuh@helhum@stof@nicolas-grekas@lyrixx@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp