Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.
This repository was archived by the owner on May 19, 2021. It is now read-only.

Support executing archives without Phar extension #4

@clue

Description

@clue

Phar archives can be executed without the Phar extension [1]: For this to work, it needs a special stub file that extract the phar archive and runs its contents from a temporary directory if no phar extension is found.

Phar::createDefaultStub() creates one such special stub (around 7KiB code).
I've created a gist that shows its usage and indented(!) output: https://gist.github.com/clue/5642099

As such, it would be nice if such a loader stub would could be provided by the StubGenerator. Instead of rewriting the phar parser (see Extract_Phar class in the above gist), one can probably re-use the result from createDefaultStub() similar to this. Special care needs to be taken with regards to the other settings on StubGenerator.

Any input welcome!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions