I know that there are many good frameworks available with composer, but I just want to quickly test a PHP package. How is this possible?
Assuming you know some basic composer commands and have installed composer on your system, here are what you need to do:
- Install the package with composer
composer require whatsapp/chat-api
- After installing the package with composer, composer has generated an autoloader that you can include on your main PHP file.
- Use the class(es) from the package without further includes.
$w = new WhatsProt($username, $nickname, $debug);
- That's it. Now you can try it with another package available on packagist.