diff --git a/CHANGELOG-5.0.md b/CHANGELOG-5.0.md index a3ddaa7ac0..5e2609368b 100644 --- a/CHANGELOG-5.0.md +++ b/CHANGELOG-5.0.md @@ -1,26 +1,26 @@ # Changelog -## [5.2.4](https://github.com/phalcon/cphalcon/releases/tag/v5.2.4) (xxxx-xx-xx) +## [5.3.0](https://github.com/phalcon/cphalcon/releases/tag/v5.3.0) (xxxx-xx-xx) ### Added -- Added `Phalcon\Mvc\Model::appendMessagedFrom` for code consistency and to add messages from another another model. [#16391](https://github.com/phalcon/cphalcon/issues/16391) + +- Added `Phalcon\Mvc\Model::appendMessagedFrom` for code consistency and to add messages from another model [#16391](https://github.com/phalcon/cphalcon/issues/16391) - Added `Phalcon\Autoload\Loader::isRegistered` for debugging purposes [#16391](https://github.com/phalcon/cphalcon/issues/16391) - Added `Phalcon\Mvc\Model\Metadata::initializeMetadata` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) - Added `Phalcon\Mvc\Model\Metadata::getMetaDataUniqueKey` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) - Added `Phalcon\Mvc\Model\Metadata::getColumnMapUniqueKey` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) +- Added `Phalcon\Encryption\Security\JWT\Builder::addHeader()` to allow adding custom headers [#16396](https://github.com/phalcon/cphalcon/issues/16396) ### Changed -- Refactored `Phalcon\Mvc\Model::doLowUpdate` and `Phalcon\Mvc\Model::postSaveRelatedRecords` for better code logic and a clearer seperation of behaviour although it lead to partially repeated code.[#16391](https://github.com/phalcon/cphalcon/issues/16391) + +- Refactored `Phalcon\Mvc\Model::doLowUpdate` and `Phalcon\Mvc\Model::postSaveRelatedRecords` for better code logic and a clearer separation of behaviour, although it lead to partially repeated code. [#16391](https://github.com/phalcon/cphalcon/issues/16391) - Cleaned `Phalcon\Mvc\Model\Metadata::initialize` [#16393] (https://github.com/phalcon/cphalcon/issues/16393) ### Fixed - Parse multipart/form-data from PUT request [#16271](https://github.com/phalcon/cphalcon/issues/16271) -- Set Dynamic Update by default system wide [#16343](https://github.com/phalcon/cphalcon/issues/16343) - -### Added - -- Added `Phalcon\Encryption\Security\JWT\Builder::addHeader()` to allow adding custom headers [#16396](https://github.com/phalcon/cphalcon/issues/16396) +- Set Dynamic Update by default system-wide [#16343](https://github.com/phalcon/cphalcon/issues/16343) +- Fixed memory leak in Micro application [#16404](https://github.com/phalcon/cphalcon/pull/16404) ## [5.2.3](https://github.com/phalcon/cphalcon/releases/tag/v5.2.3) (2023-07-26) diff --git a/phalcon/Mvc/Micro.zep b/phalcon/Mvc/Micro.zep index 721da8801e..e1de0685f3 100644 --- a/phalcon/Mvc/Micro.zep +++ b/phalcon/Mvc/Micro.zep @@ -1142,13 +1142,6 @@ class Micro extends Injectable implements ArrayAccess, EventsAwareInterface */ public function setDI( container) -> void { - /** - * We automatically set ourselves as application service - */ - if !container->has("application") { - container->set("application", this); - } - let this->container = container; } diff --git a/tests/integration/Mvc/Micro/HasServiceCest.php b/tests/integration/Mvc/Micro/HasServiceCest.php index d8db383dc9..54bd06cf5f 100644 --- a/tests/integration/Mvc/Micro/HasServiceCest.php +++ b/tests/integration/Mvc/Micro/HasServiceCest.php @@ -33,9 +33,7 @@ public function mvcMicroHasService(IntegrationTester $I) $I->wantToTest('Mvc\Micro - hasService()'); $micro = new Micro(); - $di = new Di(); - $micro->setDi($di); @@ -43,10 +41,6 @@ public function mvcMicroHasService(IntegrationTester $I) $micro->hasService('fake') ); - $I->assertTrue( - $micro->hasService('application') - ); - $I->assertFalse( $micro->hasService('escaper') ); @@ -57,7 +51,6 @@ public function mvcMicroHasService(IntegrationTester $I) $escaper = new Escaper(); - $micro->setService('escaper', $escaper); $I->assertTrue( @@ -75,7 +68,6 @@ public function mvcMicroHasService(IntegrationTester $I) $router = new Router(); - $di->set('router', $router); $I->assertTrue( diff --git a/tests/integration/Mvc/Micro/OffsetExistsCest.php b/tests/integration/Mvc/Micro/OffsetExistsCest.php index cee1d0a947..fcca5ef9e9 100644 --- a/tests/integration/Mvc/Micro/OffsetExistsCest.php +++ b/tests/integration/Mvc/Micro/OffsetExistsCest.php @@ -33,9 +33,7 @@ public function mvcMicroOffsetExists(IntegrationTester $I) $I->wantToTest('Mvc\Micro - offsetExists()'); $micro = new Micro(); - $di = new Di(); - $micro->setDi($di); @@ -43,10 +41,6 @@ public function mvcMicroOffsetExists(IntegrationTester $I) isset($micro['fake']) ); - $I->assertTrue( - isset($micro['application']) - ); - $I->assertFalse( isset($micro['escaper']) ); @@ -57,25 +51,20 @@ public function mvcMicroOffsetExists(IntegrationTester $I) $escaper = new Escaper(); - $micro->setService('escaper', $escaper); $I->assertTrue( isset($micro['escaper']) ); - $dispatcher = new Dispatcher(); - $micro['dispatcher'] = $dispatcher; $I->assertTrue( isset($micro['dispatcher']) ); - $router = new Router(); - $di->set('router', $router); $I->assertTrue(