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

List deprecation - closes #731 #787

Merged
merged 6 commits into from
Sep 19, 2016
Merged

Conversation

alexwilson
Copy link
Collaborator

@alexwilson alexwilson commented Sep 6, 2016

  • Migrating away from list(), due to its unpredictable nature between different versions of PHP.
  • Increasing code coverage of FilterLoaders with regression tests.
  • Enabling test suite for PHP 7.1.

[30, 0],
[null, 16],
[37, null],
[null, null]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was never supported.

@alexwilson alexwilson changed the title List deprecation - closes #731 WIP - List deprecation - closes #731 Sep 7, 2016
@alexwilson alexwilson force-pushed the list-deprecation branch 2 times, most recently from bb55608 to 079a0a5 Compare September 8, 2016 01:10
@@ -54,51 +54,51 @@ protected function createFilterConfiguration()

protected function getMockCacheManager()
{
return $this->getMock('Liip\ImagineBundle\Imagine\Cache\CacheManager', array(), array(), '', false);
return $this->getMockBuilder('Liip\ImagineBundle\Imagine\Cache\CacheManager')->getMock();
Copy link
Collaborator

Choose a reason for hiding this comment

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

So happy someone is taking the time to update the test suite to remove PHPUnit 5.x deprecations. I have a similar branch that removes all getMock methods in favor of getMockBuilder. I'll wait until this is merged to submit my PR for this.

@alexwilson alexwilson force-pushed the list-deprecation branch 4 times, most recently from 9f55b5d to de354bd Compare September 9, 2016 01:05
@alexwilson
Copy link
Collaborator Author

I'll defer writing the appropriate documentation until after #789 is merged, there should not be much of it. As a follow-up to this I may submit further PRs focusing purely on test coverage.

@alexwilson alexwilson changed the title WIP - List deprecation - closes #731 List deprecation - closes #731 Sep 9, 2016
@alexwilson
Copy link
Collaborator Author

What do you think @lsmith77 / @robfrawley ?

@robfrawley
Copy link
Collaborator

@antoligy Looks great to me. New tests introduced increase total test coverage from 61.6% to 65.4% --- and increases total test coverage of Loaders from 22.71% to 47.26%.

👍

@alexwilson
Copy link
Collaborator Author

Yeah thanks that feels pretty good! I might have another pass at writing some tests to further increase Loader coverage as there's definitely a few easy wins in there, but that I can do irrespective of this PR.

The goal here was to remove list(), or to at least replace it in cases where we might likely run into a "breaking" change between 5 and 7.

@robfrawley
Copy link
Collaborator

Adding cross-reference to issue #731 (issues in titles don't create cross-reference links).

{
$this->dimentionKey = $dimentionKey;
Copy link
Collaborator

Choose a reason for hiding this comment

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

@antoligy Wow, can't believe we had filters creating dynamic class properties...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, it still does, I plan on restructuring this at a later date - The ScaleFilter is inherited by the DownscaleFilter and UpscaleFilter both of which use slightly different parameters.

@alexwilson
Copy link
Collaborator Author

Paging dr @lsmith77 😄

Copy link
Collaborator

@robfrawley robfrawley left a comment

Choose a reason for hiding this comment

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

Solid changes to fix changes in list behavior. Also increases Loader coverage from ~20% to ~50%.

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.

3 participants