brianfreytag/ultipro-sdk-php-bundle
This package (ultipro-sdk-php-bundle) provides an SDK for integrating with Ultipro's HR/HCM APIs in Laravel. For v2.0.0, the primary focus is Symfony 8 compatibility—no new features or breaking changes are introduced in this release.
Installation:
composer require brianfreytag/ultipro-sdk-php-bundle
Run php artisan vendor:publish --provider="Ultipro\Bundle\UltiproServiceProvider" to publish config.
First Use Case:
Configure the SDK via .env or config/ultipro.php:
ULTRIPRO_CLIENT_ID=your_client_id
ULTRIPRO_CLIENT_SECRET=your_secret
ULTRIPRO_BASE_URL=https://api.ultipro.com
Use the facade or service container to interact with Ultipro APIs:
$response = Ultipro::get('/employees');
Ultipro::authenticate() if needed (though auto-refresh is default).class EmployeeService {
public function fetchEmployees() {
return Ultipro::get('/employees')->json();
}
}
UltiproException:
try {
Ultipro::post('/employees', $data);
} catch (\Ultipro\Exceptions\UltiproException $e) {
Log::error($e->getMessage());
}
config/ultipro.php:
'timeout' => 30, // Default: 10 seconds
'debug' => env('ULTIPRO_DEBUG', false),
symfony/http-client:^5), resolve conflicts via composer why-not or composer why.ULTRIPRO_DEBUG=true
Logs API requests/responses to storage/logs/ultipro.log.ULTRIPRO_CLIENT_SECRET and check config/ultipro.php for auto_refresh_tokens.GuzzleHttp\Client via the service provider:
$this->app->singleton(\GuzzleHttp\Client::class, function () {
return new \GuzzleHttp\Client(['timeout' => 60]);
});
Ultipro facade’s withMiddleware() method.Note: This release is a maintenance update. No new features or breaking changes require action beyond dependency updates.
How can I help you explore Laravel packages today?