Skip to content

v2.0.0 — PHP 8.1+, modern API, same scores - #11

Merged
davmixcool merged 8 commits into
masterfrom
2.x
Aug 19, 2026
Merged

davmixcool merged 8 commits into
masterfrom
2.x

Conversation

@davmixcool

Copy link
Copy Markdown
Owner

Merges the v2 line into master. master becomes a PHP 8.1+ codebase.
Anyone tracking dev-master will need PHP 8.1; 1.x remains maintained for
older runtimes.

Scores are unchanged

tests/fixtures/baseline.json is byte-identical to 1.3.0 across all 355
pinned cases, verified on PHP 8.1–8.4. This is a modernization, not a scoring
release.

What's in it

  • PHP 8.1+, full types, encapsulated internals, zero deprecations
    (failOnDeprecation="true" enforces it)
  • New API: analyze(), analyzeMany(), withLexicon(), SentimentResult
    — all opt-in; getSentiment() is unchanged and still returns the same array
  • PHPStan level 5 in CI
  • MIGRATION.md enumerating every accepted break
  • NOTICE.md — attribution and MIT license for the bundled VADER lexicons,
    which previously shipped with no stated provenance

Verification

  • CI green across PHP 8.1/8.2/8.3/8.4
  • composer matrix --fresh — fresh dependency install per version
  • git diff 1.3.0 -- tests/fixtures/baseline.json empty

@davmixcool
davmixcool merged commit f5fbfc4 into master Aug 19, 2026
8 checks passed
@davmixcool
davmixcool deleted the 2.x branch August 19, 2026 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant