Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Schema Org Laravel Package

spatie/schema-org

Fluent PHP builder for the full Schema.org vocabulary. Create Schema.org types and properties via chainable methods and output valid JSON-LD/ld+json scripts for SEO. Auto-generated from Schema.org standards for complete coverage.

View on GitHub
Deep Wiki
Context7
5.0.0

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: https://github.com/spatie/schema-org/compare/4.0.2...5.0.0

3.23.2

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: https://github.com/spatie/schema-org/compare/3.23.1...3.23.2

4.0.2

What's Changed

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

4.0.1

What's Changed

Full Changelog: https://github.com/spatie/schema-org/compare/4.0.0...4.0.1

4.0.0

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
3.23.1

What's Changed

New Contributors

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

3.23.0
3.15.0
3.14.0

What's Changed

New Contributors

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

3.13.0
3.12.0

What's Changed

New Contributors

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

3.11.0

What's Changed

New Contributors

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

3.10.0
  • Drop PHP 7.4 Support - #174
  • Add PHP 8.1 Support - #174
3.9.0

What's Changed

New Contributors

Full Changelog: https://github.com/spatie/schema-org/compare/3.8.0...3.9.0

3.8.0
  • Upgrade to schema.org:v13.0 - #167
3.7.0
  • Upgrade to schema.org:v12.0 - #170
3.6.0
  • Upgrade to schema.org:v11.01 - #169
3.5.0
  • Upgrade to schema.org:v10
  • Drop PHP 7.3 support
  • Add PHP 8.1 support
3.4.0
  • add custom \Spatie\SchemaOrg\Graph context support - #160
3.3.0
  • fix [@id](https://github.com/id) and identifier serialization for typed identifiers - #157
3.2.1
  • add support for PHP 8
3.2.0
  • add \Spatie\SchemaOrg\ReferencedType to reference types in schemas and graphs - #155
3.1.1
  • fix empty string property values - #153
3.1.0
  • add Multi-Typed-Entity support \Spatie\SchemaOrg\MultiTypedEntity - #148
3.0.0
  • Upgrade to schema.org:v9 which includes all extensions
2.16.0
  • Upgrade to schema.org:v8
2.15.0

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle