Skip to content

Commit 6995ca3

Browse files
chore(release): 3.3.0
1 parent 6f7b6af commit 6995ca3

File tree

4 files changed

+49
-41
lines changed

4 files changed

+49
-41
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
<a name="3.3.0"></a>
6+
7+
## [3.3.0](https://github.com/imgix/imgix-php/compare/3.2.0...3.3.0) (2020-06-05)
8+
* fix: normalize behavior of target widths ([#56](https://github.com/imgix/imgix-php/pull/56))
9+
* fix: remove ensure even requirement ([#57](https://github.com/imgix/imgix-php/pull/57))
10+
* feat: create custom srcsets ([#58](https://github.com/imgix/imgix-php/pull/58))
11+
* feat: validate custom srcsets ([#61](https://github.com/imgix/imgix-php/pull/61))
12+
513
<a name="3.2.0"></a>
614

715
## [3.2.0](https://github.com/imgix/imgix-php/compare/3.1.0...3.2.0) (2020-03-31)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "imgix/imgix-php",
33
"description": "A PHP client library for generating URLs with imgix.",
44
"type": "library",
5-
"version": "3.2.0",
5+
"version": "3.3.0",
66
"license": "BSD-2-Clause",
77
"keywords": [
88
"imgix"

src/Imgix/UrlBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class UrlBuilder {
88

9-
private $currentVersion = "3.2.0";
9+
private $currentVersion = "3.3.0";
1010
private $domain;
1111
private $useHttps;
1212
private $signKey;

tests/Imgix/Tests/UrlBuilderTest.php

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public function testCustomSrcsetPairs() {
212212
$builder = new UrlBuilder("demos.imgix.net", true, false);
213213
$opts = array('start' => 328, 'stop' => 328);
214214
$actual = $builder->createSrcSet($path="image.jpg", $params=array(), $options=$opts);
215-
$expected = 'https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=328 328w';
215+
$expected = 'https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=328 328w';
216216
$this->assertEquals($expected, $actual);
217217

218218
$builder = new UrlBuilder("demos.imgix.net", true, false);
@@ -221,15 +221,15 @@ public function testCustomSrcsetPairs() {
221221
$params=array(),
222222
$options=array('start' => 720, 'stop' => 720));
223223

224-
$expected = 'https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=720 720w';
224+
$expected = 'https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=720 720w';
225225
$this->assertEquals($expected, $actual);
226226

227227
$builder = new UrlBuilder("demos.imgix.net", true, false);
228228
$opts = array('start' => 640, 'stop' => 720);
229229
$actual = $builder->createSrcSet($path="image.jpg", $params=array(), $options=$opts);
230230
$expected = // Raw string literal
231-
'https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=640 640w,
232-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=720 720w';
231+
'https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=640 640w,
232+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=720 720w';
233233

234234
$this->assertEquals($expected, $actual);
235235

@@ -238,11 +238,11 @@ public function testCustomSrcsetPairs() {
238238
$opts = array('start' => 100, 'stop' => 108, 'tol' => 0.01);
239239
$actual = $builder->createSrcSet($path="image.jpg", $params=array(), $options=$opts);
240240
$expected = // Raw string literal
241-
'https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=100 100w,
242-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=102 102w,
243-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=104 104w,
244-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=106 106w,
245-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=108 108w';
241+
'https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=100 100w,
242+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=102 102w,
243+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=104 104w,
244+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=106 106w,
245+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=108 108w';
246246

247247
$this->assertEquals($expected, $actual);
248248
}
@@ -287,11 +287,11 @@ public function testDprSrcsetWithQ100() {
287287
$actual = $builder->createSrcSet(
288288
$path="image.jpg", $params=array("w" => 640, "q" => 100));
289289
$expected =
290-
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.2.0&q=100&w=640 1x,
291-
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.2.0&q=100&w=640 2x,
292-
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.2.0&q=100&w=640 3x,
293-
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.2.0&q=100&w=640 4x,
294-
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.2.0&q=100&w=640 5x';
290+
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.3.0&q=100&w=640 1x,
291+
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.3.0&q=100&w=640 2x,
292+
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.3.0&q=100&w=640 3x,
293+
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.3.0&q=100&w=640 4x,
294+
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.3.0&q=100&w=640 5x';
295295
$this->assertEquals($expected, $actual);
296296
}
297297

@@ -301,11 +301,11 @@ public function testDprSrcsetWithDefaultQuality() {
301301
$actual = $builder->createSrcSet($path="image.jpg", $params=array("w" => 740));
302302

303303
$expected =
304-
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.2.0&q=75&w=740 1x,
305-
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.2.0&q=50&w=740 2x,
306-
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.2.0&q=35&w=740 3x,
307-
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.2.0&q=23&w=740 4x,
308-
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.2.0&q=20&w=740 5x';
304+
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.3.0&q=75&w=740 1x,
305+
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.3.0&q=50&w=740 2x,
306+
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.3.0&q=35&w=740 3x,
307+
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.3.0&q=23&w=740 4x,
308+
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.3.0&q=20&w=740 5x';
309309
$this->assertEquals($expected, $actual);
310310
}
311311

@@ -317,11 +317,11 @@ public function testDprVariableQualityDisabled() {
317317
$actual = $builder->createSrcSet($path="image.jpg", $params=$params, $opts=$opts);
318318

319319
$expected =
320-
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.2.0&w=640 1x,
321-
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.2.0&w=640 2x,
322-
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.2.0&w=640 3x,
323-
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.2.0&w=640 4x,
324-
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.2.0&w=640 5x';
320+
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.3.0&w=640 1x,
321+
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.3.0&w=640 2x,
322+
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.3.0&w=640 3x,
323+
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.3.0&w=640 4x,
324+
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.3.0&w=640 5x';
325325
$this->assertEquals($expected, $actual);
326326
}
327327

@@ -334,11 +334,11 @@ public function testDprSrcsetQOverridesEnabledVariableQuality() {
334334
$actual = $builder->createSrcSet($path="image.jpg", $params, $opts);
335335

336336
$expected =
337-
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.2.0&q=75&w=540 1x,
338-
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.2.0&q=75&w=540 2x,
339-
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.2.0&q=75&w=540 3x,
340-
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.2.0&q=75&w=540 4x,
341-
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.2.0&q=75&w=540 5x';
337+
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.3.0&q=75&w=540 1x,
338+
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.3.0&q=75&w=540 2x,
339+
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.3.0&q=75&w=540 3x,
340+
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.3.0&q=75&w=540 4x,
341+
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.3.0&q=75&w=540 5x';
342342
$this->assertEquals($expected, $actual);
343343
}
344344

@@ -352,11 +352,11 @@ public function testDprSrcsetQOverridesDisabledVariableQuality() {
352352
$options=$opts);
353353

354354
$expected =
355-
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.2.0&q=99&w=440 1x,
356-
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.2.0&q=99&w=440 2x,
357-
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.2.0&q=99&w=440 3x,
358-
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.2.0&q=99&w=440 4x,
359-
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.2.0&q=99&w=440 5x';
355+
'https://demos.imgix.net/image.jpg?dpr=1&ixlib=php-3.3.0&q=99&w=440 1x,
356+
https://demos.imgix.net/image.jpg?dpr=2&ixlib=php-3.3.0&q=99&w=440 2x,
357+
https://demos.imgix.net/image.jpg?dpr=3&ixlib=php-3.3.0&q=99&w=440 3x,
358+
https://demos.imgix.net/image.jpg?dpr=4&ixlib=php-3.3.0&q=99&w=440 4x,
359+
https://demos.imgix.net/image.jpg?dpr=5&ixlib=php-3.3.0&q=99&w=440 5x';
360360
$this->assertEquals($expected, $actual);
361361
}
362362

@@ -365,11 +365,11 @@ public function testCreateSrcSetFromWidthsArray() {
365365
$opts = array('widths' => array(100, 200, 303, 404, 535));
366366
$actual = $builder->createSrcSet($path="image.jpg", $params=array(), $options=$opts);
367367
$expected =
368-
'https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=100 100w,
369-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=200 200w,
370-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=303 303w,
371-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=404 404w,
372-
https://demos.imgix.net/image.jpg?ixlib=php-3.2.0&w=535 535w';
368+
'https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=100 100w,
369+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=200 200w,
370+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=303 303w,
371+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=404 404w,
372+
https://demos.imgix.net/image.jpg?ixlib=php-3.3.0&w=535 535w';
373373

374374
$this->assertEquals($expected, $actual);
375375
}

0 commit comments

Comments
 (0)