Git Product home page Git Product logo

event-dispatcher's Introduction

Website ๐Ÿš€ contributte.org | Contact ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป f3l1x.io | Twitter ๐Ÿฆ @contributte

Usage

To install the latest version of contributte/event-dispatcher use Composer.

composer require contributte/event-dispatcher

Documentation

For details on how to use this package, check out our documentation.

Versions

State Version Branch Nette PHP
dev ^0.10 master 3.1+ >=8.1
stable ^0.9 master 3.1+ >=8.1

Development

See how to contribute to this package.

This package is currently maintaining by these authors.


Consider to support contributte development team. Also thank you for using this package.

event-dispatcher's People

Contributors

dakorpar avatar enumag avatar f3l1x avatar jiripudil avatar mabar avatar pavelkovar avatar petrparolek avatar rattuscz avatar solcik avatar vody105 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

event-dispatcher's Issues

Nette bridges

The documentation says something about event-application-bridge and event-security-bridge. However the repository for the second one is empty.

Can you fix the documentation? It is confusing.

Nette v3 support

Service latte.latteFactory: Nette\DI\Definitions\FactoryDefinition::addSetup() is deprecated, use ->getResultDefinition()->addSetup()

What is the plan in regards of versions of this package against Nette v2 vs v3? This package does not have a dependency on nette/di, so this change would break it for nette v2.

Dispatcher is not set when used with Kdyby\Console

Hi guys,

in Kdyby\Console\DI\ConsoleExtension there is:

$sfDispatcher = $builder->getByType(EventDispatcherInterface::class) ?: 'events.symfonyProxy';
if ($builder->hasDefinition($sfDispatcher) && $builder->getDefinition($sfDispatcher)->getClass() === EventDispatcherInterface::class) {
	$app->addSetup('setDispatcher');
}

and this part

$builder->getDefinition($sfDispatcher)->getClass() === EventDispatcherInterface::class

is not true.

I suggest to mention it in readme in Compatibility part. Or am I doing something wrong?

Multiple services of type Symfony\Component\EventDispatcher\EventDispatcherInterface found

Hi, after replacing symplify/symfony-event-dispatcher with contributte/event-dispatcher i am getting following error:
Nette\DI\ServiceCreationException: Multiple services of type Symfony\Component\EventDispatcher\EventDispatcherInterface found: events.symfonyProxy, _21.dispatcher

It is because i am using Kdyby/Events in my project and it registers symfony event dispatcher as well.

This problem was already solved in symplify https://github.com/DeprecatedPackages/SymfonyEventDispatcher/blob/master/src/Adapter/Nette/DI/SymfonyEventDispatcherExtension.php#L42

Do you plan to fix it? Or any other tips how to get rid of Kdyby/Events? ๐Ÿ˜„

Thank you

New version

Can I ask for new tag? Current stable does not allow SF4.

Tracy error

Hi, i tried new debug panel and get this error.

Error: Cannot use object of type Contributte\EventDispatcher\LazyListener as array in /app/vendor/contributte/event-dispatcher/src/Tracy/templates/panel.phtml:72

I am using very simple subscriber

    public static function getSubscribedEvents(): array
    {
        return [
            ContactSent::class => 'contactSent',
        ];
    }

Feature suggestion: subscribe to all events with "*"

Proposal

I've been thinking about potentially useful feature to subscribe to multiple events at once.

Something like this:
public function getSubscribedEvents() { return [ '*' => 'processEvent' ]; }

Eventually, the events can be subscribed by namespace/regular:
public function getSubscribedEvents() { return [ 'order.*' => 'processOrderEvent' ]; }

Can this be simply achieved through the Symfony events core?

Use case (example)

I am working on a large scale ERP system with many services and models and currently I am implementing "newsfeed" feature which will create records by various events of the services and models. So far I need to create subscriber line for every event separately. Feature like this can simplify this approach a lot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.