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

[5.8] Note that the GD extension is required for generating images #29770

Merged
merged 2 commits into from Aug 28, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -114,6 +114,7 @@
}
},
"suggest": {
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory\\image::().",
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
"aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (^3.0).",
Expand Down
3 changes: 3 additions & 0 deletions src/Illuminate/Http/composer.json
Expand Up @@ -26,6 +26,9 @@
"Illuminate\\Http\\": ""
}
},
"suggest": {
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory\\image::()."
},
"extra": {
"branch-alias": {
"dev-master": "5.8-dev"
Expand Down
8 changes: 8 additions & 0 deletions tests/Http/HttpTestingFileFactoryTest.php
Expand Up @@ -9,6 +9,10 @@ class HttpTestingFileFactoryTest extends TestCase
{
public function testImagePng()
{
if (! function_exists('imagejpeg')) {
GrahamCampbell marked this conversation as resolved.
Show resolved Hide resolved
$this->markTestSkipped('The extension gd is missing from your system.');
}

$image = (new FileFactory)->image('test.png', 15, 20);

$info = getimagesize($image->getRealPath());
Expand All @@ -20,6 +24,10 @@ public function testImagePng()

public function testImageJpeg()
{
if (! function_exists('imagejpeg')) {
$this->markTestSkipped('The extension gd is missing from your system.');
}

$image = (new FileFactory)->image('test.jpeg', 15, 20);

$info = getimagesize($image->getRealPath());
Expand Down