Warning is thrown because given class is not registered as PHP, and all schemas has been read from standard prefix/share directory.
init schema using share-dir from config-file (if possible). Closed by 16814d1
Seems this issue still persists. If you place schemas into a custom directory and try to set them via a ShareDir of a Midgard config file (or config object) in a php-cli, the schemas will not be found.
This is especially critical as AiP is also running under cli.
Did you try to sharedir via env ?
The problem with PHP extension is fact that we must register all classes when extension is loaded which means very early before PHP comes to userland.
Ah, just checked the closing commit.
In php ini, set :
The this config should be taken into account and it's sharedir.
Yes, but I wanted to reopen this so we get sharedirs working properly on dynamically loaded configurations as well. In the Hrungnir cycle making the schemas more flexible will be an important priority. In Desktop Summit you mentioned this should now be possible with more recent PHP versions?
Yep. I have been told there were many fixes in PHP wrt classes' memory management. But still, we have to consider couple of options:
Classes registered per request (in apache env) might be easily performance killer.
In PHP, we should start thinking differently. There will be no more
$o = new MgdSchemaClassName();
$o = MidgardSchemaFactory::factory ("MgdSchemaClassName");
$o = new \GIR\Object ("MgdSchemaClassName");
init schema using share-dir from config-file (if possible). Closes gh-8