[Corona] Throw exception if we found multiple matching controllers

Review Request #1091 — Created Jan. 15, 2024 and submitted

pprkut
Lunr
7dd5788...
lunr

Throw exception if we found multiple matching controllers

GitHub actions run: https://github.com/pprkut/lunr/actions/runs/7526496472

  • 0
  • 0
  • 0
  • 1
  • 1
Description From Last Updated
smillernl
  1. 
      
  2. Wouldn't this cause issues with things that are present in multiple libraries?

    1. Multiple libraries are handled in lookup(). get_controller() only ever looks at one library at a time. So the case here is that when you have two UserController.php files within the same library, we previously picked the first one. Since the order was not guaranteed, which one was selected was pretty much undefined behavior and having two such files was most certainly not intended. The exception now warns about such cases.

  3. 
      
smillernl
  1. Ship It!
  2. 
      
pprkut
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (7bee9e2)
Loading...