NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #1132 most downloaded on Packagist
A fluent builder Schema.org types and ld+json generator
Last release 8 days ago
30 Sep 2026
Release timing varies
gaps range from 3 weeks to 13 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
71 releases · first in 2016
Escape the nonce attribute in toScript() output by @freekmurze in #249
Full Changelog: 5.0.1...5.0.2
Full Changelog: https://github.com/spatie/schema-org/compare/5.0.1...5.0.2
Add the missing Radiography constant to MedicalImagingTechnique and MedicalSpecialty
One column per quarter.
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.
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: 4.0.2...5.0.0
Escape HTML tags in toScript() output to prevent script break-out by @freekmurze in #242
toScript() output to prevent script break-out by @freekmurze in #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: 4.0.1...4.0.2
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 #241
Full Changelog: 4.0.0...4.0.1
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 </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 up
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: 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 #223
Full Changelog: 3.23.0...3.23.1
Full Changelog: https://github.com/spatie/schema-org/compare/3.23.0...3.23.1
Update generator to use schema v24 by @indyjonesnl in #201
Full Changelog: 3.22.0...3.23.0
Full Changelog: https://github.com/spatie/schema-org/compare/3.22.0...3.23.0
upgrade to schema.org v23 by @Gummibeer in #212
Full Changelog: https://github.com/spatie/schema-org/compare/3.21.0...3.22.0
upgrade to schema.org v22 by @Gummibeer in #211
Full Changelog: https://github.com/spatie/schema-org/compare/3.20.0...3.21.0
upgrade to schema.org v21 by @Gummibeer in #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
Nothing published for this version
- Drop PHP 7.4 Support - #174 - Add PHP 8.1 Support - #174
Add support for Laravel 9 - #176
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 - #166
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
- Add reflection support
- RDFa update
- Fix null values
- Fix pending Types
- RDFa update
- 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.Your coding agent can read these notes before it upgrades. Set up the MCP server →