Skip to content

Remove callback support for hooks #5228

Closed

Description

@mickhansen
No description provided.

Activity

  1. added
    breaking change
    on Jan 15, 2016
  2. added this to the 4.0 milestone on Jan 15, 2016
  3. overlookmotel commented on Jan 17, 2016

    @overlookmotel
    Contributor

    I don't see any major reason not to remove support as the rest of the Sequelize API uses promises. But, on the other hand, I don't see a major advantage to removing them. Promisifying a callback-based hook function only happens once when the hook is created and after that there is no performance cost.

    I only use promises myself, so it doesn't affect me anyway!

  4. mickhansen commented on Jan 17, 2016

    @mickhansen
    ContributorAuthor

    Nothing is set in stone yet, however i don't see much point in keeping code around that we don't advertise. And i don't see why we would have one part of the API support callbacks when the rest doesn't, that just seems odd. Would also allow us to remove the current callback guessing code.

  5. manchicken commented on May 23, 2016

    @manchicken
    Contributor

    Would this include things like model hooks?

  6. overlookmotel commented on May 24, 2016

    @overlookmotel
    Contributor

    @manchicken Yes, this would apply to all hooks.

    But to be clear, no hooks will be disappearing. Just that writing hooks as a function which then calls a callback to finish will no longer be supported - your hook functions just have to return a promise.

  7. felixfbecker commented on May 28, 2016

    @felixfbecker
    Contributor

    This happened in #5924

  8. janmeier commented on May 30, 2016

    @janmeier
    Member

    Cool, I'll ammend the changelog then :)

  9. mickhansen commented on May 30, 2016

    @mickhansen
    ContributorAuthor

    I'd like to double check this and verify we have tests for non-bluebird promises aswell as ensuring that the code is cleaned up as much as possible.

  10. self-assigned this
    on May 30, 2016
  11. added a commit that references this issue on Jul 22, 2016
    364b6df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

breaking change

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions