# |
Sep 17th 2019, 13:58 |
daniel.upshaw |
Where MyClassName is your custom class |
# |
Sep 17th 2019, 13:58 |
daniel.upshaw |
Try this... `use App\vendor\Email\MyClassName;` |
# |
Sep 17th 2019, 13:57 |
technofection |
Yes, I can access one class but not another : |
# |
Sep 17th 2019, 13:57 |
daniel.upshaw |
But since the `autoload.php` file is loaded, composer can affect autoloading for the entire project |
# |
Sep 17th 2019, 13:57 |
daniel.upshaw |
But since you made your own custom libraries, that sounds like it's separate from composer |
# |
Sep 17th 2019, 13:57 |
ra7bi |
i guss |
# |
Sep 17th 2019, 13:57 |
daniel.upshaw |
The first vendor path |
# |
Sep 17th 2019, 13:57 |
ra7bi |
vendor/composer/installed.json |
# |
Sep 17th 2019, 13:52 |
technofection |
In which path does composer create the autoload file? |
# |
Sep 17th 2019, 13:48 |
daniel.upshaw |
That line is saying to autoload classes in `src/` in the namespace `App` |
# |
Sep 17th 2019, 13:47 |
technofection |
Yes, it's there in composer.json |
# |
Sep 17th 2019, 13:47 |
daniel.upshaw |
Or just `src/Email` <= If this, then you should be able to `use App\Email;` |
# |
Sep 17th 2019, 13:47 |
daniel.upshaw |
So you might do a plugin instead, is one option |
# |
Sep 17th 2019, 13:47 |
daniel.upshaw |
See this line in your `composer.json`: ``` "autoload": { "psr-4": { "App\\": "src/" } },``` |
# |
Sep 17th 2019, 13:46 |
technofection |
These are all custom built.. like src/vendor/Core src/vendor/Email and ao |
# |
Sep 17th 2019, 13:46 |
daniel.upshaw |
Maybe you could have `src/Util/MyLibrary` |
# |
Sep 17th 2019, 13:46 |
daniel.upshaw |
What are the libraries in the src/ vendor called? |
# |
Sep 17th 2019, 13:45 |
daniel.upshaw |
Oh hm |
# |
Sep 17th 2019, 13:45 |
technofection |
There are 2 vendor, one is at root and another one is inside src/ |
# |
Sep 17th 2019, 13:45 |
daniel.upshaw |
https://getcomposer.org/ |
# |
Sep 17th 2019, 13:44 |
daniel.upshaw |
:slightly_smiling_face: |
# |
Sep 17th 2019, 13:44 |
daniel.upshaw |
In CakePHP, the `vendor` folder is specifically meant to be for a Composer pattern of package management @technofection |
# |
Sep 17th 2019, 13:44 |
felipe.marinho |
@ricksaccous and @daniel.upshaw amazing... I'll read about it... :thinking_face: |
# |
Sep 17th 2019, 13:44 |
technofection |
Composer dump-autoload does not help |
# |
Sep 17th 2019, 13:43 |
technofection |
These modules in src/vendor are custom built |
# |
Sep 17th 2019, 13:43 |
daniel.upshaw |
https://book.cakephp.org/3.0/en/orm/behaviors/tree.html |
# |
Sep 17th 2019, 13:42 |
ricksaccous |
@felipe.marinho that's called tree behavior |
# |
Sep 17th 2019, 13:42 |
technofection |
It was created in cake 3 only |
# |
Sep 17th 2019, 13:42 |
felipe.marinho |
There's any way to create a self-related table with N levels and dinamically create the entities for it? :thinking_face: Just overthinking here... |
# |
Sep 17th 2019, 13:42 |
ricksaccous |
if you're directly editing module 2 somehow i doubt you're loading it up with composer |
# |
Sep 17th 2019, 13:41 |
daniel.upshaw |
Did you install new packages since you first installed Cake @technofection? |
# |
Sep 17th 2019, 13:41 |
ricksaccous |
@technofection are you installing these packages with composer? |
# |
Sep 17th 2019, 13:41 |
technofection |
Cake 3 |
# |
Sep 17th 2019, 13:41 |
daniel.upshaw |
Maybe try `composer dump-autoload` |
# |
Sep 17th 2019, 13:41 |
ricksaccous |
@technofection are you using cake 2 or 3? |
# |
Sep 17th 2019, 13:41 |
daniel.upshaw |
Composer should load everything |
# |
Sep 17th 2019, 13:41 |
daniel.upshaw |
@technofection This is composer stuff, right? |
# |
Sep 17th 2019, 13:40 |
technofection |
Hi guys, I am developing an app and I have some custom classes 8n src/vendor/module1 and src/vendor/module2 Now in a class in module 2, I am trying to use a class of module1 and it says class not found. Can someone suggest what wrong am I doing? |
# |
Sep 17th 2019, 13:39 |
daniel.upshaw |
@jotpe What was it? |
# |
Sep 17th 2019, 13:33 |
jotpe |
Found the error :slightly_smiling_face: |
# |
Sep 17th 2019, 13:25 |
jotpe |
user_id and role_id in the other tables are also int(11) unsigned |