Closed mrspence closed 2 years ago
Thanks for the PR. Just a question regarding the usecase / workflow. Why would you not just store the orderID
and fetch the existing order to continue the process later on?
//Obtain ID and store it somewhere
$id = $order->getId();
//Load the order by the stored ID
$client->getOrder($id);
Closing this PR. Please re-open if this is still needed.
Fix #47
This pull request introduces...
Afosto\Acme\Data\Data.php
) for all 'data' classes under the namespaceAfosto\Acme\Data
namespaceData
classes (Afosto\Acme\Data\DataInterface.php
)Example use
Testing
The fork used to develop this pull request has been used in a staging area, to generate real LetsEncrypt certificates with success. This fork allows our staging area to run the certificate generation step by step, in different PHP instances.
No breaking changes detected (or expected).
This repo doesn't come with a testing suite and I didn't want to clutter this pull request! 😅
Use case
It is useful to be able to split an SSL Certificate generation over separate "Jobs" / PHP instances, particularly between running 'self tests' VS real LetsEncrypt tests for authorizations.
This commit allows Data objects to be JSON serialized / unserialized, so the developer can store an unfinished generation and the SSL Certificate generation can easily be picked up by a later PHP process.
This uses PHP's in-built JSON serialization interface and extends it to provide the useful helper functions as shown in the examples above..