+ ';
+ }
+ self::$blacklistedClassNames = $backupBlacklistedClassNames;
+ self::$blacklistedPropertyNames = $backupBlacklistedPropertyNames;
+ if ($return === true) {
+ return $css . $output;
+ }
+ echo $css . $output;
+
+ return '';
+ }
+
+ protected static function exposeMethod(ReflectionMethod $method): bool
+ {
+ $methodName = $method->getName();
+ $allowedPrefixes = ['get', 'has', 'is'];
+
+ $allowedByName = false;
+ foreach ($allowedPrefixes as $allowedPrefix) {
+ if (StringUtility::beginsWith($methodName, $allowedPrefix)) {
+ $allowedByName = true;
+ break;
+ }
+ }
+
+ return
+ $allowedByName
+ && $method->isPublic()
+ && count($method->getParameters()) === 0
+ ;
+ }
+
+ protected static function shortenMethodName(string $methodName): string
+ {
+ $allowedPrefixes = ['get', 'has', 'is'];
+
+ foreach ($allowedPrefixes as $allowedPrefix) {
+ if (StringUtility::beginsWith($methodName, $allowedPrefix)) {
+ return lcfirst(substr($methodName, strlen($allowedPrefix)));
+ }
+ }
+
+ return $methodName;
+ }
+}
diff --git a/Classes/ViewHelpers/DebugViewHelper.php b/Classes/ViewHelpers/DebugViewHelper.php
new file mode 100644
index 0000000..9798c48
--- /dev/null
+++ b/Classes/ViewHelpers/DebugViewHelper.php
@@ -0,0 +1,44 @@
+
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+use TYPO3\CMS\Fluid\ViewHelpers\DebugViewHelper as Typo3DebugViewHelper;
+use WerkraumMedia\FDebug\Utility\DebuggerUtility;
+
+/**
+ * Replacement for original TYPO3 ViewHelper.
+ * Will use alternative DebuggerUtility for integrator optimized debugging information.
+ */
+class DebugViewHelper extends Typo3DebugViewHelper
+{
+ /**
+ * @param array $arguments
+ * @param \Closure $renderChildrenClosure
+ * @param RenderingContextInterface $renderingContext
+ *
+ * @return string
+ */
+ public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
+ {
+ return DebuggerUtility::var_dump($renderChildrenClosure(), $arguments['title'], $arguments['maxDepth'], (bool)$arguments['plainText'], (bool)$arguments['ansiColors'], (bool)$arguments['inline'], $arguments['blacklistedClassNames'], $arguments['blacklistedPropertyNames']);
+ }
+}
diff --git a/README.md b/README.md
deleted file mode 100644
index ae6e6f4..0000000
--- a/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# fdebug
-Integrator optimized f:debug alternative
diff --git a/Readme.rst b/Readme.rst
new file mode 100644
index 0000000..cb86999
--- /dev/null
+++ b/Readme.rst
@@ -0,0 +1,50 @@
+TYPO3 f:debug alternative
+=========================
+
+TYPO3 offers an ``f:debug`` ViewHelper to introspect variables.
+That ViewHelper is a small wrapper around ``DebuggerUtility`` of EXT:extbase.
+
+The result of ``DebuggerUtility`` is always developer focused.
+``f:debug`` on the other hand is used within Fluid and should be integrator focused.
+
+This extension provides an alternative to existing ``f:debug`` which focuses on
+integrators.
+
+Installation
+------------
+
+Run ``composer req --dev werkraummedia/fdebug:^1.0``.
+
+Usage
+-----
+
+1:1 the original ``f:debug``, no need to change anything.
+The original ViewHelper is overloaded and not usable anymore.
+
+The goal
+--------
+
+Improve usage for integrators. E.g. show data they have access to within Fluid.
+Don't focus on properties, but actual available info.
+Inspect methods and public properties. Respect method names.
+
+This should become part of TYPO3 core (by providing a patch) once it is stable
+enough.
+Right now it might lack features or break under some circumstances.
+
+Please give it a try and open issues or provide pull requests.
+
+Why an extension?
+-----------------
+
+That allows for usage of ``ext_localconf.php`` to overload Fluid namespace ``f``.
+Also it allows to easily share and update the current state and prevent inclusion
+into production systems.
+
+Current features
+----------------
+
+Do not render protected or private properties. These are not available within Fluid.
+
+Render methods which are public and start with ``get``, ``has`` or ``is`` and don't
+need any arguments.
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..dfe9ec9
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,48 @@
+{
+ "name": "werkraummedia/fdebug",
+ "description": "Integrator optimized f:debug alternative",
+ "type": "typo3-cms-extension",
+ "license": "GPL-2.0-or-later",
+ "homepage": "https://github.com/werkraum-media/fdebug",
+ "support": {
+ "email": "coding@daniel-siepmann.de",
+ "source": "https://github.com/werkraum-media/fdebug",
+ "issues": "https://github.com/werkraum-media/fdebug/issues"
+ },
+ "authors": [
+ {
+ "name": "Daniel Siepmann",
+ "email": "coding@daniel-siepmann.de"
+ }
+ ],
+ "autoload": {
+ "psr-4": {
+ "WerkraumMedia\\FDebug\\": "Classes/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "WerkraumMedia\\FDebug\\Tests\\": "Tests/"
+ }
+ },
+ "require": {
+ "php": "^7.2",
+ "typo3/cms-core": "^10.4",
+ "typo3/cms-extbase": "^10.4",
+ "typo3/cms-fluid": "^10.4",
+ "typo3/cms-frontend": "^10.4"
+ },
+ "config": {
+ "sort-packages": true
+ },
+ "extra": {
+ "typo3/cms": {
+ "cms-package-dir": "{$vendor-dir}/typo3/cms",
+ "extension-key": "fdebug",
+ "web-dir": ".Build/web"
+ },
+ "branch-alias": {
+ "dev-main": "1.0.x-dev"
+ }
+ }
+}
diff --git a/ext_emconf.php b/ext_emconf.php
new file mode 100644
index 0000000..01343b8
--- /dev/null
+++ b/ext_emconf.php
@@ -0,0 +1,25 @@
+ 'f:debug Alternative',
+ 'description' => 'Integrator optimized f:debug alternative',
+ 'category' => 'fe',
+ 'state' => 'beta',
+ 'uploadfolder' => 0,
+ 'createDirs' => '',
+ 'clearCacheOnLoad' => 0,
+ 'author' => 'Daniel Siepmann',
+ 'author_email' => 'coding@daniel-siepmann.de',
+ 'author_company' => '',
+ 'version' => '1.0.0',
+ 'constraints' => [
+ 'depends' => [
+ 'extbase' => '',
+ 'fluid' => '',
+ 'frontend' => '',
+ 'core' => '',
+ ],
+ 'conflicts' => [],
+ 'suggests' => [],
+ ],
+];
diff --git a/ext_localconf.php b/ext_localconf.php
new file mode 100644
index 0000000..55b1b25
--- /dev/null
+++ b/ext_localconf.php
@@ -0,0 +1,6 @@
+