- What is gdbots/schemas used for?
- gdbots/schemas provides shared schema definitions and generated PHP classes for GDBOTS applications. It helps teams keep data contracts consistent across services and is used to validate, serialize, and exchange structured messages and events. In a Laravel codebase, you would typically consume it as a Composer library when your app needs to speak GDBOTS message or event formats.
- How do I install gdbots/schemas with Composer?
- Install the package with composer require gdbots/schemas. Since it supplies schema definitions and generated PHP classes, it is generally used as a library rather than an application framework component. Check the package documentation for any required autoload or code-generation steps after installation.
- Does gdbots/schemas work with Laravel?
- It is a PHP package intended for GDBOTS applications, so it can be required in a Laravel project through Composer. The provided context does not describe a Laravel service provider, facade, or Laravel-specific configuration. You should review the package docs to confirm how its generated classes fit your Laravel app structure.
- What types of data does gdbots/schemas validate and serialize?
- The package focuses on structured messages and events defined by shared GDBOTS schemas. It provides generated PHP classes that support consistent validation and serialization across services. That makes it relevant when multiple applications need to exchange the same message or event shapes.
- Do I need to generate the PHP classes myself?
- The package description says it provides generated PHP classes alongside shared schema definitions. For normal consumption, you can use the generated classes rather than writing them by hand. If you extend or modify schemas, follow the package's documented generation workflow.
- How does gdbots/schemas help with microservices or distributed systems?
- Shared schemas create a common contract for messages and events exchanged between services. Using the same generated PHP classes reduces drift in field names, types, and serialization behavior. This is useful in service-oriented or event-driven systems where multiple PHP applications must agree on payload structure.
- Is gdbots/schemas a replacement for Laravel's validator?
- No, it is not described as a Laravel validation rules package. It provides GDBOTS schema definitions and generated PHP classes for structured messages and events. Laravel's validator can still be used for request validation, while this package handles shared data contracts.
- Can I use gdbots/schemas for event-driven applications?
- Yes, the package includes schema definitions and generated classes for events as well as messages. That makes it suitable for applications that need a consistent event payload contract across producers and consumers. It is not presented as a complete event sourcing framework, so you would pair it with your own messaging or persistence layer.
- What are alternatives to gdbots/schemas?
- If you do not need GDBOTS-specific contracts, alternatives include Laravel-native validation and serialization, JSON Schema tooling, or Protocol Buffers for cross-language message definitions. The right choice depends on whether your services must interoperate with existing GDBOTS schemas. If they do, gdbots/schemas is the most direct fit in PHP.
- Is gdbots/schemas safe to use in production?
- The provided context does not include maintenance history, release cadence, or security details. Before production use, review the package repository and Packagist metadata, pin a known version in Composer, and test serialization compatibility with your services. Those checks matter most when schema changes can affect multiple applications.