Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data Loader] Pass root paths to file system locator constructor (instead of loader) #963

Merged
merged 4 commits into from Aug 31, 2017

Conversation

robfrawley
Copy link
Collaborator

Q A
Branch? 1.0
Bug fix? no
New feature? no
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #930
License MIT
Doc PR

Continuation of #937 to pass roots directly to LocatorInterface instead of to FileSystemLoader, in preparation for breaking changes in 2.0.

rpkamp and others added 2 commits July 21, 2017 02:50
- Allow construction of Locator without data roots for BC
- Mark FilesystemLocator::setOptions deprecated
@robfrawley robfrawley added the Attn: Deprecation This issue or PR results in deprecated functionality. label Jul 21, 2017
@robfrawley robfrawley added this to the 1.9.0 milestone Jul 21, 2017
@robfrawley
Copy link
Collaborator Author

I think this is ready to go. @cedricziel @antoligy Comments?

Copy link
Collaborator

@alexwilson alexwilson 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 to me, to be quite honest.

@@ -38,30 +38,48 @@ class FileSystemLoader implements LoaderInterface
/**
* @param MimeTypeGuesserInterface $mimeGuesser
* @param ExtensionGuesserInterface $extensionGuesser
* @param string[] $dataRoots
* @param LocatorInterface $locator
* @param string[]|LocatorInterface $locator
*/
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would also place an @deprecated doc here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm; while I understand your intention, @deprecated is a doc-block scope declaration that would cause IDEs and other tools to believe the entire __construct() method had been deprecated, which is obviously not the case. Perhaps a comment explaining the depreciation would be more appropriate? We don't want people seeing "FileSystemLoader.php::__construct()" in their IDEs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ahh, very good point and I didn't think of that. A better idea is adding a comment, or maybe an @see referencing this PR or the docs added in this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think 23e79a7 should do the trick. :-)

@robfrawley robfrawley merged commit 8c22844 into liip:1.0 Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Attn: Deprecation This issue or PR results in deprecated functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants