NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1085 most downloaded on Packagist
A fluent builder Schema.org types and ld+json generator
Latest stable
5.0.2
Last release 1 months ago
30 Sep 2026
Release timing varies
gaps range from 3 weeks to 13 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
71 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
Escape the nonce attribute in toScript() output by @freekmurze in https://github.com/spatie/schema-org/pull/249
Full Changelog: https://github.com/spatie/schema-org/compare/5.0.1...5.0.2
Add the missing Radiography constant to MedicalImagingTechnique and MedicalSpecialty
Radiography constant to MedicalImagingTechnique and MedicalSpecialty (#248)The generator dropped every schema.org definition that declares more than one @type, which is why schema:Radiography never made it into the package.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Requires PHP 8.4. Support for PHP 8.2 and 8.3 has been dropped.
Requires PHP 8.4. Support for PHP 8.2 and 8.3 has been dropped.
Quantity is gone. schema.org v30.0 reclassified Quantity as a DataType (like Text and Number), so it is no longer generated as a class. Spatie\SchemaOrg\Quantity, Contracts\QuantityContract and Schema::quantity() have been removed.
Distance, Duration, Energy and Mass lost their inherited properties. Because their only parent was Quantity, they no longer declare the twelve Thing properties (name, description, url, identifier, …) and no longer implement ThingContract, IntangibleContract or QuantityContract. Calls like Schema::distance()->name('…') still work at runtime through BaseType::__call, but static analysis, IDE completion and instanceof checks against those contracts will not.
Thirteen new types: AuthenticateAction, ConferenceEvent, Credential, DENonprofitType, Error, ITNonprofitType, InstantaneousEvent, LoginAction, OperatingSystem, PerformingArtsEvent, ResetPasswordAction, RuntimePlatform, SequentialArt.
Full Changelog: https://github.com/spatie/schema-org/compare/4.0.2...5.0.0
Escape HTML tags in toScript() output to prevent script break-out by @freekmurze in https://github.com/spatie/schema-org/pull/242
toScript() output to prevent script break-out by @freekmurze in https://github.com/spatie/schema-org/pull/242Values containing </script> passed as schema properties could break out of the generated <script type="application/ld+json"> block and execute injected HTML when the value was attacker-controlled. toScript() now emits < and > as \u003C / \u003E, which is valid JSON-LD and is no longer parsed as an HTML tag by the browser. Affects 3.23.1 through 4.0.1.
Full Changelog: https://github.com/spatie/schema-org/compare/4.0.1...4.0.2
Resolve @id without cascading toArray() in ReferencedType by @freekmurze in https://github.com/spatie/schema-org/pull/241
Full Changelog: https://github.com/spatie/schema-org/compare/4.0.0...4.0.1
Upgrade schema.org definitions to v29.3 (#238 by @Soean)
JSON_UNESCAPED_SLASHES to toScript() outputBackport of the break-out fix (#242) onto the 3.x line, so projects still on spatie/schema-org 3.x can apply the security patch without upgrading to 4
Backport of the </script> break-out fix (#242) onto the 3.x line, so projects still on spatie/schema-org 3.x can apply the security patch without upgrading to 4.x.
toScript() now adds JSON_HEX_TAG to the json_encode flags. The < and > characters in property values are now serialized as their JSON unicode escapes instead of raw angle brackets, which is valid JSON-LD but cannot be parsed as an HTML tag. This neutralizes the break-out vector reported in the advisory (affected: 3.23.1 through 4.0.1).
Thanks to @hacklian for reporting (#243) and supplying the backport patch.
Full Changelog: https://github.com/spatie/schema-org/compare/3.23.1...3.23.2
Backport of the </script> break-out fix (#242) onto the 3.x line, so projects still on spatie/schema-org 3.x can apply the security patch without upgrading to 4.x.
toScript() now adds JSON_HEX_TAG to the json_encode flags, so < and > in property values are serialized as < / >. This is valid JSON-LD but cannot be parsed as an HTML tag, neutralizing the break-out vector reported in the advisory (affected: 3.23.1 through 4.0.1).
Thanks to @hacklian for reporting (#243) and supplying the backport patch.
Full Changelog: https://github.com/spatie/schema-org/compare/3.23.1...3.23.2
Unescape slashes in output by @patrickomeara in https://github.com/spatie/schema-org/pull/223
Full Changelog: https://github.com/spatie/schema-org/compare/3.23.0...3.23.1
Update generator to use schema v24 by @indyjonesnl in https://github.com/spatie/schema-org/pull/201
Full Changelog: https://github.com/spatie/schema-org/compare/3.22.0...3.23.0
upgrade to schema.org v23 by @Gummibeer in https://github.com/spatie/schema-org/pull/212
Full Changelog: https://github.com/spatie/schema-org/compare/3.21.0...3.22.0
upgrade to schema.org v22 by @Gummibeer in https://github.com/spatie/schema-org/pull/211
Full Changelog: https://github.com/spatie/schema-org/compare/3.20.0...3.21.0
upgrade to schema.org v21 by @Gummibeer in https://github.com/spatie/schema-org/pull/210
Full Changelog: https://github.com/spatie/schema-org/compare/3.19.0...3.20.0
upgrade to schema.org v20 by @Gummibeer in https://github.com/spatie/schema-org/pull/209
Full Changelog: https://github.com/spatie/schema-org/compare/3.18.0...3.19.0
upgrade to schema.org v19 by @Gummibeer in https://github.com/spatie/schema-org/pull/208
Full Changelog: https://github.com/spatie/schema-org/compare/3.17.0...3.18.0
upgrade to schema.org v18 by @Gummibeer in https://github.com/spatie/schema-org/pull/207
Full Changelog: https://github.com/spatie/schema-org/compare/3.16.0...3.17.0
upgrade to schema.org v17 by @Gummibeer in https://github.com/spatie/schema-org/pull/206
Full Changelog: https://github.com/spatie/schema-org/compare/3.15.0...3.16.0
upgrade to schema.org v16 by @Gummibeer in https://github.com/spatie/schema-org/pull/204
Full Changelog: https://github.com/spatie/schema-org/compare/3.14.0...3.15.0
Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/schema-org/pull/190
Full Changelog: https://github.com/spatie/schema-org/compare/3.13.0...3.14.0
add support for complex context by @Gummibeer in https://github.com/spatie/schema-org/pull/189
Full Changelog: https://github.com/spatie/schema-org/compare/3.12.0...3.13.0
Update generator to use schema v15 by @osopolar in https://github.com/spatie/schema-org/pull/188
Full Changelog: https://github.com/spatie/schema-org/compare/3.11.0...3.12.0
Rewrite tests to use pest instead of phpunit by @otsch in https://github.com/spatie/schema-org/pull/179
Full Changelog: https://github.com/spatie/schema-org/compare/3.10.0...3.11.0
- Drop PHP 7.4 Support - #174 - Add PHP 8.1 Support - #174
Add support for Laravel 9 by @Nielsvanpach in https://github.com/spatie/schema-org/pull/176
Full Changelog: https://github.com/spatie/schema-org/compare/3.8.0...3.9.0
Upgrade to schema.org:v13.0 - #167
Upgrade to schema.org:v12.0 - #170
Upgrade to schema.org:v11.01 - #169
- Upgrade to schema.org:v10 - Drop PHP 7.3 support - Add PHP 8.1 support
add custom \Spatie\SchemaOrg\Graph context support - #160
\Spatie\SchemaOrg\Graph context support - #160fix @id and identifier serialization for typed identifiers - #157
@id and identifier serialization for typed identifiers - #157- Add PHP 8.0 support
add \Spatie\SchemaOrg\ReferencedType to reference types in schemas and graphs - #155
\Spatie\SchemaOrg\ReferencedType to reference types in schemas and graphs - #155fix empty string property values - #153
add Multi-Typed-Entity support \Spatie\SchemaOrg\MultiTypedEntity - #148
\Spatie\SchemaOrg\MultiTypedEntity - #148Upgrade to schema.org:v9 which includes all extensions
- Upgrade to schema.org:v8
Generated files with new JSON-LD source - some methods have been dropped which aren't part of the corresponding types but were listed in old RDFa - it
Generated files with new JSON-LD source - some methods have been dropped which aren't part of the corresponding types but were listed in old RDFa - it's not a breaking release because of the same schema.org version and changes only because of schema file inconsistencies.
fix \BadMethodCallException message thrown in \Spatie\SchemaOrg\Graph
\BadMethodCallException message thrown in \Spatie\SchemaOrg\Graph\Spatie\SchemaOrg\Graph docblock @method annotationsadd identifiers to \Spatie\SchemaOrg\Graph nodes #124
\Spatie\SchemaOrg\Graph nodes #124- RDFa update
fix after malformed RDFa import twitter.com/ScreamingDev
- RDFa update
Fix types to implement their own contract
Use contracts as type-hints in doc-blocks
- Add PHP 7.4 support - Fix Graph magic call - RDFa update
Graph magic call- Drop PHP 7.2 support
- Drop PHP 7.1 support
- Drop PHP 7.0 support
fix identifier serialization - identifier to ld+json @id #102
- Add reflection support
latest schema RDFA - 2019-09-25 13:30 UTC
- Fix null values
- Fix pending Types
latest schema RDFA - 2019-05-28 09:20 UTC
- Add Graph support
Graph supportConvert invalid objects that have a __toString method to strings
__toString method to strings- Fix previous release
Use https protocol for Schema.org links
https protocol for Schema.org linksThis release probably doesn't contain any breaking changes for most people. It breaks all type checks (e.g. instanceof LocalBusiness), but doesn't cha…
BaseTypeinstanceof LocalBusiness), but doesn't change the way types are generated- Regenerated types
Added: Enumeration child types with constants, e.g. Spatie\Schema\DayOfWeek::Monday.
Enumeration child types with constants, e.g. Spatie\Schema\DayOfWeek::Monday.One column per quarter.