protected function addFile(File $file, $path, $stripBin = false) { $this->output->writeln(' <info>*</info> Add php file ' . $path); $content = $file->getContents(); if ($stripBin) { $content = preg_replace('~^#!/usr/bin/env php\\s*~', '', $content); $content = str_replace('BundlerPackCommand', 'UpdateCommand', $content); } $this->phar->addFromString($path, $content); }