If I try to use a simple Phar call in my controller:
$tar = new \PharData('/path/to/myTar.tar');
I get the error:
"Unexpected file extension"
This is because Drupal Security checks to see if the file extension contains "phar", and rejects it if not. Unfortunately, the Phar library needs the extension to be ".tar" otherwise it won't work.
As a test, I disabled the security check, but it still didn't work:
TYPO3\PharStreamWrapper\Exception: Expected invocation could not be resolved
I've tested this on the same server outside of the Drupal environment and it worked fine. Has anybody had any success using Phar in Drupal 8?