thephpleague / oauth2-server-bundle

Symfony bundle for the OAuth2 Server.
MIT License
176 stars 86 forks source link

Using short namespace alias "LeagueOAuth2ServerBundle" #169

Closed geekabel closed 7 months ago

geekabel commented 8 months ago

Hey,

I'm on symfony 5.4 and I'm using PHP7.4 Same issue on symfony 6.0. with 8.0.2 just after install it . I get this error when I try to update my libraries. I've done some research but I can't find anything relevant.

 Context: Using short namespace alias "LeagueOAuth2ServerBundle" by calling Doctrine\ORM\Configuration::addEntityNamespace  
 Problem: Feature was deprecated in doctrine/persistence 2.x and is not supported by installed doctrine/persistence:3.x     
  Solution: See the doctrine/deprecations logs for new alternative approaches.

Can someone explain me why ?

@chalasr Do you have an idea of how to resolve that issue. Sorry to directly tagging you

RemyCampanals commented 8 months ago

Samething.

I installed thephpleague/oauth2-server-bundle for years for my projects and now i have this message with absolutely no clue what to do.

fxbt commented 8 months ago

This was fixed in #136 and released in the 0.5 version

geekabel commented 8 months ago

I've just seen this issue #148 and #136, but I have the impression that it's still blocked. As @tskorupka said in #148, when updating my dependencies, I got the previous error. I tried to use the technique of passing "doctrine/orm" to 2.14.1 before running my composer update again and it works. I don't know why it's necessary to do that but anyway...Thanks @fxbt .

chalasr commented 8 months ago

Can someone share a reproducing app? I know it's a bit of work, but I can't manage to reproduce this myself

geekabel commented 8 months ago

Here is a link to reproduce this error : https://github.com/geekabel/reproduce-app.git . When you do a composer update or composer install , you get the error @chalasr .

chalasr commented 8 months ago

@geekabel Unless I'm missing something the project doesn't even require this bundle so no error on my side. Did you forget to git push? :)

geekabel commented 8 months ago

@chalasr,You'll get the error when you install the library composer require league/oauth2-server-bundle . When I created the issue, I already had the library, so when I did a composer update I got the error

fxbt commented 8 months ago

@geekabel The package was not compatible with doctrine/persistence ^3.0 This was fixed in #136 and released in the v0.5.0 but since your Symfony version is fixed to 6.0.* (which is unmaintained since january), you're stuck with the v0.4.1, hence the error

geekabel commented 8 months ago

Thanks @fxbt I already solve my issue. As I write it before, I create new symfony project on 6.0.* to show the error to @chalasr as he ask.

chalasr commented 7 months ago

Closing as won't fix then. Thanks