Skip to content

Conversation

@jeremycr
Copy link

Hello everyone,

I've done some work on the upgrade for Ibexa 5.

  • Fixed routing
  • Replaced facets with aggregations
  • Fixed controller services declaration
  • Replaced the old performAccessChecks call by the new RestrictedControllerInterface

I've added the bundle on a fresh Ibexa 5 OSS install and everything seems functional.

abstract: true
calls:
- [performAccessChecks, []]
_defaults:
Copy link
Member

Choose a reason for hiding this comment

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

I don't like using autowiring in vendor libraries. I believe autowiring is a great fit for custom project code, but not for something that goes into vendor.

Can you rewrite this not to use autowiring and autoconfiguration?

Copy link
Author

Choose a reason for hiding this comment

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

I've removed autoconfigure.

Symfony have made it an absolute pain to use AbstractController without using autowiring for its service locator. And it's not possible to just use the full service container either, as AbstractController relies on the service aliases from its locator.

So it's either using autowiring, declaring your own service locator, or rewriting controllers to not extend AbstractController.

Let's just leave autowiring on for controllers. All the arguments are still explicitly declared.

@@ -1,8 +1,10 @@
services:
_defaults:
Copy link
Member

Choose a reason for hiding this comment

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

Same remark here about wiring as above.

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