phpseclib / bcmath_compat

PHP 5.x-8.x polyfill for bcmath extension.
MIT License
165 stars 5 forks source link

can't install on heroku #1

Closed BnitoBzh closed 4 years ago

BnitoBzh commented 4 years ago

During an Heroku deployment i get this error :

Your requirements could not be resolved to an installable set of packages.

Problem 1
- don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13
- composer.json/composer.lock requires php 7.3.* -> satisfiable by php[7.3.13].
- Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

The phpseclib/bcmath_compat package is an indirect dependency of laravel/framework via moontoast/math

terrafrost commented 4 years ago

moontoast/math only requires phpseclib/bcmath_compat as of 1.2.x. laravel/framework requires moontoast/math 1.1.x.

Anyway, I was able to install it without issue on PHP 7.3.13:

$ php -v
PHP 7.3.13 (cli) (built: Dec 17 2019 13:16:21) ( NTS MSVC15 (Visual C++ 2017) x64 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.13, Copyright (c) 1998-2018 Zend Technologies
$ composer require phpseclib/bcmath_compat
Using version ^1.0 for phpseclib/bcmath_compat
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 2 installs, 0 updates, 0 removals
  - Installing phpseclib/phpseclib (2.0.23): Loading from cache
  - Installing phpseclib/bcmath_compat (1.0.3): Loading from cache
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)
Writing lock file
Generating autoload files
terrafrost commented 4 years ago

Can you give me a CLI command (and corresponding composer.json / composer.lock, if necessary) that reproduces the issue?

Thanks!

BnitoBzh commented 4 years ago

Yes it works for me too with laravel framework, i made a mistake, the issue comes from Laravel nova (2.9.2)

Laravel Nova requires (not in dev like laravel framework) "moontoast/math": "^1.1" which requires "phpseclib/bcmath_compat": ">=1.0.3"

terrafrost commented 4 years ago

laravel/nova isn't free - it's $99.. This limits my ability to reproduce the issue.

That said, I did try to install laravel/telescope, which requires moontoast/math, and was able to do so without issue on PHP 7.3.13:

$ composer require laravel/telescope
Using version ^2.1 for laravel/telescope
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 45 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-mbstring (v1.13.1): Loading from cache
  - Installing symfony/polyfill-php72 (v1.13.1): Loading from cache
  - Installing symfony/var-dumper (v4.4.2): Loading from cache
  - Installing phpseclib/phpseclib (2.0.23): Loading from cache
  - Installing phpseclib/bcmath_compat (1.0.3): Loading from cache
  - Installing moontoast/math (1.2.1): Loading from cache
  - Installing symfony/polyfill-ctype (v1.13.1): Loading from cache
  - Installing phpoption/phpoption (1.7.2): Loading from cache
  - Installing vlucas/phpdotenv (v3.6.0): Loading from cache
  - Installing symfony/css-selector (v5.0.2): Loading from cache
  - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Loading from cache
  - Installing symfony/routing (v4.4.2): Loading from cache
  - Installing symfony/process (v4.4.2): Loading from cache
  - Installing symfony/polyfill-php73 (v1.13.1): Loading from cache
  - Installing symfony/polyfill-intl-idn (v1.13.1): Loading from cache
  - Installing symfony/mime (v5.0.2): Loading from cache
  - Installing symfony/http-foundation (v4.4.2): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v1.1.7): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/event-dispatcher (v4.4.2): Loading from cache
  - Installing psr/log (1.1.2): Loading from cache
  - Installing symfony/debug (v4.4.2): Loading from cache
  - Installing symfony/error-handler (v4.4.2): Loading from cache
  - Installing symfony/http-kernel (v4.4.2): Loading from cache
  - Installing symfony/finder (v4.4.2): Loading from cache
  - Installing symfony/service-contracts (v2.0.1): Loading from cache
  - Installing symfony/console (v4.4.2): Loading from cache
  - Installing symfony/polyfill-iconv (v1.13.1): Loading from cache
  - Installing doctrine/lexer (1.2.0): Loading from cache
  - Installing egulias/email-validator (2.1.13): Loading from cache
  - Installing swiftmailer/swiftmailer (v6.2.3): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing ramsey/uuid (3.9.2): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing opis/closure (3.5.1): Loading from cache
  - Installing symfony/translation-contracts (v2.0.1): Loading from cache
  - Installing symfony/translation (v4.4.2): Loading from cache
  - Installing nesbot/carbon (2.28.0): Loading from cache
  - Installing monolog/monolog (2.0.2): Loading from cache
  - Installing league/flysystem (1.0.46): Loading from cache
  - Installing erusev/parsedown (1.7.4): Loading from cache
  - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
  - Installing doctrine/inflector (1.3.1): Loading from cache
  - Installing laravel/framework (v6.9.0): Loading from cache
  - Installing laravel/telescope (v2.1.3): Loading from cache
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/browser-kit ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
symfony/service-contracts suggests installing symfony/service-implementation ()
symfony/console suggests installing symfony/lock ()
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
swiftmailer/swiftmailer suggests installing ext-intl (Needed to support internationalized email addresses)
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter)
symfony/translation suggests installing symfony/config ()
symfony/translation suggests installing symfony/yaml ()
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing elasticsearch/elasticsearch (Allow sending log messages to an Elasticsearch server via official client)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongodb (Allow sending log messages to a MongoDB server (via driver))
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server (via library))
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
league/flysystem suggests installing ext-fileinfo (Required for MimeType)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing ext-ftp (Allows you to use FTP server storage)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
laravel/framework suggests installing ext-gd (Required to use Illuminate\Http\Testing\FileFactory::image().)
laravel/framework suggests installing ext-memcached (Required to use the memcache cache driver.)
laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-posix (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-redis (Required to use the Redis cache and queue drivers.)
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.0).)
laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (^2.6).)
laravel/framework suggests installing filp/whoops (Required for friendly error pages in development (^2.4).)
laravel/framework suggests installing fzaninotto/faker (Required to use the eloquent factory builder (^1.4).)
laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun mail driver and the ping methods on schedules (^6.0).)
laravel/framework suggests installing laravel/tinker (Required to use the tinker console command (^1.0).)
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).)
laravel/framework suggests installing psr/http-message (Required to allow Storage::put to accept a StreamInterface (^1.0).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^4.0).)
laravel/framework suggests installing symfony/cache (Required to PSR-6 cache bridge (^4.3.4).)
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^1.2).)
laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Writing lock file
Generating autoload files
terrafrost commented 4 years ago

Maybe you can post the laravel/nova composer.json / composer.lock?

BnitoBzh commented 4 years ago

Here is the nova requirements:

    "require": {
        "php": ">=7.1.0",
        "cakephp/chronos": "^1.0",
        "doctrine/dbal": "^2.9",
        "illuminate/support": "^5.7.15 | 5.8.* | ^6.0",
        "moontoast/math": "^1.1",
        "spatie/once": "^1.1 | ^2.0",
        "symfony/finder": "^4.0"
    },
    "require-dev": {
        "mockery/mockery": "^1.0",
        "orchestra/testbench": "3.7.* | 3.8.*",
        "phpunit/phpunit": "^7.0 | ^8.0",
        "predis/predis": "^1.1"
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
terrafrost commented 4 years ago

I created a standalone composer.json from your snippet:

{
    "require": {
        "php": ">=7.1.0",
        "cakephp/chronos": "^1.0",
        "doctrine/dbal": "^2.9",
        "illuminate/support": "^5.7.15 | 5.8.* | ^6.0",
        "moontoast/math": "^1.1",
        "spatie/once": "^1.1 | ^2.0",
        "symfony/finder": "^4.0"
    },
    "require-dev": {
        "mockery/mockery": "^1.0",
        "orchestra/testbench": "3.7.* | 3.8.*",
        "phpunit/phpunit": "^7.0 | ^8.0",
        "predis/predis": "^1.1"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

I then did composer install and did not have any issues:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 83 installs, 0 updates, 0 removals
  - Installing sebastian/version (2.0.1): Downloading (100%)
  - Installing sebastian/type (1.1.3): Downloading (100%)
  - Installing sebastian/resource-operations (2.0.1): Downloading (100%)
  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)
  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)
  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)
  - Installing sebastian/global-state (3.0.0): Downloading (100%)
  - Installing sebastian/exporter (3.1.2): Downloading (100%)
  - Installing sebastian/environment (4.2.3): Downloading (100%)
  - Installing sebastian/diff (3.0.2): Downloading (100%)
  - Installing sebastian/comparator (3.0.2): Downloading (100%)
  - Installing phpunit/php-timer (2.1.2): Downloading (100%)
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)
  - Installing phpunit/php-file-iterator (2.0.2): Downloading (100%)
  - Installing phpunit/php-token-stream (3.1.1): Downloading (100%)
  - Installing theseer/tokenizer (1.1.3): Downloading (100%)
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)
  - Installing phpunit/php-code-coverage (7.0.10): Downloading (100%)
  - Installing phpdocumentor/reflection-common (2.0.0): Downloading (100%)
  - Installing phpdocumentor/type-resolver (1.0.1): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.13.1): Loading from cache
  - Installing webmozart/assert (1.6.0): Downloading (100%)
  - Installing phpdocumentor/reflection-docblock (4.3.4): Downloading (100%)
  - Installing doctrine/instantiator (1.3.0): Downloading (100%)
  - Installing phpspec/prophecy (1.10.1): Downloading (100%)
  - Installing phar-io/version (2.0.1): Downloading (100%)
  - Installing phar-io/manifest (1.0.3): Downloading (100%)
  - Installing myclabs/deep-copy (1.9.4): Downloading (100%)
  - Installing phpunit/phpunit (8.5.1): Downloading (100%)
  - Installing fzaninotto/faker (v1.9.1): Downloading (100%)
  - Installing orchestra/testbench-core (v3.8.8): Downloading (100%)
  - Installing hamcrest/hamcrest-php (v2.0.0): Downloading (100%)
  - Installing mockery/mockery (1.3.1): Downloading (100%)
  - Installing phpoption/phpoption (1.7.2): Loading from cache
  - Installing vlucas/phpdotenv (v3.6.0): Loading from cache
  - Installing symfony/css-selector (v5.0.2): Loading from cache
  - Installing tijsverkoyen/css-to-inline-styles (2.2.2): Loading from cache
  - Installing symfony/polyfill-php72 (v1.13.1): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.13.1): Loading from cache
  - Installing symfony/var-dumper (v4.4.2): Loading from cache
  - Installing symfony/routing (v4.4.2): Loading from cache
  - Installing symfony/process (v4.4.2): Loading from cache
  - Installing symfony/polyfill-php73 (v1.13.1): Loading from cache
  - Installing symfony/polyfill-intl-idn (v1.13.1): Loading from cache
  - Installing symfony/mime (v5.0.2): Loading from cache
  - Installing symfony/http-foundation (v4.4.2): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v1.1.7): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/event-dispatcher (v4.4.2): Loading from cache
  - Installing psr/log (1.1.2): Loading from cache
  - Installing symfony/debug (v4.4.2): Loading from cache
  - Installing symfony/error-handler (v4.4.2): Loading from cache
  - Installing symfony/http-kernel (v4.4.2): Loading from cache
  - Installing symfony/finder (v4.4.2): Loading from cache
  - Installing symfony/service-contracts (v2.0.1): Loading from cache
  - Installing symfony/console (v4.4.2): Loading from cache
  - Installing symfony/polyfill-iconv (v1.13.1): Loading from cache
  - Installing doctrine/lexer (1.2.0): Loading from cache
  - Installing egulias/email-validator (2.1.13): Loading from cache
  - Installing swiftmailer/swiftmailer (v6.2.3): Loading from cache
  - Installing paragonie/random_compat (v9.99.99): Loading from cache
  - Installing ramsey/uuid (3.9.2): Loading from cache
  - Installing psr/simple-cache (1.0.1): Loading from cache
  - Installing opis/closure (3.5.1): Loading from cache
  - Installing symfony/translation-contracts (v2.0.1): Loading from cache
  - Installing symfony/translation (v4.4.2): Loading from cache
  - Installing nesbot/carbon (2.28.0): Loading from cache
  - Installing monolog/monolog (1.25.3): Downloading (100%)
  - Installing league/flysystem (1.0.46): Loading from cache
  - Installing erusev/parsedown (1.7.4): Loading from cache
  - Installing dragonmantank/cron-expression (v2.3.0): Loading from cache
  - Installing doctrine/inflector (1.3.1): Loading from cache
  - Installing laravel/framework (v5.8.36): Downloading (100%)
  - Installing orchestra/testbench (v3.8.5): Downloading (100%)
  - Installing phpseclib/phpseclib (2.0.23): Loading from cache
  - Installing phpseclib/bcmath_compat (1.0.3): Loading from cache
  - Installing moontoast/math (1.2.1): Loading from cache
  - Installing spatie/once (2.1.3): Downloading (100%)
  - Installing predis/predis (v1.1.1): Downloading (100%)
  - Installing cakephp/chronos (1.3.0): Downloading (100%)
  - Installing doctrine/event-manager (1.1.0): Downloading (100%)
  - Installing doctrine/cache (1.10.0): Downloading (100%)
  - Installing doctrine/dbal (v2.10.1): Downloading (100%)
sebastian/global-state suggests installing ext-uopz (*)
sebastian/environment suggests installing ext-posix (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.7.2)
phpunit/phpunit suggests installing phpunit/php-invoker (^2.0.0)
phpunit/phpunit suggests installing ext-xdebug (*)
orchestra/testbench-core suggests installing orchestra/testbench-browser-kit (Allow to use legacy Laravel BrowserKit for testing (^3.8).)
orchestra/testbench-core suggests installing orchestra/testbench-dusk (Allow to use Laravel Dusk for testing (^3.8).)
symfony/var-dumper suggests installing ext-intl (To show region name in time zone dump)
symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
symfony/routing suggests installing symfony/yaml (For using the YAML loader)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
symfony/polyfill-intl-idn suggests installing ext-intl (For best performance)
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/http-kernel suggests installing symfony/browser-kit ()
symfony/http-kernel suggests installing symfony/config ()
symfony/http-kernel suggests installing symfony/dependency-injection ()
symfony/service-contracts suggests installing symfony/service-implementation ()
symfony/console suggests installing symfony/lock ()
egulias/email-validator suggests installing ext-intl (PHP Internationalization Libraries are required to use the SpoofChecking validation)
swiftmailer/swiftmailer suggests installing ext-intl (Needed to support internationalized email addresses)
swiftmailer/swiftmailer suggests installing true/punycode (Needed to support internationalized email addresses, if ext-intl is not installed)
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of Ramsey\Uuid\Uuid as Doctrine field type.)
ramsey/uuid suggests installing paragonie/random-lib (Provides RandomLib for use with the RandomLibAdapter)
symfony/translation suggests installing symfony/config ()
symfony/translation suggests installing symfony/yaml ()
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
league/flysystem suggests installing ext-fileinfo (Required for MimeType)
league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
league/flysystem suggests installing ext-ftp (Allows you to use FTP server storage)
league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
laravel/framework suggests installing ext-gd (Required to use Illuminate\Http\Testing\FileFactory::image().)
laravel/framework suggests installing ext-pcntl (Required to use all features of the queue worker.)
laravel/framework suggests installing ext-posix (Required to use all features of the queue worker.)
laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (^3.0).)
laravel/framework suggests installing filp/whoops (Required for friendly error pages in development (^2.1.4).)
laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (^6.0).)
laravel/framework suggests installing laravel/tinker (Required to use the tinker console command (^1.0).)
laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (^1.0).)
laravel/framework suggests installing league/flysystem-cached-adapter (Required to use the Flysystem cache (^1.0).)
laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (^1.0).)
laravel/framework suggests installing league/flysystem-sftp (Required to use the Flysystem SFTP driver (^1.0).)
laravel/framework suggests installing nexmo/client (Required to use the Nexmo transport (^1.0).)
laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (^4.0).)
laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (^3.0).)
laravel/framework suggests installing symfony/dom-crawler (Required to use most of the crawler integration testing tools (^4.2).)
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use PSR-7 bridging features (^1.1).)
laravel/framework suggests installing wildbit/swiftmailer-postmark (Required to use Postmark mail driver (^3.0).)
phpseclib/phpseclib suggests installing ext-libsodium (SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.)
phpseclib/phpseclib suggests installing ext-mcrypt (Install the Mcrypt extension in order to speed up a few other cryptographic operations.)
predis/predis suggests installing ext-phpiredis (Allows faster serialization and deserialization of the Redis protocol)
doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
Writing lock file
Generating autoload files
terrafrost commented 4 years ago

What does your composer.json look like? With the caveat that idk how laravel/nova is supposed to work with Composer (maybe they use private packagist?)

https://stackoverflow.com/q/31004652/569976 seems like it might be relevant to you idk

MCKLtech commented 4 years ago

Just chiming in that I am having the same issue and I'm also using Nova. I haven't been able to debug it far enough but I'll drop back here if I do.

This is my Heroku build error:

! > Loading repositories with available runtimes and extensions ! > Updating dependencies ! > Your requirements could not be resolved to an installable set of packages. ! > ! > Problem 1 ! > - don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13 ! > - composer.json/composer.lock requires php ^7.3.0 -> satisfiable by php[7.3.13]. ! > - Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

tillkruss commented 4 years ago

Same issue here.

alexleclair commented 4 years ago

As a temporary workaround, you can use Composer's require inline alias feature to force the use of a previous, non-breaking version of moontoast/math.

Simply run the following command at the root of your project:

composer require moontoast/math "1.1.2 as 1.999.999"

terrafrost commented 4 years ago

So idk anything about heroku. I created a free account but it doesn't appear that I can SSH into it or access the CLI in any way. I mean, even with Docker you can do docker exec -it bash imagename. Is there nothing comparable with heroku? If I could do that I could do composer require phpseclib/bcmath_compat on the CLI.

In lieu of knowing anything about heroku... what if you try creating a composer.json with just bcmath_compat and seeing what happens?

For that matter is this only an issue on heroku? Does this work locally? Has anyone tested?

Is heroku like Travis CI? You can't SSH into Travis CI but you can setup code to run on it if you link a GitHub repo to Travis CI and then if you create a .travis.yml file to tell Travis CI what to do. I'll sometimes debug against Travis CI if trying to reproduce the issue locally would be more effort but, as a general rule, it's not - as a general rule trying to test against Travis CI is the bigger PITA.

Maybe someone can buy me a copy of Laravel Nova and I can try it locally? Not that purchasing it for me will guarantee I'll be able to reproduce it...

I see there's a question on stackoverflow about this very issue:

https://stackoverflow.com/q/59656962/569976

It's claimed that heroku is running PHP 7.3.13. What does php -i say?

I tried to post a support request on https://github.com/composer/composer/issues/new but the template is wanting to know the output of composer diagnose. Maybe someone here could make a post there instead?

Maybe make a post on https://stackoverflow.com/questions/tagged/laravel-nova ? idk where else one can find Laravel Nova support.

I mean, I'll make whatever changes I have to make but I haven't the foggiest clue what kind of change would resolve this issue that I cannot at all reproduce.

alexleclair commented 4 years ago

Hey @terrafrost , don't worry too much about it. You're basically a new requirement of a package that was recently updated, but that was working properly before needing to use your package.

Essentially, laravel-nova has a somewhat loose version requirement for moontoast/math, which now requires your library.

This obviously doesn't solve the underlying issue, but should at least provide a fix for those coming via a Nova deployment.

For that matter is this only an issue on heroku? Does this work locally? Has anyone tested?

It works perfectly locally for me, using Homestead (PHP version 7.3.7-2+ubuntu18.04.1+deb.sury.org+1), but not when using the PHP Heroku Buildpack (unless I am downgrading moontoast/math down to 1.1.2)

terrafrost commented 4 years ago

don't worry too much about it. You're basically a new requirement of a package that was recently updated, but that was working properly before needing to use your package.

I submitted the PR to moontoast/math that introduced bcmath_compat as a dependency:

https://github.com/ramsey/moontoast-math/pull/17

I took care to make sure that the unit tests passed, on Travis CI, on all versions of PHP, in my PR... :\

alexleclair commented 4 years ago

I submitted the PR to moontoast/math that introduced bcmath_compat as a dependency:

πŸ€¦β€β™‚ I had not seen that, ha! From the looks of it, moontoast/math works perfectly fine on heroku (PHP7.3.13) on its own, but not when used in conjunction with whatever it is Nova requires.

I'm happy to chalk it up to version entanglement πŸ€·β€β™‚

BnitoBzh commented 4 years ago

Here is the Heroku support response :

The issue here is your update of moontoast/math from 1.1.2 to 1.2.1

1.1.2 required ext-bcmath: https://packagist.org/packages/moontoast/math#1.1.2

1.2.1 uses phpseclib/bcmath_compat instead: https://packagist.org/packages/moontoast/math#1.2.1

The issue that follows then is that phpseclib/bcmath_compat via its composer.json metadata provides the ext-bcmath extension, but that extension is marked as replaced (because it's bundled with PHP) by PHP 7.3.13.

A replace is a provide plus a conflict, and that's why PHP 7.3.13 (with ext-bcmath available as a shared extension) conflicts.

This doesn't happen on your local machine because dependency resolution works differently there - your regular composer install step is working, but on Heroku, what's failing is the "platform install" step that installs PHP and all necessary extensions, not userland dependencies, using a special custom repository and installer, and a composer.json generated from your composer.lock.

I don't think there is a way to work around this, short of you transitioning to e.g. brick/math (moontoast/math is marked as abandoned), or downgrading to moontoast/math 1.1.2. I'll put it on the list of things to investigate on our side, but it's a very fundamental aspect of how Composer handles dependencies, and how we have to resolve app requirements, that make it an edge case we'll not likely be able to fix.

Hope this helps, and sorry I don't have happier news.

terrafrost commented 4 years ago

It kinda sounds like Heroku has gives PHP versions, themselves, composer.json files ("using a special custom repository and installer"). Interesting.

terrafrost commented 4 years ago

I guess one thing bcmath_compat could do is to not "provide" ext-bcmath but the problem with that is that a package that has ext-bcmath as a dependency on a server that doesn't have bcmath would then fail to work (Docker PHP containers, by default, don't have bcmath installed; I think that's the most common use case for this shim)

Composer seems to load from the cache, by default. Maybe Heroku could alter their cache'd version of bcmath_compat. Maybe they could locally mirror bcmath_compat with Satis, changing their locally mirror'd copy of Satis to remove the "provide".

e.g. brick/math (moontoast/math is marked as abandoned)

That's a change that Laravel Nova would need to make...

alexleclair commented 4 years ago

Yep, sounds like a Heroku issue rather than a bcmath_compat issue.

Until Nova fixes their dependency, people can use the aforementioned workaround to revert back to a previous moontoast/math by requiring a previous version and making composer believe it is the newest :

composer require moontoast/math "1.1.2 as 1.999.999"
MCKLtech commented 4 years ago

Thank you all, really appreciate the insight. I deleted my vendor folder, then:

composer require moontoast/math "1.1.2 as 1.999.999"

Followed by a composer install.

But I am still receiving the following error when I push to Heroku:

Problem 1

  • don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13
    • composer.json/composer.lock requires php ^7.3.0 -> satisfiable by php[7.3.13].
    • Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

Anyone have any ideas?

Edit:

I thought I had mistyped by php version but when I changed, as per Heroku docs, I get the same issue:

! > Problem 1 ! > - don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13 ! > - composer.json/composer.lock requires php ~7.3.0 -> satisfiable by php[7.3.13]. ! > - Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

alexleclair commented 4 years ago

@MCKLtech That's odd, this worked for me... did you commit the new composer.lock file as well?

Alternatively, you could load Nova through a local directory and manually edit its composer.json to load the exact 1.1.2 version instead of ^1.1.

Obviously, needing a composer install or composer update and the lockfile being commited, too, between each tries :|

MCKLtech commented 4 years ago

Thanks Alex, appreciate it the advice!

I took a fresh run at this:

Error:

  • Installation request for ocramius/package-versions 1.5.1 -> satisfiable by ocramius/package-versions[1.5.1].
  • don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13
  • ocramius/package-versions 1.5.1 requires php ^7.3.0 -> satisfiable by php[7.3.13].
  • Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

If I then change my root composer 'require' for php from:

"php": "^7.2"

to:

"php": "7.3.*"

And run the same steps again, the new Heroku error is:

  • don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13
  • composer.json/composer.lock requires php 7.3.* -> satisfiable by php[7.3.13].
  • Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

So, I seem to have resolved the error for ocramius/package-versions but the others remain.

I then started the steps again, but before I ran composer install I manually changed my /nova composer.json file to:

"moontoast/math": "1.1.2"

I then did the rest and pushed to Heroku:

  • don't install phpseclib/bcmath_compat 1.0.3|don't install php 7.3.13
  • composer.json/composer.lock requires php 7.3.* -> satisfiable by php[7.3.13].
  • Installation request for phpseclib/bcmath_compat 1.0.3 -> satisfiable by phpseclib/bcmath_compat[1.0.3].

Hence, I'm not sure if this is because of Heroku build packs or my code set up.

MCKLtech commented 4 years ago

Just to loop back, I decided to cut my losses and revert to a last known good commit. From there, I branched. I then:

composer require moontoast/math "1.1.2 as 1.999.999"

Followed by a composer update

I then updated Nova, and Spark, and again ran my composer update. I then pushed to Heroku.

I can't say for sure why, but it worked so it's possible my issues are related to my commits. If I can come up with a better answer than that, I'll drop back.

Thanks all again for your help.

terrafrost commented 4 years ago

I think what I'll do is this:

When I get home I'll tag a new release of bcmath_compat: 1.0.4. In this new release I'll remove the "provides" bit from composer.json. In theory it could break other setups but tbh Laravel Nova is probably accounting for 99% of the usage of this library (altho I have no idea what percentage of Laravel Nova installs are running on Heroku).

Maybe I'll create a 2.0.0 tag as well wherein the "provides" will be included.

Then when I update bcmath_compat to use phpseclib 3.0 I'll create a 3.0.0 tag and a 4.0.0 tag.

It's a suboptimal solution but I think it's the most practical one available to us idk.

ramsey commented 4 years ago

Would changing it to provide "ext-bcmath": "*" fix the problem? I wonder if there’s a version mismatch in the extension but Composer is only reporting a problem with the PHP version.

ramsey commented 4 years ago

To clarify what I mean, I wonder if changing this:

    "provide": {
      "ext-bcmath": "7.3.5"
    }

to this:

    "provide": {
      "ext-bcmath": "*"
    }

will solve the problem.

ramsey commented 4 years ago

This looks like it could be relevant: https://devcenter.heroku.com/articles/php-support#using-optional-extensions

You may declare any optional extensions you want to use via composer.json using Composer Platform Packages; simply prefix any of the identifiers in the list of extensions above with β€œext-” in the package name.

For example, to enable bcmath, MCrypt, Memcached, and the third-party MongoDB:

{
   "require": {
       "ext-bcmath": "*",
       "ext-mcrypt": "*",
       "ext-memcached": "*",
       "ext-mongodb": "^1.1.0"
   }
}

It is recommended that you use β€œ*” as the version selector when specifying extensions that are bundled with PHP, as their version numbers can be highly inconsistent (they often report their version as β€œ0”).

terrafrost commented 4 years ago

I know I said I'd do the composer.json update last night but I got home a lot later than I expected from work and immediately crashed due to exhaustion. I'll try ramsey's suggestions, first, and then if that leads to failing unit tests (see my next post) on Travis CI I'll implement my proposal.

terrafrost commented 4 years ago

@ramsey

There's an old mcrypt_compat PR that made that package "provide" "ext-mcrypt: *" but that broke the unit tests on Travis CI:

https://github.com/phpseclib/mcrypt_compat/pull/2

The solution, in that case, was to make mcrypt_compat "provide" "ext-bcmath". I'll try it out but I'm not hopeful. And I think "require" works differently than "provide" anyway.

I'll try it out on terrafrost/bcmath_compat but I'm skeptical!

terrafrost commented 4 years ago

provide: ext-bcmath: *

This breaks all of the unit tests. On PHP 7.x we get errors like this (from Composer):

  [InvalidArgumentException]                     
  Package is not installed: ext-bcmath-7.0.33.0

https://travis-ci.org/terrafrost/bcmath_compat/jobs/635204306

(the exact version the error reports on depends on the PHP version installed)

On PHP 5.6 the error message looks like this:

  [InvalidArgumentException]                    
  Package is not installed: ext-bcmath-0.0.0.0  

So that's a non-starter.

provide: ext-bcmath: 0

This works a lot better on PHP 7.x:

https://travis-ci.org/terrafrost/bcmath_compat

But it's still failing on PHP 5.x with the same error as above.

moontoast/math requires PHP > 5.3.3 so failure on PHP 5.x is relevant.

(as is bcmath_compat should work on PHP >= 5.3.3; the only reason Travis CI doesn't do run tests on PHP versions that old is because last time I did "serious" work with .travis.yml for this project I didn't know you could specify the distribution to expand PHP support)

Conclusion

I think I'm gonna proceed with my original idea of removing the "provide". I'll hold off on creating a 2.0.0 branch for the time being just to see if we get any bug reports. Creating a 2.0.0 branch just kinda seems inelegant and maybe it won't even be an issue idk.

terrafrost commented 4 years ago

I've tagged a new release - 1.0.4 - that removes the provides thing from composer.json.

I still stand by my statement that this is a Heroku bug. It sounds like they're using a custom Composer setup. If Heroku wants to continue to use their custom Composer setup I think they should do one of the following:

Either way this is not a fix that should live in bcmath_compat but this also seems to me like a bit of a David and Goliath situation, with bcmath_compat being David and Heroku being Goliath, so whatever.

ramsey commented 4 years ago

I still stand by my statement that this is a Heroku bug.

I agree. The docs I linked to even say that they use composer.json to determine what extensions to install in the PHP environment for your deployments, so they're clearly doing something that Composer isn't designed for (yet).

ramsey commented 4 years ago

I still stand by my statement that this is a Heroku bug.

Pinging @dzuelke. Is this something you're able to look into, to rule out whether this is a Heroku issue? πŸ˜„

dzuelke commented 4 years ago

Hi.

To clarify what's going on on Heroku, and why this is failing... this is not happening during the regular composer install, but during the installation of PHP (and extensions). The "main" installation of app dependencies is not custom, and uses a standard Composer install without proprietary changes.

But before that step can even be done, we need PHP installed, and all the right extensions that the app (and its dependencies) require, otherwise composer install would immediately fail.

To achieve that on Heroku, we parse the app's composer.lock, extract all packages with platform dependencies (php, ext-foobar, etc), and translate that into a new composer.json where the dependencies are like heroku-sys/php, heroku-sys/ext-foobar, and so forth).

This composer.json is then composer installed (against a custom repository, e.g. https://lang-php.s3.amazonaws.com/dist-heroku-18-stable/packages.json and using a custom installer) to install binaries of PHP and any required extensions.

The reason it's done this way is that dependency graphs for platform package requirements in a composer.json can be complex, and the only way to ensure we're installing the right thing(s) is to mirror the same package structure and requirements as the main project, otherwise we'd always run into situations where the later composer install for the app dependencies fails.

Example: your project requires php:* and ext-redis:*, that should give you PHP 7.3.latest and ext-redis 5.latest.

But if your project requires php:* and ext-redis:3.*, you'll get PHP 7.2, since ext-redis v3 is not compatible with 7.3.

Multiply that by the number of php and ext-… require and conflict rules in all dependent composer.json files, and it should be clear why some hand-written logic that first tries to install the latest PHP 7.3 and then just fails in the next step (when trying to install ext-redis v5) would constantly lead to frustration for users - we want a git push heroku master to "just work" by figuring out the right set of things to install.

Now the issue with ext-bcmath is that it's built into PHP, and the package manifest for each PHP build (heroku-sys/php package) on Heroku contains heroku-sys/ext-bcmath as a replace declaration, because provide would be incorrect - we want to avoid the installation of an "external" ext-bcmath (e.g. when someone builds one into a custom "platform" repository for use on Heroku).

This is, however, only really a requirement for extensions that are not built as shared (and ext-bcmath is built as shared). I'll investigate whether the package definitions could be changed in such a way that shared extensions are provided instead, but IIRC there was a particular reason (internal to Composer) why we went with replace for everything back when this was implemented.

Example generated "platform" composer.json (from an app's composer.lock):

{
  "config": {
    "cache-files-ttl": 0,
    "discard-changes": true
  },
  "minimum-stability": "stable",
  "prefer-stable": false,
  "provide": {
    "heroku-sys/cedar": "14.2020.01.10"
  },
  "require": {
    "composer.json/composer.lock": "dev-44c755d72e579138785ca11db85fb0f2",
    "consoletvs/invoices": "1.5.0",
    "moontoast/math": "1.2.1",
    "phpseclib/bcmath_compat": "1.0.3",
    "phpseclib/phpseclib": "2.0.23",
    "heroku-sys/apache": "^2.4.10",
    "heroku-sys/nginx": "^1.8.0"
  },
  "require-dev": {},
  "repositories": [
    {
      "packagist": false
    },
    {
      "type": "path",
      "url": "…/support/installer/",
      "options": {
        "symlink": false
      }
    },
    {
      "type": "composer",
      "url": "https://lang-php.s3.amazonaws.com/dist-heroku-18-stable/"
    },
    {
      "type": "package",
      "package": [
        {
          "type": "metapackage",
          "name": "consoletvs/invoices",
          "version": "1.5.0",
          "require": {
            "heroku-sys/ext-bcmath": "*"
          },
          "replace": {},
          "provide": {},
          "conflict": {}
        },
        {
          "type": "metapackage",
          "name": "moontoast/math",
          "version": "1.2.1",
          "require": {
            "heroku-sys/php": ">=5.3.3"
          },
          "replace": {},
          "provide": {},
          "conflict": {}
        },
        {
          "type": "metapackage",
          "name": "phpseclib/bcmath_compat",
          "version": "1.0.3",
          "require": {},
          "replace": {},
          "provide": {
            "heroku-sys/ext-bcmath": "7.3.5"
          },
          "conflict": {}
        },
        {
          "type": "metapackage",
          "name": "phpseclib/phpseclib",
          "version": "2.0.23",
          "require": {
            "heroku-sys/php": ">=5.3.3"
          },
          "replace": {},
          "provide": {},
          "conflict": {}
        },
        {
          "type": "metapackage",
          "name": "composer.json/composer.lock",
          "version": "dev-44c755d72e579138785ca11db85fb0f2",
          "require": {
            "heroku-sys/php": "7.3.*"
          },
          "replace": {},
          "provide": {},
          "conflict": {}
        }
      ]
    }
  ]
}

Example package definition for PHP 7.3.13 from the custom Heroku repository for platform installation:

{
  "conflict": {
    "heroku-sys/hhvm": "*"
  },
  "dist": {
    "type": "heroku-sys-tar",
    "url": "https://lang-php.s3.amazonaws.com/dist-heroku-18-stable/php-7.3.13.tar.gz"
  },
  "extra": {
    "export": "bin/export.php.sh",
    "profile": "bin/profile.php.sh",
    "shared": {
      "heroku-sys/ext-bcmath": true,
      "heroku-sys/ext-calendar": true,
      "heroku-sys/ext-exif": true,
      "heroku-sys/ext-ftp": true,
      "heroku-sys/ext-gd": true,
      "heroku-sys/ext-gettext": true,
      "heroku-sys/ext-gmp": true,
      "heroku-sys/ext-imap": true,
      "heroku-sys/ext-intl": true,
      "heroku-sys/ext-ldap": true,
      "heroku-sys/ext-mbstring": true,
      "heroku-sys/ext-pcntl": true,
      "heroku-sys/ext-pdo_sqlite": true,
      "heroku-sys/ext-shmop": true,
      "heroku-sys/ext-soap": true,
      "heroku-sys/ext-sodium": true,
      "heroku-sys/ext-sqlite3": true,
      "heroku-sys/ext-xmlrpc": true,
      "heroku-sys/ext-xsl": true
    }
  },
  "name": "heroku-sys/php",
  "provide": {},
  "replace": {
    "heroku-sys/ext-PDO": "self.version",
    "heroku-sys/ext-Phar": "self.version",
    "heroku-sys/ext-Reflection": "self.version",
    "heroku-sys/ext-SPL": "self.version",
    "heroku-sys/ext-SimpleXML": "self.version",
    "heroku-sys/ext-Zend-OPcache": "self.version",
    "heroku-sys/ext-bcmath": "self.version",
    "heroku-sys/ext-bz2": "self.version",
    "heroku-sys/ext-calendar": "self.version",
    "heroku-sys/ext-ctype": "self.version",
    "heroku-sys/ext-curl": "self.version",
    "heroku-sys/ext-date": "self.version",
    "heroku-sys/ext-dom": "20031129",
    "heroku-sys/ext-exif": "self.version",
    "heroku-sys/ext-fileinfo": "self.version",
    "heroku-sys/ext-filter": "self.version",
    "heroku-sys/ext-ftp": "self.version",
    "heroku-sys/ext-gd": "self.version",
    "heroku-sys/ext-gettext": "self.version",
    "heroku-sys/ext-gmp": "self.version",
    "heroku-sys/ext-hash": "self.version",
    "heroku-sys/ext-iconv": "self.version",
    "heroku-sys/ext-imap": "self.version",
    "heroku-sys/ext-intl": "self.version",
    "heroku-sys/ext-json": "1.7.0",
    "heroku-sys/ext-ldap": "self.version",
    "heroku-sys/ext-libxml": "self.version",
    "heroku-sys/ext-mbstring": "self.version",
    "heroku-sys/ext-mysqli": "self.version",
    "heroku-sys/ext-mysqlnd": "0",
    "heroku-sys/ext-openssl": "self.version",
    "heroku-sys/ext-pcntl": "self.version",
    "heroku-sys/ext-pcre": "self.version",
    "heroku-sys/ext-pdo_mysql": "self.version",
    "heroku-sys/ext-pdo_pgsql": "self.version",
    "heroku-sys/ext-pdo_sqlite": "self.version",
    "heroku-sys/ext-pgsql": "self.version",
    "heroku-sys/ext-posix": "self.version",
    "heroku-sys/ext-readline": "self.version",
    "heroku-sys/ext-session": "self.version",
    "heroku-sys/ext-shmop": "self.version",
    "heroku-sys/ext-soap": "self.version",
    "heroku-sys/ext-sockets": "self.version",
    "heroku-sys/ext-sodium": "self.version",
    "heroku-sys/ext-sqlite3": "self.version",
    "heroku-sys/ext-tokenizer": "self.version",
    "heroku-sys/ext-xml": "self.version",
    "heroku-sys/ext-xmlreader": "self.version",
    "heroku-sys/ext-xmlrpc": "self.version",
    "heroku-sys/ext-xmlwriter": "self.version",
    "heroku-sys/ext-xsl": "self.version",
    "heroku-sys/ext-zip": "1.15.4",
    "heroku-sys/ext-zlib": "self.version",
    "heroku-sys/php-64bit": "self.version"
  },
  "require": {
    "heroku-sys/heroku": "^18.0.0",
    "heroku/installer-plugin": "^1.2.0"
  },
  "time": "2019-12-19 17:44:37",
  "type": "heroku-sys-php",
  "version": "7.3.13"
}
ramsey commented 4 years ago

Thanks, @dzuelke!

naderman commented 4 years ago

Wanted to mention that in Composer v2 a replace will no longer conflict with a provide for the same name. So the underlying problem there will be resolved if you use Composer2.

naderman commented 4 years ago

To expand on that: It is correct for this library to provide ext-bcmath, and this library should add provide back to its composer.json. There is simply a bug in Composer v1 that is making this a problem with the particular heroku setup @dzuelke described.

terrafrost commented 4 years ago

Thanks @naderman ! I've tagged a new release - 1.0.5!

morrislaptop commented 4 years ago

Soooo for anyone coming from Google... What's the recommendation for Heroku users? Lock 1.0.4 until Heroku fixes their custom use of composer?

MCKLtech commented 4 years ago

Soooo for anyone coming from Google... What's the recommendation for Heroku users? Lock 1.0.4 until Heroku fixes their custom use of composer?

I did some updating yesterday, hit the same error and used my solution above to "fix" it.

calvinmuller commented 4 years ago

no clue out of reading this whole thread - on how to fix the issue on heroku. Same issue with php7.4

MCKLtech commented 4 years ago

no clue out of reading this whole thread - on how to fix the issue on heroku. Same issue with php7.4

https://github.com/phpseclib/bcmath_compat/issues/1#issuecomment-572606992

I had the same issue this week and did this, it worked.

morrislaptop commented 4 years ago

@calvinmuller run composer require phpseclib/bcmath_compat:1.0.4 which locks the version at 1.0.4 which contained the fix (removed in 1.0.5)

mathieutu commented 4 years ago

Hi! Thanks guys for all of this (and big up to @morrislaptop for the summary). Also been stuck today with that.

@terrafrost It could be useful to pin that issue, and write a litle thing about it in the readme, because seeing that error I had no idea of what to do, and came here to read the readme. Only a google search brought me to this issue.

Thanks!

terrafrost commented 4 years ago

@mathieutu - good ideas! I've done both! I also edited the title to be more relevant since this topic is now pinned.

barnwell commented 4 years ago

Thanks @mathieutu! composer require phpseclib/bcmath_compat:1.0.4 worked for me.

Gigamick commented 3 years ago

@calvinmuller run composer require phpseclib/bcmath_compat:1.0.4 which locks the version at 1.0.4 which contained the fix (removed in 1.0.5)

My god - thank you. Can you pin this? lol

mathieutu commented 3 years ago

Wanted to mention that in Composer v2 a replace will no longer conflict with a provide for the same name. So the underlying problem there will be resolved if you use Composer2. https://github.com/phpseclib/bcmath_compat/issues/1#issuecomment-618951036

I've tried today, so normally with composer 2 on heroku, and it still doesn't work with v1.0.5 πŸ˜•.

terrafrost commented 3 years ago

I've tried today, so normally with composer 2 on heroku, and it still doesn't work with v1.0.5 πŸ˜•.

Maybe try submitting a bug report to Composer then?

mathieutu commented 3 years ago

I've opened an issue in composer repo: https://github.com/composer/composer/issues/9572

(Pinging @naderman on that πŸ˜‡)