EasyPost/easypost-php

[Bug]: \EasyPost\EasyPost::setApiKey no longer works

Closed this issue · 1 comments

Software Version

6.7.0

Language Version

8.1

Operating System

Linux

What happened?

  1. Downloaded latest (DID NOT USE COMPOSER)
  2. Included ./lib/easypost.php
  3. Tried to set api key
    ...
    Last time I installed the library manually there were broken dependency links and a patch was issued fixing this. I'm wondering if it's the same thing?

What was expected?

Sets the API key without issue and moves on.

Sample Code

\EasyPost\EasyPost::setApiKey($examplekey);

Relevant logs

Fatal error: Uncaught Error: Class "EasyPost\EasyPost" not found in...

The design pattern for this library has changed as of v6.0.0. Instead of setting a global API key, you need to create a Client. Please refer to our README and Upgrade Guide for more information.