config
3 months ago
core
2 weeks ago
js
3 months ago
lang
2 weeks ago
libs
1 month ago
node_modules
4 months ago
plugins
2 weeks ago
vendor
2 weeks ago
.htaccess
6 years ago
AGENTS.md
2 weeks ago
DIObject.php
2 years ago
LEGALNOTICE
6 months ago
LICENSE
2 years ago
LegacyAutoloader.php
2 years ago
PRIVACY.md
5 years ago
README.md
6 months ago
SECURITY.md
2 years ago
bootstrap.php
1 month ago
console
6 years ago
favicon.ico
2 years ago
index.php
2 years ago
matomo.js
3 months ago
matomo.php
2 years ago
offline-service-worker.js
5 years ago
piwik.js
3 months ago
piwik.php
6 months ago
robots.txt
5 years ago
DIObject.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Matomo\Dependencies\DI; |
| 4 | |
| 5 | /** |
| 6 | * This file aims to circumvent problems when updating to Matomo 4. |
| 7 | * Matomo 4 includes a newer version of PHP-DI, which does not include \DI\object() any longer |
| 8 | * To not run into any problems with plugins still using that we forward this method to \DI\autowire |
| 9 | */ |
| 10 | if (!function_exists("Matomo\\Dependencies\\DI\\object")) { |
| 11 | function object(...$params) |
| 12 | { |
| 13 | return \Piwik\DI::autowire(...$params); |
| 14 | } |
| 15 | } |
| 16 | if (!function_exists("Matomo\\Dependencies\\DI\\link")) { |
| 17 | function link(...$params) |
| 18 | { |
| 19 | return \Piwik\DI::get(...$params); |
| 20 | } |
| 21 | } |
| 22 |