Page MenuHomePhabricator

Fatal error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in (path)/includes/libs/stats/BufferingStatsdDataFactory.php on line 35
Closed, InvalidPublic


i'm install stable mediawiki v.1.28.2. During installation no errors, but it appears when you navigate to a website after installation. Tried to install the version 1.27.3, a similar problem. PHP7.1

See error

Fatal error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in (path)/includes/libs/stats/BufferingStatsdDataFactory.php on line 35

On the recommendations made update

Composer update - OK!

$ cd
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 27 installs, 0 updates, 14 removals
Removing james-heinrich/getid3 (v1.9.12)
Removing pimple/pimple (v2.1.1)
Removing ruflin/elastica (3.1.1)
Removing symfony/process (v3.0.4)
Removing pear/mail (1.3.0)
Removing wikimedia/textcat (1.1.3)
Removing pear/net_smtp (1.7.1)
Removing pear/net_socket (1.0.14)
Removing pear/mail_mime-decode (
Removing pear/mail_mime (1.10.0)
Removing pear/pear-core-minimal (v1.10.1)
Removing pear/console_getopt (v1.4.1)
Removing pear/pear_exception (v1.0.0)
Removing firebase/php-jwt (v3.0.0)
Installing composer/spdx-licenses (1.1.4): Downloading (100%)
Installing jakub-onderka/php-parallel-lint (v0.9.2): Downloading (100%)
Installing squizlabs/php_codesniffer (2.6.0): Downloading (100%)
Installing mediawiki/mediawiki-codesniffer (v0.7.2): Downloading (100%)
Installing nikic/php-parser (v2.1.0): Downloading (100%)
Installing symfony/yaml (v3.3.0): Downloading (100%)
Installing sebastian/version (1.0.6): Downloading (100%)
Installing sebastian/global-state (1.1.1): Downloading (100%)
Installing sebastian/recursion-context (1.0.5): Downloading (100%)
Installing sebastian/exporter (1.2.2): Downloading (100%)
Installing sebastian/environment (1.3.8): Downloading (100%)
Installing sebastian/diff (1.4.3): Downloading (100%)
Installing sebastian/comparator (1.2.4): Downloading (100%)
Installing doctrine/instantiator (1.0.5): Downloading (100%)
Installing phpunit/php-text-template (1.2.1): Downloading (100%)
Installing phpunit/phpunit-mock-objects (2.3.8): Downloading (100%)
Installing phpunit/php-timer (1.0.9): Downloading (100%)
Installing phpunit/php-file-iterator (1.4.2): Downloading (100%)
Installing phpunit/php-token-stream (1.4.11): Downloading (100%)
Installing phpunit/php-code-coverage (2.2.4): Downloading (100%)
Installing webmozart/assert (1.2.0): Downloading (100%)
Installing phpdocumentor/reflection-common (1.0): Downloading (100%)
Installing phpdocumentor/type-resolver (0.2.1): Downloading (100%)
Installing phpdocumentor/reflection-docblock (3.1.1): Downloading (100%)
Installing phpspec/prophecy (v1.7.0): Downloading (100%)
Installing phpunit/phpunit (4.8.24): Downloading (100%)
Installing wikimedia/testing-access-wrapper (1.0.0): Downloading (100%)
jakub-onderka/php-parallel-lint suggests installing jakub-onderka/php-console-highlighter (Highlight syntax in code snippet)
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.2.1)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Writing lock file
Generating optimized autoload files

Problem remained. Please help!

Event Timeline

BeerNet renamed this task from Fatal error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in ...includes/libs/stats/BufferingStatsdDataFactory.php on line 35 to Fatal error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in (path)/includes/libs/stats/BufferingStatsdDataFactory.php on line 35 .Jun 4 2017, 6:14 PM
BeerNet updated the task description. (Show Details)

What are you installing from? The published tarballs?

The class is in 1.28 as seen at

What does composer show tell you? Does it include liuggio/statsd-php-client?

yes! published tarballs

in (path)/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Factory/ file StatsdDataFactory.php missing

there is only file StatsdDataFactory


namespace Liuggio\StatsdClient\Factory;

use Liuggio\StatsdClient\Entity\StatsdDataInterface;

Interface StatsdDataFactoryInterface

 * This function creates a 'timing' StatsdData.
 * @abstract
 * @param string|array $key  The metric(s) to set.
 * @param float        $time The elapsed time (ms) to log
function timing($key, $time);

 * This function creates a 'gauge' StatsdData.
 * @abstract
 * @param string|array $key   The metric(s) to set.
 * @param float        $value The value for the stats.
function gauge($key, $value);

 * This function creates a 'set' StatsdData object
 * A "Set" is a count of unique events.
 * This data type acts like a counter, but supports counting
 * of unique occurrences of values between flushes. The backend
 * receives the number of unique events that happened since
 * the last flush.
 * The reference use case involved tracking the number of active
 * and logged in users by sending the current userId of a user
 * with each request with a key of "uniques" (or similar).
 * @abstract
 * @param  string|array $key   The metric(s) to set.
 * @param  float        $value The value for the stats.
 * @return array
function set($key, $value);

 * This function creates a 'increment' StatsdData object.
 * @abstract
 * @param string|array $key        The metric(s) to increment.
 * @param float|1      $sampleRate The rate (0-1) for sampling.
 * @return array
function increment($key);

 * This function creates a 'decrement' StatsdData object.
 * @abstract
 * @param string|array $key        The metric(s) to decrement.
 * @param float|1      $sampleRate The rate (0-1) for sampling.
 * @return mixed
function decrement($key);

 * This function creates a 'updateCount' StatsdData object.
 * @abstract
 * @param string|array $key        The metric(s) to decrement.
 * @param integer      $delta      The delta to add to the each metric
 * @return mixed
function updateCount($key, $delta);

 * Produce a StatsdDataInterface Object.
 * @abstract
 * @param string $key    The key of the metric
 * @param int    $value  The amount to increment/decrement each metric by.
 * @param string $metric The metric type ("c" for count, "ms" for timing, "g" for gauge, "s" for set)
 * @return StatsdDataInterface
function produceStatsdData($key, $value = 1, $metric = StatsdDataInterface::STATSD_METRIC_COUNT);


If to create the specified file StatsdDataFactory.php (, then there is another error:

Fatal error: Interface 'Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface' not found in /home/a339/ on line 4

$ composer show
composer/semver 1.4.2 Semver library that offers utilities, version constraint parsing and validation.
composer/spdx-licenses 1.1.4 SPDX licenses list and validation library.
cssjanus/cssjanus v1.1.2 Convert CSS stylesheets between left-to-right and right-to-left.
doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
jakub-onderka/php-parallel-lint v0.9.2 This tool check syntax of PHP files about 20x faster than serial check.
justinrainbow/json-schema 3.0.1 A library to validate a json schema.
liuggio/statsd-php-client v1.0.18 Statsd (Object Oriented) client library for PHP
mediawiki/at-ease v1.1.0 Safe replacement to @ for suppressing warnings.
mediawiki/mediawiki-codesniffer v0.7.2 MediaWiki CodeSniffer Standards
monolog/monolog 1.18.2 Sends your logs to files, sockets, inboxes, databases and various web services
nikic/php-parser v2.1.0 A PHP parser written in PHP
nmred/kafka-php v0.1.5 Kafka client for php
oojs/oojs-ui v0.17.10 Provides library of common widgets, layouts, and windows.
oyejorge/less.php v1.7.0.10 PHP port of the Javascript version of LESS
phpdocumentor/reflection-common 1.0 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 3.1.1 With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
phpdocumentor/type-resolver 0.2.1
phpspec/prophecy v1.7.0 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 2.2.4 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator 1.4.2 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 1.0.9 Utility class for timing
phpunit/php-token-stream 1.4.11 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 4.8.24 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 2.3.8 Mock Object library for PHPUnit
psr/log 1.0.0 Common interface for logging libraries
sebastian/comparator 1.2.4 Provides the functionality to compare PHP values for equality
sebastian/diff 1.4.3 Diff implementation
sebastian/environment 1.3.8 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 1.2.2 Provides the functionality to export PHP variables for visualization
sebastian/global-state 1.1.1 Snapshotting of global state
sebastian/recursion-context 1.0.5 Provides functionality to recursively process PHP variables
sebastian/version 1.0.6 Library that helps with managing the version number of Git-hosted PHP projects
squizlabs/php_codesniffer 2.6.0 PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
symfony/yaml v3.3.0 Symfony Yaml Component
webmozart/assert 1.2.0 Assertions to validate method input/output with nice error messages.
wikimedia/assert v0.2.2 Provides runtime assertions
wikimedia/avro v1.7.7 A library for using Apache Avro with PHP.
wikimedia/base-convert v1.0.1 Convert an arbitrarily-long string from one numeric base to another, optionally zero-padding to a minimum column width.
wikimedia/cdb 1.4.1 Constant Database (CDB) wrapper library for PHP. Provides pure-PHP fallback when dba_* functions are absent.
wikimedia/cldr-plural-rule-parser v1.0.0 Evaluates plural rules specified in the CLDR project notation.
wikimedia/composer-merge-plugin v1.3.1 Composer plugin to merge multiple composer.json files
wikimedia/html-formatter 1.0.1 Performs transformations of HTML by wrapping around libxml2 and working around its countless bugs.
wikimedia/ip-set 1.1.0 Efficiently match IP addresses against a set of CIDR specifications.
wikimedia/php-session-serializer v1.0.4 Provides methods like PHP's session_encode and session_decode that don't mess with $_SESSION
wikimedia/relpath 1.0.3 Compute a relative filepath between two paths.
wikimedia/running-stat v1.1.0 PHP implementations of online statistical algorithms
wikimedia/scoped-callback v1.0.0 Class for asserting that a callback happens when a dummy object leaves scope
wikimedia/testing-access-wrapper 1.0.0 A simple helper class to access non-public elements of a class when testing.
wikimedia/utfnormal v1.1.0 Contains Unicode normalization routines, including both pure PHP implementations and automatic use of the 'intl' PHP extension when present
wikimedia/wait-condition-loop v1.0.1 Wait loop that reaches a condition or times out
wikimedia/wrappedstring v2.2.0 Automatically compact sequentially-outputted strings that share a common prefix / suffix pair.
zordius/lightncandy v0.23 An extremely fast PHP implementation of handlebars ( ) and mustache ( ).

Did a full install from the beginning with the creation of the database. This error still comes out when you install it, after creating the administrator account and asks to start the installation again.

php.err on server

[08-Jun-2017 15:22:57 Europe/Moscow] PHP Fatal error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in /home/a339/ on line 35

The error disappeared after deleting the contents of a directory (path)/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/ and loading it with files from archive from (v.1.0.18 - 10 Jun 2016).
Personally I do not understand why the distribution does not contain this latest version package?

Using 1.28.2 from I see StatsdDataFactory.php in the right place

Sams-MacBook-Pro:Factory reedy$ pwd
Sams-MacBook-Pro:Factory reedy$ ls -al
total 16
drwxr-xr-x@  4 reedy  staff   136 30 Apr 20:13 .
drwxr-xr-x@ 10 reedy  staff   340 30 Apr 20:13 ..
-rw-r--r--@  1 reedy  staff  2718 30 Apr 20:13 StatsdDataFactory.php
-rw-r--r--@  1 reedy  staff  2800 30 Apr 20:13 StatsdDataFactoryInterface.php

The situation is amazing. Did an experiment - conducted the procedure of casting of the archive to the website provider and unpacking from the very beginning through net2ftp (web based FTP client). It turned out that while unpacking archive corrupted these files, then the same archive is unpacked under Windows with no errors and all files are there.
Use the provider and net2ftp for many years and with such a bug was found for the first time. Technical support involves the feature of the distribution archive. We will investigate. Thank you all and sorry for the trouble.

Glad you could track down the reason. Sounds the underlying problem is outside of Wikimedia scope, hence closing this task as invalid.

I also have this error message "Fatal error: Uncaught Error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in". When I check the vendor folder, some file name are not correct. I think it is composer error. I solve this problem by direct download from github ( Open htdocs\mediawiki131\vendor\liuggio\statsd-php-client\src folder and delete "Linggo" folder. Copy the Linggo folder downloaded from github to htdocs\mediawiki131\vendor\liuggio\statsd-php-client\src\.

I also have this error message "Fatal error: Uncaught Error: Class 'Liuggio\StatsdClient\Factory\StatsdDataFactory' not found in". When I check the vendor folder, some file name are not correct. I think it is composer error. I solve this problem by direct download from github ( and copy the Linggo folder to htdocs\mediawiki131\vendor\liuggio\statsd-php-client\src.

What do you mean it's a composer error?

How did you install MW? Are you using the tarball with the composer folder included?

A newer version of this task is T259335: Warning: include(C:\xxx\mediawiki\vendor\composer/../liuggio/statsd-php-client/src/Liuggio/StatsdClient/Factory/StatsdDataFactoryInterface.php): failed to open stream: No such file or directory in C:\xxx\mediawiki\vendor\composer\ClassLoader.php on line 444, and I'm suspecting it's an issue like T257102: Mediawiki 1.34.2 tarball incompatible with 7zip on windows due to Pax format