[GH-ISSUE #220] Having problems setting up spotify api with composer #155

Closed
opened 2026-02-27 19:26:21 +03:00 by kerem · 2 comments
Owner

Originally created by @ericlove02 on GitHub (Jan 27, 2021).
Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/220

I am trying to connect the Spotify Web api to my project, and I thought I had done so but am getting this error:
Fatal error: Uncaught Error: Class 'SpotifyWebAPI\SpotifyWebAPI' not found in D:\wamp64\www\app.php on line 4

Whenever I try to install the package with 'composer require jwilsson/spotify-web-api-php' I get this error:
The package name composer require jwilsson/spotify-web-api-php is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+

I'm trying to install it on a project on a WAMP server, so I'm not sure if that is what is causing my problem or not. This is my first time using composer, so I may be doing something wrong.

Originally created by @ericlove02 on GitHub (Jan 27, 2021). Original GitHub issue: https://github.com/jwilsson/spotify-web-api-php/issues/220 I am trying to connect the Spotify Web api to my project, and I thought I had done so but am getting this error: Fatal error: Uncaught Error: Class 'SpotifyWebAPI\SpotifyWebAPI' not found in D:\wamp64\www\app.php on line 4 Whenever I try to install the package with 'composer require jwilsson/spotify-web-api-php' I get this error: The package name composer require jwilsson/spotify-web-api-php is invalid, it should be lowercase and have a vendor name, a forward slash, and a package name, matching: [a-z0-9_.-]+/[a-z0-9_.-]+ I'm trying to install it on a project on a WAMP server, so I'm not sure if that is what is causing my problem or not. This is my first time using composer, so I may be doing something wrong.
kerem 2026-02-27 19:26:21 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@jwilsson commented on GitHub (Jan 27, 2021):

Hey!
That's a strange error from Composer. What is the exact command you're running?

<!-- gh-comment-id:768590677 --> @jwilsson commented on GitHub (Jan 27, 2021): Hey! That's a strange error from Composer. What is the exact command you're running?
Author
Owner

@ericlove02 commented on GitHub (Jan 28, 2021):

I think I actually got it working. I think there was an issue with the compser.json file. I deleted it and ran composer require jwilsson/spotify-web-api-php and it seems to be working!

<!-- gh-comment-id:768782607 --> @ericlove02 commented on GitHub (Jan 28, 2021): I think I actually got it working. I think there was an issue with the compser.json file. I deleted it and ran composer require jwilsson/spotify-web-api-php and it seems to be working!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-web-api-php#155
No description provided.