split
Parts
shared.phar is made up of three parts:
- stub.php (the
Canonic_Autoloaderitself) - autoload.map.php (generated classmap using
return array(...);) - autoload.update.php (containing
Canonic_Classmapet al)
The stub is prepared to be extracted, just needs ranaming to autoload.php simply. And the other two scripts just ought to neighbor it in the same directory.
Using 7z
Extracting from the default zip-phar is easiest with 7z. It lists the individual components as follows:
2014-02-11 03:03:12 ..... 7086 2457 .phar/stub.php
2014-02-01 18:45:42 ..... 1672 459 autoload.map.php
2014-02-02 23:20:22 ..... 16317 5232 autoload.update.php
2098-01-01 01:00:00 ..... 28 28 .phar/signature.bin
Just move the stub.php out of the hidden directory, rename it.
Using phar
phar list -f shared.phar will not show the stub, but just the two member scripts:
|-phar://shared.phar/autoload.map.php
\-phar://shared.phar/autoload.update.php
Subsequently to extract everything you need:
phar extract -f shared.phar
And
phar get-stub -f shared.phar -s autoload.php
For the stub.
Using empir
empir is more useful to convert shared.phar from the default ZIP format into a plain php-only wrapped PHAR or a TAR if you prefer.