Skip to content

Release 4.1.0

Choose a tag to compare

@DariusIII DariusIII released this 24 Feb 11:26
· 5 commits to main since this release

Release v4.1.0

Namespace rename:

  • Renamed root namespace from Net\NNTP to DariusIII\NetNntp:
    • Net\NNTP\Client → DariusIII\NetNntp\Client
    • Net\NNTP\Error → DariusIII\NetNntp\Error
    • Net\NNTP\Protocol\Client → DariusIII\NetNntp\Protocol\Client
    • Net\NNTP\Protocol\ResponseCode → DariusIII\NetNntp\Protocol\ResponseCode
  • Updated composer.json PSR-4 autoload to "DariusIII\\NetNntp\\": "src/"
  • Added autoload-dev PSR-4 entry for test namespace "DariusIII\\NetNntp\\Tests\\": "tests/"
  • Updated all source files, tests, docs, and examples to use new namespace

Removed all backward-compatible shims:

  • Deleted src/Protocol/Responsecode.php — the define() constants shim file
    • All NET_NNTP_PROTOCOL_RESPONSECODE_* global constants are no longer defined
    • Use the DariusIII\NetNntp\Protocol\ResponseCode enum instead
  • Removed files autoload entry from composer.json (no longer needed)
  • Removed all deprecated API v1.0 and v1.1 methods from Client:
    • quit() — use disconnect()
    • isConnected() — was deprecated wrapper
    • getArticleRaw() — use getArticle()
    • getHeaderRaw() — use getHeader()
    • getBodyRaw() — use getBody()
    • getNewNews() — use getNewArticles()
    • getReferencesOverview() — use getReferences()
  • Removed v1.0 connect shim (passing port as second arg) from both Client and Protocol\Client
  • Removed v1.1 class-name-as-string shim from getArticle(), getHeader(), getBody() — $implode is now strictly bool
  • Removed v1.0 multi-argument shim from post() — parameter is now string|array
  • Removed v1.0 two-argument shim from getOverview()

API tightening:

  • getNewGroups() / getNewArticles() $time parameter: mixed → int|string
  • _resolveTimestamp() now throws \InvalidArgumentException instead of returning Error
  • post() parameter now typed string|array (use mail() for the old multi-arg posting style)
  • Removed @package_version@ / @package_state@ PEAR placeholders from X-poster mail header

Tests:

  • Added testDeprecatedMethodsRemoved() — verifies all 7 removed methods no longer exist
  • Added testLegacyConstantsNoLongerDefined() — verifies global constants shim is gone
  • Added type-assertion tests for cleaned-up method signatures ($implode is bool, post() is string|array)
  • Removed all legacy constant shim tests (47 removed)
  • Removed deprecated method existence tests
  • Test suite: 290 tests, 441 assertions