Skip to content

Conversation

@scott-davidjones
Copy link

A lot of applications use their own configuration fiels (Laravel, craft etc)

The changes here allow a user to pass in parameters rather than rely on a config file in their vendor directory - which will be overwritten on update. User can pass:

  • Username
  • Password
  • Token Url
  • cURL options

I have added default cURL options but allowed the user to overwrite them due to differences in the preprod and live systems for exampel preprod does not like cURL version 4 and wont work if that is supplied (Version 1 is required).

I have also condensed some (not all) common functionality (AbstractPoint) for easier maintainability.

Signed-off-by: Scott-David Jones <[email protected]>
Pass parameter functionality to allow api to be included as part of standard composer dependencies, not requiring change of default configs and allowing user to pass parameters.

- sdk/autoload.php - added autoload of new AbstractPoint.php
- AbstractPoint.php - condensed duplicated code from child points.
- CDSApiClient.php - pass in curl options. Allow the user to specify curl options
- CDSApiSoapRequest.php - Current PreProd only allows SSL version 1 and Live allows SSL Version 4. This fixes the need to hard code versions between dev and live systems. Defaults to live version of parameters.

Signed-off-by: Scott-David Jones <[email protected]>
Signed-off-by: Scott-David Jones <[email protected]>
Signed-off-by: Scott-David Jones <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant