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

Missing argument 5 for Hirak\Prestissimo\CurlRemoteFilesystem::progress() #18

Closed
docteurklein opened this Issue Jan 27, 2016 · 6 comments

Comments

Projects
None yet
3 participants
@docteurklein

docteurklein commented Jan 27, 2016

Awesome plugin!

However, when running composer install in the php:5.4-fpm docker image, I get an error.
Adding --no-progress fixes it, but I'd like to know why it fails.
Maybe a problem with the curl version?

root@283ebbac6607:/usr/src/app# dpkg -l curl
curl                 7.38.0-4+deb8u2 amd64

Tested with composer 1.0.0-alpha11.

Output:

composer install --ignore-platform-reqs --prefer-dist
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing hirak/prestissimo (0.1.4)
    Downloading: 100%         

  - Installing twig/twig (v1.23.3)
    Downloading: Connecting...


  [ErrorException]                                                           
  Missing argument 5 for Hirak\Prestissimo\CurlRemoteFilesystem::progress()  


Exception trace:
 () at /usr/src/app/vendor/hirak/prestissimo/src/CurlRemoteFilesystem.php:208
 Composer\Util\ErrorHandler::handle() at /usr/src/app/vendor/hirak/prestissimo/src/CurlRemoteFilesystem.php:208
 Hirak\Prestissimo\CurlRemoteFilesystem->progress() at n/a:n/a
 curl_exec() at /usr/src/app/vendor/hirak/prestissimo/src/CurlRemoteFilesystem.php:184
 Hirak\Prestissimo\CurlRemoteFilesystem->exec() at /usr/src/app/vendor/hirak/prestissimo/src/CurlRemoteFilesystem.php:66
 Hirak\Prestissimo\CurlRemoteFilesystem->Hirak\Prestissimo\{closure}() at /usr/src/app/vendor/hirak/prestissimo/src/CurlRemoteFilesystem.php:148
 Hirak\Prestissimo\CurlRemoteFilesystem->fetch() at /usr/src/app/vendor/hirak/prestissimo/src/CurlRemoteFilesystem.php:76
 Hirak\Prestissimo\CurlRemoteFilesystem->copy() at phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownloader.php:136
 Composer\Downloader\FileDownloader->doDownload() at phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownloader.php:88
 Composer\Downloader\FileDownloader->download() at phar:///usr/local/bin/composer/src/Composer/Downloader/ArchiveDownloader.php:35
 Composer\Downloader\ArchiveDownloader->download() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:199
 Composer\Downloader\DownloadManager->download() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:159
 Composer\Installer\LibraryInstaller->installCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:90
 Composer\Installer\LibraryInstaller->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:152
 Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:139
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:603
 Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:232
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/InstallCommand.php:134
 Composer\Command\InstallCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:256
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:838
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:189
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:147
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:120
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:82
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
 require() at /usr/local/bin/composer:24

@DQNEO

This comment has been minimized.

Show comment
Hide comment
@DQNEO

DQNEO Jan 28, 2016

Contributor

I reproduced it by this docker images
https://hub.docker.com/r/library/php/tags/

docker run -it php:5.4-fpm bash

inside the container,

# apt-get update
# apt-get install -y git-core
# curl -sS https://getcomposer.org/installer | php
# ./composer.phar global require hirak/prestissimo
# ./composer.phar require slim/slim
Using version ^2.6 for slim/slim
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing slim/slim (2.6.2)
    Downloading: Connecting...

  [ErrorException]
  Missing argument 5 for Hirak\Prestissimo\CurlRemoteFilesystem::progress()

Contributor

DQNEO commented Jan 28, 2016

I reproduced it by this docker images
https://hub.docker.com/r/library/php/tags/

docker run -it php:5.4-fpm bash

inside the container,

# apt-get update
# apt-get install -y git-core
# curl -sS https://getcomposer.org/installer | php
# ./composer.phar global require hirak/prestissimo
# ./composer.phar require slim/slim
Using version ^2.6 for slim/slim
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing slim/slim (2.6.2)
    Downloading: Connecting...

  [ErrorException]
  Missing argument 5 for Hirak\Prestissimo\CurlRemoteFilesystem::progress()

@hirak

This comment has been minimized.

Show comment
Hide comment
@hirak

hirak Jan 28, 2016

Owner

OK, this is because CURLOPT_PROGRESSFUNCTION interface.

  • PHP >= 5.5 ... (ch, int, int, int, int) -> int
  • PHP < 5.5 ... (int, int, int, int) -> int

I'll fix it.

Owner

hirak commented Jan 28, 2016

OK, this is because CURLOPT_PROGRESSFUNCTION interface.

  • PHP >= 5.5 ... (ch, int, int, int, int) -> int
  • PHP < 5.5 ... (int, int, int, int) -> int

I'll fix it.

@DQNEO

This comment has been minimized.

Show comment
Hide comment
@DQNEO

DQNEO Jan 28, 2016

Contributor

Yes, I also found it in the manual.
http://php.net/manual/ja/function.curl-setopt.php#116866

Contributor

DQNEO commented Jan 28, 2016

Yes, I also found it in the manual.
http://php.net/manual/ja/function.curl-setopt.php#116866

@hirak

This comment has been minimized.

Show comment
Hide comment
@hirak

hirak Jan 30, 2016

Owner

@docteurklein I released 0.1.5. Prease try new version.

$ composer global remove hirak/prestissimo
$ composer global require hirak/prestissimo
Owner

hirak commented Jan 30, 2016

@docteurklein I released 0.1.5. Prease try new version.

$ composer global remove hirak/prestissimo
$ composer global require hirak/prestissimo
@docteurklein

This comment has been minimized.

Show comment
Hide comment
@docteurklein

docteurklein Feb 1, 2016

thanks! will try and report.

docteurklein commented Feb 1, 2016

thanks! will try and report.

@DQNEO

This comment has been minimized.

Show comment
Hide comment
@DQNEO

DQNEO Feb 1, 2016

Contributor

I confirmed the issue is fixed on php:5.4-fpm docker image.

Contributor

DQNEO commented Feb 1, 2016

I confirmed the issue is fixed on php:5.4-fpm docker image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment