okta / okta-sdk-php

PHP SDK for the Okta API
Apache License 2.0
38 stars 71 forks source link

Unable to install in Laravel 7 application #84

Closed FrankPeters closed 3 years ago

FrankPeters commented 4 years ago

I am trying to install the Okta PHP SDK in a Laravel 7 application but I'm running into a version conflict with tightenco/collect.

This is the error:

Using version ^1.2 for okta/sdk
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - okta/sdk 1.2.0 requires tightenco/collect 5.8.31 -> satisfiable by tightenco/collect[v5.8.31].
    - Installation request for okta/sdk ^1.2 -> satisfiable by okta/sdk[1.2.0].
    - Conclusion: remove symfony/var-dumper v5.0.7
    - Conclusion: don't install symfony/var-dumper v5.0.7
    - tightenco/collect v5.8.31 requires symfony/var-dumper >=3.4 <5

I see that the latest version of tightenco/collect is set to accept:

"symfony/var-dumper": "^3.4 || ^4.0 || ^5.0"

Is it possible to upgrade this dependency to a later version (~7)?

LarryBarker commented 4 years ago

@FrankPeters I have had the worst time using this package with Laravel applications. I originally had issues installing into a L5.5 application, and managed to finagle a work around. Unfortunately, it is time to upgrade to L6 as L5.5 is aproaching EOL this August.

I was afraid there would be issues with tightenco/collect as it caused the majority of issues for me before. Seeing your issue here has just confirmed my fears.

Were you able to resolve the issue? I am no composer expert, but I am wondering if it is possible to simply require the version of tightenco/collect that is compatible with the version of Laravel being used? Tighten keeps the package in sync with Laravel releases, so you would think it would be possible to say "Hey, if we are using Laravel 6, install the most compatible version of tightenco/collect." or whatever.

Okta's lack of support for Laravel is very frustrating. You would think they would have 1st party support for such a popular framework.

malpertuis commented 4 years ago

@LarryBarker Hi, we solved it currently by adding tightenco/collect in the composer.json as follows: "tightenco/collect": "7.9.2 as 5.8.31"

This is by no means a proper fix, but its a good enough workaround till the time that Okta update there composer.json

LarryBarker commented 4 years ago

Which composer.json did you add this to? Your projects or you modified the packages?

On Tue, Jun 2, 2020 at 1:06 AM Vincent notifications@github.com wrote:

@LarryBarker https://github.com/LarryBarker Hi, we solved it currently by adding tightenco/collect in the composer.json as follows: "tightenco/collect": "7.9.2 as 5.8.31"

This is by no means a proper fix, but its a good enough workaround till the time that Okta update there composer.json

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/okta/okta-sdk-php/issues/84#issuecomment-637299174, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3HK7D3P7HBYPHVMOBQAU3RUSJEPANCNFSM4M2MM6PA .

malpertuis commented 4 years ago

To our projects composer.json

bretterer commented 3 years ago

Hello! I understand this is a rather old issue, but we are releasing a new version of the SDK that will include PHP8 support. This update also includes the switch to laravel/collection, which should solve this. Please let us know if this doesn't help.

FrankPeters commented 3 years ago

Thanks! I will close this issue then in anticipation of the new release.