Andrii Vasyliev
Andrii Vasyliev
Yes, I've tried all features of the plugin! I'm telling about finding (guessing) full class path by class name only with use of class map generated by `composer dump-autoload -o`....
So here is the script: https://gist.github.com/hiqsol/6c60b233816db0db8c324720e46f75dc Run script `php findClass.php ClassName` It just prints found class(es).
You're right about not forcing user have optimized autoloader moreover it is not recommended in development (while highly recommended in production). I will study how to get class map outside...
It seems there is no simple way to make composer dump-autoload to alternative directory. There is `COMPOSER_VENDOR_DIR` environment variable but it needs vendor dir content to be copied to alternative...
I've jury rigged almost working solution with ripgrep and fzf, and now I'm stuck and need help with vim. Here is script that prints all classes in the project in...
Now it puts short class name right under the use statement.
I've tried getpos/setpos, and it gets even worse, it puts short class name in the middle of string two rows up from the initial position :)
I failed to fix it with saving/restoring cursor position. So I've rewritten `composer#namespace#use` with non changing cursor position `let pos = search (..., 'n')` and `append(pos, line)` and everything works...
If you don't like PHP ;) I also tried classes preparation script in plain shell with sed: ```sh #!/bin/sh rg --no-heading --type php "^namespace .*;" . vendor | sed 's/^\(.*\/\(.*\)\.php\):namespace...
Cool. Thank you! Going 7.1 is a good idea in any case!