cloudfoundry / php-buildpack

A Cloud Foundry Buildpack for PHP.
Apache License 2.0
142 stars 346 forks source link

PHP version >=7.3 not available #288

Closed nicolaskuster closed 5 years ago

nicolaskuster commented 5 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

min_cli_version: 639.1 api_version: 2.126.0 osbapi_version: 2.14 cf version: 6.42.0+0cba12168.2019-01-10

What version of the buildpack you are using? 4.3.70

If you were attempting to accomplish a task, what was it you were attempting to do? Push the app with PHP >=7.3 (defined in composer.json)

What did you expect to happen? Deploying the app with PHP version 7.3.*

What was the actual behavior? I get the following warning:

WARNING: PHP version >=7.3 not available, using default version (7.2.14). In future versions of the buildpack, specifying a non-existent PHP version will cause staging to fail. See: http://docs.cloudfoundry.org/buildpacks/php/gsg-php-composer.html

And because of that composer fails while installing dependencies which are requires PHP 7.3. According to release notes, php 7.3.1 was added in the used buildpack version 4.3.70. But I can't get a app running with php 7.3.*

Please confirm where necessary:

cf push APP_NAME -b https://github.com/cloudfoundry/multi-buildpack
Pushing app  APP_NAME to org ORG_NAME space SPACE_NAME as EMAIL...
Getting app info...
Updating app with these attributes...
  name:                    APP_NAME
  path:                   /Users/xy/www/app.local
  buildpacks:
    https://github.com/cloudfoundry/multi-buildpack
  disk quota:             1G
  health check timeout:   60
  health check type:      port
  instances:              1
  memory:                 128M
  stack:                  cflinuxfs2
  services:
    APP_DB
    APP_STORAGE
  env:
    APP_DEBUG
  routes:
   app-url.com

Updating app APP_NAME...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 316.56 KiB / 316.56 KiB [=============================================================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Cell 90db99be-e7d2-4cd1-aa04-1f2a22798529 creating container for instance f4d8327b-80d6-4167-a8ef-a9333ae30e8b
   Cell 90db99be-e7d2-4cd1-aa04-1f2a22798529 successfully created container for instance f4d8327b-80d6-4167-a8ef-a9333ae30e8b
   Downloading build artifacts cache...
   Downloading app package...
   Downloaded app package (15.7M)
   Downloaded build artifacts cache (53.3M)
   -----> Download go 1.9.1
   -----> Running go build compile
   -----> Multi Buildpack version 1.0.3
   -----> Running buildpacks:
          https://github.com/cloudfoundry/apt-buildpack
          https://github.com/cloudfoundry/php-buildpack
   -----> Download go 1.11.4
   -----> Running go build supply
   /tmp/buildpackdownloads/1986c11e5045899f72e33ebceb13b732 ~
   ~
   -----> Apt Buildpack version 0.1.5
   -----> Updating apt cache
   -----> Downloading apt packages
   -----> Installing apt packages
   -------> Buildpack version 4.3.70
   WARNING: PHP version >=7.3 not available, using default version (7.2.14). In future versions of the buildpack, specifying a non-existent PHP version will cause staging to fail. See: http://docs.cloudfoundry.org/buildpacks/php/gsg-php-composer.html
   Installing HTTPD
   HTTPD 2.4.38
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/httpd/httpd-2.4.38-linux-x64-cflinuxfs2-0bc0a2a8.tgz] to [/tmp]
   Installing PHP
   PHP 7.2.14
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7-7.2.14-linux-x64-cflinuxfs2-60ae1266.tgz] to [/tmp]
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7-7.2.14-linux-x64-cflinuxfs2-60ae1266.tgz] to [/tmp]
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/composer/composer-1.8.3-7afeec5a.phar] to [/tmp]
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   100   482  100   482    0     0   1068      0 --:--:-- --:--:-- --:--:--  1071
   Loading composer repositories with package information
   Installing dependencies from lock file
   Your requirements could not be resolved to an installable set of packages.
     Problem 1
       - This package requires php 7.3.1 but your PHP version (7.2.14) does not satisfy that requirement.
   -----> Composer command failed
   Traceback (most recent call last):
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/scripts/compile.py", line 59, in <module>
       .from_build_pack('lib/additional_commands')
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/build_pack_utils/builder.py", line 212, in extensions
       process_extension(path, ctx, 'compile', process, args=[self])
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/build_pack_utils/utils.py", line 69, in process_extension
       success(getattr(extn, to_call)(*args))
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 444, in compile
       return composer.compile(install)
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/extension_helpers.py", line 154, in compile
       self._compile(install)
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 196, in _compile
       self.run()
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 343, in run
       *self._ctx['COMPOSER_INSTALL_OPTIONS'])
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 390, in run
       shell=True)
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/build_pack_utils/runner.py", line 109, in stream_output
       raise CalledProcessError(retcode, cmd)
   build_pack_utils.runner.CalledProcessError: Command '<open file '<fdopen>', mode 'w' at 0x7f5621059ae0>' returned non-zero exit status 2
          **ERROR** Unable to run all buildpacks: Failed to compile droplet: Failed to run finalize script: exit status 1
   Failed to compile droplet: Failed to compile droplet: exit status 13
   Exit status 223
   Cell 90db99be-e7d2-4cd1-aa04-1f2a22798529 stopping instance f4d8327b-80d6-4167-a8ef-a9333ae30e8b
   Cell 90db99be-e7d2-4cd1-aa04-1f2a22798529 destroying container for instance f4d8327b-80d6-4167-a8ef-a9333ae30e8b
Error staging application: App staging failed in the buildpack compile phase
FAILED
cf-gitbot commented 5 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/163784613

The labels on this github issue will be updated when the story is started.

dmikusa commented 5 years ago

You're on cflinuxfs2.

stack: cflinuxfs2

You need cflinuxfs3 for PHP 7.3. Try setting cf push -s cflinuxfs3.

chhhavi commented 5 years ago

Please reopen if it doesn't work with cflinuxfs3