Skip to content

Conversation

ashnazg
Copy link
Member

@ashnazg ashnazg commented Jan 6, 2018

adjustments to behavior based on library expectations, flysystem's relative filesystem behavior, and issues seen when debugging -d and -i in phpdocumentor

@ashnazg ashnazg requested review from mvriel, jaapio and mbed67 January 6, 2018 18:01
Copy link
Contributor

@mbed67 mbed67 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for the extensive documentation!

]
"dirname" => ".hiddendir",
"basename" => ".test.txt",
"filename" => ".text",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the filename be .test?

Copy link
Member

@jaapio jaapio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no comments on this. Looks good.
Only wondering how it will behave on windows. Since the forward backward slash difference.
I think flysystems covers you. But our users could expect something different.

I think it makes sense to have some integration test with a real directory mounted in flysystem to check the behavior.

@ashnazg
Copy link
Member Author

ashnazg commented Jan 6, 2018

It could be argued that I went overboard on the 03-sample-files for the integration test... but I really wanted it to fit what I've been debugging in phpdoc2.

* Initializes the fixture for this test.
* @covers ::__construct
* @covers ::isSatisfiedBy
* @covers ::<private>
Copy link
Member

@mvriel mvriel Jan 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend putting an @covers ::<private> in the class docblock since it makes little sense to add this to each test; nor to specify with each test which private method was covered

]));
}

protected function useWildcardPath()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless this function is used in a subclass I recommend making the visibility private. The project's recommendations are to use final classes and private methods unless there is a clear use-case to make it more visible. This will ensure a stable API and allow us to be flexible in which methods we change without breaking BC

@mvriel
Copy link
Member

mvriel commented Jan 6, 2018

Looks really good, I love the additions. Regarding the integration test; better to be thorough then to test too little; that looks awesome to me.

One future boyscout activity could be to add more typehints to the parameters and return of the signature. But this does not impact this PR AFAIC

@ashnazg
Copy link
Member Author

ashnazg commented Jan 6, 2018

I'll look at the typehinting next, after this merges.

Copy link
Member

@mvriel mvriel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

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.

4 participants