Skip to content

Commit 957ac43

Browse files
Merge pull request #732 from jsonrainbow/Prepare-release-6
docs: Add changelog and upgrade documentation for version 6.0
2 parents 47708f5 + daee7cc commit 957ac43

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

CHANGELOG.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# CHANGELOG
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
### Added
10+
- Add URI translation, package:// URI scheme & bundle spec schemas ([#362](https://github.com/jsonrainbow/json-schema/pull/362))
11+
- Add quiet option ([#382](https://github.com/jsonrainbow/json-schema/pull/382))
12+
- Add option to disable validation of "format" constraint ([#383](https://github.com/jsonrainbow/json-schema/pull/383))
13+
- Add more unit tests ([#366](https://github.com/jsonrainbow/json-schema/pull/366))
14+
- Reset errors prior to validation ([#386](https://github.com/jsonrainbow/json-schema/pull/386))
15+
- Allow the schema to be an associative array ([#389](https://github.com/jsonrainbow/json-schema/pull/389))
16+
- Enable FILTER_FLAG_EMAIL_UNICODE for email format if present ([#398](https://github.com/jsonrainbow/json-schema/pull/398))
17+
- Add enum wrapper ([#375](https://github.com/jsonrainbow/json-schema/pull/375))
18+
- Add option to validate the schema ([#357](https://github.com/jsonrainbow/json-schema/pull/357))
19+
- Add support for "const" ([#507](https://github.com/jsonrainbow/json-schema/pull/507))
20+
- Added note about supported Draft versions ([#620](https://github.com/jsonrainbow/json-schema/pull/620))
21+
- Add linting GH action
22+
### Changed
23+
- Centralize errors ([#364](https://github.com/jsonrainbow/json-schema/pull/364))
24+
- Revert "An email is a string, not much else." ([#373](https://github.com/jsonrainbow/json-schema/pull/373))
25+
- Improvements to type coercion ([#384](https://github.com/jsonrainbow/json-schema/pull/384))
26+
- Don't add a file:// prefix to URI that already have a scheme ([#455](https://github.com/jsonrainbow/json-schema/pull/455))
27+
- Enhancement: Normalize` composer.json` ([#505](https://github.com/jsonrainbow/json-schema/pull/505))
28+
- Correct echo `sprintf` for `printf` ([#634](https://github.com/jsonrainbow/json-schema/pull/634))
29+
- Streamline validation of Regex ([#650](https://github.com/jsonrainbow/json-schema/pull/650))
30+
- Streamline validation of patternProperties Regex ([#653](https://github.com/jsonrainbow/json-schema/pull/653))
31+
- Switch to GH Actions ([#670](https://github.com/jsonrainbow/json-schema/pull/670))
32+
- Updated PHPStan
33+
- Remove unwanted whitespace ([#700](https://github.com/jsonrainbow/json-schema/pull/700))
34+
- Bump to v4 versions of GitHub actions ([#722](https://github.com/jsonrainbow/json-schema/pull/722))
35+
- Update references to jsonrainbow ([#725](https://github.com/jsonrainbow/json-schema/pull/725))
36+
### Deprecated
37+
- Mark check() and coerce() as deprecated ([#476](https://github.com/jsonrainbow/json-schema/pull/476))
38+
### Removed
39+
- Remove stale files from #357 (obviated by #362) ([#400](https://github.com/jsonrainbow/json-schema/pull/400))
40+
- Remove unnecessary fallbacks when args accept null
41+
- Removed unused variable in UndefinedConstraint ([#698](https://github.com/jsonrainbow/json-schema/pull/698))
42+
- Remove dead block of code ([#710](https://github.com/jsonrainbow/json-schema/pull/710))
43+
### Fixed
44+
- Add use line for InvalidArgumentException ([#370](https://github.com/jsonrainbow/json-schema/pull/370))
45+
- Add use line for InvalidArgumentException & adjust scope ([#372](https://github.com/jsonrainbow/json-schema/pull/372))
46+
- Add provided schema under a dummy / internal URI (fixes #376) ([#378](https://github.com/jsonrainbow/json-schema/pull/378))
47+
- Don't throw exceptions until after checking anyOf / oneOf ([#394](https://github.com/jsonrainbow/json-schema/pull/394))
48+
- Fix infinite recursion on some schemas when setting defaults (#359) ([#365](https://github.com/jsonrainbow/json-schema/pull/365))
49+
- Fix autoload to work properly with composer dependencies ([#401](https://github.com/jsonrainbow/json-schema/pull/401))
50+
- Ignore $ref siblings & abort on infinite-loop references ([#437](https://github.com/jsonrainbow/json-schema/pull/437))
51+
- Don't cast multipleOf to be an integer for the error message ([#471](https://github.com/jsonrainbow/json-schema/pull/471))
52+
- Strict Enum/Const Object Checking ([#518](https://github.com/jsonrainbow/json-schema/pull/518))
53+
- Return original value when no cast ([#535](https://github.com/jsonrainbow/json-schema/pull/535))
54+
- Allow `marc-mabe/php-enum` v2.x and v3.x. ([#464](https://github.com/jsonrainbow/json-schema/pull/464))
55+
- Deprecated warning message on composer install command ([#614](https://github.com/jsonrainbow/json-schema/pull/614))
56+
- Allow `marc-mabe/php-enum` v4.x ([#629](https://github.com/jsonrainbow/json-schema/pull/629))
57+
- Fixed method convertJsonPointerIntoPropertyPath in wrong class ([#655](https://github.com/jsonrainbow/json-schema/pull/655))
58+
- Fix type validation failing for "any" and false-y type wording ([#686](https://github.com/jsonrainbow/json-schema/pull/686))
59+
- Correct code style
60+
- Fix: Clean up `.gitattributes` ([#687](https://github.com/jsonrainbow/json-schema/pull/687))
61+
- Fix: Order `friendsofphp/php-cs-fixer` rules ([#688](https://github.com/jsonrainbow/json-schema/pull/688))
62+
- HTTP to HTTPS redirection breaks remote reference resolution ([#709](https://github.com/jsonrainbow/json-schema/pull/709))
63+
- Corrected several typos and code style issues

UPGRADE-6.0.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
UPGRADE FROM 5.3 to 6.0
2+
=======================
3+
4+
## Introduction
5+
6+
We are excited to release version 6.0 of our open-source package, featuring major improvements and important updates. This release includes several breaking changes from version 5.3 aimed at enhancing performance, security, and flexibility.
7+
8+
Please review the following breaking changes carefully and update your implementations to ensure compatibility with version 6.0. This guide provides key modifications and instructions for a smooth transition.
9+
10+
Thank you for your support and contributions to the project.
11+
12+
## Errors
13+
* `constraint` key is no longer the constraint name but contains more information in order to translate violations.
14+
15+
*Before*
16+
```php
17+
foreach ($validator->getErrors() as $error) {
18+
echo $error['constraint']; // required
19+
}
20+
```
21+
22+
*After*
23+
```php
24+
foreach ($validator->getErrors() as $error) {
25+
echo $error['constraint']['name']; // required
26+
}
27+
```

0 commit comments

Comments
 (0)