---
title: "opis/closure 4.0.0 Breaking Changes on Packagist | Since.dev"
description: "What each opis/closure release removed, renamed or changed: 37 breaking changes in 1 version on Packagist, each with its source."
canonical_url: https://since.dev/packages/packagist/opis/closure
last_updated: 2026-12-04
---

# opis/closure breaking changes

opis/closure 4.0.0 (December 28, 2024) is its newest release with breaking changes, 37 of them. The first: Removed Opis\\Closure\\Analyzer. Every breaking API change we have recorded in opis/closure on Packagist: 37 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.5.0`, released March 5, 2026. MIT license. [Source repository](https://github.com/opis/closure)

Packages on Packagist run on PHP. [PHP end of life dates](https://since.dev/calendar/php.md).

## opis/closure 4.0.0 breaking changes

opis/closure 4.0.0, released December 28, 2024: 37 breaking changes.

- **Removed** `Opis\Closure\Analyzer`  

Opis\\Closure\\Analyzer was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ISecurityProvider`  

Opis\\Closure\\ISecurityProvider was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$classes`  

Opis\\Closure\\ReflectionClosure::$classes was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$code`  

Opis\\Closure\\ReflectionClosure::$code was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$constants`  

Opis\\Closure\\ReflectionClosure::$constants was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$files`  

Opis\\Closure\\ReflectionClosure::$files was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$functions`  

Opis\\Closure\\ReflectionClosure::$functions was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$hashedName`  

Opis\\Closure\\ReflectionClosure::$hashedName was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$isBindingRequired`  

Opis\\Closure\\ReflectionClosure::$isBindingRequired was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$isScopeRequired`  

Opis\\Closure\\ReflectionClosure::$isScopeRequired was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$isShortClosure`  

Opis\\Closure\\ReflectionClosure::$isShortClosure was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$isStaticClosure`  

Opis\\Closure\\ReflectionClosure::$isStaticClosure was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$structures`  

Opis\\Closure\\ReflectionClosure::$structures was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$tokens`  

Opis\\Closure\\ReflectionClosure::$tokens was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::$useVariables`  

Opis\\Closure\\ReflectionClosure::$useVariables was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::fetchItems`  

Opis\\Closure\\ReflectionClosure::fetchItems was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getClasses`  

Opis\\Closure\\ReflectionClosure::getClasses was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getCode`  

Opis\\Closure\\ReflectionClosure::getCode was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getConstants`  

Opis\\Closure\\ReflectionClosure::getConstants was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getFileTokens`  

Opis\\Closure\\ReflectionClosure::getFileTokens was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getFunctions`  

Opis\\Closure\\ReflectionClosure::getFunctions was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getHashedFileName`  

Opis\\Closure\\ReflectionClosure::getHashedFileName was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getStructures`  

Opis\\Closure\\ReflectionClosure::getStructures was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::getTokens`  

Opis\\Closure\\ReflectionClosure::getTokens was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::isBindingRequired`  

Opis\\Closure\\ReflectionClosure::isBindingRequired was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::isScopeRequired`  

Opis\\Closure\\ReflectionClosure::isScopeRequired was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::isShortClosure`  

Opis\\Closure\\ReflectionClosure::isShortClosure was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\ReflectionClosure::isStatic`  

Opis\\Closure\\ReflectionClosure::isStatic was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\SecurityException`  

Opis\\Closure\\SecurityException was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\SecurityProvider`  

Opis\\Closure\\SecurityProvider was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Removed** `Opis\Closure\SerializableClosure`  

Opis\\Closure\\SerializableClosure was removed in opis/closure 4.0.0 [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Behavior changed**  

The library was fully rewritten, so existing code may behave differently or need updates. Review your usage against the 4.0.0 documentation before upgrading. [github.com](https://github.com/opis/closure/releases/tag/4.0.0)
- **Signature changed** `Opis\Closure\ReflectionClosure`  

Was class ReflectionClosure extends ReflectionFunction; now final class ReflectionClosure extends ReflectionFunction. [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Signature changed** `Opis\Closure\ReflectionClosure::__construct`  

Was public function \_\_construct(Closure $closure, $code = null); now public function \_\_construct(Closure $closure). [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Signature changed** `Opis\Closure\ReflectionClosure::getUseVariables`  

Was public function getUseVariables(); now public function getUseVariables(): array. [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Signature changed** `Opis\Closure\serialize`  

Was function serialize($data); now function serialize(mixed $data, ?Security\\SecurityProviderInterface $security = null): string. [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)
- **Signature changed** `Opis\Closure\unserialize`  

Was function unserialize($data, $options = null); now function unserialize(string $data, Security\\SecurityProviderInterface|array|null $security = null, ?array $options = null): mixed. [packagist.org](https://packagist.org/packages/opis/closure#4.0.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
