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

Illegal use of server 3rdparty (symfony/event-dispatcher) #710

Closed
nickvergessen opened this issue May 31, 2023 · 5 comments · Fixed by #811
Closed

Illegal use of server 3rdparty (symfony/event-dispatcher) #710

nickvergessen opened this issue May 31, 2023 · 5 comments · Fixed by #811
Labels
bug Something isn't working needs info technical debt

Comments

@nickvergessen
Copy link
Member

This app is directly using classes of the symfony/event-dispatcher package in server. Please migrate to the official OCP wrappers.

@nickvergessen nickvergessen added the bug Something isn't working label May 31, 2023
@nickvergessen nickvergessen changed the title Illegal use of server 3rdparty (symfony/event-dispatcher) Illegal use of server 3rdparty (symfony/event-dispatcher) May 31, 2023
@mejo-
Copy link
Member

mejo- commented Jun 5, 2023

Thanks for raising this @nickvergessen.

In CacheListener.php this is pretty straight-forward. Just replace Symfony\Component\EventDispatcher\EventDispatcher with OCP\EventDispatcher\IEventDispatcher.

But in Versions/CollectiveVersionsExpireManager.php I'm not sure about the solution. new User() expects Symfony\Component\EventDispatcher\EventDispatcherInterface as argument, and IEventDispatcher doesn't provide that.

mejo- added a commit that referenced this issue Jun 5, 2023
mejo- added a commit that referenced this issue Jun 5, 2023
mejo- added a commit that referenced this issue Jun 5, 2023
@nickvergessen
Copy link
Member Author

Might be needed that server is modified before this. But not entirely sure.

@max-nextcloud
Copy link
Collaborator

Thanks for raising this @nickvergessen.

In CacheListener.php this is pretty straight-forward. Just replace Symfony\Component\EventDispatcher\EventDispatcher with OCP\EventDispatcher\IEventDispatcher.

But in Versions/CollectiveVersionsExpireManager.php I'm not sure about the solution. new User() expects Symfony\Component\EventDispatcher\EventDispatcherInterface as argument, and IEventDispatcher doesn't provide that.

Are both these cases covered with the PR that closed the issue?

@nickvergessen
Copy link
Member Author

But in Versions/CollectiveVersionsExpireManager.php I'm not sure about the solution. new User() expects Symfony\Component\EventDispatcher\EventDispatcherInterface as argument, and IEventDispatcher doesn't provide that.

nextcloud/server#39595 has you covered... Or well that creates the problem for you. But now you can give it IEventDispatcher.

@max-nextcloud
Copy link
Collaborator

Checked in with jonas and the two aspects were addressed separately - one with the commits listed above on Jun 5 and the linked PR above just addressed what was left afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs info technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants