Interface 'League\OAuth2\Server\Repositories\AccessTokenRepositoryInterface' not found

Created on 23 July 2020, over 4 years ago
Updated 22 August 2024, 3 months ago

When I update the database, I get

PHP Fatal error: Interface 'League\OAuth2\Server\Repositories\ClientRepositoryInterface' not found in C:\xampp\htdocs\vedanta_first\docroot\modules\contrib\simpleDrush command terminated abnormally due to an unrecoverable error. [error]

I have installed lightning core 5.1. when I attempt to update with drush

drush updb

I get

Error: Interface 'League\OAuth2\Server\Repositories\ClientRepositoryInterface' not found in
C:\xampp\htdocs\vedanta_first\docroot\modules\contrib\simple_oauth\src\Repositories\ClientRepository.php, line 10
_oauth\src\Repositories\ClientRepository.php on line 10

🐛 Bug report
Status

Active

Version

5.0

Component

Code

Created by

🇮🇳India Vasuki Raju

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇭🇺Hungary djg_tram

    Requires "league/oauth2-server" and some other packages. See composer.json.

  • I am getting the same error PHP Fatal error: Interface 'League\OAuth2\Server\Repositories\ClientRepositoryInterface' not found
    the root cause is the vendor directory is getting recreated as my application is running in container so the library "league/oauth2-server" is not being present in vendor and hence the error is encountered while running dbupdate.
    Can we keep the library in some other persistant storage and refer from there to autoload.

  • 🇭🇺Hungary djg_tram

    No, that's not how it works. If you use Docker, for instance, it's your responsibility to add dependent packages each time the container is rebuilt. I usually do it by adding an .sh script in an init folder, then referencing from the docker-compose.override.yml as

        volumes:
          - codebase:/var/www/html
          - ./init/30-composer.sh:/docker-entrypoint-init.d/30-composer.sh
    

    The actual script can call the usual composer require calls but if you want to make sure you only call them unless it's already installed, you can use:

    composer show | grep -q foo/bar || composer require foo/bar

Production build 0.71.5 2024