vendor/bin/typo3 analytics:generate-fake-data --site=main --days=30 [--page=12 --page=34]The command generates fake visits for the given pages (or up to 30 standard pages found in the
page tree) and aggregates them immediately. Visitors enter on a page – earlier pages are more
popular –, about half of them leave right away, the others click through further pages. Traffic
follows a weekly rhythm, grows slowly over the period and has occasional peak days; about 8 % of
the hits are bots. Use --days=400 to fill the yearly report.
For local environments only – the data cannot be told apart from real hits.
The extension ships its own Composer setup for the tests (.Build/):
composer install
# unit tests
.Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml Tests/Unit
# functional tests (need a MySQL/MariaDB instance, e.g. in DDEV)
typo3DatabaseDriver=mysqli typo3DatabaseName=func_test \
typo3DatabaseUsername=root typo3DatabasePassword=root typo3DatabaseHost=db \
.Build/bin/phpunit -c .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml Tests/FunctionalVersion 2.0 is the port from TYPO3 11.5 to 14. The most important decisions:
| Topic | v11 | v14 |
|---|---|---|
| Backend module | addModule() in ext_tables.php |
Configuration/Backend/Modules.php (route target, no Extbase), templates via ModuleTemplate::renderResponse() with the core layout Module |
| Page module header | drawHeaderHook |
PSR-14 listener for ModifyPageLayoutContentEvent |
| Scheduler tasks | SC_OPTIONS['scheduler']['tasks'] |
native task types via TCA (Configuration/TCA/Overrides/tx_scheduler_task.php, addRecordType()) – the old registration is deprecated since v14 |
| Charts | RequireJS module | ES module @datamints/analytics/analytics-charts.js (import map in Configuration/JavaScriptModules.php), uses the chart.js provided by EXT:dashboard |
| Fluid views | StandaloneView (removed in v14) |
BackendViewFactory; the own widgets implement RequestAwareWidgetInterface |
| DBAL parameter types | \PDO::PARAM_*, Doctrine\DBAL\Connection::PARAM_*_ARRAY |
TYPO3\CMS\Core\Database\Connection::PARAM_* (Doctrine DBAL 4) |
The site configuration (analytics: in config.yaml) did not change; it is still read raw from
Site::getConfiguration().