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 issue with removed class Color #458

Merged
merged 1 commit into from
Jul 30, 2014
Merged

Fixing issue with removed class Color #458

merged 1 commit into from
Jul 30, 2014

Conversation

lstrojny
Copy link
Contributor

Fixes #449. Additionally moved doctrine/mongodb-odm to the suggest part as it depends on ext/mongo which not everyone has installed.

@makasim
Copy link
Collaborator

makasim commented Jul 15, 2014

I am fine with fixes for #449 but I am not sure whether it good to remove mongo from dev deps. I prefer to keep it

@makasim
Copy link
Collaborator

makasim commented Jul 15, 2014

@havvg ping

@lstrojny
Copy link
Contributor Author

Issue is, I cannot run the tests without, let alone run composer install. Not sure if it is a good idea to rely on a halfway exotic extension like mongodb.

@makasim
Copy link
Collaborator

makasim commented Jul 15, 2014

if you skip it you cannot say for sure you did not broke anything since some part of the logic is not covered by tests. Also other developers would like to disable something else, how could we tell what we should skip and what not, My position: we have to run all tests

@lstrojny
Copy link
Contributor Author

Alternative is to skip everything that is exotic, to lower the barrier of entry for new contributors and have a CI environment that unwinds the full truth by running all the tests.

@makasim
Copy link
Collaborator

makasim commented Jul 15, 2014

so ci has to be adjusted to run all tests, it means mongo has to be added to requirements somehow

@@ -19,7 +18,7 @@ public function __construct(ImagineInterface $imagine)
*/
public function load(ImageInterface $image, array $options = array())
{
$background = new Color(isset($options['color']) ? $options['color'] : '#fff');
$background = $image->palette()->color(isset($options['color']) ? $options['color'] : '#fff');
Copy link

Choose a reason for hiding this comment

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

Could you pass isset($options['transparency']) ? $options['transparency'] : null as a second parameter here?
This would solve #453.

see: https://github.com/avalanche123/Imagine/blob/develop/lib/Imagine/Image/Palette/PaletteInterface.php#L34

@lstrojny
Copy link
Contributor Author

Bump

@makasim
Copy link
Collaborator

makasim commented Jul 30, 2014

If you revert changes related to mongo (moving mongo from require-dev to suggest) I am fine to merge it.

@makasim
Copy link
Collaborator

makasim commented Jul 30, 2014

@lstrojny it would be good if you can address this too https://github.com/liip/LiipImagineBundle/pull/458/files#r14990108. not required though.

@lstrojny
Copy link
Contributor Author

Addressed both issues

makasim added a commit that referenced this pull request Jul 30, 2014
@makasim makasim merged commit a1b8047 into liip:master Jul 30, 2014
@makasim
Copy link
Collaborator

makasim commented Jul 30, 2014

thanks

@lstrojny lstrojny deleted the bugfix/imagine-color-class branch July 30, 2014 07:32
@benib
Copy link

benib commented Jul 30, 2014

i think this needs an update to the dependencies, as this won't work with Imagine 0.5 anymore I guess.

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.

Cannot load "Color" class from namespace Imagine\Image\Color
3 participants