cphalcon
cphalcon copied to clipboard
[BUG]: Deprecated: Use of "self" in callables is deprecated
Volt view with <title>{{ get_title() }}</title>
produces following deprecation noctice:
<title><br />
<b>Deprecated</b>: Use of "self" in callables is deprecated in <b>/var/www/storage/cache/volt/_var_www_app_shared_views_error.volt.php</b> on line <b>5</b><br />
<br />
<b>Deprecated</b>: Use of "self" in callables is deprecated in <b>/var/www/storage/cache/volt/_var_www_app_shared_views_error.volt.php</b> on line <b>5</b><br />
<br />
<b>Deprecated</b>: Use of "self" in callables is deprecated in <b>/var/www/storage/cache/volt/_var_www_app_shared_views_error.volt.php</b> on line <b>5</b><br />
</title>
Additional info:
error_reporting(E_ALL);
Details
- Phalcon version: 5.2.1
- PHP Version: PHP 8.2.3 (cli) (built: Mar 1 2023 08:20:15) (NTS)
- Operating System: Docker (Linux 9f39b182091e 5.10.0-19-cloud-arm64 SMP Debian 5.10.149-1 (2022-10-17) aarch64 GNU/Linux)
- Installation type: installing via package manager
- Zephir version (if any): Version 0.17.0-$Id$
- Server: Nginx
Two things that I saw after updating to php 8.2:
$this->di->getShared('url')->getBaseUri();
results in:
Deprecated: Creation of dynamic property MyApp::$di is deprecated in /var/web/nginx/html/myApp/app/App.php on line 46
And
echo Phalcon\Tag::renderTitle();
results in:
Deprecated: Use of "self" in callables is deprecated in /var/web/nginx/html/myApp/app/modules/public/views/phtml/partials/header.phtml on line 16
This error also occurs in:
Tag::hiddenField Model method findFirstBy{Field Name}
so we have to lock project phalcon version to PHP8.1
For now, looks like it's an upstream issue. https://github.com/zephir-lang/zephir/issues/2405