Weave 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

Generator Laravel Package

popo/generator

popo/generator scaffolds Plain Old PHP Object (POPO) classes from your database tables, reducing boilerplate and helping Laravel developers build a simple, maintainable data layer.

View on GitHub
Deep Wiki
Context7

POPO - plain old PHP object. Generate Data Structures / Data Transfer Objects from a schema.

Frequently asked questions about Generator
What is popo/generator and what does it actually do?
popo/generator is a build-time Composer code generator that reads a YAML schema and emits plain PHP POPO (Plain Old PHP Object) and DTO classes. It is not a runtime dependency: it does not sit in the request path, and the classes it produces are framework-agnostic PHP with no coupling to Laravel or to the generator. That means the tool is replaceable, and worst case you keep the generated classes and drop the generator.
How do I install popo/generator in a Laravel project?
Install it as a dev dependency with composer require --dev popo/generator, then invoke it from the CLI or through a thin Artisan wrapper you write yourself, pointing it at your YAML schema and a target namespace. There are no migrations, no database surface, and no middleware involved, so the integration is measurable in hours. Before installing, verify the actual Packagist state and tag history, since the supplied metadata reports a last release date of 2026-07-22, which is anomalous.
Does popo/generator integrate with Laravel, or is it framework-agnostic?
It is effectively a generic PHP tool: there is no documented Laravel-specific integration, service provider, or configuration surface. The generated POPO and DTO classes are plain PHP, which is the right property for boundary modeling and keeps you free to swap the generator later. In Laravel you would typically invoke it via CLI or a small custom Artisan command and commit the output.
Which PHP versions and modern language features does popo/generator support?
This is unverified in the available evaluation. PHP 8.2, 8.3, and 8.4 support, readonly properties, constructor promotion, native and backed enums, union and intersection types, nullable handling, and default values all need confirmation from the repository's composer.json constraints, CI matrix, and generated sample output. Type-system fidelity is the core value proposition of a DTO generator, so treat this as a required spike before any commitment.
Is the generated code deterministic and idempotent across runs?
This is not confirmed in the supplied summary. Stable, diffable, idempotent output is table stakes, because if regeneration reshuffles property order or whitespace, every run creates noise and a CI drift gate becomes unusable. Test it by generating twice into a clean directory and diffing the results, ideally on two different machines, before you rely on drift detection.
How does popo/generator handle nested DTOs, typed collections, unions, and nullability?
All of these are explicitly listed as open questions in the technical evaluation. It is unknown whether nested DTOs are generated recursively, whether collections are typed like array<int, Foo> or left as untyped arrays, and how union types and nullable values are represented. Read the YAML schema documentation and generate a representative sample covering each case to confirm the behavior.
Can I customize the generated class stubs or templates?
It is unclear whether output templating is extensible through custom stubs or hard-coded inside the generator. If matching your team's conventions matters, such as final classes, readonly properties, declare(strict_types=1), or a specific namespace layout, verify this early. If stubs are not configurable, plan to run a formatter such as Laravel Pint or PHP-CS-Fixer over the generated files.
How does popo/generator compare to spatie/laravel-data?
spatie/laravel-data is mature and widely adopted, and it adds runtime validation, casting, and transformation on top of DTOs. popo/generator is a narrower build-time scaffolder that produces framework-agnostic POPOs with no runtime dependency and no runtime features. If your team already uses laravel-data, the marginal value of popo/generator is low; its genuine niche is teams that specifically want dependency-free DTOs.
Is popo/generator mature and safe enough for production use?
The capability risk is low because it is a dev-only build tool and you keep the generated PHP regardless, but maturity is the dominant risk: roughly 20 stars, zero dependents, and a single maintainer means no ecosystem validation or third-party battle-testing. The reported future release date of 2026-07-22 means you should verify Packagist state, tag history, commit cadence, and maintainer account hygiene before committing. For regulated codebases, review supply-chain practices even though it only lands in require-dev.
Does popo/generator validate the YAML schema, and how does it fail on malformed input?
This is not documented in the available summary, so validation behavior and error quality on malformed or partially-versioned schemas are open questions. Because the YAML becomes a second source of truth and a schema of record, how it fails matters as much as how it succeeds. Test intentionally broken schemas before wiring generation into CI, and treat error messages and exit codes as part of the evaluation.
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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console