diff options
-rw-r--r-- | README.markdown | 6 | ||||
-rw-r--r-- | src/ste/STECore.php | 2 | ||||
-rw-r--r-- | tests/functional/test_user_tag_returns_nothing/Test.php | 22 | ||||
-rw-r--r-- | tests/functional/test_user_tag_returns_nothing/test.tpl | 1 | ||||
-rw-r--r-- | tests/functional/test_user_tag_returns_nothing/want | 0 |
5 files changed, 28 insertions, 3 deletions
diff --git a/README.markdown b/README.markdown index 5cbd976..fe79556 100644 --- a/README.markdown +++ b/README.markdown @@ -4,6 +4,10 @@ STE Template Engine The STE Template Engine (STE) is a template engine for the PHP programming language. +## ⚠️ No longer maintained ⚠️ + +For now, I no longer maintain Ratatöskr / STE. I don't use it myself any more and to my knowledge nobody else does either. The time I'd need to invest to keep up with new PHP versions and other maintenance chores therefore don't seem worth it. I might revisit this in the future, but for now, I want to focus on other things. + Get it via composer / packagist ------------------------------- @@ -35,5 +39,3 @@ Documentation The `docu` directory contains the documentation of the template language. If you need the documentation of the php code / the API, you can create it with the `mkdocu.sh` script. This is done using [phpDocumentor](https://phpdoc.org/). It will be installed as a dev-depencency by composer. - -There is also a mirror of the documentation [here](http://r7r.silvasur.net/ste_docu/). diff --git a/src/ste/STECore.php b/src/ste/STECore.php index a53e652..595228b 100644 --- a/src/ste/STECore.php +++ b/src/ste/STECore.php @@ -123,7 +123,7 @@ class STECore throw new RuntimeError("Can not call tag \"$name\": Does not exist."); } } - return call_user_func($this->tags[$name], $this, $params, $sub); + return (string)call_user_func($this->tags[$name], $this, $params, $sub); } catch (RuntimeError $e) { if (!$this->mute_runtime_errors) { return "RuntimeError occurred on tag '$name': " . $e->getMessage(); diff --git a/tests/functional/test_user_tag_returns_nothing/Test.php b/tests/functional/test_user_tag_returns_nothing/Test.php new file mode 100644 index 0000000..cd85908 --- /dev/null +++ b/tests/functional/test_user_tag_returns_nothing/Test.php @@ -0,0 +1,22 @@ +<?php + + +namespace tests\functional\test_user_tag_returns_nothing; + +use tests\functional\BaseTest; +use r7r\ste\STECore; + +class Test extends BaseTest +{ + protected function setUpSte(STECore $ste): void + { + $ste->register_tag('foobar', function ($ste, $params, $sub) { + // nop + }); + } + + protected function getDirectory(): string + { + return __DIR__; + } +} diff --git a/tests/functional/test_user_tag_returns_nothing/test.tpl b/tests/functional/test_user_tag_returns_nothing/test.tpl new file mode 100644 index 0000000..94799a8 --- /dev/null +++ b/tests/functional/test_user_tag_returns_nothing/test.tpl @@ -0,0 +1 @@ +<ste:foobar />
\ No newline at end of file diff --git a/tests/functional/test_user_tag_returns_nothing/want b/tests/functional/test_user_tag_returns_nothing/want new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/functional/test_user_tag_returns_nothing/want |