N°4280 Handle modules with non existing model.*.php files imported (#295)

We were crashing iTop when having a module with : 
* in the 'datamodel' key in the module.*.php file a 'model.*.php' declared
* no model.*.php file in the module sources
* no model.*.php generated after compilation

This behavior is improved : 
* if isdevenv an exception will be thrown detailing which module is concerned
* else : 
  - model.*.php won't be added in iTop datamodel autoload
  - a SetupLog::Error will be made
This commit is contained in:
Pierre Goiffon
2022-06-15 17:20:13 +02:00
committed by GitHub
parent 8890940b06
commit 023ead39ec
2 changed files with 24 additions and 2 deletions

View File

@@ -139,7 +139,15 @@ class MFModule
*/
protected $sAutoSelect;
/**
* @var array
* @see ModelFactory::FindModules init of this structure from the module.*.php files
* @var array{
* business: string[],
* webservices: string[],
* addons: string[],
* }
* Warning, there are naming mismatches between this structure and the module.*.php :
* - `business` here correspond to `datamodel` in module.*.php
* - `webservices` here correspond to `webservice` in module.*.php
*/
protected $aFilesToInclude;