junaidbhura / composer-wp-pro-plugins

Composer installer for Pro WordPress plugins.
https://packagist.org/packages/junaidbhura/composer-wp-pro-plugins
MIT License
92 stars 28 forks source link

Poylang Pro Installation fails #56

Closed ouun closed 1 year ago

ouun commented 1 year ago

Hi there, thanks a lot for the very useful package!

It worked all the time very well with Polylang Pro. But since yestarday I suddenly got the following errors on all remote servers when running composer install:

In ZipDownloader.php line 220:

  '/.../07032023_131249/vendor/composer/tmp-30335bd8a390016b462a12fdd3b5d7f2' is not a zip archive.

With the latest update of this package to v1.7.0 it got more specific:

In AbstractEddPlugin.php line 26:

  Expected a valid download URL for package junaidbhura/polylang-pro

or

In ZipDownloader.php line 220:

  '/...vendor/composer/tmp-6dcacdf4851c8e8d9b80e9690b4d85d9' is not a zip archive. 

I already reached out to Polylang Support, but they said that they have not changes anything on their side.

Kind regards,

Philipp

mcaskill commented 1 year ago

Hi @ouun

Can you check the value of the $response parameter in AbstractEddPlugin::extractDownloadUrl()?

Thanks

mcaskill commented 1 year ago

I tested Polylang Pro (2023-03-07) and I was able to successfully update the WP plugin.

$ composer update junaidbhura/polylang-pro
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
  - Upgrading junaidbhura/polylang-pro (3.2.8 => 3.3.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
  - Downloading junaidbhura/polylang-pro (3.3.2)
  - Upgrading junaidbhura/polylang-pro (3.2.8 => 3.3.2): Extracting archive
Generating optimized autoload files

Could be intermittent unavailability of their server.

The next improvement to this Composer plugin will be to check the status code in the HTTP response.

ouun commented 1 year ago

Hi @mcaskill.

thanks for getting back to me so fast. I needed a bit to test this a bit further. Your first hint to look for $requestlet me realize that I am missing the two new Class-Files in /plugins, while they were referenced in autoloader. So something has messed up on my side. :)

The next improvement to this Composer plugin will be to check the status code in the HTTP response.

That would be helpful, yes. Thanks a lot for your effort on this great helper package.

Kind regards,

Philipp