Hi!
I am trying to debug an issue I am having using the cake console REPL with little success.
I open the cake shell using
# bin/cake console
in my terminal.
I am able to get load a table using
>>> $my_table = Cake\Datasource\FactoryLocator::get('Table')->get('MyTableName');
And then interact with it as mentioned here Interactive Console (REPL) - 4.x
But I have a component that is misbehaving and I would like to call functions on my component from the REPL to debug and interact with the results. But how do I access components (and controllers) in the REPL? I can’t figure it out and I am not very familiar with the inner workings of CakePHP and PHP.
The path to my component is:
project_root_dir/src/Controller/Component/MyComponent.php
Any advice is greatly appreciated.
Thanks!