Skip to content

v2.0.1 - Fix ApplicationProxy constructor initialization order

Latest

Choose a tag to compare

@fcorz fcorz released this 13 Jan 11:31
· 1 commit to main since this release
a646319

What's Changed

Bug Fixes

  • Fix ApplicationProxy constructor initialization order - The $this->name property was being set after calling parent::__construct(), which caused the parent constructor to always use the default value 'app' instead of the passed $name parameter. This fix ensures the correct Firebase project configuration is loaded when using ApplicationProxy with a custom project name.

Details

The parent Application constructor uses $this->name to build the configuration path (firebase.projects.{$name}). Previously, the initialization order was:

// Before (incorrect)
parent::__construct($container); // Uses $this->name = 'app'
$this->name = $name; // Too late!Now fixed to:

// After (correct)
$this->name = $name; // Set first
parent::__construct($container); // Uses correct $name## Upgrade

This is a patch release with no breaking changes. Simply update your dependency:

composer update fcorz/hyperf-firebaseFull Changelog: v2.0.0...v2.0.1