furey / tinx

⛔️ Laravel Tinx is archived and no longer maintained.
449 stars 37 forks source link

re() doesn't reload changes in models located at app folder #58

Closed mxl closed 5 years ago

mxl commented 5 years ago

version: 2.1.9

  1. install the latest tinx version and made no other changes.
  2. add two models - app/Models/User.php and app/Order.php.
  3. start php artisan tinx
  4. add to both models the following method:
public function test() {
    return 123;
}
  1. run re() in tinx shell
  2. running (new User())->test() results in 123 output
  3. running (new Order())->test() results in BadMethodCallException
jny986 commented 5 years ago

@mxl

First make sure that you have configured Tinx properly as per instructions (I found that re() worked better when I installed the config file as detailed in the install instructions)

Have you ensured that you have your composer.json to search the app folder to autoload models in that folder?

Also try exiting tinx and running composer dumpautoload This will re load the autoload.

furey commented 5 years ago

Hi @mxl,

I'm unable to replicate your error using the following environment:

The steps I took to attempt replication were:

Wish I could help more, but as I can't replicate, I'll have to close the issue!

MladenJanjetovic commented 5 years ago

This is happening to me as well. Just installed Tinx in Laravel 5.8 re() and reo() throws no error, but i.e. my App\Transaction class is not reloaded. I have to quit the Tinx and start it again to see the cahnges.

Mac OS X 10.14.4 PHP 7.3.3 Laravel Framework 5.8.4 ajthinking/tinx v2.3.1