Skip to content

Commit 42831e2

Browse files
Drop support for PHP 5.x and 7.x
1 parent f5fa243 commit 42831e2

File tree

29 files changed

+57
-1776
lines changed

29 files changed

+57
-1776
lines changed

.code-generation/config.js

Lines changed: 0 additions & 71 deletions
This file was deleted.

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ jobs:
88
fail-fast: false
99
matrix:
1010
php-versions:
11-
- '5.6'
12-
- '7.4'
1311
- '8.0'
1412
- '8.1'
1513
- '8.2'
14+
- '8.3'
15+
- '8.4'
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v2

RoboFile.php

Lines changed: 0 additions & 82 deletions
This file was deleted.

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,17 @@
2424
"issues": "https://github.com/cloudinary/php-transformation-builder-sdk/issues"
2525
},
2626
"require": {
27-
"php": ">=5.6.0",
27+
"php": ">=8.0.0",
2828
"ext-json": "*"
2929
},
3030
"require-dev": {
31-
"symfony/phpunit-bridge": "^5.2",
31+
"symfony/phpunit-bridge": "^7.2",
3232
"phpmd/phpmd": "*",
33-
"squizlabs/php_codesniffer": "3.*",
33+
"squizlabs/php_codesniffer": "*",
3434
"friendsofphp/php-cs-fixer": "*",
3535
"ext-dom": "*",
3636
"ext-libxml": "*",
37-
"ext-zip": "*",
38-
"consolidation/robo": "~1"
37+
"ext-zip": "*"
3938
},
4039
"autoload": {
4140
"classmap": [

phpunit.xml

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,17 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
5-
backupGlobals="false"
6-
backupStaticAttributes="false"
7-
colors="true"
8-
convertErrorsToExceptions="true"
9-
convertNoticesToExceptions="true"
10-
convertWarningsToExceptions="true"
11-
processIsolation="false"
12-
stopOnFailure="false"
13-
bootstrap="vendor/autoload.php"
14-
>
15-
<php>
16-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
17-
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
18-
</php>
19-
<testsuites>
20-
<testsuite name="Unit">
21-
<directory>tests/Unit</directory>
22-
</testsuite>
23-
</testsuites>
24-
25-
<filter>
26-
<whitelist processUncoveredFilesFromWhitelist="true">
27-
<directory suffix=".php">./src</directory>
28-
</whitelist>
29-
</filter>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" bootstrap="vendor/autoload.php">
3+
<coverage processUncoveredFiles="true">
4+
<include>
5+
<directory suffix=".php">./src</directory>
6+
</include>
7+
</coverage>
8+
<php>
9+
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
10+
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
11+
</php>
12+
<testsuites>
13+
<testsuite name="Unit">
14+
<directory>tests/Unit</directory>
15+
</testsuite>
16+
</testsuites>
3017
</phpunit>

src/Transformation/BaseAction.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ abstract class BaseAction extends BaseComponent
2929
protected $qualifiers = [];
3030

3131
/**
32-
* @var string MAIN_QUALIFIER Represents the main qualifier of the action. (some actions do not have main qualifier)
32+
* @var ?string MAIN_QUALIFIER Represents the main qualifier of the action. (some actions do not have main qualifier)
3333
*/
3434
const MAIN_QUALIFIER = null;
3535

@@ -62,7 +62,7 @@ public function __construct(...$qualifiers)
6262
*
6363
* @return $this
6464
*/
65-
public function addQualifier(BaseComponent $qualifier = null)
65+
public function addQualifier(?BaseComponent $qualifier = null)
6666
{
6767
ArrayUtils::addNonEmpty($this->qualifiers, $qualifier ? $qualifier->getFullName() : null, $qualifier);
6868

src/Transformation/Effect/Addon/Lightroom/XmpSourceValue.php

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

1111
namespace Cloudinary\Transformation;
1212

13-
use Cloudinary\Asset\DeliveryType;
14-
1513
/**
1614
* Class XmpSource
1715
*/

src/Transformation/Effect/BlendEffectQualifier.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BlendEffectQualifier extends LimitedEffectQualifier
2424
*
2525
* @param int $blend The blend percentage to set.
2626
*
27-
* @return BlendEffectQualifier
27+
* @return static
2828
*
2929
* @internal
3030
*/

src/Transformation/Effect/Misc/StyleTransfer/StyleTransfer.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
namespace Cloudinary\Transformation;
1212

13-
use Cloudinary\Asset\Media;
14-
1513
/**
1614
* Applies a complex deep learning neural network algorithm that extracts artistic styles from a source image
1715
* and applies them to the content of a target photograph.
@@ -27,7 +25,7 @@ class StyleTransfer extends SourceBasedEffectAction
2725
/**
2826
* StyleTransfer constructor.
2927
*
30-
* @param String|Media $source The public ID of the source artwork.
28+
* @param String|mixed $source The public ID of the source artwork.
3129
* @param int $strength Sets the strength of the style transfer.
3230
* @param bool $preserveColor Determines whether the original colors of the target photo are kept.
3331
*/

src/Transformation/Effect/Pixel/CutOut.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
namespace Cloudinary\Transformation;
1212

1313
use Cloudinary\ArrayUtils;
14-
use Cloudinary\Asset\Media;
1514

1615
/**
1716
* Trims pixels according to the transparency levels of a specified overlay image.
@@ -30,7 +29,7 @@ class CutOut extends SourceBasedEffectAction
3029
/**
3130
* CutOut constructor.
3231
*
33-
* @param string|Media $source The public ID of the source.
32+
* @param string|mixed $source The public ID of the source.
3433
*/
3534
public function __construct($source)
3635
{

0 commit comments

Comments
 (0)