PackageTrack
Sign in Get early access

spatie/schema-org

A fluent builder Schema.org types and ld+json generator

5.0.0 12M downloads/mo #1225 most downloaded on Packagist spatie/schema-org

What this package is like to depend on

Last release 16 days ago

07 Aug 2026

Release timing varies

gaps range from 3 weeks to 13 months

Nearly every release is documented

notes for 67 of 69 stable releases

Nothing withdrawn

no release was ever pulled

10 years old

69 releases · first in 2016

5 releases in the last 12 months

see the full history below

Release timeline

69 releases · Dec 2016 to Aug 2026
2017 2018 2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 60 of 69
  1. 5.0.0 07 Aug 2026
    Release notes

    Breaking changes

    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.

    Other changes

    Thirteen new types: AuthenticateAction, ConferenceEvent, Credential, DENonprofitType, Error, ITNonprofitType, InstantaneousEvent, LoginAction, OperatingSystem, PerformingArtsEvent, ResetPasswordAction, RuntimePlatform, SequentialArt.

    What's Changed

    New Contributors

    Full Changelog: 4.0.2...5.0.0

    Open source →
    Release notes

    Breaking changes

    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.

    Other changes

    Thirteen new types: AuthenticateAction, ConferenceEvent, Credential, DENonprofitType, Error, ITNonprofitType, InstantaneousEvent, LoginAction, OperatingSystem, PerformingArtsEvent, ResetPasswordAction, RuntimePlatform, SequentialArt.

    What's Changed

    • Upgrade schema.org definitions to v30.0 by @endelwar in https://github.com/spatie/schema-org/pull/244
    • Keep the ReferencedType generator template in sync with src by @freekmurze in https://github.com/spatie/schema-org/pull/246
    • Upgrade test suite to Pest 5 by @freekmurze in https://github.com/spatie/schema-org/pull/245

    New Contributors

    • @endelwar made their first contribution in https://github.com/spatie/schema-org/pull/244

    Full Changelog: https://github.com/spatie/schema-org/compare/4.0.2...5.0.0

    Open source →
  2. 4.0.2 20 Apr 2026
    Release notes

    What's Changed

    • Escape HTML tags in toScript() output to prevent script break-out by @freekmurze in #242

    Values 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

    Open source →
    Release notes

    What's Changed

    • Escape HTML tags in toScript() output to prevent script break-out by @freekmurze in https://github.com/spatie/schema-org/pull/242

    Values 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

    Open source →
  3. 4.0.1 16 Apr 2026
    Release notes

    What's Changed

    Full Changelog: 4.0.0...4.0.1

    Open source →
    Release notes

    What's Changed

    • 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

    Open source →
  4. 4.0.0 09 Feb 2026
    Release notes

    What's Changed

    • Upgrade schema.org definitions to v29.3 (#238 by @Soean)
    • Drop PHP 8.0 and 8.1 support (now requires PHP ^8.2)
    • Add PHP 8.5 support
    • Add JSON_UNESCAPED_SLASHES to toScript() output
    • Upgrade dev dependencies (Pest 2/3, PHPUnit 10, Symfony 6/7)
    • Upgrade phpunit.xml.dist to PHPUnit 10 format
    • Add return type declarations to generator commands
    Open source →
    Release notes

    What's Changed

    • Upgrade schema.org definitions to v29.3 (#238 by @Soean)
    • Drop PHP 8.0 and 8.1 support (now requires PHP ^8.2)
    • Add PHP 8.5 support
    • Add JSON_UNESCAPED_SLASHES to toScript() output
    • Upgrade dev dependencies (Pest 2/3, PHPUnit 10, Symfony 6/7)
    • Upgrade phpunit.xml.dist to PHPUnit 10 format
    • Add return type declarations to generator commands
    Open source →
  5. 3.23.2 29 May 2026
    Release notes

    What's Changed

    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

    Open source →
    Release notes

    What's Changed

    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

    Open source →
  6. 3.23.1 31 Jan 2025
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.23.0...3.23.1

    Open source →
    Release notes

    What's Changed

    • Unescape slashes in output by @patrickomeara in https://github.com/spatie/schema-org/pull/223
    • Update graham-campbell/analyzer by @freekmurze in https://github.com/spatie/schema-org/pull/224
    • Upgrade to schema.org v28.1 by @Soean in https://github.com/spatie/schema-org/pull/222

    New Contributors

    • @patrickomeara made their first contribution in https://github.com/spatie/schema-org/pull/223
    • @Soean made their first contribution in https://github.com/spatie/schema-org/pull/222

    Full Changelog: https://github.com/spatie/schema-org/compare/3.23.0...3.23.1

    Open source →
  7. 3.23.0 11 Jan 2024
    Release notes

    What's Changed

    New Contributors

    Full Changelog: 3.22.0...3.23.0

    Open source →
    Release notes

    What's Changed

    • Update generator to use schema v24 by @indyjonesnl in https://github.com/spatie/schema-org/pull/201
    • Schema 24 by @Gummibeer in https://github.com/spatie/schema-org/pull/213

    New Contributors

    • @indyjonesnl made their first contribution in https://github.com/spatie/schema-org/pull/201

    Full Changelog: https://github.com/spatie/schema-org/compare/3.22.0...3.23.0

    Open source →
  8. 3.22.0 11 Jan 2024
    Release notes

    What's Changed

    Full Changelog: 3.21.0...3.22.0

    Open source →
    Release notes

    What's Changed

    • 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

    Open source →
  9. 3.21.0 11 Jan 2024
    Release notes

    What's Changed

    Full Changelog: 3.20.0...3.21.0

    Open source →
    Release notes

    What's Changed

    • 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

    Open source →
  10. 3.20.0 11 Jan 2024
    Release notes

    What's Changed

    Full Changelog: 3.19.0...3.20.0

    Open source →
    Release notes

    What's Changed

    • 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

    Open source →
  11. 3.19.0 11 Jan 2024
    Release notes

    What's Changed

    • 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

    Open source →
  12. 3.18.0 11 Jan 2024
    Release notes

    What's Changed

    • 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

    Open source →
  13. 3.17.0 11 Jan 2024
    Release notes

    What's Changed

    • 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

    Open source →
  14. 3.16.0 11 Jan 2024
    Release notes

    What's Changed

    • 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

    Open source →
  15. 3.15.0 11 Jan 2024
    Release notes

    What's Changed

    • upgrade to schema.org v16 by @Gummibeer in https://github.com/spatie/schema-org/pull/204
    • add support/test-run for php8.3 by @Gummibeer in https://github.com/spatie/schema-org/pull/205

    Full Changelog: https://github.com/spatie/schema-org/compare/3.14.0...3.15.0

    Open source →
  16. 3.14.0 14 Feb 2023
    Release notes

    What's Changed

    • Add PHP 8.2 Support by @patinthehat in https://github.com/spatie/schema-org/pull/190
    • Add support for nonce attribute by @smortexa in https://github.com/spatie/schema-org/pull/191

    New Contributors

    • @patinthehat made their first contribution in https://github.com/spatie/schema-org/pull/190
    • @smortexa made their first contribution in https://github.com/spatie/schema-org/pull/191

    Full Changelog: https://github.com/spatie/schema-org/compare/3.13.0...3.14.0

    Open source →
  17. 3.13.0 14 Nov 2022
    Release notes

    What's Changed

    • 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

    Open source →
  18. 3.12.0 14 Nov 2022
    Release notes

    What's Changed

    • Update generator to use schema v15 by @osopolar in https://github.com/spatie/schema-org/pull/188

    New Contributors

    • @osopolar made their first contribution in https://github.com/spatie/schema-org/pull/188

    Full Changelog: https://github.com/spatie/schema-org/compare/3.11.0...3.12.0

    Open source →
  19. 3.11.0 11 Apr 2022

    Nothing published for this version

  20. 3.10.0 04 Mar 2022
    Release notes
    • Drop PHP 7.4 Support - #174
    • Add PHP 8.1 Support - #174
    Open source →
  21. 3.9.0 10 Feb 2022
    Release notes
    • Add support for Laravel 9 - #176
    Open source →
  22. 3.8.0 20 Oct 2021
    Release notes
    • Upgrade to schema.org:v13.0 - #167
    Open source →
  23. 3.7.0 06 Oct 2021
    Release notes
    • Upgrade to schema.org:v12.0 - #170
    Open source →
  24. 3.6.0 06 Oct 2021
    Release notes
    • Upgrade to schema.org:v11.01 - #169
    Open source →
  25. 3.5.0 05 Oct 2021
    Release notes
    • Upgrade to schema.org:v10 - #166
    • Drop PHP 7.3 support - #165
    • Add PHP 8.1 support - #165
    Open source →
  26. 3.4.0 10 May 2021
    Release notes
    • Add custom \Spatie\SchemaOrg\Graph context support - #160
    Open source →
  27. 3.3.0 02 Jan 2021
    Release notes
    • Fix @id and identifier serialization for typed identifiers - #157
    Open source →
  28. 3.2.1 28 Nov 2020
    Release notes
    • Add PHP 8.0 support
    Open source →
  29. 3.2.0 05 Nov 2020
    Release notes
    • Add \Spatie\SchemaOrg\ReferencedType to reference types in schemas and graphs - #155
    Open source →
  30. 3.1.1 22 Oct 2020
    Release notes
    • Fix empty string property values - #153
    Open source →
  31. 3.1.0 07 Oct 2020
    Release notes
    • Add Multi-Typed-Entity support \Spatie\SchemaOrg\MultiTypedEntity - #148
    Open source →
  32. 3.0.0 27 Aug 2020
    Release notes
    • Upgrade to schema.org:v9 which includes all extensions
    Open source →
  33. 2.16.0 27 Aug 2020
    Release notes
    • Upgrade to schema.org:v8
    Open source →
  34. 2.15.0 27 Aug 2020
    Release notes

    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.

    Open source →
  35. 2.14.1 10 Jun 2020
    Release notes
    • Fix \BadMethodCallException message thrown in \Spatie\SchemaOrg\Graph
    • Fix \Spatie\SchemaOrg\Graph docblock @method annotations
    Open source →
  36. 2.14.0 03 Jun 2020
    Release notes
    • Add identifiers to \Spatie\SchemaOrg\Graph nodes #124
    Open source →
  37. 2.13.0 17 Apr 2020
    Release notes
    • RDFa update
    Open source →
  38. 2.12.1 17 Mar 2020
    Release notes
    Open source →
  39. 2.12.0 23 Jan 2020
    Release notes
    • RDFa update
    Open source →
  40. 2.11.1 18 Nov 2019
    Release notes
    • Fix types to implement their own contract
    Open source →
  41. 2.11.0 18 Nov 2019
    Release notes
    • Use contracts as type-hints in doc-blocks
    Open source →
  42. 2.10.0 12 Nov 2019
    Release notes
    • Add PHP 7.4 support
    • Fix Graph magic call
    • RDFa update
    Open source →
  43. 2.9.0 06 Oct 2019
    Release notes
    • Drop PHP 7.2 support
    Open source →
  44. 2.8.0 06 Oct 2019
    Release notes
    • Drop PHP 7.1 support
    Open source →
  45. 2.7.0 06 Oct 2019
    Release notes
    • Drop PHP 7.0 support
    Open source →
  46. 2.6.0 26 Sep 2019
    Release notes
    • Fix identifier serialization
    Open source →
  47. 2.5.0 25 Sep 2019
    Release notes
    • Add reflection support
    Open source →
  48. 2.4.0 25 Sep 2019
    Release notes
    • RDFa update
    Open source →
  49. 2.3.0 07 Aug 2019
    Release notes
    • Fix null values
    Open source →
  50. 2.2.1 28 May 2019
    Release notes
    • Fix pending Types
    Open source →
  51. 2.2.0 28 May 2019
    Release notes
    • RDFa update
    Open source →
  52. 2.1.0 18 Jan 2019
    Release notes
    • Add Graph support
    Open source →
  53. 2.0.3 17 Oct 2018
    Release notes
    • Convert invalid objects that have a __toString method to strings
    Open source →
  54. 2.0.2 25 Jun 2018
    Release notes
    • Fix previous release
    Open source →
  55. 2.0.1 25 Jun 2018
    Release notes
    • Use https protocol for Schema.org links
    Open source →
  56. 2.0.0 08 Jun 2018
    Release notes
    • Supports multiple type inheritance. Types no longer extend each other, they all are a direct extension of BaseType
    • This release probably doesn't contain any breaking changes for most people. It breaks all type checks (e.g. instanceof LocalBusiness), but doesn't change the way types are generated
    Open source →
  57. 1.7.0 08 Jun 2018
    Release notes
    • Regenerated types
    Open source →
  58. 1.6.0 22 May 2018
    Release notes
    • Added: Enumeration child types with constants, e.g. Spatie\Schema\DayOfWeek::Monday.
    Open source →
  59. 1.5.0 03 May 2018
    Release notes
    • Added: All types are now json serializable and have array access
    Open source →
  60. 1.4.2 28 Mar 2018
    Release notes
    • Fixed: Date format in schemas is now ISO8601 (DateTime::ATOM)
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive