- Instead of calling
Podio::setup(..)
you should create an instance ofPodioClient
and pass it to other methods.// Before: Podio::setup($client_id, $client_secret, $options); Podio::authenticate_with_password($username, $password); // After: $client = new PodioClient($client_id, $client_secret, $options); $client->authenticate_with_password($username, $password);
- All operations take an instance of
PodioClient
as the first argument.// Before: PodioItem::get(123); // After: PodioItem::get($client, 123);
- All operations are now static methods on the model classes.
Besides the
// Before: $item->save(); // After: PodioItem::save($client, $item);
save
methods in almost all objects, the following methods have changed:// Before: $podioTask->completed(); // After: PodioTask::complete($client, $podioTask->task_id); // Before: $podioTask->incompleted(); // After: PodioTask::incomplete($client, $podioTask->task_id); // Before: $podioTask->destroy(); // After: PodioTask::delete($client, $podioTask->task_id);
The following regex might help you find all relevant places in your codebase:
Podio\w*::\w+\(|->save\(|->completed\(\)|->incompleted\(\)|->destroy\(\)