Skip to content

Unserialize a SebastianBergmann\CodeCoverage\CodeCoverage object from a different format #874

Open
@meeuw

Description

@meeuw

From: #872 (comment)

It should be possible to unserialize a SebastianBergmann\CodeCoverage\CodeCoverage object from a different format (like JSON). This could be useful when you want to analyze code coverage aquired by a different way than using SebastianBergmann\CodeCoverage\CodeCoverage.

At this moment it's only possible create a SebastianBergmann\CodeCoverage\CodeCoverage object by using a SebastianBergmann\CodeCoverage\Driver\Driver or by unserialize()-ing.

I'm not sure if it's possible to change the signature of the SebastianBergmann\CodeCoverage\CodeCoverage constructor (by removing or making the driver argument optional). It seems that it's part of the API contract.

Another solutions would be to create a Driverless SebastianBergmann\CodeCoverage\CodeCoverage class which is used by CodeCoverage (by using inheritance or composition).

It might also be possible to inject data in the serialized string and unserialize() a SebastianBergmann\CodeCoverage\CodeCoverage object from that (ieck!).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions