machinateur / android-chrome-tab-transfer

A tool to transfer google chrome tabs from your android phone to your computer using `adb`.
MIT License
91 stars 10 forks source link

No /vendor/autoload.php? #16

Closed HeyItsJono closed 1 year ago

HeyItsJono commented 1 year ago

Hey thank you for this tool, I'm trying to get up and running on Windows. I've downloaded ADB and PHP 8.2, they're in my PATH. I've installed Composer, I've restarted my command prompt. I can call PHP and ADB from the commandline.

However, when I try to run php copy-tabs.php I get the following error:

PHP Warning:  require(**WORKINGDIR**\android-chrome-tab-transfer/vendor/autoload.php): 
Failed to open stream: No such file or directory in **WORKINGDIR**\android-chrome-tab-transfer\copy-tabs.php on line 26
PHP Fatal error:  Uncaught Error: Failed opening required '**WORKINGDIR**\android-chrome-tab-transfer/vendor/autoload.php' (include_path='.;C:\php\pear') in **WORKINGDIR**\android-chrome-tab-transfer\copy-tabs.php:26
Stack trace:
  #0 {main}
  thrown in **WORKINGDIR**\android-chrome-tab-transfer\copy-tabs.php on line 26

Where **WORKINGDIR** is my working directory. Looking at the script I see the line causing the issue is require __DIR__ . '/vendor/autoload.php';, but there is no vendor folder supplied with this repo when pulled from git, and no autoload.php file either. I would really appreciate your advice on getting this working!

HeyItsJono commented 1 year ago

Managed to figure out you have to run composer dump-autoload before running the script to generate the vendor folder with the autoload file.

machinateur commented 1 year ago

Hey there,

first off, thanks for using this tool. I'm happy it can be of use to others.

This error means that the dependencies are not (yet) installed.

The tool depends on the Symfony Console component, which can be installed (along with its dependencies) using the composer install command.

I should probably add some kind of more user-friendly error message, when the required packages are missing.