Comments (6)
This seems relevant: https://github.com/humbug/phar-updater/blob/master/README.md#avoid-post-update-file-includes
Avoid Post Update File Includes
Updating a currently running phar is made trickier since, once replaced, attempts to load files from it within a process originating from an older phar is likely to create an internal corruption of phar error. For example, if you're using Symfony Console and have created an event dispatcher for your commands, the lazy loading of some event classes will have this impact.
The solution is to disable or remove the dispatcher for your self-update command.
In general, when writing your self-update CLI commands, either pre-load any classes likely needed prior to updating, or disable their loading if not essential.
from cli.
Looks like the cause is...
https://github.com/acquia/cli/blob/master/bin/acli#L91-L100
from cli.
Right now we only use the Event Dispatcher to catch exceptions from Cloud API so it should be safe to disable as part of the self-update command... although, I don't know how to do that exactly.
Just a shot in the dark, but maybe within UpdateCommand::execute()
add $this->getApplication()->setDispatcher(NULL);
from cli.
I'd like to move the Event Listener to a service or transform it into an Event Subscriber. https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-subscriber
I can't seem to get the events to fire methods correctly.
If we do that, I think it's easier to recognize the command that was run and skip it.
from cli.
This is the quick solution: #170
from cli.
This is still an issue, though the error is a lot less scary now:
Updated from v1.0.0-beta8 to v1.0.0-rc1
Parse error: syntax error, unexpected end of file in phar:///usr/local/bin/acli/vendor/symfony/console/Event/ConsoleErrorEvent.php on line 79
from cli.
Related Issues (20)
- CLI-1219: API key labels should be based on the account email address
- CLI-1225: The pull:database command fails silently if pv is not installed.
- CLI-1231: phpspec/prophecy 1.18 breaks tests
- CLI-1235: Unable to connect to local database using credentials mysql://drupal:drupal@localhost/drupal. HOT 3
- CLI-1252: [New Command] To allow encrypt the text like Acquia Pipeline do HOT 1
- CLI-1259: test issue
- CLI-1265: Ability to specify port for push:database and pull:database
- CLI-1267: Need help on to resolve acli auth:login issue in azure devops HOT 2
- CLI-1271: Fix XDG Base Dir implementation
- CLI-1274: BLT replace with Acquia cli push artifacts issue HOT 3
- CLI-1276: JSON format break: Notice: Composer script `post-acli-api-applications-list` does not exist in `composer.json`, skipping. This is not an error. HOT 5
- CLI-1279: Test priority support ticket
- CLI-1280: Test priority support ticket HOT 1
- CLI-1296: `auth:login` on 2.23.1 > Invalid key in Cloud datastore HOT 6
- CLI-1308: Make acli push:artifact independent of a cloud account HOT 6
- CLI-1318: Test issue
- CLI-1332: acli app:new:from:drupal7 crashes on cPanel environment with "stream_get_contents(): Argument #1 ($stream) must be of type resource, bool given" on HOT 3
- CLI-1346: DDEV + WSL2 Local Development Database Import Error HOT 2
- CLI-1344: [push:artifact] support pushing to master
- CLI-1359: test
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.