onesignal icon indicating copy to clipboard operation
onesignal copied to clipboard

Enable it for php8.1

Open MuhammadSulman opened this issue 2 years ago • 2 comments

It's not applicable for the php8.1 version Selection_001 .

MuhammadSulman avatar May 30 '22 11:05 MuhammadSulman

You can easily create a fork for this.

I've already done it so you can skip steps 1-3 but for the sake of education I included it.

  1. Click "Fork" on github.
  2. Create a new branch called "fix-laravel9" (obviously can be anything)
  3. Edit composer.json to allow php8.1 and laravel 9
  4. Add this to your composer.json
"repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/robjbrain/onesignal"
        }
    ],
"require": {
...
"laravel-notification-channels/onesignal": "dev-fix-laravel9"
}
  1. run composer update

Then it will work!

What this is doing is telling composer to look at the forked repo but still use the original name.

You have to use a different branch name and prefix it with "dev". I don't know why that is, presumably hard coded into composer in some way.

robjbrain avatar Jun 23 '22 12:06 robjbrain

@robjbrain Thanks for your reply or time and for sharing your knowledge.

teamappelit avatar Jun 23 '22 12:06 teamappelit