spatie / php-structure-discoverer

Automatically discover classes within your PHP application
https://spatie.be/open-source
MIT License
147 stars 11 forks source link

Not compatible with laravel 11? laravel/framework replaces illuminate/collections #23

Closed MightyPork closed 3 months ago

MightyPork commented 3 months ago

I had to change the dependency to get collections to "laravel/framework": "^11.0", otherwise Composer complained that laravel/framework replaces illuminate/collections.

Possible I did something wrong of course.

My dependencies are:

    {
        "php": ">=8.2",
        "laravel-notification-channels/pushover": "^4.0",
        "laravel/framework": "^11.20",
        "laravel/helpers": "^1.7",
        "laravel/passport": "^12.0",
        "laravel/socialite": "5.12",
        "laravel/tinker": "^2.9",
        "laravel/ui": "^4.5",
        "laravel/vonage-notification-channel": "^3.3",
        "spatie/laravel-data": "^4.7.2",
        "spatie/laravel-ignition": "^2.8",
        "spatie/laravel-pjax": "^2.4",
    }

I fixed this by adding

  "repositories": [
        {
            "type": "path",
            "url": "sideload/spatie-php-structure-discoverer"
        },

and putting a fork of the library in a folder with modified composer.json

rubenvanassche commented 3 months ago

Hi I tried reproducing this myself but could not, could you please provide me a repository showing this? I'm gonna close this one for now but feel free to react.

MightyPork commented 3 months ago

I'll try but it's a huge company project so that can be difficult to repro on its own

Is it supposed to work then?

rubenvanassche commented 3 months ago

It should, though illuminate/collections is just a split from laravel/framework so replacing these isn't a problem normally.

MightyPork commented 3 months ago

I deleted vendor and now the issue does not happen anymore, must have been some corruption. Thanks for looking into it tho