Closed pjcdawkins closed 8 years ago
Another colleague (@damz) has pointed out that it's more likely to be a phar problem - PHP misreading files that have been swapped out under it - so it can be better solved by replacing the file atomically (temporary file, then rename()
, instead of copy()
).
@pjcdawkins: Thanks for reporting the issue and the tip, I will take a look at this.
@pjcdawkins: I did apply your hacky solution at the slef-update command.
This issue seem to be solve at #1118. So I'm closing it.
A colleague (@joshmiller83) mentioned a problem after
self-update
- errors relating to ConsoleTerminateEvent.I case it helps - I just fixed the same problem in the platform.sh CLI with a rather hacky solution: https://github.com/platformsh/platformsh-cli/blob/7a122d3f3226d5e6ed0a0b74803158c51b31ad5e/src/Command/Self/SelfUpdateCommand.php#L72-L77
Maybe you want to borrow that.
Or, an alternative solution might be trying to re-register the new Composer autoloader - maybe just
require 'phar://console.phar/vendor/autoload.php';
would do it.