Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

MARCO_1992's avatar

ntimyeboah/laravel-database-trigger incompatible

Hello. I want to install the laravel-database-trigger package from ntimyeboah but i get this error message:

Could not find package ntimyeboah/laravel-database-trigger in any version matching your PHP version, PHP extensions and Composer version

This is the cutout of my composer.json file:


"require": {
        "php": "^7.3|^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel-lang/lang": "~8.0",
        "laravel/fortify": "^1.7",
        "laravel/framework": "^8.12",
        "laravel/tinker": "^2.5",
        "santigarcor/laratrust": "^6.3",
        "yajra/laravel-datatables-oracle": "^9.15"
    },
    "require-dev": {
        "barryvdh/laravel-debugbar": "^3.5",
        "beyondcode/laravel-query-detector": "^1.5",
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^0.0.5",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },

Does anyone know where the problem is?

0 likes
28 replies
neilstee's avatar

@marco_1992 are you for some reason using Laravel 8? Looks like that package doesn't support Laravel 8 but only Laravel 7 and below.

MARCO_1992's avatar

I have tried it but get the same error as before :/

neilstee's avatar

@marco_1992 you are clearly doing something wrong here, I just tried that now and everything was installed perfectly.

Can you try doing that on a fresh Laravel install?

MARCO_1992's avatar

I have tried it on a fresh Laravel install, but i get the same error. Does it matter at which position your code is added in the composer.json file?

Or do you add additional code in the file?

Here is my file:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
  "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/DariusIII/laravel-database-trigger"
        }
    ],
    "require": {
        "php": "^7.3|^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.12",
        "laravel/tinker": "^2.5"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "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-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
MARCO_1992's avatar

Can you give me an example how to use triggers with db facade? i thought the way and syntax with the package is easier?!

neilstee's avatar

@sr57 good point! I wasn't paying attention to the usage of the package but only to how to install it.

sr57's avatar

Hi @neilstee

I've noticed that this time you're getting a little off track, but you're doing a good job overall. Have a day and thanks for your helps to the community.

neilstee's avatar

@sr57 what is that supposed to mean?!

The question here was he can't install a certain package and not "is this the best package for this task?".

Although it's good you have pointed that this package was not needed for a certain task, but I think my solution wasn't "off track".

And lastly, this is not a job. I'm helping the community using my time and effort so I think you should be kind with your words because every effort does count. It doesn't need to be measure or what.

But thanks, I'll be more "aware" to the question next time. 🙂

sr57's avatar

@neilstee

Whaoh !!!! comminication is always a difficult art ...

I'll wrote to be kind with you, to thank yo and it seems I hurt you ... APPOLOGIES ... english is not my mother language.

But thanks, I'll be more "aware" to the question next time

You answer to the question this time too, I never wrote or want to write other thing.

Do you want me to erase my post?

neilstee's avatar

@sr57 all good mate! no need for apologies! we are all learning here and I'm glad people like you are willing to help the community! I've been seeing you answering questions here always.

MARCO_1992's avatar

Thank you both so much for your help. I think I will do it without a package.

But my original question would still be. Why can't I install the package?

neilstee's avatar

@marco_1992 I have installed a fresh Laravel 8 and did what I suggest to you above and it all working fine.

I'm not sure if this helps but I'm using composer v2. What composer version you are running?

MARCO_1992's avatar

And I don't know why it doesn't work. I did a fresh new laravel 8 installation just like you did. And then I add the lines in my composer.json file

sr57's avatar

Hi @marco_1992

I did a fresh new laravel 8 installation

Ok

add the lines in my composer.json file

Please share your exact composer.json , the command you did and the error you got.

MARCO_1992's avatar

Here is my composer.json file:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/DariusIII/laravel-database-trigger"
        }
    ],
    "require": {
        "php": "^7.3|^8.0",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "laravel/framework": "^8.12",
        "laravel/tinker": "^2.5"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "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-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

I run this command:

composer require DariusIII/laravel-database-trigger

And i got the following error message:

 [InvalidArgumentException]
  Package DariusIII/laravel-database-trigger has a PHP requirement  
   incompatible with your PHP version, PHP extensions and Composer  
   version                                                           
                                                                     

require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]... 
neilstee's avatar
neilstee
Best Answer
Level 34

@marco_1992 I would not suggest this but you can bypass this using --ignore-platform-reqs:

composer require DariusIII/laravel-database-trigger --ignore-platform-reqs
neilstee's avatar

@marco_1992 but please be aware that you are ignoring the required version of PHP to use this package.

So I suggest upgrading your PHP if you have any trouble.

MARCO_1992's avatar

Okay. But I think, than I have to downgrade php because I think php 8 is the problem.

Please or to participate in this conversation.