All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Updated types list from spatie/schema-org v3.23.
- Support usage with the new Symfony major version v7.
- Objects in an array with key
@graph
like in this example https://schema.org/Article#eg-0399, can now also be parsed. As well as child objects in an array (see the test case with the graph notation).
- If a schema.org object has a non string @type, it is ignored and a warning is logged, if the class has a logger.
- You can now optionally pass a PSR-3 LoggerInterface to the
SchemaOrg
class, so it'll log decoding errors.
- The
Json
class from the crwlr/utils is now used to decode JSON strings. It tries to fix keys without quotes, which is allowed in relaxed JSON. Further, JSON-LD <script> blocks containing an invalid JSON string are ignored and don't lead to an error anymore.
Initial version containing SchemaOrg
class that finds schema.org JSON-LD objects in HTML documents and converts them to instances of the classes from the spatie schema-org package.