Skip to content

Improve documentation, add PHP 8.1-8.5 CI matrix, and refactor codebase - #13

Merged
lazerg merged 7 commits into
mainfrom
update
Jan 28, 2026
Merged

Improve documentation, add PHP 8.1-8.5 CI matrix, and refactor codebase #13
lazerg merged 7 commits into
mainfrom
update

Conversation

@lazerg

@lazerg lazerg commented Jan 28, 2026

Copy link
Copy Markdown
Owner

This PR improves developer experience with comprehensive inline documentation and ensures compatibility across all supported PHP versions.

Documentation

  • Add docblocks with @param, @return, and @example to all trait methods
  • Each example uses DifficultyEnum showing real return values for quick IDE reference
  • Rewrite README with cleaner structure: installation, enum example, and organized method sections

CI & Compatibility

  • Update GitHub Actions to test against PHP 8.1, 8.2, 8.3, 8.4, 8.5
  • Fix PHP 8.1 compatibility by adding Pest v1.x support (Pest v2+ requires PHP 8.2)
  • Use shivammathur/setup-php action for reliable PHP version matrix

Code Quality

  • Add TooManyRandomValuesException for random() when count exceeds available cases
  • Add UndefinedCaseException for __callStatic() when case name doesn't exist
  • Refactor tests to use Pest it() syntax with descriptive names
  • Add DifficultyEnum test fixture used across all test files

@lazerg
lazerg requested a review from itsmirik January 28, 2026 17:28
@lazerg lazerg self-assigned this Jan 28, 2026
@lazerg lazerg added the enhancement New feature or request label Jan 28, 2026
@lazerg lazerg changed the title Improvements Improve documentation, add PHP 8.1-8.5 CI matrix, and refactor codebase Jan 28, 2026
@lazerg lazerg changed the title Improve documentation, add PHP 8.1-8.5 CI matrix, and refactor codebase Improve documentation, add PHP 8.1-8.5 CI matrix, and refactor codebase Jan 28, 2026
@lazerg
lazerg merged commit bedbe9d into main Jan 28, 2026
5 checks passed
@lazerg
lazerg deleted the update branch January 28, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant