-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from visto9259/fix-25
Fix #25 assertModulesLoaded not matching all loaded Modules
- Loading branch information
Showing
8 changed files
with
84 additions
and
450 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
return [ | ||
'modules' => [ | ||
'Laminas\Router', | ||
'Qux', // Qux will load Foo during module init event | ||
], | ||
'module_listener_options' => [ | ||
'config_static_paths' => [], | ||
'module_paths' => [ | ||
'Qux' => __DIR__ . '/modules-path/with-subdir/Qux', | ||
'Foo' => __DIR__ . '/modules-path/with-subdir/Foo', | ||
], | ||
], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Qux; | ||
|
||
use Laminas\ModuleManager\Feature\InitProviderInterface; | ||
use Laminas\ModuleManager\ModuleManagerInterface; | ||
use stdClass; | ||
|
||
/** @psalm-suppress UnusedClass */ | ||
class Module implements InitProviderInterface | ||
{ | ||
public function getConfig(): array | ||
{ | ||
return [ | ||
'service_manager' => [ | ||
'factories' => [ | ||
'QuxObject' => static fn(): stdClass => new stdClass(), | ||
], | ||
], | ||
]; | ||
} | ||
|
||
public function init(ModuleManagerInterface $manager): void | ||
{ | ||
$manager->loadModule('Foo'); | ||
} | ||
} |