PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, March 8, 2022

[FIXED] Composer Fails to Require unisharp/laravel-filemanager

 March 08, 2022     composer-php, laravel, php     No comments   

Issue

Whenever I try to install "unisharp/laravel-filemanager" using composer in a fresh Laravel environment I get the following issues.

  • https://puu.sh/FqzWP/ff3f22090c.png
  • https://puu.sh/FqzTJ/dc7e35be88.png
  • https://puu.sh/FqzUd/156f987ba1.png
  • https://puu.sh/FqzUL/e50b127661.png
  • https://puu.sh/FqzVb/dd5c552d21.png

To reproduce this all I have to do is run the following commands to setup a fresh Laravel project...

composer global require laravel/installer
laravel new MyNewLaravelWebsite
cd MyNewLaravelWebsite
composer require unisharp/laravel-filemanager

For whatever reason if I simply run "composer require unisharp/laravel-filemanager" outside of the MyNewLaravelWebsite folder the command works, but isn't applied in my Laravel project (obviously)...

My PHP version is 7.4.3. Here is my composer.json also...

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.2.5",
        "fideloper/proxy": "^4.2",
        "fruitcake/laravel-cors": "^1.0",
        "guzzlehttp/guzzle": "^6.3",
        "laravel/framework": "^7.0",
        "laravel/tinker": "^2.0"
    },
    "require-dev": {
        "facade/ignition": "^2.0",
        "fzaninotto/faker": "^1.9.1",
        "mockery/mockery": "^1.3.1",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "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"
        ]
    }
}

Solution

I found that version 1.9.2 of the package provided support for Laravel 7/7.3. So instead of installing 2.0 I installed 1.9.2 and this worked... I'm guessing support for Laravel 7 in the package version 2 will come later.... Here is how to require the correct package.

composer require unisharp/laravel-filemanager 1.9.2

Hope this helps someone.



Answered By - Rick
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing