Skip to content

Child Processes - feedback #54

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

Conversation

gwleuverink
Copy link
Contributor

No description provided.

@gwleuverink gwleuverink mentioned this pull request Oct 31, 2024
@gwleuverink gwleuverink changed the title add php & artisan processes Child Processes - feedback Oct 31, 2024
Comment on lines 297 to 311
use Illuminate\Support\Facades\Event;
use Native\Laravel\Events\ChildProcess\MessageReceived;

/**
* Bootstrap any application services.
*/
public function boot(): void
{
Event::listen(MessageReceived::class, function(MessageReceived $event) {
if ($event->alias === 'tail') {
//
}
});
}

Copy link
Contributor Author

@gwleuverink gwleuverink Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the protected $listen example in favour for Event::listen in the app service provider.

Since Laravel 11 the property approach was removed from the docs. Having two examples that do the same thing right next to each other seemed confusing to me

@gwleuverink
Copy link
Contributor Author

Ready for review @simonhamp

@simonhamp simonhamp merged commit 64ee046 into NativePHP:feature/child-processes Nov 1, 2024
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