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

Admin News Bundle Laravel Package

fsi/admin-news-bundle

Symfony bundle for managing news and announcements in FSI Admin backends, with CRUD for articles, publishing controls, and integration with existing admin panels. Adds a lightweight news section to Symfony applications.

View on GitHub
Deep Wiki
Context7

Getting Started

Read this first: it's a Symfony bundle, not a Laravel package. fsi/admin-news-bundle ships a Bundle class, DI extension, XML/YAML service definitions, Doctrine ORM mappings and Twig templates. There is no service provider, no facade, no config publishing and no Illuminate dependency — composer require fsi/admin-news-bundle inside a Laravel app installs files that will never autoload into the container. Assess it as reference material (data model + admin UX for a news module) unless you are maintaining a legacy Symfony 2 app.

Minimal steps in its native habitat:

  1. Confirm the runtime first. Last tagged release is 2015-03-12, so expect Symfony ~2.3–~2.7 constraints, PHP 5.x/7.0, Doctrine ORM 2.4-ish, and companions such as fsi/admin-bundle, fsi/datagrid-bundle, fsi/form-bundle, fsi/resource-bundle and the FSi Doctrine translation/behaviours bundles. Run composer why-not fsi/admin-news-bundle before anything else; on a modern Symfony this will fail immediately on version constraints.
  2. Register the bundle in app/AppKernel.php next to FSiAdminBundle:
    new FSi\Bundle\AdminNewsBundle\FSiAdminNewsBundle(),
    
    (Verify the exact namespace/bundle name against composer.json autoload.psr-4 and the bundle class — FSi-era naming is inconsistent across their packages.)
  3. Wire the model. The bundle expects your application to own the concrete entity classes; you subclass the bundle's base News / NewsCategory and point the bundle's class parameters at your subclasses.
  4. Register the admin element as a service tagged for the FSi admin tree so a "News" node appears in the sidebar.
  5. First use case to validate the install: create a news item in the admin with title, lead, body and category, publish it, and hit the bundle's front-end listing route. If that round-trip works, everything else (translations, uploads, slugs) builds on it.

Where to look first: Resources/config/ (service ids and class parameters — this is the real API surface), Admin/, DataGrid/, Form/, then Resources/views/ for override points.

Implementation Patterns

Entity inheritance over vendor edits. Never touch vendor/fsi/. Create AppBundle\Entity\News extends FSi\Bundle\AdminNewsBundle\Entity\News using Doctrine @MappedSuperclass or single-table inheritance, then override the bundle parameter:

parameters:
    fsi_admin_news.entity.news.class: AppBundle\Entity\News
    fsi_admin_news.entity.news_category.class: AppBundle\Entity\NewsCategory

Admin element extension. Subclass the bundle's admin element to add fields or change the grid, and register your subclass under the same service id (or a new id plus a tag) rather than modifying the bundle's service file:

services:
    app.admin.news:
        class: AppBundle\Admin\NewsAdmin
        parent: fsi_admin_news.admin.news   # or copy the definition
        tags:
            - { name: fsi_admin.admin }

DataGrid customisation. The FSi DataGrid is column-driven; add a column by extending the datagrid class and overriding buildDataGrid(), or by redefining the datagrid service. Typical day-to-day tweaks: a category filter, a "published" boolean column, a date formatter, and a thumbnail/attachment column.

Form extension. Extend the provided form type and add your own fields (image via a VichUploader-style listener, SEO meta, related articles). Add validation groups so published requires a publishDate.

Front-end rendering. Override templates the standard Symfony way rather than forking:

app/Resources/FSiAdminNewsBundle/views/News/list.html.twig
app/Resources/FSiAdminNewsBundle/views/News/show.html.twig

For the listing query, don't rely on the bundle's default grid — add a repository method scoped to published = true AND publishDate <= NOW(), ordered by date, with a hard setMaxResults().

Translation workflow. FSi's translation stack means each news item carries per-locale title/lead/body/slug. Pattern: one admin tab per locale, a sluggable listener per locale, and a locale-aware repository for the front end with a fallback locale.

Integration tips.

  • Hook the admin's event dispatcher (post-create/post-update/post-delete) for cache invalidation of the listing page, sitemap regeneration and RSS rebuilds.
  • Expose the news list as an ESI/fragment if the site is cached; news changes are infrequent but the list is on many pages.
  • Treat the front-end controller + routes as optional — most teams keep the admin CRUD and write their own controller/routes so URL structure and pagination stay under application control.

Gotchas and Tips

  • The framework gap is the headline risk. For a Laravel codebase the honest day-to-day answer is: you cannot use this. Port the concepts — a news and news_categories migration, an Eloquent model with published_at, a scope for published items, a sluggable trait, and a Filament/Nova resource for the admin. That is roughly a day's work and removes an unmaintained Symfony 2 dependency entirely.
  • Zero stars / zero dependents / 2015 release is a maintenance red flag. Symfony 2 is EOL, so the transitive stack carries known CVEs. If you must run it, pin everything, keep it behind auth, and plan a migration off it.
  • Doctrine inheritance mapping mistakes are the #1 time sink. Discriminator columns, join tables and column name collisions between the base class and your subclass fail loudly at doctrine:schema:validate and silently in migrations. Run doctrine:mapping:info and doctrine:schema:validate after every model change, and hand-write migrations for inherited columns — doctrine:migrations:diff frequently misses them.
  • Service-id archaeology. FSi bundles of this era use XML service definitions and parameter indirection, so the class you need to override may not be the class in the file — it may be %fsi_admin_news.entity.news.class%. Debug with php app/console debug:container --tag=fsi_admin.admin and debug:container fsi_admin_news.admin.news.
  • Template overrides require the bundle name to match the registered bundle name exactly, including the FSi prefix casing. A mismatch silently renders the vendor template instead, which looks like "my changes did nothing".
  • Slug uniqueness is per-locale. Adding a second language after going live will collide slugs if you assumed globally unique values; add a compound unique index on (slug, locale).
  • Publishing semantics. published boolean plus publishDate is a scheduled-publishing model; make sure the front end filters on both, otherwise unpublished-but-dated items leak.
  • Assets and cache. This era predates modern asset handling — expect assets:install/assetic:dump steps and remember cache:clear after parameter changes, since class parameters are baked into the compiled container.
  • Extension points, ranked by cost: (1) service/parameter override, (2) entity and admin subclassing, (3) template override, (4) decoration, (5) fork. A fork is often cheaper than fighting an abandoned bundle — and if you fork, drop the FSi admin coupling and ship a plain News model, because the admin layer is the part you'll want to modernise first.
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.
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
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings