Skip to content

Releases: codemonster-ru/support

Release v1.4.1

02 Jan 19:34

Choose a tag to compare

Changed

  • Added optional $cast parameter to global env()helper to enable typed casting viaEnv::getCast()`.

Release v1.4.0

02 Jan 09:15

Choose a tag to compare

Changed

  • Bumped codemonster-ru/http to ^2.0.
  • Bumped codemonster-ru/session to ^2.0.

Release v1.3.1

02 Jan 08:33

Choose a tag to compare

Changed

  • Guarded database helpers against redeclaration.
  • json() helper now uses the container response instance for consistency.
  • Added explicit return types to abort() and dump() helpers.
  • Bumped codemonster-ru/database to ^2.0.
  • Session helper now distinguishes between "get" and "set" by argument count.
  • dd() now exits with status code 0.
  • Updated package metadata to reflect Annabel usage.

Fixed

  • Cleaned up changelog encoding artifacts and restored ASCII formatting.
  • Suppressed debug output in DumpHelperTest.
  • Added test coverage for null session values and empty/zero request inputs.

Release v1.3.0

09 Dec 14:07

Choose a tag to compare

Added

  • Global database helpers integrating the codemonster-ru/database package:
    • db() — returns the active database connection
    • schema() — returns schema builder for the selected connection
    • transaction() — executes callbacks inside a DB transaction
  • Full PHPUnit test coverage for:
    • db() helper
    • schema() helper
    • With isolated DatabaseManager and fake container bindings
  • Support for SQLite, MySQL and future drivers automatically via ConnectionInterface::schema().

Changed

  • SupportFakeContainer updated for correct behavior with database helpers:
    • singleton() is now eager, ensuring immediate instance creation
    • Improved compatibility with Annabel-style lazy container contracts
    • Fully stable integration with request/view/db helpers
  • Strengthened test isolation:
    • reset() now clears both bindings and instances
    • All tests run without requiring the Annabel framework

Fixed

  • schema() test failing due to instantiation of an abstract Grammar class
    → Now resolved automatically by the database package selecting proper driver grammar.
  • DB helper now correctly bootstraps connection configuration even without other framework components.

Release v1.1.0

16 Nov 08:18

Choose a tag to compare

Added

  • New abort() helper for throwing HTTP-like exceptions with a status code.
  • Introduced HttpStatusExceptionInterface extending Throwable for consistent type support.
  • Added test coverage for abort() including status code and message handling.

Updated

  • Documentation: added abort() to the list of provided helpers.

Release v1.0.0

28 Oct 16:41

Choose a tag to compare

Added

  • Global helper functions for the entire Codemonster PHP ecosystem:
    • config() — access or modify configuration values
    • env() — read environment variables
    • dump(), dd() — elegant variable dumping
    • request() — get current HTTP request or input
    • response(), json() — send structured responses
    • router() / route() — define and access routes
    • session() — read or write session data
    • view() / render() — render templates and return responses
  • Seamless integration with the Annabel framework via app() container
  • Standalone compatibility when Annabel is not installed
  • Full PHPUnit test coverage for all helpers (18 tests / 25 assertions)
  • Support for PHP 8.2 – 8.4 and PHPUnit 9–12