laminas-modulemanager icon indicating copy to clipboard operation
laminas-modulemanager copied to clipboard

fix - loadModule reinitializes modules if the module has already been…

Open nusphere opened this issue 2 years ago • 4 comments

Q A
Bugfix yes

Description

As descripted in #32 . there is an bug when loading a module with another loading name. there are currently 3 ways to load the same module via the module manager. the following options are available:

  • namespace (legacy way)
  • direct class string of the module class
  • an array with "free name (string)" (key) and a module class object (value)

if you use method 1 (namespace) and method 2 (class string) for the same module in an application, it will be loaded twice and reset the previous settings.

this pull request fixes the false behavior and prevents a module from being loaded twice.

fixes #32

nusphere avatar Apr 08 '22 13:04 nusphere

any review possible?

nusphere avatar Jun 25 '22 21:06 nusphere

@Xerkus Can you look at this? Is the module manager still relevant at all? Thanks in advance! 👍

froschdesign avatar Jun 27 '22 09:06 froschdesign

Hi. Is there anything holding this fix back?

The target branch of this MR probably needs to be adjusted, given that 2 minor releases were published since this MR was opened.

steffendietz avatar Nov 10 '22 08:11 steffendietz

@froschdesign - ping

nusphere avatar Dec 07 '22 10:12 nusphere