Skip to content

Commit

Permalink
vendor update to 2.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
skerbis committed Apr 7, 2023
1 parent 6bf694b commit 2127ba9
Show file tree
Hide file tree
Showing 10 changed files with 145 additions and 65 deletions.
4 changes: 2 additions & 2 deletions package.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package: cropper
version: '1.4.0'
version: '1.5.0'
author: Friends Of REDAXO
supportpage: https://github.com/FriendsOfREDAXO/cropper

Expand All @@ -12,5 +12,5 @@ pages:
requires:
redaxo: '^5.8'
php:
version: '>5.6'
version: '>7.4'
extensions: [gd]
41 changes: 27 additions & 14 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;

/** @var ?string */
private $vendorDir;

Expand Down Expand Up @@ -106,6 +109,7 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}

/**
Expand Down Expand Up @@ -425,7 +429,8 @@ public function unregister()
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
$includeFile = self::$includeFile;
$includeFile($file);

return true;
}
Expand Down Expand Up @@ -555,18 +560,26 @@ private function findFileWithExtension($class, $ext)

return false;
}
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
* @private
*/
function includeFile($file)
{
include $file;
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}

/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}
17 changes: 12 additions & 5 deletions vendor/composer/InstalledVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}

Expand All @@ -119,7 +119,7 @@ public static function isInstalled($packageName, $includeDevRequirements = true)
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));

return $provided->matches($constraint);
Expand Down Expand Up @@ -328,7 +328,9 @@ private static function getInstalled()
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
$installed[] = self::$installedByVendor[$vendorDir] = $required;
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
Expand All @@ -340,12 +342,17 @@ private static function getInstalled()
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;

if (self::$installed !== array()) {
$installed[] = self::$installed;
}

return $installed;
}
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"packages": [
{
"name": "stefangabos/zebra_image",
"version": "2.8.1",
"version_normalized": "2.8.1.0",
"version": "2.8.2",
"version_normalized": "2.8.2.0",
"source": {
"type": "git",
"url": "https://github.com/stefangabos/Zebra_Image.git",
"reference": "2d266592bfe18e784203a02507beb0a29d4bc0f5"
"reference": "11c343fa312d8cc3ffc70231f027af6bdd01f42b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/stefangabos/Zebra_Image/zipball/2d266592bfe18e784203a02507beb0a29d4bc0f5",
"reference": "2d266592bfe18e784203a02507beb0a29d4bc0f5",
"url": "https://api.github.com/repos/stefangabos/Zebra_Image/zipball/11c343fa312d8cc3ffc70231f027af6bdd01f42b",
"reference": "11c343fa312d8cc3ffc70231f027af6bdd01f42b",
"shasum": ""
},
"require": {
Expand All @@ -22,7 +22,7 @@
"phpstan/phpstan": "^1.8",
"squizlabs/php_codesniffer": "*"
},
"time": "2022-12-29T14:47:12+00:00",
"time": "2023-01-25T14:53:20+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
Expand Down Expand Up @@ -55,7 +55,7 @@
],
"support": {
"issues": "https://github.com/stefangabos/Zebra_Image/issues",
"source": "https://github.com/stefangabos/Zebra_Image/tree/2.8.1"
"source": "https://github.com/stefangabos/Zebra_Image/tree/2.8.2"
},
"funding": [
{
Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'friendsofredaxo/cropper',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '0c8c1096894ce735fdf3e9851cba2893affef018',
'reference' => '6bf694b71b81f960bfbd7b949e08ded16ab55368',
'type' => 'redaxo-addon',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,16 +13,16 @@
'friendsofredaxo/cropper' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '0c8c1096894ce735fdf3e9851cba2893affef018',
'reference' => '6bf694b71b81f960bfbd7b949e08ded16ab55368',
'type' => 'redaxo-addon',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'stefangabos/zebra_image' => array(
'pretty_version' => '2.8.1',
'version' => '2.8.1.0',
'reference' => '2d266592bfe18e784203a02507beb0a29d4bc0f5',
'pretty_version' => '2.8.2',
'version' => '2.8.2.0',
'reference' => '11c343fa312d8cc3ffc70231f027af6bdd01f42b',
'type' => 'library',
'install_path' => __DIR__ . '/../stefangabos/zebra_image',
'aliases' => array(),
Expand Down
5 changes: 5 additions & 0 deletions vendor/stefangabos/zebra_image/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## version 2.8.2 (January 25, 2023)

- added support for BMP; see [#27](https://github.com/stefangabos/Zebra_Image/issues/27); thanks [icret](https://github.com/icret) for suggesting
- fixed some issues with WEBP images

## version 2.8.1 (December 29, 2022)

- fixed an issue where in PHP 8 the script would break with certain GIF images; see [#26](https://github.com/stefangabos/Zebra_Image/issues/26) - thank you [Marcus Nyberg](https://github.com/mce1978) for reporting!
Expand Down
11 changes: 5 additions & 6 deletions vendor/stefangabos/zebra_image/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Latest Stable Version](https://poser.pugx.org/stefangabos/zebra_image/v/stable)](https://packagist.org/packages/stefangabos/zebra_image) [![Total Downloads](https://poser.pugx.org/stefangabos/zebra_image/downloads)](https://packagist.org/packages/stefangabos/zebra_image) [![Monthly Downloads](https://poser.pugx.org/stefangabos/zebra_image/d/monthly)](https://packagist.org/packages/stefangabos/zebra_image) [![Daily Downloads](https://poser.pugx.org/stefangabos/zebra_image/d/daily)](https://packagist.org/packages/stefangabos/zebra_image) [![License](https://poser.pugx.org/stefangabos/zebra_image/license)](https://packagist.org/packages/stefangabos/zebra_image)

Use Zebra Image to **resize**, **flip**, **rotate**, **crop** and **sharpen** images. The library supports loading and saving images in the **GIF**, **JPEG**, **PNG** and **WEBP** formats and preserves transparency of **GIF**, **PNG8**, **PNG24** and **WEBP** images and it doesn't require any external libraries other than the [GD2 extension](https://www.php.net/manual/en/book.image.php) (with which PHP usually comes pre-compiled with).
Use Zebra Image to **resize**, **flip**, **rotate**, **crop** and **sharpen** images. The library supports loading and saving images in the **BMP**, **GIF**, **JPEG**, **PNG** and **WEBP** formats and preserves transparency of **GIF**, **PNG8**, **PNG24** and **WEBP** images, and it doesn't require any external libraries other than the [GD2 extension](https://www.php.net/manual/en/book.image.php) (with which PHP usually comes pre-compiled with).

All the [filters supported by PHP](https://www.php.net/manual/en/function.imagefilter.php) can be applied to images. These filters include negate, grayscale, brightness, contrast, colorize, edgedetect, emboss, gaussian blur, selective blur, mean removal, smooth and pixelate. Multiple filters can be applied at once for creating custom filters.

Expand Down Expand Up @@ -68,6 +68,7 @@ Here are the results of resizing a 800×573 pixels image to a 200×200 pixels im
## Features

- can be used to resize, flip, rotate, crop and sharpen images
- supports handling of BMP, GIF, JPG, PNG and WEBP images
- all the [filters supported by PHP](https://www.php.net/manual/en/function.imagefilter.php) can be applied to images: negate, grayscale, brightness, contrast, colorize, edgedetect, emboss, gaussian blur, selective blur, mean removal, smooth and pixelate; multiple filters can be applied at once for creating custom filters;
- images can be resized to *exact* sizes and maintaining aspect ratio by automatically cropping them
- preserves transparency of GIF, PNG8, PNG24 and WEBP images
Expand All @@ -82,16 +83,14 @@ Check out the [awesome documentation](https://stefangabos.github.io/Zebra_Image/

## 🎂 Support the development of this project

Your support means a lot and it keeps me motivated to keep working on open source projects.<br>
If you like this project please ⭐ it by clicking on the star button at the top of the page.<br>
If you are feeling generous, you can buy me a coffee by donating through PayPal, or you can become a sponsor.<br>
Either way - **Thank you!** 🎉
Your support is greatly appreciated and it keeps me motivated continue working on open source projects. If you enjoy this project please star it by clicking on the star button at the top of the page. If you're feeling generous, you can also buy me a coffee through PayPal or become a sponsor.
**Thank you for your support!** 🎉

[<img src="https://img.shields.io/github/stars/stefangabos/zebra_image?color=green&label=star%20it%20on%20GitHub" width="132" height="20" alt="Star it on GitHub">](https://github.com/stefangabos/Zebra_Image) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=BXHCKWCF6JCPQ) [<img src="https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors">](https://github.com/sponsors/stefangabos)

## Requirements

PHP 5+, bundled GD 2.0.28+ (PHP 7.0.0+ for WEBP support)
PHP 5+, bundled GD 2.0.28+ (PHP 7.0.0+ for WEBP support, PHP 7.2.0+ for BMP support)

PHP needs to be compiled with `--enable-exif` (Windows users enable `php_mbstring.dll` and `php_exif.dll` extensions in `php.ini`) for auto-fixing image rotation so images are always shown correctly regardless of how the camera was held when the pictures were taken.

Expand Down
Loading

0 comments on commit 2127ba9

Please sign in to comment.