Plugin Directory

Changeset 2995411


Ignore:
Timestamp:
11/13/2023 07:22:49 PM (2 years ago)
Author:
raffaelj
Message:

bump version to 0.2.1

Location:
another-simple-image-optimizer
Files:
6 added
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • another-simple-image-optimizer/tags/0.2.1/AnotherSimpleImageOptimizer.php

    r2947386 r2995411  
    11<?php
    22
    3 use Spatie\ImageOptimizer\OptimizerChainFactory;
    43use Symfony\Component\Process\Process;
     4
     5use Spatie\ImageOptimizer\OptimizerChain;
     6use Spatie\ImageOptimizer\Optimizers\Avifenc;
     7use Spatie\ImageOptimizer\Optimizers\Cwebp;
     8use Spatie\ImageOptimizer\Optimizers\Gifsicle;
     9use Spatie\ImageOptimizer\Optimizers\Jpegoptim;
     10use Spatie\ImageOptimizer\Optimizers\Optipng;
     11use Spatie\ImageOptimizer\Optimizers\Pngquant;
     12use Spatie\ImageOptimizer\Optimizers\Svgo;
    513
    614class AnotherSimpleImageOptimizer {
     
    2331
    2432        // TODO: add config options
    25         $optimizerChain = OptimizerChainFactory::create();
     33        $optimizerChain = self::createOptimizerChain();
    2634        $optimizerChain->optimize($file, $outputPath);
    2735
     
    4452        ];
    4553
     54    }
     55
     56    /**
     57     * Callback for `wp_generate_attachment_metadata` hook
     58     */
     59    public static function hook_wp_generate_attachment_metadata(array $metadata, ?int $postId = null, ?string $context = null): array {
     60        return self::run($metadata);
    4661    }
    4762
     
    236251    }
    237252
     253    /**
     254     * Modified variant of \Spatie\ImageOptimizer\OptimizerChainFactory::create
     255     *
     256     * Fixes svgo config, also a base for config options in a future release
     257     *
     258     * @see https://github.com/spatie/image-optimizer/blob/main/src/OptimizerChainFactory.php
     259     * @see https://github.com/spatie/image-optimizer/blob/main/svgo.config.js
     260     */
     261    public static function createOptimizerChain(array $config = []): OptimizerChain {
     262
     263        $jpegQuality = '--max=85';
     264        $pngQuality  = '--quality=85';
     265        $webpQuality = '-q 80';
     266        $avifQuality = '-a cq-level=23';
     267        if (isset($config['quality'])) {
     268            $jpegQuality = '--max='.$config['quality'];
     269            $pngQuality  = '--quality='.$config['quality'];
     270            $webpQuality = '-q '.$config['quality'];
     271            $avifQuality = '-a cq-level='.round(63 - $config['quality'] * 0.63);
     272        }
     273
     274        // possible options: int 2, int 3
     275        $svgoVersion    = defined('ASIO_SVGO_VERSION') ? ASIO_SVGO_VERSION : 3;
     276        $svgoConfigFile = __DIR__ . "/optimizer-config/svgo{$svgoVersion}.config.js";
     277
     278        return (new OptimizerChain())
     279            ->addOptimizer(new Jpegoptim([
     280                $jpegQuality,
     281                '--strip-all',
     282                '--all-progressive',
     283            ]))
     284
     285            ->addOptimizer(new Pngquant([
     286                $pngQuality,
     287                '--force',
     288                '--skip-if-larger',
     289            ]))
     290
     291            ->addOptimizer(new Optipng([
     292                '-i0',
     293                '-o2',
     294                '-quiet',
     295            ]))
     296
     297            ->addOptimizer(new Svgo([
     298                '--config=' . $svgoConfigFile,
     299            ]))
     300
     301            ->addOptimizer(new Gifsicle([
     302                '-b',
     303                '-O3',
     304            ]))
     305            ->addOptimizer(new Cwebp([
     306                $webpQuality,
     307                '-m 6',
     308                '-pass 10',
     309                '-mt',
     310            ]))
     311            ->addOptimizer(new Avifenc([
     312                $avifQuality,
     313                '-j all',
     314                '--min 0',
     315                '--max 63',
     316                '--minalpha 0',
     317                '--maxalpha 63',
     318                '-a end-usage=q',
     319                '-a tune=ssim',
     320            ]));
     321    }
     322
    238323}
  • another-simple-image-optimizer/tags/0.2.1/CHANGELOG.md

    r2947747 r2995411  
    11# Changelog
     2
     3## 0.2.1
     4
     5* added tests (also with a proof of concept to enable svg and avif support)
     6* added custom method to create optimizer chain (to fix svg optimization and as a base for config options in a future release)
     7* fixed svgo error (wrong relative path to `svgo.config.js`)
     8* added compatibility with svgo 3
     9  * also v3 is the default now
     10  * to use the svgo 2 config file, you have to set `define(ASIO_SVGO_VERSION, 2)` in `wp-config.php`
     11* updated dependencies
     12  * spatie/image-optimizer (1.7.1 => 1.7.2)
     13  * symfony/process (v6.3.2 => v6.3.4)
    214
    315## 0.2.0
  • another-simple-image-optimizer/tags/0.2.1/README.md

    r2947747 r2995411  
    1313
    1414__Important:__ If the needed binary files aren't installed, this plugin won't optimize anything. Don't use it, if you don't know, how to install them or if your web hoster doesn't provide them.
     15
     16__Notice:__ WordPress has no support for SVG and AVIF files. Technically this plugin can optimize them, but I didn't run any tests with plugins, that add SVG/AVIF support to WordPress. I was able to optimize svg and avif files automatically in a local test setup (see [`prepare-and-run-tests.sh` in the tests folder](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/tests/prepare-and-run-tests.sh) and search for `enable_svg_avif_upload`).
    1517
    1618## Optimization tools
     
    143145## License
    144146
    145 MIT
     147Code: MIT, see [LICENSE][6] for more information.
    146148
    147 See [LICENSE][6] for more information.
     149Images (in `tests/images`): [CC-BY](https://creativecommons.org/licenses/by/4.0/) Raffael Jesche.
    148150
    149151## Credits and third party resources
  • another-simple-image-optimizer/tags/0.2.1/composer.lock

    r2947386 r2995411  
    5959        {
    6060            "name": "spatie/image-optimizer",
    61             "version": "1.7.1",
     61            "version": "1.7.2",
    6262            "source": {
    6363                "type": "git",
    6464                "url": "https://github.com/spatie/image-optimizer.git",
    65                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30"
     65                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1"
    6666            },
    6767            "dist": {
    6868                "type": "zip",
    69                 "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
    70                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
     69                "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/62f7463483d1bd975f6f06025d89d42a29608fe1",
     70                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1",
    7171                "shasum": ""
    7272            },
     
    7575                "php": "^7.3|^8.0",
    7676                "psr/log": "^1.0 | ^2.0 | ^3.0",
    77                 "symfony/process": "^4.2|^5.0|^6.0"
     77                "symfony/process": "^4.2|^5.0|^6.0|^7.0"
    7878            },
    7979            "require-dev": {
    8080                "pestphp/pest": "^1.21",
    8181                "phpunit/phpunit": "^8.5.21|^9.4.4",
    82                 "symfony/var-dumper": "^4.2|^5.0|^6.0"
     82                "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
    8383            },
    8484            "type": "library",
     
    108108            "support": {
    109109                "issues": "https://github.com/spatie/image-optimizer/issues",
    110                 "source": "https://github.com/spatie/image-optimizer/tree/1.7.1"
     110                "source": "https://github.com/spatie/image-optimizer/tree/1.7.2"
    111111            },
    112             "time": "2023-07-27T07:57:32+00:00"
     112            "time": "2023-11-03T10:08:02+00:00"
    113113        },
    114114        {
    115115            "name": "symfony/process",
    116             "version": "v6.3.2",
     116            "version": "v6.3.4",
    117117            "source": {
    118118                "type": "git",
    119119                "url": "https://github.com/symfony/process.git",
    120                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"
     120                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
    121121            },
    122122            "dist": {
    123123                "type": "zip",
    124                 "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
    125                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
     124                "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54",
     125                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
    126126                "shasum": ""
    127127            },
     
    155155            "homepage": "https://symfony.com",
    156156            "support": {
    157                 "source": "https://github.com/symfony/process/tree/v6.3.2"
     157                "source": "https://github.com/symfony/process/tree/v6.3.4"
    158158            },
    159159            "funding": [
     
    171171                }
    172172            ],
    173             "time": "2023-07-12T16:00:22+00:00"
     173            "time": "2023-08-07T10:39:22+00:00"
    174174        }
    175175    ],
     
    185185        "php": "8.1.21"
    186186    },
    187     "plugin-api-version": "2.3.0"
     187    "plugin-api-version": "2.6.0"
    188188}
  • another-simple-image-optimizer/tags/0.2.1/plugin.php

    r2947747 r2995411  
    66 * Author: Raffael Jesche
    77 * Author URI: https://www.rlj.me
    8  * Version: 0.2.0
     8 * Version: 0.2.1
    99 * License: MIT
    1010 * License URI: https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/LICENSE
     
    2020 * Fires on file uploads or when using wp cli `wp media regenerate`
    2121 */
    22 add_filter('wp_generate_attachment_metadata', ['AnotherSimpleImageOptimizer', 'run']);
     22add_filter('wp_generate_attachment_metadata', [
     23    'AnotherSimpleImageOptimizer',
     24    'hook_wp_generate_attachment_metadata'
     25]);
    2326
    2427/**
  • another-simple-image-optimizer/tags/0.2.1/readme.txt

    r2990224 r2995411  
    55Requires at least: 5.9
    66Tested up to: 6.4
    7 Stable tag: 0.2.0
     7Stable tag: 0.2.1
    88Requires PHP: 8.1
    99License: MIT
     
    2626
    2727__Important:__ If the needed binary files aren't installed, this plugin won't optimize anything. Don't use it, if you don't know, how to install them or if your web hoster doesn't provide them.
     28
     29__Notice:__ WordPress has no support for SVG and AVIF files. Technically this plugin can optimize them, but I didn't run any tests with plugins, that add SVG/AVIF support to WordPress. I was able to optimize svg and avif files automatically in a local test setup (see [`prepare-and-run-tests.sh` in the tests folder](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/tests/prepare-and-run-tests.sh) and search for `enable_svg_avif_upload`).
    2830
    2931For more information and notes about development, checkout the [project README.md file on Codeberg](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/README.md)
  • another-simple-image-optimizer/tags/0.2.1/vendor/composer/ClassLoader.php

    r2903959 r2995411  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    70      * @var array[]
    71      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    164      * @param string[] $classMap Class to filename map
    165      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    482476
    483477    /**
    484      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    485      *
    486      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    487481     */
    488482    public static function getRegisteredLoaders()
  • another-simple-image-optimizer/tags/0.2.1/vendor/composer/installed.json

    r2947386 r2995411  
    5656        {
    5757            "name": "spatie/image-optimizer",
    58             "version": "1.7.1",
    59             "version_normalized": "1.7.1.0",
     58            "version": "1.7.2",
     59            "version_normalized": "1.7.2.0",
    6060            "source": {
    6161                "type": "git",
    6262                "url": "https://github.com/spatie/image-optimizer.git",
    63                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30"
     63                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1"
    6464            },
    6565            "dist": {
    6666                "type": "zip",
    67                 "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
    68                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
     67                "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/62f7463483d1bd975f6f06025d89d42a29608fe1",
     68                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1",
    6969                "shasum": ""
    7070            },
     
    7373                "php": "^7.3|^8.0",
    7474                "psr/log": "^1.0 | ^2.0 | ^3.0",
    75                 "symfony/process": "^4.2|^5.0|^6.0"
     75                "symfony/process": "^4.2|^5.0|^6.0|^7.0"
    7676            },
    7777            "require-dev": {
    7878                "pestphp/pest": "^1.21",
    7979                "phpunit/phpunit": "^8.5.21|^9.4.4",
    80                 "symfony/var-dumper": "^4.2|^5.0|^6.0"
     80                "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
    8181            },
    82             "time": "2023-07-27T07:57:32+00:00",
     82            "time": "2023-11-03T10:08:02+00:00",
    8383            "type": "library",
    8484            "installation-source": "dist",
     
    108108            "support": {
    109109                "issues": "https://github.com/spatie/image-optimizer/issues",
    110                 "source": "https://github.com/spatie/image-optimizer/tree/1.7.1"
     110                "source": "https://github.com/spatie/image-optimizer/tree/1.7.2"
    111111            },
    112112            "install-path": "../spatie/image-optimizer"
     
    114114        {
    115115            "name": "symfony/process",
    116             "version": "v6.3.2",
    117             "version_normalized": "6.3.2.0",
     116            "version": "v6.3.4",
     117            "version_normalized": "6.3.4.0",
    118118            "source": {
    119119                "type": "git",
    120120                "url": "https://github.com/symfony/process.git",
    121                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"
     121                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
    122122            },
    123123            "dist": {
    124124                "type": "zip",
    125                 "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
    126                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
     125                "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54",
     126                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
    127127                "shasum": ""
    128128            },
     
    130130                "php": ">=8.1"
    131131            },
    132             "time": "2023-07-12T16:00:22+00:00",
     132            "time": "2023-08-07T10:39:22+00:00",
    133133            "type": "library",
    134134            "installation-source": "dist",
     
    158158            "homepage": "https://symfony.com",
    159159            "support": {
    160                 "source": "https://github.com/symfony/process/tree/v6.3.2"
     160                "source": "https://github.com/symfony/process/tree/v6.3.4"
    161161            },
    162162            "funding": [
  • another-simple-image-optimizer/tags/0.2.1/vendor/composer/installed.php

    r2947386 r2995411  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '995d8979fd8d8e9d037a27ac604d4b71990cff7b',
     6        'reference' => '525fbbace498d44701468b27a6c9559645db5f39',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-main',
    2424            'version' => 'dev-main',
    25             'reference' => '995d8979fd8d8e9d037a27ac604d4b71990cff7b',
     25            'reference' => '525fbbace498d44701468b27a6c9559645db5f39',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'spatie/image-optimizer' => array(
    32             'pretty_version' => '1.7.1',
    33             'version' => '1.7.1.0',
    34             'reference' => 'af179994e2d2413e4b3ba2d348d06b4eaddbeb30',
     32            'pretty_version' => '1.7.2',
     33            'version' => '1.7.2.0',
     34            'reference' => '62f7463483d1bd975f6f06025d89d42a29608fe1',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../spatie/image-optimizer',
     
    3939        ),
    4040        'symfony/process' => array(
    41             'pretty_version' => 'v6.3.2',
    42             'version' => '6.3.2.0',
    43             'reference' => 'c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d',
     41            'pretty_version' => 'v6.3.4',
     42            'version' => '6.3.4.0',
     43            'reference' => '0b5c29118f2e980d455d2e34a5659f4579847c54',
    4444            'type' => 'library',
    4545            'install_path' => __DIR__ . '/../symfony/process',
  • another-simple-image-optimizer/tags/0.2.1/vendor/spatie/image-optimizer/CHANGELOG.md

    r2947386 r2995411  
    22
    33All notable changes to `image-optimizer` will be documented in this file
     4
     5## 1.7.1 - 2023-07-27
     6
     7### What's Changed
     8
     9- libavif version note by @0xb4lint in https://github.com/spatie/image-optimizer/pull/199
     10
     11**Full Changelog**: https://github.com/spatie/image-optimizer/compare/1.7.0...1.7.1
    412
    513## 1.7.0 - 2023-07-22
  • another-simple-image-optimizer/tags/0.2.1/vendor/spatie/image-optimizer/composer.json

    r2903959 r2995411  
    2020        "ext-fileinfo": "*",
    2121        "psr/log": "^1.0 | ^2.0 | ^3.0",
    22         "symfony/process": "^4.2|^5.0|^6.0"
     22        "symfony/process": "^4.2|^5.0|^6.0|^7.0"
    2323    },
    2424    "require-dev": {
    2525        "pestphp/pest": "^1.21",
    2626        "phpunit/phpunit": "^8.5.21|^9.4.4",
    27         "symfony/var-dumper": "^4.2|^5.0|^6.0"
     27        "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
    2828    },
    2929    "autoload": {
  • another-simple-image-optimizer/tags/0.2.1/vendor/symfony/process/Process.php

    r2947386 r2995411  
    329329            // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
    330330            $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;';
    331             $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code';
     331            $commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code';
    332332
    333333            // Workaround for the bug, when PTS functionality is enabled.
  • another-simple-image-optimizer/trunk/AnotherSimpleImageOptimizer.php

    r2947386 r2995411  
    11<?php
    22
    3 use Spatie\ImageOptimizer\OptimizerChainFactory;
    43use Symfony\Component\Process\Process;
     4
     5use Spatie\ImageOptimizer\OptimizerChain;
     6use Spatie\ImageOptimizer\Optimizers\Avifenc;
     7use Spatie\ImageOptimizer\Optimizers\Cwebp;
     8use Spatie\ImageOptimizer\Optimizers\Gifsicle;
     9use Spatie\ImageOptimizer\Optimizers\Jpegoptim;
     10use Spatie\ImageOptimizer\Optimizers\Optipng;
     11use Spatie\ImageOptimizer\Optimizers\Pngquant;
     12use Spatie\ImageOptimizer\Optimizers\Svgo;
    513
    614class AnotherSimpleImageOptimizer {
     
    2331
    2432        // TODO: add config options
    25         $optimizerChain = OptimizerChainFactory::create();
     33        $optimizerChain = self::createOptimizerChain();
    2634        $optimizerChain->optimize($file, $outputPath);
    2735
     
    4452        ];
    4553
     54    }
     55
     56    /**
     57     * Callback for `wp_generate_attachment_metadata` hook
     58     */
     59    public static function hook_wp_generate_attachment_metadata(array $metadata, ?int $postId = null, ?string $context = null): array {
     60        return self::run($metadata);
    4661    }
    4762
     
    236251    }
    237252
     253    /**
     254     * Modified variant of \Spatie\ImageOptimizer\OptimizerChainFactory::create
     255     *
     256     * Fixes svgo config, also a base for config options in a future release
     257     *
     258     * @see https://github.com/spatie/image-optimizer/blob/main/src/OptimizerChainFactory.php
     259     * @see https://github.com/spatie/image-optimizer/blob/main/svgo.config.js
     260     */
     261    public static function createOptimizerChain(array $config = []): OptimizerChain {
     262
     263        $jpegQuality = '--max=85';
     264        $pngQuality  = '--quality=85';
     265        $webpQuality = '-q 80';
     266        $avifQuality = '-a cq-level=23';
     267        if (isset($config['quality'])) {
     268            $jpegQuality = '--max='.$config['quality'];
     269            $pngQuality  = '--quality='.$config['quality'];
     270            $webpQuality = '-q '.$config['quality'];
     271            $avifQuality = '-a cq-level='.round(63 - $config['quality'] * 0.63);
     272        }
     273
     274        // possible options: int 2, int 3
     275        $svgoVersion    = defined('ASIO_SVGO_VERSION') ? ASIO_SVGO_VERSION : 3;
     276        $svgoConfigFile = __DIR__ . "/optimizer-config/svgo{$svgoVersion}.config.js";
     277
     278        return (new OptimizerChain())
     279            ->addOptimizer(new Jpegoptim([
     280                $jpegQuality,
     281                '--strip-all',
     282                '--all-progressive',
     283            ]))
     284
     285            ->addOptimizer(new Pngquant([
     286                $pngQuality,
     287                '--force',
     288                '--skip-if-larger',
     289            ]))
     290
     291            ->addOptimizer(new Optipng([
     292                '-i0',
     293                '-o2',
     294                '-quiet',
     295            ]))
     296
     297            ->addOptimizer(new Svgo([
     298                '--config=' . $svgoConfigFile,
     299            ]))
     300
     301            ->addOptimizer(new Gifsicle([
     302                '-b',
     303                '-O3',
     304            ]))
     305            ->addOptimizer(new Cwebp([
     306                $webpQuality,
     307                '-m 6',
     308                '-pass 10',
     309                '-mt',
     310            ]))
     311            ->addOptimizer(new Avifenc([
     312                $avifQuality,
     313                '-j all',
     314                '--min 0',
     315                '--max 63',
     316                '--minalpha 0',
     317                '--maxalpha 63',
     318                '-a end-usage=q',
     319                '-a tune=ssim',
     320            ]));
     321    }
     322
    238323}
  • another-simple-image-optimizer/trunk/CHANGELOG.md

    r2947747 r2995411  
    11# Changelog
     2
     3## 0.2.1
     4
     5* added tests (also with a proof of concept to enable svg and avif support)
     6* added custom method to create optimizer chain (to fix svg optimization and as a base for config options in a future release)
     7* fixed svgo error (wrong relative path to `svgo.config.js`)
     8* added compatibility with svgo 3
     9  * also v3 is the default now
     10  * to use the svgo 2 config file, you have to set `define(ASIO_SVGO_VERSION, 2)` in `wp-config.php`
     11* updated dependencies
     12  * spatie/image-optimizer (1.7.1 => 1.7.2)
     13  * symfony/process (v6.3.2 => v6.3.4)
    214
    315## 0.2.0
  • another-simple-image-optimizer/trunk/README.md

    r2947747 r2995411  
    1313
    1414__Important:__ If the needed binary files aren't installed, this plugin won't optimize anything. Don't use it, if you don't know, how to install them or if your web hoster doesn't provide them.
     15
     16__Notice:__ WordPress has no support for SVG and AVIF files. Technically this plugin can optimize them, but I didn't run any tests with plugins, that add SVG/AVIF support to WordPress. I was able to optimize svg and avif files automatically in a local test setup (see [`prepare-and-run-tests.sh` in the tests folder](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/tests/prepare-and-run-tests.sh) and search for `enable_svg_avif_upload`).
    1517
    1618## Optimization tools
     
    143145## License
    144146
    145 MIT
     147Code: MIT, see [LICENSE][6] for more information.
    146148
    147 See [LICENSE][6] for more information.
     149Images (in `tests/images`): [CC-BY](https://creativecommons.org/licenses/by/4.0/) Raffael Jesche.
    148150
    149151## Credits and third party resources
  • another-simple-image-optimizer/trunk/composer.lock

    r2947386 r2995411  
    5959        {
    6060            "name": "spatie/image-optimizer",
    61             "version": "1.7.1",
     61            "version": "1.7.2",
    6262            "source": {
    6363                "type": "git",
    6464                "url": "https://github.com/spatie/image-optimizer.git",
    65                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30"
     65                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1"
    6666            },
    6767            "dist": {
    6868                "type": "zip",
    69                 "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
    70                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
     69                "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/62f7463483d1bd975f6f06025d89d42a29608fe1",
     70                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1",
    7171                "shasum": ""
    7272            },
     
    7575                "php": "^7.3|^8.0",
    7676                "psr/log": "^1.0 | ^2.0 | ^3.0",
    77                 "symfony/process": "^4.2|^5.0|^6.0"
     77                "symfony/process": "^4.2|^5.0|^6.0|^7.0"
    7878            },
    7979            "require-dev": {
    8080                "pestphp/pest": "^1.21",
    8181                "phpunit/phpunit": "^8.5.21|^9.4.4",
    82                 "symfony/var-dumper": "^4.2|^5.0|^6.0"
     82                "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
    8383            },
    8484            "type": "library",
     
    108108            "support": {
    109109                "issues": "https://github.com/spatie/image-optimizer/issues",
    110                 "source": "https://github.com/spatie/image-optimizer/tree/1.7.1"
     110                "source": "https://github.com/spatie/image-optimizer/tree/1.7.2"
    111111            },
    112             "time": "2023-07-27T07:57:32+00:00"
     112            "time": "2023-11-03T10:08:02+00:00"
    113113        },
    114114        {
    115115            "name": "symfony/process",
    116             "version": "v6.3.2",
     116            "version": "v6.3.4",
    117117            "source": {
    118118                "type": "git",
    119119                "url": "https://github.com/symfony/process.git",
    120                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"
     120                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
    121121            },
    122122            "dist": {
    123123                "type": "zip",
    124                 "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
    125                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
     124                "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54",
     125                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
    126126                "shasum": ""
    127127            },
     
    155155            "homepage": "https://symfony.com",
    156156            "support": {
    157                 "source": "https://github.com/symfony/process/tree/v6.3.2"
     157                "source": "https://github.com/symfony/process/tree/v6.3.4"
    158158            },
    159159            "funding": [
     
    171171                }
    172172            ],
    173             "time": "2023-07-12T16:00:22+00:00"
     173            "time": "2023-08-07T10:39:22+00:00"
    174174        }
    175175    ],
     
    185185        "php": "8.1.21"
    186186    },
    187     "plugin-api-version": "2.3.0"
     187    "plugin-api-version": "2.6.0"
    188188}
  • another-simple-image-optimizer/trunk/plugin.php

    r2947747 r2995411  
    66 * Author: Raffael Jesche
    77 * Author URI: https://www.rlj.me
    8  * Version: 0.2.0
     8 * Version: 0.2.1
    99 * License: MIT
    1010 * License URI: https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/LICENSE
     
    2020 * Fires on file uploads or when using wp cli `wp media regenerate`
    2121 */
    22 add_filter('wp_generate_attachment_metadata', ['AnotherSimpleImageOptimizer', 'run']);
     22add_filter('wp_generate_attachment_metadata', [
     23    'AnotherSimpleImageOptimizer',
     24    'hook_wp_generate_attachment_metadata'
     25]);
    2326
    2427/**
  • another-simple-image-optimizer/trunk/readme.txt

    r2990224 r2995411  
    55Requires at least: 5.9
    66Tested up to: 6.4
    7 Stable tag: 0.2.0
     7Stable tag: 0.2.1
    88Requires PHP: 8.1
    99License: MIT
     
    2626
    2727__Important:__ If the needed binary files aren't installed, this plugin won't optimize anything. Don't use it, if you don't know, how to install them or if your web hoster doesn't provide them.
     28
     29__Notice:__ WordPress has no support for SVG and AVIF files. Technically this plugin can optimize them, but I didn't run any tests with plugins, that add SVG/AVIF support to WordPress. I was able to optimize svg and avif files automatically in a local test setup (see [`prepare-and-run-tests.sh` in the tests folder](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/tests/prepare-and-run-tests.sh) and search for `enable_svg_avif_upload`).
    2830
    2931For more information and notes about development, checkout the [project README.md file on Codeberg](https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/README.md)
  • another-simple-image-optimizer/trunk/vendor/composer/ClassLoader.php

    r2903959 r2995411  
    4646    private static $includeFile;
    4747
    48     /** @var ?string */
     48    /** @var string|null */
    4949    private $vendorDir;
    5050
    5151    // PSR-4
    5252    /**
    53      * @var array[]
    54      * @psalm-var array<string, array<string, int>>
     53     * @var array<string, array<string, int>>
    5554     */
    5655    private $prefixLengthsPsr4 = array();
    5756    /**
    58      * @var array[]
    59      * @psalm-var array<string, array<int, string>>
     57     * @var array<string, list<string>>
    6058     */
    6159    private $prefixDirsPsr4 = array();
    6260    /**
    63      * @var array[]
    64      * @psalm-var array<string, string>
     61     * @var list<string>
    6562     */
    6663    private $fallbackDirsPsr4 = array();
     
    6865    // PSR-0
    6966    /**
    70      * @var array[]
    71      * @psalm-var array<string, array<string, string[]>>
     67     * List of PSR-0 prefixes
     68     *
     69     * Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
     70     *
     71     * @var array<string, array<string, list<string>>>
    7272     */
    7373    private $prefixesPsr0 = array();
    7474    /**
    75      * @var array[]
    76      * @psalm-var array<string, string>
     75     * @var list<string>
    7776     */
    7877    private $fallbackDirsPsr0 = array();
     
    8281
    8382    /**
    84      * @var string[]
    85      * @psalm-var array<string, string>
     83     * @var array<string, string>
    8684     */
    8785    private $classMap = array();
     
    9189
    9290    /**
    93      * @var bool[]
    94      * @psalm-var array<string, bool>
     91     * @var array<string, bool>
    9592     */
    9693    private $missingClasses = array();
    9794
    98     /** @var ?string */
     95    /** @var string|null */
    9996    private $apcuPrefix;
    10097
    10198    /**
    102      * @var self[]
     99     * @var array<string, self>
    103100     */
    104101    private static $registeredLoaders = array();
    105102
    106103    /**
    107      * @param ?string $vendorDir
     104     * @param string|null $vendorDir
    108105     */
    109106    public function __construct($vendorDir = null)
     
    114111
    115112    /**
    116      * @return string[]
     113     * @return array<string, list<string>>
    117114     */
    118115    public function getPrefixes()
     
    126123
    127124    /**
    128      * @return array[]
    129      * @psalm-return array<string, array<int, string>>
     125     * @return array<string, list<string>>
    130126     */
    131127    public function getPrefixesPsr4()
     
    135131
    136132    /**
    137      * @return array[]
    138      * @psalm-return array<string, string>
     133     * @return list<string>
    139134     */
    140135    public function getFallbackDirs()
     
    144139
    145140    /**
    146      * @return array[]
    147      * @psalm-return array<string, string>
     141     * @return list<string>
    148142     */
    149143    public function getFallbackDirsPsr4()
     
    153147
    154148    /**
    155      * @return string[] Array of classname => path
    156      * @psalm-return array<string, string>
     149     * @return array<string, string> Array of classname => path
    157150     */
    158151    public function getClassMap()
     
    162155
    163156    /**
    164      * @param string[] $classMap Class to filename map
    165      * @psalm-param array<string, string> $classMap
     157     * @param array<string, string> $classMap Class to filename map
    166158     *
    167159     * @return void
     
    180172     * appending or prepending to the ones previously set for this prefix.
    181173     *
    182      * @param string          $prefix  The prefix
    183      * @param string[]|string $paths   The PSR-0 root directories
    184      * @param bool            $prepend Whether to prepend the directories
     174     * @param string              $prefix  The prefix
     175     * @param list<string>|string $paths   The PSR-0 root directories
     176     * @param bool                $prepend Whether to prepend the directories
    185177     *
    186178     * @return void
     
    188180    public function add($prefix, $paths, $prepend = false)
    189181    {
     182        $paths = (array) $paths;
    190183        if (!$prefix) {
    191184            if ($prepend) {
    192185                $this->fallbackDirsPsr0 = array_merge(
    193                     (array) $paths,
     186                    $paths,
    194187                    $this->fallbackDirsPsr0
    195188                );
     
    197190                $this->fallbackDirsPsr0 = array_merge(
    198191                    $this->fallbackDirsPsr0,
    199                     (array) $paths
     192                    $paths
    200193                );
    201194            }
     
    206199        $first = $prefix[0];
    207200        if (!isset($this->prefixesPsr0[$first][$prefix])) {
    208             $this->prefixesPsr0[$first][$prefix] = (array) $paths;
     201            $this->prefixesPsr0[$first][$prefix] = $paths;
    209202
    210203            return;
     
    212205        if ($prepend) {
    213206            $this->prefixesPsr0[$first][$prefix] = array_merge(
    214                 (array) $paths,
     207                $paths,
    215208                $this->prefixesPsr0[$first][$prefix]
    216209            );
     
    218211            $this->prefixesPsr0[$first][$prefix] = array_merge(
    219212                $this->prefixesPsr0[$first][$prefix],
    220                 (array) $paths
     213                $paths
    221214            );
    222215        }
     
    227220     * appending or prepending to the ones previously set for this namespace.
    228221     *
    229      * @param string          $prefix  The prefix/namespace, with trailing '\\'
    230      * @param string[]|string $paths   The PSR-4 base directories
    231      * @param bool            $prepend Whether to prepend the directories
     222     * @param string              $prefix  The prefix/namespace, with trailing '\\'
     223     * @param list<string>|string $paths   The PSR-4 base directories
     224     * @param bool                $prepend Whether to prepend the directories
    232225     *
    233226     * @throws \InvalidArgumentException
     
    237230    public function addPsr4($prefix, $paths, $prepend = false)
    238231    {
     232        $paths = (array) $paths;
    239233        if (!$prefix) {
    240234            // Register directories for the root namespace.
    241235            if ($prepend) {
    242236                $this->fallbackDirsPsr4 = array_merge(
    243                     (array) $paths,
     237                    $paths,
    244238                    $this->fallbackDirsPsr4
    245239                );
     
    247241                $this->fallbackDirsPsr4 = array_merge(
    248242                    $this->fallbackDirsPsr4,
    249                     (array) $paths
     243                    $paths
    250244                );
    251245            }
     
    257251            }
    258252            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
    259             $this->prefixDirsPsr4[$prefix] = (array) $paths;
     253            $this->prefixDirsPsr4[$prefix] = $paths;
    260254        } elseif ($prepend) {
    261255            // Prepend directories for an already registered namespace.
    262256            $this->prefixDirsPsr4[$prefix] = array_merge(
    263                 (array) $paths,
     257                $paths,
    264258                $this->prefixDirsPsr4[$prefix]
    265259            );
     
    268262            $this->prefixDirsPsr4[$prefix] = array_merge(
    269263                $this->prefixDirsPsr4[$prefix],
    270                 (array) $paths
     264                $paths
    271265            );
    272266        }
     
    277271     * replacing any others previously set for this prefix.
    278272     *
    279      * @param string          $prefix The prefix
    280      * @param string[]|string $paths  The PSR-0 base directories
     273     * @param string              $prefix The prefix
     274     * @param list<string>|string $paths  The PSR-0 base directories
    281275     *
    282276     * @return void
     
    295289     * replacing any others previously set for this namespace.
    296290     *
    297      * @param string          $prefix The prefix/namespace, with trailing '\\'
    298      * @param string[]|string $paths  The PSR-4 base directories
     291     * @param string              $prefix The prefix/namespace, with trailing '\\'
     292     * @param list<string>|string $paths  The PSR-4 base directories
    299293     *
    300294     * @throws \InvalidArgumentException
     
    482476
    483477    /**
    484      * Returns the currently registered loaders indexed by their corresponding vendor directories.
    485      *
    486      * @return self[]
     478     * Returns the currently registered loaders keyed by their corresponding vendor directories.
     479     *
     480     * @return array<string, self>
    487481     */
    488482    public static function getRegisteredLoaders()
  • another-simple-image-optimizer/trunk/vendor/composer/installed.json

    r2947386 r2995411  
    5656        {
    5757            "name": "spatie/image-optimizer",
    58             "version": "1.7.1",
    59             "version_normalized": "1.7.1.0",
     58            "version": "1.7.2",
     59            "version_normalized": "1.7.2.0",
    6060            "source": {
    6161                "type": "git",
    6262                "url": "https://github.com/spatie/image-optimizer.git",
    63                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30"
     63                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1"
    6464            },
    6565            "dist": {
    6666                "type": "zip",
    67                 "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
    68                 "reference": "af179994e2d2413e4b3ba2d348d06b4eaddbeb30",
     67                "url": "https://api.github.com/repos/spatie/image-optimizer/zipball/62f7463483d1bd975f6f06025d89d42a29608fe1",
     68                "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1",
    6969                "shasum": ""
    7070            },
     
    7373                "php": "^7.3|^8.0",
    7474                "psr/log": "^1.0 | ^2.0 | ^3.0",
    75                 "symfony/process": "^4.2|^5.0|^6.0"
     75                "symfony/process": "^4.2|^5.0|^6.0|^7.0"
    7676            },
    7777            "require-dev": {
    7878                "pestphp/pest": "^1.21",
    7979                "phpunit/phpunit": "^8.5.21|^9.4.4",
    80                 "symfony/var-dumper": "^4.2|^5.0|^6.0"
     80                "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
    8181            },
    82             "time": "2023-07-27T07:57:32+00:00",
     82            "time": "2023-11-03T10:08:02+00:00",
    8383            "type": "library",
    8484            "installation-source": "dist",
     
    108108            "support": {
    109109                "issues": "https://github.com/spatie/image-optimizer/issues",
    110                 "source": "https://github.com/spatie/image-optimizer/tree/1.7.1"
     110                "source": "https://github.com/spatie/image-optimizer/tree/1.7.2"
    111111            },
    112112            "install-path": "../spatie/image-optimizer"
     
    114114        {
    115115            "name": "symfony/process",
    116             "version": "v6.3.2",
    117             "version_normalized": "6.3.2.0",
     116            "version": "v6.3.4",
     117            "version_normalized": "6.3.4.0",
    118118            "source": {
    119119                "type": "git",
    120120                "url": "https://github.com/symfony/process.git",
    121                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"
     121                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54"
    122122            },
    123123            "dist": {
    124124                "type": "zip",
    125                 "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
    126                 "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d",
     125                "url": "https://api.github.com/repos/symfony/process/zipball/0b5c29118f2e980d455d2e34a5659f4579847c54",
     126                "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54",
    127127                "shasum": ""
    128128            },
     
    130130                "php": ">=8.1"
    131131            },
    132             "time": "2023-07-12T16:00:22+00:00",
     132            "time": "2023-08-07T10:39:22+00:00",
    133133            "type": "library",
    134134            "installation-source": "dist",
     
    158158            "homepage": "https://symfony.com",
    159159            "support": {
    160                 "source": "https://github.com/symfony/process/tree/v6.3.2"
     160                "source": "https://github.com/symfony/process/tree/v6.3.4"
    161161            },
    162162            "funding": [
  • another-simple-image-optimizer/trunk/vendor/composer/installed.php

    r2947386 r2995411  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => '995d8979fd8d8e9d037a27ac604d4b71990cff7b',
     6        'reference' => '525fbbace498d44701468b27a6c9559645db5f39',
    77        'type' => 'wordpress-plugin',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-main',
    2424            'version' => 'dev-main',
    25             'reference' => '995d8979fd8d8e9d037a27ac604d4b71990cff7b',
     25            'reference' => '525fbbace498d44701468b27a6c9559645db5f39',
    2626            'type' => 'wordpress-plugin',
    2727            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'spatie/image-optimizer' => array(
    32             'pretty_version' => '1.7.1',
    33             'version' => '1.7.1.0',
    34             'reference' => 'af179994e2d2413e4b3ba2d348d06b4eaddbeb30',
     32            'pretty_version' => '1.7.2',
     33            'version' => '1.7.2.0',
     34            'reference' => '62f7463483d1bd975f6f06025d89d42a29608fe1',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../spatie/image-optimizer',
     
    3939        ),
    4040        'symfony/process' => array(
    41             'pretty_version' => 'v6.3.2',
    42             'version' => '6.3.2.0',
    43             'reference' => 'c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d',
     41            'pretty_version' => 'v6.3.4',
     42            'version' => '6.3.4.0',
     43            'reference' => '0b5c29118f2e980d455d2e34a5659f4579847c54',
    4444            'type' => 'library',
    4545            'install_path' => __DIR__ . '/../symfony/process',
  • another-simple-image-optimizer/trunk/vendor/spatie/image-optimizer/CHANGELOG.md

    r2947386 r2995411  
    22
    33All notable changes to `image-optimizer` will be documented in this file
     4
     5## 1.7.1 - 2023-07-27
     6
     7### What's Changed
     8
     9- libavif version note by @0xb4lint in https://github.com/spatie/image-optimizer/pull/199
     10
     11**Full Changelog**: https://github.com/spatie/image-optimizer/compare/1.7.0...1.7.1
    412
    513## 1.7.0 - 2023-07-22
  • another-simple-image-optimizer/trunk/vendor/spatie/image-optimizer/composer.json

    r2903959 r2995411  
    2020        "ext-fileinfo": "*",
    2121        "psr/log": "^1.0 | ^2.0 | ^3.0",
    22         "symfony/process": "^4.2|^5.0|^6.0"
     22        "symfony/process": "^4.2|^5.0|^6.0|^7.0"
    2323    },
    2424    "require-dev": {
    2525        "pestphp/pest": "^1.21",
    2626        "phpunit/phpunit": "^8.5.21|^9.4.4",
    27         "symfony/var-dumper": "^4.2|^5.0|^6.0"
     27        "symfony/var-dumper": "^4.2|^5.0|^6.0|^7.0"
    2828    },
    2929    "autoload": {
  • another-simple-image-optimizer/trunk/vendor/symfony/process/Process.php

    r2947386 r2995411  
    329329            // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input
    330330            $commandline = '{ ('.$commandline.') <&3 3<&- 3>/dev/null & } 3<&0;';
    331             $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code';
     331            $commandline .= 'pid=$!; echo $pid >&3; wait $pid 2>/dev/null; code=$?; echo $code >&3; exit $code';
    332332
    333333            // Workaround for the bug, when PTS functionality is enabled.
Note: See TracChangeset for help on using the changeset viewer.