Skip to content

Technical debt #5

@maciej-sz

Description

@maciej-sz

This issue tracks the technical debt todos.

Features

  • add __set_state methods on all domain objects

Enhancements

  • Improve TransportFactory - use better system for detecting 3rd party libraries along with versions (not only class_exists)
  • decide whether or not to rely on sorting provided by API, or add additional sorting on the repository layer

Refactor

Tests

  • refactor all calls from $this->expectException to self::expectException and from $this->assert* to self::assert*
  • move calls to expectException just before the exception occurs
  • add e2e tests using var_export (requires the __set_state feature)
  • refactor tests to use provide specific data sets, example: function fetchApiExxhangeRates($date, $date2) { return $this->fetchArray("/api/exchangerates/tables/$date1/$date2" ...; move array shapes there
  • Change all non-mock objects to be created by createStub method instead of createMock
  • Replace willReturnOnConsecutiveCalls and willReturnMap with expectations (according to the latest PhpUnit 10 guidelines)

CI/CD

  • Add Deptrac
  • Run tests on multiple PHP versions

Documentation

  • add array shapes to all typehints in dockblocks instead of array
  • write documentation using https://www.mkdocs.org/
  • add a diagram of the package architecture

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions