···3636Schema ships with pre-generated PHP classes for all standard AT Protocol and Bluesky lexicons, providing immediate type-safe access without any generation step:
37373838```php
3939-use SocialDept\Schema\Generated\App\Bsky\Feed\Post;
4040-use SocialDept\Schema\Generated\App\Bsky\Graph\Follow;
4141-use SocialDept\Schema\Generated\Com\Atproto\Repo\StrongRef;
3939+use SocialDept\AtpSchema\Generated\App\Bsky\Feed\Post;
4040+use SocialDept\AtpSchema\Generated\App\Bsky\Graph\Follow;
4141+use SocialDept\AtpSchema\Generated\Com\Atproto\Repo\StrongRef;
42424343// Create type-safe records
4444$post = new Post(
···60606161Schema includes **220+ pre-generated classes** covering all standard AT Protocol and Bluesky lexicons:
62626363-**Record Types (`SocialDept\Schema\Generated\App\Bsky\*`)**
6363+**Record Types (`SocialDept\AtpSchema\Generated\App\Bsky\*`)**
6464- `Feed\Post` - Social media posts
6565- `Feed\Like` - Like records
6666- `Feed\Repost` - Repost records
···146146## Quick Example
147147148148```php
149149-use SocialDept\Schema\Data\LexiconDocument;
150150-use SocialDept\Schema\Validation\Validator;
151151-use SocialDept\Schema\Parser\SchemaLoader;
149149+use SocialDept\AtpSchema\Data\LexiconDocument;
150150+use SocialDept\AtpSchema\Validation\Validator;
151151+use SocialDept\AtpSchema\Parser\SchemaLoader;
152152153153// Load a schema
154154$schema = LexiconDocument::fromArray([
···205205Choose the validation strictness that fits your use case:
206206207207```php
208208-use SocialDept\Schema\Validation\Validator;
208208+use SocialDept\AtpSchema\Validation\Validator;
209209210210// STRICT - Rejects unknown fields
211211$validator->setMode(Validator::MODE_STRICT);
···222222Upload and validate files with built-in constraints:
223223224224```php
225225-use SocialDept\Schema\Services\BlobHandler;
225225+use SocialDept\AtpSchema\Services\BlobHandler;
226226227227$blobHandler = new BlobHandler('local');
228228···242242Transform between raw arrays and domain objects:
243243244244```php
245245-use SocialDept\Schema\Services\ModelMapper;
246246-use SocialDept\Schema\Contracts\Transformer;
245245+use SocialDept\AtpSchema\Services\ModelMapper;
246246+use SocialDept\AtpSchema\Contracts\Transformer;
247247248248class Post
249249{
···290290Work with discriminated unions using the `$type` field:
291291292292```php
293293-use SocialDept\Schema\Services\UnionResolver;
293293+use SocialDept\AtpSchema\Services\UnionResolver;
294294295295$resolver = new UnionResolver();
296296···312312Here's how to validate a post with an image upload:
313313314314```php
315315-use SocialDept\Schema\Data\LexiconDocument;
316316-use SocialDept\Schema\Validation\Validator;
317317-use SocialDept\Schema\Services\BlobHandler;
315315+use SocialDept\AtpSchema\Data\LexiconDocument;
316316+use SocialDept\AtpSchema\Validation\Validator;
317317+use SocialDept\AtpSchema\Services\BlobHandler;
318318319319// Load schema
320320$schema = LexiconDocument::fromArray([/* ... */]);
···381381Add custom logic at key points in the validation lifecycle:
382382383383```php
384384-use SocialDept\Schema\Support\ExtensionManager;
384384+use SocialDept\AtpSchema\Support\ExtensionManager;
385385386386$extensions = new ExtensionManager();
387387···398398Extend core services with custom methods:
399399400400```php
401401-use SocialDept\Schema\Services\ModelMapper;
401401+use SocialDept\AtpSchema\Services\ModelMapper;
402402403403ModelMapper::macro('validateAndTransform', function ($type, $data, $schema) {
404404 if (!$this->validator->validate($data, $schema)) {
···8383 |--------------------------------------------------------------------------
8484 |
8585 | The package includes pre-generated PHP classes for all standard
8686- | AT Protocol and Bluesky lexicons in the SocialDept\Schema\Generated
8686+ | AT Protocol and Bluesky lexicons in the SocialDept\AtpSchema\Generated
8787 | namespace. These provide immediate type-safe access to records.
8888 |
8989 */
90909191 'generated' => [
9292 // Namespace for bundled pre-generated classes
9393- 'namespace' => 'SocialDept\\Schema\\Generated',
9393+ 'namespace' => 'SocialDept\\AtpSchema\\Generated',
94949595 // Enable usage of bundled generated classes
9696 'enabled' => env('SCHEMA_USE_GENERATED', true),
···11<?php
2233-namespace SocialDept\Schema\Contracts;
33+namespace SocialDept\AtpSchema\Contracts;
4455/**
66 * Contract for Data classes that can participate in AT Protocol discriminated unions.
···11<?php
2233-namespace SocialDept\Schema\Validation\Rules;
33+namespace SocialDept\AtpSchema\Validation\Rules;
4455use Closure;
66use Illuminate\Contracts\Validation\ValidationRule;
···1919 }
20202121 // Check if Resolver package is available
2222- if (class_exists('SocialDept\Resolver\Support\Identity')) {
2323- if (! \SocialDept\Resolver\Support\Identity::isDid($value)) {
2222+ if (class_exists('SocialDept\AtpResolver\Support\Identity')) {
2323+ if (! \SocialDept\AtpResolver\Support\Identity::isDid($value)) {
2424 $fail("The {$attribute} is not a valid DID.");
2525 }
2626
+3-3
src/Validation/Rules/Handle.php
···11<?php
2233-namespace SocialDept\Schema\Validation\Rules;
33+namespace SocialDept\AtpSchema\Validation\Rules;
4455use Closure;
66use Illuminate\Contracts\Validation\ValidationRule;
···1919 }
20202121 // Check if Resolver package is available
2222- if (class_exists('SocialDept\Resolver\Support\Identity')) {
2323- if (! \SocialDept\Resolver\Support\Identity::isHandle($value)) {
2222+ if (class_exists('SocialDept\AtpResolver\Support\Identity')) {
2323+ if (! \SocialDept\AtpResolver\Support\Identity::isHandle($value)) {
2424 $fail("The {$attribute} is not a valid handle.");
2525 }
2626