LibreCodeCoop / whatsapp-client

WhatsApp web php client
GNU Affero General Public License v3.0
43 stars 12 forks source link

Add required missing file #27

Open jomisacu opened 10 months ago

jomisacu commented 10 months ago

Fix

The WhatsappClient\webwhatsapi\Wrapper::loadWapi method is trying to load the file wapi.js. This file not exists, so, this PR fixes it.

vitormattos commented 10 months ago

Hi,

This project have a build step:

php ./bin/build

And the build command will get the latest version of wapi.js:

https://github.com/LibreCodeCoop/whatsapp-client/blob/master/src/Command/BuildCommand.php#L28

Maybe a good improvement point is to add this command before this row: https://github.com/LibreCodeCoop/whatsapp-client/blob/master/.docker/php/entrypoint.sh#L3

like this:

if [ ! -f "src/webwhatsapi/js/wapi.js" ]; then
    php ./bin/build
fi
vitormattos commented 10 months ago

Maybe a best workaround is to use the composer hooks and implement a post-install-cmd to run the command bin/build

Will be like this the implementation:

https://github.com/laravel/laravel/blob/10.x/composer.json#L35-L49

jomisacu commented 10 months ago

Ohh i missed it.

I searched for this on travis and composer and don't saw it.

About post-install-cmd i agree could be the best.