Commit Graph

36 Commits (master)

Author SHA1 Message Date
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 week ago
Maxence Lange 2232753b99 add hasListeners()
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
4 months ago
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
6 months ago
Joas Schilling b9e2f494a1
chore!: Remove legacy SymfonyAdapter
Signed-off-by: Joas Schilling <coding@schilljs.com>
10 months ago
Joas Schilling 19a0425aeb
fix(eventdispatcher): Don't use all evaluating "or"
Signed-off-by: Joas Schilling <coding@schilljs.com>
12 months ago
Robin Appelman d9fa7b1e28
emit an event when a message is logged
Signed-off-by: Robin Appelman <robin@icewind.nl>
12 months ago
Joas Schilling 6d076c1ee9
fix(dispatcher): Migrate to OCP event dispatcher before symfony/event-dispatcher upgrade
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 year ago
Christoph Wurst ce71aa9acb
fix(events): Log deprecated events as debug, not info
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 year ago
Côme Chilliet f5c361cf44
composer run cs:fix
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet 1809386862
Fix codestyle
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 6be7aa112f
Migrate from ILogger to LoggerInterface in lib/private
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Côme Chilliet 113756db30
Fix ArrayAccess and JsonSerializable return types
First round of modifications for PHP 8.1

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
3 years ago
Christoph Wurst a6a31bb419
Clarify that lazy event listeners are built from the server container
Ref https://github.com/nextcloud/server/issues/27793

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Christoph Wurst abc61a9f63
Fix the legacy dispatcher argument order
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst f6ddda8dad
Test the symfony adapter
To prevent regression in the future.

And make sure we always return an object …

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst 91e1707498
Log deprecation notice of GenericEventWrapper just once
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst 85454ac456
Use the Symfony dispatcher correctly
* Event object as first arg (otherwise there is a notice in the logs)
* `dispatch` MUST return the event object

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling 51fbcb0801
Use PSR Logger in event dispatcher
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst 2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst b9a911f0b3
Deprecate the internal Symfony dispatcher adapter
This type is not known on the public API, yet we should make sure that
any usage of this class is noticed and migrated as soon as possible.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling c76fa60571
Don't break event listeners with the GenericEventWrapper
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst 5e1805d253
Fix missing parent constructor call and get_class usage in GenericEventWrapper
* The parent constructor was not called
* `get_class` does not allow null values in php7.2+

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma 4dacbbd66d
Log usage of a deprecated event instead of emitting
This way we can track down what is being used and migrate them over. And
slowly kill the old way in a release or 2.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Joas Schilling 3ffed42925
Allow to remove listeners
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Christoph Wurst d180a98714
Make it possible to broadcast events to (web) clients
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Arthur Schiwon e8095cf737
use OCP\EventDispatcher\Event over Symfony's deprecated Event
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
5 years ago
blizzz ac48a9ba61
Merge pull request #17106 from nextcloud/feature/dispatch-typed-event
Add Symfony inspired typed event dispatcher method
5 years ago
Christoph Wurst b9e14d5972
Add Symfony inspired typed event dispatcher method
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Christoph Wurst 222b458280
Use the new Symfony event dispatcher signature
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago
Christoph Wurst 3174012adf Add event dispatcher to OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
5 years ago