Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2020-09-03 04:51:18 +0300
committerGitHub <noreply@github.com>2020-09-03 04:51:18 +0300
commit3565da78bff718f201247fc2f692c0be29220fde (patch)
treee8268373b284c293c307935a8bfa20d5cd920b48 /DIObject.php
parent21cafb0533d07acbe0a574e23bd972b20d72aa90 (diff)
Updates php-di to 6.2.1 (#16311)
Diffstat (limited to 'DIObject.php')
-rw-r--r--DIObject.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/DIObject.php b/DIObject.php
new file mode 100644
index 0000000000..8e3f47f9e0
--- /dev/null
+++ b/DIObject.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace DI;
+
+/**
+ * This file aims to circumvent problems when updating to Matomo 4.
+ * Matomo 4 includes a newer version of PHP-DI, which does not include \DI\object() any longer
+ * To not run into any problems with plugins still using that we forward this method to \DI\autowire
+ */
+
+if (!function_exists("\DI\object")) {
+
+ function object()
+ {
+ return call_user_func_array("\DI\autowire", func_get_args());
+ }
+
+}
+
+if (!function_exists("\DI\link")) {
+
+ function link()
+ {
+ return call_user_func_array("\DI\get", func_get_args());
+ }
+
+} \ No newline at end of file