Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ultipro Sdk Php Bundle Laravel Package

brianfreytag/ultipro-sdk-php-bundle

View on GitHub
Deep Wiki
Context7

Getting Started

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.

  1. Installation:

    composer require brianfreytag/ultipro-sdk-php-bundle
    

    Run php artisan vendor:publish --provider="Ultipro\Bundle\UltiproServiceProvider" to publish config.

  2. 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');
    

Implementation Patterns

Workflow Integration

  • Authentication: The package handles OAuth2 token management under the hood. Use Ultipro::authenticate() if needed (though auto-refresh is default).
  • API Calls: Wrap API calls in a service layer for reusability:
    class EmployeeService {
        public function fetchEmployees() {
            return Ultipro::get('/employees')->json();
        }
    }
    
  • Error Handling: Use Laravel’s exception handling or extend the package’s UltiproException:
    try {
        Ultipro::post('/employees', $data);
    } catch (\Ultipro\Exceptions\UltiproException $e) {
        Log::error($e->getMessage());
    }
    

Configuration

  • Dynamic Config: Override defaults via config/ultipro.php:
    'timeout' => 30, // Default: 10 seconds
    'debug' => env('ULTIPRO_DEBUG', false),
    

Gotchas and Tips

Symfony 8 Compatibility (v2.0.0)

  • No Breaking Changes: The upgrade to Symfony 8 is internal and does not affect Laravel users. Test thoroughly if using custom Symfony components.
  • Dependency Conflicts: If you rely on older Symfony packages (e.g., symfony/http-client:^5), resolve conflicts via composer why-not or composer why.

Debugging

  • Enable Debug Mode:
    ULTRIPRO_DEBUG=true
    
    Logs API requests/responses to storage/logs/ultipro.log.
  • Token Refresh: If tokens fail silently, verify ULTRIPRO_CLIENT_SECRET and check config/ultipro.php for auto_refresh_tokens.

Extension Points

  • Custom HTTP Client: Bind your own GuzzleHttp\Client via the service provider:
    $this->app->singleton(\GuzzleHttp\Client::class, function () {
        return new \GuzzleHttp\Client(['timeout' => 60]);
    });
    
  • Middleware: Add request/response middleware via the Ultipro facade’s withMiddleware() method.

Note: This release is a maintenance update. No new features or breaking changes require action beyond dependency updates.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky