-
Notifications
You must be signed in to change notification settings - Fork 201
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
Encode using media type instead of extension #410
Closed
Closed
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
e45a4b5
Add support for Symfony 3.x components.
reinink 0b5a047
Encode by media type instead of the extension
deluxetom 03de285
fixed tests
deluxetom 4d00add
fixed tests
deluxetom 49212dc
check format is available
deluxetom a75bf9b
style fix
deluxetom 6754ae5
fixed mock
deluxetom 856843f
fixed tests
deluxetom 6a465c6
removed debug
deluxetom 6d68977
use encoder from MediaType
deluxetom 81106cf
fixed style
deluxetom 2f927a3
check valid encoder parameters
deluxetom 94a85c9
remove method not available with 8.1
deluxetom 61cbfa6
phpstan fixes
deluxetom 287a248
add exception back
deluxetom 2e21930
psalm fix
deluxetom 7f3ca11
style fix
deluxetom 48b7765
added tests and keep same type for supportedFormats
deluxetom e138f4e
add tests for pjpg
deluxetom 51b664b
Merge branch '3.x' of github.com:thephpleague/glide into 3.x
deluxetom 1a8d3bd
psalm suppress
deluxetom 8a80964
Merge branch '0.3.x' of github.com:thephpleague/glide into 3.x
deluxetom 3ea96b8
php doc fix
deluxetom 3da98c2
Merge branch '3.x' into 3.x
deluxetom aa8e8b2
rerun tests
deluxetom e7cfec0
updated ubuntu version
deluxetom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
{ | ||
"name": "Jonathan Reinink", | ||
"email": "[email protected]", | ||
"homepage": "http://reinink.ca" | ||
"homepage": "https://reinink.ca/" | ||
}, | ||
{ | ||
"name": "Titouan Galopin", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -26,8 +26,8 @@ class Api implements ApiInterface | |||||||
/** | ||||||||
* Create API instance. | ||||||||
* | ||||||||
* @param ImageManager $imageManager Intervention image manager. | ||||||||
* @param array $manipulators Collection of manipulators. | ||||||||
* @param ImageManager $imageManager Intervention image manager. | ||||||||
* @param list<ManipulatorInterface|null> $manipulators Collection of manipulators. | ||||||||
*/ | ||||||||
public function __construct(ImageManager $imageManager, array $manipulators) | ||||||||
{ | ||||||||
|
@@ -58,17 +58,11 @@ public function getImageManager(): ImageManager | |||||||
/** | ||||||||
* Set the manipulators. | ||||||||
* | ||||||||
* @param ManipulatorInterface[] $manipulators Collection of manipulators. | ||||||||
* @param array $manipulators Collection of manipulators. | ||||||||
*/ | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ADmad good catch, I added the missing phpdoc |
||||||||
public function setManipulators(array $manipulators): void | ||||||||
{ | ||||||||
foreach ($manipulators as $manipulator) { | ||||||||
if (!($manipulator instanceof ManipulatorInterface)) { | ||||||||
throw new \InvalidArgumentException('Not a valid manipulator.'); | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
$this->manipulators = $manipulators; | ||||||||
$this->manipulators = array_filter($manipulators, fn ($manipulator) => $manipulator instanceof ManipulatorInterface || throw new \InvalidArgumentException('Not a valid manipulator.')); | ||||||||
} | ||||||||
|
||||||||
/** | ||||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think
|null
is necessaryThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, its been fixed