Skip to content

Serialization error when using a cache #82

@mnapoli

Description

@mnapoli

When defining a ValueDefinition with

$container->set('foo', $var);

ValueDefinition::isCacheable() will return false if $var is an object.

However, if $var is an array containing unserializable objects, PHP-DI will try to serialize it (and thus an exception will be thrown).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions