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

Remove operation dependency #45

Open
apotonick opened this issue Mar 2, 2023 · 1 comment
Open

Remove operation dependency #45

apotonick opened this issue Mar 2, 2023 · 1 comment
Assignees

Comments

@apotonick
Copy link
Member

The dependency to trailblazer-operation is not necessary. Steps to remove it

  1. Deprecate Result objects in all Policy() classes. I don't think anyone uses it. Use Activity::Deprecate.warn for the actual warning https://trailblazer.to/2.1/docs/internals#internals-core-developer-deprecate
  2. Convert all tests from Operation to Activity::Railway and autoconvert.
  3. Use <%= code_tabs %> for docs to show both versions. https://trailblazer.to/2.1/docs/internals#internals-core-developer-convert-operation-test
@yogeshjain999
Copy link
Member

@apotonick Regarding 1st point, we actually use success? in controller to raise Pundit::NotAuthorizedError or pass around additional data.

I added lightweight replacement for Result in Policy for now, but let me know your thoughts!

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

No branches or pull requests

2 participants