Weave Code
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

Zend Mvc Laravel Package

zendframework/zend-mvc

Zend\Mvc is Zend Framework’s MVC layer for building PHP web apps. It provides routing, controllers, dispatching, request/response handling, view integration, and an event-driven pipeline. Designed for modular apps and flexible configuration.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is the legacy MVC component from Zend Framework (now Laminas), archived since 2018. In modern workflows, developers would only interact with it when maintaining very old Laminas or Zend Framework applications. Start by confirming your app’s framework version (composer show), then inspect config/application.config.php and module/Application/Module.php. The first use case is typically bootstrapping — the MvcEvent system powers request/response lifecycle, so you’ll interact with it when defining route listeners, error handlers, or action helpers.

Implementation Patterns

  • Module Bootstrapping: Module::onBootstrap(MvcEvent $e) is where you attach global event listeners (e.g., for authentication or logging).
  • Controller Plugins: Legacy plugins like redirect(), flashMessenger(), halt() live in Zend\Mvc\Controller\Plugin, accessed via $this->pluginName() in controllers.
  • Route Configuration: Routes are defined in config/module.config.php under router.routes, using simple or complex chainable route types (e.g., Literal, Segment).
  • ServiceManager Integration: Controllers are factory-managed via controllers.factories in config; the ServiceManager bridges dependencies into controllers via __construct() or invokables.
  • View Layer: The ViewModel and ViewManager coordinate template rendering; plugins like url() or basePath() are available in templates.

Gotchas and Tips

  • ⚠️ No active support: This package is frozen. Migrate to Laminas MVC (same API, updated namespace Laminas\ instead of Zend\) or modern frameworks (Laravel/Symfony) for security and bug fixes.
  • Confusingly, some Composer aliases (e.g., zendframework/zend-mvc) still resolve to Laminas packages — verify composer show -i to confirm installed source.
  • Event listeners added in onBootstrap() run on every request; avoid expensive logic or database calls unless absolutely necessary — use short-circuiting via MvcEvent::stopPropagation() where possible.
  • Routing silently falls back to default routes if the configured route fails; enable Zend\Mvc\Controller\Plugin\Redirect error logging by adding use Zend\Mvc\Application; and Application::getMvcEvent()->getParam('route-match').
  • To extend: Use MvcEvent::EVENT_DISPATCH for pre/post-controller logic, but avoid overriding core controller classes unless necessary — prefer composition via controller plugins or dependency injection.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4