Skip to content

Fix up depr notice. #18353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 18, 2025
Merged

Fix up depr notice. #18353

merged 1 commit into from
Apr 18, 2025

Conversation

dereuromark
Copy link
Member

Currently the strack trace doesnt give it away, neither does the message:

deprecated: 16384 :: Since 5.2.0: Returning a value from event listeners is deprecated. 
Use `$event->setResult()` instead.
/shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php, line: 314
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/cakephp/cakephp/src/Event/EventManager.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. on line 373 of /shared/httpd/ww/vendor/cakephp/cakephp/src/Core/functions.php
Stack Trace:

Cake\Error\ErrorTrap->handleError() [internal], line ??
/shared/httpd/ww/vendor/cakephp/cakephp/src/Core/functions.php /shared/httpd/ww/vendor/cakephp/cakephp/src/Core/functions.php, line 373
/shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php /shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php, line 333
Cake\Event\EventManager->_callListener() /shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php, line 314
Cake\Event\EventManager->dispatch() /shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 88
Cake\ORM\Table->dispatchEvent() /shared/httpd/ww/vendor/cakephp/cakephp/src/ORM/Query/SelectQuery.php, line 1537

With this fix:

deprecated: 16384 :: Since 5.2.0: Returning a value from event listeners is deprecated. 
Use `$event->setResult()` instead in `Model.beforeFind` of `App\Model\Table\PurchaseOrdersTable`
/shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php, line: 314
You can disable all deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED`. Adding `vendor/cakephp/cakephp/src/Event/EventManager.php` to `Error.ignoredDeprecationPaths` in your `config/app.php` config will mute deprecations from that file only. on line 373 of /shared/httpd/ww/vendor/cakephp/cakephp/src/Core/functions.php
Stack Trace:

Cake\Error\ErrorTrap->handleError() [internal], line ??
/shared/httpd/ww/vendor/cakephp/cakephp/src/Core/functions.php /shared/httpd/ww/vendor/cakephp/cakephp/src/Core/functions.php, line 373
/shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php /shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php, line 333
Cake\Event\EventManager->_callListener() /shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventManager.php, line 314
Cake\Event\EventManager->dispatch() /shared/httpd/ww/vendor/cakephp/cakephp/src/Event/EventDispatcherTrait.php, line 88
Cake\ORM\Table->dispatchEvent() /shared/httpd/ww/vendor/cakephp/cakephp/src/ORM/Query/SelectQuery.php, line 1537

@dereuromark dereuromark added this to the 5.2.3 milestone Apr 18, 2025
@markstory markstory merged commit b2c037c into 5.x Apr 18, 2025
23 of 24 checks passed
@markstory markstory deleted the 5.x-improve-depr-message branch April 18, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants