Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add app termination #169

Closed
emargareten opened this issue Jun 9, 2022 · 18 comments
Closed

Add app termination #169

emargareten opened this issue Jun 9, 2022 · 18 comments
Labels
feature request A requested feature - unsure when and if it will be built in.

Comments

@emargareten
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Some events only dispatch after app terminated / object destruction

Describe the solution you'd like
Add a simple $app->terminate() (or $kernal->terminate($input???, $status???)) in tinker_run.php after execution.

@emargareten emargareten added the feature request A requested feature - unsure when and if it will be built in. label Jun 9, 2022
@Roboroads
Copy link
Owner

Does normal tinker do this?

@emargareten
Copy link
Contributor Author

normal tinker never ends

@laserhybiz
Copy link

This is one of the stuff I hate in tinker, sometimes I have to manually call __destruct for things to work.

Also see https://github.com/laravel/telescope/issues?q=terminate+tinker

@Roboroads
Copy link
Owner

Roboroads commented Jun 9, 2022

Normal tinker stops when you type "q" or "exit" - if that does what you want it to do, then the latest update (2.3.4) will do exactly that.

If not: I can add an option to the settings to enable termination or not, since I try to mimic actual tinker as close as possible.

@emargareten
Copy link
Contributor Author

q and exit throws the BreakException I don't think it terminates the application.

@Roboroads
Copy link
Owner

Laravel Tinker-2.4.0.zip
Does this work? (Turn it on in the tinker project settings)

@emargareten
Copy link
Contributor Author

@Roboroads does this zip include the latest changes? I'm still using 2022.1

@Roboroads
Copy link
Owner

@emargareten This zip contains #170

@emargareten
Copy link
Contributor Author

Can I use it with 2022.1

@Roboroads
Copy link
Owner

Yes but docker interpreters won't work

@emargareten
Copy link
Contributor Author

@Roboroads works great 👍

I did notice that without that setting I get an additional Exit: Tinker execution finished. in the output

@Roboroads
Copy link
Owner

Roboroads commented Jun 9, 2022

Laravel Tinker-2.4.0.zip
With this one too?

I try to make sure there is no extra => null and Exit: *****

@emargareten
Copy link
Contributor Author

emargareten commented Jun 9, 2022

no, now it's fine.
but.. now I see dump() doesn't work, not sure which change caused it

@Roboroads
Copy link
Owner

image
I don't have this issue

@emargareten
Copy link
Contributor Author

@Roboroads It does work, I think you can go ahead with this.

I do have another issue I think it started in version 2.3.4, sometimes the output displays only partially or doesn't display at all. (I might have had this issue on rare occasions before but now it happens like 50% of the time)

@Roboroads
Copy link
Owner

Maybe you should create a new issue for that problem and see if other people have the same problem since I don't have it it and need a way to reproduce it to be able to fix it 🥲

@Roboroads
Copy link
Owner

Will be in 2.4.0

@Roboroads
Copy link
Owner

2.4.0 will be available this week after JB accepts it, which includes this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A requested feature - unsure when and if it will be built in.
Projects
None yet
Development

No branches or pull requests

3 participants