diff --git a/docs/api/variables/streams.md b/docs/api/variables/streams.md index 93d5c15e1..c872cf8bb 100644 --- a/docs/api/variables/streams.md +++ b/docs/api/variables/streams.md @@ -10,4 +10,7 @@ template. {$foo:bar} ``` +NB. Support for using streams to call variables is deprecated since Smarty v5.1 and will be removed +in a future version. + See also [`Template Resources`](../resources.md) diff --git a/src/Template.php b/src/Template.php index 0d66ff6e6..8bb5370f1 100644 --- a/src/Template.php +++ b/src/Template.php @@ -555,6 +555,9 @@ public function setRightDelimiter($right_delimiter) */ public function getStreamVariable($variable) { + + trigger_error("Using stream variables (\`\{\$foo:bar\}\`)is deprecated.", E_USER_DEPRECATED); + $_result = ''; $fp = fopen($variable, 'r+'); if ($fp) {