rz/block-bundle
rz/block-bundle provides reusable content blocks for Symfony/PHP applications, letting you define, organize, and render modular page sections. Build flexible, editable layouts with a simple bundle-based integration.
First, calibrate what you are looking at. rz/block-bundle is a Symfony 2/3 bundle (RZBlockBundle, Resources/config/ layout, Doctrine entities, tagged services, compiler passes). It is not a Laravel package and will not composer require cleanly into a modern Laravel app. It is archived, has zero stars, zero dependents, and no upstream. A Laravel developer therefore has exactly two realistic entry points:
If you are maintaining a legacy Symfony install, in this order:
config/bundles.php (or AppKernel::registerBundles() on older Symfony) as new RZ\BlockBundle\RZBlockBundle().DependencyInjection/Configuration.php first. This — not the README — is the authoritative options list. The block and block-type entity class parameters are meant to be overridden with your own subclasses; do not assume the defaults fit.bin/console doctrine:schema:update --dump-sql and read the SQL before applying. You expect a block table plus a block-type/discriminator column. Empty output means your mapping configuration is wrong, not that the schema is fine.Block/ (manager + interfaces), BlockType/ (the extension point), DependencyInjection/Compiler/ (how block types are collected), Resources/views/ (Twig surface), Resources/config/ (service wiring and tags). That is a ~1 hour read and it will teach you more than any doc that ever existed.Your first end-to-end loop (the real "hello world"): create a concrete block type class extending the bundle's abstract type, register it as a service with the block-type tag, create a block record through the manager, assign it to a zone string, and render that zone from a Twig template. When that renders, you understand the bundle.
If you are reimplementing in Laravel (recommended): clone the repo, read composer.json for the PHP/Symfony/Doctrine constraints, then read the block-resolution logic in Block/ and the block-type registry in BlockType/. Your deliverable is a written spec (block type contract, zone model, caching strategy), not a dependency. Sequence it as: spike (read + spec) → data model + registry contract in Eloquent → Blade renderers → cache layer → admin authoring → pilot on one content surface.
Symfony-side patterns (if you're in the legacy install):
EntityManager for block writes. Go through the block manager for create, save, and zone lookups so events, timestamps, and cache hooks stay consistent. Repository is fine for read-only queries.Laravel-side patterns (reimplementation — the pattern worth stealing):
BlockTypeRegistry interface in a service provider; block types register explicitly (a compiler pass analogue is a provider boot() loop or a config array). Avoid auto-resolving block types by string class name — it is the source of silent-failure bugs in the original.blocks, block_types, zone/placement column, ordering, visibility — in one or two tables with a polymorphic payload column (JSON) per block type. Keep the type descriptor as a string key, not an entity relation.Resources/views/ but as a render(Block $block): View method on each block type class, so a missing template is a typed error, not a null.block:{id}:{updated_at} and tag it by zone (or key-prefix by zone) so a shared block edit invalidates every page region that renders it. Laravel's cache tags (Redis/Memcached) map almost 1:1 onto the block/zone model.*Bundle suffix, rzproject vendor, compiler-pass wiring, and Doctrine coupling all point away from Laravel. Do not try to shoehorn it in via a service provider — you will spend more time shimming than the model is worth. Fork or reimplement.debug:container --tag=rz_block.block_type on Symfony)? is the template in the expected Resources/views/ path? is the block actually assigned to the zone string you're rendering?composer.json before assuming anything runs.debug:container for registered block types and the rz_block.* service ids first. This tells you whether the problem is registration, dispatch, or templating — three completely different fixes that look identical in the browser.How can I help you explore Laravel packages today?