1

I am getting the following error when I try to deploy my laravel project to azure windows web app using github.

but it is deploying fine if I use azure tool

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

  Problem 1
    - laravel/framework[v7.29.0, ..., 7.x-dev] require league/flysystem ^1.1 -> satisfiable by league/flysystem[1.1.0, ..., 1.x-dev].
    - league/flysystem[1.1.0, ..., 1.x-dev] require ext-fileinfo * -> it is missing from your system. Install or enable PHP's fileinfo extension.
    - Root composer.json requires laravel/framework ^7.29 -> satisfiable by laravel/framework[v7.29.0, ..., 7.x-dev].

To enable extensions, verify that they are enabled in your .ini files:
    - C:\tools\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

I have tried php --ini

C:\Program Files(x86)\PHP\v7.4\php.ini Scan for additional .ini files in:

and in that file it is enabled

extension=fileinfo

also here is my composer file

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.4 || ^8",
        "doctrine/dbal": "^2.13",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^6.3.1|^7.0.1",
        "laravel/framework": "^7.29",
        "laravel/tinker": "^2.5",
        "predis/predis": "^1.1",
        "tcg/voyager": "^1.4",
        "tymon/jwt-auth": "^1.0"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fakerphp/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.3",
        "phpunit/phpunit": "^8.5.8|^9.3.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "platform-check": false
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "repositories": {
        "hooks": {
            "type": "composer",
            "url": "https://larapack.io"
        }
    }
}
1
  • I am also facing the same issue. Commented Jul 28, 2021 at 13:48

1 Answer 1

4

After searching for 24 hours, I have found the solution. This is related to the php set up while deployment. To setup PHP with necessary extensions you will need to update your .yml file on GitHub repository (.github/workflows folder).

Add a new line to "Setup PHP >> with" step like "extensions: fileinfo"

If you need to enable any other extension, you can add all of the extensions as comma seperated.

Example:

- name: Setup PHP
      uses: shivammathur/setup-php@v2
      with:
        php-version: '7.4'
        extensions: fileinfo, pdo_mysql

Please read this documentation: https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support

Sign up to request clarification or add additional context in comments.

1 Comment

thank you. couldn't find a solution from anywhere. its working fine with bitbucket. issue hpnd with github

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.