Skip to content

Commit

Permalink
Show warning when using deprecated SessionComponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Nov 11, 2014
1 parent dcccbf4 commit 460fbf5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Controller/Component/SessionComponent.php
Expand Up @@ -25,7 +25,7 @@
*
* @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html
* @link http://book.cakephp.org/2.0/en/development/sessions.html
* @deprecated
* @deprecated 3.0.0
*/
class SessionComponent extends Component {

Expand All @@ -43,6 +43,7 @@ class SessionComponent extends Component {
* @return void
*/
public function initialize(array $config) {
trigger_error('SessionComponent has been deprecated. Use request->session() instead.', E_USER_WARNING);
$this->_session = $this->_registry->getController()->request->session();
}

Expand Down

0 comments on commit 460fbf5

Please sign in to comment.