protonemedia / laravel-ffmpeg

This package provides an integration with FFmpeg for Laravel. Laravel's Filesystem handles the storage of the files.
https://protone.media/en/blog/how-to-use-ffmpeg-in-your-laravel-projects
MIT License
1.67k stars 194 forks source link

Not possible to install this package in a Laravel 10 project #490

Open CharlieBrownCharacter opened 1 year ago

CharlieBrownCharacter commented 1 year ago

I'm trying to run this project in a laravel 10 project.

Project specs

composer.json

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "php": "^8.2",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^11.0",
        "laravel/sanctum": "dev-develop",
        "laravel/tinker": "dev-develop"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "laravel/sail": "dev-develop",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^7.0",
        "phpunit/phpunit": "^10.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "branch-alias": {
            "dev-master": "11.x-dev"
        },
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Whenever I run sail composer require pbmedia/laravel-ffmpeg I get:

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

  Problem 1
    - pbmedia/laravel-ffmpeg[1.0.0, ..., 1.3.0] require php ^7.0 -> your php version (8.2.6) does not satisfy that requirement.
    - pbmedia/laravel-ffmpeg[2.0.0, ..., 2.1.1, 3.0.0, ..., 3.0.2] require php ^7.1 -> your php version (8.2.6) does not satisfy that requirement.
    - pbmedia/laravel-ffmpeg[4.0.0, ..., 4.1.0] require php ^7.1.3 -> your php version (8.2.6) does not satisfy that requirement.
    - pbmedia/laravel-ffmpeg[dev-v7-std-listener, dev-v7-video-attachted-pic, 5.0.0, ..., 5.0.1, 6.0.0, 7.0.0, ..., 7.4.1] require php ^7.2 -> your php version (8.2.6) does not satisfy that requirement.
    - pbmedia/laravel-ffmpeg[7.5.0, ..., 7.5.1] require illuminate/bus ^6.0|^7.0|^8.0 -> found illuminate/bus[v6.0.0, ..., 6.x-dev, v7.0.0, ..., 7.x-dev, v8.0.0, ..., 8.x-dev] but these were not loaded, likely because it conflicts with another require.
    - pbmedia/laravel-ffmpeg[7.5.2, ..., 7.5.12] require league/flysystem ^1.0.34 -> found league/flysystem[1.0.34, ..., 1.x-dev] but the package is fixed to 3.15.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - pbmedia/laravel-ffmpeg[dev-v7-modernized, 7.6.0, ..., 7.x-dev] require league/flysystem ^1.1.4 -> found league/flysystem[1.1.4, ..., 1.x-dev] but the package is fixed to 3.15.1 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - pbmedia/laravel-ffmpeg[dev-resolve-driver-lazily, dev-temp-encrpyted-hls, dev-laravel-9, dev-feature/pass-temporary-root-through, dev-php-8.2, 8.0.0, ..., 8.2.2] require illuminate/contracts ^9.0 -> found illuminate/contracts[v9.0.0-beta.1, ..., 9.x-dev] but these were not loaded, likely because it conflicts with another require.
    - pbmedia/laravel-ffmpeg[dev-main, 8.3.0] require illuminate/contracts ^9.0|^10.0 -> found illuminate/contracts[v9.0.0-beta.1, ..., 9.x-dev, v10.0.0, ..., 10.x-dev] but these were not loaded, likely because it conflicts with another require.
    - Root composer.json requires pbmedia/laravel-ffmpeg * -> satisfiable by pbmedia/laravel-ffmpeg[dev-resolve-driver-lazily, dev-temp-encrpyted-hls, dev-main, dev-v7-std-listener, dev-v7-video-attachted-pic, dev-v7-modernized, dev-laravel-9, dev-feature/pass-temporary-root-through, dev-php-8.2, 1.0.0, ..., 1.3.0, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 3.0.0, 3.0.1, 3.0.2, 4.0.0, 4.0.1, 4.1.0, 5.0.0, 5.0.1, 6.0.0, 7.0.0, ..., 7.x-dev, 8.0.0, ..., 8.3.0, 9999999-dev].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require pbmedia/laravel-ffmpeg:*" to figure out if any version is installable, or "composer require pbmedia/laravel-ffmpeg:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
isarjanfaza commented 1 year ago

I also this problem not install in laravel 10 & php 8.1 please check and help me

connecteev commented 1 year ago

Works fine for me

php artisan --version
Laravel Framework 10.19.0
diff --git a/composer.json b/composer.json
index b1b97ac..d0a28d4 100644
--- a/composer.json
+++ b/composer.json
@@ -18,6 +18,7 @@
         "laravel/tinker": "^2.8",
+        "pbmedia/laravel-ffmpeg": "^8.3",
         "spatie/laravel-markdown": "^2.3",
         "spatie/shiki-php": "^1.3",
         "stripe/stripe-php": "^10.16",