Changeset 2995411
- Timestamp:
- 11/13/2023 07:22:49 PM (2 years ago)
- Location:
- another-simple-image-optimizer
- Files:
-
- 6 added
- 24 edited
- 1 copied
-
tags/0.2.1 (copied) (copied from another-simple-image-optimizer/trunk)
-
tags/0.2.1/AnotherSimpleImageOptimizer.php (modified) (4 diffs)
-
tags/0.2.1/CHANGELOG.md (modified) (1 diff)
-
tags/0.2.1/README.md (modified) (2 diffs)
-
tags/0.2.1/composer.lock (modified) (6 diffs)
-
tags/0.2.1/optimizer-config (added)
-
tags/0.2.1/optimizer-config/svgo2.config.js (added)
-
tags/0.2.1/optimizer-config/svgo3.config.js (added)
-
tags/0.2.1/plugin.php (modified) (2 diffs)
-
tags/0.2.1/readme.txt (modified) (2 diffs)
-
tags/0.2.1/vendor/composer/ClassLoader.php (modified) (24 diffs)
-
tags/0.2.1/vendor/composer/installed.json (modified) (6 diffs)
-
tags/0.2.1/vendor/composer/installed.php (modified) (4 diffs)
-
tags/0.2.1/vendor/spatie/image-optimizer/CHANGELOG.md (modified) (1 diff)
-
tags/0.2.1/vendor/spatie/image-optimizer/composer.json (modified) (1 diff)
-
tags/0.2.1/vendor/symfony/process/Process.php (modified) (1 diff)
-
trunk/AnotherSimpleImageOptimizer.php (modified) (4 diffs)
-
trunk/CHANGELOG.md (modified) (1 diff)
-
trunk/README.md (modified) (2 diffs)
-
trunk/composer.lock (modified) (6 diffs)
-
trunk/optimizer-config (added)
-
trunk/optimizer-config/svgo2.config.js (added)
-
trunk/optimizer-config/svgo3.config.js (added)
-
trunk/plugin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/vendor/composer/ClassLoader.php (modified) (24 diffs)
-
trunk/vendor/composer/installed.json (modified) (6 diffs)
-
trunk/vendor/composer/installed.php (modified) (4 diffs)
-
trunk/vendor/spatie/image-optimizer/CHANGELOG.md (modified) (1 diff)
-
trunk/vendor/spatie/image-optimizer/composer.json (modified) (1 diff)
-
trunk/vendor/symfony/process/Process.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
another-simple-image-optimizer/tags/0.2.1/AnotherSimpleImageOptimizer.php
r2947386 r2995411 1 1 <?php 2 2 3 use Spatie\ImageOptimizer\OptimizerChainFactory;4 3 use Symfony\Component\Process\Process; 4 5 use Spatie\ImageOptimizer\OptimizerChain; 6 use Spatie\ImageOptimizer\Optimizers\Avifenc; 7 use Spatie\ImageOptimizer\Optimizers\Cwebp; 8 use Spatie\ImageOptimizer\Optimizers\Gifsicle; 9 use Spatie\ImageOptimizer\Optimizers\Jpegoptim; 10 use Spatie\ImageOptimizer\Optimizers\Optipng; 11 use Spatie\ImageOptimizer\Optimizers\Pngquant; 12 use Spatie\ImageOptimizer\Optimizers\Svgo; 5 13 6 14 class AnotherSimpleImageOptimizer { … … 23 31 24 32 // TODO: add config options 25 $optimizerChain = OptimizerChainFactory::create();33 $optimizerChain = self::createOptimizerChain(); 26 34 $optimizerChain->optimize($file, $outputPath); 27 35 … … 44 52 ]; 45 53 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); 46 61 } 47 62 … … 236 251 } 237 252 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 238 323 } -
another-simple-image-optimizer/tags/0.2.1/CHANGELOG.md
r2947747 r2995411 1 1 # 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) 2 14 3 15 ## 0.2.0 -
another-simple-image-optimizer/tags/0.2.1/README.md
r2947747 r2995411 13 13 14 14 __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`). 15 17 16 18 ## Optimization tools … … 143 145 ## License 144 146 145 MIT 147 Code: MIT, see [LICENSE][6] for more information. 146 148 147 See [LICENSE][6] for more information.149 Images (in `tests/images`): [CC-BY](https://creativecommons.org/licenses/by/4.0/) Raffael Jesche. 148 150 149 151 ## Credits and third party resources -
another-simple-image-optimizer/tags/0.2.1/composer.lock
r2947386 r2995411 59 59 { 60 60 "name": "spatie/image-optimizer", 61 "version": "1.7. 1",61 "version": "1.7.2", 62 62 "source": { 63 63 "type": "git", 64 64 "url": "https://github.com/spatie/image-optimizer.git", 65 "reference": " af179994e2d2413e4b3ba2d348d06b4eaddbeb30"65 "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1" 66 66 }, 67 67 "dist": { 68 68 "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", 71 71 "shasum": "" 72 72 }, … … 75 75 "php": "^7.3|^8.0", 76 76 "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" 78 78 }, 79 79 "require-dev": { 80 80 "pestphp/pest": "^1.21", 81 81 "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" 83 83 }, 84 84 "type": "library", … … 108 108 "support": { 109 109 "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" 111 111 }, 112 "time": "2023- 07-27T07:57:32+00:00"112 "time": "2023-11-03T10:08:02+00:00" 113 113 }, 114 114 { 115 115 "name": "symfony/process", 116 "version": "v6.3. 2",116 "version": "v6.3.4", 117 117 "source": { 118 118 "type": "git", 119 119 "url": "https://github.com/symfony/process.git", 120 "reference": " c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"120 "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" 121 121 }, 122 122 "dist": { 123 123 "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", 126 126 "shasum": "" 127 127 }, … … 155 155 "homepage": "https://symfony.com", 156 156 "support": { 157 "source": "https://github.com/symfony/process/tree/v6.3. 2"157 "source": "https://github.com/symfony/process/tree/v6.3.4" 158 158 }, 159 159 "funding": [ … … 171 171 } 172 172 ], 173 "time": "2023-0 7-12T16:00:22+00:00"173 "time": "2023-08-07T10:39:22+00:00" 174 174 } 175 175 ], … … 185 185 "php": "8.1.21" 186 186 }, 187 "plugin-api-version": "2. 3.0"187 "plugin-api-version": "2.6.0" 188 188 } -
another-simple-image-optimizer/tags/0.2.1/plugin.php
r2947747 r2995411 6 6 * Author: Raffael Jesche 7 7 * Author URI: https://www.rlj.me 8 * Version: 0.2. 08 * Version: 0.2.1 9 9 * License: MIT 10 10 * License URI: https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/LICENSE … … 20 20 * Fires on file uploads or when using wp cli `wp media regenerate` 21 21 */ 22 add_filter('wp_generate_attachment_metadata', ['AnotherSimpleImageOptimizer', 'run']); 22 add_filter('wp_generate_attachment_metadata', [ 23 'AnotherSimpleImageOptimizer', 24 'hook_wp_generate_attachment_metadata' 25 ]); 23 26 24 27 /** -
another-simple-image-optimizer/tags/0.2.1/readme.txt
r2990224 r2995411 5 5 Requires at least: 5.9 6 6 Tested up to: 6.4 7 Stable tag: 0.2. 07 Stable tag: 0.2.1 8 8 Requires PHP: 8.1 9 9 License: MIT … … 26 26 27 27 __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`). 28 30 29 31 For 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 46 46 private static $includeFile; 47 47 48 /** @var ?string*/48 /** @var string|null */ 49 49 private $vendorDir; 50 50 51 51 // PSR-4 52 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 55 54 */ 56 55 private $prefixLengthsPsr4 = array(); 57 56 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 60 58 */ 61 59 private $prefixDirsPsr4 = array(); 62 60 /** 63 * @var array[] 64 * @psalm-var array<string, string> 61 * @var list<string> 65 62 */ 66 63 private $fallbackDirsPsr4 = array(); … … 68 65 // PSR-0 69 66 /** 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>>> 72 72 */ 73 73 private $prefixesPsr0 = array(); 74 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 75 * @var list<string> 77 76 */ 78 77 private $fallbackDirsPsr0 = array(); … … 82 81 83 82 /** 84 * @var string[] 85 * @psalm-var array<string, string> 83 * @var array<string, string> 86 84 */ 87 85 private $classMap = array(); … … 91 89 92 90 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 91 * @var array<string, bool> 95 92 */ 96 93 private $missingClasses = array(); 97 94 98 /** @var ?string*/95 /** @var string|null */ 99 96 private $apcuPrefix; 100 97 101 98 /** 102 * @var self[]99 * @var array<string, self> 103 100 */ 104 101 private static $registeredLoaders = array(); 105 102 106 103 /** 107 * @param ?string$vendorDir104 * @param string|null $vendorDir 108 105 */ 109 106 public function __construct($vendorDir = null) … … 114 111 115 112 /** 116 * @return string[]113 * @return array<string, list<string>> 117 114 */ 118 115 public function getPrefixes() … … 126 123 127 124 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 130 126 */ 131 127 public function getPrefixesPsr4() … … 135 131 136 132 /** 137 * @return array[] 138 * @psalm-return array<string, string> 133 * @return list<string> 139 134 */ 140 135 public function getFallbackDirs() … … 144 139 145 140 /** 146 * @return array[] 147 * @psalm-return array<string, string> 141 * @return list<string> 148 142 */ 149 143 public function getFallbackDirsPsr4() … … 153 147 154 148 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 157 150 */ 158 151 public function getClassMap() … … 162 155 163 156 /** 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 166 158 * 167 159 * @return void … … 180 172 * appending or prepending to the ones previously set for this prefix. 181 173 * 182 * @param string $prefix The prefix183 * @param string[]|string $paths The PSR-0 root directories184 * @param bool $prepend Whether to prepend the directories174 * @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 185 177 * 186 178 * @return void … … 188 180 public function add($prefix, $paths, $prepend = false) 189 181 { 182 $paths = (array) $paths; 190 183 if (!$prefix) { 191 184 if ($prepend) { 192 185 $this->fallbackDirsPsr0 = array_merge( 193 (array)$paths,186 $paths, 194 187 $this->fallbackDirsPsr0 195 188 ); … … 197 190 $this->fallbackDirsPsr0 = array_merge( 198 191 $this->fallbackDirsPsr0, 199 (array)$paths192 $paths 200 193 ); 201 194 } … … 206 199 $first = $prefix[0]; 207 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 208 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 209 202 210 203 return; … … 212 205 if ($prepend) { 213 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 214 (array)$paths,207 $paths, 215 208 $this->prefixesPsr0[$first][$prefix] 216 209 ); … … 218 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 219 212 $this->prefixesPsr0[$first][$prefix], 220 (array)$paths213 $paths 221 214 ); 222 215 } … … 227 220 * appending or prepending to the ones previously set for this namespace. 228 221 * 229 * @param string $prefix The prefix/namespace, with trailing '\\'230 * @param string[]|string $paths The PSR-4 base directories231 * @param bool $prepend Whether to prepend the directories222 * @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 232 225 * 233 226 * @throws \InvalidArgumentException … … 237 230 public function addPsr4($prefix, $paths, $prepend = false) 238 231 { 232 $paths = (array) $paths; 239 233 if (!$prefix) { 240 234 // Register directories for the root namespace. 241 235 if ($prepend) { 242 236 $this->fallbackDirsPsr4 = array_merge( 243 (array)$paths,237 $paths, 244 238 $this->fallbackDirsPsr4 245 239 ); … … 247 241 $this->fallbackDirsPsr4 = array_merge( 248 242 $this->fallbackDirsPsr4, 249 (array)$paths243 $paths 250 244 ); 251 245 } … … 257 251 } 258 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 259 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 260 254 } elseif ($prepend) { 261 255 // Prepend directories for an already registered namespace. 262 256 $this->prefixDirsPsr4[$prefix] = array_merge( 263 (array)$paths,257 $paths, 264 258 $this->prefixDirsPsr4[$prefix] 265 259 ); … … 268 262 $this->prefixDirsPsr4[$prefix] = array_merge( 269 263 $this->prefixDirsPsr4[$prefix], 270 (array)$paths264 $paths 271 265 ); 272 266 } … … 277 271 * replacing any others previously set for this prefix. 278 272 * 279 * @param string $prefix The prefix280 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 281 275 * 282 276 * @return void … … 295 289 * replacing any others previously set for this namespace. 296 290 * 297 * @param string $prefix The prefix/namespace, with trailing '\\'298 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 299 293 * 300 294 * @throws \InvalidArgumentException … … 482 476 483 477 /** 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> 487 481 */ 488 482 public static function getRegisteredLoaders() -
another-simple-image-optimizer/tags/0.2.1/vendor/composer/installed.json
r2947386 r2995411 56 56 { 57 57 "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", 60 60 "source": { 61 61 "type": "git", 62 62 "url": "https://github.com/spatie/image-optimizer.git", 63 "reference": " af179994e2d2413e4b3ba2d348d06b4eaddbeb30"63 "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1" 64 64 }, 65 65 "dist": { 66 66 "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", 69 69 "shasum": "" 70 70 }, … … 73 73 "php": "^7.3|^8.0", 74 74 "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" 76 76 }, 77 77 "require-dev": { 78 78 "pestphp/pest": "^1.21", 79 79 "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" 81 81 }, 82 "time": "2023- 07-27T07:57:32+00:00",82 "time": "2023-11-03T10:08:02+00:00", 83 83 "type": "library", 84 84 "installation-source": "dist", … … 108 108 "support": { 109 109 "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" 111 111 }, 112 112 "install-path": "../spatie/image-optimizer" … … 114 114 { 115 115 "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", 118 118 "source": { 119 119 "type": "git", 120 120 "url": "https://github.com/symfony/process.git", 121 "reference": " c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"121 "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" 122 122 }, 123 123 "dist": { 124 124 "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", 127 127 "shasum": "" 128 128 }, … … 130 130 "php": ">=8.1" 131 131 }, 132 "time": "2023-0 7-12T16:00:22+00:00",132 "time": "2023-08-07T10:39:22+00:00", 133 133 "type": "library", 134 134 "installation-source": "dist", … … 158 158 "homepage": "https://symfony.com", 159 159 "support": { 160 "source": "https://github.com/symfony/process/tree/v6.3. 2"160 "source": "https://github.com/symfony/process/tree/v6.3.4" 161 161 }, 162 162 "funding": [ -
another-simple-image-optimizer/tags/0.2.1/vendor/composer/installed.php
r2947386 r2995411 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 995d8979fd8d8e9d037a27ac604d4b71990cff7b',6 'reference' => '525fbbace498d44701468b27a6c9559645db5f39', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-main', 24 24 'version' => 'dev-main', 25 'reference' => ' 995d8979fd8d8e9d037a27ac604d4b71990cff7b',25 'reference' => '525fbbace498d44701468b27a6c9559645db5f39', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 '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', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../spatie/image-optimizer', … … 39 39 ), 40 40 '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', 44 44 'type' => 'library', 45 45 'install_path' => __DIR__ . '/../symfony/process', -
another-simple-image-optimizer/tags/0.2.1/vendor/spatie/image-optimizer/CHANGELOG.md
r2947386 r2995411 2 2 3 3 All 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 4 12 5 13 ## 1.7.0 - 2023-07-22 -
another-simple-image-optimizer/tags/0.2.1/vendor/spatie/image-optimizer/composer.json
r2903959 r2995411 20 20 "ext-fileinfo": "*", 21 21 "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" 23 23 }, 24 24 "require-dev": { 25 25 "pestphp/pest": "^1.21", 26 26 "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" 28 28 }, 29 29 "autoload": { -
another-simple-image-optimizer/tags/0.2.1/vendor/symfony/process/Process.php
r2947386 r2995411 329 329 // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input 330 330 $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'; 332 332 333 333 // Workaround for the bug, when PTS functionality is enabled. -
another-simple-image-optimizer/trunk/AnotherSimpleImageOptimizer.php
r2947386 r2995411 1 1 <?php 2 2 3 use Spatie\ImageOptimizer\OptimizerChainFactory;4 3 use Symfony\Component\Process\Process; 4 5 use Spatie\ImageOptimizer\OptimizerChain; 6 use Spatie\ImageOptimizer\Optimizers\Avifenc; 7 use Spatie\ImageOptimizer\Optimizers\Cwebp; 8 use Spatie\ImageOptimizer\Optimizers\Gifsicle; 9 use Spatie\ImageOptimizer\Optimizers\Jpegoptim; 10 use Spatie\ImageOptimizer\Optimizers\Optipng; 11 use Spatie\ImageOptimizer\Optimizers\Pngquant; 12 use Spatie\ImageOptimizer\Optimizers\Svgo; 5 13 6 14 class AnotherSimpleImageOptimizer { … … 23 31 24 32 // TODO: add config options 25 $optimizerChain = OptimizerChainFactory::create();33 $optimizerChain = self::createOptimizerChain(); 26 34 $optimizerChain->optimize($file, $outputPath); 27 35 … … 44 52 ]; 45 53 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); 46 61 } 47 62 … … 236 251 } 237 252 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 238 323 } -
another-simple-image-optimizer/trunk/CHANGELOG.md
r2947747 r2995411 1 1 # 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) 2 14 3 15 ## 0.2.0 -
another-simple-image-optimizer/trunk/README.md
r2947747 r2995411 13 13 14 14 __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`). 15 17 16 18 ## Optimization tools … … 143 145 ## License 144 146 145 MIT 147 Code: MIT, see [LICENSE][6] for more information. 146 148 147 See [LICENSE][6] for more information.149 Images (in `tests/images`): [CC-BY](https://creativecommons.org/licenses/by/4.0/) Raffael Jesche. 148 150 149 151 ## Credits and third party resources -
another-simple-image-optimizer/trunk/composer.lock
r2947386 r2995411 59 59 { 60 60 "name": "spatie/image-optimizer", 61 "version": "1.7. 1",61 "version": "1.7.2", 62 62 "source": { 63 63 "type": "git", 64 64 "url": "https://github.com/spatie/image-optimizer.git", 65 "reference": " af179994e2d2413e4b3ba2d348d06b4eaddbeb30"65 "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1" 66 66 }, 67 67 "dist": { 68 68 "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", 71 71 "shasum": "" 72 72 }, … … 75 75 "php": "^7.3|^8.0", 76 76 "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" 78 78 }, 79 79 "require-dev": { 80 80 "pestphp/pest": "^1.21", 81 81 "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" 83 83 }, 84 84 "type": "library", … … 108 108 "support": { 109 109 "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" 111 111 }, 112 "time": "2023- 07-27T07:57:32+00:00"112 "time": "2023-11-03T10:08:02+00:00" 113 113 }, 114 114 { 115 115 "name": "symfony/process", 116 "version": "v6.3. 2",116 "version": "v6.3.4", 117 117 "source": { 118 118 "type": "git", 119 119 "url": "https://github.com/symfony/process.git", 120 "reference": " c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"120 "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" 121 121 }, 122 122 "dist": { 123 123 "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", 126 126 "shasum": "" 127 127 }, … … 155 155 "homepage": "https://symfony.com", 156 156 "support": { 157 "source": "https://github.com/symfony/process/tree/v6.3. 2"157 "source": "https://github.com/symfony/process/tree/v6.3.4" 158 158 }, 159 159 "funding": [ … … 171 171 } 172 172 ], 173 "time": "2023-0 7-12T16:00:22+00:00"173 "time": "2023-08-07T10:39:22+00:00" 174 174 } 175 175 ], … … 185 185 "php": "8.1.21" 186 186 }, 187 "plugin-api-version": "2. 3.0"187 "plugin-api-version": "2.6.0" 188 188 } -
another-simple-image-optimizer/trunk/plugin.php
r2947747 r2995411 6 6 * Author: Raffael Jesche 7 7 * Author URI: https://www.rlj.me 8 * Version: 0.2. 08 * Version: 0.2.1 9 9 * License: MIT 10 10 * License URI: https://codeberg.org/raffaelj/wordpress-another-simple-image-optimizer/src/branch/main/LICENSE … … 20 20 * Fires on file uploads or when using wp cli `wp media regenerate` 21 21 */ 22 add_filter('wp_generate_attachment_metadata', ['AnotherSimpleImageOptimizer', 'run']); 22 add_filter('wp_generate_attachment_metadata', [ 23 'AnotherSimpleImageOptimizer', 24 'hook_wp_generate_attachment_metadata' 25 ]); 23 26 24 27 /** -
another-simple-image-optimizer/trunk/readme.txt
r2990224 r2995411 5 5 Requires at least: 5.9 6 6 Tested up to: 6.4 7 Stable tag: 0.2. 07 Stable tag: 0.2.1 8 8 Requires PHP: 8.1 9 9 License: MIT … … 26 26 27 27 __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`). 28 30 29 31 For 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 46 46 private static $includeFile; 47 47 48 /** @var ?string*/48 /** @var string|null */ 49 49 private $vendorDir; 50 50 51 51 // PSR-4 52 52 /** 53 * @var array[] 54 * @psalm-var array<string, array<string, int>> 53 * @var array<string, array<string, int>> 55 54 */ 56 55 private $prefixLengthsPsr4 = array(); 57 56 /** 58 * @var array[] 59 * @psalm-var array<string, array<int, string>> 57 * @var array<string, list<string>> 60 58 */ 61 59 private $prefixDirsPsr4 = array(); 62 60 /** 63 * @var array[] 64 * @psalm-var array<string, string> 61 * @var list<string> 65 62 */ 66 63 private $fallbackDirsPsr4 = array(); … … 68 65 // PSR-0 69 66 /** 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>>> 72 72 */ 73 73 private $prefixesPsr0 = array(); 74 74 /** 75 * @var array[] 76 * @psalm-var array<string, string> 75 * @var list<string> 77 76 */ 78 77 private $fallbackDirsPsr0 = array(); … … 82 81 83 82 /** 84 * @var string[] 85 * @psalm-var array<string, string> 83 * @var array<string, string> 86 84 */ 87 85 private $classMap = array(); … … 91 89 92 90 /** 93 * @var bool[] 94 * @psalm-var array<string, bool> 91 * @var array<string, bool> 95 92 */ 96 93 private $missingClasses = array(); 97 94 98 /** @var ?string*/95 /** @var string|null */ 99 96 private $apcuPrefix; 100 97 101 98 /** 102 * @var self[]99 * @var array<string, self> 103 100 */ 104 101 private static $registeredLoaders = array(); 105 102 106 103 /** 107 * @param ?string$vendorDir104 * @param string|null $vendorDir 108 105 */ 109 106 public function __construct($vendorDir = null) … … 114 111 115 112 /** 116 * @return string[]113 * @return array<string, list<string>> 117 114 */ 118 115 public function getPrefixes() … … 126 123 127 124 /** 128 * @return array[] 129 * @psalm-return array<string, array<int, string>> 125 * @return array<string, list<string>> 130 126 */ 131 127 public function getPrefixesPsr4() … … 135 131 136 132 /** 137 * @return array[] 138 * @psalm-return array<string, string> 133 * @return list<string> 139 134 */ 140 135 public function getFallbackDirs() … … 144 139 145 140 /** 146 * @return array[] 147 * @psalm-return array<string, string> 141 * @return list<string> 148 142 */ 149 143 public function getFallbackDirsPsr4() … … 153 147 154 148 /** 155 * @return string[] Array of classname => path 156 * @psalm-return array<string, string> 149 * @return array<string, string> Array of classname => path 157 150 */ 158 151 public function getClassMap() … … 162 155 163 156 /** 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 166 158 * 167 159 * @return void … … 180 172 * appending or prepending to the ones previously set for this prefix. 181 173 * 182 * @param string $prefix The prefix183 * @param string[]|string $paths The PSR-0 root directories184 * @param bool $prepend Whether to prepend the directories174 * @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 185 177 * 186 178 * @return void … … 188 180 public function add($prefix, $paths, $prepend = false) 189 181 { 182 $paths = (array) $paths; 190 183 if (!$prefix) { 191 184 if ($prepend) { 192 185 $this->fallbackDirsPsr0 = array_merge( 193 (array)$paths,186 $paths, 194 187 $this->fallbackDirsPsr0 195 188 ); … … 197 190 $this->fallbackDirsPsr0 = array_merge( 198 191 $this->fallbackDirsPsr0, 199 (array)$paths192 $paths 200 193 ); 201 194 } … … 206 199 $first = $prefix[0]; 207 200 if (!isset($this->prefixesPsr0[$first][$prefix])) { 208 $this->prefixesPsr0[$first][$prefix] = (array)$paths;201 $this->prefixesPsr0[$first][$prefix] = $paths; 209 202 210 203 return; … … 212 205 if ($prepend) { 213 206 $this->prefixesPsr0[$first][$prefix] = array_merge( 214 (array)$paths,207 $paths, 215 208 $this->prefixesPsr0[$first][$prefix] 216 209 ); … … 218 211 $this->prefixesPsr0[$first][$prefix] = array_merge( 219 212 $this->prefixesPsr0[$first][$prefix], 220 (array)$paths213 $paths 221 214 ); 222 215 } … … 227 220 * appending or prepending to the ones previously set for this namespace. 228 221 * 229 * @param string $prefix The prefix/namespace, with trailing '\\'230 * @param string[]|string $paths The PSR-4 base directories231 * @param bool $prepend Whether to prepend the directories222 * @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 232 225 * 233 226 * @throws \InvalidArgumentException … … 237 230 public function addPsr4($prefix, $paths, $prepend = false) 238 231 { 232 $paths = (array) $paths; 239 233 if (!$prefix) { 240 234 // Register directories for the root namespace. 241 235 if ($prepend) { 242 236 $this->fallbackDirsPsr4 = array_merge( 243 (array)$paths,237 $paths, 244 238 $this->fallbackDirsPsr4 245 239 ); … … 247 241 $this->fallbackDirsPsr4 = array_merge( 248 242 $this->fallbackDirsPsr4, 249 (array)$paths243 $paths 250 244 ); 251 245 } … … 257 251 } 258 252 $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; 259 $this->prefixDirsPsr4[$prefix] = (array)$paths;253 $this->prefixDirsPsr4[$prefix] = $paths; 260 254 } elseif ($prepend) { 261 255 // Prepend directories for an already registered namespace. 262 256 $this->prefixDirsPsr4[$prefix] = array_merge( 263 (array)$paths,257 $paths, 264 258 $this->prefixDirsPsr4[$prefix] 265 259 ); … … 268 262 $this->prefixDirsPsr4[$prefix] = array_merge( 269 263 $this->prefixDirsPsr4[$prefix], 270 (array)$paths264 $paths 271 265 ); 272 266 } … … 277 271 * replacing any others previously set for this prefix. 278 272 * 279 * @param string $prefix The prefix280 * @param string[]|string $paths The PSR-0 base directories273 * @param string $prefix The prefix 274 * @param list<string>|string $paths The PSR-0 base directories 281 275 * 282 276 * @return void … … 295 289 * replacing any others previously set for this namespace. 296 290 * 297 * @param string $prefix The prefix/namespace, with trailing '\\'298 * @param string[]|string $paths The PSR-4 base directories291 * @param string $prefix The prefix/namespace, with trailing '\\' 292 * @param list<string>|string $paths The PSR-4 base directories 299 293 * 300 294 * @throws \InvalidArgumentException … … 482 476 483 477 /** 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> 487 481 */ 488 482 public static function getRegisteredLoaders() -
another-simple-image-optimizer/trunk/vendor/composer/installed.json
r2947386 r2995411 56 56 { 57 57 "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", 60 60 "source": { 61 61 "type": "git", 62 62 "url": "https://github.com/spatie/image-optimizer.git", 63 "reference": " af179994e2d2413e4b3ba2d348d06b4eaddbeb30"63 "reference": "62f7463483d1bd975f6f06025d89d42a29608fe1" 64 64 }, 65 65 "dist": { 66 66 "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", 69 69 "shasum": "" 70 70 }, … … 73 73 "php": "^7.3|^8.0", 74 74 "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" 76 76 }, 77 77 "require-dev": { 78 78 "pestphp/pest": "^1.21", 79 79 "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" 81 81 }, 82 "time": "2023- 07-27T07:57:32+00:00",82 "time": "2023-11-03T10:08:02+00:00", 83 83 "type": "library", 84 84 "installation-source": "dist", … … 108 108 "support": { 109 109 "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" 111 111 }, 112 112 "install-path": "../spatie/image-optimizer" … … 114 114 { 115 115 "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", 118 118 "source": { 119 119 "type": "git", 120 120 "url": "https://github.com/symfony/process.git", 121 "reference": " c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d"121 "reference": "0b5c29118f2e980d455d2e34a5659f4579847c54" 122 122 }, 123 123 "dist": { 124 124 "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", 127 127 "shasum": "" 128 128 }, … … 130 130 "php": ">=8.1" 131 131 }, 132 "time": "2023-0 7-12T16:00:22+00:00",132 "time": "2023-08-07T10:39:22+00:00", 133 133 "type": "library", 134 134 "installation-source": "dist", … … 158 158 "homepage": "https://symfony.com", 159 159 "support": { 160 "source": "https://github.com/symfony/process/tree/v6.3. 2"160 "source": "https://github.com/symfony/process/tree/v6.3.4" 161 161 }, 162 162 "funding": [ -
another-simple-image-optimizer/trunk/vendor/composer/installed.php
r2947386 r2995411 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' 995d8979fd8d8e9d037a27ac604d4b71990cff7b',6 'reference' => '525fbbace498d44701468b27a6c9559645db5f39', 7 7 'type' => 'wordpress-plugin', 8 8 'install_path' => __DIR__ . '/../../', … … 23 23 'pretty_version' => 'dev-main', 24 24 'version' => 'dev-main', 25 'reference' => ' 995d8979fd8d8e9d037a27ac604d4b71990cff7b',25 'reference' => '525fbbace498d44701468b27a6c9559645db5f39', 26 26 'type' => 'wordpress-plugin', 27 27 'install_path' => __DIR__ . '/../../', … … 30 30 ), 31 31 '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', 35 35 'type' => 'library', 36 36 'install_path' => __DIR__ . '/../spatie/image-optimizer', … … 39 39 ), 40 40 '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', 44 44 'type' => 'library', 45 45 'install_path' => __DIR__ . '/../symfony/process', -
another-simple-image-optimizer/trunk/vendor/spatie/image-optimizer/CHANGELOG.md
r2947386 r2995411 2 2 3 3 All 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 4 12 5 13 ## 1.7.0 - 2023-07-22 -
another-simple-image-optimizer/trunk/vendor/spatie/image-optimizer/composer.json
r2903959 r2995411 20 20 "ext-fileinfo": "*", 21 21 "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" 23 23 }, 24 24 "require-dev": { 25 25 "pestphp/pest": "^1.21", 26 26 "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" 28 28 }, 29 29 "autoload": { -
another-simple-image-optimizer/trunk/vendor/symfony/process/Process.php
r2947386 r2995411 329 329 // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input 330 330 $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'; 332 332 333 333 // Workaround for the bug, when PTS functionality is enabled.
Note: See TracChangeset
for help on using the changeset viewer.