Skip to content

Releases: codemonster-ru/annabel

Release v1.14.1

02 Jan 20:01

Choose a tag to compare

Changed

  • Explicitly pass the vendor error view path to SmartExceptionHandler.

Release v1.14.0

02 Jan 17:18

Choose a tag to compare

Added

  • Added guard against reinitializing the Application singleton and tests for it.
  • Added parameter support for Application::make() and helper tests for parameterized resolution.
  • Added middleware validation for missing controller methods and tests for role vs group middleware.
  • Added validation for multiple classes in custom provider files.

Changed

  • Container now supports parameterized resolution for closures and throws when reusing singletons with new parameters.
  • Middleware normalization handles role-based entries without misclassifying them as groups.
  • Provider class resolution now uses token parsing instead of regex.
  • Removed duplicate .env loading from CoreServiceProvider.
  • Updated README with container parameter usage and Application singleton notes.
  • Updated codemonster-ru dependencies: support ^1.4, errors ^1.2, view-php ^2.1, razor ^1.1.

Release v1.13.0

21 Dec 18:12

Choose a tag to compare

Added

  • Added support for database CLI seed commands (make:seed, seed) when codemonster-ru/database is installed.
  • Added support for database maintenance commands (db:wipe, db:truncate) in the Annabel CLI.
  • Added console tests to verify registered commands and aliases.

Changed

  • Updated README with the latest database CLI commands.

Release v1.12.0

10 Dec 14:10

Choose a tag to compare

Added

  • New annabel CLI entry point (php vendor/bin/annabel) with built-in help output inspired by Laravel's artisan, including colorized terminal formatting.
  • Added initial CLI commands: about, route:list, config:get, container:list, and serve.
  • When codemonster-ru/database is installed, Annabel CLI now auto-loads database commands (make:migration, migrate, migrate:rollback, migrate:status) via the package's CLI kernel.
  • Database CLI integration is now lazy: migration repository/connection initialize only when commands run, so commands are visible even without an active DB connection.

Release v1.11.0

09 Dec 14:39

Choose a tag to compare

Added

  • First-class database integration with the codemonster-ru/database package:

    • Added DatabaseServiceProvider with proper container bindings for:
      • DatabaseManager
      • automatic connection resolution
      • runtime grammar selection (MySQL, SQLite, extensible structure)
    • Added container binding for the Schema builder (Schema), enabling use of:
      • schema()->create()
      • schema()->table()
      • schema()->drop()
    • Automatic loading of DB configuration via config('database').
  • Support for global helpers from codemonster-ru/support, including:

    • db() — returns the current database connection
    • schema() — returns schema builder for the selected connection
    • transaction() — executes code inside a DB transaction

Changed

  • Bootstrapper updated to load the new DatabaseServiceProvider
    before view and session providers for correct dependency ordering.
  • Standardized provider boot order for proper initialization of config,
    database, view, session, and router layers.

Fixed

  • Eliminated errors caused by instantiating schema grammars directly from Annabel.
  • Corrected container resolution of database-related classes when running without Annabel (standalone mode).
  • Improved stability of the application container when resolving database singletons.

Improvements

  • Cleaner dependency injection for all DB components.
  • Better separation between Annabel core and database layer (no hard dependency on MySqlGrammar inside the framework).
  • Improved developer experience for Xen and other Annabel-based modules using database operations.

Release v1.10.0

15 Nov 22:10

Choose a tag to compare

Added

  • Support for parameterized route middleware in Kernel::runRoute().
    Middleware can now receive additional arguments (e.g. role names).

Changed

  • Middleware pipeline logic updated to match the new structure from
    codemonster-ru/router, where middleware items are stored as arrays:
    [MiddlewareClass, argument].

Fixed

  • Resolved "Argument #1 must be of type string, array given"
    when executing middleware with parameters.
  • Ensured consistent instantiation and execution of middleware classes.

Improvements

  • Cleaner and more explicit middleware invocation.
  • Better compatibility between Annabel and Xen framework modules.

Release v1.9.1

15 Nov 20:01

Choose a tag to compare

Fixed

  • Fixed incorrect behavior of the SessionServiceProvider, which caused multiple Store instances to be created, leading to session data loss.
  • Fixed an issue where sessions were not persisted between requests (due to an update to the codemonster-ru/session package).
  • session() now always returns a single Store, and boot() correctly starts the session via $store->start().

Changed

  • Session initialization logic in Annabel has been aligned with the new architecture of the codemonster-ru/session package.

Release v1.9.0

15 Nov 19:12

Choose a tag to compare

Added

  • Added automatic loading of the .env file via the codemonster-ru/env package during the bootstrap phase.
  • Support for application configuration via environment variables (APP_DEBUG, etc.).
  • All Annabel services, as well as the codemonster-ru/errors, codemonster-ru/view, and codemonster-ru/xen packages, can now correctly use env().

Changed

  • The Bootstrapper::run() method has been updated: loading of .env now occurs before ErrorHandler initialization, ensuring correct debug mode detection.
  • Improved integration with codemonster-ru/errors: detailed debug pages are now automatically enabled when APP_DEBUG=true.

Fixed

  • Fixed an issue where APP_DEBUG=true was ignored, and the generic error page was always displayed.
  • Fixed cases where ExceptionHandler would not work correctly due to missing env variables.

Release v1.8.1

15 Nov 18:49

Choose a tag to compare

Fixed

  • Fixed an issue with exception handling in Bootstrapper: Errors are now output using Response::send() instead of a direct echo call, preventing errors like "Call to undefined method Response::getBody()" and correctly sending response headers and status.
  • Fixed the behavior of the global exception handler—it is now fully compatible with the codemonster-ru/errors package and the new error handling architecture.

Release v1.8.0

15 Nov 17:38

Choose a tag to compare

Changed

  • The HTTP Kernel has been redesigned to integrate with the updated Router architecture (match-only).
  • The Kernel is now fully responsible for executing controllers, building the middleware pipeline, and generating Responses.
  • The handler invocation logic has been moved from the Router and Dispatcher to the Kernel.
  • Improved error handling: The Kernel now correctly passes exceptions to the ExceptionHandler, even if they occur within middleware or a controller.
  • The structure of the dispatch() method has been optimized; it now works only with Routes and delegates execution to runRoute().

Added

  • The runRoute() method has been added—a single point of execution for controllers and middleware.
  • Support for the Annabel DI container when creating controllers and middleware.
  • Support for route-middleware at the Route object level.

Fixed

  • Fixed an issue where Router would return the result of executing handler instead of Route, which would break the Kernel architecture.
  • Fixed the middleware execution order (it now correctly wraps the controller, as in Laravel).
  • Fixed bugs related to empty Response and rendering errors when there was no content.