GithubHelp home page GithubHelp logo

Comments (6)

grasmash avatar grasmash commented on August 26, 2024

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.

grasmash avatar grasmash commented on August 26, 2024

Looks like the cause is...
https://github.com/acquia/cli/blob/master/bin/acli#L91-L100

from cli.

danepowell avatar danepowell commented on August 26, 2024

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.

grasmash avatar grasmash commented on August 26, 2024

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.

grasmash avatar grasmash commented on August 26, 2024

This is the quick solution: #170

from cli.

grasmash avatar grasmash commented on August 26, 2024

This is still an issue, though the error is a lot less scary now:
image

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.