Skip to content

Remove deprecated imagedestroy() usage causing PHPStan failure#3

Merged
shazeedul merged 2 commits into
mainfrom
copilot/remove-imagedestroy-function
May 10, 2026
Merged

Remove deprecated imagedestroy() usage causing PHPStan failure#3
shazeedul merged 2 commits into
mainfrom
copilot/remove-imagedestroy-function

Conversation

Copilot AI commented May 10, 2026

Copy link
Copy Markdown
Contributor

PHPStan fails on current CI due to a deprecated GD cleanup call: imagedestroy(). This PR removes deprecated usage and adds a guard to prevent reintroduction.

  • Renderer update

    • Removed the deprecated imagedestroy($image) call from GdRenderer::render().
    • Keeps image generation flow unchanged while relying on modern PHP object lifecycle for GD cleanup.
  • Static architecture guard

    • Extended tests/ArchTest.php with a rule that forbids imagedestroy usage in the codebase.
// before
imagepng($image);
$contents = ob_get_clean();
imagedestroy($image);

// after
imagepng($image);
$contents = ob_get_clean();

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/CarbonPHP/carbon/zipball/e890471a3494740f7d9326d72ce6a8c559ffee60
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/PHP-DI/Invoker/zipball/3c1ddfdef181431fbc4be83378f6d036d59e81e1
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/PHP-DI/PHP-DI/zipball/f88054cc052e40dbe7b383c8817c19442d480352
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/bobthecow/psysh/zipball/3be75d5b9244936dd4ac62ade2bfb004d13acf0f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/brick/math/zipball/63422359a44b7f06cae63c3b429b59e8efcc0629
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/composer/pcre/zipball/b2bed4734f0cc156ee1fe9c0da2550420d99a21e
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/composer/semver/zipball/198166618906cb2de69b95d7d47e5fa8aa1b2b95
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/doctrine/inflector/zipball/6d6c96277ea252fc1304627204c3d5e6e15faa3b
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/dragonmantank/cron-expression/zipball/d61a8a9604ec1f8c3d150d09db6ce98b32675013
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/egulias/EmailValidator/zipball/d42c8731f0624ad6bdc8d3e5e9a4524f68801cfa
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/filp/whoops/zipball/d2102955e48b9fd9ab24280a7ad12ed552752c4d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/fruitcake/php-cors/zipball/38aaa6c3fd4c157ffe2a4d10aa8b9b16ba8de379
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/guzzle/psr7/zipball/7d0ed42f28e42d61352a7a79de682e5e67fec884
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/guzzle/uri-template/zipball/4f4bbd4e7172148801e76e3decc1e559bdee34e1
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/iamcal/SQLParser/zipball/610392f38de49a44dab08dc1659960a29874c4b8
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/larastan/larastan/zipball/9ad17e83e96b63536cb6ac39c3d40d29ff9cf636
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/laravel/framework/zipball/6172ae1f44ba5d89e111057ee4a4e7c27f5a610d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/laravel/pail/zipball/aa71a01c309e7f66bc2ec4fb1a59291b82eb4abf
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/laravel/pint/zipball/0770e9b7fafd50d4586881d456d6eb41c9247a80
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/laravel/prompts/zipball/6a82ac19a28b916ae0885828795dbd4c59d9a818
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/laravel/serializable-closure/zipball/b566ee0dd251f3c4078bed003a7ce015f5ea6dce
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/laravel/tinker/zipball/c9f80cc835649b5c1842898fb043f8cc098dd741
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/nette/schema/zipball/f0ab1a3cda782dbc5da270d28545236aa80c4002
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/nette/utils/zipball/bb3ea637e3d131d72acc033cfc2746ee893349fe
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/nunomaduro/collision/zipball/716af8f95a470e9094cfca09ed897b023be191a5
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/nunomaduro/termwind/zipball/712a31b768f5daea284c2169a7d227031001b9a8
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/orchestral/canvas-core/zipball/11fdb579f4f2d4bd68a22bd206cabc32e7856e32
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/orchestral/canvas/zipball/7ac2f2d58f05b8fc4ef1fe673cbdab7603023729
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/orchestral/sidekick/zipball/267a71b56cb2fe1a634d69fc99889c671b77ff43
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/orchestral/testbench-core/zipball/6b88b608ba794fcac18094c7d191591c852c286d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/orchestral/testbench/zipball/d73b4426dacddd2c1f5e671e0efd7665b16d2b84
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/orchestral/workbench/zipball/bb5025efd9ea83610b87b3287956d90170b464e6
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/paratestphp/paratest/zipball/81c80677c9ec0ed4ef16b246167f11dec81a6e3d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/3fb0d02a91b9da504b139dc7ab2a31efb7c3215c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/pestphp/pest-plugin-laravel/zipball/3057a36669ff11416cc0dc2b521b3aec58c488d0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/pestphp/pest-plugin-mutate/zipball/d9b32b60b2385e1688a68cc227594738ec26d96c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/pestphp/pest-plugin-profanity/zipball/343cfa6f3564b7e35df0ebb77b7fa97039f72b27
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/pestphp/pest-plugin/zipball/9d4b93d7f73d3f9c3189bb22c220fef271cdf568
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/pestphp/pest/zipball/2fc75cfcf03c041c804778fa894282234adc3c66
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7bae67520aa9f5ecc506d646810bd40d9da54582
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpstan/phpstan-deprecation-rules/zipball/6b5571001a7f04fa0422254c30a0017ec2f2cacc
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/6ab598e1bc106e6827fd346ae4a12b4a5d634c32
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/phpstan/phpstan/zipball/8be50c3992107dc837b17da4d140fbbdf9a5c5bd
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/CskKw1 /usr/bin/composer install --no-interaction --prefer-source '/home/REDACTED/.cgit /usr/lib/git-correv-parse -dispatcher.git git conf�� en e/git nfig/composer/vendor/bin/git --git-dir git .git git (http block)
  • https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/ramsey/collection/zipball/344572933ad0181accbf4ba763e85a0306a8c5e2
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/ramsey/uuid/zipball/8429c78ca35a09f27565311b98101e2826affde0
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/comparator/zipball/c769009dee98f494e0edc3fd4f4087501688f11e
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/complexity/zipball/bad4316aba5303d0221f43f8cee37eb58d384bbb
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/environment/zipball/b121608b28a13f721e76ffbbd386d08eff58f3f6
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/ef1377171613d09edd25b7816f05be8313f9115d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1effe8e9b8e068e9ae228e542d5d11b5d16db894
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/4bfa827c969c98be1e527abd576533293c634f6a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/876099a072646c7745f673d7aeab5382c4439691
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/12b54e689b07a25a9b41e57736dfab6ec9ae5406
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/php-timer/zipball/f258ce36aa457f3aa3339f9ed4c81fc66dc8c2cc
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d75dd30597caa80e72fad2ef7904601a30ef1046
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/0b01998a7d5b1f122911a66bebcb8d46f0c82d8c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/spatie/backtrace/zipball/8ffe78be5ed355b5009e3dd989d183433e9a5adc
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/spatie/laravel-package-tools/zipball/0d097bce95b2bf6802fb1d83e1e753b0f5a948e7
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/spatie/laravel-ray/zipball/85137a6ea1d3ecd5ad3adcb43512fff9a5529e72
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/spatie/macroable/zipball/2967f69810ba4df158391665c0850010b9d1507c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/spatie/ray/zipball/974ac9c6e315033ab8ace883d60e094522f88ede
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/clock/zipball/674fa3b98e21531dd040e613479f5f6fa8f32111
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/console/zipball/d7d2b64a45a89d607865927b176fa51c33ddbb58
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/css-selector/zipball/b75663ed96cf4756e28e3105476f220f92886cc4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/error-handler/zipball/8dd79d8af777ee6cba2fd4d98da6ffb839f3c0fa
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/event-dispatcher/zipball/e4a2e29753c7801f7a8340e066cfa788f3bc8101
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/finder/zipball/e0be088d22278583a82da281886e8c3592fbf149
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/http-foundation/zipball/9381209597ec66c25be154cbf2289076e64d1eab
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/http-kernel/zipball/23486f59234c6fd6e8f1bec97124f3829d686627
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/mailer/zipball/f6ea532250b476bfc1b56699b388a1bdbf168f62
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/mime/zipball/2d550c4758ba4c47519a6667c36553d535705b0c
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-iconv/zipball/2c5729fd241b4b22f6e4b436bc3354a4f262df57
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/4864388bfbd3001ce88e234fab652acd91fdc57e
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/symfony/polyfill-php80/zipball/dfb55726c3a76ea3b6459fcfda1ec2d80a682411
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-php83/zipball/3600c2cb22399e25bb226e4a135ce91eeb2a6149
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-php84/zipball/88486db2c389b290bf87ff1de7ebc1e13e42bb06
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-php85/zipball/fcfa4973a9917cef23f2e38774da74a2b7d115ee
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/polyfill-uuid/zipball/26dfec253c4cf3e51b541b52ddf7e42cb0908e94
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/process/zipball/60f19cd3badc8de688421e21e4305eba50f8089a
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/YpaUdj /usr/bin/composer install --no-interaction --prefer-dist (http block)
  • https://api.github.com/repos/symfony/routing/zipball/287771d8bc86eacb30678dd10eda6c64a859951f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/stopwatch/zipball/70a852d72fec4d51efb1f48dcd968efcaf5ccb89
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/string/zipball/114ac57257d75df748eda23dd003878080b8e688
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/translation-contracts/zipball/0ab302977a952b42fd51475c4ebac81f8da0a95d
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/translation/zipball/ada7578c30dd5feaa8259cff3e885069ea81ddde
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/uid/zipball/2676b524340abcfe4d6151ec698463cebafee439
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/var-dumper/zipball/9510c3966f749a1d1ff0059e1eabef6cc621e7fd
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/symfony/yaml/zipball/c660d6538545a3e8e65a5621ee3d7a6d352892c7
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/1248f3f506ca9641d4f68cebcd538fa489754db8
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/commonmark/zipball/59fb075d2101740c337c7216e3f32b36c204218b
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/flysystem/zipball/570b8871e0ce693764434b29154c54b434905350
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/uri-interfaces/zipball/85d5c77c5d6d3af6c54db4a78246364908f3c928
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/thephpleague/uri/zipball/08cf38e3924d4f56238125547b5720496fac8fd4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/theseer/tokenizer/zipball/7989e43bf381af0eac72e4f0ca5bcbfa81658be4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/f0292ccf0ec75843d65027214426b6b163b48b41
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/voku/portable-ascii/zipball/8e1051fe39379367aecf014f41744ce7539a856f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/webmozarts/assert/zipball/eb0d790f735ba6cff25c683a85a1da0eadeff9e4
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/zbateson/mail-mime-parser/zipball/3db681988a48fdffdba551dcc6b2f4c2da574540
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/zbateson/mb-wrapper/zipball/f0ee6af2712e92e52ee2552588cd69d21ab3363f
    • Triggering command: REDACTED, pid is -1 (http block)
  • https://api.github.com/repos/zbateson/stream-decorators/zipball/0c0e79a8c960055c0e2710357098eedc07e6697a
    • Triggering command: REDACTED, pid is -1 (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Your CI job failed due to a PHPStan error: 'Call to deprecated function imagedestroy()'. The solution requires removing or updating usage of imagedestroy() in the codebase. Remove all calls to imagedestroy() from the code, unless an alternative or required resource cleanup is needed for your PHP version. Test to ensure PHPStan now passes and no further deprecated function calls remain. Do not affect unrelated functionality.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for failing job 75206718922. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant: The job failed due to a PHPStan error: Call to deprecated function imagedestroy(). To resolve this:

  • Locate and update any usage of imagedestroy() in your codebase, likely in your src directory.
  • If imagedestroy() is not essential, remove the call.
  • If image resource cleanup is necessary, replace imagedestroy() with a modern or recommended PHP equivalent, or use proper resource handling for your PHP version.

Example fix (removing the deprecated function):

// Before
imagedestroy($image);

// After
// imagedestroy() removed, ensure $image is handled appropriately if needed.

After making this change, push your update to rerun the workflow. If needed, review PHP’s documentation for alternative resource cleanup methods.

User: fix it

Assistant: I am preparing a pull request to remove or update the usage of the deprecated imagedestroy() function in your codebase to resolve the PHPStan CI failure. Once the PR is created, you can review, test, and merge it to fix the issue.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Remove deprecated imagedestroy() function calls Remove deprecated imagedestroy() usage causing PHPStan failure May 10, 2026
Copilot AI requested a review from shazeedul May 10, 2026 05:37
@shazeedul shazeedul marked this pull request as ready for review May 10, 2026 05:41
@shazeedul shazeedul merged commit fc4f107 into main May 10, 2026
51 checks passed
@shazeedul shazeedul deleted the copilot/remove-imagedestroy-function branch May 10, 2026 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants