Skip to content

Fix opis/closure v4 compatibility in OpisClosureSerializer#69

Merged
jrbasso merged 3 commits into
masterfrom
copilot/fix-ci-closure-serializer-error
Feb 19, 2026
Merged

Fix opis/closure v4 compatibility in OpisClosureSerializer#69
jrbasso merged 3 commits into
masterfrom
copilot/fix-ci-closure-serializer-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 19, 2026

opis/closure v4 made SerializableClosure::__construct() private and replaced the wrapping pattern with standalone namespace functions, breaking serialization for all consumers of OpisClosureSerializer.

Changes

  • OpisClosureSerializer.php: Use \Opis\Closure\serialize() / \Opis\Closure\unserialize() when available (v4), falling back to the v3 SerializableClosure wrapping approach for backward compatibility:
// v4
if (function_exists('Opis\Closure\serialize')) {
    return \Opis\Closure\serialize($closure);
}
// v3 fallback
return serialize(new OpisSerializableClosure($closure));
  • composer.json: Tightened require-dev constraint for opis/closure from * to ^3.0 || ^4.0.

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/opis/closure/zipball/4836788ab123b955a0bbf31f7d4468dd3db825fa
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/2RBZdF /usr/bin/composer install --prefer-dist --no-progress (http block)
  • https://api.github.com/repos/sebastianbergmann/global-state/zipball/3be331570a721f9a4b5917f4209773de17f747d7
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
  • https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/f5b498e631a74204185071eb41f33f38d64608aa
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
  • https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/6e1a43b411b2ad34146dee7524cb13a068bb35f9
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
  • https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/f6458abbf32a6c8174f8f26261475dc133b3d9dc
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
  • https://api.github.com/repos/sebastianbergmann/type/zipball/f77d2d4e78738c98d9a68d2596fe5e8fa380f449
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
  • https://api.github.com/repos/sebastianbergmann/version/zipball/c687e3387b99f5b03b6caa64c74b63e2936ff874
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)
  • https://api.github.com/repos/staabm/side-effects-detector/zipball/d8334211a140ce329c13726d4a715adbddd0a163
    • Triggering command: /usr/bin/php8.3 /usr/bin/php8.3 -n -c /tmp/kLR1Du /usr/bin/composer require opis/closure --dev (http block)

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


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 19, 2026 15:16
Co-authored-by: jrbasso <26548+jrbasso@users.noreply.github.com>
Co-authored-by: jrbasso <26548+jrbasso@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error in ClosureSerializer during CI Fix opis/closure v4 compatibility in OpisClosureSerializer Feb 19, 2026
Copilot AI requested a review from jrbasso February 19, 2026 15:19
@jrbasso jrbasso marked this pull request as ready for review February 19, 2026 15:21
@jrbasso jrbasso merged commit 16205b0 into master Feb 19, 2026
16 checks passed
@jrbasso jrbasso deleted the copilot/fix-ci-closure-serializer-error branch February 19, 2026 15:31
@jrbasso jrbasso mentioned this pull request Feb 19, 2026
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