Skip to content

Fix options#6

Merged
lohanidamodar merged 12 commits into
mainfrom
fix-options
Oct 29, 2025
Merged

Fix options#6
lohanidamodar merged 12 commits into
mainfrom
fix-options

Conversation

@abnegate
Copy link
Copy Markdown
Member

@abnegate abnegate commented Oct 20, 2025

Summary by CodeRabbit

  • Refactor

    • Improved fluent-interface compatibility across many authentication/hash APIs for more consistent method chaining.
    • Standardized Argon2 option keys to memory_cost/time_cost and aligned related setter return types.
  • Tests

    • Reorganized test namespaces and added assertions to verify hashes include explicit memory, time and threads markers (m=, t=, p=).
  • Chores

    • Added formatter configuration, updated lint/format scripts, CI workflow, and build base images.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Oct 20, 2025

Walkthrough

This PR changes many fluent-return types from self to static across auth, hash, and proof classes. Argon2 internal option keys were renamed from memoryCost/timeCost to memory_cost/time_cost, and its setters’ return types were updated; tests were updated to assert Argon2 hash fields (m=..., t=..., p=...). Test namespaces moved from Utopia\Tests\Auth\Hashes to Utopia\Tests\Auth\Algorithms. PHPass removed an explicit is_int check for byte-count guards. Adds pint.json, updates composer lint/format scripts, upgrades GitHub Actions checkout to v4, and updates Dockerfile base images and scrypt extension path.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Potential review focus areas:

  • src/Auth/Hashes/Argon2.php and tests/Auth/Algorithms/Argon2Test.php (option key names, setter signatures, and hash-field assertions).
  • Widespread fluent-return type changes across src/Auth/* and src/Auth/Hashes/* (ensure chaining behavior and inheritance compatibility).
  • src/Auth/Hashes/PHPass.php (removed is_int guard in getRandomBytes/encode64).
  • Tests namespace changes (tests/Auth/Algorithms/*) — test autoloading and discovery.
  • CI/tooling changes: pint.json, composer scripts, GitHub Actions workflow, and Dockerfile updates.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title "Fix options" is vague and generic, failing to convey meaningful information about the changeset. While the PR does include a change to Argon2 option keys (converting from camelCase to snake_case), the title does not adequately describe this specific change. More significantly, the changeset contains substantial additional modifications, including systematic return type changes from self to static across numerous hash implementation classes and related fluent interface methods, test namespace reorganization, GitHub workflow updates, and infrastructure changes. The title lacks specificity about what was actually "fixed" and does not help a developer quickly understand the primary intent or scope of the changes. Consider revising the title to be more specific and descriptive. For example, "Update fluent interface return types to static" or "Refactor return types and Argon2 options" would better capture the scope of changes. If the primary goal is fixing Argon2 option keys, the title should clarify this (e.g., "Use snake_case for Argon2 option keys").
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-options

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ec91631 and 61ade83.

📒 Files selected for processing (2)
  • .github/workflows/code-ql-analysis.yml (1 hunks)
  • Dockerfile (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • Dockerfile
  • .github/workflows/code-ql-analysis.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lohanidamodar lohanidamodar merged commit 5ad0ded into main Oct 29, 2025
4 checks passed
@lohanidamodar lohanidamodar deleted the fix-options branch October 29, 2025 07:12
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.

2 participants