f2 api client#2
Conversation
af50995 to
317d224
Compare
95d30fd to
93e95c1
Compare
| $this->closed = 'true' === (string) $sxe->Closed; | ||
| $this->journalPlan = JournalPlan::fromSimpleXMLElement($sxe->JournalPlan); | ||
| $this->processInstruction = ProcessInstruction::fromSimpleXMLElement($sxe->ProcessInstruction); | ||
| $this->deadline = $this->createDateTime($sxe->Deadline); |
There was a problem hiding this comment.
Would deadline not be set to now if nothing is provided here?
public ?\DateTimeImmutable $deadline = null;
Makes me think it may be null.
The same would go for other uses of createDateTime.
| "symfony/options-resolver": "^6.4 || ^7.4 || ^8.1" | ||
| }, | ||
| "require-dev": { | ||
| "php": "^8.3", |
There was a problem hiding this comment.
Does this not belong in require rather than require-dev?
| $diff = new JsonDiff( | ||
| $caseFile->apiSerialize(), | ||
| $updatedCaseFile->apiSerialize(), | ||
| options: JsonDiff::SKIP_TEST_OPS, | ||
| ); |
There was a problem hiding this comment.
Should this not use computeDiff like matterUpdate and documentUpdate?
| $diff = new JsonDiff( | |
| $caseFile->apiSerialize(), | |
| $updatedCaseFile->apiSerialize(), | |
| options: JsonDiff::SKIP_TEST_OPS, | |
| ); | |
| $diff = $this->computeDiff($caseFile, $updatedCaseFile); |
There was a problem hiding this comment.
And should it check the $diff for any changes before actually patching akin to matterUpdate and documentUpdate?
| #[Option(description: 'Path to to cache directory. If not specified, no requests will be cached.')] | ||
| ?string $cacheDirectory = null, |
There was a problem hiding this comment.
From what i can see leaving out --cache-directory ends up with FilesystemAdapter just using a default directory? I.e. it is still cached?
| protected function getAccessToken(): array | ||
| { | ||
| $cache = $this->getCache(); | ||
| $cacheKey = sha1(__METHOD__); |
There was a problem hiding this comment.
Should we make this involve credentials used? Looks me like a switch of credentials would not result in a new access token issued and cached.
F2 API client for PHP