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

News Bundle Laravel Package

fsi/news-bundle

FSi News Bundle is a Symfony/PHP package for adding a lightweight news section to your site, with article management, listing and detail views, and adaptable templates to help you publish updates quickly.

View on GitHub
Deep Wiki
Context7

Getting Started

  1. Verify it can even install. Open the bundle's composer.json first. Given the 2015-03-13 release and the FSi/Symfony2 era, expect constraints like symfony/symfony: ~2.3 and php: >=5.3.3. On any modern Symfony (5/6/7) or PHP 8, composer require fsi/news-bundle will either fail dependency resolution or pull an incompatible tree. Decide up front whether you are on a legacy Symfony 2.x app (where this bundle is usable) or a modern app (where you should vendor the code, not the package).
  2. Register the bundle. Add new FSi\Bundle\NewsBundle\FSiNewsBundle() to AppKernel::registerBundles().
  3. Import routing. Check Resources/config/routing.xml (or .yml) in the bundle for the exposed routes, then add the import in app/config/routing.yml:
    fsi_news:
        resource: "@FSiNewsBundle/Resources/config/routing.xml"
        prefix: /news
    
  4. Load the DI config. Look in DependencyInjection/Configuration.php for the config tree (likely a fsi_news root key with entity class / driver options). If none exists, the bundle may rely on auto-discovery of its Doctrine mapping.
  5. Run the schema. The bundle ships a Doctrine entity (probably Entity\News); use doctrine:schema:update --dump-sql or, better, generate a migration rather than letting the bundle dictate your schema.
  6. First use case. Hit the list route and confirm a news listing renders from the shipped Twig templates under Resources/views/. That single request exercises the entity, repository, controller, and template layer at once and tells you quickly whether the bundle is functional in your app.

Implementation Patterns

  • Treat the shipped entity as a starting point, not an API. The most common day-to-day pattern with bundles of this vintage is to extend or copy Entity\News, add your own fields (slug, cover image, SEO metadata, categories), and point the bundle's config at your subclass where it supports it. If it doesn't, fork the entity into your AppBundle.
  • Repository-driven listings. Wrap the bundle's repository in a service and add your own query methods (published-only, paginated, by-category) rather than calling the entity repository directly from controllers. This keeps the bundle replaceable.
  • Template override via bundle inheritance. Symfony2's {% extends %} / Resources/FSiNewsBundle/views/... override path is the cleanest customisation point — copy the bundle's templates into your app's Resources/FSiNewsBundle/views/ tree and modify them there. Avoid editing vendor/.
  • Admin integration. FSi bundles were typically built to pair with fsi/datatable-bundle or SonataAdmin for CRUD grids. If you need an admin, wire the entity into your existing admin tooling rather than relying on any built-in admin the bundle may or may not provide.
  • Cache the public side. News lists and detail pages are ideal candidates for symfony/cache / HTTP cache. Cache the rendered response keyed by slug and purge on publish/save via a Doctrine listener.
  • Service-layer wrapper. Put a thin NewsProvider service in front of the bundle so your controllers depend on your interface, not on FSi\Bundle\NewsBundle\Entity\News. When (not if) you migrate off the bundle, only the provider changes.

Gotchas and Tips

  • Abandoned and unmaintained. Last release 2015, one star, zero dependents. There is no support path, no security patching, and no compatibility with current Symfony. Budget for a fork-and-own strategy from day one.
  • PHP 5.x idioms. Expect count() on nullable values, missing scalar type hints, possibly deprecated getMock-style tests, and no declare(strict_types=1). Static analysis (PHPStan at a low level) will surface the rough edges quickly.
  • Doctrine mapping collisions. If the bundle's mapping uses annotations with hard-coded table names or a News entity that clashes with your own, you'll get silent schema drift. Always generate migrations and diff them against what the bundle expects.
  • Config quirks. FSi bundles of this era often had implicit defaults (entity class, page size, date field name) buried in extension classes rather than documented. Read DependencyInjection/FSiNewsExtension.php before guessing config keys.
  • Routing/asset assumptions. Templates may reference assets or routes that don't exist in your app; expect 500s on first render and be ready to stub them.
  • Debugging workflow. app/console debug:container fsi_news and debug:router will show you exactly what the bundle registered — faster than reading the source.
  • Extension points to prefer. Doctrine event listeners/subscribers, Twig overrides, and a repository service are the safest ways to customise without forking. Avoid patching the bundle's controllers unless you're committing to maintaining the fork.
  • Migration tip. If the bundle is only providing a News entity plus a list/detail controller, it's usually cheaper to extract those ~300 lines into your own bundle than to maintain a dependency on an unmaintained package.
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