Skip to content

Commit 663b220

Browse files
committed
weakly deprecated methods trigger E_USER_DEPRECATED
1 parent 07df516 commit 663b220

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

src/Http/Request.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public function isMethod($method)
201201
*/
202202
public function isPost()
203203
{
204+
trigger_error('Method isPost() is deprecated, use isMethod(\'POST\') instead.', E_USER_DEPRECATED);
204205
return $this->isMethod('POST');
205206
}
206207

src/Http/Response.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ public function getHeaders()
222222
*/
223223
public static function date($time = NULL)
224224
{
225+
trigger_error('Method date() is deprecated, use Nette\Http\Helpers::formatDate() instead.', E_USER_DEPRECATED);
225226
return Helpers::formatDate($time);
226227
}
227228

0 commit comments

Comments
 (0)