Skip to content

Commit

Permalink
Merge pull request #63 from Crell/test-simplify
Browse files Browse the repository at this point in the history
Simplify tests
  • Loading branch information
Crell authored Jul 11, 2024
2 parents 97f480d + 493323f commit 8b4871d
Show file tree
Hide file tree
Showing 3 changed files with 261 additions and 781 deletions.
20 changes: 10 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,37 @@ All notable changes to `Serde` will be documented in this file.

Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## 1.2.0 - 2024-06-04

This release includes a small *breaking change*. The deformatter methods all now have nullable returns. This is necessary to allow for deserializing values that are legitimately and permissibly null. If you do not have any custom Importers, you should not be impacted. If you do have a custom Importer, you *may* need to adjust your logic to account for the return value from the deformatter being null.
## 1.3.0 - DATE

### Added
- `TypeField` is now `Transitive`, so you can implement a custom TypeField for a specific object, and it will apply anywhere it is used.
- `TypeField` is now `Inheritable`, too.
- There is a new `UnixTimeField` that can be applied to `DateTime*` properties. As it says on the tin, it serializes to/from a Unix timestamp integer, in second, millisecond, or microsecond resolution.
- Null values may now be excluded when serializing. See the `omitNullFields` and `omitIfNull` flags in the README.

### Deprecated
- Nothing

### Fixed
- Explicit null values in incoming data should now deserialize to null-valued properties, assuming the types permit.
- Greatly simplified and cleaned up the test suite.

### Removed
- Nothing

### Security
- Nothing

## 1.3.0 - DATE
## 1.2.0 - 2024-06-04

This release includes a small *breaking change*. The deformatter methods all now have nullable returns. This is necessary to allow for deserializing values that are legitimately and permissibly null. If you do not have any custom Importers, you should not be impacted. If you do have a custom Importer, you *may* need to adjust your logic to account for the return value from the deformatter being null.

### Added
- Null values may now be excluded when serializing. See the `omitNullFields` and `omitIfNull` flags in the README.
- `TypeField` is now `Transitive`, so you can implement a custom TypeField for a specific object, and it will apply anywhere it is used.
- `TypeField` is now `Inheritable`, too.
- There is a new `UnixTimeField` that can be applied to `DateTime*` properties. As it says on the tin, it serializes to/from a Unix timestamp integer, in second, millisecond, or microsecond resolution.

### Deprecated
- Nothing

### Fixed
- Nothing
- Explicit null values in incoming data should now deserialize to null-valued properties, assuming the types permit.

### Removed
- Nothing
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ parameters:
- tests
excludePaths:
- tests/Records/*
checkGenericClassInNonGenericObjectType: false
ignoreErrors:
- identifier: missingType.generics
# PHPStan whines about every match without a default, even if logically it's still complete.
- '#Match expression does not handle remaining value#'
# As far as I can tell, PHPStan is just buggy on explode(). It gives this error
Expand Down
Loading

0 comments on commit 8b4871d

Please sign in to comment.