Skip to content

Return correct exit code on exceptions #163

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

Closed

Conversation

LachlanArthur
Copy link

This PR modifies the behaviour of the --execute option to have it return an exit code of 1 when an exception is thrown.

Currently all exceptions are caught and rendered by Psysh internally, which makes it difficult to determine whether the command succeeded.

@taylorotwell taylorotwell marked this pull request as draft April 5, 2023 15:27
@GrahamCampbell
Copy link
Member

This should be targeted to 3.x, since it is breaking. We could take the opportunity to drop old PHP versions there (not in this PR), and then make tinker 3.x the default in Laravel 11.

@GrahamCampbell
Copy link
Member

GrahamCampbell commented Jul 7, 2023

I was thinking something like:

        "php": "^8.1",
        "illuminate/console": "^10.0|^11.0",
        "illuminate/contracts": "^10.0|^11.0",
        "illuminate/support": "^10.0|^11.0",
        "psy/psysh": "^0.11.18",
        "symfony/var-dumper": "^6.2|^7.0"

for 3.x, so Laravel 10 users can still upgrade early if they want.

@driesvints driesvints marked this pull request as ready for review July 7, 2023 08:40
@taylorotwell
Copy link
Member

@GrahamCampbell can you help us with this then?

@GrahamCampbell
Copy link
Member

Sure. I can sync up with you and Dries in slack over the next few days.

@driesvints
Copy link
Member

@LachlanArthur feel free to send this to master 👍

@LachlanArthur LachlanArthur deleted the feat/execute-exit-code branch July 10, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants