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

[11.x] Add stringable output to ProcessResult #52857

Open
wants to merge 1 commit into
base: 11.x
Choose a base branch
from

Conversation

nuernbergerA
Copy link
Contributor

Hey

im pretty sure @aarondfrancis can tell you why this is cool.


Unfortunately PendingResult isn't macroable but i think its a common thing to work with the output as a stringable.

Currently you need to write this

Str::of(Process::run('ls -l')->output())->match('/some regex/');

With this PR it would be

Process::run('ls -l')->stringable()->match('/some regex/');

alternative API

Process::run('ls -l')->output(stringable: true)->match('/some regex/');

Cheers
Adrian

@nuernbergerA nuernbergerA changed the title [11.x] Add stringable output to PendingResult [11.x] Add stringable output to ProcessResult Sep 19, 2024
@aarondfrancis
Copy link
Contributor

No opinions on the implementation, but I do really want this feature! 😍

Also, damn @nuernbergerA you're so fast!

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.

2 participants