Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization of Closure is not allowed Exception thrown when using new in constructor (PHP 8.1 feature) #273

Closed
patrickkusebauch opened this issue Dec 9, 2021 · 1 comment

Comments

@patrickkusebauch
Copy link

Version: 3.0.11

Bug Description

Serialization of Closure is not allowed Exception thrown when using new in constructor (PHP 8.1 feature).

Caused by return md5(serialize($hash)); from DependencyChecker.php:165

Screenshot from 2021-12-09 21-55-55

Steps To Reproduce

Write and register class with constructor like this:

    public function __construct(
        $clientCredentials,
        ?SignatureInterface $signature = null,
        private GuzzleHttpClient $httpClient = new GuzzleHttpClient()
    ) {}

Expected Behavior

Successfully compile DI container.

@dg
Copy link
Member

dg commented Dec 11, 2021

Fixed

@dg dg closed this as completed Dec 11, 2021
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

No branches or pull requests

2 participants