Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Event Laravel Package

sabre/event

Lightweight PHP library for event-driven development: EventEmitter, promises, an event loop, and coroutines. Designed for building asynchronous, event-based applications. Documentation at sabre.io/event. Requires PHP 7.1.

View on GitHub
Deep Wiki
Context7
6.0.1

6.0.1 (2024-09-06)

As well as a few fixes to edge-case code flow, there are quite a lot of enhancements to the phpdoc parameter and return type declarations. You may find that code analysis tools like phpstan now find different things when you update to 6.0.1

5.1.7

5.1.7 (2024-08-27)

  • #132 allow php-cs-fixer major version 3 (@phil-davis)

The code changes are just code-style applied by the newer php-cs-fixer. There are no actual bug fixes, and no change to behavior.

5.1.6

5.1.6 (2024-07-26)

5.1.5

5.1.5 (2024-07-25)

  • #125 PHPdoc, CI and test changes to bring 5.1 up to PHP 8.3 (@phil-davis)
  • #126 PHP 8.4 compliance (@phil-davis)
6.0.0

6.0.0 (2022-08-29)

Major version 6 implements type declarations for input parameters, function returns, variables etc. It supports PHP 7.4 and PHP 8. When you upgrade to major version 6, if you extend classes etc., then you will need to make similar type declarations in your code.

5.1.4

5.1.4 (2021-11-04)

  • #93 version bump that was missed in 5.1.3 (@phil-davis)
5.1.3

Release 5.1.3 (2021-11-04)

  • #88 Pass null to $microseconds for null $seconds ( @TysonAndre )
5.1.2

5.1.2 (2020-10-03)

5.1.1

5.1.1 (2020-09-19)

5.1.0

5.1.0 (2020-01-31)

5.0.3
  • Dropped remaining hhvm leftovers.
  • #55: Fixed typo in WildcardEmitterTrait (@SamMousa)
  • #54: export-ignore examples & tests in distribution (@staabm)
5.0.2
  • #50: Fixed Promise\all to resolve immediately for empty arrays (@MadHed)
  • #48, #49: Performance optimisations for EmitterTrait and WildcardEmitterTrait (@lunixyacht).
5.0.1
  • #45: Fixed Emitter class to use the correct interface. (@felixfbecker).
5.0.0
  • #42: The coroutine function now supports return in the passed generator function. This allows you to more generally return a value. This is a BC break as this is a feature that was only made possible with PHP 7, and before the coroutine function would only ever return the last thing that was yielded. If you depended on that feature, replace your last yield with a return.
4.0.0
  • sabre/event now requires PHP 7. If you need PHP 5.5 support, just keep using 3.0.0.
  • PHP 7 type hints are now used everywhere. We're also using strict_types.
  • Support for a new WildcardEmitter which allows you to listen for events using the * wildcard.
  • Removed deprecated functions Promise::error and Promise::all. Instead, use Promise::otherwise and Promise\all().
  • EventEmitter, EventEmitterTrait and EventEmitterInterface are now just called Emitter, EmitterTrait, and EmitterInterface.
  • When rejecting Promises, it's now required to use an Exception or Throwable. This makes the typical case simpler and reduces special cases.
3.0.0
  • Now requires PHP 5.5!
  • Promise::all() is moved to Promise\all().
  • Aside from the Promise\all() function, there's now also Promise\race().
  • Promise\reject() and Promise\resolve() have also been added.
  • Now 100% compatible with the Ecmascript 6 Promise.

Also contains all the changes from the previous alpha:

  • #26: Added an event loop implementation. Also knows as the Reactor Pattern.
  • Renamed Promise::error to Promise::otherwise to be consistent with ReactPHP and Guzzle. The error method is kept for BC but will be removed in a future version.
  • #27: Support for Promise-based coroutines via the Sabre\Event\coroutine function.
  • BC Break: Promises now use the EventLoop to run "then"-events in a separate execution context. In practise that means you need to run the event loop to wait for any then/otherwise callbacks to trigger.
  • Promises now have a wait() method. Allowing you to make a promise synchronous and simply wait for a result (or exception) to happen.
3.0.0-alpha1
  • This package now requires PHP 5.5.
  • #26: Added an event loop implementation. Also knows as the Reactor Pattern.
  • Renamed Promise::error to Promise::otherwise to be consistent with ReactPHP and Guzzle. The error method is kept for BC but will be removed in a future version.
  • #27: Support for Promise-based coroutines via the Sabre\Event\coroutine function.
  • BC Break: Promises now use the EventLoop to run "then"-events in a separate execution context. In practise that means you need to run the event loop to wait for any then/otherwise callbacks to trigger.
  • Promises now have a wait() method. Allowing you to make a promise synchronous and simply wait for a result (or exception) to happen.
2.0.2
  • This release has no functional changes. It's just been brought up to date with the latest coding standards.
2.0.1
  • Fixed: $priority was ignored in EventEmitter::once method.
  • Fixed: Breaking the event chain was not possible in EventEmitter::once.
2.0.0
  • Added: When calling emit, it's now possible to specify a callback that will be triggered after each method handled. This is dubbed the 'continueCallback' and can be used to implement strategy patterns.
  • Added: Promise object!
  • Changed: EventEmitter::listeners now returns just the callbacks for an event, and no longer returns the list by reference. The list is now automatically sorted by priority.
  • Update: Speed improvements.
  • Updated: It's now possible to remove all listeners for every event.
  • Changed: Now uses psr-4 autoloading.
1.0.1
  • hhvm compatible!
  • Fixed: Issue #4. Compatiblitiy for PHP < 5.4.14.
1.0.0
  • Added: removeListener, removeAllListeners
  • Added: once, to only listen to an event emitting once.
  • Added README.md.
0.0.1
  • First version!
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4