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

[Filters] [Config] [DI] Add Filter configuration class as public service #1098

Merged
merged 31 commits into from Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6b41c3b
added FilterSetCollection public service
maximgubar May 23, 2018
11c0c12
fixed static tests
maximgubar May 23, 2018
6a8cff3
removed setters from Filters and FilterSets
maximgubar May 24, 2018
add533f
fixed static tests
maximgubar May 24, 2018
95db82b
added filter-specific objects
maximgubar May 29, 2018
d907670
fixed static tests
maximgubar May 29, 2018
e213124
applied requested review changes
maximgubar Jun 4, 2018
851a38b
fixed static tests
maximgubar Jun 4, 2018
27c8794
removed FilterConfiguration object dependency
maximgubar Jun 4, 2018
5c4d68f
renamed FilterSet to Stack
maximgubar Jun 4, 2018
e306612
added filters config objects
maximgubar Jun 4, 2018
db0a518
added filters config objects
maximgubar Jun 6, 2018
d6c599f
fixed static tests
maximgubar Jun 6, 2018
6906000
added optional return types, removed unnecessary phpdocs
maximgubar Jun 6, 2018
4ea4acc
added Point and Size objects
maximgubar Jun 6, 2018
ebc5744
replaced trivial ternary operations with null coalesce operator
maximgubar Jun 6, 2018
02e4022
applied PR fixes
maximgubar Jun 6, 2018
c4923d0
added @internal to all config-related factories
maximgubar Jun 11, 2018
c564a62
introduced StckFactoryInterface
maximgubar Jun 11, 2018
9971029
moved filter NAME const from factory to instance
maximgubar Jun 11, 2018
36d7843
fixed static tests
maximgubar Jun 11, 2018
91bfe94
applied PR fixes
maximgubar Jun 11, 2018
9df4d4b
added @codeCoverageIgnore
maximgubar Jun 11, 2018
be890e3
applied PR fixes
maximgubar Jun 11, 2018
8458b37
renamed filterSet to stack
maximgubar Jun 12, 2018
6613b61
removed self-referencing constant
maximgubar Jun 12, 2018
cdab3b8
fixed static tests
maximgubar Jun 13, 2018
f8cdfb7
fixed small issues:
maximgubar Jun 13, 2018
2a397ae
fixed Watermark factory arguments order and type sanitize
maximgubar Jun 18, 2018
f1ed641
Merge branch '2.0' into config-reader
maximgubar Jun 25, 2018
0624a2a
removed backslashes from native constants
maximgubar Jun 25, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Config/Filter/Type/Background.php
Expand Up @@ -43,9 +43,9 @@ final class Background implements FilterInterface

/**
* @param string $name
* @param string|null $color
* @param string|null $transparency
* @param string|null $position
* @param string|null $color background color HEX value
* @param string|null $transparency possible values 0..100
* @param string|null $position position of the input image on the newly created background image. Valid values: topleft, top, topright, left, center, right, bottomleft, bottom, and bottomright
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can use value objects/enum here also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Koc for all parameters or for specific one ?

Copy link
Member

Choose a reason for hiding this comment

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

i would not use value objects here. if the imagine library would use them, we should use them here too, but as they don't i feel like its a bit too much.

* @param Size $size
*/
public function __construct(
Expand Down
9 changes: 5 additions & 4 deletions Factory/Config/StackFactory.php
Expand Up @@ -11,15 +11,16 @@

namespace Liip\ImagineBundle\Factory\Config;

use Liip\ImagineBundle\Config\FilterInterface;
use Liip\ImagineBundle\Config\Stack;

class StackFactory
{
/**
* @param string $name
* @param string|null $dataLoader
* @param int|null $quality
* @param array $filters
* @param string $name
* @param string|null $dataLoader
* @param int|null $quality
* @param FilterInterface[] $filters
*
* @return Stack
*/
Expand Down