Skip to content

Commit

Permalink
Drop support for PHP 5.x and 7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
const-cloudinary authored Dec 16, 2024
1 parent f5fa243 commit 42831e2
Show file tree
Hide file tree
Showing 29 changed files with 57 additions and 1,776 deletions.
71 changes: 0 additions & 71 deletions .code-generation/config.js

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
fail-fast: false
matrix:
php-versions:
- '5.6'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
82 changes: 0 additions & 82 deletions RoboFile.php

This file was deleted.

9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@
"issues": "https://github.com/cloudinary/php-transformation-builder-sdk/issues"
},
"require": {
"php": ">=5.6.0",
"php": ">=8.0.0",
"ext-json": "*"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.2",
"symfony/phpunit-bridge": "^7.2",
"phpmd/phpmd": "*",
"squizlabs/php_codesniffer": "3.*",
"squizlabs/php_codesniffer": "*",
"friendsofphp/php-cs-fixer": "*",
"ext-dom": "*",
"ext-libxml": "*",
"ext-zip": "*",
"consolidation/robo": "~1"
"ext-zip": "*"
},
"autoload": {
"classmap": [
Expand Down
43 changes: 15 additions & 28 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
>
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
</php>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<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">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
<php>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0"/>
<env name="SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT" value="1"/>
</php>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
</testsuites>
</phpunit>
4 changes: 2 additions & 2 deletions src/Transformation/BaseAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ abstract class BaseAction extends BaseComponent
protected $qualifiers = [];

/**
* @var string MAIN_QUALIFIER Represents the main qualifier of the action. (some actions do not have main qualifier)
* @var ?string MAIN_QUALIFIER Represents the main qualifier of the action. (some actions do not have main qualifier)
*/
const MAIN_QUALIFIER = null;

Expand Down Expand Up @@ -62,7 +62,7 @@ public function __construct(...$qualifiers)
*
* @return $this
*/
public function addQualifier(BaseComponent $qualifier = null)
public function addQualifier(?BaseComponent $qualifier = null)
{
ArrayUtils::addNonEmpty($this->qualifiers, $qualifier ? $qualifier->getFullName() : null, $qualifier);

Expand Down
2 changes: 0 additions & 2 deletions src/Transformation/Effect/Addon/Lightroom/XmpSourceValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

namespace Cloudinary\Transformation;

use Cloudinary\Asset\DeliveryType;

/**
* Class XmpSource
*/
Expand Down
2 changes: 1 addition & 1 deletion src/Transformation/Effect/BlendEffectQualifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BlendEffectQualifier extends LimitedEffectQualifier
*
* @param int $blend The blend percentage to set.
*
* @return BlendEffectQualifier
* @return static
*
* @internal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

namespace Cloudinary\Transformation;

use Cloudinary\Asset\Media;

/**
* Applies a complex deep learning neural network algorithm that extracts artistic styles from a source image
* and applies them to the content of a target photograph.
Expand All @@ -27,7 +25,7 @@ class StyleTransfer extends SourceBasedEffectAction
/**
* StyleTransfer constructor.
*
* @param String|Media $source The public ID of the source artwork.
* @param String|mixed $source The public ID of the source artwork.
* @param int $strength Sets the strength of the style transfer.
* @param bool $preserveColor Determines whether the original colors of the target photo are kept.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/Transformation/Effect/Pixel/CutOut.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
namespace Cloudinary\Transformation;

use Cloudinary\ArrayUtils;
use Cloudinary\Asset\Media;

/**
* Trims pixels according to the transparency levels of a specified overlay image.
Expand All @@ -30,7 +29,7 @@ class CutOut extends SourceBasedEffectAction
/**
* CutOut constructor.
*
* @param string|Media $source The public ID of the source.
* @param string|mixed $source The public ID of the source.
*/
public function __construct($source)
{
Expand Down
3 changes: 1 addition & 2 deletions src/Transformation/Effect/Pixel/ImagePixelEffectTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

namespace Cloudinary\Transformation;

use Cloudinary\Asset\Media;
use Cloudinary\Transformation\Argument\Color;

/**
Expand Down Expand Up @@ -126,7 +125,7 @@ public static function gradientFade($strength = null, $type = null)
* Wherever an overlay image is transparent, the original is shown, and wherever an overlay is opaque, the
* resulting image is transparent.
*
* @param string|Media $source The public ID of the source.
* @param string|mixed $source The public ID of the source.
*
* @return CutOut
*
Expand Down
2 changes: 1 addition & 1 deletion src/Transformation/Expression/ExpressionTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait ExpressionTrait
*
* @param mixed $value The expression value.
*
* @return self
* @return static
*/
public function expression($value)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function delay($delay)
*
* @param string $defaultImage Default image public ID
*
* @return $this
* @return static
*/
public function defaultImage($defaultImage)
{
Expand All @@ -49,7 +49,7 @@ public function defaultImage($defaultImage)
*
* @param int|string $density The density in dpi.
*
* @return Density
* @return static
*/
public function density($density)
{
Expand All @@ -61,7 +61,7 @@ public function density($density)
*
* @param string $prefix The style class name prefix.
*
* @return Prefix
* @return static
*/
public function prefix($prefix)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Transformation/Layer/AudioOverlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(
*
* @return AudioOverlay
*/
public function timeline(Timeline $timeline = null)
public function timeline(?Timeline $timeline = null)
{
$this->timeline = $timeline;

Expand Down
2 changes: 1 addition & 1 deletion src/Transformation/Layer/MediaOverlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MediaOverlay extends ImageOverlay
*
* @return MediaOverlay
*/
public function timeline(Timeline $timeline = null)
public function timeline(?Timeline $timeline = null)
{
$this->timeline = $timeline;

Expand Down
2 changes: 1 addition & 1 deletion src/Transformation/Layer/VideoOverlay.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function __construct(
*
* @return BasePositionalSourceContainer
*/
public function timeline(Timeline $timeline = null)
public function timeline(?Timeline $timeline = null)
{
$this->timeline = $timeline;

Expand Down
2 changes: 1 addition & 1 deletion src/Transformation/Page/ClippingPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ClippingPath extends BasePageAction
* @see Flag::clip
* @see Flag::clipEvenOdd
*/
public function __construct($clippingPath, FlagQualifier $method = null)
public function __construct($clippingPath, ?FlagQualifier $method = null)
{
parent::__construct(ClassUtils::verifyInstance($clippingPath, PageQualifier::class));

Expand Down
Loading

0 comments on commit 42831e2

Please sign in to comment.