helsingborg-stad / schema-library-generator
A fluent builder Schema.org types and ld+json generator
2.0.0
2025-04-02 07:58 UTC
Requires
- php: ^8.0
- ext-json: *
- graham-campbell/analyzer: ^4.2
- illuminate/collections: ^8.62.0
- league/flysystem: ^2.3.0 || ^3.0
- symfony/console: ^5.3.7 || 6.0
- twig/twig: ^3.3.3
Requires (Dev)
- helsingborg-stad/phpcs: ^0.3.5
- pestphp/pest: ^1.21
README
This package is built on the excellent spatie/schema-org package. However, it has been modified to include only the generator functionality.
The generator is designed to create a types package for working with Schema.org objects, making it easier to define and use structured data in your projects.
Installation
You can install the package via composer:
composer require --dev helsingborg-stad/schema-library-generator
Usage
You can use the package to generate a types package for your project. The generator will create a set of classes that represent the Schema.org types, making it easier to work with structured data.
Generating the Types Package
To generate the types package, you can use the following command:
Generate inside your project
vendor/bin/generate --organization -o 'Example\\Organization' <output-directory>