skip to Main Content

I am trying to deploy a symfony4 app in cloudfoundry. I got an error with "composer/package-versions-deprecated":

  • Auto deploy(with gitlab-ci): I get this error below:
    sy

The same Error with cli local deploy(cf push)

composer.json:

 "minimum-stability": "beta",
    "prefer-stable": true,
    "repositories": [
   .......
    {
      "packagist": false
    },
    ...
  ],
    "require": {
        "php": "^7.1.3",
        "ext-ctype": "*",
        "ext-iconv": "*",
        "composer/package-versions-deprecated": "^1.10",
... 

PHP version: 7.2; Symfony: 4.4.9; Composer Version: 1.7.2

2

Answers


  1. Chosen as BEST ANSWER

    It caused by dist-Url(not authorized directly) in composer-lock.json

    it fixed by changing the URL: private repository under api.github:

    "dist": {
                "type": "zip",
                "url": "https://privateRepo... /api/composer/php-proxy-official/vcs-dists/zip/doctrine/reflection/55e71912dfcd824b2fdd16f2d9afe15684cfce79",
                    "reference": "55e71912dfcd824b2fdd16f2d9afe15684cfce79",
                    "shasum": ""
                },
    

  2. That is a network problem. It’s saying that Composer cannot resolve the DNS address for github.com.

    This could be a temporary problem, like if Github is having issues, but that’s unlikely. What’s more probable is that your Cloud Foundry operators have restricted access to the Internet. Perhaps through Application Security Groups, which is something that only an Operator with "admin" permissions can adjust.

    https://docs.cloudfoundry.org/concepts/asg.html

    The other possibility is that you can access the Internet but you must do so through a proxy. You would need to confirm with your Operators if this is true and if so, what proxy information you’d need to use. If, and it is solely up to your Platform Operations team, you can access the Internet through a proxy then your Ops team would need to configure it. They can do that globally with these instructions.

    https://docs.cloudfoundry.org/buildpacks/proxy-usage.html

    or you can do the same thing with cf set-env on a per-application basis.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search