Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required missing file #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jomisacu
Copy link

@jomisacu jomisacu commented Dec 6, 2023

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
Copy link
Member

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
Copy link
Member

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
Copy link
Author

jomisacu commented Dec 6, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants