Skip to content

Add required missing file#27

Open
jomisacu wants to merge 1 commit into
LibreCodeCoop:masterfrom
jomisacu:master
Open

Add required missing file#27
jomisacu wants to merge 1 commit into
LibreCodeCoop:masterfrom
jomisacu:master

Conversation

@jomisacu

@jomisacu jomisacu commented Dec 6, 2023

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

jomisacu commented Dec 6, 2023

Copy link
Copy Markdown
Author

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