php-imap icon indicating copy to clipboard operation
php-imap copied to clipboard

where is vendor folder

Open NathanielB2 opened this issue 2 years ago • 7 comments

Hello,

I'm sure this is painfully obvious and i should have seen info of it's removal but the examples still have require_once DIR.'/../vendor/autoload.php'; I have an older version I'm currently using and it does have that folder but I'm wanting the newer version so i can run it on php 8.1.

Thanks Nathaniel

NathanielB2 avatar Aug 30 '23 19:08 NathanielB2

Hi @NathanielB2 , Usually, you already have a PHP project, where you include this project using composer.

composer then automatically creates the vendor/ directory and installs there all your dependencies.

This autoload.php is automatically managed by composer.

Sebbo94BY avatar Aug 30 '23 20:08 Sebbo94BY

I just downloaded the zip. I have a new computer as my laptop died that I had composer on. I'll see about setting up composer now on my PC.

Thanks

NathanielB2 avatar Aug 30 '23 20:08 NathanielB2

The alternative would be to include the necessary PHP files in the src/ directory, but the common way is to use composer.

Sebbo94BY avatar Aug 30 '23 20:08 Sebbo94BY

I have not used composer all that much and I find myself lost on the setup. I have composer and xampp installed. In visual studio code I installed composer by DEVSENSE but when I installed the package php-imap using composer require php-imap/php-imap not all files installed. Then trying composer require php-imap/php-imap:dev-master I get the errors

Failed to download php-imap/php-imap from dist: The zip extension and unzip/7z commands are both missing, skipping.

The php.ini used by your command-line PHP is: C:\xampp\php\php.ini Now trying to download from source

In GitDownloader.php line 82:

git was not found in your PATH, skipping source download

NathanielB2 avatar Aug 30 '23 22:08 NathanielB2

composer requires the PHP zip extension and the a respective package on the operating system (e.g. unzip/7z): https://getcomposer.org/doc/00-intro.md#system-requirements

This is the reason, why composer is not working for you.

Sebbo94BY avatar Aug 30 '23 22:08 Sebbo94BY

Hi, I did uncheck the extension for imap in the php.ini file but I still get the error well as the git path. I'll see about making it work from the zip file I guess.

NathanielB2 avatar Aug 30 '23 23:08 NathanielB2

I finally got it to work. Still not a composer fan.

I did get the notice: Package sebastian/phpcpd is abandoned, you should avoid using it. No replacement was suggested.
Package webmozart/path-util is abandoned, you should avoid using it. Use symfony/filesystem instead.

NathanielB2 avatar Aug 31 '23 00:08 NathanielB2