Repository navigation
refactor(client): configure Client with the Config DTO - #52
Merged
Merged
Conversation
pekral
marked this pull request as ready for review
November 12, 2026 14:15
Collaborator
Author
Code ReviewStatus: clean Summary: 0 Critical · 0 Moderate · 0 Minor · 0 Refactoring · assignment conformance: conformant (#50: Client and CompanyClient take Config, README shows migration, BC break targeted at 2.0.0) · reviewer comments: none |
Client::__construct() now takes the existing final readonly Config DTO (and an optional HttpClient) instead of nine scalar parameters, matching CompanyClient, which already received a Config. CompanyClient derives its configuration through the new Config::withEvidence() copy method. BREAKING CHANGE: `new Client($url, $company, $user, $password, $evidence, $verifySSLCertificate, $authSessionId, $debugMode)` becomes `new Client(new Config(...the same values...))`. The README shows the migration. Closes #50
pekral
force-pushed
the
feat/client-config-dto
branch
from
November 12, 2026 14:30
9a6c3fc to
51dd384
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #50
TL;DR
Clientse nově konfiguruje jedním objektemConfigmísto devíti samostatných parametrů. Stejně se už konfigurujeCompanyClient. Jde o BC break pro major verzi 2.0.0.Změny
Client::__construct(Config $config, ?HttpClient $httpClient = null). StávajícíEcomailFlexibee\Configuž jefinal readonlyDTO se všemi hodnotami, takže nový typ není potřeba.CompanyClientsi odvozuje konfiguraci s evidencícpřes novou metoduConfig::withEvidence(), která vrací upravenou kopii.Přechod z 1.x
Merge danger
new Client(...)u uživatelů balíčku je potřeba upravit podle návodu výše. Chování klienta se nemění.Testování
composer checkprochází. Unit testy (ClientOfflineTest,CompanyClientTest, novýConfigTest) pokrývají všech 12 změněných řádků.ClientTestje přepsaný na nové API (běží proti demo serveru, v CI se nespouští).