post-update hooks get picked up if defined in the wrong module file

Created on 22 April 2020, about 5 years ago
Updated 8 June 2025, 16 days ago

I copy-pasted an update hook from module A into module B's b.post_update.php, as a_my_post_update(), and the update system found it and didn't mind and reported it as belonging to module A.

It should probably throw an exception instead.

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component

extension system

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    This is how hooks worked in procedural land.

    We intentionally preserved that with attributes (though it's under discussion)

    I would presume we'd preserve that as well if these mive to oop too.

    This might not belong with the extension system, but sure exactly where it should be though.

Production build 0.71.5 2024