barbushin / php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)
MIT License
1.65k stars 459 forks source link

where is vendor folder #714

Open NathanielB2 opened 10 months ago

NathanielB2 commented 10 months ago

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

Sebbo94BY commented 10 months ago

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.

NathanielB2 commented 10 months ago

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

Sebbo94BY commented 10 months ago

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

NathanielB2 commented 10 months ago

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

Sebbo94BY commented 10 months ago

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.

NathanielB2 commented 10 months ago

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 commented 10 months ago

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.