The namespace of the JobRouter REST Client classes have changed from
\Brotkrueml\JobRouterClient
to
\JobRouter\AddOn\RestClient
The easiest way to update your code to the new namespace is to use search/replace in your project.
The package name (used in composer.json
) has changed from brotkrueml/jobrouter-client
to jobrouter/rest-client
.
With JobRouter REST Client 2.0 the minimum requirements have changed, supported are now:
- PHP ≥ 8.1
- JobRouter® ≥ 2022.1
On instantiation of the RestClient
class, no authentication is performed automatically
anymore. Call the authenticate()
method manually now before sending a request to the
REST API.
The authenticate()
method returns an instance to the class itself.
This way, one can use a fluent interface:
$restClient = (new RestClient($configuration))->authenticate();
// or:
(new RestClient($configuration))
->authenticate()
->request($method, $resource);
-
Incident
class:- On instantiation the step number must be passed as argument in the constructor.
- The
getStep()
method now returns always an integer, previously it was an integer or null. - The
getPool()
method now returns always an integer, previously it was an integer or null. - The
isSimulation()
method now returns always a boolean, previously it was a boolean or null. - The
setPriority()
method accepts only aPriority
enum, previously it was an integer or null. - The
getPriority()
method returns aPriority
enum, previously it was an integer or null.