Repository navigation
Release 2.7.0: plaintext comparison for encrypted fields, Flatten with InferRules, FloatCast finite, PHPStan level 6 - #14
Merged
Conversation
…h InferRules, FloatCast finite, PHPStan level 6 - equals(), diff() and the Eloquent casts compare EncryptedCast fields by their decrypted value; diff() still reports ciphertexts. Saving an unchanged model no longer rewrites the encrypted column. - A required #[Flatten] property under #[InferRules] no longer demands a key that never exists; the nested rules apply to the parent's keys. - FloatCast(finite: true) rejects INF and NAN (opt-in). - PHPStan level 6 with array, iterable and generic types across src. - Docs: XML entity handling, comparison of encrypted and hidden fields.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixed
equals(),diff(),DataObjectCast::compare()andDataCollectionCast::compare()compareEncryptedCastfields by their decrypted value. Equal objects no longer differ because eachtoArray()draws a new nonce, and saving an unchanged model no longer rewrites the encrypted column.diff()still reports ciphertexts, never plaintext (S1-09).#[Flatten]property under#[InferRules]rejected valid flat input ("address is required"); the nested rules now apply to the parent's own keys. Nullable/defaulted#[Flatten]keeps the prefixed rules (S3-F16).Added (opt-in)
FloatCast(finite: true)rejectsINF/NAN(e.g.1e400in JSON) at hydration (S3-F11).Changed
src; fixtures exempt frommissingType.*.Performance
equals()615 → 603 ns;diff()+1–4% (one static property read). The plaintext pass runs only when the compared objects actually encrypted something.Verification
Backward compatible with 2.6.x.