Issue
What I did
- Purposefully put 
$this->primaryKey('id')in my Table class - Call 
->find('all')->all()on that Table inside Controller 
What I expected
A deprecation notice at the top of my screen since primaryKey() is deprecated.
What actually happened
Everything worked with no errors shown
What have I checked
display_errorsisOninphpinfo()error_reportingis32767a.k.a.E_ALLinphpinfo()$this->TESTprimaryKey('id')raisesBadMethodCallExceptionUnknown method "TESTprimaryKey", meaning it's the right TableError.errorLevelset to E_ALL in my app.phpphp composer.phar upgradeandphp composer.phar updatejust in caseVERSION.txtshows 3.6.10. All of this is also true for 4.2.4.
Solution
This looks all good, E_ALL includes deprecations, and as long as debug is enabled in your app configuration, deprecation warnings will be shown (irrespectively of PHPs display_errors setting).
If you are using Debug Kit, deprecation warnings will be intercepted by it, and they can be found in the Deprecations panel.
Answered By - ndm
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.