Generated __sleep method handles static properties as members.
The __sleep method generated by \TYPO3\FLOW3\Object\DependencyInjection\ProxyClassBuilder::buildSerializeRelatedEntitiesCode tries to handle "static" properties.
Since "$this->property" throws an exception where self::$property should be used, the PhpSession::close() method catches an Exception "SplObjectStorage::serialize() must return a string or NULL".
I would suggest to treat static properties as transient by default.
No data to display