Closed zirhut closed 6 years ago
Yes, the tutorial assumes everything lies in the root directory of the project in order not to go into the quirks of composer.
Let’s say your sources lie in sources/lib
, your composer.json
must contain the following lines:
"autoload": {
"psr-4": {
"MyVendor\\MyProject\\": "sources/lib"
}
},
This way, calling a class MyVendor\MyProject\Pomm\Model\MyDb\MySchema\StuffModel
will result in loading the file in sources/lib/Pomm/Model/MyDb/MySchema/StuffModel.php
@zirhut it's ok? we can closed this issue?
The site has been updated with reference to this issue.
I am trying to build a new site using http://www.pomm-project.org/documentation/sandbox2 There is a problem at one point (until this line everything is ok):
$computers = $pomm['cbkmis']->getModel('\CbkMis\PublicSchema\ComputerModel');
Generates an error (from error.log of apache):PHP Fatal error: Uncaught PommProject\\ModelManager\\Exception\\ModelException: Could not instantiate Model class '\\CbkMis\\PublicSchema\\ComputerModel'. (Reason: 'Class \\CbkMis\\PublicSchema\\ComputerModel does not exist'). in /var/www/html/cbk-mis/vendor/pomm-project/model-manager/sources/lib/Model/ModelPooler.php:60
If I check included files (before I call getModel) with
get_included_files();
I get only files within thevendor
directory (nothing from thesource
directory)... it might be the problem. But how is it possible to fix it?This issue asks developer to update the tutorial: Quick setup 2.0
Pomm version is: 2.0.*@dev PHP version is: 7.0.22-0ubuntu0.16.04.1