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

Fixing ClassMetadata to work on case sensitive filesystems #1242

Merged
merged 1 commit into from
Oct 12, 2015

Conversation

drymek
Copy link

@drymek drymek commented Oct 12, 2015

When BsonFilter class gets to mock, it shows case sensitive problem. If any class inherits from it, the problem does not exists - the inherited class can change typed argument (ClassMetaData to ClassMetadata). The only way I know how to test it, is to creating a mock.

@malarzm
Copy link
Member

malarzm commented Oct 12, 2015

👍

@drymek was that the only appearance of ClassMetaData?

@drymek
Copy link
Author

drymek commented Oct 12, 2015

Hm... didn't check that before. There are:

./lib/Doctrine/ODM/MongoDB/Query/FilterCollection.php:    use Doctrine\ODM\MongoDB\Mapping\ClassMetaData;
./tests/Doctrine/ODM/MongoDB/Tests/Query/Filter/Filter.php:    use Doctrine\ODM\MongoDB\Mapping\ClassMetaData;
./docs/en/reference/filters.rst:    use Doctrine\ODM\MongoDB\Mapping\ClassMetaData;

will do that.

@malarzm
Copy link
Member

malarzm commented Oct 12, 2015

@drymek thanks, ping me when you're done and I'll merge the changes :)

@drymek
Copy link
Author

drymek commented Oct 12, 2015

grep "ClassMetaData" -R ./ | wc -l
0

Could not write test for FilterCollection. BsonFilter-like test (creating a mock) pass without fixing the code. It seems like only caused errors for abstract classes (?). All files are fixed but FilterCollection not covered by any test.

//cc @malarzm

@malarzm
Copy link
Member

malarzm commented Oct 12, 2015

I wouldn't worry too much about no tests here :) I see you did separate commit, can you squash please?

@drymek
Copy link
Author

drymek commented Oct 12, 2015

done.

@malarzm malarzm added the Task label Oct 12, 2015
@malarzm malarzm added this to the 1.0.3 milestone Oct 12, 2015
malarzm added a commit that referenced this pull request Oct 12, 2015
Fixing ClassMetadata to work on case sensitive filesystems
@malarzm malarzm merged commit c81f7a4 into doctrine:master Oct 12, 2015
@malarzm
Copy link
Member

malarzm commented Oct 12, 2015

Thank you @drymek!

@drymek drymek deleted the metadata-case-sensitive branch October 12, 2015 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants