sylius/blogger-bundle
Adds a lightweight blog to Sylius: manage posts and categories in the admin, publish articles or news on your storefront, and pair content with your e-commerce site to keep customers informed and support SEO.
Read this before you composer require anything. sylius/blogger-bundle is a Sylius/Symfony bundle, not a Laravel package. There is no service provider, no Eloquent model, no Blade view, no config/blogger.php. It is built on Sylius resource/grid abstractions and expects to run inside a Sylius 0.x/1.0-era application (Symfony 2.7/3.x, Doctrine ORM 2.4/2.5, PHP 5.5–7.x). The repository is archived and the description literally begins with DEPRECATED. — 13 stars, 0 dependents, no maintainer.
So the realistic getting-started paths are:
For the inherited-app case, minimal steps:
composer require sylius/blogger-bundle — you will almost certainly fight Doctrine/Symfony constraints on anything newer than Symfony 3.4. Pin the resolved set in composer.lock and commit it.app/AppKernel.php: new Sylius\Bundle\BloggerBundle\SyliusBloggerBundle(),.# app/config/routing.yml
sylius_blogger:
resource: "@SyliusBloggerBundle/Resources/config/routing.yml"
prefix: /blog
sylius_blogger: in app/config/config.yml (model classes, form types, grid config — see below).app/console doctrine:schema:update --dump-sql and read the SQL. Never --force against a live DB; this bundle predates migration-based workflows in most of its downstream projects./blog.Where to look first: DependencyInjection/Configuration.php and Resources/config/. Sylius bundles are config-driven first and PHP-driven second — the config tree is your extension surface. Then Resources/views/ to see what the default Twig templates actually query, and Resources/config/routing.yml for the route names you will be overriding.
First use case: a paginated article list at /blog and a slug-routed detail page at /blog/{slug}, linked from the storefront nav. Do not plan to grow this into a CMS — the entity surface is small (slug, title, content, publishing state) and archived code does not accrue features.
Configure, do not subclass. The idiomatic Sylius pattern — and the way you would "leverage" this bundle day-to-day — is to point the bundle's resource config at your classes rather than editing vendor code:
# app/config/config.yml
sylius_blogger:
resources:
article:
classes:
model: AppBundle\Entity\BlogArticle
form:
default: AppBundle\Form\BlogArticleType
Extend the bundle's model, add your columns (author, hero image, tags), and let Sylius' resource controllers/factories handle CRUD. This is the closest analogue to Laravel's "publish and override the config, don't fork the package" convention — and it is the only place you get leverage, because the vendor code is frozen.
Admin CRUD comes for free via the grid. Articles show up as a grid in the existing Sylius admin with the same filters/sorting/bulk actions as products. Register a custom grid if you need extra columns:
sylius_grid:
grids:
sylius_blogger_article:
driver:
name: doctrine/orm
options:
class: "%sylius.model.article.class%"
fields:
title: { type: string, label: sylius.ui.title }
state: { type: twig, options: { template: "@SyliusBlogger/Admin/Article/Grid/_state.html.twig" } }
Publishing states are the storefront gate. The bundle models draft/published state so unfinished posts stay out of the shop. The pattern to internalise: the storefront controller/repository query must filter on the published state, and the admin grid shows everything. When auditing an inherited app, verify that filter is actually applied on every storefront route — a mis-scoped query leaking drafts into /blog is a classic find.
Templates are overridable by bundle path. Copy the Twig template into your app under the same relative path (e.g. app/Resources/SyliusBloggerBundle/views/Article/index.html.twig) and edit in place — no config flag needed. This is how you make the blog match your theme. If you find yourself needing a new variable, you are extending a controller; do that in an app-level controller that extends the bundle's, not by touching vendor/.
Fixtures for seeding. The bundle ships fixture config so you can seed example posts (app/console sylius:fixtures:load). Use it to demo the content model to stakeholders; do not ship fixture content to production.
If you are actually on Laravel. Do not attempt to run this bundle. Treat it as a specification and port the shape:
articles table: id, slug (unique), title, content (longText), published_at (nullable), timestamps.Article Eloquent model with scopePublished() → whereNotNull('published_at')->where('published_at', '<=', now()).GET /blog and GET /blog/{article:slug} in a BlogController.mews/purifier or an HTML sanitizer), never trust stored HTML on output.Cache::remember keyed on slug + updated_at) — a blog is read-heavy and cache-friendly.<link rel="canonical"> from slug, and 301s if you migrate existing URLs.Map the concepts one-to-one: resource config → model casts/$fillable; grid → Filament/Nova resource or a simple admin CRUD; form type → FormRequest + validation rules; fixtures → seeders; Twig override → Blade view override (php artisan vendor:publish-style).
doctrine:schema:update --force is a trap. This era of Sylius projects often has no proper migrations. Always --dump-sql first and convert to a migration by hand.sylius_blogger: or sylius_grid: config, app/console cache:clear — in dev, rm -rf app/cache/* when things "make no sense."/blog and also have a BlogBundle or a manual /blog route, you get a silent last-one-wins depending on import order. app/console debug:router | grep blog will tell you.SyliusBloggerBundle), not the vendor folder path. If your override is ignored, check the folder name first.|raw templates) and on input, and treat stored HTML as a trust boundary.Configuration.php / Resources/config/ / Resources/views/, you are maintaining a fork. Price that into any "just one more feature" request.How can I help you explore Laravel packages today?