Remove vendor directories from tracking\n\n- Remove phpunit vendor files from Git LFS\n- Add vendor directories to .gitignore\n- Vendor directories should not be in version control\n\nCo-authored-by: Ben Reed <ben@tealmaker.com>

This commit is contained in:
bengizmo 2025-05-18 19:16:12 -03:00
parent ab6c107a0f
commit 95ada77e26
2561 changed files with 0 additions and 218819 deletions

View file

@ -1,21 +0,0 @@
The MIT License
Copyright (c) 2010-2018 Ignas Rudaitis
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,144 +0,0 @@
<?php
/**
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2023 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork;
if (function_exists('Patchwork\replace')) {
return;
}
require_once __DIR__ . '/src/Exceptions.php';
require_once __DIR__ . '/src/CallRerouting.php';
require_once __DIR__ . '/src/CodeManipulation.php';
require_once __DIR__ . '/src/Utils.php';
require_once __DIR__ . '/src/Stack.php';
require_once __DIR__ . '/src/Config.php';
function redefine($subject, callable $content)
{
$handle = null;
foreach (array_slice(func_get_args(), 1) as $content) {
$handle = CallRerouting\connect($subject, $content, $handle);
}
$handle->silence();
return $handle;
}
function relay(?array $args = null)
{
return CallRerouting\relay($args);
}
function fallBack()
{
throw new Exceptions\NoResult;
}
function restore(CallRerouting\Handle $handle)
{
$handle->expire();
}
function restoreAll()
{
CallRerouting\disconnectAll();
}
function silence(CallRerouting\Handle $handle)
{
$handle->silence();
}
function assertEventuallyDefined(CallRerouting\Handle $handle)
{
$handle->unsilence();
}
function getClass()
{
return Stack\top('class');
}
function getCalledClass()
{
return Stack\topCalledClass();
}
function getFunction()
{
return Stack\top('function');
}
function getMethod()
{
return getClass() . '::' . getFunction();
}
function configure()
{
Config\locate();
}
function hasMissed($callable)
{
return Utils\callableWasMissed($callable);
}
function always($value)
{
return function() use ($value) {
return $value;
};
}
Utils\alias('Patchwork', [
'redefine' => ['replace', 'replaceLater'],
'relay' => 'callOriginal',
'fallBack' => 'pass',
'restore' => 'undo',
'restoreAll' => 'undoAll',
]);
configure();
Utils\markMissedCallables();
CodeManipulation\Stream::discoverOtherWrapper();
CodeManipulation\Stream::wrap();
CodeManipulation\register([
CodeManipulation\Actions\CodeManipulation\propagateThroughEval(),
CodeManipulation\Actions\CallRerouting\injectCallInterceptionCode(),
CodeManipulation\Actions\RedefinitionOfInternals\spliceNamedFunctionCalls(),
CodeManipulation\Actions\RedefinitionOfInternals\spliceDynamicCalls(),
CodeManipulation\Actions\RedefinitionOfNew\spliceAllInstantiations,
CodeManipulation\Actions\RedefinitionOfNew\publicizeConstructors,
CodeManipulation\Actions\ConflictPrevention\preventImportingOtherCopiesOfPatchwork(),
]);
CodeManipulation\onImport([
CodeManipulation\Actions\CallRerouting\markPreprocessedFiles(),
]);
Utils\clearOpcodeCaches();
register_shutdown_function('Patchwork\Utils\clearOpcodeCaches');
CallRerouting\createStubsForInternals();
CallRerouting\connectDefaultInternals();
require __DIR__ . '/src/Redefinitions/LanguageConstructs.php';
CodeManipulation\register([
CodeManipulation\Actions\RedefinitionOfLanguageConstructs\spliceAllConfiguredLanguageConstructs(),
CodeManipulation\Actions\CallRerouting\injectQueueDeploymentCode(),
CodeManipulation\Actions\CodeManipulation\injectStreamWrapperReinstatementCode(),
]);
if (Utils\wasRunAsConsoleApp()) {
require __DIR__ . '/src/Console.php';
}

View file

@ -1,41 +0,0 @@
# Patchwork
Patchwork implements the redefinition ([monkey-patching](https://en.wikipedia.org/wiki/Monkey_patch)) of functions and methods in PHP. This includes both user-defined and internal callables, which can be functions, class methods, or instance methods. In addition, [many](https://github.com/antecedent/patchwork/blob/master/src/Redefinitions/LanguageConstructs.php) function-like constructs, such as `exit` or `include`, are supported in an analogous way.
Internally, Patchwork uses a [stream wrapper](http://php.net/manual/en/class.streamwrapper.php) on `file://`. In the case of user-defined functions and methods, it is used to inject a simple interceptor snippet to the beginning of every such callable. For the remaining types of callables, various other strategies are applied.
## Example: a DIY profiler
```php
use function Patchwork\{redefine, relay, getMethod};
$profiling = fopen('profiling.csv', 'w');
redefine('App\*', function(...$args) use ($profiling) {
$begin = microtime(true);
relay(); # calls the original definition
$end = microtime(true);
fputcsv($profiling, [getMethod(), $end - $begin]);
});
```
## Notes
* *Method redefinition* is the internally preferred metaphor for Patchwork's behavior.
* `restoreAll()` and `restore($handle)` end the lifetime of, respectively, all redefinitions, or only one of them, where `$handle = redefine(...)`.
* Closure `$this` is automatically re-bound to the enclosing class of the method being redefined.
* The behavior of `__CLASS__`, `static::class` etc. inside redefinitions disregards the metaphor. `getClass()`, `getCalledClass()`, `getMethod()` and `getFunction()` from the `Patchwork` namespace should be used instead.
## Testing-related uses
Patchwork can be used to stub static methods, which, however, is a controversial practice.
It should be applied prudently, that is, only after making oneself familiar with its pitfalls and temptations in other programming languages. For instance, in Javascript, Ruby, Python and some others, the native support for monkey-patching has made its testing-related uses more commonplace than in PHP.
Tests that use monkey-patching are often no longer *unit* tests, because they become sensitive to details of implementation, not only those of interface: for example, such a test might no longer pass after switching from `time()` to `DateTime`.
That being said, they still have their place where the only economically viable alternative is having no tests at all.
## Other use cases
Patchwork is not suggested for [AOP](https://en.wikipedia.org/wiki/Aspect-oriented_programming) and other kinds of production usage. Its impact on the application's performance is highly likely to be prohibitively large. Additionally, while no _particular_ Patchwork-related security risks are either known or anticipated, please keep in mind that Patchwork was never developed with production environments in mind.

View file

@ -1,17 +0,0 @@
{
"base-path": null,
"output": "patchwork.phar",
"check-requirements": false,
"compactors": [
"KevinGH\\Box\\Compactor\\Php"
],
"main": "Patchwork.php",
"directories": [
"src"
],
"files": [
"Patchwork.php",
"LICENSE"
],
"dump-autoload": false
}

View file

@ -1,20 +0,0 @@
{
"name": "antecedent/patchwork",
"homepage": "https://antecedent.github.io/patchwork/",
"description": "Method redefinition (monkey-patching) functionality for PHP.",
"keywords": ["testing", "redefinition", "runkit", "monkeypatching", "interception", "aop", "aspect"],
"license": "MIT",
"authors": [
{
"name": "Ignas Rudaitis",
"email": "ignas.rudaitis@gmail.com"
}
],
"minimum-stability": "stable",
"require": {
"php": ">=7.1.0"
},
"require-dev": {
"phpunit/phpunit": ">=4"
}
}

View file

@ -1,604 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CallRerouting;
require __DIR__ . '/CallRerouting/Handle.php';
require __DIR__ . '/CallRerouting/Decorator.php';
use Patchwork\Utils;
use Patchwork\Stack;
use Patchwork\Config;
use Patchwork\Exceptions;
use Patchwork\CodeManipulation;
use Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs;
use Patchwork\CodeManipulation\Actions\RedefinitionOfNew;
const INTERNAL_REDEFINITION_NAMESPACE = 'Patchwork\Redefinitions';
const EVALUATED_CODE_FILE_NAME_SUFFIX = '/\(\d+\) : eval\(\)\'d code$/';
const INSTANTIATOR_NAMESPACE = 'Patchwork\Instantiators';
const INSTANTIATOR_DEFAULT_ARGUMENT = 'Patchwork\CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT';
const INTERNAL_STUB_CODE = '
namespace @ns_for_redefinitions;
function @name(@signature) {
$__pwArgs = \array_slice(\debug_backtrace()[0]["args"], 1);
if (!empty($__pwNamespace) && \function_exists($__pwNamespace . "\\\\@name")) {
return \call_user_func_array($__pwNamespace . "\\\\@name", $__pwArgs);
}
@interceptor;
return \call_user_func_array("@name", $__pwArgs);
}
';
const INSTANTIATOR_CODE = '
namespace @namespace;
class @instantiator {
function instantiate(@parameters) {
$__pwArgs = \debug_backtrace()[0]["args"];
foreach ($__pwArgs as $__pwOffset => $__pwValue) {
if ($__pwValue === \Patchwork\CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT) {
unset($__pwArgs[$__pwOffset]);
}
}
switch (count($__pwArgs)) {
case 0:
return new \@class;
case 1:
return new \@class($__pwArgs[0]);
case 2:
return new \@class($__pwArgs[0], $__pwArgs[1]);
case 3:
return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2]);
case 4:
return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2], $__pwArgs[3]);
case 5:
return new \@class($__pwArgs[0], $__pwArgs[1], $__pwArgs[2], $__pwArgs[3], $__pwArgs[4]);
default:
$__pwReflector = new \ReflectionClass(\'@class\');
return $__pwReflector->newInstanceArgs($__pwArgs);
}
}
}
';
function connect($source, callable $target, ?Handle $handle = null, $partOfWildcard = false)
{
$source = translateIfLanguageConstruct($source);
$handle = $handle ?: new Handle;
list($class, $method) = Utils\interpretCallable($source);
if (constitutesWildcard($source)) {
return applyWildcard($source, $target, $handle);
}
if (Utils\isOwnName($class) || Utils\isOwnName($method)) {
return $handle;
}
validate($source, $partOfWildcard);
if (empty($class)) {
if (Utils\callableDefined($source) && (new \ReflectionFunction($method))->isInternal()) {
$stub = INTERNAL_REDEFINITION_NAMESPACE . '\\' . $source;
return connect($stub, $target, $handle, $partOfWildcard);
}
$handle = connectFunction($method, $target, $handle);
} else {
if (Utils\callableDefined($source)) {
if ($method === 'new') {
$handle = connectInstantiation($class, $target, $handle);
} elseif ((new \ReflectionMethod($class, $method))->isUserDefined()) {
$handle = connectMethod($source, $target, $handle);
} else {
throw new InternalMethodsNotSupported($source);
}
} else {
$handle = queueConnection($source, $target, $handle);
}
}
attachExistenceAssertion($handle, $source);
return $handle;
}
function constitutesWildcard($source)
{
$source = Utils\interpretCallable($source);
$source = Utils\callableToString($source);
return strcspn($source, '*{,}') != strlen($source);
}
function applyWildcard($wildcard, callable $target, ?Handle $handle = null)
{
$handle = $handle ?: new Handle;
list($class, $method, $instance) = Utils\interpretCallable($wildcard);
if (!empty($instance)) {
foreach (Utils\matchWildcard($method, get_class_methods($instance)) as $item) {
if (!$handle->hasTag($item)) {
connect([$instance, $item], $target, $handle);
$handle->tag($item);
}
}
return $handle;
}
$callables = Utils\matchWildcard($wildcard, Utils\getRedefinableCallables());
foreach ($callables as $callable) {
if (!inPreprocessedFile($callable) || $handle->hasTag($callable)) {
continue;
}
if (function_exists($callable)) {
# Restore lower/upper case distinction
$callable = (new \ReflectionFunction($callable))->getName();
}
connect($callable, $target, $handle, true);
$handle->tag($callable);
}
if (!isset($class) || !class_exists($class, false)) {
queueConnection($wildcard, $target, $handle);
}
return $handle;
}
function attachExistenceAssertion(Handle $handle, $function)
{
$handle->addExpirationHandler(function() use ($function) {
if (!Utils\callableDefined($function)) {
# Not using exceptions because this might happen during PHP shutdown
$message = '%s() was never defined during the lifetime of its redefinition';
trigger_error(sprintf($message, Utils\callableToString($function)), E_USER_WARNING);
}
});
}
function validate($function, $partOfWildcard = false)
{
list($class, $method) = Utils\interpretCallable($function);
if (!Utils\callableDefined($function) || $method === 'new') {
return;
}
$reflection = Utils\reflectCallable($function);
$name = Utils\callableToString($function);
if ($reflection->isInternal() && !in_array($name, Config\getRedefinableInternals())) {
throw new Exceptions\NotUserDefined($function);
}
if (!$reflection->isInternal() && !inPreprocessedFile($function) && !$partOfWildcard) {
throw new Exceptions\DefinedTooEarly($function);
}
}
function inPreprocessedFile($callable)
{
if (Utils\isOwnName(Utils\callableToString($callable))) {
return false;
}
$file = Utils\reflectCallable($callable)->getFileName();
$evaluated = preg_match(EVALUATED_CODE_FILE_NAME_SUFFIX, $file);
return $evaluated || !empty(State::$preprocessedFiles[$file]);
}
function connectFunction($function, callable $target, ?Handle $handle = null)
{
$handle = $handle ?: new Handle;
$routes = &State::$routes[null][$function];
$offset = Utils\append($routes, [$target, $handle]);
$handle->addReference($routes[$offset]);
return $handle;
}
function queueConnection($source, callable $target, ?Handle $handle = null)
{
$handle = $handle ?: new Handle;
$offset = Utils\append(State::$queue, [$source, $target, $handle]);
$handle->addReference(State::$queue[$offset]);
return $handle;
}
function deployQueue()
{
foreach (State::$queue as $offset => $item) {
if (empty($item)) {
unset(State::$queue[$offset]);
continue;
}
list($source, $target, $handle) = $item;
if (Utils\callableDefined($source) || constitutesWildcard($source)) {
connect($source, $target, $handle);
unset(State::$queue[$offset]);
}
}
}
function connectMethod($function, callable $target, ?Handle $handle = null)
{
$handle = $handle ?: new Handle;
list($class, $method, $instance) = Utils\interpretCallable($function);
$target = new Decorator($target);
$target->superclass = $class;
$target->method = $method;
$target->instance = $instance;
$reflection = Utils\reflectCallable($function);
$declaringClass = $reflection->getDeclaringClass();
$class = $declaringClass->getName();
$aliases = $declaringClass->getTraitAliases();
if (isset($aliases[$method])) {
list($trait, $method) = explode('::', $aliases[$method]);
}
$routes = &State::$routes[$class][$method];
$offset = Utils\append($routes, [$target, $handle]);
$handle->addReference($routes[$offset]);
return $handle;
}
function connectInstantiation($class, callable $target, ?Handle $handle = null)
{
if (!Config\isNewKeywordRedefinable()) {
throw new Exceptions\NewKeywordNotRedefinable;
}
$handle = $handle ?: new Handle;
$class = strtr($class, ['\\' => '__']);
$routes = &State::$routes["Patchwork\\Instantiators\\$class"]['instantiate'];
$offset = Utils\append($routes, [$target, $handle]);
$handle->addReference($routes[$offset]);
return $handle;
}
function disconnectAll()
{
foreach (State::$routes as $class => $routesByClass) {
foreach ($routesByClass as $method => $routes) {
foreach ($routes as $route) {
list($callback, $handle) = $route;
if ($handle !== null) {
$handle->expire();
}
}
}
}
State::$routes = [];
connectDefaultInternals();
}
function dispatchTo(callable $target)
{
return call_user_func_array($target, Stack\top('args'));
}
function dispatch($class, $calledClass, $method, $frame, &$result, ?array $args = null)
{
$trace = debug_backtrace();
$isInternalStub = strpos($method, INTERNAL_REDEFINITION_NAMESPACE) === 0;
$isLanguageConstructStub = strpos($method, RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX) === 0;
$isInstantiator = strpos($method, INSTANTIATOR_NAMESPACE) === 0;
if ($isInternalStub && !$isLanguageConstructStub && $args === null) {
# Mind the namespace-of-origin argument
$args = array_reverse($trace)[$frame - 1]['args'];
array_shift($args);
}
if ($isInstantiator) {
$args = $args ?: array_reverse($trace)[$frame - 1]['args'];
foreach ($args as $offset => $value) {
if ($value === INSTANTIATOR_DEFAULT_ARGUMENT) {
unset($args[$offset]);
}
}
}
$success = false;
Stack\pushFor($frame, $calledClass, function() use ($class, $method, &$result, &$success) {
foreach (getRoutesFor($class, $method) as $offset => $route) {
if (empty($route)) {
unset(State::$routes[$class][$method][$offset]);
continue;
}
State::$routeStack[] = [$class, $method, $offset];
try {
$result = dispatchTo(reset($route));
$success = true;
} catch (Exceptions\NoResult $e) {
array_pop(State::$routeStack);
continue;
}
array_pop(State::$routeStack);
if ($success) {
break;
}
}
}, $args);
return $success;
}
function relay(?array $args = null)
{
list($class, $method, $offset) = end(State::$routeStack);
$route = &State::$routes[$class][$method][$offset];
$backup = $route;
$route = ['Patchwork\fallBack', new Handle];
$top = Stack\top();
if ($args === null) {
$args = $top['args'];
}
$isInternalStub = strpos($method, INTERNAL_REDEFINITION_NAMESPACE) === 0;
$isLanguageConstructStub = strpos($method, RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX) === 0;
if ($isInternalStub && !$isLanguageConstructStub) {
array_unshift($args, '');
}
try {
if (isset($top['class'])) {
$reflection = new \ReflectionMethod(Stack\topCalledClass(), $top['function']);
$reflection->setAccessible(true);
$result = $reflection->invokeArgs(Stack\top('object'), $args);
} else {
$result = call_user_func_array($top['function'], $args);
}
} catch (\Exception $e) {
$exception = $e;
}
$route = $backup;
if (isset($exception)) {
throw $exception;
}
return $result;
}
/**
* @deprecated 2.2.0
*/
function connectOnHHVM($function, Handle $handle)
{
fb_intercept($function, function($name, $obj, $args, $data, &$done) {
deployQueue();
list($class, $method) = Utils\interpretCallable($name);
$calledClass = null;
if (is_string($obj)) {
$calledClass = $obj;
} elseif (is_object($obj)) {
$calledClass = get_class($obj);
}
$frame = count(debug_backtrace(0)) - 1;
$result = null;
$done = dispatch($class, $calledClass, $method, $frame, $result, $args);
return $result;
});
$handle->addExpirationHandler(getHHVMExpirationHandler($function));
}
/**
* @deprecated 2.2.0
*/
function getHHVMExpirationHandler($function)
{
return function() use ($function) {
list($class, $method) = Utils\interpretCallable($function);
$empty = true;
foreach (getRoutesFor($class, $method) as $offset => $route) {
if (!empty($route)) {
$empty = false;
break;
} else {
unset(State::$routes[$class][$method][$offset]);
}
}
if ($empty) {
fb_intercept($function, null);
}
};
}
function getRoutesFor($class, $method)
{
if (!isset(State::$routes[$class][$method])) {
return [];
}
return array_reverse(State::$routes[$class][$method], true);
}
function dispatchDynamic($callable, array $arguments)
{
list($class, $method) = Utils\interpretCallable($callable);
$translation = INTERNAL_REDEFINITION_NAMESPACE . '\\' . $method;
if ($class === null && function_exists($translation)) {
$callable = $translation;
# Mind the namespace-of-origin argument
array_unshift($arguments, '');
}
return call_user_func_array($callable, $arguments);
}
function createStubsForInternals()
{
$namespace = INTERNAL_REDEFINITION_NAMESPACE;
foreach (Config\getRedefinableInternals() as $name) {
if (function_exists($namespace . '\\' . $name)) {
continue;
}
$signature = ['$__pwNamespace'];
foreach ((new \ReflectionFunction($name))->getParameters() as $offset => $argument) {
$formal = '';
if ($argument->isPassedByReference()) {
$formal .= '&';
}
$formal .= '$' . $argument->getName();
$isVariadic = is_callable([$argument, 'isVariadic']) ? $argument->isVariadic() : false;
if ($argument->isOptional() || $isVariadic || ($name === 'define' && $offset === 2)) {
continue;
}
$signature[] = $formal;
}
$refs = sprintf('[%s]', join(', ', $signature));
$interceptor = sprintf(
str_replace(
'$__pwRefOffset = 0;',
'$__pwRefOffset = 1;',
\Patchwork\CodeManipulation\Actions\CallRerouting\CALL_INTERCEPTION_CODE
),
$refs
);
eval(strtr(INTERNAL_STUB_CODE, [
'@name' => $name,
'@signature' => join(', ', $signature),
'@interceptor' => $interceptor,
'@ns_for_redefinitions' => INTERNAL_REDEFINITION_NAMESPACE,
]));
}
}
/**
* This is needed, for instance, to intercept the time() call in call_user_func('time').
*
* For that to happen, we require that if at least one internal function is redefinable, then
* call_user_func, preg_replace_callback and other callback-taking internal functions also be
* redefinable: see Patchwork\Config.
*
* Here, we go through the callback-taking internals and add argument-inspecting patches
* (redefinitions) to them.
*
* The patches are then expected to find the "nested" internal calls, such as the 'time' argument
* in call_user_func('time'), and invoke their respective redefinitions, if any.
*/
function connectDefaultInternals()
{
# call_user_func() etc. are not a problem if no other internal functions are redefined
if (Config\getRedefinableInternals() === []) {
return;
}
foreach (Config\getDefaultRedefinableInternals() as $function) {
# Which arguments are callbacks? Store their offsets in the following array.
$offsets = [];
foreach ((new \ReflectionFunction($function))->getParameters() as $offset => $argument) {
$name = $argument->getName();
if (strpos($name, 'call') !== false || strpos($name, 'func') !== false) {
$offsets[] = $offset;
}
}
connect($function, function() use ($function, $offsets) {
# This is the argument-inspecting patch.
$args = Stack\top('args');
$caller = Stack\all()[1];
foreach ($offsets as $offset) {
# Callback absent
if (!isset($args[$offset])) {
continue;
}
$callable = $args[$offset];
# Callback is a closure => definitely not internal
if ($callable instanceof \Closure) {
continue;
}
list($class, $method, $instance) = Utils\interpretCallable($callable);
if (empty($class)) {
# Callback is global function, which might be internal too.
$args[$offset] = function() use ($callable) {
return dispatchDynamic($callable, func_get_args());
};
}
# Callback involves a class => not internal either, since the only internals that
# Patchwork can handle as of 2.0 are global functions.
# However, we must handle all kinds of opaque access here too, such as self:: and
# private methods, because we're actually patching a stub (see INTERNAL_STUB_CODE)
# and not directly call_user_func itself (or usort, or any other of those).
# We must compensate for scope that is lost, and that callback-taking functions
# can make use of.
if (!empty($class)) {
if ($class === 'self' || $class === 'static' || $class === 'parent') {
# We do not discriminate between early and late static binding here: FIXME.
$actualClass = $caller['class'];
if ($class === 'parent') {
$actualClass = get_parent_class($actualClass);
}
$class = $actualClass;
}
# When calling a parent constructor, the reference to the object being
# constructed needs to be extracted from the stack info.
# Also turned out to be necessary to solve this, without any parent
# constructors involved: https://github.com/antecedent/patchwork/issues/99
if (is_null($instance) && isset($caller['object'])) {
$instance = $caller['object'];
}
try {
$reflection = new \ReflectionMethod($class, $method);
$reflection->setAccessible(true);
$args[$offset] = function() use ($reflection, $instance) {
return $reflection->invokeArgs($instance, func_get_args());
};
} catch (\ReflectionException $e) {
# If it's an invalid callable, then just prevent the unexpected propagation
# of ReflectionExceptions.
}
}
}
# Give the inspected arguments back to the *original* definition of the
# callback-taking function, e.g. \array_map(). This works given that the
# present patch is the innermost.
return call_user_func_array($function, $args);
});
}
}
/**
* @since 2.0.5
*
* As of version 2.0.5, this is used to accommodate language constructs
* (echo, eval, exit and others) within the concept of callable.
*/
function translateIfLanguageConstruct($callable)
{
if (!is_string($callable)) {
return $callable;
}
if (in_array($callable, Config\getRedefinableLanguageConstructs())) {
return RedefinitionOfLanguageConstructs\LANGUAGE_CONSTRUCT_PREFIX . $callable;
} elseif (in_array($callable, Config\getSupportedLanguageConstructs())) {
throw new Exceptions\NotUserDefined($callable);
} else {
return $callable;
}
}
function resolveClassToInstantiate($class, $calledClass)
{
$pieces = explode('\\', $class);
$last = array_pop($pieces);
if (in_array($last, ['self', 'static', 'parent'])) {
$frame = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3)[2];
if ($last == 'self') {
$class = $frame['class'];
} elseif ($last == 'parent') {
$class = get_parent_class($frame['class']);
} elseif ($last == 'static') {
$class = $calledClass;
}
}
return ltrim($class, '\\');
}
function getInstantiator($class, $calledClass)
{
$namespace = INSTANTIATOR_NAMESPACE;
$class = resolveClassToInstantiate($class, $calledClass);
$adaptedName = strtr($class, ['\\' => '__']);
if (!class_exists("$namespace\\$adaptedName")) {
$constructor = (new \ReflectionClass($class))->getConstructor();
list($parameters, $arguments) = Utils\getParameterAndArgumentLists($constructor);
$code = strtr(INSTANTIATOR_CODE, [
'@namespace' => INSTANTIATOR_NAMESPACE,
'@instantiator' => $adaptedName,
'@class' => $class,
'@parameters' => $parameters,
]);
RedefinitionOfNew\suspendFor(function() use ($code) {
eval(CodeManipulation\transformForEval($code));
});
}
$instantiator = "$namespace\\$adaptedName";
return new $instantiator;
}
class State
{
static $routes = [];
static $queue = [];
static $preprocessedFiles = [];
static $routeStack = [];
}

View file

@ -1,62 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CallRerouting;
use Patchwork;
use Patchwork\Stack;
class Decorator
{
public $superclass;
public $instance;
public $method;
private $patch;
public function __construct($patch)
{
$this->patch = $patch;
}
public function __invoke()
{
$top = Stack\top();
$superclassMatches = $this->superclassMatches();
$instanceMatches = $this->instanceMatches($top);
$methodMatches = $this->methodMatches($top);
if ($superclassMatches && $instanceMatches && $methodMatches) {
$patch = $this->patch;
if (isset($top["object"]) && $patch instanceof \Closure) {
$patch = $patch->bindTo($top["object"], $this->superclass);
}
return dispatchTo($patch);
}
Patchwork\fallBack();
}
private function superclassMatches()
{
return $this->superclass === null ||
Stack\topCalledClass() === $this->superclass ||
is_subclass_of(Stack\topCalledClass(), $this->superclass);
}
private function instanceMatches(array $top)
{
return $this->instance === null ||
(isset($top["object"]) && $top["object"] === $this->instance);
}
private function methodMatches(array $top)
{
return $this->method === null ||
$this->method === 'new' ||
$top["function"] === $this->method;
}
}

View file

@ -1,65 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CallRerouting;
class Handle
{
private $references = [];
private $expirationHandlers = [];
private $silenced = false;
private $tags = [];
public function __destruct()
{
$this->expire();
}
public function tag($tag)
{
$this->tags[] = $tag;
}
public function hasTag($tag)
{
return in_array($tag, $this->tags);
}
public function addReference(&$reference)
{
$this->references[] = &$reference;
}
public function expire()
{
foreach ($this->references as &$reference) {
$reference = null;
}
if (!$this->silenced) {
foreach ($this->expirationHandlers as $expirationHandler) {
$expirationHandler();
}
}
$this->expirationHandlers = [];
}
public function addExpirationHandler(callable $expirationHandler)
{
$this->expirationHandlers[] = $expirationHandler;
}
public function silence()
{
$this->silenced = true;
}
public function unsilence()
{
$this->silenced = false;
}
}

View file

@ -1,187 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2023 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation;
require __DIR__ . '/CodeManipulation/Source.php';
require __DIR__ . '/CodeManipulation/Stream.php';
require __DIR__ . '/CodeManipulation/Actions/Generic.php';
require __DIR__ . '/CodeManipulation/Actions/CallRerouting.php';
require __DIR__ . '/CodeManipulation/Actions/CodeManipulation.php';
require __DIR__ . '/CodeManipulation/Actions/Namespaces.php';
require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfInternals.php';
require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfLanguageConstructs.php';
require __DIR__ . '/CodeManipulation/Actions/ConflictPrevention.php';
require __DIR__ . '/CodeManipulation/Actions/RedefinitionOfNew.php';
require __DIR__ . '/CodeManipulation/Actions/Arguments.php';
use Patchwork\Exceptions;
use Patchwork\Config;
const OUTPUT_DESTINATION = 'php://memory';
const OUTPUT_ACCESS_MODE = 'rb+';
function transform(Source $s)
{
foreach (State::$actions as $action) {
$action($s);
}
}
function transformString($code)
{
$source = new Source($code);
transform($source);
return (string) $source;
}
function transformForEval($code)
{
$prefix = "<?php ";
return substr(transformString($prefix . $code), strlen($prefix));
}
function cacheEnabled()
{
$location = Config\getCachePath();
if ($location === null) {
return false;
}
if (!is_dir($location) || !is_writable($location)) {
throw new Exceptions\CachePathUnavailable($location);
}
return true;
}
function getCachedPath($file)
{
if (State::$cacheIndexFile === null) {
$indexPath = Config\getCachePath() . '/index.csv';
if (file_exists($indexPath)) {
$table = array_map(
static function($line) {
return str_getcsv($line, ',', '"', '\\');
},
file($indexPath)
);
foreach ($table as $row) {
list($key, $value) = $row;
State::$cacheIndex[$key] = $value;
}
}
State::$cacheIndexFile = Stream::fopen($indexPath, 'a', false);
}
$hash = md5($file);
$key = $hash;
$suffix = 0;
while (isset(State::$cacheIndex[$key]) && State::$cacheIndex[$key] !== $file) {
$key = $hash . '_' . $suffix++;
}
if (!isset(State::$cacheIndex[$key])) {
Stream::fwrite(State::$cacheIndexFile, sprintf("%s,\"%s\"\n", $key, $file));
State::$cacheIndex[$key] = $file;
}
return Config\getCachePath() . '/' . $key . '.php';
}
function storeInCache(Source $source)
{
$handle = Stream::fopen(getCachedPath($source->file), 'w', false);
Stream::fwrite($handle, $source);
Stream::fclose($handle);
}
function availableCached($file)
{
if (!cacheEnabled()) {
return false;
}
$cached = getCachedPath($file);
return file_exists($cached) &&
filemtime($file) <= filemtime($cached) &&
Config\getTimestamp() <= filemtime($cached);
}
function internalToCache($file)
{
if (!cacheEnabled()) {
return false;
}
return strpos($file, Config\getCachePath() . '/') === 0
|| strpos($file, Config\getCachePath() . DIRECTORY_SEPARATOR) === 0;
}
function getContents($file)
{
$handle = Stream::fopen($file, 'r', true);
if ($handle === false) {
return false;
}
$contents = '';
while (!Stream::feof($handle)) {
$contents .= Stream::fread($handle, 8192);
}
Stream::fclose($handle);
return $contents;
}
function transformAndOpen($file)
{
foreach (State::$importListeners as $listener) {
$listener($file);
}
if (!internalToCache($file) && availableCached($file)) {
return Stream::fopen(getCachedPath($file), 'r', false);
}
$code = getContents($file);
if ($code === false) {
return false;
}
$source = new Source($code);
$source->file = $file;
transform($source);
if (!internalToCache($file) && cacheEnabled()) {
storeInCache($source);
return transformAndOpen($file);
}
$resource = fopen(OUTPUT_DESTINATION, OUTPUT_ACCESS_MODE);
if ($resource) {
fwrite($resource, $source);
rewind($resource);
}
return $resource;
}
function prime($file)
{
Stream::fclose(transformAndOpen($file));
}
function shouldTransform($file)
{
return !Config\isBlacklisted($file) || Config\isWhitelisted($file);
}
function register($actions)
{
State::$actions = array_merge(State::$actions, (array) $actions);
}
function onImport($listeners)
{
State::$importListeners = array_merge(State::$importListeners, (array) $listeners);
}
class State
{
static $actions = [];
static $importListeners = [];
static $cacheIndex = [];
static $cacheIndexFile;
}

View file

@ -1,49 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2021 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\Arguments;
use Patchwork\CodeManipulation\Source;
use Patchwork\CodeManipulation\Actions\Generic;
/**
* @since 2.1.13
*/
function readNames(Source $s, $pos)
{
$result = [];
$pos++;
while (!$s->is(Generic\RIGHT_ROUND, $pos)) {
if ($s->is([Generic\LEFT_ROUND, Generic\LEFT_SQUARE, Generic\LEFT_CURLY], $pos)) {
$pos = $s->match($pos);
} else {
if ($s->is(T_VARIABLE, $pos)) {
$result[] = $s->read($pos);
} elseif ($s->is(Generic\ELLIPSIS, $pos)) {
$pos = $s->skip(Source::junk(), $pos);
$result[] = '...' . $s->read($pos);
}
$pos++;
}
}
return $result;
}
/**
* @since 2.1.13
*/
function constructReferenceArray(array $names)
{
$names = array_map(function($name) {
if ($name[0] === '.') {
return '], ' . substr($name, 3) . ', [';
}
return '&' . $name;
}, $names);
return 'array_merge([' . join(', ', $names) . '])';
}

View file

@ -1,88 +0,0 @@
<?php
/**
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @link http://patchwork2.org/
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\CallRerouting;
use Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\CallRerouting;
use Patchwork\Utils;
const CALL_INTERCEPTION_CODE = '
$__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}";
$__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : null;
if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) {
$__pwCalledClass = $__pwClass ? \get_called_class() : null;
$__pwFrame = \count(\debug_backtrace(0));
$__pwRefs = %s;
$__pwRefOffset = 0;
if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) {
return $__pwResult;
}
}
unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefs, $__pwRefOffset);
';
const CALL_INTERCEPTION_CODE_VOID_TYPED = '
$__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}";
$__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : null;
if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) {
$__pwCalledClass = $__pwClass ? \get_called_class() : null;
$__pwFrame = \count(\debug_backtrace(0));
$__pwRefs = %s;
$__pwRefOffset = 0;
if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) {
if ($__pwResult !== null) {
throw new \Patchwork\Exceptions\NonNullToVoid;
}
return;
}
}
unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefOffset);
';
const CALL_INTERCEPTION_CODE_NEVER_TYPED = '
$__pwClosureName = __NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}";
$__pwClass = (__CLASS__ && __FUNCTION__ !== $__pwClosureName) ? __CLASS__ : null;
if (!empty(\Patchwork\CallRerouting\State::$routes[$__pwClass][__FUNCTION__])) {
$__pwCalledClass = $__pwClass ? \get_called_class() : null;
$__pwFrame = \count(\debug_backtrace(0));
$__pwRefs = %s;
$__pwRefOffset = 0;
if (\Patchwork\CallRerouting\dispatch($__pwClass, $__pwCalledClass, __FUNCTION__, $__pwFrame, $__pwResult, \array_merge(\array_slice($__pwRefs, $__pwRefOffset, \func_num_args()), \array_slice(\func_get_args(), \count($__pwRefs))))) {
throw new \Patchwork\Exceptions\ReturnFromNever;
}
}
unset($__pwClass, $__pwCalledClass, $__pwResult, $__pwClosureName, $__pwFrame, $__pwRefOffset);
';
const QUEUE_DEPLOYMENT_CODE = '\Patchwork\CallRerouting\deployQueue()';
function markPreprocessedFiles()
{
return Generic\markPreprocessedFiles(CallRerouting\State::$preprocessedFiles);
}
function injectCallInterceptionCode()
{
return Generic\prependCodeToFunctions(
Utils\condense(CALL_INTERCEPTION_CODE),
array(
'void' => Utils\condense(CALL_INTERCEPTION_CODE_VOID_TYPED),
'never' => Utils\condense(CALL_INTERCEPTION_CODE_NEVER_TYPED),
),
true
);
}
function injectQueueDeploymentCode()
{
return Generic\chain(array(
Generic\injectFalseExpressionAtBeginnings(QUEUE_DEPLOYMENT_CODE),
Generic\injectCodeAfterClassDefinitions(QUEUE_DEPLOYMENT_CODE . ';'),
));
}

View file

@ -1,33 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2023 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\CodeManipulation;
use Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\CodeManipulation\Source;
const EVAL_ARGUMENT_WRAPPER = '\Patchwork\CodeManipulation\transformForEval';
const STREAM_WRAPPER_REINSTATEMENT_CODE = '\Patchwork\CodeManipulation\Stream::reinstateWrapper();';
function propagateThroughEval()
{
return Generic\wrapUnaryConstructArguments(T_EVAL, EVAL_ARGUMENT_WRAPPER);
}
function injectStreamWrapperReinstatementCode()
{
return Generic\injectCodeAtEnd(STREAM_WRAPPER_REINSTATEMENT_CODE);
}
function flush()
{
return function(Source $s) {
$s->flush();
};
}

View file

@ -1,33 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\ConflictPrevention;
use Patchwork\CodeManipulation\Source;
/**
* @since 2.0.1
*
* Serves to avoid "Cannot redeclare Patchwork\redefine()" errors.
*/
function preventImportingOtherCopiesOfPatchwork()
{
return function(Source $s) {
$namespaceKeyword = $s->next(T_NAMESPACE, -1);
if ($namespaceKeyword === INF || $namespaceKeyword < 2) {
return;
}
if ($s->read($namespaceKeyword, 4) == 'namespace Patchwork;') {
$pattern = '/@copyright\s+2010(-\d+)? Ignas Rudaitis/';
if (preg_match($pattern, $s->read($namespaceKeyword - 2))) {
# Clear the file completely (in memory)
$s->splice('', 0, count($s->tokens));
}
}
};
}

View file

@ -1,190 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\CodeManipulation\Actions\Arguments;
use Patchwork\CodeManipulation\Source;
use Patchwork\Utils;
const LEFT_ROUND = '(';
const RIGHT_ROUND = ')';
const LEFT_CURLY = '{';
const RIGHT_CURLY = '}';
const LEFT_SQUARE = '[';
const RIGHT_SQUARE = ']';
const SEMICOLON = ';';
foreach (['NAME_FULLY_QUALIFIED', 'NAME_QUALIFIED', 'NAME_RELATIVE', 'ELLIPSIS', 'ATTRIBUTE', 'READONLY'] as $constant) {
if (defined('T_' . $constant)) {
define(__NAMESPACE__ . '\\' . $constant, constant('T_' . $constant));
} else {
define(__NAMESPACE__ . '\\' . $constant, -1);
}
}
function markPreprocessedFiles(&$target)
{
return function($file) use (&$target) {
$target[$file] = true;
};
}
function prependCodeToFunctions($code, $typedVariants = array(), $fillArgRefs = false)
{
if (!is_array($typedVariants)) {
$typedVariants = array(
'void' => $typedVariants,
);
}
return function(Source $s) use ($code, $typedVariants, $fillArgRefs) {
foreach ($s->all(T_FUNCTION) as $function) {
# Skip "use function"
$previous = $s->skipBack(Source::junk(), $function);
if ($s->is(T_USE, $previous)) {
continue;
}
$returnType = getDeclaredReturnType($s, $function);
$argRefs = null;
if ($fillArgRefs) {
$parenthesis = $s->next(LEFT_ROUND, $function);
$args = Arguments\readNames($s, $parenthesis);
$argRefs = Arguments\constructReferenceArray($args);
}
$bracket = $s->next(LEFT_CURLY, $function);
# Skip generators
$yield = $s->next(T_YIELD, $bracket);
if ($yield < $s->match($bracket)) {
continue;
}
$semicolon = $s->next(SEMICOLON, $function);
if ($bracket < $semicolon) {
$variant = $returnType && isset($typedVariants[$returnType]) ? $typedVariants[$returnType] : $code;
if ($fillArgRefs) {
$variant = sprintf($variant, $argRefs);
}
$s->splice($variant, $bracket + 1);
}
}
};
}
function getDeclaredReturnType(Source $s, $function)
{
$parenthesis = $s->next(LEFT_ROUND, $function);
$next = $s->skip(Source::junk(), $s->match($parenthesis));
if ($s->is(T_USE, $next)) {
$next = $s->skip(Source::junk(), $s->match($s->next(LEFT_ROUND, $next)));
}
if ($s->is(':', $next)) {
return $s->read($s->skip(Source::junk(), $next), 1);
}
return false;
}
function wrapUnaryConstructArguments($construct, $wrapper)
{
return function(Source $s) use ($construct, $wrapper) {
foreach ($s->all($construct) as $match) {
$pos = $s->next(LEFT_ROUND, $match);
$s->splice($wrapper . LEFT_ROUND, $pos + 1);
$s->splice(RIGHT_ROUND, $s->match($pos));
}
};
}
function injectFalseExpressionAtBeginnings($expression)
{
return function(Source $s) use ($expression) {
$openingTags = $s->all(T_OPEN_TAG);
$openingTagsWithEcho = $s->all(T_OPEN_TAG_WITH_ECHO);
if (empty($openingTags) && empty($openingTagsWithEcho)) {
return;
}
if (!empty($openingTags) &&
(empty($openingTagsWithEcho) || reset($openingTags) < reset($openingTagsWithEcho))) {
$pos = reset($openingTags);
# Skip initial declare() statements
while ($s->read($s->skip(Source::junk(), $pos)) === 'declare') {
$pos = $s->next(SEMICOLON, $pos);
}
# Enter first namespace
$namespaceKeyword = $s->next(T_NAMESPACE, $pos);
if ($namespaceKeyword !== INF) {
$semicolon = $s->next(SEMICOLON, $namespaceKeyword);
$leftBracket = $s->next(LEFT_CURLY, $namespaceKeyword);
$pos = min($semicolon, $leftBracket);
}
$s->splice(' ' . $expression . ';', $pos + 1);
} else {
$openingTag = reset($openingTagsWithEcho);
$closingTag = $s->next(T_CLOSE_TAG, $openingTag);
$semicolon = $s->next(SEMICOLON, $openingTag);
$s->splice(' (' . $expression . ') ?: (', $openingTag + 1);
$s->splice(') ', min($closingTag, $semicolon));
}
};
}
function injectCodeAfterClassDefinitions($code)
{
return function(Source $s) use ($code) {
foreach ($s->all(T_CLASS) as $match) {
if ($s->is([LEFT_ROUND, LEFT_CURLY, T_EXTENDS, T_IMPLEMENTS], $s->skip(Source::junk(), $match))) {
# Not a proper class definition: anonymous class (with or without attribute)
continue;
}
if ($s->is(T_DOUBLE_COLON, $s->skipBack(Source::junk(), $match))) {
# Not a proper class definition: ::class syntax
continue;
}
$leftBracket = $s->next(LEFT_CURLY, $match);
if ($leftBracket === INF) {
continue;
}
$rightBracket = $s->match($leftBracket);
if ($rightBracket === INF) {
continue;
}
$s->splice($code, $rightBracket + 1);
}
};
}
function injectCodeAtEnd($code)
{
return function(Source $s) use ($code) {
$openTags = $s->all(T_OPEN_TAG);
$lastOpenTag = end($openTags);
$closeTag = $s->next(T_CLOSE_TAG, $lastOpenTag);
$namespaceKeyword = $s->next(T_NAMESPACE, 0);
$extraSemicolon = ';';
if ($namespaceKeyword !== INF) {
$semicolon = $s->next(SEMICOLON, $namespaceKeyword);
$leftBracket = $s->next(LEFT_CURLY, $namespaceKeyword);
if ($leftBracket < $semicolon) {
$code = "namespace { $code }";
$extraSemicolon = '';
}
}
if ($closeTag !== INF) {
$s->splice("<?php $code", count($s->tokens) - 1, 0, Source::APPEND);
} else {
$s->splice($extraSemicolon . $code, count($s->tokens) - 1, 0, Source::APPEND);
}
};
}
function chain(array $callbacks)
{
return function(Source $s) use ($callbacks) {
foreach ($callbacks as $callback) {
$callback($s);
}
};
}

View file

@ -1,185 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\Namespaces;
use Patchwork\CodeManipulation\Source;
use Patchwork\CodeManipulation\Actions\Generic;
/**
* @since 2.1.0
*/
function resolveName(Source $s, $pos, $type = 'class')
{
$name = scanQualifiedName($s, $pos);
$pieces = explode('\\', $name);
if ($pieces[0] === '') {
return $name;
}
$uses = collectUseDeclarations($s, $pos);
if (isset($uses[$type][$name])) {
return '\\' . ltrim($uses[$type][$name], ' \\');
}
if (isset($uses['class'][$pieces[0]])) {
$name = '\\' . ltrim($uses['class'][$pieces[0]] . '\\' . join('\\', array_slice($pieces, 1)), '\\');
} else {
$name = '\\' . ltrim(getNamespaceAt($s, $pos) . '\\' . $name, '\\');
}
return $name;
}
/**
* @since 2.1.0
*/
function getNamespaceAt(Source $s, $pos)
{
foreach (collectNamespaceBoundaries($s) as $namespace => $boundaryPairs) {
foreach ($boundaryPairs as $boundaries) {
list($begin, $end) = $boundaries;
if ($begin <= $pos && $pos <= $end) {
return $namespace;
}
}
}
return '';
}
function collectNamespaceBoundaries(Source $s)
{
return $s->cache([], function() {
if (!$this->has(T_NAMESPACE)) {
return ['' => [[0, INF]]];
}
$result = [];
foreach ($this->all(T_NAMESPACE) as $keyword) {
if ($this->next(';', $keyword) < $this->next(Generic\LEFT_CURLY, $keyword)) {
return [scanQualifiedName($this, $keyword + 1) => [[0, INF]]];
}
$begin = $this->next(Generic\LEFT_CURLY, $keyword) + 1;
$end = $this->match($begin - 1) - 1;
$name = scanQualifiedName($this, $keyword + 1);
if (!isset($result[$name])) {
$result[$name] = [];
}
$result[$name][] = [$begin, $end];
}
return $result;
});
}
function collectUseDeclarations(Source $s, $begin)
{
foreach (collectNamespaceBoundaries($s) as $boundaryPairs) {
foreach ($boundaryPairs as $boundaries) {
list($leftBoundary, $rightBoundary) = $boundaries;
if ($leftBoundary <= $begin && $begin <= $rightBoundary) {
$begin = $leftBoundary;
break;
}
}
}
return $s->cache([$begin], function($begin) {
$result = ['class' => [], 'function' => [], 'const' => []];
# only tokens that are siblings bracket-wise are considered,
# so trait-use instances are not an issue
foreach ($this->siblings(T_USE, $begin) as $keyword) {
# skip if closure-use
$next = $this->skip(Source::junk(), $keyword);
if ($this->is(Generic\LEFT_ROUND, $next)) {
continue;
}
parseUseDeclaration($this, $next, $result);
}
return $result;
});
}
function parseUseDeclaration(Source $s, $pos, array &$aliases, $prefix = '', $type = 'class')
{
$lastPart = null;
$whole = $prefix;
while (true) {
switch ($s->tokens[$pos][Source::TYPE_OFFSET]) {
case T_FUNCTION:
$type = 'function';
break;
case T_CONST:
$type = 'const';
break;
case T_NS_SEPARATOR:
if (!empty($whole)) {
$whole .= '\\';
}
break;
case T_STRING:
case Generic\NAME_FULLY_QUALIFIED:
case Generic\NAME_QUALIFIED:
case Generic\NAME_RELATIVE:
$update = $s->tokens[$pos][Source::STRING_OFFSET];
$parts = explode('\\', $update);
$whole .= $update;
$lastPart = end($parts);
break;
case T_AS:
$pos = $s->skip(Source::junk(), $pos);
$aliases[$type][$s->tokens[$pos][Source::STRING_OFFSET]] = $whole;
$lastPart = null;
$whole = $prefix;
break;
case ',':
if ($lastPart !== null) {
$aliases[$type][$lastPart] = $whole;
}
$lastPart = null;
$whole = $prefix;
$type = 'class';
break;
case Generic\LEFT_CURLY:
parseUseDeclaration($s, $pos + 1, $aliases, $prefix . '\\', $type);
break;
case T_WHITESPACE:
case T_COMMENT:
case T_DOC_COMMENT:
break;
default:
if ($lastPart !== null) {
$aliases[$type][$lastPart] = $whole;
}
return;
}
$pos++;
}
}
function scanQualifiedName(Source $s, $begin)
{
$result = '';
while (true) {
switch ($s->tokens[$begin][Source::TYPE_OFFSET]) {
case T_NS_SEPARATOR:
if (!empty($result)) {
$result .= '\\';
}
# fall through
case T_STRING:
case Generic\NAME_FULLY_QUALIFIED:
case Generic\NAME_QUALIFIED:
case Generic\NAME_RELATIVE:
case T_STATIC:
$result .= $s->tokens[$begin][Source::STRING_OFFSET];
break;
case T_WHITESPACE:
case T_COMMENT:
case T_DOC_COMMENT:
break;
default:
return str_replace('\\\\', '\\', $result);
}
$begin++;
}
}

View file

@ -1,142 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\RedefinitionOfInternals;
use Patchwork\Config;
use Patchwork\CallRerouting;
use Patchwork\CodeManipulation\Source;
use Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\CodeManipulation\Actions\Namespaces;
const DYNAMIC_CALL_REPLACEMENT = '\Patchwork\CallRerouting\dispatchDynamic(%s, \Patchwork\Utils\args(%s))';
function spliceNamedFunctionCalls()
{
if (Config\getRedefinableInternals() === []) {
return function() {};
}
$names = [];
foreach (Config\getRedefinableInternals() as $name) {
$names[strtolower($name)] = true;
}
return function(Source $s) use ($names) {
foreach (Namespaces\collectNamespaceBoundaries($s) as $namespace => $boundaryList) {
foreach ($boundaryList as $boundaries) {
list($begin, $end) = $boundaries;
$aliases = Namespaces\collectUseDeclarations($s, $begin)['function'];
# Receive all aliases, leave only those for redefinable internals
foreach ($aliases as $alias => $qualified) {
if (!isset($names[$qualified])) {
unset($aliases[$alias]);
} else {
$aliases[strtolower($alias)] = strtolower($qualified);
}
}
spliceNamedCallsWithin($s, $begin, $end, $names, $aliases);
}
}
};
}
function spliceNamedCallsWithin(Source $s, $begin, $end, array $names, array $aliases)
{
foreach ($s->within([T_STRING, Generic\NAME_FULLY_QUALIFIED, Generic\NAME_QUALIFIED, Generic\NAME_RELATIVE], $begin, $end) as $string) {
$original = strtolower($s->read($string));
if ($original[0] == '\\') {
$original = substr($original, 1);
}
if (isset($names[$original]) || isset($aliases[$original])) {
$previous = $s->skipBack(Source::junk(), $string);
$hadBackslash = false;
if ($s->is(T_NS_SEPARATOR, $previous) || $s->is(Generic\NAME_FULLY_QUALIFIED, $string)) {
if (!isset($names[$original])) {
# use-aliased name cannot have a leading backslash
continue;
}
if ($s->is(T_NS_SEPARATOR, $previous)) {
$s->splice('', $previous, 1);
$previous = $s->skipBack(Source::junk(), $previous);
}
$hadBackslash = true;
}
if ($s->is([T_FUNCTION, T_OBJECT_OPERATOR, T_DOUBLE_COLON, T_STRING, T_NEW, Generic\NAME_FULLY_QUALIFIED, Generic\NAME_QUALIFIED, Generic\NAME_RELATIVE], $previous)) {
continue;
}
$next = $s->skip(Source::junk(), $string);
if (!$s->is(Generic\LEFT_ROUND, $next)) {
continue;
}
if (isset($aliases[$original])) {
$original = $aliases[$original];
}
$secondNext = $s->skip(Source::junk(), $next);
$splice = '\\' . CallRerouting\INTERNAL_REDEFINITION_NAMESPACE . '\\';
$splice .= $original . Generic\LEFT_ROUND;
# prepend a namespace-of-origin argument to handle cases like Acme\time() vs time()
$splice .= !$hadBackslash ? '__NAMESPACE__' : '""';
if (!$s->is(Generic\RIGHT_ROUND, $secondNext)) {
# right parenthesis doesn't follow immediately => there are arguments
$splice .= ', ';
}
$s->splice($splice, $string, $secondNext - $string);
}
}
}
function spliceDynamicCalls()
{
if (Config\getRedefinableInternals() === []) {
return function() {};
}
return function(Source $s) {
spliceDynamicCallsWithin($s, 0, count($s->tokens) - 1);
};
}
function spliceDynamicCallsWithin(Source $s, $first, $last)
{
$pos = $first;
$anchor = INF;
$suppress = false;
while ($pos <= $last) {
switch ($s->tokens[$pos][Source::TYPE_OFFSET]) {
case '$':
case T_VARIABLE:
$anchor = min($pos, $anchor);
break;
case Generic\LEFT_ROUND:
if ($anchor !== INF && !$suppress) {
$callable = $s->read($anchor, $pos - $anchor);
$arguments = $s->read($pos + 1, $s->match($pos) - $pos - 1);
$pos = $s->match($pos);
$replacement = sprintf(DYNAMIC_CALL_REPLACEMENT, $callable, $arguments);
$s->splice($replacement, $anchor, $pos - $anchor + 1);
}
break;
case Generic\LEFT_SQUARE:
case Generic\LEFT_CURLY:
spliceDynamicCallsWithin($s, $pos + 1, $s->match($pos) - 1);
$pos = $s->match($pos);
break;
case T_WHITESPACE:
case T_COMMENT:
case T_DOC_COMMENT:
break;
case T_OBJECT_OPERATOR:
case T_DOUBLE_COLON:
case T_NEW:
$suppress = true;
break;
default:
$suppress = false;
$anchor = INF;
}
$pos++;
}
}

View file

@ -1,131 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs;
use Patchwork\CodeManipulation\Source;
use Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\Exceptions;
use Patchwork\Config;
const LANGUAGE_CONSTRUCT_PREFIX = 'Patchwork\Redefinitions\LanguageConstructs\_';
/**
* @since 2.0.5
*/
function spliceAllConfiguredLanguageConstructs()
{
$mapping = getMappingOfConstructs();
$used = [];
$actions = [];
foreach (Config\getRedefinableLanguageConstructs() as $construct) {
if (isset($used[$mapping[$construct]])) {
continue;
}
$used[$mapping[$construct]] = true;
$actions[] = spliceLanguageConstruct($mapping[$construct]);
}
return Generic\chain($actions);
}
function getMappingOfConstructs()
{
return [
'echo' => T_ECHO,
'print' => T_PRINT,
'eval' => T_EVAL,
'die' => T_EXIT,
'exit' => T_EXIT,
'isset' => T_ISSET,
'unset' => T_UNSET,
'empty' => T_EMPTY,
'require' => T_REQUIRE,
'require_once' => T_REQUIRE_ONCE,
'include' => T_INCLUDE,
'include_once' => T_INCLUDE_ONCE,
'clone' => T_CLONE,
];
}
function getInnerTokens()
{
return [
'$',
',',
'"',
T_START_HEREDOC,
T_END_HEREDOC,
T_OBJECT_OPERATOR,
T_DOUBLE_COLON,
T_NS_SEPARATOR,
T_STRING,
T_LNUMBER,
T_DNUMBER,
T_WHITESPACE,
T_CONSTANT_ENCAPSED_STRING,
T_COMMENT,
T_DOC_COMMENT,
T_VARIABLE,
T_ENCAPSED_AND_WHITESPACE,
Generic\NAME_FULLY_QUALIFIED,
Generic\NAME_QUALIFIED,
Generic\NAME_RELATIVE,
];
}
function getBracketTokens()
{
return [
Generic\LEFT_ROUND,
Generic\LEFT_SQUARE,
Generic\LEFT_CURLY,
T_CURLY_OPEN,
T_DOLLAR_OPEN_CURLY_BRACES,
Generic\ATTRIBUTE,
];
}
function spliceLanguageConstruct($token)
{
return function(Source $s) use ($token) {
foreach ($s->all($token) as $pos) {
$s->splice('\\' . LANGUAGE_CONSTRUCT_PREFIX, $pos, 0, Source::PREPEND);
if (lacksParentheses($s, $pos)) {
addParentheses($s, $pos);
}
}
};
}
function lacksParentheses(Source $s, $pos)
{
if ($s->is(T_ECHO, $pos)) {
return true;
}
$next = $s->skip(Source::junk(), $pos);
return !$s->is(Generic\LEFT_ROUND, $next);
}
function addParentheses(Source $s, $pos)
{
$pos = $s->skip(Source::junk(), $pos);
$s->splice(Generic\LEFT_ROUND, $pos, 0, Source::PREPEND);
while ($pos < count($s->tokens)) {
if ($s->is(getInnerTokens(), $pos)) {
$pos++;
} elseif ($s->is(getBracketTokens(), $pos)) {
$pos = $s->match($pos) + 1;
} else {
break;
}
}
if ($s->is(Source::junk(), $pos)) {
$pos = $s->skipBack(Source::junk(), $pos);
}
$s->splice(Generic\RIGHT_ROUND, $pos, 0, Source::APPEND);
}

View file

@ -1,201 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation\Actions\RedefinitionOfNew;
use Patchwork\CodeManipulation\Source;
use Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\CodeManipulation\Actions\Namespaces;
use Patchwork\Config;
const STATIC_INSTANTIATION_REPLACEMENT = '\Patchwork\CallRerouting\getInstantiator(\'%s\', %s)->instantiate(%s)';
const DYNAMIC_INSTANTIATION_REPLACEMENT = '\Patchwork\CallRerouting\getInstantiator(%s, %s)->instantiate(%s)';
const CALLED_CLASS = '((__CLASS__ && __FUNCTION__ !== (__NAMESPACE__ ? __NAMESPACE__ . "\\\\{closure}" : "\\\\{closure}")) ? \get_called_class() : null)';
const spliceAllInstantiations = 'Patchwork\CodeManipulation\Actions\RedefinitionOfNew\spliceAllInstantiations';
const publicizeConstructors = 'Patchwork\CodeManipulation\Actions\RedefinitionOfNew\publicizeConstructors';
/**
* @since 2.1.0
*/
function spliceAllInstantiations(Source $s)
{
if (!State::$enabled || !Config\isNewKeywordRedefinable()) {
return;
}
foreach ($s->all(T_NEW) as $new) {
$begin = $s->skip(Source::junk(), $new);
if ($s->is([T_CLASS, Generic\READONLY, Generic\ATTRIBUTE], $begin)) {
# Anonymous class
continue;
}
$end = scanInnerTokens($s, $begin, $dynamic);
$afterEnd = $s->skip(Source::junk(), $end);
list($argsOpen, $argsClose) = [null, null];
if ($s->is(Generic\LEFT_ROUND, $afterEnd)) {
list($argsOpen, $argsClose) = [$afterEnd, $s->match($afterEnd)];
}
spliceInstantiation($s, $new, $begin, $end, $argsOpen, $argsClose, $dynamic);
if (hasExtraParentheses($s, $new)) {
removeExtraParentheses($s, $new);
}
}
}
function publicizeConstructors(Source $s)
{
if (!Config\isNewKeywordRedefinable()) {
return;
}
foreach ($s->all([T_PRIVATE, T_PROTECTED]) as $first) {
$second = $s->skip(Source::junk(), $first);
$third = $s->skip(Source::junk(), $second);
if ($s->is(T_FUNCTION, $second) && $s->read($third, 1) === '__construct') {
$s->splice('public', $first, 1);
}
}
}
function spliceInstantiation(Source $s, $new, $begin, $end, $argsOpen, $argsClose, $dynamic)
{
$class = $s->read($begin, $end - $begin + 1);
$args = '';
$length = $end - $new + 1;
if ($argsOpen !== null) {
$args = $s->read($argsOpen + 1, $argsClose - $argsOpen - 1);
$length = $argsClose - $new + 1;
}
$replacement = DYNAMIC_INSTANTIATION_REPLACEMENT;
if (!$dynamic) {
$class = Namespaces\resolveName($s, $begin);
$replacement = STATIC_INSTANTIATION_REPLACEMENT;
}
$s->splice(sprintf($replacement, $class, CALLED_CLASS, $args), $new, $length);
}
function getInnerTokens()
{
return [
'$',
T_OBJECT_OPERATOR,
T_DOUBLE_COLON,
T_NS_SEPARATOR,
T_STRING,
T_LNUMBER,
T_DNUMBER,
T_WHITESPACE,
T_CONSTANT_ENCAPSED_STRING,
T_COMMENT,
T_DOC_COMMENT,
T_VARIABLE,
T_ENCAPSED_AND_WHITESPACE,
T_STATIC,
Generic\NAME_FULLY_QUALIFIED,
Generic\NAME_QUALIFIED,
Generic\NAME_RELATIVE,
];
}
function getBracketTokens()
{
return [
Generic\LEFT_SQUARE,
Generic\LEFT_CURLY,
T_CURLY_OPEN,
T_DOLLAR_OPEN_CURLY_BRACES,
Generic\ATTRIBUTE,
];
}
function getDynamicTokens()
{
return [
'$',
T_OBJECT_OPERATOR,
T_DOUBLE_COLON,
T_LNUMBER,
T_DNUMBER,
T_CONSTANT_ENCAPSED_STRING,
T_VARIABLE,
T_ENCAPSED_AND_WHITESPACE,
];
}
function scanInnerTokens(Source $s, $begin, &$dynamic = null)
{
$dynamic = false;
$pos = $begin;
while ($s->is(getInnerTokens(), $pos) || $s->is(getBracketTokens(), $pos)) {
if ($s->is(getBracketTokens(), $pos)) {
$dynamic = true;
$pos = $s->match($pos) + 1;
} else {
if ($s->is(getDynamicTokens(), $pos)) {
$dynamic = true;
}
$pos++;
}
}
return $pos - 1;
}
function hasExtraParentheses(Source $s, $new)
{
$doNotRemoveAfter = [
T_STRING,
T_STATIC,
T_VARIABLE,
T_FOREACH,
T_FOR,
T_IF,
T_ELSEIF,
T_WHILE,
T_ARRAY,
T_PRINT,
T_ECHO,
T_CLASS,
Generic\NAME_FULLY_QUALIFIED,
Generic\NAME_QUALIFIED,
Generic\NAME_RELATIVE,
Generic\RIGHT_ROUND,
Generic\RIGHT_SQUARE,
];
$left = $s->skipBack(Source::junk(), $new);
if (!$s->is(Generic\LEFT_ROUND, $left)) {
return false;
}
$beforeLeft = $s->skipBack(Source::junk(), $left);
return !$s->is($doNotRemoveAfter, $beforeLeft);
}
function removeExtraParentheses(Source $s, $new)
{
$left = $s->skipBack(Source::junk(), $new);
$s->splice('', $left, 1);
$s->splice('', $s->match($left), 1);
}
function suspendFor(callable $function)
{
State::$enabled = false;
$exception = null;
try {
$function();
} catch (\Exception $e) {
$exception = $e;
}
State::$enabled = true;
if ($exception) {
throw $exception;
}
}
class State
{
static $enabled = true;
}

View file

@ -1,318 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation;
use Patchwork\CodeManipulation\Actions\Generic;
use Patchwork\Utils;
class Source
{
const TYPE_OFFSET = 0;
const STRING_OFFSET = 1;
const PREPEND = 'PREPEND';
const APPEND = 'APPEND';
const OVERWRITE = 'OVERWRITE';
const ANY = null;
public $tokens;
public $tokensByType;
public $splices;
public $spliceLengths;
public $code;
public $file;
public $matchingBrackets;
public $levels;
public $levelBeginnings;
public $levelEndings;
public $tokensByLevel;
public $tokensByLevelAndType;
public $cache;
function __construct($string)
{
$this->code = $string;
$this->initialize();
}
function initialize()
{
$this->tokens = Utils\tokenize($this->code);
$this->tokens[] = [T_WHITESPACE, ""];
$this->indexTokensByType();
$this->collectBracketMatchings();
$this->collectLevelInfo();
$this->splices = [];
$this->spliceLengths = [];
$this->cache = [];
}
function indexTokensByType()
{
$this->tokensByType = [];
foreach ($this->tokens as $offset => $token) {
$this->tokensByType[$token[self::TYPE_OFFSET]][] = $offset;
}
}
function collectBracketMatchings()
{
$this->matchingBrackets = [];
$stack = [];
foreach ($this->tokens as $offset => $token) {
$type = $token[self::TYPE_OFFSET];
switch ($type) {
case '(':
case '[':
case '{':
case T_CURLY_OPEN:
case T_DOLLAR_OPEN_CURLY_BRACES:
case Generic\ATTRIBUTE:
$stack[] = $offset;
break;
case ')':
case ']':
case '}':
$top = array_pop($stack);
$this->matchingBrackets[$top] = $offset;
$this->matchingBrackets[$offset] = $top;
break;
}
}
}
function collectLevelInfo()
{
$level = 0;
$this->levels = [];
$this->tokensByLevel = [];
$this->levelBeginnings = [];
$this->levelEndings = [];
$this->tokensByLevelAndType = [];
foreach ($this->tokens as $offset => $token) {
$type = $token[self::TYPE_OFFSET];
switch ($type) {
case '(':
case '[':
case '{':
case T_CURLY_OPEN:
case T_DOLLAR_OPEN_CURLY_BRACES:
case Generic\ATTRIBUTE:
$level++;
Utils\appendUnder($this->levelBeginnings, $level, $offset);
break;
case ')':
case ']':
case '}':
Utils\appendUnder($this->levelEndings, $level, $offset);
$level--;
}
$this->levels[$offset] = $level;
Utils\appendUnder($this->tokensByLevel, $level, $offset);
Utils\appendUnder($this->tokensByLevelAndType, [$level, $type], $offset);
}
Utils\appendUnder($this->levelBeginnings, 0, 0);
Utils\appendUnder($this->levelEndings, 0, count($this->tokens) - 1);
}
function has($types)
{
foreach ((array) $types as $type) {
if ($this->all($type) !== []) {
return true;
}
}
return false;
}
function is($types, $offset)
{
foreach ((array) $types as $type) {
if ($this->tokens[$offset][self::TYPE_OFFSET] === $type) {
return true;
}
}
return false;
}
function skip($types, $offset, $direction = 1)
{
$offset += $direction;
$types = (array) $types;
while ($offset < count($this->tokens) && $offset >= 0) {
if (!in_array($this->tokens[$offset][self::TYPE_OFFSET], $types)) {
return $offset;
}
$offset += $direction;
}
return ($direction > 0) ? INF : -1;
}
function skipBack($types, $offset)
{
return $this->skip($types, $offset, -1);
}
function within($types, $low, $high)
{
$result = [];
foreach ((array) $types as $type) {
$candidates = isset($this->tokensByType[$type]) ? $this->tokensByType[$type] : [];
$result = array_merge(Utils\allWithinRange($candidates, $low, $high), $result);
}
return $result;
}
function read($offset, $count = 1)
{
$result = '';
$pos = $offset;
while ($pos < $offset + $count) {
if (isset($this->tokens[$pos][self::STRING_OFFSET])) {
$result .= $this->tokens[$pos][self::STRING_OFFSET];
} else {
$result .= $this->tokens[$pos];
}
$pos++;
}
return $result;
}
function siblings($types, $offset)
{
$level = $this->levels[$offset];
$begin = Utils\lastNotGreaterThan(Utils\access($this->levelBeginnings, $level, []), $offset);
$end = Utils\firstGreaterThan(Utils\access($this->levelEndings, $level, []), $offset);
if ($types === self::ANY) {
return Utils\allWithinRange($this->tokensByLevel[$level], $begin, $end);
} else {
$result = [];
foreach ((array) $types as $type) {
$candidates = Utils\access($this->tokensByLevelAndType, [$level, $type], []);
$result = array_merge(Utils\allWithinRange($candidates, $begin, $end), $result);
}
return $result;
}
}
function next($types, $offset)
{
if (!is_array($types)) {
$candidates = Utils\access($this->tokensByType, $types, []);
return Utils\firstGreaterThan($candidates, $offset);
}
$result = INF;
foreach ($types as $type) {
$result = min($this->next($type, $offset), $result);
}
return $result;
}
function all($types)
{
if (!is_array($types)) {
return Utils\access($this->tokensByType, $types, []);
}
$result = [];
foreach ($types as $type) {
$result = array_merge($result, $this->all($type));
}
sort($result);
return $result;
}
function match($offset)
{
$offset = (string) $offset;
return isset($this->matchingBrackets[$offset]) ? $this->matchingBrackets[$offset] : INF;
}
function splice($splice, $offset, $length = 0, $policy = self::OVERWRITE)
{
if ($policy === self::OVERWRITE) {
$this->splices[$offset] = $splice;
} elseif ($policy === self::PREPEND || $policy === self::APPEND) {
if (!isset($this->splices[$offset])) {
$this->splices[$offset] = '';
}
if ($policy === self::PREPEND) {
$this->splices[$offset] = $splice . $this->splices[$offset];
} elseif ($policy === self::APPEND) {
$this->splices[$offset] .= $splice;
}
}
if (!isset($this->spliceLengths[$offset])) {
$this->spliceLengths[$offset] = 0;
}
$this->spliceLengths[$offset] = max($length, $this->spliceLengths[$offset]);
$this->code = null;
}
function createCodeFromTokens()
{
$splices = $this->splices;
$code = "";
$count = count($this->tokens);
for ($offset = 0; $offset < $count; $offset++) {
if (isset($splices[$offset])) {
$code .= $splices[$offset];
unset($splices[$offset]);
$offset += $this->spliceLengths[$offset] - 1;
} else {
$t = $this->tokens[$offset];
$code .= isset($t[self::STRING_OFFSET]) ? $t[self::STRING_OFFSET] : $t;
}
}
$this->code = $code;
}
static function junk()
{
return [T_WHITESPACE, T_COMMENT, T_DOC_COMMENT];
}
function __toString()
{
if ($this->code === null) {
$this->createCodeFromTokens();
}
return (string) $this->code;
}
function flush()
{
$this->initialize(Utils\tokenize($this));
}
/**
* @since 2.1.0
*/
function cache(array $args, \Closure $function)
{
$found = true;
$trace = debug_backtrace()[1];
$location = $trace['file'] . ':' . $trace['line'];
$result = &$this->cache;
foreach (array_merge([$location], $args) as $step) {
if (!is_scalar($step)) {
throw new \LogicException;
}
if (!isset($result[$step])) {
$result[$step] = [];
$found = false;
}
$result = &$result[$step];
}
if (!$found) {
$result = call_user_func_array($function->bindTo($this), $args);
}
return $result;
}
}

View file

@ -1,362 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2023 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\CodeManipulation;
use Patchwork\Utils;
class Stream
{
const STREAM_OPEN_FOR_INCLUDE = 128;
const STAT_MTIME_NUMERIC_OFFSET = 9;
const STAT_MTIME_ASSOC_OFFSET = 'mtime';
protected static $protocols = ['file', 'phar'];
protected static $otherWrapperClass;
public $context;
public $resource;
public static function discoverOtherWrapper()
{
$handle = fopen(__FILE__, 'r');
$meta = stream_get_meta_data($handle);
if ($meta && isset($meta['wrapper_data']) && is_object($meta['wrapper_data']) && !($meta['wrapper_data'] instanceof self)) {
static::$otherWrapperClass = get_class($meta['wrapper_data']);
}
}
public static function wrap()
{
foreach (static::$protocols as $protocol) {
stream_wrapper_unregister($protocol);
stream_wrapper_register($protocol, get_called_class());
}
}
public static function unwrap()
{
foreach (static::$protocols as $protocol) {
set_error_handler(function() {});
stream_wrapper_restore($protocol);
restore_error_handler();
}
}
public static function reinstateWrapper()
{
static::discoverOtherWrapper();
static::unwrap();
static::wrap();
}
public function stream_open($path, $mode, $options, &$openedPath)
{
$including = (bool) ($options & self::STREAM_OPEN_FOR_INCLUDE);
// `parse_ini_file()` also sets STREAM_OPEN_FOR_INCLUDE.
if ($including) {
$frame = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1];
if (empty($frame['class']) && $frame['function'] === 'parse_ini_file') {
$including = false;
}
}
if ($including && shouldTransform($path)) {
$this->resource = transformAndOpen($path);
return $this->resource !== false;
}
$this->resource = static::fopen($path, $mode, $options, $this->context);
return $this->resource !== false;
}
public static function getOtherWrapper($context)
{
if (isset(static::$otherWrapperClass)) {
$class = static::$otherWrapperClass;
$otherWrapper = new $class;
if ($context !== null) {
$otherWrapper->context = $context;
}
return $otherWrapper;
}
}
public static function alternate(callable $internal, $resource, $wrapped, array $args = [], array $extraArgs = [], $context = null, $shouldReturnResource = false)
{
$shouldAddResourceArg = true;
if ($resource === null) {
$resource = static::getOtherWrapper($context);
$shouldAddResourceArg = false;
}
if (is_object($resource)) {
$args = array_merge($args, $extraArgs);
$ladder = function() use ($resource, $wrapped, $args) {
switch (count($args)) {
case 0:
return $resource->$wrapped();
case 1:
return $resource->$wrapped($args[0]);
case 2:
return $resource->$wrapped($args[0], $args[1]);
default:
return call_user_func_array([$resource, $wrapped], $args);
}
};
$result = $ladder();
static::unwrap();
static::wrap();
} else {
if ($shouldAddResourceArg) {
array_unshift($args, $resource);
}
if ($context !== null) {
$args[] = $context;
}
$result = static::bypass(function() use ($internal, $args) {
switch (count($args)) {
case 0:
return $internal();
case 1:
return $internal($args[0]);
case 2:
return $internal($args[0], $args[1]);
default:
return call_user_func_array($internal, $args);
}
});
}
if ($shouldReturnResource) {
return ($result !== false) ? $resource : false;
}
return $result;
}
public static function fopen($path, $mode, $options, $context = null)
{
$otherWrapper = static::getOtherWrapper($context);
if ($otherWrapper !== null) {
$openedPath = null;
$result = $otherWrapper->stream_open($path, $mode, $options, $openedPath);
return $result !== false ? $otherWrapper : false;
}
return static::bypass(function() use ($path, $mode, $options, $context) {
if ($context === null) {
return fopen($path, $mode, $options);
}
return fopen($path, $mode, $options, $context);
});
}
public function stream_close()
{
return static::fclose($this->resource);
}
public static function fclose($resource)
{
return static::alternate('fclose', $resource, 'stream_close');
}
public static function fread($resource, $count)
{
return static::alternate('fread', $resource, 'stream_read', [$count]);
}
public static function feof($resource)
{
return static::alternate('feof', $resource, 'stream_eof');
}
public function stream_eof()
{
return static::feof($this->resource);
}
public function stream_flush()
{
return static::alternate('fflush', $this->resource, 'stream_flush');
}
public function stream_read($count)
{
return static::fread($this->resource, $count);
}
public function stream_seek($offset, $whence = SEEK_SET)
{
if (is_object($this->resource)) {
return $this->resource->stream_seek($offset, $whence);
}
return fseek($this->resource, $offset, $whence) === 0;
}
public function stream_stat()
{
if (is_object($this->resource)) {
return $this->resource->stream_stat();
}
$result = fstat($this->resource);
if ($result) {
$result[self::STAT_MTIME_ASSOC_OFFSET]++;
$result[self::STAT_MTIME_NUMERIC_OFFSET]++;
}
return $result;
}
public function stream_tell()
{
return static::alternate('ftell', $this->resource, 'stream_tell');
}
public static function bypass(callable $action)
{
static::unwrap();
$result = $action();
static::wrap();
return $result;
}
public function url_stat($path, $flags)
{
$internal = function($path, $flags) {
$func = ($flags & STREAM_URL_STAT_LINK) ? 'lstat' : 'stat';
clearstatcache();
if ($flags & STREAM_URL_STAT_QUIET) {
set_error_handler(function() {});
try {
$result = call_user_func($func, $path);
} catch (\Exception $e) {
$result = null;
}
restore_error_handler();
} else {
$result = call_user_func($func, $path);
}
clearstatcache();
if ($result) {
$result[self::STAT_MTIME_ASSOC_OFFSET]++;
$result[self::STAT_MTIME_NUMERIC_OFFSET]++;
}
return $result;
};
return static::alternate($internal, null, __FUNCTION__, [$path, $flags], [], $this->context);
}
public function dir_closedir()
{
return static::alternate('closedir', $this->resource, 'dir_closedir') ?: true;
}
public function dir_opendir($path, $options)
{
$this->resource = static::alternate('opendir', null, __FUNCTION__, [$path], [$options], $this->context);
return $this->resource !== false;
}
public function dir_readdir()
{
return static::alternate('readdir', $this->resource, __FUNCTION__);
}
public function dir_rewinddir()
{
return static::alternate('rewinddir', $this->resource, __FUNCTION__);
}
public function mkdir($path, $mode, $options)
{
return static::alternate('mkdir', null, __FUNCTION__, [$path, $mode, $options], [], $this->context);
}
public function rename($pathFrom, $pathTo)
{
return static::alternate('rename', null, __FUNCTION__, [$pathFrom, $pathTo], [], $this->context);
}
public function rmdir($path, $options)
{
return static::alternate('rmdir', null, __FUNCTION__, [$path], [$options], $this->context);
}
public function stream_cast($castAs)
{
return static::alternate(function() {
return $this->resource;
}, null, __FUNCTION__, [$castAs]);
}
public function stream_lock($operation)
{
if ($operation === '0' || $operation === 0) {
$operation = LOCK_EX;
}
return static::alternate('flock', $this->resource, __FUNCTION__, [$operation]);
}
public function stream_set_option($option, $arg1, $arg2)
{
$internal = function($option, $arg1, $arg2) {
switch ($option) {
case STREAM_OPTION_BLOCKING:
return stream_set_blocking($this->resource, $arg1);
case STREAM_OPTION_READ_TIMEOUT:
return stream_set_timeout($this->resource, $arg1, $arg2);
case STREAM_OPTION_WRITE_BUFFER:
return stream_set_write_buffer($this->resource, $arg1);
case STREAM_OPTION_READ_BUFFER:
return stream_set_read_buffer($this->resource, $arg1);
}
};
return static::alternate($internal, $this->resource, __FUNCTION__, [$option, $arg1, $arg2]);
}
public function stream_write($data)
{
return static::fwrite($this->resource, $data);
}
public static function fwrite($resource, $data)
{
return static::alternate('fwrite', $resource, 'stream_write', [$data]);
}
public function unlink($path)
{
return static::alternate('unlink', $this->resource, __FUNCTION__, [$path], [], $this->context);
}
public function stream_metadata($path, $option, $value)
{
$internal = function($path, $option, $value) {
switch ($option) {
case STREAM_META_TOUCH:
if (empty($value)) {
return touch($path);
} else {
return touch($path, $value[0], $value[1]);
}
case STREAM_META_OWNER_NAME:
case STREAM_META_OWNER:
return chown($path, $value);
case STREAM_META_GROUP_NAME:
case STREAM_META_GROUP:
return chgrp($path, $value);
case STREAM_META_ACCESS:
return chmod($path, $value);
}
};
return static::alternate($internal, null, __FUNCTION__, [$path, $option, $value]);
}
public function stream_truncate($newSize)
{
return static::alternate('ftruncate', $this->resource, __FUNCTION__, [$newSize]);
}
}

View file

@ -1,233 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\Config;
use Patchwork\Utils;
use Patchwork\Exceptions;
use Patchwork\CodeManipulation\Actions\RedefinitionOfLanguageConstructs;
const FILE_NAME = 'patchwork.json';
function locate()
{
$alreadyRead = [];
$paths = array_map('dirname', get_included_files());
$paths[] = dirname($_SERVER['PHP_SELF']);
$paths[] = getcwd();
foreach ($paths as $path) {
while (dirname($path) !== $path) {
$file = $path . DIRECTORY_SEPARATOR . FILE_NAME;
if (is_file($file) && !isset($alreadyRead[$file])) {
read($file);
State::$timestamp = max(filemtime($file), State::$timestamp);
$alreadyRead[$file] = true;
}
$path = dirname($path);
}
}
}
function read($file)
{
$data = json_decode(file_get_contents($file), true);
if (json_last_error() !== JSON_ERROR_NONE) {
$message = json_last_error_msg();
throw new Exceptions\ConfigMalformed($file, $message);
}
set($data, $file);
}
function set(array $data, $file)
{
$keys = array_keys($data);
$list = ['blacklist', 'whitelist', 'cache-path', 'redefinable-internals', 'new-keyword-redefinable'];
$unknown = array_diff($keys, $list);
if ($unknown != []) {
throw new Exceptions\ConfigKeyNotRecognized(reset($unknown), $list, $file);
}
$root = dirname($file);
setBlacklist(get($data, 'blacklist'), $root);
setWhitelist(get($data, 'whitelist'), $root);
setCachePath(get($data, 'cache-path'), $root);
setRedefinableInternals(get($data, 'redefinable-internals'), $root);
setNewKeywordRedefinability(get($data, 'new-keyword-redefinable'), $root);
}
function get(array $data, $key)
{
return isset($data[$key]) ? $data[$key] : null;
}
function setBlacklist($data, $root)
{
merge(State::$blacklist, resolvePaths($data, $root));
}
function isListed($path, array $list)
{
$path = rtrim($path, '\\/');
foreach ($list as $item) {
if (!is_string($item)) {
$item = chr($item);
}
if (strpos($path, $item) === 0) {
return true;
}
}
return false;
}
function isBlacklisted($path)
{
return isListed($path, State::$blacklist);
}
function setWhitelist($data, $root)
{
merge(State::$whitelist, resolvePaths($data, $root));
}
function isWhitelisted($path)
{
return isListed($path, State::$whitelist);
}
function setCachePath($data, $root)
{
if ($data === null) {
return;
}
$path = resolvePath($data, $root);
if (State::$cachePath !== null && State::$cachePath !== $path) {
throw new Exceptions\CachePathConflict(State::$cachePath, $path);
}
State::$cachePath = $path;
}
function getDefaultRedefinableInternals()
{
return [
'preg_replace_callback',
'spl_autoload_register',
'iterator_apply',
'header_register_callback',
'call_user_func',
'call_user_func_array',
'forward_static_call',
'forward_static_call_array',
'register_shutdown_function',
'register_tick_function',
'unregister_tick_function',
'ob_start',
'usort',
'uasort',
'uksort',
'array_reduce',
'array_intersect_ukey',
'array_uintersect',
'array_uintersect_assoc',
'array_intersect_uassoc',
'array_uintersect_uassoc',
'array_uintersect_uassoc',
'array_diff_ukey',
'array_udiff',
'array_udiff_assoc',
'array_diff_uassoc',
'array_udiff_uassoc',
'array_udiff_uassoc',
'array_filter',
'array_map',
'libxml_set_external_entity_loader',
];
}
function getRedefinableInternals()
{
if (!empty(State::$redefinableInternals)) {
return array_merge(State::$redefinableInternals, getDefaultRedefinableInternals());
}
return [];
}
function setRedefinableInternals($names)
{
merge(State::$redefinableInternals, $names);
$constructs = array_intersect(State::$redefinableInternals, getSupportedLanguageConstructs());
State::$redefinableLanguageConstructs = array_merge(State::$redefinableLanguageConstructs, $constructs);
State::$redefinableInternals = array_diff(State::$redefinableInternals, $constructs);
}
function setNewKeywordRedefinability($value)
{
State::$newKeywordRedefinable = State::$newKeywordRedefinable || $value;
}
function getRedefinableLanguageConstructs()
{
return State::$redefinableLanguageConstructs;
}
function getSupportedLanguageConstructs()
{
return array_keys(RedefinitionOfLanguageConstructs\getMappingOfConstructs());
}
function isNewKeywordRedefinable()
{
return State::$newKeywordRedefinable;
}
function getCachePath()
{
return State::$cachePath;
}
function resolvePath($path, $root)
{
if ($path === null) {
return null;
}
if (file_exists($path) && realpath($path) === $path) {
return $path;
}
return realpath($root . '/' . $path);
}
function resolvePaths($paths, $root)
{
if ($paths === null) {
return [];
}
$result = [];
foreach ((array) $paths as $path) {
$result[] = resolvePath($path, $root);
}
return $result;
}
function merge(array &$target, $source)
{
$target = array_merge($target, (array) $source);
}
function getTimestamp()
{
return State::$timestamp;
}
class State
{
static $blacklist = [];
static $whitelist = [];
static $cachePath;
static $redefinableInternals = [];
static $redefinableLanguageConstructs = [];
static $newKeywordRedefinable = false;
static $timestamp = 0;
}

View file

@ -1,57 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\Console;
use Patchwork\CodeManipulation as CM;
error_reporting(E_ALL);
$argc > 2 && $argv[1] == 'prime'
or exit("\nUsage: php patchwork.phar prime DIR1 DIR2 ... DIRn\n" .
" (to recursively prime all PHP files under given directories)\n\n");
try {
CM\cacheEnabled()
or exit("\nError: no cache location set.\n\n");
} catch (Patchwork\Exceptions\CachePathUnavailable $e) {
exit("\nError: " . $e->getMessage() . "\n\n");
}
echo "\nCounting files...\n";
$files = [];
foreach (array_slice($argv, 2) as $path) {
$path = realpath($path);
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)) as $file) {
if (substr($file, -4) == '.php' && !CM\internalToCache($file) && !CM\availableCached($file)) {
$files[] = $file;
}
}
}
$count = count($files);
$count > 0 or exit("\nNothing to do.\n\n");
echo "\nPriming ($count files total):\n";
const CONSOLE_WIDTH = 80;
$progress = 0;
for ($i = 0; $i < $count; $i++) {
CM\prime($files[$i]->getRealPath());
while ((int) (($i + 1) / $count * CONSOLE_WIDTH) > $progress) {
echo '.';
$progress++;
}
}
echo "\n\n";

View file

@ -1,129 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2023 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\Exceptions;
use Patchwork\Utils;
abstract class Exception extends \Exception
{
}
class NoResult extends Exception
{
}
class StackEmpty extends Exception
{
protected $message = "There are no calls in the dispatch stack";
}
abstract class CallbackException extends Exception
{
function __construct($callback)
{
parent::__construct(sprintf($this->message, Utils\callableToString($callback)));
}
}
class NotUserDefined extends CallbackException
{
protected $message = 'Please include {"redefinable-internals": ["%s"]} in your patchwork.json.';
}
class DefinedTooEarly extends CallbackException
{
function __construct($callback)
{
$this->message = "The file that defines %s() was included earlier than Patchwork. " .
"Please reverse this order to be able to redefine the function in question.";
parent::__construct($callback);
}
}
class InternalMethodsNotSupported extends CallbackException
{
protected $message = "Methods of internal classes (such as %s) are not yet redefinable in Patchwork 2.1.";
}
/**
* @deprecated 2.2.0
*/
class InternalsNotSupportedOnHHVM extends CallbackException
{
protected $message = "As of version 2.1, Patchwork cannot redefine internal functions and methods (such as %s) on HHVM.";
}
class CachePathUnavailable extends Exception
{
function __construct($location)
{
parent::__construct(sprintf(
"The specified cache path is nonexistent or read-only: %s",
$location
));
}
}
class ConfigException extends Exception
{
}
class ConfigMalformed extends ConfigException
{
function __construct($file, $message)
{
parent::__construct(sprintf(
'The configuration file %s is malformed: %s',
$file,
$message
));
}
}
class ConfigKeyNotRecognized extends ConfigException
{
function __construct($key, $list, $file)
{
parent::__construct(sprintf(
"The key '%s' in the configuration file %s was not recognized. " .
"You might have meant one of these: %s",
$key,
$file,
join(', ', $list)
));
}
}
class CachePathConflict extends ConfigException
{
function __construct($first, $second)
{
parent::__construct(sprintf(
"Detected configuration files provide conflicting cache paths: %s and %s",
$first,
$second
));
}
}
class NewKeywordNotRedefinable extends ConfigException
{
protected $message = 'Please set {"new-keyword-redefinable": true} to redefine instantiations';
}
class NonNullToVoid extends Exception
{
protected $message = 'A redefinition of a void-typed callable attempted to return a non-null result';
}
class ReturnFromNever extends Exception
{
protected $message = 'A redefinition of a never-typed callable attempted to return';
}

View file

@ -1,76 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\Redefinitions\LanguageConstructs;
function _echo($string)
{
foreach (func_get_args() as $argument) {
echo $argument;
}
}
function _print($string)
{
return print($string);
}
function _eval($code)
{
return eval($code);
}
function _die($message = null)
{
die($message);
}
function _exit($message = null)
{
exit($message);
}
function _isset(&$lvalue)
{
return isset($lvalue);
}
function _unset(&$lvalue)
{
unset($lvalue);
}
function _empty(&$lvalue)
{
return empty($lvalue);
}
function _require($path)
{
return require($path);
}
function _require_once($path)
{
return require_once($path);
}
function _include($path)
{
return include($path);
}
function _include_once($path)
{
return include_once($path);
}
function _clone($object)
{
return clone $object;
}

View file

@ -1,95 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\Stack;
use Patchwork\Exceptions;
function push($offset, $calledClass, ?array $argsOverride = null)
{
State::$items[] = [$offset, $calledClass, $argsOverride];
}
function pop()
{
array_pop(State::$items);
}
function pushFor($offset, $calledClass, $callback, ?array $argsOverride = null)
{
push($offset, $calledClass, $argsOverride);
try {
$callback();
} catch (\Exception $e) {
$exception = $e;
}
pop();
if (isset($exception)) {
throw $exception;
}
}
function top($property = null)
{
$all = all();
$frame = reset($all);
$argsOverride = topArgsOverride();
if ($argsOverride !== null) {
$frame["args"] = $argsOverride;
}
if ($property) {
return isset($frame[$property]) ? $frame[$property] : null;
}
return $frame;
}
function topOffset()
{
if (empty(State::$items)) {
throw new Exceptions\StackEmpty;
}
list($offset, $calledClass) = end(State::$items);
return $offset;
}
function topCalledClass()
{
if (empty(State::$items)) {
throw new Exceptions\StackEmpty;
}
list($offset, $calledClass) = end(State::$items);
return $calledClass;
}
function topArgsOverride()
{
if (empty(State::$items)) {
throw new Exceptions\StackEmpty;
}
list($offset, $calledClass, $argsOverride) = end(State::$items);
return $argsOverride;
}
function all()
{
$backtrace = debug_backtrace();
return array_slice($backtrace, count($backtrace) - topOffset());
}
function allCalledClasses()
{
return array_map(function($item) {
list($offset, $calledClass) = $item;
return $calledClass;
}, State::$items);
}
class State
{
static $items = [];
}

View file

@ -1,388 +0,0 @@
<?php
/**
* @link http://patchwork2.org/
* @author Ignas Rudaitis <ignas.rudaitis@gmail.com>
* @copyright 2010-2018 Ignas Rudaitis
* @license http://www.opensource.org/licenses/mit-license.html
*/
namespace Patchwork\Utils;
use Patchwork\Config;
use Patchwork\CallRerouting;
use Patchwork\CodeManipulation;
const ALIASING_CODE = '
namespace %s;
function %s() {
return call_user_func_array("%s", func_get_args());
}
';
function clearOpcodeCaches()
{
if (function_exists('opcache_reset')) {
opcache_reset();
}
if (ini_get('wincache.ocenabled')) {
wincache_refresh_if_changed();
}
if (ini_get('apc.enabled') && function_exists('apc_clear_cache')) {
apc_clear_cache();
}
}
/**
* @deprecated 2.2.0
*/
function generatorsSupported()
{
return version_compare(PHP_VERSION, "5.5", ">=");
}
/**
* @deprecated 2.2.0
*/
function runningOnHHVM()
{
return defined("HHVM_VERSION");
}
function condense($string)
{
return preg_replace('/\s+/', ' ', $string);
}
function indexOfFirstGreaterThan(array $array, $value)
{
$low = 0;
$high = count($array) - 1;
if (empty($array) || $array[$high] <= $value) {
return -1;
}
while ($low < $high) {
$mid = (int)(($low + $high) / 2);
if ($array[$mid] <= $value) {
$low = $mid + 1;
} else {
$high = $mid;
}
}
return $low;
}
function indexOfLastNotGreaterThan(array $array, $value)
{
if (empty($array)) {
return -1;
}
$result = indexOfFirstGreaterThan($array, $value);
if ($result === -1) {
$result = count($array) - 1;
}
while ($array[$result] > $value) {
$result--;
}
return $result;
}
function firstGreaterThan(array $array, $value, $default = INF)
{
$index = indexOfFirstGreaterThan($array, $value);
return ($index !== -1) ? $array[$index] : $default;
}
function lastNotGreaterThan(array $array, $value, $default = INF)
{
$index = indexOfLastNotGreaterThan($array, $value);
return ($index !== -1) ? $array[$index] : $default;
}
function allWithinRange(array $array, $low, $high)
{
$low--;
$high++;
$index = indexOfFirstGreaterThan($array, $low);
if ($index === -1) {
return [];
}
$result = [];
while ($index < count($array) && $array[$index] < $high) {
$result[] = $array[$index];
$index++;
}
return $result;
}
function interpretCallable($callback)
{
if (is_object($callback)) {
return interpretCallable([$callback, "__invoke"]);
}
if (is_array($callback)) {
list($class, $method) = $callback;
$instance = null;
if (is_object($class)) {
$instance = $class;
$class = get_class($class);
}
$class = isset($class) ? ltrim($class, "\\") : '';
return [$class, $method, $instance];
}
if (substr($callback, 0, 4) === 'new ') {
return [ltrim(substr($callback, 4)), 'new', null];
}
$callback = ltrim($callback, "\\");
if (strpos($callback, "::")) {
list($class, $method) = explode("::", $callback);
return [$class, $method, null];
}
return [null, $callback, null];
}
function callableDefined($callable, $shouldAutoload = false)
{
list($class, $method, $instance) = interpretCallable($callable);
if ($instance !== null) {
return true;
}
if (isset($class)) {
return classOrTraitExists($class, $shouldAutoload) &&
(method_exists($class, $method) || $method === 'new');
}
return function_exists($method);
}
function classOrTraitExists($classOrTrait, $shouldAutoload = true)
{
return class_exists($classOrTrait, $shouldAutoload)
|| trait_exists($classOrTrait, $shouldAutoload);
}
function append(&$array, $value)
{
$array[] = $value;
end($array);
return key($array);
}
function appendUnder(&$array, $path, $value)
{
foreach ((array) $path as $key) {
if (!isset($array[$key])) {
$array[$key] = [];
}
$array = &$array[$key];
}
return append($array, $value);
}
function access($array, $path, $default = null)
{
foreach ((array) $path as $key) {
if (!isset($array[$key])) {
return $default;
}
$array = $array[$key];
}
return $array;
}
function normalizePath($path)
{
return rtrim(strtr($path, "\\", "/"), "/");
}
function reflectCallable($callback)
{
if ($callback instanceof \Closure) {
return new \ReflectionFunction($callback);
}
list($class, $method) = interpretCallable($callback);
if (isset($class)) {
return new \ReflectionMethod($class, $method);
}
return new \ReflectionFunction($method);
}
function callableToString($callback)
{
list($class, $method) = interpretCallable($callback);
if (isset($class)) {
return $class . "::" . $method;
}
return $method;
}
function alias($namespace, array $mapping)
{
foreach ($mapping as $original => $aliases) {
$original = ltrim(str_replace('\\', '\\\\', $namespace) . '\\\\' . $original, '\\');
foreach ((array) $aliases as $alias) {
eval(sprintf(ALIASING_CODE, $namespace, $alias, $original));
}
}
}
function getUserDefinedCallables()
{
return array_merge(get_defined_functions()['user'], getUserDefinedMethods());
}
function getRedefinableCallables()
{
return array_merge(getUserDefinedCallables(), Config\getRedefinableInternals());
}
function getUserDefinedMethods()
{
static $result = [];
static $classCount = 0;
static $traitCount = 0;
$classes = getUserDefinedClasses();
$traits = getUserDefinedTraits();
$newClasses = array_slice($classes, $classCount);
$newTraits = array_slice($traits, $traitCount);
foreach (array_merge($newClasses, $newTraits) as $newClass) {
foreach (get_class_methods($newClass) as $method) {
$result[] = $newClass . '::' . $method;
}
}
$classCount = count($classes);
$traitCount = count($traits);
return $result;
}
function getUserDefinedClasses()
{
static $classCutoff;
$classes = get_declared_classes();
if (!isset($classCutoff)) {
$classCutoff = count($classes);
for ($i = 0; $i < count($classes); $i++) {
if ((new \ReflectionClass($classes[$i]))->isUserDefined()) {
$classCutoff = $i;
break;
}
}
}
return array_slice($classes, $classCutoff);
}
function getUserDefinedTraits()
{
static $traitCutoff;
$traits = get_declared_traits();
if (!isset($traitCutoff)) {
$traitCutoff = count($traits);
for ($i = 0; $i < count($traits); $i++) {
$methods = get_class_methods($traits[$i]);
if (empty($methods)) {
continue;
}
list($first) = $methods;
if ((new \ReflectionMethod($traits[$i], $first))->isUserDefined()) {
$traitCutoff = $i;
break;
}
}
}
return array_slice($traits, $traitCutoff);
}
function matchWildcard($wildcard, array $subjects)
{
$table = ['*' => '.*', '{' => '(', '}' => ')', ' ' => '', '\\' => '\\\\'];
$pattern = '/' . strtr($wildcard, $table) . '/i';
return preg_grep($pattern, $subjects);
}
function wildcardMatches($wildcard, $subject)
{
return matchWildcard($wildcard, [$subject]) == [$subject];
}
function isOwnName($name)
{
return stripos((string) $name, 'Patchwork\\') === 0
&& stripos((string) $name, CallRerouting\INTERNAL_REDEFINITION_NAMESPACE . '\\') !== 0;
}
function isForeignName($name)
{
return !isOwnName($name);
}
function markMissedCallables()
{
State::$missedCallables = array_map('strtolower', getUserDefinedCallables());
}
function getMissedCallables()
{
return State::$missedCallables;
}
function callableWasMissed($name)
{
return in_array(strtolower($name), getMissedCallables());
}
function endsWith($haystack, $needle)
{
if (strlen($haystack) === strlen($needle)) {
return $haystack === $needle;
}
if (strlen($haystack) < strlen($needle)) {
return false;
}
return substr($haystack, -strlen($needle)) === $needle;
}
function wasRunAsConsoleApp()
{
global $argv;
return isset($argv) && (
endsWith($argv[0], 'patchwork.phar') || endsWith($argv[0], 'Patchwork.php')
);
}
function getParameterAndArgumentLists(?\ReflectionMethod $reflection = null)
{
$parameters = [];
$arguments = [];
if ($reflection) {
foreach ($reflection->getParameters() as $p) {
$parameter = '$' . $p->name;
if ($p->isOptional()) {
try {
$value = var_export($p->getDefaultValue(), true);
} catch (\ReflectionException $e) {
$value = var_export(CallRerouting\INSTANTIATOR_DEFAULT_ARGUMENT, true);
}
$parameter .= ' = ' . $value;
}
$parameters[] = $parameter;
$arguments[] = '$' . $p->name;
}
}
return [join(', ' , $parameters), join(', ', $arguments)];
}
function args()
{
return func_get_args();
}
function tokenize($string)
{
if (defined('TOKEN_PARSE')) {
return token_get_all($string, TOKEN_PARSE);
}
return token_get_all($string);
}
class State
{
static $missedCallables = [];
}

View file

@ -1,25 +0,0 @@
<?php
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitb64ab6ec83fc8ada31fa44f753742a80::getLoader();

View file

@ -1,119 +0,0 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../nikic/php-parser/bin/php-parse)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
}
}
return include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';

View file

@ -1,122 +0,0 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../phpunit/phpunit/phpunit)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] = $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'] = array(realpath(__DIR__ . '/..'.'/phpunit/phpunit/phpunit'));
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = 'phpvfscomposer://'.$this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data);
$data = str_replace('__FILE__', var_export($this->realpath, true), $data);
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_seek($offset, $whence)
{
if (0 === fseek($this->handle, $offset, $whence)) {
$this->position = ftell($this->handle);
return true;
}
return false;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (
(function_exists('stream_get_wrappers') && in_array('phpvfscomposer', stream_get_wrappers(), true))
|| (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper'))
) {
return include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit');
}
}
return include __DIR__ . '/..'.'/phpunit/phpunit/phpunit';

View file

@ -1,5 +0,0 @@
# Auto detect text files and perform LF normalization
text eol=lf
tests/ export-ignore
.travis.yml export-ignore

View file

@ -1,5 +0,0 @@
root: ./docs/
structure:
readme: what-and-why.md
summary: summary.md

View file

@ -1,14 +0,0 @@
# Dependabot configuration.
#
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
commit-message:
prefix: "GH Actions:"

View file

@ -1,84 +0,0 @@
name: PHP Quality Assurance
on:
push:
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
qa:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
fail-fast: true
matrix:
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
dependency-versions: ['lowest', 'highest']
include:
- php-versions: '8.4'
dependency-versions: 'highest'
continue-on-error: ${{ matrix.php-versions == '8.4' }}
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
ini-values: zend.assertions=1, error_reporting=-1, display_errors=On
coverage: ${{ ( matrix.php-versions == '7.4' && 'xdebug' ) || 'none' }}
tools: parallel-lint
env:
fail-fast: true
- name: Check syntax error in sources
if: ${{ matrix.dependency-versions == 'highest' }}
run: parallel-lint ./src/ ./tests/
- name: Install dependencies - normal
if: ${{ matrix.php-versions != '8.4' }}
uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependency-versions }}
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Install dependencies - ignore-platform-reqs
if: ${{ matrix.php-versions == '8.4' }}
uses: "ramsey/composer-install@v3"
with:
dependency-versions: ${{ matrix.dependency-versions }}
composer-options: "--ignore-platform-reqs"
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Check cross-version PHP compatibility
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' }} # results is same across versions, do it once
run: composer phpcompat
- name: Migrate test configuration (>= 7.3)
if: ${{ matrix.php-versions >= 7.3 && matrix.dependency-versions == 'highest' }}
run: ./vendor/bin/phpunit --migrate-configuration
- name: Run unit tests (without code coverage)
if: ${{ matrix.php-versions != '7.4' || matrix.dependency-versions != 'highest' }}
run: ./vendor/bin/phpunit
- name: Run unit tests with code coverage
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' }}
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Update codecov.io
uses: codecov/codecov-action@v4
if: ${{ matrix.php-versions == '7.4' && matrix.dependency-versions == 'highest' }} # upload coverage once is enough
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
file: ./coverage.xml

View file

@ -1,7 +0,0 @@
vendor/
/composer.lock
/phpunit.xml
website/
couscous-theme/
couscous.*
/.phpunit.result.cache

View file

@ -1,19 +0,0 @@
The MIT License (MIT)
Copyright (c) 2017 Giuseppe Mazzapica
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,42 +0,0 @@
# README
## Brain Monkey
[![PHP Quality Assurance](https://github.com/Brain-WP/BrainMonkey/workflows/PHP%20Quality%20Assurance/badge.svg)](https://github.com/Brain-WP/BrainMonkey/actions?query=workflow%3A%22PHP+Quality+Assurance%22)
[![codecov](https://codecov.io/gh/Brain-WP/BrainMonkey/branch/master/graph/badge.svg)](https://codecov.io/gh/Brain-WP/BrainMonkey)
Brain Monkey is a tests utility for PHP.
It provides **two set of helpers**:
* the first are framework-agnostic tools that allow to mock \(or _monkey patch_\) and to test behavior of any **PHP function**
* the second are **specific to WordPress** and make unit testing of WordPress extensions a no-brainer.
## Requirements
* PHP 5.6+
* [Composer](https://getcomposer.org/) to install
Via Composer following packages are required:
* [mockery/mockery](https://packagist.org/packages/mockery/mockery) version 1 \(BSD-3-Clause\)
* [antecedent/patchwork](https://packagist.org/packages/antecedent/patchwork) version 2 \(MIT\)
When installed for development, following packages are also required:
* [phpunit/phpunit](https://packagist.org/packages/phpunit/phpunit) version 5.7 \(BSD-3-Clause\)
## License
Brain Monkey is open source and released under MIT license. See LICENSE file for more info.
## Question? Issues?
Brain Monkey is hosted on GitHub. Feel free to open issues there for suggestions, questions and real issues.
## Who's Behind
I'm Giuseppe, I deal with PHP since 2005. For questions, rants or chat ping me on Twitter \([@gmazzap](https://twitter.com/gmazzap)\) or on ["The Loop"](https://chat.stackexchange.com/rooms/6/the-loop) \(Stack Exchange\) chat.
Well, it's possible I'll ignore rants.

View file

@ -1,76 +0,0 @@
{
"name": "brain/monkey",
"description": "Mocking utility for PHP functions and WordPress plugin API",
"keywords": [
"testing",
"test",
"mockery",
"patchwork",
"mock",
"mock functions",
"runkit",
"redefinition",
"monkey patching",
"interception"
],
"authors": [
{
"name": "Giuseppe Mazzapica",
"email": "giuseppe.mazzapica@gmail.com",
"homepage": "https://gmazzap.me",
"role": "Developer"
}
],
"support": {
"issues": "https://github.com/Brain-WP/BrainMonkey/issues",
"source": "https://github.com/Brain-WP/BrainMonkey"
},
"license": "MIT",
"require": {
"php": ">=5.6.0",
"mockery/mockery": "^1.3.5 || ^1.4.4",
"antecedent/patchwork": "^2.1.17"
},
"require-dev": {
"phpunit/phpunit": "^5.7.26 || ^6.0 || ^7.0 || >=8.0 <8.5.12 || ^8.5.14 || ^9.0",
"phpcompatibility/php-compatibility": "^9.3.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1"
},
"autoload": {
"psr-4": {
"Brain\\Monkey\\": "src/"
},
"files": [
"inc/api.php"
]
},
"autoload-dev": {
"files": [
"vendor/antecedent/patchwork/Patchwork.php"
],
"psr-4": {
"Brain\\Monkey\\Tests\\": "tests/src/",
"Brain\\Monkey\\Tests\\Unit\\": "tests/cases/unit/",
"Brain\\Monkey\\Tests\\Functional\\": "tests/cases/functional/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"optimize-autoloader": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"extra": {
"branch-alias": {
"dev-version/1": "1.x-dev",
"dev-master": "2.x-dev"
}
},
"scripts" : {
"phpcompat": [
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -ps . --standard=PHPCompatibility --ignore=*/vendor/* --extensions=php --basepath=./ --runtime-set testVersion 5.6-"
]
}
}

View file

@ -1,181 +0,0 @@
# Bulk patching with `stubs()`
`when()` and its related functions are quite simple and straightforward.
However, it can be quite verbose when multiple functions needs to be patched.
For this reason, version 2.1 introduced a new API function to define multiple functions in bulk: `stubs()`
### `stubs()`
`Functions\stubs()` accepts an array of functions to be defined.
The first way to use it is to pass function names as array item _keys_ and the wanted return values as array _values_:
```php
Functions\stubs(
[
'is_user_logged_in' => true,
'current_user_can' => false,
]
);
```
There are two special cases:
* when the array item value is a `callable`, the function given as array item key is _aliased_ to the given callback instead of returning the callback itself;
* when the array item value is `null`, the function given as array item key will return the first argument received, just like `when( $function_name )->justReturnArg()` was used for it
```php
Functions\stubs(
[
'is_user_logged_in' => true, // will return `true` as provided
'wp_get_current_user' => function () { // will return the WP_User mock
return \Mockery::mock(\WP_User::class);
},
'__' => null, // will return the 1st argument received
]
);
```
Another way to use `stubs`, useful to stub many function with same return value, is to pass to a non-associative array of function names as first argument, and the wanted return value for all of them as second argument.
For example, the snippet below will create a stub that returns `true` for all the given functions:
```php
Functions\stubs(
[
'is_user_logged_in',
'current_user_can',
'is_multisite',
'is_admin',
],
true
);
```
Please note that the default value for the second argument, being it optional, is `null`, and because using `null` as value means _"return first received argument"_ it is possible to stub many functions that have to return first received argument, by passing their names as first argument to `stubs()` \(and no second argument\), like this:
```php
Functions\stubs(
[
'esc_attr',
'esc_html',
'__',
'_x',
'esc_attr__',
'esc_html__',
]
);
```
\(Even if there's a simpler way to stub escaping and translation WP functions, more on this below\).
It worth noting that the two ways of using `stubs()` can be mixed together, for example like this:
```php
Functions\stubs(
[
// will both return 1st argument received, because `stubs` 2nd param defaults to `null`
'esc_attr',
'esc_html',
// will all return what is given as array item value
'is_user_logged_in' => true,
'current_user_can' => false,
'get_current_user_id' => 1,
]
);
```
### Pre-defined stubs for escaping functions
To stub WordPress escaping functions is a very common usage for `Functions\stubs`.
This is why, since version 2.3, Brain Monkey introduced a new API function:
* **`Functions\stubEscapeFunctions()`**
When called, it will create a stub for each of the following functions:
* `esc_js()`
* `esc_sql()`
* `esc_attr()`
* `esc_html()`
* `esc_textarea()`
* `esc_url()`
* `esc_url_raw()`
* `esc_xml()` \(since 2.6\)
By calling `Functions\stubEscapeFunctions()`, for _all_ of the functions listed above a stub will be created that will do some very basic escaping on the received first argument before returning it.
It will _not_ be the exact same escape mechanism that WordPress would apply, but "similar enough" for unit tests purpose and could still be helpful to discover some bugs.
### Pre-defined stubs for translation functions
Another common usage for `Functions\stubs`, since its introduction, has been to stub translation functions.
Since version 2.3, this has became much easier thanks to the introduction of a new API function:
* **`Functions\stubTranslationFunctions()`**
When called, it will create a stub for _all_ the following functions:
* `__()`
* `_e()`
* `_ex()`
* `_x()`
* `_n()` \(since 2.6\)
* `_nx()` \(since 2.6\)
* `translate()`
* `esc_html__()`
* `esc_html_x()`
* `esc_attr__()`
* `esc_attr_x()`
* `esc_html_e()`
* `esc_attr_e()`
* `_n_noop()` \(since 2.7\)
* `_nx_noop()` \(since 2.7\)
* `translate_nooped_plural()` \(since 2.7\)
The created stub will not attempt any translation, but will return \(or echo\) the first received argument.
Only for functions that both translate and escape \(`esc_html__()`, `esc_html_x()`...\) the same escaping mechanism used by the pre-defined escaping functions stubs \(see above\) is applied before returning first received argument.
Please note how `Functions\stubTranslationFunctions()` creates stubs for functions that _echo_ translated text, something not easily doable with `Functions\stubs()` alone.
### Gotcha for `Functions\stubs`
#### Functions that returns null
When using `stubs()`, passing `null` as the "value" of the function to stub, the return value of the stub will **not** be `null`, but the first received value.
To use `stubs()` to stub functions that return `null` it is possible to do something like this:
```php
Functions\stubs( [ 'function_that_returns_null' => '__return_null' ] );
```
It works because `__return_null` is a WP function that Brain Monkey also defines since version 2.0.
#### Functions that returns callbacks
When using `stubs`, passing a `callable` as the "value" of the function to stub, the created stub will be an _alias_ of the given callable, will **not** return it.
If one want to use `stubs` to stub a function that returns a callable, a way to do it would be something like this:
```php
Functions\stubs(
[
'function_that_returns_a_callback' => function() {
return 'the_expected_returned_callback';
}
]
);
```
but it is probably simpler to use the "usual" `when` + `justReturn`:
```php
when('function_that_returns_a_callback')->justReturn('the_expected_returned_callback')
```

View file

@ -1,133 +0,0 @@
# Testing functions with expect\(\)
Often, in tests, what we need is not only to enforce a function returned value \(what `Functions\when()` allows to do\), but to test function behavior based on **expectations**.
Mockery has a very powerful, and human readable Domain Specific Language \(DSL\) that allows to set expectations on how object methods should behave, e.g. validate arguments they should receive, how many times they are called, and so on.
Brain Monkey brings that power to function testing. The entry-point is the `Functions\expect()` function.
It receives a function name and returns a Mockery expectation object with all its power.
Below there are just several examples, for the full story about Mockery expectations see its [documentation](http://docs.mockery.io/en/latest/reference/index.html).
Only note that in functions testing the `shouldReceive` Mockery method makes **no sense**, so don't use it \(an exception will be thrown if you do that\).
## Expectations on times a function is called
```php
Functions\expect('paganini')->once();
Functions\expect('tween')->twice();
Functions\expect('who_knows')->zeroOrMoreTimes();
Functions\expect('i_should_run')->atLeast()->once();
Functions\expect('i_have_a_max')->atMost()->twice();
Functions\expect('poor_me')->never();
Functions\expect('pretty_precise')->times(3);
Functions\expect('i_have_max_and_min')->between(2, 4);
```
There is no need to explain how it works: Mockery DSL reads like plain English.
Of course, expectation on the times a function should run can be combined with arguments expectation.
## Expectations on received arguments
Below a few examples, for the full story see [Mockery docs](http://docs.mockery.io/en/latest/reference/argument_validation.html).
```php
// allow anything
Functions\expect('function_name')
->once()
->withAnyArgs();
// allow nothing
Functions\expect('function_name')
->once()
->withNoArgs();
// validate specific arguments
Functions\expect('function_name')
->once()
->with('arg_1', 'arg2');
// validate specific argument types
Functions\expect('function_name')
->times(3)
->with(Mockery::type('resource'), Mockery::type('int'));
// validate anything in specific places
Functions\expect('function_name')
->zeroOrMoreTimes()
->with(Mockery::any());
// validate a set of given arguments
Functions::expect('function_name')
->once()
->with(Mockery::anyOf('a', 'b', 'c'));
// regex validation
Functions\expect('function_name')
->once()
->with('/^foo/');
// excluding specific values
Functions\expect('function_name')
->once()
->with(Mockery::not(2, 3));
// dealing with array arguments
Functions\expect('function_name')
->once()
->with(Mockery::hasKey('foo'), Mockery::contains('bar', 'baz'));
```
## Forcing behavior
Excluding `shouldReceive`, all the Mockery expectation methods can be used with Brain Monkey, including `andReturn` or `andReturnUsing` used to enforce a function to return specific values during tests.
In fact, `Functions\when()` do same thing for simple cases when no expectations are required.
Again, just a few examples:
```php
// return a specific value
Functions\expect('function_name')
->once()
->with('foo', 'bar')
->andReturn('Baz!');
// return values in order
Functions\expect('function_name')
->twice()
->andReturn('First time I run', 'Second time I run');
// return values in order, alternative
Functions\expect('function_name')
->twice()
->andReturnValues(['First time I run', 'Second time I run']);
// return noting
Functions::expect('function_name')
->twice()
->andReturnNull();
// use a callback for returning a value
Functions\expect('function_name')
->atLeast()
->once()
->andReturnUsing(function() {
return 'I am an alias!';
});
// makes function throws an Exception (e.g. to test try statements)
Functions\expect('function_name')
->once()
->andThrow('RuntimeException'); // Both exception names and object are supported
```

View file

@ -1,79 +0,0 @@
# Setup for functions testing
## Testing framework agnostic
Brain Monkey can be used with any testing framework.
Examples in this page will use PHPUnit, but the concepts are applicable at any testing framework.
## Warning
Brain Monkey uses [Patchwork](http://patchwork2.org/) to redefine functions.
Brain Monkey 2.\* requires Patchwork 2 which allows to re-define both userland and core functions, with some [limitations](http://patchwork2.org/limitations/).
The main limitations that affects Brain Monkey are \(from Patchwork website\):
* _Patchwork will fail on every attempt to redefine an internal function that is missing from the redefinable-internals array of your `patchwork.json`._
* _Make sure that Patchwork is imported as early as possible, since any files imported earlier, including the one from which the importing takes place, will be missed by Patchwork's code preprocessor._
## Setup tests
After Brain Monkey is part of the project \(see _Getting Started / Installation_\), to be able to use its features two simple steps are needed before being able to use Brain Monkey in tests:
1. be sure to require Composer autoload file _before_ running tests \(e.g. PHPUnit users will probably require it in their bootstrap file\).
2. call the function `Brain\Monkey\tearDown()` after any test
### PHPUnit example
Let's take PHPUnit as example, the average test case class that uses Brain Monkey would be something like:
```php
use PHPUnit_Framework_TestCase;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Brain\Monkey;
class MyTestCase extends PHPUnit_Framework_TestCase
{
// Adds Mockery expectations to the PHPUnit assertions count.
use MockeryPHPUnitIntegration;
protected function tearDown()
{
Monkey\tearDown();
parent::tearDown();
}
}
```
After that for all test classes can extend this class instead of directly extending `PHPUnit_Framework_TestCase`.
That's all. Again, I used PHPUnit for the example, but any testing framework can be used.
For function mocking and testing there are two entry-point functions:
* **`Functions\when()`**
* **`Functions\expect()`**
See dedicated documentation pages.
## Namespaced functions
All the code examples in this documentation make use of functions in global namespace.
However, note that namespaced functions are supported as well, just be sure to pass the fully qualified name of the functions:
```php
Functions\expect('a_global_function');
Functions\expect('My\\App\\awesome_function');
```
## Note for WordPressers
Anything said in this page is fine for WordPress functions too, they are PHP functions, after all.
However, Brain Monkey has specific features for WordPress, and there is a way to setup tests for **all** Brain Monkey features \(WordPress-specific and not\).
**If you want to use Brain Monkey to test code wrote for WordPress, it is preferable to use the setup explained in the** _**"WordPress / Setup"**_ **section that** _**includes**_ **the setup needed to use Brain Monkey tools for functions.**

View file

@ -1,96 +0,0 @@
# Patching functions with when\(\)
The first way Brain Monkey offers to monkey patch a function is `Functions\when()`.
This function has to be used to **set a behavior** for functions.
`when()` and 5 related methods are used to define functions \(if not defined yet\) and:
* make them return a specific value
* make them return one of the received arguments
* make them echo a specific value
* make them echo one of the received arguments
* make them behave just like another callback
For the sake of readability, in all the code samples below I'll assume that an `use` statement is in place:
```php
use Brain\Monkey\Functions;
```
Don't forget to add it in your code as well, or use the fully qualified class name.
Also be sure to read the _PHP Functions / Setup_ section that explain how setup Brain Monkey for usage in tests.
## `justReturn()`
By using `when()` in combination with `justReturn()` you can make a \(maybe\) undefined function _just return_ a given value:
```php
Functions\when('a_undefined_function')->justReturn('Cool!');
echo a_undefined_function(); // echoes "Cool!"
```
Without passing a value to `justReturn()` the target function will return nothing \(`null`\).
## `returnArg()`
This other `when`-related method is used to make the target function return one of the received arguments, by default the first.
```php
Functions\when('give_me_the_first')->returnArg(); // is the same of ->returnArg(1)
Functions\when('i_want_the_second')->returnArg(2);
Functions\when('and_the_third_for_me')->returnArg(3);
echo give_me_the_first('A', 'B', 'C'); // echoes "A"
echo i_want_the_second('A', 'B', 'C'); // echoes "B"
echo and_the_third_for_me('A', 'B', 'C'); // echoes "C"
```
Note that if the target function does not receive the desired argument, `returnArg()` throws an exception:
```php
Functions\when('needs_the_third')->returnArg(3);
// throws an exception because required 3rd argument, but received 2
echo needs_the_third('A', 'B');
```
## `justEcho()`
Similar to `justReturn()`, it makes the mocked function echo some value instead of returning it.
```php
Functions\when('a_undefined_function')->justEcho('Cool!');
a_undefined_function(); // echoes "Cool!"
```
## `echoArg()`
Similar to `returnArg()`, it makes the mocked function echo some received argument instead of returning it.
```php
Functions\when('echo_the_first')->echoArg(); // is the same of ->echoArg(1)
Functions\when('echo_the_second')->echoArg(2);
echo_the_first('A', 'B', 'C'); // echoes "A"
echo_the_second('A', 'B', 'C'); // echoes "B"
```
## `alias()`
The last of the when-related methods allows to make a function behave just like another callback. The replacing function can be anything that can be run: a core function or a custom one, a class method, a closure...
```php
Functions\when('duplicate')->alias(function($value) {
return "Was ".$value.", now is ".($value * 2);
});
Functions\when('bigger')->alias('strtoupper');
echo duplicate(1); // echoes "Was 1, now is 2"
echo bigger('was lower'); // echoes "WAS LOWER"
```

View file

@ -1,44 +0,0 @@
# Installation
To install Brain Monkey you need:
* PHP 5.6+
* [Composer](https://getcomposer.org)
Brain Monkey is available on Packagist, so the only thing you need to do is to add it as a dependency for your project.
That can be done by running following command in your project folder:
```text
composer require brain/monkey:2.* --dev
```
As alternative you can directly edit your `composer.json` by adding:
```javascript
{
"require-dev": {
"brain/monkey": "~2.0.0"
}
}
```
I've used `require-dev` because, being a testing tool, Brain Monkey should **not** be included in production.
Brain Monkey can work with any testing framework, so it doesn't require any of them.
To run your tests you'll probably need to require a testing framework too, e.g. [PHPUnit](https://phpunit.de/) or [phpspec](https://www.phpspec.net/en/latest/).
## Dependencies
Brain Monkey needs 2 libraries to work:
* [Mockery](http://docs.mockery.io/en/latest/) \(BSD-3-Clause\)
* [Patchwork](http://patchwork2.org/) \(MIT\)
They will be installed for you by Composer.
When installed in development mode \(to test itself\), Brain Monkey also requires:
* [PHPUnit](https://phpunit.de/) \(MIT\)

View file

@ -1,367 +0,0 @@
# Migration from v1
## \[Updated\] Patchwork Version
Patchwork has been updated to version 2. This new version allows to redefine PHP core functions and not only custom defined functions. \(There are limitations, see [http://patchwork2.org/limitations/](http://patchwork2.org/limitations/)\).
This new Patchwork version seems to also fix an annoying issue with undesired Patchwork cache.
## \[Changed\] Setup Functions - BREAKING!
On version 1 of Brain Monkey there where 4 static methods dedicated to setup:
* `Brain\Monkey::setUp()` -&gt; before each test that use only functions redefinition \(no WP features\)
* `Brain\Monkey::tearDown()` -&gt; after each test that use only functions redefinition \(no WP features\)
* `Brain\Monkey::setUpWp()` -&gt; before each test that use functions redefinition and WP features
* `Brain\Monkey::tearDownWp()` -&gt; after each test that use functions redefinition and WP features
This has been simplified, in fact, **only two setup functions exists in Brain Monkey v2**:
* `Brain\Monkey\setUp()` -&gt; before each test that use functions redefinition and WP features
* `Brain\Monkey\tearDown()` -&gt; after each test, no matter if for functions redefinition or for also
WP features
Which means that for function redefinitions, only `Brain\Monkey\tearDown()` have to be called after each test, and nothing _before_ each test.
To also use WP features, `Brain\Monkey\setUp()` have also to called before each test.
## \[Changed\] New API - BREAKING!
Big part of Brain Monkey is acting as a "bridge" between Mockery an Patchwork, that is, make Mockery DSL for expectations available for functions and WordPress hooks.
To access the Mockery API, Brain Monkey v1 provided two different methods:
1. using static methods on the `Brain\Monkey` class
2. using static methods on one of the three feature-specific classes `Brain\Monkey\Functions`,
`Brain\Monkey\WP\Actions` or `Brain\Monkey\WP\Filters`
For example:
```php
// Brain Monkey v1 method one
Brain\Monkey::functions::expect('some_function');
Brain\Monkey::actions()->expectAdded('init');
Brain\Monkey::filters()->expectApplied('the_title');
// Brain Monkey v1 method two
Brain\Monkey\Functions::expect('some_function');
Brain\Monkey\WP\Actions::expectAdded('init');
Brain\Monkey\WP\Filters::expectApplied('the_title');
```
In Brain Monkey v2 there's only one method, that makes use of **functions**:
```php
// Brain Monkey v2
Brain\Monkey\Functions\expect('some_function');
Brain\Monkey\Actions\expectAdded('init');
Brain\Monkey\Filters\expectApplied('the_title');
```
### Renamed method for done actions
For WordPress filters, there were in Brain Monkey v1 two methods:
* `Filters::expectAdded()`
* `Filters::expectApplied()`
named after the WordPress functions `add_filter()` / `apply_filters()`
But for actions there were:
* `Actions::expectAdded()`
* `Actions::expectFired()`
`expectAdded()` pairs with `add_action()`, but `expectFired()` does not really pair with `do_action()`: this is why in Brain Monkey v2 **the method `expectFired()` has been replaced by the function `expectDone()`**.
So, in version 2 there are total of 5 entry-point **functions** to Mockery API:
* `Brain\Monkey\Functions\expect()`
* `Brain\Monkey\Actions\expectAdded()`
* `Brain\Monkey\Actions\expectDone()`
* `Brain\Monkey\Filters\expectAdded()`
* `Brain\Monkey\Filters\expectApplied()`
## \[Changed\] Default Expectations Behavior - BREAKING!
In Brain Monkey v1, expectation on the "times" an expected event happen was required.
```php
class MyClass {
public function doSomething() {
return true;
}
}
class MyClassTest extends MyTestCase {
// this test passes in Brain Monkey v1
public function testSomething() {
\Brain\Monkey\WP\Actions::expectAdded('init'); // this has pretty much no effect
$class = new MyClass();
self::assertTrue($class->doSomething());
}
}
```
This **test passed in Brain Monkey v1**, because even if `Actions::expectAdded()` was used, the test does not fail unless something like `Actions::expectAdded('init')->once()` was used, which made the test pass only if `add_action( 'init' )` was called once.
The reason is that Mockery default behavior is to add a `->zeroOrMoreTimes()` as expectation on number of times a method is called, so when the expectation is called _zero times_, that's a valid outcome.
This was somehow confusing \(because reading `expectAdded` one could _expect_ the test to fail if that thing did not happened\), and also made tests unnecessarily verbose.
**Brain Monkey v2, set Mockery expectation default to `->atLeast()->once()`** so, for example, the test above fails in Brain Monkey v2 if `MyClass::doSomething()` does not call `add_action('init')` at least once.
## \[Changed\] Closure String Representation - BREAKING!
Brain Monkey allows to do some basic tests using `has_action()` / `has_filter()`, functions, to test if some portion of code have added some hooks.
A "special" syntax, was already added in Brain Monkey v1 to permit the checking for hooks added using object instances as part of the hook callback, without having any reference to those objects.
For example, assuming a function like:
```php
namespace A\Name\Space;
function test() {
add_action('example_one', [new SomeClass(), 'aMethod']);
add_action('example_two', function(array $foo) { /* ... */ });
}
```
could be tested with in Brain Monkey v1 with:
```php
// Brain Monkey v1:
test();
self::assertNotFalse(has_action('example_one', 'A\Name\Space\SomeClass->aMethod()')); // pass
self::assertNotFalse(has_action('example_two', 'function()')); // pass
```
The syntax for string representation of callbacks including objects is unchanged in Brain Monkey v2, however, **the syntax for closures string representation has been changed to allow more fine grained control**.
In fact, in Brain Monkey v1 _all_ the closures were represented as the string `"function()"`, in Brain Monkey v2 closure string representations also contain the parameters used in the closure signature:
```php
// Brain Monkey v2:
test();
self::assertNotFalse(has_action('example_one', 'A\Name\Space\SomeClass->aMethod()')); // pass
self::assertNotFalse(has_action('example_two', 'function()')); // fail!
self::assertNotFalse(has_action('example_two', 'function(array $foo)')); // pass!
```
The closure string representation _does_ take into account:
* name of the parameters
* parameters type hints \(works with PHP 7+ scalar type hints\)
* variadic arguments
* `static` closures VS normal closures
_does not_ take into account:
* PHP 7 return type declaration
* parameters defaults
* content of the closure
For example:
```php
namespace A\Name\Space;
$closure_1 = static function( array $foo, SomeClass $bar, int ...$ids ) : bool { /* */ }
$closure_2 = function( array $foo, SomeClass $bar, array $ids = [] ) : bool { /* */ }
// $closure_1 is represented as:
"static function ( array $foo, A\Name\Space\SomeClass $bar, int ...$ids )";
// $closure_2 is represented as:
"function ( array $foo, A\Name\Space\SomeClass $bar, array $ids )";
```
Note how type-hints using classes always have fully qualified names in string representation.
## \[Changed\] Relaxed `callable` check
In Brain Monkey v1 methods and functions that accept a `callable` like, for example, second argument to `add_action()` / `add_filter()`, checked the received argument to be an actual callable PHP entity, using `is_callable`:
```php
// this fail in Brain Monkey v1 if `SomeClass` was not available
// or if SomeClass::aMethod would not be a valid method
add_action( 'foo', [ SomeClass::class, 'aMethod' ] );
// this fail in Brain Monkey v1 if `Some\Name\Space\aFunction` is not available
add_action( 'bar', 'Some\Name\Space\aFunction' );
```
For these reasons, it was often required to create a mock for unavailable classes or functions just to don't make Brain Monkey throw an exception, even if the mock was not used and not relevant for the test.
Brain Monkey v2 is less strict on checking for `callable` and it accepts anything that _looks like_ a callable.
Something like `[SomeClass::class, 'aMethod']` would be accepted even if `SomeClass` is not loaded at all, because _it looks like_ a callable. Same goes for `'Some\Name\Space\aFunction'`.
However, something like `[SomeClass::class, 'a-Method']` or `[SomeClass::class, 'aMethod', 1]` or even `Some\Name\Space\a Function` will throw an exception because method and function names can't contain hyphens or spaces and when a callback is made of an array, it must have exactly two arguments.
This more "relaxed" check allows to save creation of mocks that are not necessary for the logic of the test.
It worth noting that when doing something like `[SomeClass::class, 'aMethod']` **if** the class `SomeClass` is available, Brain Monkey checks it to have an accessible method named `aMethod`, and raise an exception if not, but will not do any check if the class is not available.
The same applies when object instances are used for callbacks, for example, using as callback argument `[$someObject, 'aMethod']`, the instance of `$someObject` is checked to have an accessible method named `aMethod`.
## \[Fixed\] `apply_filters` Default Behavior
The WordPress function `apply_filters()` is defined by Brain Monkey and it returns the first argument passed to it, just like WordPress:
```php
self::assertSame('Foo', apply_filters('a_filter', 'Foo', 'Bar')); // pass!
```
In Brain Monkey v1 this was true _unless_ some expectation was added to the applied filter:
```php
Brain\Monkey\WP\Filters::expectApplied('a_filter');
self::assertSame('Foo', apply_filters('a_filter', 'Foo', 'Bar')); // fails in v1
```
**The test above fails in Brain Monkey v1**. The reason is that even if the expectation in first line is validated, it breaks the default `apply_filters` behavior, requiring the return value to be added to expectation to make the test pass again.
For example, the following test used to pass in Brain Monkey v1:
```php
Brain\Monkey\WP\Filters::expectApplied('a_filter')->andReturn('Foo');
self::assertSame('Foo', apply_filters('a_filter', 'Foo', 'Bar')); // pass
```
**In Brain Monkey v2 this is not necessary anymore.**
Calling `expectApplied` on applied filters does **not** break the default behavior of `apply_filters` behavior, if no return expectations are added.
The following test **passes in Brain Monkey v2**:
```php
Brain\Monkey\Filters\expectApplied('a_filter')->once()->with('Foo', 'Bar');
self::assertSame('Foo', apply_filters('a_filter', 'Foo', 'Bar')); // pass in v2!
```
Please note that if any return expectation is added for a filter, return expectations must be added for all the set of arguments the filter might receive.
For example:
```php
Brain\Monkey\Filters\expectApplied('a_filter')->once()->with('Foo')->andReturn('Foo!');
Brain\Monkey\Filters\expectApplied('a_filter')->once()->with('Bar');
self::assertSame('Foo!', apply_filters('a_filter', 'Foo')); // pass
self::assertSame('Bar', apply_filters('a_filter', 'Bar')); // fail!
```
The second assertion fails because since we added a return expectation for the filter "'a_filter'" we need to add return expectation for \_all_ the possible arguments.
This task is easier in Brain Monkey v2 thanks to the introduction of `andReturnFirstArg()` expectation method \(more on this below\).
For example:
```php
Brain\Monkey\Filters\expectApplied('a_filter')->once()->with('Foo')->andReturn('Foo!');
Brain\Monkey\Filters\expectApplied('a_filter')->zeroOrMoreTimes()->withAnyArgs()->andReturnFirstArg();
self::assertSame('Foo', apply_filters('a_filter', 'Foo', 'Bar')); // pass
self::assertSame('Bar', apply_filters('a_filter', 'Bar')); // pass!
```
`andReturnFirstArg()` used in combination with Mockery methods `zeroOrMoreTimes()->withAnyArgs()` allows to create a "catch all" behavior for filters when a return expectation has been added, without having to create specific expectations for each of the possible arguments a filter might receive.
Of course, adding specific expectations for each of the possible arguments a filter might receive is still possible.
## \[Added\] Utility Functions Stubs
There are WordPress functions that are often used in WordPress plugins or themes that are pretty much _logicless_, but still they need to be mocked in tests if WordPress is not available.
Brain Monkey v2 now ships stubs for those functions, so it is not necessary to mock them anymore, they are:
* `__return_true`
* `__return_false`
* `__return_null`
* `__return_empty_array`
* `__return_empty_string`
* `__return_zero`
* `trailingslashit`
* `untrailingslashit`
Those functions do exactly what they are expected to do, even if WordPress is not loaded: some functions mocking is now saved.
Of course, their behavior can still be mocked, e.g. to make a test fail on purpose.
## \[Added\] Support for `doing_action()` and `doing_filter()`
When adding expectation on returning value of filters, or when using `whenHappen` to respond to actions, inside the expectation callback, the function `current_filter()` in Brain Monkey v1 used to correctly resolve to the action / filter being executed.
The functions `doing_action()` and `doing_filter()` didn't work: they were not provided at all with Brain Monkey v1 and required to be mocked "manually" .
In Brain Monkey v2 those two functions are provided as well, and correctly return true or false when used inside the callbacks used to respond to hooks.
## \[Added\] Method `andReturnFirstArg()`
When adding expectations on returning value of applied filters or functions, it is now possible to use `andReturnFirstArg()` to make the Mockery expectations return first argument received.
```php
// Brain\Monkey v2:
Brain\Monkey\Functions\expect('foo')->andReturnFirstArg();
Brain\Monkey\Filters\expectApplied('the_title')->andReturnFirstArg();
// Brain\Monkey v1:
Brain\Monkey\Functions\expect('foo')->andReturnUsing(function($arg) {
return $arg;
});
Brain\Monkey\Filters\expectApplied('the_title')->andReturnUsing(function($arg) {
return $arg;
});
```
## \[Added\] Method `andAlsoExpectIt()`
In Mockery, when creating expectations for multiple methods of same class, the method `getMock()` allows to do it without leaving "fluent interface chain", for example:
```php
Mockery\mock(SomeClass::class)
->shouldReceive('exclamation')->with('Foo')->once()->andReturn('Foo!')
->getMock()
->shouldReceive('question')->with('Bar')->once()->andReturn('Bar?')
->getMock()
->shouldReceive('invert')->with('Baz')->once()->andReturn('zaB')
```
The method `getMock()` is **not** available for Brain Monkey expectations.
For this reason has been introduced `andAlsoExpectIt()`:
```php
Brain\Monkey\Filters\expectApplied('some_filter')
->once()->with('Hello')->andReturn('Hello!')
->andAlsoExpectIt()
->atLeast()->twice()->with('Hi')->andReturn('Hi!')
->andAlsoExpectIt()
->zeroOrMoreTimes()->withAnyArgs()->andReturnFirstArg();
```
Of course, it also works in other kind of expectations, like for functions or for actions added or done.
## \[Added\] New Exceptions Classes
In Brain Monkey v1, when exceptions were thrown, PHP core exception classes were used, like `\RuntimeException` or `\InvalidArgumentException`, and so on.
In Brain Monkey v2, different custom exceptions classes have been added, to make very easy to catch any error thrown by Brain Monkey.
Now, in fact, every exception thrown by Brain Monkey is of a custom type, and there's a hierarchy of exceptions classes for a total of 16 exception classes, all inheriting \(one or more levels deep\) the "base" exception class that is `Brain\Monkey\Exception`.

View file

@ -1,27 +0,0 @@
# Table of contents
* [Introduction](what-and-why.md)
## General
* [Installation](general/installation.md)
## Functions testing tools
* [Setup for functions testing](functions-testing-tools/functions-setup.md)
* [Patching functions with when\(\)](functions-testing-tools/functions-when.md)
* [Bulk patching with stubs\(\)](functions-testing-tools/function-stubs.md)
* [Testing functions with expect\(\)](functions-testing-tools/functions-expect.md)
## WordPress-specific tools
* [Why bother](wordpress-specific-tools/wordpress-why-bother.md)
* [WordPress testing tools](wordpress-specific-tools/wordpress-tools.md)
* [Setup for WordPress testing](wordpress-specific-tools/wordpress-setup.md)
* [Test added hooks](wordpress-specific-tools/wordpress-hooks-added.md)
* [Test done hooks](wordpress-specific-tools/wordpress-hooks-done.md)
## More
* [Migration from v1](more/migrating-from-v1.md)

View file

@ -1,52 +0,0 @@
# Introduction
## What's Brain Monkey
Brain Monkey is a unit test utility for PHP.
It comes with 2 group of features:
* the first allow **mocking and testing any PHP function**. This part is a general tool and two times framework agnostic: can be used to test code that uses any frameworks \(or no framework\) and in combination with any testing framework.
* the second group of features can be used with any testing framework as well, but is **specific to test WordPress code**.
Who is interested in the first part can use only it, just like this second group of features does not exists.
## Why Brain Monkey
When unit tests are done in the right way, the SUT \(System Under Test\) must be tested in **isolation**.
Long story short, it means that any _external_ code used in the SUT must be assumed as perfectly working.
This is a key concept in unit tests.
In PHP, to create "mock" and "stubs" for objects is a pretty easy task, framework like [PHPUnit](https://phpunit.de/manual/current/en/test-doubles.html) or [phpspec](https://www.phpspec.net/en/latest/manual/prophet-objects.html) have embedded features to do that, and libraries like [Mockery](https://github.com/padraic/mockery) make it even easier.
But when _external_ code make use of **functions** things become harder, because PHP testing framework can't mock or monkey patch functions.
This is where Brain Monkey comes into play: its aim is to bring that easiness to function testing.
This involves:
* define functions if not defined
* allow to enforce function behavior
* allow to set expectations on function execution
Moreover, I have to admit that I coded Brain Monkey to test WordPress code \(that makes a large use of global functions\).
This is the reason why Brain Monkey comes with a set of WordPress-specific tools, but the ability to monkey patch and test functions is independent from WordPress-specific tools and can be used to test any PHP code.
### Under the hood
Brain Monkey gets all its power from two great libraries: [**Mockery**](http://docs.mockery.io/) and [**Patchwork**](http://patchwork2.org/).
What actually Brain Monkey does is to connect the _function redefinition_ feature of Patchwork with the powerful testing mechanism and DSL provided by Mockery, and thanks to that Brain Monkey has:
* PHPUnit, PHPSpec or any other testing framework compatibility
* powerful and succinct API with human readable syntax
All the rest is joy.
### PHP versions compatibility
Currently, Brain Monkey supports PHP 5.6+.

View file

@ -1,271 +0,0 @@
# Test added hooks
With Brain Monkey there are two ways to test some hook have been added, and with which arguments.
First method \(easier\) makes use of WordPress functions, the second \(more powerful\) makes use of Brain Monkey \(Mockery\) expectation DSL.
## Testing framework agnostic
Brain Monkey can be used with any testing framework. Examples in this page will use PHPUnit, but the concepts are applicable to any testing framework.
Also note that test classes in this page extends the class `MyTestCase` that is assumed very similar to the one coded in the _WordPress / Setup_ docs section.
## Testing with WordPress functions: `has_action()` and `has_filter()`
When Brain Monkey is loaded for tests it registers all the functions of WordPress plugin API \(see _WordPress / WordPress Testing Tools_\). Among them there are `has_action()` and `has_filter()` that, just like _real_ WordPress functions can be used to test if some hook \(action or filter\) has been added, and also verify the arguments.
Let's assume the code to be tested is:
```php
namespace Some\Name\Space;
class MyClass {
public function addHooks() {
add_action('init', [__CLASS__, 'init'], 20);
add_filter('the_title', [__CLASS__, 'the_title'], 99);
}
}
```
in Brain Monkey, just like in real WordPress code, you can test hooks are added using WordPress functions:
```php
use Some\Name\Space\MyClass;
class MyClassTest extends MyTestCase {
public function testAddHooksActuallyAddsHooks() {
( new MyClass() )->addHooks();
self::assertNotFalse( has_action('init', [ MyClass::class, 'init' ]) );
self::assertNotFalse( has_filter('the_title', [ MyClass::class, 'the_title' ] ) );
}
}
```
Nice thing of this approach is that you don't need to remember Brain Monkey classes and methods names, you can just use functions you, as a WordPress developer, are already used to use.
There's more.
A problem of WordPress hooks is that when dynamic object methods or anonymous functions are used, identify them is not easy. It's pretty hard, to be honest.
But Brain Monkey is not WordPress, and it makes these sort of things very easy. Let's assume the code to test is:
```php
namespace Some\Name\Space;
class MyClass {
public function init() {
/* ... */
}
public function addHooks() {
add_action('init', [ $this, 'init' ], 20);
}
}
```
Using real WordPress functions, to check hooks added like in code above is pretty hard, because we don't have access to `$this` outside of the class.
But Brain Monkey version of `has_action` and `has_filter` allow to check this cases with a very intuitive syntax:
```php
class MyClassTest extends MyTestCase
{
public function testAddHooksActuallyAddsHooks()
{
$class = new \Some\Name\Space\MyClass\MyClass();
$class->addHooks();
self::assertSame( 20, has_action( 'init', 'Some\Name\Space\MyClass->init()' ) );
}
}
```
So we have identified a dynamic method by using the class name, followed by `->` and the method name followed by parenthesis.
Moreover
* a static method can be identified by the class name followed by `::` and the method name followed by parenthesis, e.g. `'Some\Name\Space\MyClass::init()'`
* an invokable object \(a class with a `__invoke()` method\) can be identified by the class name followed by parenthesis, e.g. `'Some\Name\Space\MyClass()'`
Note that fully qualified names of classes are used and namespace.
### Identify Closures
One tricky thing when working with hooks and closures in WordPress is that they are hard to identify, for example to remove or even to check via `has_action()` / `has_filter()` if a specific closure has been added to an hook.
Brain Monkey makes this a bit easier thanks to a sort of "serialization" of closures: a closure can be identified by a string very similar to the PHP code used to define the closure. Hopefully, an example will make it more clear.
Assuming a code like:
```php
namespace Some\Name\Space;
class MyClass {
public function addHooks() {
add_filter('the_title', function($title) {
return $title;
}, 99);
}
}
```
It could be tested with:
```php
class MyClassTest extends MyTestCase
{
public function testAddHooksActuallyAddsHooks()
{
$class = new \Some\Name\Space\MyClass();
$class->addHooks();
self::assertNotFalse( has_filter('the_title', 'function ($title)' ) );
}
}
```
It also works with type-hints and variadic arguments. E.g. a closure like:
```php
namespace Foo\Bar;
function( array $foo, Baz $baz, Bar ...$bar) {
// ....
}
```
could be identified like this:
```php
'function ( array $foo, Foo\Bar\Baz $baz, Foo\Bar\Bar ...$bar )';
```
Just note how classes used in type-hints were using _relative_ namespace on declaration, always need the fully qualified name in the closure string representation.
PHP 7+ scalar type hints are perfectly supported.
The serialization also recognizes `static` closures. Following closure:
```php
static function( int $foo, Bar ...$bar ) {
// ....
}
```
could be identified like this:
```php
'static function ( int $foo, Bar ...$bar )';
```
Things that are **not** took into account during serialization:
* default values for arguments
* PHP 7+ return type declarations
For example **all** following closures:
```php
function( array $foo, $bar ) {
// ....
}
function( array $foo = [], $bar = null ) {
// ....
}
function( array $foo, $bar ) : array {
// ....
}
function( array $foo, $bar = null ) : array {
// ....
}
```
are serialized into :
```php
'function ( array $foo, $bar )';
```
## Testing with expectations
Even if the doing tests using WordPress native functions is pretty easy, there are cases in which is not enough powerful, or the expectation methods are just more convenient.
Moreover, Brain Monkey functions always try to mimic WordPress real functions behavior and so a call to `remove_action` or `remove_filter` can make impossible to test some code using `has_action` and `has_filter`, because hooks are actually removed.
The solution is to use expectations, provided in Brain Monkey by Mockery.
Assuming the class to test is:
```php
namespace Some\Name\Space;
class MyClass {
public function addHooks() {
add_action('init', [$this, 'init']);
add_filter('the_title', function($title) {
return $title;
}, 99);
}
}
```
it can be tested like so:
```php
use Brain\Monkey\Actions;
use Brain\Monkey\Filters;
class MyClassTest extends MyTestCase
{
function testAddHooksActuallyAddsHooks()
{
Actions\expectAdded('init');
Filters\expectAdded('the_title')->with(\Mockery::type('Closure'));
// let's use the code that have to satisfy our expectations
( new \Some\Name\Space\MyClass() )->addHooks();
}
}
```
This is just an example, but Mockery expectations are a very powerful testing mechanism.
To know more, read [Mockery documentation](http://docs.mockery.io/en/latest/), and have a look to _PHP Functions_ doc section to see how it is used seamlessly in Brain Monkey.
## Just a couple of things...
* expectations must be set _before_ the code to be tested runs: they are called "expectations" for a reason;
* argument validation done using `with()`, validates hook arguments, not function arguments, it means what is passed to `add_action()` or `add_filter()` **excluding** hook name itself.
* If you are errors related to `Call to undefined function add_action()` it could have to do with how you are loading your plugin file in the bootstrap.php file. See [some tips for procedural/OOP setup](https://github.com/Brain-WP/BrainMonkey/issues/90#issuecomment-745148097).
## Don't set expectations on return values for added hooks
Maybe you already know that `add_action()` and `add_filter()` always return `true`.
As already said, Brain Monkey always tries to make WordPress functions behave how they do in real WordPress code, for this reason Brain Monkey version of those functions returns `true` as well.
But if you read _PHP Functions_ doc section or Mockery documentation you probably noticed a `andReturn` method that allows to force an expectation to return a given value.
Once `expectAdded()` method works with Mockery expectations, you may be tempted to use it... if you do that **an exception will be thrown**.
```php
// this expectation will thrown an error!
Filters\expectAdded('the_title')->once()->andReturn(false);
```
Reason is that if Brain Monkey had allowed a _mocked_ returning value for `add_action` and `add_filter` that had been in contrast with real WordPress code, with disastrous effects on tests.

View file

@ -1,305 +0,0 @@
# Test done hooks
## Testing framework agnostic
Brain Monkey can be used with any testing framework. Examples in this page will use PHPUnit, but the concepts are applicable to any testing framework.
Also note that test classes in this page extends the class `MyTestCase` that is assumed very similar to the one coded in the _WordPress / Setup_ docs section.
## Simple tests with `did_action()` and `Filters\applied()`
To check hooks have been fired, the only available WordPress function is `did_action()`, it doesn't exist any `did_filter()` or `applied_filter()`.
To overcome the missing counter part of `did_action()` for filters, Brain Monkey has a method accessible via `Brain\Monkey\Filters\applied()` that does what you might expect.
Assuming a class like the following:
```php
class MyClass {
function fireHooks() {
do_action('my_action', $this);
return apply_filters('my_filter', 'Filter applied', $this);
}
}
```
It can be tested using:
```php
use Brain\Monkey\Filters;
class MyClassTest extends MyTestCase
{
function testFireHooksActuallyFiresHooks()
{
( new MyClass() )->fireHooks();
$this->assertSame( 1, did_action('my_action') );
$this->assertTrue( Filters\applied('my_filter') > 0 );
}
}
```
As you can guess from test code above, `did_action()` and `Filters\applied()` return the number of times an action or a filter has been triggered, just like `did_action()` does in WordPress, but there's no way to use them to check which arguments were passed to the fired hook.
So, `did_action()` and `Filters\applied()` are fine for simple tests, mostly because using them you don't need to recall Brain Monkey methods, but they are not very powerful: arguments checking and, above all, the ability to respond to fired hooks are pivotal tasks to proper test WordPress code.
In Brain Monkey those tasks can be done testing fired hooks with expectations.
## Test fired hooks with expectations
A powerful testing mechanism for fired hooks is provided by Brain Monkey thanks to Mockery expectations.
The entry points to use it are the `Actions\expectDone()` and `Filters\expectApplied()` functions.
As usual, below there a just a couple of examples, for the full story see [Mockery docs](http://docs.mockery.io/en/latest/reference/expectations.html).
Assuming the `MyClass` above in this page, it can be tested with:
```php
use Brain\Monkey\Actions;
use Brain\Monkey\Filters;
class MyClassTest extends MyTestCase
{
function testFireHooksActuallyFiresHooks()
{
Actions\expectDone('my_action')
->once()
->with(Mockery::type(MyClass::class));
Filters\expectApplied('my_filter')
->once()
->with('Filter applied', Mockery::type(MyClass::class));
( new MyClass() )->fireHooks();
}
}
```
## Just a couple of things...
* expectations must be set _before_ the code to be tested runs: they are called "expectations" for a reason
* argument validation done using `with()`, validates hook arguments, not function arguments, it means what is passed to `do_action` or `apply_filters` **excluding** hook name itself
## Respond to filters
Yet again, Brain Monkey, when possible, tries to make WordPress functions it redefines behave in the same way of _real_ WordPress functions.
Brain Monkey `apply_filters` by default returns the first argument passed to it, just like WordPress function does when no callback is added to the filter.
However, sometimes in tests is required that a filter returns something different.
Luckily, Mockery provides `andReturn()` and `andReturnUsing()` expectation methods that can be used to make a filter return anything.
```php
use Brain\Monkey\Filters;
class MyClassTest extends MyTestCase {
function testFireHooksReturnValue() {
Filters\expectApplied('my_filter')
->once()
->with('Filter applied', Mockery::type(MyClass::class))
->andReturn('Brain Monkey rocks!');
$class = new MyClass();
$this->assertSame('Brain Monkey rocks!', $class->fireHooks());
}
}
```
See [Mockery docs](http://docs.mockery.io/en/latest/reference/expectations.html) for more information.
Brain Monkey also provides the helper `andReturnFirstArg()` that can be used to make a filter expectation behave like WordPress does: return first argument received:
```php
Filters\expectApplied('my_filter')->once()->andReturnFirstArg();
self::assertSame( 'foo', apply_filters( 'my_filter', 'foo', 'bar' ) );
```
Note that in the example right above, the expectation would not be necessary; in fact, the assertion verify either way because it is the default behavior of WordPress and Brain Monkey.
But this is very helpful what we want to set expectations and returned values for filters based on some received arguments, for example:
```php
Filters\expectApplied('my_filter')->once()->with('foo')->andReturnFirstArg();
Filters\expectApplied('my_filter')->once()->with('bar')->andReturn('This time bar!');
self::assertSame( 'Foo', apply_filters( 'my_filter', 'Foo' ) );
self::assertSame( 'This time bar!', apply_filters( 'my_filter', 'Bar' ) );
```
Finally note that when setting different expectations for same filter, but for different received arguments, an expectation is required to be set for **all** the arguments that the filter is going to receive. For example this will fail:
```php
Filters\expectApplied('my_filter')->once()->with('foo')->andReturnFirstArg();
Filters\expectApplied('my_filter')->once()->with('bar')->andReturn('This time bar!');
self::assertSame( 'Foo', apply_filters( 'my_filter', 'Foo' ) );
self::assertSame( 'This time bar!', apply_filters( 'my_filter', 'Bar' ) );
self::assertSame( 'Meh!', apply_filters( 'my_filter', 'Meh!' ) );
```
The reason for failing is that there's no expectation set when the filter receives `"Meh!"`.
In such case, `andReturnFirstArg()` comes useful again, to set a "catch all" expectation:
```php
Filters\expectApplied('my_filter')->once()->with('bar')->andReturn('This time bar!');
// Catch all the other cases with the default:
Filters\expectApplied('my_filter')->once()->withAnyargs()->andReturnFirstArg();
// All the following passes!
self::assertSame( 'Foo', apply_filters( 'my_filter', 'Foo' ) );
self::assertSame( 'This time bar!', apply_filters( 'my_filter', 'Bar' ) );
self::assertSame( 'Meh!', apply_filters( 'my_filter', 'Meh!' ) );
```
## Respond to actions
To return a value from a filter is routine, not so for actions.
In fact, `do_action()` always returns `null` so, if Brain Monkey would allow a _mocked_ returning value for `do_action()` expectations, it would be in contrast with real WordPress code, with disastrous effects on tests.
So, don't try to use neither `andReturn()` or `andReturnUsing()` with `Actions\expectDone()` because it will throw an exception.
However, sometimes one may be in the need do _something_ when code calls `do_action()`, like WordPress actually does.
This is the reason Brain Monkey introduces `whenHappen()` method for action expectations. The method takes a callback to be ran when an action is fired.
Let's assume a class like the following:
```php
class MyClass {
public $post;
function setPost() {
global $post;
$this->post = $post;
do_action('my_class_set_post', $this);
return $post;
}
}
```
It is possible write a test like this:
```php
use Brain\Monkey\Actions;
class MyClassTest extends MyTestCase {
function testFireHooksReturnValue() {
Action\expectDone('my_class_set_post')
->with(Mockery::type(MyClass::class))
->whenHappen(function($my_class) {
$my_class->post = (object) ['post_title' => 'Mocked!'];
});
( new MyClass() )->setPost();
$this->assertSame( 'Mocked!', $class->post->post_title );
}
}
```
## Resolving `current_filter()`, `doing_action` and `doing_filter()`
When WordPress is not performing an hook, `current_filter()` returns `false`.
And so does the Brain Monkey version of that function.
Now I want to surprise you: `current_filter()` correctly resolves to the correct hook during the execution of any callback added to respond to hooks.
Let's assume a class like the following:
```php
class MyClass {
function getValues() {
$title = apply_filters('my_class_title', '');
$content = apply_filters('my_class_content', '');
return [$title, $content];
}
}
```
It is possible write a test like this:
```php
use Brain\Monkey\Filters;
class MyClassTest extends MyTestCase
{
function testGetValues()
{
$callback = function() {
return current_filter() === 'my_class_title' ? 'Title' : 'Content';
};
Filters\expectApplied('my_class_title')->once()->andReturnUsing($callback);
Filters\expectApplied('my_class_content')->once()->andReturnUsing($callback);
$class = new MyClass();
$this->assertSame(['Title', 'Content'], $class->getValues());
}
}
```
Like magic, inside our callback, `current_filter()` returns the right hook just like it does in WordPress. Note this will also work with any callback passed to `whenHappen()`.
Surprised? There's more: inside callbacks used to respond to actions and filters, `doing_action()` and `doing_filter()` works as well!
Assuming a class like the following:
```php
class MyClass {
function doStuff() {
do_action( 'trigger_an_hook' );
}
}
```
It is possible to write a test like this:
```php
use Brain\Monkey\Actions;
class MyClassTest extends MyTestCase {
function testDoStuff() {
// 'an_hook' action is done below in the "whenHappen" callback
Actions\expectDone( 'an_hook' )->once()->whenHappen(function() {
self::assertTrue( doing_action('an_hook') );
// doing_action() also resolves the "parent" hook like it was WordPress!
self::assertTrue( doing_action('trigger_an_hook') );
});
Actions\expectDone('trigger_an_hook')->once()->whenHappen(function() {
if( current_filter() === 'trigger_an_hook' ) {
do_action('an_hook');
}
});
}
}
```

View file

@ -1,49 +0,0 @@
# Setup for WordPress testing
## Testing framework agnostic
Brain Monkey can be used with any testing framework. Examples in this page will use PHPUnit, but the concepts are applicable to any testing framework.
## Warning
The procedure below **includes** the setup needed for testing PHP functions, so there is **no** need to apply what said here and _additionally_ what said in the section _PHP Functions / Setup_: steps below are enough to use all Brain Monkey features, including functions utilities.
## Setup tests
After Brain Monkey is part of the project \(see _Getting Started / Installation_\), to be able to use its features you need to **require vendor autoload file** before running tests \(e.g. PHPUnit users will probably require it in their bootstrap file\).
After that, you need to call a function _before_ any test, and another _after_ any test.
These two functions are:
* `Brain\Monkey\setUp()` has to be run before any test
* `Brain\Monkey\tearDown()` has to be run after any test
PHPUnit users will probably want to add these methods to a custom test case class:
```php
use PHPUnit_Framework_TestCase;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use Brain\Monkey;
class MyTestCase extends PHPUnit_Framework_TestCase {
// Adds Mockery expectations to the PHPUnit assertions count.
use MockeryPHPUnitIntegration;
protected function setUp() {
parent::setUp();
Monkey\setUp();
}
protected function tearDown() {
Monkey\tearDown();
parent::tearDown();
}
}
```
and then extend various test classes from it instead of directly extend `PHPUnit_Framework_TestCase`.
That's all. You are ready to use all Brain Monkey features.

View file

@ -1,97 +0,0 @@
# WordPress testing tools
The sole ability to mocking functions is a great help on testing WordPress code.
All WordPress functions can be mocked and tested using the techniques described in the _PHP Functions_ section, they are PHP functions, after all.
However, to test WordPress code in isolation, without a bunch of bootstrap code for every test, a more fine grained control of plugin API functions is required.
This is exactly what Brain Monkey offers.
## Defined functions
Following functions are defined by Brain Monkey when it is loaded for tests:
**Hook-related functions:**
* `add_action()`
* `remove_action()`
* `do_action()`
* `do_action_ref_array()`
* `do_action_deprecated()` (since 2.4)
* `did_action()`
* `doing_action()`
* `has_action()`
* `add_filter()`
* `remove_filter()`
* `apply_filters()`
* `apply_filters_ref_array()`
* `apply_filters_deprecated()` \(since 2.4\)
* `doing_filter()`
* `has_filter()`
* `current_filter()`
**Generic functions:**
* `__return_true()`
* `__return_false()`
* `__return_null()`
* `__return_zero()`
* `__return_empty_array()`
* `__return_empty_string()`
* `trailingslashit()`
* `untrailingslashit()`
* `user_trailingslashit()` \(since 2.6\)
* `absint()` \(since 2.3\)
* `wp_json_encode()` \(since 2.6\)
* `is_wp_error()` \(since 2.3\)
* `wp_validate_boolean()` \(since 2.7\)
* `wp_slash()` \(since 2.7\)
**Translation function:**
Since Brain Monkey 2.3, stubs for the standard WordPress translations functions are available via `Functions\stubEscapeFunctions()`.
See: [Pre-defined stubs for translation functions](https://giuseppe-mazzapica.gitbook.io/brain-monkey/functions-testing-tools/function-stubs#pre-defined-stubs-for-translation-functions)
**Escaping functions:**
Since Brain Monkey 2.3, stubs for the standard WordPress escaping functions are available via `Functions\stubTranslationFunctions()`.
See: [Pre-defined stubs for escaping functions](https://giuseppe-mazzapica.gitbook.io/brain-monkey/functions-testing-tools/function-stubs#pre-defined-stubs-for-escaping-functions)
If your code uses any of these functions, and very likely it does, you don't need to define \(or mock\) them to avoid fatal errors during tests.
Note that the returning value of those functions \(_most of the times_\) will work out of the box as you might expect.
For example, if your code contains:
```php
do_action('my_custom_action');
// something in the middle
$did = did_action('my_custom_action');
```
the value of `$did` will be correctly `1` \(`did_action()` in WordPress returns the number an action was _done_\).
Or if your code contains:
```php
$post = [ 'post_title' => 'My Title' ];
$title = apply_filters('the_title', $post['post_title']);
```
the value of `$title` will be `'My Title'`, without the need of any intervention.
This works as long as there's no code that actually adds filters to `"the_title"` hook, so we expect that the title stay unchanged. And that's what happen.
If in the code under test there's something that adds filters \(i.e. calls `add_filter`\), the _Brain Monkey version_ of `apply_filters` will still return the value unchanged, but will allow to test that `apply_filters` has been called, how many times, with which callbacks and arguments are used.
More generally, with regards to the WP hook API, Brain Monkey allows to:
* test if an action or a filter has been added, how many times that happen and with which arguments
* test if an action or a filter has been fired, how many times that happen and with which arguments
* perform some callback when an action is fired, being able to access passed arguments
* perform some callback when an filter is applied, being able to access passed arguments and to return specific values
And it does that using its straightforward and human-readable syntax.

View file

@ -1,32 +0,0 @@
# Why bother
Just to be clear, Brain Monkey is useful for testing code wrote _for_ WordPress \(plugin, themes\) not WordPress core.
More specifically, it is useful to run **unit tests**.
Integration tests or end-to-end tests are a thing: you need to be sure that your code works good _with_ WordPress.
But **unit** tests are meant to be run **without loading WordPress environment**.
Every component that is unit tested, should be tested in isolation: when you test a class, you only have to test that specific class, assuming all other code \(e.g. WordPress code\) is working perfectly.
This is not only because doing that tests will run much faster, but also because the key concept in unit testing is that every piece of code should work _per se_, in this way if a test fails there is only one possible culprit.
By assuming all the external code is working perfectly, it is possible to test the behavior of the SUT \(System Under Test\), without any _interference_.
To deepen these concepts, read [this answer](https://wordpress.stackexchange.com/a/164138/35541) I wrote for WordPress Development \(StackExchange\) site, that also contains some tips to write better _testable_ WordPress code.
## If WordPress is not loaded...
WordPress functions are not available, and trying to run tests in that situation, tests fail with fatal errors.
Unless you use Brain Monkey.
It allows to mock WordPress function \(just like any PHP function\), and to check how they are called inside your code.
See the _PHP Function_ documentation section for a deep explanation on how it works.
Moreover, among others, WordPress [Plugin API functions](https://codex.wordpress.org/Plugin_API) are particularly important and a very fine grained control on how they are used in code is pivotal to proper test WordPress extensions.
This is why Brain Monkey comes with a set of features specifically designed for that.

View file

@ -1,407 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
// Ignore this. Just a safeguard in case of WordPress + Composer broken (really broken) setup.
namespace {
if (function_exists('Brain\Monkey\setUp')) {
return;
}
}
namespace Brain\Monkey {
/**
* Setup function to be called before _each_ unit test. This is not required to just mock
* PHP functions without using WP features.
*/
function setUp()
{
require_once dirname(__DIR__).'/inc/patchwork-loader.php';
require_once dirname(__DIR__).'/inc/wp-hook-functions.php';
require_once dirname(__DIR__).'/inc/wp-helper-functions.php';
}
/**
* Setup function to be called after _each_ unit test. This is *always* required.
*/
function tearDown()
{
Container::instance()->reset();
\Mockery::close();
\Patchwork\restoreAll();
}
}
namespace Brain\Monkey\Functions {
use Brain\Monkey\Container;
use Brain\Monkey\Expectation\EscapeHelper;
use Brain\Monkey\Expectation\FunctionStubFactory;
use Brain\Monkey\Name\FunctionName;
/**
* API entry-point for plain functions stub.
*
* Factory method: receives the name of the function to mock and returns an instance of
* FunctionStub.
*
* @param string $function_name the name of the function to mock
* @return \Brain\Monkey\Expectation\FunctionStub
*/
function when($function_name)
{
return Container::instance()
->functionStubFactory()
->create(new FunctionName($function_name), FunctionStubFactory::SCOPE_STUB);
}
/**
* API method to fast & simple create multiple functions stubs.
*
* It does not allow to add expectations.
*
* The function name to create stub for can be passed as array key or as array value (with no
* key).
*
* When the function name is in the key, the value can be:
* - a callable, in which case the function will be aliased to it
* - anything else, in which case a stub returning given value will be created for the
* function
*
* When the function name is in the value, and no key is set, the behavior will change based on
* the second param:
* - when 2nd param is `null` (default) the created stub will return the 1st param it will
* receive
* - when 2nd param is anything else the created stub will return it
*
*
* @param array $functions
* @param mixed|null $default_return
*/
function stubs(array $functions, $default_return = null)
{
foreach ($functions as $key => $value) {
list($function_name, $return_value) = is_numeric($key)
? [$value, $default_return]
: [$key, $value];
if (is_callable($return_value)) {
when($function_name)->alias($return_value);
continue;
}
$return_value === null
? when($function_name)->returnArg()
: when($function_name)->justReturn($return_value);
}
}
/**
* API entry-point for plain functions expectations.
*
* Returns a Mockery Expectation object, where is possible to set all the expectations, using
* Mockery methods.
*
* @param string $function_name
* @return \Brain\Monkey\Expectation\Expectation
*/
function expect($function_name)
{
$name = new FunctionName($function_name);
$expectation = Container::instance()
->expectationFactory()
->forFunctionExecuted($function_name);
$factory = Container::instance()->functionStubFactory();
if ( ! $factory->has($name)) {
$factory->create($name, FunctionStubFactory::SCOPE_EXPECTATION)
->redefineUsingExpectation($expectation);
}
return $expectation;
}
/**
* Stub translation functions.
*
* @see EscapeHelper
*/
function stubTranslationFunctions()
{
stubs(
[
'__',
'_x',
'translate',
'_n' => static function($single, $plural, $number) {
return ($number === 1) ? $single : $plural;
},
'_nx' => static function($single, $plural, $number) {
return ($number === 1) ? $single : $plural;
},
'esc_html__' => [EscapeHelper::class, 'esc'],
'esc_html_x' => [EscapeHelper::class, 'esc'],
'esc_attr__' => [EscapeHelper::class, 'esc'],
'esc_attr_x' => [EscapeHelper::class, 'esc'],
'esc_html_e' => [EscapeHelper::class, 'escAndEcho'],
'esc_attr_e' => [EscapeHelper::class, 'escAndEcho'],
'_n_noop' => static function ($singular, $plural) {
return compact('singular', 'plural');
},
'_nx_noop' => static function ($singular, $plural) {
return compact('singular', 'plural');
},
'translate_nooped_plural' => static function($nooped_plural, $count) {
return ($count === 1) ? $nooped_plural['singular'] : $nooped_plural['plural'];
},
]
);
when('_e')->echoArg();
when('_ex')->echoArg();
}
/**
* Stub escape functions with default behavior.
*
* @see EscapeHelper
*/
function stubEscapeFunctions()
{
stubs(
[
'esc_js' => [EscapeHelper::class, 'esc'],
'esc_sql' => 'addslashes',
'esc_attr' => [EscapeHelper::class, 'esc'],
'esc_html' => [EscapeHelper::class, 'esc'],
'esc_textarea' => [EscapeHelper::class, 'esc'],
'esc_url' => [EscapeHelper::class, 'escUrl'],
'esc_url_raw' => [EscapeHelper::class, 'escUrlRaw'],
'esc_xml' => [EscapeHelper::class, 'escXml'],
]
);
}
}
namespace Brain\Monkey\Actions {
use Brain\Monkey\Container;
use Brain\Monkey\Hook;
/**
* API entry-point for added action expectations.
*
* Takes the action name and returns a Mockery Expectation object, where is possible to set all
* the expectations, using Mockery methods.
*
* @param string $action
* @return \Brain\Monkey\Expectation\Expectation
*/
function expectAdded($action)
{
return Container::instance()
->expectationFactory()
->forActionAdded($action);
}
/**
* API entry-point for fired action expectations.
*
* Takes the action name and returns a Mockery Expectation object, where is possible to set all
* the expectations, using Mockery methods.
*
* @param string $action
* @return \Brain\Monkey\Expectation\Expectation
*/
function expectDone($action)
{
return Container::instance()
->expectationFactory()
->forActionDone($action);
}
/**
* Utility method to check if any or specific callback has been added to given action.
*
* Brain Monkey version of `has_action` will alias here.
*
* @param string $action
* @param null $callback
* @return bool
*/
function has($action, $callback = null)
{
$type = Hook\HookStorage::ACTIONS;
$hookStorage = Container::instance()->hookStorage();
if ($callback === null) {
return $hookStorage->isHookAdded($type, $action);
}
return $hookStorage->hookPriority($type, $action, $callback);
}
/**
* Utility method to check if given action has been done.
*
* Brain Monkey version of `did_action` will alias here.
*
* @param string $action
* @return int
*/
function did($action)
{
return Container::instance()
->hookStorage()
->isHookDone(Hook\HookStorage::ACTIONS, $action);
}
/**
* Utility method to check if given action is currently being done.
*
* Brain Monkey version of `doing_action` will alias here.
*
* @param string $action
* @return bool
*/
function doing($action)
{
return Container::instance()
->hookRunningStack()
->has($action);
}
/**
* API entry-point for removed action expectations.
*
* Takes the action name and returns a Mockery Expectation object, where is possible to set all
* the expectations, using Mockery methods.
*
* @param string $action
* @return \Brain\Monkey\Expectation\Expectation
*/
function expectRemoved($action)
{
return Container::instance()
->expectationFactory()
->forActionRemoved($action);
}
}
namespace Brain\Monkey\Filters {
use Brain\Monkey\Container;
use Brain\Monkey\Hook;
/**
* API entry-point for added filter expectations.
*
* Takes the filter name and returns a Mockery Expectation object, where is possible to set all
* the expectations, using Mockery methods.
*
* @param string $filter
* @return \Brain\Monkey\Expectation\Expectation
*/
function expectAdded($filter)
{
return Container::instance()
->expectationFactory()
->forFilterAdded($filter);
}
/**
* API entry-point for applied filter expectations.
*
* Takes the filter name and returns a Mockery Expectation object, where is possible to set all
* the expectations, using Mockery methods.
*
* @param string $filter
* @return \Brain\Monkey\Expectation\Expectation
*/
function expectApplied($filter)
{
return Container::instance()
->expectationFactory()
->forFilterApplied($filter);
}
/**
* Utility method to check if any or specific callback has been added to given filter.
*
* Brain Monkey version of `has_filter` will alias here.
*
* @param string $filter
* @param null $callback
* @return bool|int If callback is omitted, returns boolean for whether the hook has anything registered.
* When checking a specific callback, the priority of that hook is returned,
* or false if the callback is not attached.
*/
function has($filter, $callback = null)
{
$type = Hook\HookStorage::FILTERS;
$hookStorage = Container::instance()->hookStorage();
if ($callback === null) {
return $hookStorage->isHookAdded($type, $filter);
}
return $hookStorage->hookPriority($type, $filter, $callback);
}
/**
* Utility method to check if given filter as been applied.
*
* There's no WordPress function counter part for it.
*
* @param string $filter
* @return int
*/
function applied($filter)
{
return Container::instance()
->hookStorage()
->isHookDone(Hook\HookStorage::FILTERS, $filter);
}
/**
* Utility method to check if given filter is currently being done.
*
* Brain Monkey version of `doing_filter` will alias here.
*
* @param string $filter
* @return bool
*/
function doing($filter)
{
return Container::instance()
->hookRunningStack()
->has($filter);
}
/**
* API entry-point for removed action expectations.
*
* Takes the action name and returns a Mockery Expectation object, where is possible to set all
* the expectations, using Mockery methods.
*
* @param string $filter
* @return \Brain\Monkey\Expectation\Expectation
*/
function expectRemoved($filter)
{
return Container::instance()
->expectationFactory()
->forFilterRemoved($filter);
}
}

View file

@ -1,29 +0,0 @@
<?php
/*
* This file is part of the Brain Monkey package.
*
* (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
* @package BrainMonkey
*/
if (function_exists('Patchwork\redefine')) {
return;
}
if (file_exists(dirname(dirname(dirname(__DIR__)))."/antecedent/patchwork/Patchwork.php")) {
@require_once dirname(dirname(dirname(__DIR__)))."/antecedent/patchwork/Patchwork.php";
} elseif (file_exists(dirname(__DIR__)."/vendor/antecedent/patchwork/Patchwork.php")) {
@require_once dirname(__DIR__)."/vendor/antecedent/patchwork/Patchwork.php";
}
if ( ! function_exists('Patchwork\redefine')) {
throw new \Brain\Monkey\Exception(
'Brain Monkey was unable to load Patchwork. Please require Patchwork.php by yourself before running tests.'
);
}

View file

@ -1,119 +0,0 @@
<?php
/*
* This file is part of the Brain Monkey package.
*
* (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
* @package BrainMonkey
*
* As the functions in this file are a compatibility layer for WordPress, the same
* function names should be used as are currently used by WordPress.
* This cannot be changed at this time.
* @phpcs:disable PHPCompatibility.FunctionNameRestrictions.ReservedFunctionNames.FunctionDoubleUnderscore
*/
if ( ! function_exists('__return_true')) {
function __return_true()
{
return true;
}
}
if ( ! function_exists('__return_false')) {
function __return_false()
{
return false;
}
}
if ( ! function_exists('__return_null')) {
function __return_null()
{
return null;
}
}
if ( ! function_exists('__return_zero')) {
function __return_zero()
{
return 0;
}
}
if ( ! function_exists('__return_empty_array')) {
function __return_empty_array()
{
return [];
}
}
if ( ! function_exists('__return_empty_string')) {
function __return_empty_string()
{
return '';
}
}
if ( ! function_exists('untrailingslashit')) {
function untrailingslashit($value)
{
return rtrim($value, '/\\');
}
}
if ( ! function_exists('trailingslashit')) {
function trailingslashit($value)
{
return rtrim($value, '/\\').'/';
}
}
if ( ! function_exists('user_trailingslashit')) {
function user_trailingslashit($url)
{
return trailingslashit($url);
}
}
if ( ! function_exists('absint')) {
function absint($maybeint)
{
return abs((int)$maybeint);
}
}
if ( ! function_exists('wp_json_encode')) {
function wp_json_encode($data, $options = 0, $depth = 512)
{
return json_encode($data, $options, $depth);
}
}
if ( ! function_exists('is_wp_error')) {
function is_wp_error($thing)
{
return $thing instanceof \WP_Error;
}
}
if ( ! function_exists('wp_validate_boolean')) {
function wp_validate_boolean($value)
{
return (is_string($value) && (strtolower($value) === 'false')) ? false : (bool)$value;
}
}
if ( ! function_exists('wp_slash')) {
function wp_slash($value)
{
if (is_array($value)) {
return array_map('wp_slash', $value);
}
return is_string($value) ? addslashes($value) : $value;
}
}

View file

@ -1,164 +0,0 @@
<?php
/*
* This file is part of the Brain Monkey package.
*
* (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
* @package BrainMonkey
*/
use Brain\Monkey;
if ( ! function_exists('add_action')) {
function add_action($hook_name, $callback, $priority = 10, $accepted_args = 1)
{
$args = [$callback, $priority, $accepted_args];
$container = Monkey\Container::instance();
$container->hookStorage()->pushToAdded(Monkey\Hook\HookStorage::ACTIONS, $hook_name, $args);
$container->hookExpectationExecutor()->executeAddAction($hook_name, $args);
return true;
}
}
if ( ! function_exists('add_filter')) {
function add_filter($hook_name, $callback, $priority = 10, $accepted_args = 1)
{
$args = [$callback, $priority, $accepted_args];
$container = Monkey\Container::instance();
$container->hookStorage()->pushToAdded(Monkey\Hook\HookStorage::FILTERS, $hook_name, $args);
$container->hookExpectationExecutor()->executeAddFilter($hook_name, $args);
return true;
}
}
if ( ! function_exists('do_action')) {
function do_action($hook_name, ...$args)
{
$container = Monkey\Container::instance();
$container->hookStorage()->pushToDone(Monkey\Hook\HookStorage::ACTIONS, $hook_name, $args);
$container->hookExpectationExecutor()->executeDoAction($hook_name, $args);
}
}
if ( ! function_exists('do_action_ref_array')) {
function do_action_ref_array($hook_name, array $args)
{
$container = Monkey\Container::instance();
$container->hookStorage()->pushToDone(Monkey\Hook\HookStorage::ACTIONS, $hook_name, $args);
$container->hookExpectationExecutor()->executeDoAction($hook_name, $args);
}
}
if ( ! function_exists('do_action_deprecated')) {
function do_action_deprecated($hook_name, array $args, $version, $replacement, $message = null)
{
$container = Monkey\Container::instance();
$container->hookStorage()->pushToDone(Monkey\Hook\HookStorage::ACTIONS, $hook_name, $args);
$container->hookExpectationExecutor()->executeDoAction($hook_name, $args);
}
}
if ( ! function_exists('apply_filters')) {
function apply_filters($hook_name, ...$args)
{
$container = Monkey\Container::instance();
$container->hookStorage()->pushToDone(Monkey\Hook\HookStorage::FILTERS, $hook_name, $args);
return $container->hookExpectationExecutor()->executeApplyFilters($hook_name, $args);
}
}
if ( ! function_exists('apply_filters_ref_array')) {
function apply_filters_ref_array($hook_name, array $args)
{
$container = Monkey\Container::instance();
$container->hookStorage()->pushToDone(Monkey\Hook\HookStorage::FILTERS, $hook_name, $args);
return $container->hookExpectationExecutor()->executeApplyFilters($hook_name, $args);
}
}
if ( ! function_exists('apply_filters_deprecated')) {
function apply_filters_deprecated($hook_name, array $args, $version, $replacement, $message = null)
{
$container = Monkey\Container::instance();
$container->hookStorage()->pushToDone(Monkey\Hook\HookStorage::FILTERS, $hook_name, $args);
return $container->hookExpectationExecutor()->executeApplyFilters($hook_name, $args);
}
}
if ( ! function_exists('has_action')) {
function has_action($hook_name, $callback = null)
{
return Monkey\Actions\has($hook_name, $callback);
}
}
if ( ! function_exists('has_filter')) {
function has_filter($hook_name, $callback = null)
{
return Monkey\Filters\has($hook_name, $callback);
}
}
if ( ! function_exists('did_action')) {
function did_action($hook_name)
{
return Monkey\Actions\did($hook_name);
}
}
if ( ! function_exists('remove_action')) {
function remove_action($hook_name, $callback, $priority = 10)
{
$container = Monkey\Container::instance();
$storage = $container->hookStorage();
$args = [$callback, $priority];
$container->hookExpectationExecutor()->executeRemoveAction($hook_name, $args);
return $storage->removeFromAdded(Monkey\Hook\HookStorage::ACTIONS, $hook_name, $args);
}
}
if ( ! function_exists('remove_filter')) {
function remove_filter($hook_name, $callback, $priority = 10)
{
$container = Monkey\Container::instance();
$storage = $container->hookStorage();
$args = [$callback, $priority];
$container->hookExpectationExecutor()->executeRemoveFilter($hook_name, $args);
return $storage->removeFromAdded(Monkey\Hook\HookStorage::FILTERS, $hook_name, $args);
}
}
if ( ! function_exists('doing_action')) {
function doing_action($hook_name)
{
return Monkey\Actions\doing($hook_name);
}
}
if ( ! function_exists('doing_filter')) {
function doing_filter($hook_name)
{
return Monkey\Filters\doing($hook_name);
}
}
if ( ! function_exists('current_filter')) {
function current_filter()
{
return Monkey\Container::instance()->hookRunningStack()->last() ? : false;
}
}

View file

@ -1,36 +0,0 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
beStrictAboutTestsThatDoNotTestAnything="false"
bootstrap="tests/bootstrap.php"
colors="true"
convertDeprecationsToExceptions="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false">
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<testsuites>
<testsuite name="unit">
<directory>tests/cases/unit</directory>
</testsuite>
<testsuite name="unit:api">
<directory>tests/cases/unit/Api</directory>
</testsuite>
<testsuite name="unit:expectation">
<directory>tests/cases/unit/Expectation</directory>
</testsuite>
<testsuite name="unit:name">
<directory>tests/cases/unit/Name</directory>
</testsuite>
<testsuite name="unit:hook">
<directory>tests/cases/unit/Hook</directory>
</testsuite>
<testsuite name="functional">
<directory>tests/cases/functional</directory>
</testsuite>
</testsuites>
</phpunit>

View file

@ -1,113 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class Container
{
/**
* @var Container|null
*/
private static $instance;
/**
* @var array
*/
private $services = [];
/**
* Static instance lookup.
*
* @return Container
*/
public static function instance()
{
if ( ! self::$instance) {
require_once dirname(__DIR__).'/inc/patchwork-loader.php';
self::$instance = new static();
}
return self::$instance;
}
/**
* @return \Brain\Monkey\Expectation\ExpectationFactory
*/
public function expectationFactory()
{
return $this->service(__FUNCTION__, new Expectation\ExpectationFactory());
}
/**
* @return \Brain\Monkey\Hook\HookRunningStack
*/
public function hookRunningStack()
{
return $this->service(__FUNCTION__, new Hook\HookRunningStack());
}
/**
* @return \Brain\Monkey\Hook\HookStorage
*/
public function hookStorage()
{
return $this->service(__FUNCTION__, new Hook\HookStorage());
}
/**
* @return \Brain\Monkey\Hook\HookExpectationExecutor
*/
public function hookExpectationExecutor()
{
return $this->service(__FUNCTION__, new Hook\HookExpectationExecutor(
$this->hookRunningStack(),
$this->expectationFactory()
));
}
/**
* @return \Brain\Monkey\Expectation\FunctionStubFactory
*/
public function functionStubFactory()
{
return $this->service(__FUNCTION__, new Expectation\FunctionStubFactory());
}
/**
* @return void
*/
public function reset()
{
$this->expectationFactory()->reset();
$this->hookRunningStack()->reset();
$this->hookStorage()->reset();
$this->functionStubFactory()->reset();
}
/**
* @param string $id
* @param mixed $service
* @return mixed
*/
private function service($id, $service)
{
if ( ! array_key_exists($id, $this->services)) {
$this->services[$id] = $service;
}
return $this->services[$id];
}
}

View file

@ -1,21 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class Exception extends \Exception
{
}

View file

@ -1,99 +0,0 @@
<?php
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation;
/**
* Helper functions used to get an escaping that is "similar enough" to WordPress functions,
* without adding too much complexity.
*
* For edge cases consumers can either override the downstream functions that make use of this, or
* tests in integration.
*/
class EscapeHelper
{
/**
* @param string $text
* @return string
*/
public static function esc($text)
{
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
}
/**
* @param string $text
* @return void
*/
public static function escAndEcho($text)
{
print static::esc($text);
}
/**
* @param string $url
* @return string
*/
public static function escUrlRaw($url)
{
if ( ! parse_url($url, PHP_URL_SCHEME)) {
$url = "http://{$url}";
}
return $url;
}
/**
* @param string $url
* @return string
*/
public static function escUrl($url)
{
return str_replace(['&amp;', "'"], ['&#038;', '&#039;'], static::escUrlRaw($url));
}
/**
* @param string $text
* @return string
*/
public static function escXml($text)
{
$text = html_entity_decode($text, ENT_QUOTES | ENT_XML1 | ENT_XHTML, 'UTF-8'); // Undo existing entities.
$cdata_regex = '\<\!\[CDATA\[.*?\]\]\>';
$regex = "
`
(?=.*?{$cdata_regex}) # lookahead that will match anything followed by a CDATA Section
(?<non_cdata_followed_by_cdata>(.*?)) # the 'anything' matched by the lookahead
(?<cdata>({$cdata_regex})) # the CDATA Section matched by the lookahead
| # alternative
(?<non_cdata>(.*)) # non-CDATA Section
`sx";
return (string) preg_replace_callback(
$regex,
static function($matches) {
if ( ! $matches[0]) {
return '';
}
if ( ! empty($matches['non_cdata'])) {
// Escape HTML entities in the non-CDATA Section.
return htmlspecialchars($matches['non_cdata'], ENT_XML1, 'UTF-8', false);
}
// Return the CDATA Section unchanged, escape HTML entities in the rest.
return htmlspecialchars($matches['non_cdata_followed_by_cdata'], ENT_XML1, 'UTF-8', false) . $matches['cdata'];
},
$text
);
}
}

View file

@ -1,37 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
use Brain\Monkey\Exception as BaseException;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class Exception extends BaseException
{
/**
*
* @param \Exception $exception
* @return static
*/
public static function becauseOf(\Exception $exception)
{
return new static(
$exception->getMessage(),
$exception->getCode(),
$exception
);
}
}

View file

@ -1,51 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
use Brain\Monkey\Expectation\ExpectationTarget;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class ExpectationArgsRequired extends Exception
{
/**
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @return static
*/
public static function forExpectationType(ExpectationTarget $target)
{
$type = 'given';
switch ($target->type()) {
case ExpectationTarget::TYPE_ACTION_ADDED:
$type = "added action";
break;
case ExpectationTarget::TYPE_ACTION_DONE:
$type = "done action";
break;
case ExpectationTarget::TYPE_FILTER_ADDED:
$type = "added filter";
break;
case ExpectationTarget::TYPE_FILTER_APPLIED:
$type = "applied filter";
break;
}
return new static(
"Can't use `withNoArgs()` for {$type} expectations: they require at least one argument."
);
}
}

View file

@ -1,21 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidArgumentForStub extends Exception
{
}

View file

@ -1,39 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
use Brain\Monkey\Expectation\ExpectationTarget;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidExpectationName extends Exception
{
/**
* @param mixed $name
* @param string $type
* @return static
*/
public static function forNameAndType($name, $type)
{
return new static(
sprintf(
'%s name to set expectation for must be in a string, got %s.',
$type === ExpectationTarget::TYPE_FUNCTION ? 'Function' : 'Hook',
is_object($name) ? 'instance of '.get_class($name) : gettype($name)
)
);
}
}

View file

@ -1,35 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidExpectationType extends Exception
{
/**
* @param string $type
* @return static
*/
public static function forType($type)
{
return new static(
sprintf(
'%s method is not allowed for Brain Monkey expectation.',
$type
)
);
}
}

View file

@ -1,32 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class MissedPatchworkReplace extends Exception
{
/**
* @param string $function_name
* @return static
*/
public static function forFunction($function_name)
{
return new static(
"Patchwork was not able to replace '{$function_name}', try to load Patchwork earlier."
);
}
}

View file

@ -1,21 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class MissingFunctionExpectations extends Exception
{
}

View file

@ -1,88 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation\Exception;
use Brain\Monkey\Expectation\ExpectationTarget;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class NotAllowedMethod extends Exception
{
const CODE_METHOD = 1;
const CODE_RETURNING_METHOD = 2;
const CODE_WHEN_HAPPEN = 3;
const CODE_BY_DEFAULT = 4;
/**
* @param string $method_name
* @return static
*/
public static function forMethod($method_name)
{
return new static(
sprintf(
'%s method is not allowed for Brain Monkey expectation.',
$method_name
),
self::CODE_METHOD
);
}
/**
* @return static
*/
public static function forByDefault()
{
return new static(
'byDefault method is not allowed for Brain Monkey hook expectation.',
self::CODE_BY_DEFAULT
);
}
/**
* @param string $method_name
* @return static
*/
public static function forReturningMethod($method_name)
{
return new static(
sprintf(
'Bad usage of "%s" method: returning expectation can only be used for functions or applied filters expectations.',
$method_name
),
self::CODE_RETURNING_METHOD
);
}
public static function forWhenHappen(ExpectationTarget $target)
{
$type = '';
switch ($target->type()) {
case ExpectationTarget::TYPE_FUNCTION:
$type = "function";
break;
case ExpectationTarget::TYPE_FILTER_APPLIED:
$type = "applied filter";
break;
}
return new static(
"Can't use `whenHappen()` for {$type} expectations: use `andReturnUsing()` instead.",
self::CODE_WHEN_HAPPEN
);
}
}

View file

@ -1,284 +0,0 @@
<?php
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation;
use Mockery\ExpectationInterface;
/**
* A wrap around Mockery expectation.
*
* Acts as "man in the middle" between Monkey API and Mockery expectation, preventing calls to
* some methods and do some checks before calling other methods.
* finally, some additional methods are added like `andAlsoExpect` to overcome the not allowed
* `getMock()` and `andReturnFirstArg()` to facilitate the creation of expectation for applied
* filter hooks.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @license http://opensource.org/licenses/MIT MIT
* @package BrainMonkey
*
* @method Expectation once()
* @method Expectation twice()
* @method Expectation atLeast()
* @method Expectation atMost()
* @method Expectation times(int $times)
* @method Expectation never()
* @method Expectation ordered()
* @method Expectation between(int $min, int $max)
* @method Expectation zeroOrMoreTimes()
* @method Expectation withAnyArgs()
* @method Expectation andReturn(...$args)
* @method Expectation andReturnNull()
* @method Expectation andReturnValues(...$args)
* @method Expectation andReturnUsing(callable ...$args)
* @method Expectation andThrow(\Throwable $throwable)
*/
class Expectation
{
const RETURNING_EXPECTATION_TYPES = [
ExpectationTarget::TYPE_FILTER_APPLIED,
ExpectationTarget::TYPE_FUNCTION
];
const ADDING_TYPES = [
ExpectationTarget::TYPE_ACTION_ADDED,
ExpectationTarget::TYPE_FILTER_ADDED
];
const REMOVING_TYPES = [
ExpectationTarget::TYPE_ACTION_REMOVED,
ExpectationTarget::TYPE_FILTER_REMOVED
];
const NO_ARGS_EXPECTATION_TYPES = [
ExpectationTarget::TYPE_ACTION_DONE,
ExpectationTarget::TYPE_FUNCTION
];
const NOT_ALLOWED_METHODS = [
'shouldReceive',
'andSet',
'set',
'shouldExpect',
'mock',
'getMock',
];
/**
* @var \Mockery\Expectation|\Mockery\ExpectationInterface
*/
private $expectation;
/**
* @var \Brain\Monkey\Expectation\ExpectationTarget
*/
private $target;
/**
* @var bool
*/
private $default = true;
/**
* @var \ArrayAccess
*/
private $return_expectations;
/**
* @param \Mockery\ExpectationInterface $expectation
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @param \ArrayAccess|null $return_expectations
*/
public function __construct(
ExpectationInterface $expectation,
ExpectationTarget $target,
$return_expectations = null
) {
$this->expectation = $expectation;
$this->target = $target;
$this->return_expectations = ($return_expectations instanceof \ArrayAccess) ? $return_expectations : new \ArrayObject();
}
/**
* Ensure full cloning.
*
* @codeCoverageIgnore
*/
public function __clone()
{
$this->expectation = clone $this->expectation;
$this->target = clone $this->target;
}
/**
* Delegate method to wrapped expectation, after some checks.
*
* @param string $name
* @param array $arguments
* @return static
*/
public function __call($name, array $arguments = [])
{
if (in_array($name, self::NOT_ALLOWED_METHODS, true)) {
throw Exception\NotAllowedMethod::forMethod($name);
}
$has_return = stristr($name, 'return');
$has_default = $name === 'byDefault';
if ($has_default && $this->target->type() !== ExpectationTarget::TYPE_FUNCTION) {
throw Exception\NotAllowedMethod::forByDefault();
}
if (
$has_return
&& ! in_array($this->target->type(), self::RETURNING_EXPECTATION_TYPES, true)
) {
throw Exception\NotAllowedMethod::forReturningMethod($name);
}
if ($this->default) {
$this->default = false;
$this->andAlsoExpectIt();
}
$callback = [$this->expectation, $name];
$this->expectation = $callback(...$arguments);
if ($has_return) {
$id = $this->target->identifier();
$this->return_expectations->offsetExists($id) or $this->return_expectations[$id] = 1;
}
return $this;
}
/**
* @return \Mockery\Expectation|\Mockery\CompositeExpectation
*/
public function mockeryExpectation()
{
return $this->expectation;
}
/**
* Mockery expectation allow chaining different expectations with by chaining `getMock()`
* method.
* Since `getMock()` is disabled for Brain Monkey expectation this methods provides a way to
* chain expectations.
*
* @return static
*/
public function andAlsoExpectIt()
{
$method = $this->target->mockMethodName();
/** @noinspection PhpMethodParametersCountMismatchInspection */
$this->expectation = $this->expectation->getMock()->shouldReceive($method);
return $this;
}
/**
* WordPress action and filters addition and filters applying requires at least one argument,
* and setting an expectation of no arguments for those triggers an error in Brain Monkey.
*
* @return static
*/
public function withNoArgs()
{
if ( ! in_array($this->target->type(), self::NO_ARGS_EXPECTATION_TYPES, true)) {
throw Exception\ExpectationArgsRequired::forExpectationType($this->target);
}
$this->expectation = $this->expectation->withNoArgs();
return $this;
}
/**
* @param mixed ...$args
* @return static
*/
public function with(...$args)
{
$argsNum = count($args);
if ( ! $argsNum &&
! in_array($this->target->type(), self::NO_ARGS_EXPECTATION_TYPES, true)
) {
throw Exception\ExpectationArgsRequired::forExpectationType($this->target);
}
if (in_array($this->target->type(), self::ADDING_TYPES, true) && $argsNum < 3) {
$argsNum < 2 and $args[] = 10;
$args[] = 1;
}
if (in_array($this->target->type(), self::REMOVING_TYPES, true) && $argsNum === 1) {
$args[] = 10;
}
$this->expectation = $this->expectation->with(...$args);
return $this;
}
/**
* Brain Monkey doesn't allow return expectation for actions (added/done) nor for added
* filters.
* However, it is desirable to do something when the expected callback is used, this is the
* reason to be of this method.
*
* ```
* Actions::expectDone('some_action')->once()->whenHappen(function($some_arg) {
* echo "{$some_arg} was passed to " . current_filter();
* });
* ```
*
* Snippet above will not change the return of `do_action('some_action', $some_arg)`
* like a normal return expectation would do, but allows to catch expected events with a
* callback.
*
* For expectation types that allows return expectation (functions, applied filters) this method
* becomes just an alias for Mockery `andReturnUsing()`.
*
* @param callable $callback
* @return static
*/
public function whenHappen(callable $callback)
{
if (in_array($this->target->type(), self::RETURNING_EXPECTATION_TYPES, true)) {
throw Exception\NotAllowedMethod::forWhenHappen($this->target);
}
$this->expectation->andReturnUsing($callback);
return $this;
}
/**
* @return static
*/
public function andReturnFirstArg()
{
if ( ! in_array($this->target->type(), self::RETURNING_EXPECTATION_TYPES, true)) {
throw Exception\NotAllowedMethod::forReturningMethod('andReturnFirstParam');
}
$this->expectation->andReturnUsing(function ($arg = null) {
return $arg;
});
return $this;
}
}

View file

@ -1,187 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation;
/**
* A factory to create expectation objects for different "targets".
*
* It is a collection of factory methods with explicit names, that internally do always same thing.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class ExpectationFactory
{
/**
* @var \Brain\Monkey\Expectation\Expectation[]
*/
private $expectations = [];
/**
* @var \ArrayObject
*/
private $return_expectations;
public function __construct()
{
$this->return_expectations = new \ArrayObject();
}
/**
* @param string $function
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forFunctionExecuted($function)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_FUNCTION, $function)
);
}
/**
* @param string $action
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forActionAdded($action)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_ACTION_ADDED, $action)
);
}
/**
* @param string $action
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forActionDone($action)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_ACTION_DONE, $action)
);
}
/**
* @param string $action
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forActionRemoved($action)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_ACTION_REMOVED, $action)
);
}
/**
* @param string $filter
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forFilterAdded($filter)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_FILTER_ADDED, $filter)
);
}
/**
* @param string $filter
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forFilterApplied($filter)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_FILTER_APPLIED, $filter)
);
}
/**
* @param string $filter
* @return \Brain\Monkey\Expectation\Expectation;
*/
public function forFilterRemoved($filter)
{
return $this->create(
new ExpectationTarget(ExpectationTarget::TYPE_FILTER_REMOVED, $filter)
);
}
/**
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @return \Mockery\MockInterface|mixed
*/
public function hasMockFor(ExpectationTarget $target)
{
return array_key_exists($target->identifier(), $this->expectations);
}
/**
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @return \Mockery\MockInterface|mixed
*/
public function hasReturnExpectationFor(ExpectationTarget $target)
{
if ( ! $this->hasMockFor($target)) {
return false;
}
return $this->return_expectations->offsetExists($target->identifier());
}
/**
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @return \Mockery\MockInterface|mixed
*/
public function mockFor(ExpectationTarget $target)
{
return $this->hasMockFor($target)
? $this->expectations[$target->identifier()]->mockeryExpectation()->getMock()
: \Mockery::mock();
}
public function reset()
{
$this->expectations = [];
$this->return_expectations = new \ArrayObject();
}
/**
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @return \Brain\Monkey\Expectation\Expectation
*/
private function create(ExpectationTarget $target)
{
$id = $target->identifier();
/** @noinspection PhpMethodParametersCountMismatchInspection */
$expectation = $this->mockFor($target)
->shouldReceive($target->mockMethodName())
->atLeast()
->once();
if ($target->type() === ExpectationTarget::TYPE_FILTER_APPLIED) {
$expectation = $expectation->andReturnUsing(function ($arg) {
return $arg;
});
}
$expectation = $expectation->byDefault();
$this->expectations[$id] = new Expectation(
$expectation,
$target,
$this->return_expectations
);
return $this->expectations[$id];
}
}

View file

@ -1,199 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation;
use Brain\Monkey\Name\FunctionName;
/**
* Value object for Brain Monkey expectations targets.
*
* Holds the name (either function name or hook name) and the type of expectations.
* Supported types are hold in class constants.
*
* Name of functions and hooks are "normalized" to be used as method names (for mock class).
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class ExpectationTarget
{
const TYPE_ACTION_ADDED = 'add_action';
const TYPE_ACTION_DONE = 'do_action';
const TYPE_ACTION_REMOVED = 'remove_action';
const TYPE_FILTER_ADDED = 'add_filter';
const TYPE_FILTER_APPLIED = 'apply_filters';
const TYPE_FILTER_REMOVED = 'remove_filter';
const TYPE_FUNCTION = 'function';
const TYPE_NULL = '';
const TYPES = [
self::TYPE_FUNCTION,
self::TYPE_ACTION_ADDED,
self::TYPE_ACTION_DONE,
self::TYPE_ACTION_REMOVED,
self::TYPE_FILTER_ADDED,
self::TYPE_FILTER_APPLIED,
self::TYPE_FILTER_REMOVED,
];
const HOOK_SANITIZE_MAP = [
'-' => '_hyphen_',
' ' => '_space_',
'/' => '_slash_',
'\\' => '_backslash_',
'.' => '_dot_',
'!' => '_exclamation_',
'"' => '_double_quote_',
'\'' => '_quote_',
'£' => '_pound_',
'$' => '_dollar_',
'%' => '_percent_',
'=' => '_equal_',
'?' => '_question_',
'*' => '_asterisk_',
'@' => '_slug_',
'#' => '_sharp_',
'+' => '_plus_',
'|' => '_pipe_',
'<' => '_lt_',
'>' => '_gt_',
',' => '_comma_',
';' => '_semicolon_',
':' => '_colon_',
'~' => '_tilde_',
'(' => '_bracket_open_',
')' => '_bracket_close_',
'[' => '_square_bracket_open_',
']' => '_square_bracket_close_',
'{' => '_curly_bracket_open_',
'}' => '_curly_bracket_close_',
];
/**
* @var string
*/
private $type;
/**
* @var callable|string
*/
private $name;
/**
* @var string
*/
private $original_name;
/**
* @param string $type
* @param string $name
*/
public function __construct($type, $name)
{
if ( ! in_array($type, self::TYPES, true)) {
throw Exception\InvalidExpectationType::forType($name);
}
if ( ! is_string($name)) {
throw Exception\InvalidExpectationName::forNameAndType($name, $type);
}
$this->type = $type;
if ($type === self::TYPE_FUNCTION) {
$nameObject = new FunctionName($name);
$namespace = str_replace('\\', '_', ltrim($nameObject->getNamespace(), '\\'));
$this->original_name = $nameObject->fullyQualifiedName();
$this->name = $namespace
? "{$namespace}_".$nameObject->shortName()
: $nameObject->shortName();
return;
}
$this->original_name = $name;
$replaced = strtr($name, self::HOOK_SANITIZE_MAP);
$this->name = preg_replace('/[^a-zA-Z0-9_]/', '__', $replaced);
}
/**
* @return string
*/
public function identifier()
{
return md5($this->original_name.$this->type);
}
/**
* @return string
*/
public function name()
{
return $this->name;
}
/**
* @return string
*/
public function mockMethodName()
{
$name = $this->name();
switch ($this->type()) {
case ExpectationTarget::TYPE_FUNCTION:
break;
case ExpectationTarget::TYPE_ACTION_ADDED:
$name = "add_action_{$name}";
break;
case ExpectationTarget::TYPE_ACTION_DONE:
$name = "do_action_{$name}";
break;
case ExpectationTarget::TYPE_ACTION_REMOVED:
$name = "remove_action_{$name}";
break;
case ExpectationTarget::TYPE_FILTER_ADDED:
$name = "add_filter_{$name}";
break;
case ExpectationTarget::TYPE_FILTER_APPLIED:
$name = "apply_filters_{$name}";
break;
case ExpectationTarget::TYPE_FILTER_REMOVED:
$name = "remove_filter_{$name}";
break;
default :
throw new \UnexpectedValueException(sprintf('Unexpected %s type.', __CLASS__));
}
return $name;
}
/**
* @return string
*/
public function type()
{
return $this->type;
}
/**
* @param \Brain\Monkey\Expectation\ExpectationTarget $target
* @return bool
*/
public function equals(ExpectationTarget $target)
{
return
$this->original_name === $target->original_name
&& $this->type === $target->type;
}
}

View file

@ -1,239 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation;
use Brain\Monkey\Name\FunctionName;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class FunctionStub
{
/**
* @var \Brain\Monkey\Name\FunctionName
*/
private $function_name;
/**
* @param FunctionName $function_name
*/
public function __construct(FunctionName $function_name)
{
$this->function_name = $function_name;
$name = $this->function_name->shortName();
$namespace = $this->function_name->getNamespace();
if (function_exists($function_name->fullyQualifiedName())) {
return;
}
$function = <<<PHP
namespace {$namespace} {
function {$name}() {
throw new \Brain\Monkey\Expectation\Exception\MissingFunctionExpectations(
'"{$name}" is not defined nor mocked in this test.'
);
}
}
PHP;
eval($function);
}
/**
* @return string
*/
public function name()
{
return $this->function_name->fullyQualifiedName();
}
/**
* Redefine target function replacing it on the fly with a given callable.
*
* @param callable $callback
*/
public function alias(callable $callback)
{
$fqn = $this->function_name->fullyQualifiedName();
\Patchwork\redefine($fqn, $callback);
$this->assertRedefined($fqn);
}
/**
* Redefine target function replacing it with a function that execute Brain Monkey expectation
* target method on the mock associated with given Brain Monkey expectation.
*
* @param \Brain\Monkey\Expectation\Expectation $expectation
* @return void
*/
public function redefineUsingExpectation(Expectation $expectation)
{
$fqn = $this->function_name->fullyQualifiedName();
$this->alias(function (...$args) use ($expectation, $fqn) {
$mock = $expectation->mockeryExpectation()->getMock();
$target = new ExpectationTarget(ExpectationTarget::TYPE_FUNCTION, $fqn);
return $mock->{$target->mockMethodName()}(...$args);
});
}
/**
* Redefine target function making it return an arbitrary value.
*
* @param mixed $return
*/
public function justReturn($return = null)
{
$fqn = ltrim($this->function_name->fullyQualifiedName(), '\\');
\Patchwork\redefine($fqn, function () use ($return) {
return $return;
});
$this->assertRedefined($fqn);
}
/**
* Redefine target function making it echo an arbitrary value.
*
* @param mixed $value
*/
public function justEcho($value = null)
{
is_null($value) and $value = '';
$fqn = ltrim($this->function_name->fullyQualifiedName(), '\\');
$this->assertPrintable($value, 'provided to justEcho');
\Patchwork\redefine($fqn, function () use ($value) {
echo $value;
});
$this->assertRedefined($fqn);
}
/**
* Redefine target function making it return one of the received arguments, the first by
* default. Redefined function will throw an exception if the function does not receive desired
* argument.
*
* @param int $arg_num The position (1-based) of the argument to return
*/
public function returnArg($arg_num = 1)
{
$arg_num = $this->assertValidArgNum($arg_num, 'returnArg');
$fqn = $this->function_name->fullyQualifiedName();
\Patchwork\redefine($fqn, function (...$args) use ($fqn, $arg_num) {
if ( ! array_key_exists($arg_num - 1, $args)) {
$count = count($args);
throw new Exception\InvalidArgumentForStub(
"{$fqn} was called with {$count} params, can't return argument \"{$arg_num}\"."
);
}
return $args[$arg_num - 1];
});
$this->assertRedefined($fqn);
}
/**
* Redefine target function making it echo one of the received arguments, the first by default.
* Redefined function will throw an exception if the function does not receive desired argument.
*
* @param int $arg_num The position (1-based) of the argument to echo
*/
public function echoArg($arg_num = 1)
{
$arg_num = $this->assertValidArgNum($arg_num, 'echoArg');
$fqn = $this->function_name->fullyQualifiedName();
\Patchwork\redefine($fqn, function (...$args) use ($fqn, $arg_num) {
if ( ! array_key_exists($arg_num - 1, $args)) {
$count = count($args);
throw new \RuntimeException(
"{$fqn} was called with {$count} params, can't return argument \"{$arg_num}\"."
);
}
$arg = $args[$arg_num - 1];
$this->assertPrintable($arg, "passed as argument {$arg_num} to {$fqn}");
echo (string)$arg;
});
$this->assertRedefined($fqn);
}
/**
* @param mixed $arg_num
* @param string $method
* @return bool
*/
private function assertValidArgNum($arg_num, $method)
{
if ( ! is_int($arg_num) || $arg_num <= 0) {
throw new Exception\InvalidArgumentForStub(
sprintf('`%s::%s()` first parameter must be a positiver integer.', __CLASS__,
$method)
);
}
return $arg_num;
}
/**
* @param string $function_name
*/
private function assertRedefined($function_name)
{
if (\Patchwork\hasMissed($function_name)) {
throw Exception\MissedPatchworkReplace::forFunction($function_name);
}
}
/**
* @param $value
* @param string $coming
*/
private function assertPrintable($value, $coming = '')
{
if (is_scalar($value)) {
return;
}
$printable =
is_object($value)
&& method_exists($value, '__toString')
&& is_callable([$value, '__toString']);
if ( ! $printable) {
throw new Exception\InvalidArgumentForStub(
sprintf(
"%s, %s, is not printable.",
is_object($value) ? 'Instance of '.get_class($value) : gettype($value),
$coming
)
);
}
}
}

View file

@ -1,95 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Expectation;
use Brain\Monkey\Name\FunctionName;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class FunctionStubFactory
{
const SCOPE_STUB = 'a stub';
const SCOPE_EXPECTATION = 'an expectation';
/**
* @var array
*/
private $storage = [];
/**
* @param \Brain\Monkey\Name\FunctionName $name
* @param string $scope
* @return \Brain\Monkey\Expectation\FunctionStub
*/
public function create(FunctionName $name, $scope)
{
$stored_type = $this->storedType($name);
if ( ! $stored_type) {
$stub = new FunctionStub($name);
$this->storage[$name->fullyQualifiedName()] = [$stub, $scope];
return $stub;
}
if ($scope !== $stored_type) {
throw new Exception\Exception(
sprintf(
'It was not possible to create %s for function "%s" because %s for it already exists.',
$scope,
$name->fullyQualifiedName(),
$stored_type
)
);
}
list($stub) = $this->storage[$name->fullyQualifiedName()];
return $stub;
}
/**
* @param \Brain\Monkey\Name\FunctionName $name
* @return bool
*/
public function has(FunctionName $name)
{
return array_key_exists($name->fullyQualifiedName(), $this->storage);
}
/**
* @return void
*/
public function reset()
{
$this->storage = [];
}
/**
* @param \Brain\Monkey\Name\FunctionName $name
* @return string
*/
private function storedType(FunctionName $name)
{
if ( ! $this->has($name)) {
return '';
}
list(, $stored_type) = $this->storage[$name->fullyQualifiedName()];
return $stored_type;
}
}

View file

@ -1,24 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Hook\Exception;
use Brain\Monkey\Exception as BaseException;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class Exception extends BaseException
{
}

View file

@ -1,87 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Hook\Exception;
use Brain\Monkey\Hook\HookStorage;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidAddedHookArgument extends InvalidHookArgument
{
const CODE_WRONG_ARGS_COUNT = 1;
const CODE_MISSING_CALLBACK = 2;
const CODE_INVALID_PRIORITY = 3;
const CODE_INVALID_ACCEPTED_ARGS = 4;
/**
* @param string $type
* @return static
*/
public static function forWrongArgumentsCount($type)
{
return new static(
sprintf(
'"%s" must be called at with hook name and at maximum three other arguments: callback, priority, and accepted args num.',
$type === HookStorage::ACTIONS ? "add_action" : "add_filter"
),
self::CODE_WRONG_ARGS_COUNT
);
}
/**
* @param string $type
* @return static
*/
public static function forMissingCallback($type)
{
return new static(
sprintf(
'A callback parameter is required for "%s".',
$type === HookStorage::ACTIONS ? "add_action" : "add_filter"
),
self::CODE_MISSING_CALLBACK
);
}
/**
* @param string $type
* @return static
*/
public static function forInvalidPriority($type)
{
return new static(
sprintf(
'Priority parameter passed to "%s" must be an integer.',
$type === HookStorage::ACTIONS ? "add_action" : "add_filter"
),
self::CODE_INVALID_PRIORITY
);
}
/**
* @param string $type
* @return static
*/
public static function forInvalidAcceptedArgs($type)
{
return new static(
sprintf(
'Accepted args number parameter passed to "%s" must be an integer.',
$type === HookStorage::ACTIONS ? "add_action" : "add_filter"
),
self::CODE_INVALID_ACCEPTED_ARGS
);
}
}

View file

@ -1,79 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Hook\Exception;
use Brain\Monkey\Hook\HookStorage;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidHookArgument extends Exception
{
/**
* @param mixed $type
* @return static
*/
public static function forInvalidType($type)
{
return new static(
sprintf(
'HookStorage hook type must either HookStorage::ACTIONS or HookStorage::FILTERS, got %s.',
is_object($type) ? ' instance of '.get_class($type) : gettype($type)
)
);
}
/**
* @param mixed $type
* @return static
*/
public static function forInvalidHook($type)
{
return new static(
sprintf(
'Hook name must be in a string, got %s.',
is_object($type) ? ' instance of '.get_class($type) : gettype($type)
)
);
}
/**
* @param string $key
* @param string $type
* @return static
*/
public static function forEmptyArguments($key, $type)
{
$function = $missing = '';
switch ($type) {
case HookStorage::ACTIONS:
$missing = 'callback';
$function = $key === HookStorage::ADDED ? "'add_action'" : "'do_action'";
break;
case HookStorage::FILTERS:
$missing = $key === HookStorage::ADDED ? 'callback' : 'first';
$function = $key === HookStorage::ADDED ? "'add_filter'" : "'apply_filters'";
break;
}
return new static(
sprintf(
'Missing %s required argument for %s.',
$missing,
$function
)
);
}
}

View file

@ -1,140 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Hook;
use Brain\Monkey\Expectation\Expectation;
use Brain\Monkey\Expectation\ExpectationTarget;
use Brain\Monkey\Expectation\ExpectationFactory;
/**
* Class responsible to execute the mocked hook methods on the mock object.
*
* Expected methods that are not executed will cause tests to fail.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class HookExpectationExecutor
{
/**
* @var \Brain\Monkey\Hook\HookRunningStack
*/
private $stack;
/**
* @var \Brain\Monkey\Expectation\ExpectationFactory
*/
private $factory;
/**
* @param \Brain\Monkey\Hook\HookRunningStack $stack
* @param \Brain\Monkey\Expectation\ExpectationFactory $factory
*/
public function __construct(HookRunningStack $stack, ExpectationFactory $factory)
{
$this->stack = $stack;
$this->factory = $factory;
}
/**
* @param string $action
* @param array $args
*/
public function executeAddAction($action, array $args)
{
$this->execute(ExpectationTarget::TYPE_ACTION_ADDED, $action, $args);
}
/**
* @param string $action
* @param array $args
*/
public function executeAddFilter($action, array $args)
{
$this->execute(ExpectationTarget::TYPE_FILTER_ADDED, $action, $args);
}
/**
* @param string $action
* @param array $args
*/
public function executeDoAction($action, array $args = [])
{
$is_running = $this->stack->has();
$this->stack->push($action);
$this->execute(ExpectationTarget::TYPE_ACTION_DONE, $action, $args);
$is_running or $this->stack->reset();
}
/**
* @param string $filter
* @param array $args
* @return mixed|null
*/
public function executeApplyFilters($filter, array $args)
{
$is_running = $this->stack->has();
$this->stack->push($filter);
$return = $this->execute(ExpectationTarget::TYPE_FILTER_APPLIED, $filter, $args);
$is_running or $this->stack->reset();
return $return;
}
/**
* @param string $action
* @param array $args
* @return mixed
*/
public function executeRemoveAction($action, array $args)
{
return $this->execute(ExpectationTarget::TYPE_ACTION_REMOVED, $action, $args);
}
/**
* @param string $filter
* @param array $args
* @return mixed
*/
public function executeRemoveFilter($filter, array $args)
{
return $this->execute(ExpectationTarget::TYPE_FILTER_REMOVED, $filter, $args);
}
/**
* @param string $type
* @param string $hook
* @param array $args
* @return mixed
*/
private function execute($type, $hook, array $args)
{
$target = new ExpectationTarget($type, $hook);
if ($this->factory->hasMockFor($target)) {
$method = $target->mockMethodName();
$return = $this->factory->mockFor($target)->{$method}(...$args);
$this->factory->hasReturnExpectationFor($target) or $return = reset($args);
return $return;
}
if ($type === ExpectationTarget::TYPE_FILTER_APPLIED) {
return reset($args);
}
return null;
}
}

View file

@ -1,76 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Hook;
/**
* A simple stack data structure built around an array for hook names.
* This allow to keep last hook being executed.
*
* It is used to `current_filter()`, `doing_action()`, and `doing_filter()`.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class HookRunningStack
{
/**
* @var array
*/
private $stack = [];
/**
* @param string $hook_name
* @return static
*/
public function push($hook_name)
{
$this->stack[] = $hook_name;
return $this;
}
/**
* @return string
*/
public function last()
{
if ( ! $this->stack) {
return '';
}
return end($this->stack);
}
/**
* @param string $hook_name
* @return bool
*/
public function has($hook_name = null)
{
if ( ! $this->stack) {
return false;
}
return $hook_name === null ? true : in_array($hook_name, $this->stack, true);
}
/**
* @return static
*/
public function reset()
{
$this->stack = [];
return $this;
}
}

View file

@ -1,263 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Hook;
use Brain\Monkey\Name\CallbackStringForm;
/**
* A simple stack data structure built around two arrays that maps hook names to the arguments
* used to add or execute them.
*
* It is used to allow testing for hook being added/removed/executed also checking for the arguments
* used.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class HookStorage
{
const ACTIONS = 'actions';
const FILTERS = 'filters';
const ADDED = 'added';
const DONE = 'done';
private $storage = [
self::ADDED => [],
self::DONE => []
];
/**
* @return void
*/
public function reset()
{
$this->storage = [
self::ADDED => [],
self::DONE => []
];
}
/**
* @param string $type
* @param string $hook
* @param array $args
* @return static
*/
public function pushToAdded($type, $hook, array $args)
{
return $this->pushToStorage(self::ADDED, $type, $hook, $args);
}
/**
* @param string $type
* @param string $hook
* @param array $args
* @return bool
*/
public function removeFromAdded($type, $hook, array $args)
{
if ( ! $this->isHookAdded($type, $hook)) {
return false;
}
if ( ! $args) {
unset($this->storage[self::ADDED][$type][$hook]);
return true;
}
$args = $this->parseArgsToAdd($args, self::ADDED, $type);
$all = $this->storage[self::ADDED][$type][$hook];
$removed = 0;
/**
* @var CallbackStringForm $callback
*/
foreach ($all as $key => list($callback, $priority)) {
if ($callback->equals($args[0]) && $priority === $args[1]) {
unset($all[$key]);
$removed++;
}
}
$removed and $this->storage[self::ADDED][$type][$hook] = array_values($all);
if ( ! $this->storage[self::ADDED][$type][$hook]) {
unset($this->storage[self::ADDED][$type][$hook]);
}
return $removed > 0;
}
/**
* @param string $type
* @param string $hook
* @param array $args
* @return static
*/
public function pushToDone($type, $hook, array $args)
{
return $this->pushToStorage(self::DONE, $type, $hook, $args);
}
/**
* @param string $type
* @param string $hook
* @param callable|null $function
* @return bool
*/
public function isHookAdded($type, $hook, $function = null)
{
return $this->isInStorage(self::ADDED, $type, $hook, $function);
}
/**
* @param string $type
* @param string $hook
* @return int
*/
public function isHookDone($type, $hook)
{
return $this->isInStorage(self::DONE, $type, $hook);
}
/**
* @param $type
* @param $hook
* @param $function
* @return bool|int
*/
public function hookPriority($type, $hook, $function)
{
if ( ! isset($this->storage[self::ADDED][$type][$hook])) {
return false;
}
$all = $this->storage[self::ADDED][$type][$hook];
/**
* @var CallbackStringForm $callback
* @var int $priority
*/
foreach ($all as $key => list($callback, $priority)) {
if ($callback->equals(new CallbackStringForm($function))) {
return $priority;
}
}
return false;
}
/**
* @param string $key
* @param string $type
* @param string $hook
* @param array $args
* @return static
*/
private function pushToStorage($key, $type, $hook, array $args)
{
if ($type !== self::ACTIONS && $type !== self::FILTERS) {
throw Exception\InvalidHookArgument::forInvalidType($type);
}
if ( ! is_string($hook)) {
throw Exception\InvalidHookArgument::forInvalidHook($hook);
}
// do_action() is the only of target functions that can be called without additional arguments
if ( ! $args && ($key !== self::DONE || $type !== self::ACTIONS)) {
throw Exception\InvalidHookArgument::forEmptyArguments($key, $type);
}
$storage = &$this->storage[$key];
array_key_exists($type, $storage) or $storage[$type] = [];
array_key_exists($hook, $storage[$type]) or $storage[$type][$hook] = [];
if ($key === self::ADDED) {
$args = $this->parseArgsToAdd($args, $key, $type);
}
$storage[$type][$hook][] = $args;
return $this;
}
/**
* @param string $key
* @param string $type
* @param string $hook
* @param callable|null $function
* @return int|bool
*/
private function isInStorage($key, $type, $hook, $function = null)
{
$storage = $this->storage[$key];
if ( ! in_array($type, [self::ACTIONS, self::FILTERS], true)) {
throw Exception\InvalidHookArgument::forInvalidType($type);
}
if ( ! array_key_exists($type, $storage) || ! array_key_exists($hook, $storage[$type])) {
return $key === self::ADDED ? false : 0;
}
if ($function === null) {
return $key === self::ADDED ? true : count($storage[$type][$hook]);
}
$filter = function (array $args) use ($function) {
return $args[0]->equals(new CallbackStringForm($function));
};
$matching = array_filter($storage[$type][$hook], $filter);
return $key === self::ADDED ? (bool)$matching : count($matching);
}
/**
* @param array $args
* @param string $key
* @param string $type
* @return array
*/
private function parseArgsToAdd(array $args, $key, $type)
{
if ( ! $args) {
throw Exception\InvalidHookArgument::forEmptyArguments($key, $type);
}
if (count($args) > 3) {
throw Exception\InvalidAddedHookArgument::forWrongArgumentsCount($type);
}
$args = array_replace([null, 10, 1], array_values($args));
if ( ! $args[0]) {
throw Exception\InvalidAddedHookArgument::forMissingCallback($type);
}
$args[0] = new CallbackStringForm($args[0]);
if ( ! is_int($args[1])) {
throw Exception\InvalidAddedHookArgument::forInvalidPriority($type);
}
if ( ! is_int($args[2])) {
throw Exception\InvalidAddedHookArgument::forInvalidAcceptedArgs($type);
}
return $args;
}
}

View file

@ -1,181 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name;
/**
* Provides a string representation for a callback.
*
* Callbacks are not checked for real callable capability, but only for syntax.
* E.g. something like `new CallbackStringForm(['FooClass', 'foo_method'])` would not raise any
* error even if the class is not available.
* However, `new CallbackStringForm(['FooClass', 'foo-method'])` would raise an error for invalid
* method name.
*
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class CallbackStringForm
{
/**
* @var string
*/
private $parsed;
/**
* @param callable $callback
*/
public function __construct($callback)
{
$this->parsed = $this->parseCallback($callback);
}
/**
* @param \Brain\Monkey\Name\CallbackStringForm $callback
* @return bool
*/
public function equals(CallbackStringForm $callback)
{
return (string)$this === (string)$callback;
}
/**
* @return string
*/
public function __toString()
{
return $this->parsed;
}
/**
* @param mixed $callback
* @return string
*/
private function parseCallback($callback)
{
if ( ! is_callable($callback, true)) {
throw Exception\InvalidCallable::forCallable($callback);
}
if (is_string($callback)) {
return $this->parseString($callback);
}
$is_object = is_object($callback);
if ($is_object && ! is_callable($callback)) {
throw new Exception\NotInvokableObjectAsCallback();
}
if ($is_object) {
return $callback instanceof \Closure
? (string)new ClosureStringForm($callback)
: get_class($callback).'()';
}
list($object, $method) = $callback;
$method_name = (new MethodName($method))->name();
if (is_string($object)) {
$class_name = (new ClassName($object))->fullyQualifiedName();
$this->assertMethodCallable($class_name, $method_name, $callback);
return "{$class_name}::{$method_name}()";
}
if ( ! is_callable([$object, $method_name])) {
throw new Exception\NotInvokableObjectAsCallback();
}
$class_name = (new ClassName(get_class($object)))->fullyQualifiedName();
return ltrim("{$class_name}->{$method_name}()", '\\');
}
/**
* @param string $callback
* @return string
*/
private function parseString($callback)
{
$callback = trim($callback);
if (
(strpos($callback, 'function') === 0 || strpos($callback, 'static') === 0)
&& substr($callback, -1) === ')'
) {
try {
return ClosureStringForm::normalizeString($callback);
} catch (Exception\Exception $exception) {
throw Exception\InvalidCallable::forCallable($callback);
}
}
$is_static_method = substr_count($callback, '::') === 1;
$is_normalized_form = substr($callback, -2) === '()';
// Callback is a static method passed as string, like "Foo\Bar::some_method"
if ($is_static_method && ! $is_normalized_form) {
return $this->parseCallback(explode('::', $callback));
}
// If this is not a string in normalized form, we just check is a valid function name
if ( ! $is_normalized_form) {
return (new FunctionName($callback))->fullyQualifiedName();
}
// remove parenthesis
$callback = preg_replace('~\(\)$~', '', $callback);
$is_dynamic_method = substr_count($callback, '->') === 1;
// If this is a normalized form of a static or dynamic method let's check that both class
// and method names are fine
if ($is_dynamic_method || $is_static_method) {
$separator = $is_dynamic_method ? '->' : '::';
list($class, $method) = explode($separator, $callback);
$class_name = (new ClassName($class))->fullyQualifiedName();
$method_name = (new MethodName($method))->name();
$this->assertMethodCallable($class_name, $method, "{$callback}()");
return ltrim("{$class_name}{$separator}{$method_name}()", '\\');
}
// Last chance is that the string is fully qualified name of an invokable object.
$class_name = (new ClassName($callback))->fullyQualifiedName();
// Check `__invoke` method existence only if class is available
if (class_exists($class_name) && ! method_exists($class_name, '__invoke')) {
throw new Exception\NotInvokableObjectAsCallback();
}
return ltrim("{$class_name}()", '\\');
}
/**
* Ensure method existence only if class is available.
*
* @param string $class_name
* @param string $method
* @param string|array $callable
*/
private function assertMethodCallable($class_name, $method, $callable)
{
if (
class_exists($class_name)
&& ! (method_exists($class_name, $method) || is_callable([$class_name, $method]))
) {
throw Exception\InvalidCallable::forCallable($callable);
}
}
}

View file

@ -1,71 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class ClassName
{
/**
* @var \Brain\Monkey\Name\FunctionName
*/
private $function_name;
/**
* @param string $class_name
*/
public function __construct($class_name)
{
try {
$this->function_name = new FunctionName($class_name);
} catch (Exception\InvalidName $e) {
throw Exception\InvalidName::forClass($class_name);
}
}
/**
* @return string
*/
public function fullyQualifiedName()
{
return $this->function_name->fullyQualifiedName();
}
/**
* @return string
*/
public function shortName()
{
return $this->function_name->shortName();
}
/**
* @return string
*/
public function getNamespace()
{
return $this->function_name->getNamespace();
}
/**
* @param \Brain\Monkey\Name\ClassName $name
* @return bool
*/
public function equals(ClassName $name)
{
return $this->fullyQualifiedName() === $name->fullyQualifiedName();
}
}

View file

@ -1,145 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name;
use Brain\Monkey\Name\Exception\InvalidClosureParam;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class ClosureParamStringForm
{
const PARAM_SUBPATTERN = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(\\\\[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)*';
const VALID_PARAM_PATTERN = '/^' . self::PARAM_SUBPATTERN . '$/';
const REFLECTION_PARAM_PATTERN = '/\[\s\<\w+?>\s(' . self::PARAM_SUBPATTERN . ')/s';
private $param_name;
/**
* @var string
*/
private $type_name;
/**
* @var bool
*/
private $variadic;
/**
* @param string $param
* @return static
*/
public static function fromString($param)
{
$param = trim($param);
$variadic = substr_count($param, '...') === 1;
$variadic and $param = str_replace('.', '', $param);
$parts = array_filter(explode(' ', $param));
$count = count($parts);
if ($count !== 2 && $count !== 1) {
throw InvalidClosureParam::forInvalidName($param);
}
$name = array_pop($parts);
$type = $parts ? ltrim(array_pop($parts), '\\') : '';
strpos($name, '$') === 0 and $name = substr($name, 1);
if ($name && ! preg_match(self::VALID_PARAM_PATTERN, $name)) {
throw InvalidClosureParam::forInvalidName($name);
}
if ($type && ! preg_match(self::VALID_PARAM_PATTERN, $type)) {
throw InvalidClosureParam::forInvalidType($type, $name);
}
return new static($name, $type, $variadic);
}
/**
* @param \ReflectionParameter $parameter
* @return static
*/
public static function fromReflectionParameter(\ReflectionParameter $parameter)
{
$type = '';
if (PHP_MAJOR_VERSION >= 7) {
if ($parameter->hasType()) {
$type = $parameter->getType();
if ($type instanceof \ReflectionNamedType) {
// PHP >= 7.1.
$type = $type->getName();
}
// In PHP 7.0 the ReflectionType::__toString() method will retrieve the type.
$type = ltrim($type, '\\');
}
} else {
preg_match(self::REFLECTION_PARAM_PATTERN, $parameter->__toString(), $matches);
if (isset($matches[1])) {
$type = $matches[1];
}
}
return new static($parameter->getName(), $type, $parameter->isVariadic());
}
/**
* @param string $param_name
* @param string $type_name
* @param bool $variadic
*/
private function __construct($param_name, $type_name = '', $variadic = false)
{
if ( ! is_string($param_name) || ! $param_name) {
throw InvalidClosureParam::forInvalidName($param_name);
}
$this->param_name = $param_name;
$this->type_name = $type_name;
$this->variadic = $variadic;
}
/**
* @param \Brain\Monkey\Name\ClosureParamStringForm $param
* @return bool
*/
public function equals(ClosureParamStringForm $param)
{
return $this->__toString() === (string)$param;
}
/**
* @return string
*/
public function __toString()
{
$string = $this->type_name ? "{$this->type_name} " : '';
$this->variadic and $string .= '...';
$string .= '$'.$this->param_name;
return $string;
}
/**
* @return bool
*/
public function isVariadic()
{
return $this->variadic;
}
}

View file

@ -1,126 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name;
use Brain\Monkey\Name\Exception\InvalidCallable;
use Brain\Monkey\Name\Exception\InvalidClosureParam;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class ClosureStringForm
{
const CLOSURE_PATTERN = '/^(static\s+)?function\s*\((.*?)\)$/';
/**
* @var string
*/
private $name;
/**
* @param string $closure_string
* @return string
*/
public static function normalizeString($closure_string)
{
if (
! is_string($closure_string)
|| ! preg_match(self::CLOSURE_PATTERN, trim($closure_string), $matches)
) {
throw InvalidCallable::forCallable($closure_string);
}
$raw_params = trim($matches[2]);
$static = trim($matches[1]);
$normalized = $static ? 'static function (' : 'function (';
if ( ! $raw_params) {
return "{$normalized})";
}
$variadic = false;
$params = explode(',', $raw_params);
$normalized = array_reduce($params, function ($normalized, $param_name) use (&$variadic) {
$param = ClosureParamStringForm::fromString($param_name);
$is_variadic = $param->isVariadic();
if ($variadic && $is_variadic) {
throw InvalidClosureParam::forMultipleVariadic($param_name);
}
$is_variadic and $variadic = true;
return $normalized.(string)$param.', ';
}, $normalized);
return rtrim($normalized, ', ').')';
}
/**
* @param \Closure $closure
*/
public function __construct(\Closure $closure)
{
$this->name = $this->buildName($closure);
}
/**
* @return string
*/
public function __toString()
{
return $this->name;
}
/**
* @param \Brain\Monkey\Name\ClosureStringForm $name
* @return bool
*/
public function equals(ClosureStringForm $name)
{
return $this->__toString() === (string)$name;
}
/**
* Checks the name of a function and throw an exception if is not valid.
* When name is valid returns an array of the name itself and its namespace parts.
*
* @param \Closure $closure
* @return string
*/
private function buildName(\Closure $closure)
{
$reflection = new \ReflectionFunction($closure);
// Quite hackish, but it seems there's no better way to get if a closure is static
$bind = @\Closure::bind($closure, new \stdClass);
$static =
$bind === null
|| (new \ReflectionFunction($bind))->getClosureThis() === null;
$arguments = array_map('strval', array_map(
[ClosureParamStringForm::class, 'fromReflectionParameter'],
$reflection->getParameters()
));
$name = $static ? 'static function (' : 'function (';
return $name.implode(', ', $arguments).')';
}
}

View file

@ -1,24 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name\Exception;
use Brain\Monkey\Exception as BaseException;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class Exception extends BaseException
{
}

View file

@ -1,41 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidCallable extends Exception
{
/**
* @param mixed $callback
* @return \Brain\Monkey\Name\Exception\InvalidCallable|\Brain\Monkey\Name\Exception\NotInvokableObjectAsCallback
*/
public static function forCallable($callback)
{
if (is_object($callback)) {
return new NotInvokableObjectAsCallback();
}
return new static(
sprintf(
'Given %s "%s" is not a valid PHP callable.',
gettype($callback),
is_string($callback) ? "{$callback}" : var_export($callback, true)
)
);
}
}

View file

@ -1,66 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidClosureParam extends Exception
{
const CODE_INVALID_NAME = 1;
const CODE_INVALID_TYPE = 2;
const CODE_MULTIPLE_VARIADIC = 3;
/**
* @param string $name
* @return static
*/
public static function forInvalidName($name)
{
return new static(
sprintf('%s is not a valid function argument name.', $name),
self::CODE_INVALID_NAME
);
}
/**
* @param string $type
* @param string $name
* @return static
*/
public static function forInvalidType($type, $name)
{
return new static(
sprintf('%s is not a valid function argument type for argument %s.', $type, $name),
self::CODE_INVALID_TYPE
);
}
/**
* @param string $name
* @return static
*/
public static function forMultipleVariadic($name)
{
return new static(
sprintf(
'%s is a variadic argument for a function that already has a variadic argument.',
$name
),
self::CODE_MULTIPLE_VARIADIC
);
}
}

View file

@ -1,87 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class InvalidName extends Exception
{
const CODE_FOR_FUNCTION = 1;
const CODE_FOR_CLASS = 2;
const CODE_FOR_METHOD = 3;
/**
* @param string $function
* @return \Brain\Monkey\Name\Exception\InvalidName
*/
public static function forFunction($function)
{
return self::createFor($function, self::CODE_FOR_FUNCTION);
}
/**
* @param string $class
* @return \Brain\Monkey\Name\Exception\InvalidName
*/
public static function forClass($class)
{
return self::createFor($class, self::CODE_FOR_CLASS);
}
/**
* @param string $function
* @return \Brain\Monkey\Name\Exception\InvalidName
*/
public static function forMethod($function)
{
return self::createFor($function, self::CODE_FOR_METHOD);
}
/**
* @param mixed $thing
* @param int $code
* @return static
*/
private static function createFor($thing, $code)
{
switch ($code) {
case self::CODE_FOR_CLASS:
$type = 'class';
break;
case self::CODE_FOR_METHOD:
$type = 'class method';
break;
case self::CODE_FOR_FUNCTION:
default:
$type = 'function';
break;
}
switch (true) {
case is_string($thing):
$name = "'{$thing}'";
break;
case is_object($thing):
$name = 'An instance of '.get_class($thing);
break;
default:
$name = 'A variable of type '.gettype($thing);
}
return new static(sprintf('%s is not a valid %s name.', $name, $type), $code);
}
}

View file

@ -1,29 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name\Exception;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
class NotInvokableObjectAsCallback extends Exception
{
public function __construct()
{
parent::__construct(
'Only closures and invokable objects can be used as callbacks for hooks.'
);
}
}

View file

@ -1,97 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class FunctionName
{
const VALID_NAME_PATTERN = '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/';
/**
* @var string
*/
private $function_name = '';
/**
* @var string
*/
private $namespace = '';
/**
* @param string $function_name
*/
public function __construct($function_name)
{
list($this->function_name, $this->namespace) = $this->parseName($function_name);
}
/**
* @return string
*/
public function fullyQualifiedName()
{
return ltrim("{$this->namespace}\\{$this->function_name}", '\\');
}
/**
* @return string
*/
public function shortName()
{
return $this->function_name;
}
/**
* @return string
*/
public function getNamespace()
{
return $this->namespace;
}
/**
* @param \Brain\Monkey\Name\FunctionName $name
* @return bool
*/
public function equals(FunctionName $name)
{
return $this->fullyQualifiedName() === $name->fullyQualifiedName();
}
/**
* Checks the name of a function and throw an exception if is not valid.
* When name is valid returns an array of the name itself and its namespace parts.
*
* @param mixed $function_name
* @return string[]
*/
private function parseName($function_name)
{
$chunks = is_string($function_name) ? explode('\\', ltrim($function_name, '\\')) : null;
$valid = $chunks ? preg_filter(self::VALID_NAME_PATTERN, '$0', $chunks) : null;
if ( ! $valid || $valid !== $chunks) {
$name = is_string($function_name)
? "'{$function_name}'"
: 'Variable of type '.gettype($function_name);
throw Exception\InvalidName::forFunction($name);
}
return [array_pop($chunks), implode('\\', $chunks)];
}
}

View file

@ -1,61 +0,0 @@
<?php # -*- coding: utf-8 -*-
/*
* This file is part of the BrainMonkey package.
*
* (c) Giuseppe Mazzapica
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Brain\Monkey\Name;
/**
* @author Giuseppe Mazzapica <giuseppe.mazzapica@gmail.com>
* @package BrainMonkey
* @license http://opensource.org/licenses/MIT MIT
*/
final class MethodName
{
/**
* @var string
*/
private $name;
/**
* @param string $method_name
*/
public function __construct($method_name)
{
try {
$function_name = new FunctionName($method_name);
} catch (Exception\InvalidName $e) {
throw Exception\InvalidName::forMethod($method_name);
}
if ($function_name->getNamespace()) {
throw Exception\InvalidName::forMethod($method_name);
}
$this->name = $function_name->shortName();
}
/**
* @return string
*/
public function name()
{
return $this->name;
}
/**
* @param \Brain\Monkey\Name\MethodName $name
* @return bool
*/
public function equals(MethodName $name)
{
return $this->name() === $name->name();
}
}

View file

@ -1,579 +0,0 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer\Autoload;
/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
*
* $loader = new \Composer\Autoload\ClassLoader();
*
* // register classes with namespaces
* $loader->add('Symfony\Component', __DIR__.'/component');
* $loader->add('Symfony', __DIR__.'/framework');
*
* // activate the autoloader
* $loader->register();
*
* // to enable searching the include path (eg. for PEAR packages)
* $loader->setUseIncludePath(true);
*
* In this example, if you try to use a class in the Symfony\Component
* namespace or one of its children (Symfony\Component\Console for instance),
* the autoloader will first look for the class under the component/
* directory, and it will then fallback to the framework/ directory if not
* found before giving up.
*
* This class is loosely based on the Symfony UniversalClassLoader.
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
/** @var \Closure(string):void */
private static $includeFile;
/** @var string|null */
private $vendorDir;
// PSR-4
/**
* @var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array();
/**
* @var array<string, list<string>>
*/
private $prefixDirsPsr4 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr4 = array();
// PSR-0
/**
* List of PSR-0 prefixes
*
* Structured as array('F (first letter)' => array('Foo\Bar (full prefix)' => array('path', 'path2')))
*
* @var array<string, array<string, list<string>>>
*/
private $prefixesPsr0 = array();
/**
* @var list<string>
*/
private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false;
/**
* @var array<string, string>
*/
private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false;
/**
* @var array<string, bool>
*/
private $missingClasses = array();
/** @var string|null */
private $apcuPrefix;
/**
* @var array<string, self>
*/
private static $registeredLoaders = array();
/**
* @param string|null $vendorDir
*/
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}
return array();
}
/**
* @return array<string, list<string>>
*/
public function getPrefixesPsr4()
{
return $this->prefixDirsPsr4;
}
/**
* @return list<string>
*/
public function getFallbackDirs()
{
return $this->fallbackDirsPsr0;
}
/**
* @return list<string>
*/
public function getFallbackDirsPsr4()
{
return $this->fallbackDirsPsr4;
}
/**
* @return array<string, string> Array of classname => path
*/
public function getClassMap()
{
return $this->classMap;
}
/**
* @param array<string, string> $classMap Class to filename map
*
* @return void
*/
public function addClassMap(array $classMap)
{
if ($this->classMap) {
$this->classMap = array_merge($this->classMap, $classMap);
} else {
$this->classMap = $classMap;
}
}
/**
* Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories
*
* @return void
*/
public function add($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
if ($prepend) {
$this->fallbackDirsPsr0 = array_merge(
$paths,
$this->fallbackDirsPsr0
);
} else {
$this->fallbackDirsPsr0 = array_merge(
$this->fallbackDirsPsr0,
$paths
);
}
return;
}
$first = $prefix[0];
if (!isset($this->prefixesPsr0[$first][$prefix])) {
$this->prefixesPsr0[$first][$prefix] = $paths;
return;
}
if ($prepend) {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$paths,
$this->prefixesPsr0[$first][$prefix]
);
} else {
$this->prefixesPsr0[$first][$prefix] = array_merge(
$this->prefixesPsr0[$first][$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function addPsr4($prefix, $paths, $prepend = false)
{
$paths = (array) $paths;
if (!$prefix) {
// Register directories for the root namespace.
if ($prepend) {
$this->fallbackDirsPsr4 = array_merge(
$paths,
$this->fallbackDirsPsr4
);
} else {
$this->fallbackDirsPsr4 = array_merge(
$this->fallbackDirsPsr4,
$paths
);
}
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
// Register directories for a new namespace.
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = $paths;
} elseif ($prepend) {
// Prepend directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$paths,
$this->prefixDirsPsr4[$prefix]
);
} else {
// Append directories for an already registered namespace.
$this->prefixDirsPsr4[$prefix] = array_merge(
$this->prefixDirsPsr4[$prefix],
$paths
);
}
}
/**
* Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix.
*
* @param string $prefix The prefix
* @param list<string>|string $paths The PSR-0 base directories
*
* @return void
*/
public function set($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr0 = (array) $paths;
} else {
$this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
}
}
/**
* Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param list<string>|string $paths The PSR-4 base directories
*
* @throws \InvalidArgumentException
*
* @return void
*/
public function setPsr4($prefix, $paths)
{
if (!$prefix) {
$this->fallbackDirsPsr4 = (array) $paths;
} else {
$length = strlen($prefix);
if ('\\' !== $prefix[$length - 1]) {
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
}
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
$this->prefixDirsPsr4[$prefix] = (array) $paths;
}
}
/**
* Turns on searching the include path for class files.
*
* @param bool $useIncludePath
*
* @return void
*/
public function setUseIncludePath($useIncludePath)
{
$this->useIncludePath = $useIncludePath;
}
/**
* Can be used to check if the autoloader uses the include path to check
* for classes.
*
* @return bool
*/
public function getUseIncludePath()
{
return $this->useIncludePath;
}
/**
* Turns off searching the prefix and fallback directories for classes
* that have not been registered with the class map.
*
* @param bool $classMapAuthoritative
*
* @return void
*/
public function setClassMapAuthoritative($classMapAuthoritative)
{
$this->classMapAuthoritative = $classMapAuthoritative;
}
/**
* Should class lookup fail if not found in the current class map?
*
* @return bool
*/
public function isClassMapAuthoritative()
{
return $this->classMapAuthoritative;
}
/**
* APCu prefix to use to cache found/not-found classes, if the extension is enabled.
*
* @param string|null $apcuPrefix
*
* @return void
*/
public function setApcuPrefix($apcuPrefix)
{
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
}
/**
* The APCu prefix in use, or null if APCu caching is not enabled.
*
* @return string|null
*/
public function getApcuPrefix()
{
return $this->apcuPrefix;
}
/**
* Registers this instance as an autoloader.
*
* @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
* Unregisters this instance as an autoloader.
*
* @return void
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
return false;
}
if (null !== $this->apcuPrefix) {
$file = apcu_fetch($this->apcuPrefix.$class, $hit);
if ($hit) {
return $file;
}
}
$file = $this->findFileWithExtension($class, '.php');
// Search for Hack files if we are running on HHVM
if (false === $file && defined('HHVM_VERSION')) {
$file = $this->findFileWithExtension($class, '.hh');
}
if (null !== $this->apcuPrefix) {
apcu_add($this->apcuPrefix.$class, $file);
}
if (false === $file) {
// Remember that this class does not exist.
$this->missingClasses[$class] = true;
}
return $file;
}
/**
* Returns the currently registered loaders keyed by their corresponding vendor directories.
*
* @return array<string, self>
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
$first = $class[0];
if (isset($this->prefixLengthsPsr4[$first])) {
$subPath = $class;
while (false !== $lastPos = strrpos($subPath, '\\')) {
$subPath = substr($subPath, 0, $lastPos);
$search = $subPath . '\\';
if (isset($this->prefixDirsPsr4[$search])) {
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
foreach ($this->prefixDirsPsr4[$search] as $dir) {
if (file_exists($file = $dir . $pathEnd)) {
return $file;
}
}
}
}
}
// PSR-4 fallback dirs
foreach ($this->fallbackDirsPsr4 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
return $file;
}
}
// PSR-0 lookup
if (false !== $pos = strrpos($class, '\\')) {
// namespaced class name
$logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
. strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
} else {
// PEAR-like class name
$logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
}
if (isset($this->prefixesPsr0[$first])) {
foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
}
}
}
// PSR-0 fallback dirs
foreach ($this->fallbackDirsPsr0 as $dir) {
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
return $file;
}
}
// PSR-0 include paths.
if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
return $file;
}
return false;
}
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}

View file

@ -1,378 +0,0 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['uberrxmprk'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = strtr(__DIR__, '\\', '/');
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}
return $installed;
}
}

View file

@ -1,378 +0,0 @@
<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require its presence, you can require `composer-runtime-api ^2.0`
*
* @final
*/
class InstalledVersions
{
/**
* @var mixed[]|null
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
*/
private static $installed;
/**
* @var bool
*/
private static $installedIsLocalDir;
/**
* @var bool|null
*/
private static $canGetVendors;
/**
* @var array[]
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || !isset($installed['versions'][$packageName]['dev_requirement']) || $installed['versions'][$packageName]['dev_requirement'] === false;
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
* @return bool
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints((string) $constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
*/
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
*/
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @param string $packageName
* @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
* @return array[]
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* this class but then also needs to execute another project's autoloader in process,
* and wants to ensure both projects have access to their version of installed.php.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
// so we have to assume it does not, and that may result in duplicate data being returned when listing
// all installed packages for example
self::$installedIsLocalDir = false;
}
/**
* @return array[]
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
$copiedLocalDir = false;
if (self::$canGetVendors) {
$selfDir = strtr(__DIR__, '\\', '/');
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
$vendorDir = strtr($vendorDir, '\\', '/');
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require $vendorDir.'/composer/installed.php';
self::$installedByVendor[$vendorDir] = $required;
$installed[] = $required;
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
self::$installed = $required;
self::$installedIsLocalDir = true;
}
}
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
$copiedLocalDir = true;
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
if (substr(__DIR__, -8, 1) !== 'C') {
/** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
$required = require __DIR__ . '/installed.php';
self::$installed = $required;
} else {
self::$installed = array();
}
}
if (self::$installed !== array() && !$copiedLocalDir) {
$installed[] = self::$installed;
}
return $installed;
}
}

View file

@ -1,21 +0,0 @@
Copyright (c) Nils Adermann, Jordi Boggiano
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,712 +0,0 @@
<?php
// autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Hamcrest\\Arrays\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php',
'Hamcrest\\Arrays\\IsArrayContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php',
'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php',
'Hamcrest\\Arrays\\IsArrayContainingInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php',
'Hamcrest\\Arrays\\IsArrayContainingKey' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php',
'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php',
'Hamcrest\\Arrays\\IsArrayWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php',
'Hamcrest\\Arrays\\MatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php',
'Hamcrest\\Arrays\\SeriesMatchingOnce' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php',
'Hamcrest\\AssertionError' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php',
'Hamcrest\\BaseDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php',
'Hamcrest\\BaseMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php',
'Hamcrest\\Collection\\IsEmptyTraversable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php',
'Hamcrest\\Collection\\IsTraversableWithSize' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php',
'Hamcrest\\Core\\AllOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php',
'Hamcrest\\Core\\AnyOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php',
'Hamcrest\\Core\\CombinableMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php',
'Hamcrest\\Core\\DescribedAs' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php',
'Hamcrest\\Core\\Every' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php',
'Hamcrest\\Core\\HasToString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php',
'Hamcrest\\Core\\Is' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php',
'Hamcrest\\Core\\IsAnything' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php',
'Hamcrest\\Core\\IsCollectionContaining' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php',
'Hamcrest\\Core\\IsEqual' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php',
'Hamcrest\\Core\\IsIdentical' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php',
'Hamcrest\\Core\\IsInstanceOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php',
'Hamcrest\\Core\\IsNot' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php',
'Hamcrest\\Core\\IsNull' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php',
'Hamcrest\\Core\\IsSame' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php',
'Hamcrest\\Core\\IsTypeOf' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php',
'Hamcrest\\Core\\Set' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php',
'Hamcrest\\Core\\ShortcutCombination' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php',
'Hamcrest\\Description' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php',
'Hamcrest\\DiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php',
'Hamcrest\\FeatureMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php',
'Hamcrest\\Internal\\SelfDescribingValue' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php',
'Hamcrest\\Matcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php',
'Hamcrest\\MatcherAssert' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php',
'Hamcrest\\Matchers' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php',
'Hamcrest\\NullDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php',
'Hamcrest\\Number\\IsCloseTo' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php',
'Hamcrest\\Number\\OrderingComparison' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php',
'Hamcrest\\SelfDescribing' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php',
'Hamcrest\\StringDescription' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php',
'Hamcrest\\Text\\IsEmptyString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php',
'Hamcrest\\Text\\IsEqualIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php',
'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php',
'Hamcrest\\Text\\MatchesPattern' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php',
'Hamcrest\\Text\\StringContains' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php',
'Hamcrest\\Text\\StringContainsIgnoringCase' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php',
'Hamcrest\\Text\\StringContainsInOrder' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php',
'Hamcrest\\Text\\StringEndsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php',
'Hamcrest\\Text\\StringStartsWith' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php',
'Hamcrest\\Text\\SubstringMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php',
'Hamcrest\\TypeSafeDiagnosingMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php',
'Hamcrest\\TypeSafeMatcher' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php',
'Hamcrest\\Type\\IsArray' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php',
'Hamcrest\\Type\\IsBoolean' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php',
'Hamcrest\\Type\\IsCallable' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php',
'Hamcrest\\Type\\IsDouble' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php',
'Hamcrest\\Type\\IsInteger' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php',
'Hamcrest\\Type\\IsNumeric' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php',
'Hamcrest\\Type\\IsObject' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php',
'Hamcrest\\Type\\IsResource' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php',
'Hamcrest\\Type\\IsScalar' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php',
'Hamcrest\\Type\\IsString' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php',
'Hamcrest\\Util' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
'Hamcrest\\Xml\\HasXPath' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
'PHPUnit\\Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php',
'PHPUnit\\Framework\\Assert' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert.php',
'PHPUnit\\Framework\\AssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
'PHPUnit\\Framework\\CodeCoverageException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php',
'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php',
'PHPUnit\\Framework\\Constraint\\BinaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php',
'PHPUnit\\Framework\\Constraint\\Callback' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php',
'PHPUnit\\Framework\\Constraint\\Constraint' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
'PHPUnit\\Framework\\Constraint\\Count' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php',
'PHPUnit\\Framework\\Constraint\\DirectoryExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php',
'PHPUnit\\Framework\\Constraint\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php',
'PHPUnit\\Framework\\Constraint\\ExceptionCode' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php',
'PHPUnit\\Framework\\Constraint\\FileExists' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php',
'PHPUnit\\Framework\\Constraint\\GreaterThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php',
'PHPUnit\\Framework\\Constraint\\IsAnything' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
'PHPUnit\\Framework\\Constraint\\IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php',
'PHPUnit\\Framework\\Constraint\\IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php',
'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php',
'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php',
'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php',
'PHPUnit\\Framework\\Constraint\\IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php',
'PHPUnit\\Framework\\Constraint\\IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php',
'PHPUnit\\Framework\\Constraint\\IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
'PHPUnit\\Framework\\Constraint\\IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php',
'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php',
'PHPUnit\\Framework\\Constraint\\IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php',
'PHPUnit\\Framework\\Constraint\\IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php',
'PHPUnit\\Framework\\Constraint\\IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php',
'PHPUnit\\Framework\\Constraint\\IsReadable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php',
'PHPUnit\\Framework\\Constraint\\IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php',
'PHPUnit\\Framework\\Constraint\\IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php',
'PHPUnit\\Framework\\Constraint\\IsWritable' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php',
'PHPUnit\\Framework\\Constraint\\JsonMatches' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
'PHPUnit\\Framework\\Constraint\\LessThan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php',
'PHPUnit\\Framework\\Constraint\\LogicalAnd' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php',
'PHPUnit\\Framework\\Constraint\\LogicalNot' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php',
'PHPUnit\\Framework\\Constraint\\LogicalOr' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php',
'PHPUnit\\Framework\\Constraint\\LogicalXor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php',
'PHPUnit\\Framework\\Constraint\\ObjectEquals' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php',
'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php',
'PHPUnit\\Framework\\Constraint\\Operator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php',
'PHPUnit\\Framework\\Constraint\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php',
'PHPUnit\\Framework\\Constraint\\SameSize' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php',
'PHPUnit\\Framework\\Constraint\\StringContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php',
'PHPUnit\\Framework\\Constraint\\StringEndsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php',
'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php',
'PHPUnit\\Framework\\Constraint\\StringStartsWith' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php',
'PHPUnit\\Framework\\Constraint\\TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php',
'PHPUnit\\Framework\\Constraint\\UnaryOperator' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php',
'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php',
'PHPUnit\\Framework\\DataProviderTestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
'PHPUnit\\Framework\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Error.php',
'PHPUnit\\Framework\\ErrorTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/ErrorTestCase.php',
'PHPUnit\\Framework\\Error\\Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
'PHPUnit\\Framework\\Error\\Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Error.php',
'PHPUnit\\Framework\\Error\\Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php',
'PHPUnit\\Framework\\Error\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Warning.php',
'PHPUnit\\Framework\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Exception.php',
'PHPUnit\\Framework\\ExceptionWrapper' => $vendorDir . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
'PHPUnit\\Framework\\ExecutionOrderDependency' => $vendorDir . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php',
'PHPUnit\\Framework\\ExpectationFailedException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php',
'PHPUnit\\Framework\\IncompleteTest' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
'PHPUnit\\Framework\\IncompleteTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
'PHPUnit\\Framework\\IncompleteTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php',
'PHPUnit\\Framework\\InvalidArgumentException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php',
'PHPUnit\\Framework\\InvalidCoversTargetException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php',
'PHPUnit\\Framework\\InvalidDataProviderException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php',
'PHPUnit\\Framework\\InvalidParameterGroupException' => $vendorDir . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
'PHPUnit\\Framework\\MissingCoversAnnotationException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php',
'PHPUnit\\Framework\\MockObject\\Api' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php',
'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php',
'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
'PHPUnit\\Framework\\MockObject\\CannotUseAddMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php',
'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php',
'PHPUnit\\Framework\\MockObject\\ClassAlreadyExistsException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php',
'PHPUnit\\Framework\\MockObject\\ClassIsFinalException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php',
'PHPUnit\\Framework\\MockObject\\ClassIsReadonlyException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php',
'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php',
'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php',
'PHPUnit\\Framework\\MockObject\\DuplicateMethodException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php',
'PHPUnit\\Framework\\MockObject\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
'PHPUnit\\Framework\\MockObject\\Generator' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php',
'PHPUnit\\Framework\\MockObject\\InvalidMethodNameException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php',
'PHPUnit\\Framework\\MockObject\\Invocation' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php',
'PHPUnit\\Framework\\MockObject\\InvocationHandler' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php',
'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php',
'PHPUnit\\Framework\\MockObject\\Matcher' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php',
'PHPUnit\\Framework\\MockObject\\Method' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php',
'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php',
'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MockBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
'PHPUnit\\Framework\\MockObject\\MockClass' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php',
'PHPUnit\\Framework\\MockObject\\MockMethod' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
'PHPUnit\\Framework\\MockObject\\MockMethodSet' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
'PHPUnit\\Framework\\MockObject\\MockObject' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
'PHPUnit\\Framework\\MockObject\\MockTrait' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
'PHPUnit\\Framework\\MockObject\\MockType' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php',
'PHPUnit\\Framework\\MockObject\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php',
'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php',
'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php',
'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php',
'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php',
'PHPUnit\\Framework\\MockObject\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
'PHPUnit\\Framework\\MockObject\\SoapExtensionNotAvailableException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php',
'PHPUnit\\Framework\\MockObject\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php',
'PHPUnit\\Framework\\MockObject\\UnknownClassException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php',
'PHPUnit\\Framework\\MockObject\\Verifiable' => $vendorDir . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
'PHPUnit\\Framework\\NoChildTestSuiteException' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
'PHPUnit\\Framework\\OutputError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
'PHPUnit\\Framework\\PHPTAssertionFailedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php',
'PHPUnit\\Framework\\Reorderable' => $vendorDir . '/phpunit/phpunit/src/Framework/Reorderable.php',
'PHPUnit\\Framework\\RiskyTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php',
'PHPUnit\\Framework\\SelfDescribing' => $vendorDir . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
'PHPUnit\\Framework\\SkippedTest' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTest.php',
'PHPUnit\\Framework\\SkippedTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
'PHPUnit\\Framework\\SkippedTestError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php',
'PHPUnit\\Framework\\SkippedTestSuiteError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php',
'PHPUnit\\Framework\\SyntheticError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php',
'PHPUnit\\Framework\\SyntheticSkippedError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php',
'PHPUnit\\Framework\\Test' => $vendorDir . '/phpunit/phpunit/src/Framework/Test.php',
'PHPUnit\\Framework\\TestBuilder' => $vendorDir . '/phpunit/phpunit/src/Framework/TestBuilder.php',
'PHPUnit\\Framework\\TestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/TestCase.php',
'PHPUnit\\Framework\\TestFailure' => $vendorDir . '/phpunit/phpunit/src/Framework/TestFailure.php',
'PHPUnit\\Framework\\TestListener' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListener.php',
'PHPUnit\\Framework\\TestListenerDefaultImplementation' => $vendorDir . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
'PHPUnit\\Framework\\TestResult' => $vendorDir . '/phpunit/phpunit/src/Framework/TestResult.php',
'PHPUnit\\Framework\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite.php',
'PHPUnit\\Framework\\TestSuiteIterator' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php',
'PHPUnit\\Framework\\Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Exception/Warning.php',
'PHPUnit\\Framework\\WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
'PHPUnit\\Runner\\AfterIncompleteTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
'PHPUnit\\Runner\\AfterLastTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
'PHPUnit\\Runner\\AfterRiskyTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
'PHPUnit\\Runner\\AfterSkippedTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
'PHPUnit\\Runner\\AfterSuccessfulTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
'PHPUnit\\Runner\\AfterTestErrorHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
'PHPUnit\\Runner\\AfterTestFailureHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
'PHPUnit\\Runner\\AfterTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
'PHPUnit\\Runner\\AfterTestWarningHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
'PHPUnit\\Runner\\BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
'PHPUnit\\Runner\\BeforeFirstTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
'PHPUnit\\Runner\\BeforeTestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
'PHPUnit\\Runner\\DefaultTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php',
'PHPUnit\\Runner\\Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php',
'PHPUnit\\Runner\\Extension\\ExtensionHandler' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php',
'PHPUnit\\Runner\\Extension\\PharLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php',
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
'PHPUnit\\Runner\\Hook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
'PHPUnit\\Runner\\NullTestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/NullTestResultCache.php',
'PHPUnit\\Runner\\PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
'PHPUnit\\Runner\\ResultCacheExtension' => $vendorDir . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
'PHPUnit\\Runner\\StandardTestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
'PHPUnit\\Runner\\TestHook' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
'PHPUnit\\Runner\\TestListenerAdapter' => $vendorDir . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
'PHPUnit\\Runner\\TestResultCache' => $vendorDir . '/phpunit/phpunit/src/Runner/TestResultCache.php',
'PHPUnit\\Runner\\TestSuiteLoader' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
'PHPUnit\\Runner\\TestSuiteSorter' => $vendorDir . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
'PHPUnit\\Runner\\Version' => $vendorDir . '/phpunit/phpunit/src/Runner/Version.php',
'PHPUnit\\TextUI\\CliArguments\\Builder' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Builder.php',
'PHPUnit\\TextUI\\CliArguments\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php',
'PHPUnit\\TextUI\\CliArguments\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Exception.php',
'PHPUnit\\TextUI\\CliArguments\\Mapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php',
'PHPUnit\\TextUI\\Command' => $vendorDir . '/phpunit/phpunit/src/TextUI/Command.php',
'PHPUnit\\TextUI\\DefaultResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php',
'PHPUnit\\TextUI\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/Exception.php',
'PHPUnit\\TextUI\\Help' => $vendorDir . '/phpunit/phpunit/src/TextUI/Help.php',
'PHPUnit\\TextUI\\ReflectionException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php',
'PHPUnit\\TextUI\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
'PHPUnit\\TextUI\\RuntimeException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php',
'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php',
'PHPUnit\\TextUI\\TestFileNotFoundException' => $vendorDir . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php',
'PHPUnit\\TextUI\\TestRunner' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestRunner.php',
'PHPUnit\\TextUI\\TestSuiteMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/TestSuiteMapper.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\FilterMapper' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Constant' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Directory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php',
'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Extension' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\File' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php',
'PHPUnit\\TextUI\\XmlConfiguration\\FileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\FileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Group' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php',
'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IniSetting' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php',
'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Xml' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Text' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilderException' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Php' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php',
'PHPUnit\\TextUI\\XmlConfiguration\\PhpHandler' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectory' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestFile' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestSuite' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocationTo93' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Variable' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php',
'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollection' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollectionIterator' => $vendorDir . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php',
'PHPUnit\\Util\\Annotation\\DocBlock' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
'PHPUnit\\Util\\Annotation\\Registry' => $vendorDir . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
'PHPUnit\\Util\\Blacklist' => $vendorDir . '/phpunit/phpunit/src/Util/Blacklist.php',
'PHPUnit\\Util\\Cloner' => $vendorDir . '/phpunit/phpunit/src/Util/Cloner.php',
'PHPUnit\\Util\\Color' => $vendorDir . '/phpunit/phpunit/src/Util/Color.php',
'PHPUnit\\Util\\ErrorHandler' => $vendorDir . '/phpunit/phpunit/src/Util/ErrorHandler.php',
'PHPUnit\\Util\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Exception.php',
'PHPUnit\\Util\\ExcludeList' => $vendorDir . '/phpunit/phpunit/src/Util/ExcludeList.php',
'PHPUnit\\Util\\FileLoader' => $vendorDir . '/phpunit/phpunit/src/Util/FileLoader.php',
'PHPUnit\\Util\\Filesystem' => $vendorDir . '/phpunit/phpunit/src/Util/Filesystem.php',
'PHPUnit\\Util\\Filter' => $vendorDir . '/phpunit/phpunit/src/Util/Filter.php',
'PHPUnit\\Util\\GlobalState' => $vendorDir . '/phpunit/phpunit/src/Util/GlobalState.php',
'PHPUnit\\Util\\InvalidDataSetException' => $vendorDir . '/phpunit/phpunit/src/Util/InvalidDataSetException.php',
'PHPUnit\\Util\\Json' => $vendorDir . '/phpunit/phpunit/src/Util/Json.php',
'PHPUnit\\Util\\Log\\JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php',
'PHPUnit\\Util\\Log\\TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
'PHPUnit\\Util\\Printer' => $vendorDir . '/phpunit/phpunit/src/Util/Printer.php',
'PHPUnit\\Util\\Reflection' => $vendorDir . '/phpunit/phpunit/src/Util/Reflection.php',
'PHPUnit\\Util\\RegularExpression' => $vendorDir . '/phpunit/phpunit/src/Util/RegularExpression.php',
'PHPUnit\\Util\\Test' => $vendorDir . '/phpunit/phpunit/src/Util/Test.php',
'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php',
'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
'PHPUnit\\Util\\TestDox\\NamePrettifier' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
'PHPUnit\\Util\\TestDox\\ResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php',
'PHPUnit\\Util\\TestDox\\TextResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => $vendorDir . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
'PHPUnit\\Util\\TextTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
'PHPUnit\\Util\\Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php',
'PHPUnit\\Util\\VersionComparisonOperator' => $vendorDir . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php',
'PHPUnit\\Util\\XdebugFilterScriptGenerator' => $vendorDir . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
'PHPUnit\\Util\\Xml' => $vendorDir . '/phpunit/phpunit/src/Util/Xml.php',
'PHPUnit\\Util\\XmlTestListRenderer' => $vendorDir . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
'PHPUnit\\Util\\Xml\\Exception' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Exception.php',
'PHPUnit\\Util\\Xml\\FailedSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\Loader' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Loader.php',
'PHPUnit\\Util\\Xml\\SchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\SchemaDetector' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaDetector.php',
'PHPUnit\\Util\\Xml\\SchemaFinder' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SchemaFinder.php',
'PHPUnit\\Util\\Xml\\SnapshotNodeList' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php',
'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\ValidationResult' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php',
'PHPUnit\\Util\\Xml\\Validator' => $vendorDir . '/phpunit/phpunit/src/Util/Xml/Validator.php',
'PharIo\\Manifest\\Application' => $vendorDir . '/phar-io/manifest/src/values/Application.php',
'PharIo\\Manifest\\ApplicationName' => $vendorDir . '/phar-io/manifest/src/values/ApplicationName.php',
'PharIo\\Manifest\\Author' => $vendorDir . '/phar-io/manifest/src/values/Author.php',
'PharIo\\Manifest\\AuthorCollection' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollection.php',
'PharIo\\Manifest\\AuthorCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
'PharIo\\Manifest\\AuthorElement' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElement.php',
'PharIo\\Manifest\\AuthorElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
'PharIo\\Manifest\\BundledComponent' => $vendorDir . '/phar-io/manifest/src/values/BundledComponent.php',
'PharIo\\Manifest\\BundledComponentCollection' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollection.php',
'PharIo\\Manifest\\BundledComponentCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
'PharIo\\Manifest\\BundlesElement' => $vendorDir . '/phar-io/manifest/src/xml/BundlesElement.php',
'PharIo\\Manifest\\ComponentElement' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElement.php',
'PharIo\\Manifest\\ComponentElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
'PharIo\\Manifest\\ContainsElement' => $vendorDir . '/phar-io/manifest/src/xml/ContainsElement.php',
'PharIo\\Manifest\\CopyrightElement' => $vendorDir . '/phar-io/manifest/src/xml/CopyrightElement.php',
'PharIo\\Manifest\\CopyrightInformation' => $vendorDir . '/phar-io/manifest/src/values/CopyrightInformation.php',
'PharIo\\Manifest\\ElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ElementCollection.php',
'PharIo\\Manifest\\ElementCollectionException' => $vendorDir . '/phar-io/manifest/src/exceptions/ElementCollectionException.php',
'PharIo\\Manifest\\Email' => $vendorDir . '/phar-io/manifest/src/values/Email.php',
'PharIo\\Manifest\\Exception' => $vendorDir . '/phar-io/manifest/src/exceptions/Exception.php',
'PharIo\\Manifest\\ExtElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtElement.php',
'PharIo\\Manifest\\ExtElementCollection' => $vendorDir . '/phar-io/manifest/src/xml/ExtElementCollection.php',
'PharIo\\Manifest\\Extension' => $vendorDir . '/phar-io/manifest/src/values/Extension.php',
'PharIo\\Manifest\\ExtensionElement' => $vendorDir . '/phar-io/manifest/src/xml/ExtensionElement.php',
'PharIo\\Manifest\\InvalidApplicationNameException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
'PharIo\\Manifest\\InvalidEmailException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
'PharIo\\Manifest\\InvalidUrlException' => $vendorDir . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
'PharIo\\Manifest\\Library' => $vendorDir . '/phar-io/manifest/src/values/Library.php',
'PharIo\\Manifest\\License' => $vendorDir . '/phar-io/manifest/src/values/License.php',
'PharIo\\Manifest\\LicenseElement' => $vendorDir . '/phar-io/manifest/src/xml/LicenseElement.php',
'PharIo\\Manifest\\Manifest' => $vendorDir . '/phar-io/manifest/src/values/Manifest.php',
'PharIo\\Manifest\\ManifestDocument' => $vendorDir . '/phar-io/manifest/src/xml/ManifestDocument.php',
'PharIo\\Manifest\\ManifestDocumentException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
'PharIo\\Manifest\\ManifestDocumentLoadingException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php',
'PharIo\\Manifest\\ManifestDocumentMapper' => $vendorDir . '/phar-io/manifest/src/ManifestDocumentMapper.php',
'PharIo\\Manifest\\ManifestDocumentMapperException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
'PharIo\\Manifest\\ManifestElement' => $vendorDir . '/phar-io/manifest/src/xml/ManifestElement.php',
'PharIo\\Manifest\\ManifestElementException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
'PharIo\\Manifest\\ManifestLoader' => $vendorDir . '/phar-io/manifest/src/ManifestLoader.php',
'PharIo\\Manifest\\ManifestLoaderException' => $vendorDir . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
'PharIo\\Manifest\\ManifestSerializer' => $vendorDir . '/phar-io/manifest/src/ManifestSerializer.php',
'PharIo\\Manifest\\NoEmailAddressException' => $vendorDir . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php',
'PharIo\\Manifest\\PhpElement' => $vendorDir . '/phar-io/manifest/src/xml/PhpElement.php',
'PharIo\\Manifest\\PhpExtensionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
'PharIo\\Manifest\\PhpVersionRequirement' => $vendorDir . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
'PharIo\\Manifest\\Requirement' => $vendorDir . '/phar-io/manifest/src/values/Requirement.php',
'PharIo\\Manifest\\RequirementCollection' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollection.php',
'PharIo\\Manifest\\RequirementCollectionIterator' => $vendorDir . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
'PharIo\\Manifest\\RequiresElement' => $vendorDir . '/phar-io/manifest/src/xml/RequiresElement.php',
'PharIo\\Manifest\\Type' => $vendorDir . '/phar-io/manifest/src/values/Type.php',
'PharIo\\Manifest\\Url' => $vendorDir . '/phar-io/manifest/src/values/Url.php',
'PharIo\\Version\\AbstractVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
'PharIo\\Version\\AndVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
'PharIo\\Version\\AnyVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
'PharIo\\Version\\BuildMetaData' => $vendorDir . '/phar-io/version/src/BuildMetaData.php',
'PharIo\\Version\\ExactVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
'PharIo\\Version\\Exception' => $vendorDir . '/phar-io/version/src/exceptions/Exception.php',
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
'PharIo\\Version\\InvalidPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
'PharIo\\Version\\InvalidVersionException' => $vendorDir . '/phar-io/version/src/exceptions/InvalidVersionException.php',
'PharIo\\Version\\NoBuildMetaDataException' => $vendorDir . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php',
'PharIo\\Version\\NoPreReleaseSuffixException' => $vendorDir . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php',
'PharIo\\Version\\OrVersionConstraintGroup' => $vendorDir . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
'PharIo\\Version\\PreReleaseSuffix' => $vendorDir . '/phar-io/version/src/PreReleaseSuffix.php',
'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
'PharIo\\Version\\SpecificMajorVersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
'PharIo\\Version\\UnsupportedVersionConstraintException' => $vendorDir . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
'PharIo\\Version\\Version' => $vendorDir . '/phar-io/version/src/Version.php',
'PharIo\\Version\\VersionConstraint' => $vendorDir . '/phar-io/version/src/constraints/VersionConstraint.php',
'PharIo\\Version\\VersionConstraintParser' => $vendorDir . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => $vendorDir . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => $vendorDir . '/phar-io/version/src/VersionNumber.php',
'SebastianBergmann\\CliParser\\AmbiguousOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
'SebastianBergmann\\CliParser\\Exception' => $vendorDir . '/sebastian/cli-parser/src/exceptions/Exception.php',
'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php',
'SebastianBergmann\\CliParser\\Parser' => $vendorDir . '/sebastian/cli-parser/src/Parser.php',
'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php',
'SebastianBergmann\\CliParser\\UnknownOptionException' => $vendorDir . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php',
'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php',
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php',
'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgDriver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Selector.php',
'SebastianBergmann\\CodeCoverage\\Driver\\WriteOperationFailedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\WrongXdebugVersionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2NotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3Driver' => $vendorDir . '/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3NotEnabledException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Exception' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/Exception.php',
'SebastianBergmann\\CodeCoverage\\Filter' => $vendorDir . '/phpunit/php-code-coverage/src/Filter.php',
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php',
'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => $vendorDir . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Builder.php',
'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => $vendorDir . '/phpunit/php-code-coverage/src/Node/CrapIndex.php',
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Directory.php',
'SebastianBergmann\\CodeCoverage\\Node\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Node/File.php',
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => $vendorDir . '/phpunit/php-code-coverage/src/Node/Iterator.php',
'SebastianBergmann\\CodeCoverage\\ParserException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ParserException.php',
'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => $vendorDir . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\ReflectionException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php',
'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php',
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Clover.php',
'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Cobertura.php',
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => $vendorDir . '/phpunit/php-code-coverage/src/Report/PHP.php',
'SebastianBergmann\\CodeCoverage\\Report\\Text' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Text.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => $vendorDir . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => $vendorDir . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php',
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Filesystem.php',
'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => $vendorDir . '/phpunit/php-code-coverage/src/Util/Percentage.php',
'SebastianBergmann\\CodeCoverage\\Version' => $vendorDir . '/phpunit/php-code-coverage/src/Version.php',
'SebastianBergmann\\CodeCoverage\\XmlException' => $vendorDir . '/phpunit/php-code-coverage/src/Exception/XmlException.php',
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => $vendorDir . '/sebastian/code-unit/src/ClassMethodUnit.php',
'SebastianBergmann\\CodeUnit\\ClassUnit' => $vendorDir . '/sebastian/code-unit/src/ClassUnit.php',
'SebastianBergmann\\CodeUnit\\CodeUnit' => $vendorDir . '/sebastian/code-unit/src/CodeUnit.php',
'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollection.php',
'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => $vendorDir . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php',
'SebastianBergmann\\CodeUnit\\Exception' => $vendorDir . '/sebastian/code-unit/src/exceptions/Exception.php',
'SebastianBergmann\\CodeUnit\\FunctionUnit' => $vendorDir . '/sebastian/code-unit/src/FunctionUnit.php',
'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceMethodUnit.php',
'SebastianBergmann\\CodeUnit\\InterfaceUnit' => $vendorDir . '/sebastian/code-unit/src/InterfaceUnit.php',
'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php',
'SebastianBergmann\\CodeUnit\\Mapper' => $vendorDir . '/sebastian/code-unit/src/Mapper.php',
'SebastianBergmann\\CodeUnit\\NoTraitException' => $vendorDir . '/sebastian/code-unit/src/exceptions/NoTraitException.php',
'SebastianBergmann\\CodeUnit\\ReflectionException' => $vendorDir . '/sebastian/code-unit/src/exceptions/ReflectionException.php',
'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => $vendorDir . '/sebastian/code-unit/src/TraitMethodUnit.php',
'SebastianBergmann\\CodeUnit\\TraitUnit' => $vendorDir . '/sebastian/code-unit/src/TraitUnit.php',
'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php',
'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php',
'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php',
'SebastianBergmann\\Comparator\\DOMNodeComparator' => $vendorDir . '/sebastian/comparator/src/DOMNodeComparator.php',
'SebastianBergmann\\Comparator\\DateTimeComparator' => $vendorDir . '/sebastian/comparator/src/DateTimeComparator.php',
'SebastianBergmann\\Comparator\\DoubleComparator' => $vendorDir . '/sebastian/comparator/src/DoubleComparator.php',
'SebastianBergmann\\Comparator\\Exception' => $vendorDir . '/sebastian/comparator/src/exceptions/Exception.php',
'SebastianBergmann\\Comparator\\ExceptionComparator' => $vendorDir . '/sebastian/comparator/src/ExceptionComparator.php',
'SebastianBergmann\\Comparator\\Factory' => $vendorDir . '/sebastian/comparator/src/Factory.php',
'SebastianBergmann\\Comparator\\MockObjectComparator' => $vendorDir . '/sebastian/comparator/src/MockObjectComparator.php',
'SebastianBergmann\\Comparator\\NumericComparator' => $vendorDir . '/sebastian/comparator/src/NumericComparator.php',
'SebastianBergmann\\Comparator\\ObjectComparator' => $vendorDir . '/sebastian/comparator/src/ObjectComparator.php',
'SebastianBergmann\\Comparator\\ResourceComparator' => $vendorDir . '/sebastian/comparator/src/ResourceComparator.php',
'SebastianBergmann\\Comparator\\RuntimeException' => $vendorDir . '/sebastian/comparator/src/exceptions/RuntimeException.php',
'SebastianBergmann\\Comparator\\ScalarComparator' => $vendorDir . '/sebastian/comparator/src/ScalarComparator.php',
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => $vendorDir . '/sebastian/comparator/src/SplObjectStorageComparator.php',
'SebastianBergmann\\Comparator\\TypeComparator' => $vendorDir . '/sebastian/comparator/src/TypeComparator.php',
'SebastianBergmann\\Complexity\\Calculator' => $vendorDir . '/sebastian/complexity/src/Calculator.php',
'SebastianBergmann\\Complexity\\Complexity' => $vendorDir . '/sebastian/complexity/src/Complexity/Complexity.php',
'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php',
'SebastianBergmann\\Complexity\\ComplexityCollection' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollection.php',
'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => $vendorDir . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php',
'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => $vendorDir . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php',
'SebastianBergmann\\Complexity\\Exception' => $vendorDir . '/sebastian/complexity/src/Exception/Exception.php',
'SebastianBergmann\\Complexity\\RuntimeException' => $vendorDir . '/sebastian/complexity/src/Exception/RuntimeException.php',
'SebastianBergmann\\Diff\\Chunk' => $vendorDir . '/sebastian/diff/src/Chunk.php',
'SebastianBergmann\\Diff\\ConfigurationException' => $vendorDir . '/sebastian/diff/src/Exception/ConfigurationException.php',
'SebastianBergmann\\Diff\\Diff' => $vendorDir . '/sebastian/diff/src/Diff.php',
'SebastianBergmann\\Diff\\Differ' => $vendorDir . '/sebastian/diff/src/Differ.php',
'SebastianBergmann\\Diff\\Exception' => $vendorDir . '/sebastian/diff/src/Exception/Exception.php',
'SebastianBergmann\\Diff\\InvalidArgumentException' => $vendorDir . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\Diff\\Line' => $vendorDir . '/sebastian/diff/src/Line.php',
'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => $vendorDir . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => $vendorDir . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Parser' => $vendorDir . '/sebastian/diff/src/Parser.php',
'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => $vendorDir . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Environment\\Console' => $vendorDir . '/sebastian/environment/src/Console.php',
'SebastianBergmann\\Environment\\OperatingSystem' => $vendorDir . '/sebastian/environment/src/OperatingSystem.php',
'SebastianBergmann\\Environment\\Runtime' => $vendorDir . '/sebastian/environment/src/Runtime.php',
'SebastianBergmann\\Exporter\\Exporter' => $vendorDir . '/sebastian/exporter/src/Exporter.php',
'SebastianBergmann\\FileIterator\\Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php',
'SebastianBergmann\\FileIterator\\Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php',
'SebastianBergmann\\FileIterator\\Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php',
'SebastianBergmann\\GlobalState\\CodeExporter' => $vendorDir . '/sebastian/global-state/src/CodeExporter.php',
'SebastianBergmann\\GlobalState\\Exception' => $vendorDir . '/sebastian/global-state/src/exceptions/Exception.php',
'SebastianBergmann\\GlobalState\\ExcludeList' => $vendorDir . '/sebastian/global-state/src/ExcludeList.php',
'SebastianBergmann\\GlobalState\\Restorer' => $vendorDir . '/sebastian/global-state/src/Restorer.php',
'SebastianBergmann\\GlobalState\\RuntimeException' => $vendorDir . '/sebastian/global-state/src/exceptions/RuntimeException.php',
'SebastianBergmann\\GlobalState\\Snapshot' => $vendorDir . '/sebastian/global-state/src/Snapshot.php',
'SebastianBergmann\\Invoker\\Exception' => $vendorDir . '/phpunit/php-invoker/src/exceptions/Exception.php',
'SebastianBergmann\\Invoker\\Invoker' => $vendorDir . '/phpunit/php-invoker/src/Invoker.php',
'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php',
'SebastianBergmann\\Invoker\\TimeoutException' => $vendorDir . '/phpunit/php-invoker/src/exceptions/TimeoutException.php',
'SebastianBergmann\\LinesOfCode\\Counter' => $vendorDir . '/sebastian/lines-of-code/src/Counter.php',
'SebastianBergmann\\LinesOfCode\\Exception' => $vendorDir . '/sebastian/lines-of-code/src/Exception/Exception.php',
'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php',
'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => $vendorDir . '/sebastian/lines-of-code/src/LineCountingVisitor.php',
'SebastianBergmann\\LinesOfCode\\LinesOfCode' => $vendorDir . '/sebastian/lines-of-code/src/LinesOfCode.php',
'SebastianBergmann\\LinesOfCode\\NegativeValueException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php',
'SebastianBergmann\\LinesOfCode\\RuntimeException' => $vendorDir . '/sebastian/lines-of-code/src/Exception/RuntimeException.php',
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => $vendorDir . '/sebastian/object-enumerator/src/Enumerator.php',
'SebastianBergmann\\ObjectEnumerator\\Exception' => $vendorDir . '/sebastian/object-enumerator/src/Exception.php',
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => $vendorDir . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\Exception' => $vendorDir . '/sebastian/object-reflector/src/Exception.php',
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => $vendorDir . '/sebastian/object-reflector/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => $vendorDir . '/sebastian/object-reflector/src/ObjectReflector.php',
'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php',
'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php',
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Template\\Exception' => $vendorDir . '/phpunit/php-text-template/src/exceptions/Exception.php',
'SebastianBergmann\\Template\\InvalidArgumentException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php',
'SebastianBergmann\\Template\\RuntimeException' => $vendorDir . '/phpunit/php-text-template/src/exceptions/RuntimeException.php',
'SebastianBergmann\\Template\\Template' => $vendorDir . '/phpunit/php-text-template/src/Template.php',
'SebastianBergmann\\Timer\\Duration' => $vendorDir . '/phpunit/php-timer/src/Duration.php',
'SebastianBergmann\\Timer\\Exception' => $vendorDir . '/phpunit/php-timer/src/exceptions/Exception.php',
'SebastianBergmann\\Timer\\NoActiveTimerException' => $vendorDir . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php',
'SebastianBergmann\\Timer\\ResourceUsageFormatter' => $vendorDir . '/phpunit/php-timer/src/ResourceUsageFormatter.php',
'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => $vendorDir . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php',
'SebastianBergmann\\Timer\\Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php',
'SebastianBergmann\\Type\\CallableType' => $vendorDir . '/sebastian/type/src/type/CallableType.php',
'SebastianBergmann\\Type\\Exception' => $vendorDir . '/sebastian/type/src/exception/Exception.php',
'SebastianBergmann\\Type\\FalseType' => $vendorDir . '/sebastian/type/src/type/FalseType.php',
'SebastianBergmann\\Type\\GenericObjectType' => $vendorDir . '/sebastian/type/src/type/GenericObjectType.php',
'SebastianBergmann\\Type\\IntersectionType' => $vendorDir . '/sebastian/type/src/type/IntersectionType.php',
'SebastianBergmann\\Type\\IterableType' => $vendorDir . '/sebastian/type/src/type/IterableType.php',
'SebastianBergmann\\Type\\MixedType' => $vendorDir . '/sebastian/type/src/type/MixedType.php',
'SebastianBergmann\\Type\\NeverType' => $vendorDir . '/sebastian/type/src/type/NeverType.php',
'SebastianBergmann\\Type\\NullType' => $vendorDir . '/sebastian/type/src/type/NullType.php',
'SebastianBergmann\\Type\\ObjectType' => $vendorDir . '/sebastian/type/src/type/ObjectType.php',
'SebastianBergmann\\Type\\Parameter' => $vendorDir . '/sebastian/type/src/Parameter.php',
'SebastianBergmann\\Type\\ReflectionMapper' => $vendorDir . '/sebastian/type/src/ReflectionMapper.php',
'SebastianBergmann\\Type\\RuntimeException' => $vendorDir . '/sebastian/type/src/exception/RuntimeException.php',
'SebastianBergmann\\Type\\SimpleType' => $vendorDir . '/sebastian/type/src/type/SimpleType.php',
'SebastianBergmann\\Type\\StaticType' => $vendorDir . '/sebastian/type/src/type/StaticType.php',
'SebastianBergmann\\Type\\TrueType' => $vendorDir . '/sebastian/type/src/type/TrueType.php',
'SebastianBergmann\\Type\\Type' => $vendorDir . '/sebastian/type/src/type/Type.php',
'SebastianBergmann\\Type\\TypeName' => $vendorDir . '/sebastian/type/src/TypeName.php',
'SebastianBergmann\\Type\\UnionType' => $vendorDir . '/sebastian/type/src/type/UnionType.php',
'SebastianBergmann\\Type\\UnknownType' => $vendorDir . '/sebastian/type/src/type/UnknownType.php',
'SebastianBergmann\\Type\\VoidType' => $vendorDir . '/sebastian/type/src/type/VoidType.php',
'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php',
'TheSeer\\Tokenizer\\Exception' => $vendorDir . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => $vendorDir . '/theseer/tokenizer/src/NamespaceUri.php',
'TheSeer\\Tokenizer\\NamespaceUriException' => $vendorDir . '/theseer/tokenizer/src/NamespaceUriException.php',
'TheSeer\\Tokenizer\\Token' => $vendorDir . '/theseer/tokenizer/src/Token.php',
'TheSeer\\Tokenizer\\TokenCollection' => $vendorDir . '/theseer/tokenizer/src/TokenCollection.php',
'TheSeer\\Tokenizer\\TokenCollectionException' => $vendorDir . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => $vendorDir . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => $vendorDir . '/theseer/tokenizer/src/XMLSerializer.php',
'Yoast\\WPTestUtils\\BrainMonkey\\TestCase' => $vendorDir . '/yoast/wp-test-utils/src/BrainMonkey/TestCase.php',
'Yoast\\WPTestUtils\\BrainMonkey\\YoastTestCase' => $vendorDir . '/yoast/wp-test-utils/src/BrainMonkey/YoastTestCase.php',
'Yoast\\WPTestUtils\\Helpers\\ExpectOutputHelper' => $vendorDir . '/yoast/wp-test-utils/src/Helpers/ExpectOutputHelper.php',
'Yoast\\WPTestUtils\\WPIntegration\\Autoload' => $vendorDir . '/yoast/wp-test-utils/src/WPIntegration/Autoload.php',
'Yoast\\WPTestUtils\\WPIntegration\\TestCase' => $vendorDir . '/yoast/wp-test-utils/src/WPIntegration/TestCaseOnlyObjectPropertyPolyfill.php',
);

View file

@ -1,16 +0,0 @@
<?php
// autoload_files.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'c72349b1fe8d0deeedd3a52e8aa814d8' => $vendorDir . '/mockery/mockery/library/helpers.php',
'ce9671a430e4846b44e1c68c7611f9f5' => $vendorDir . '/mockery/mockery/library/Mockery.php',
'ec07570ca5a812141189b1fa81503674' => $vendorDir . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'051bafe20e2674435a162870efa2d2a7' => $vendorDir . '/brain/monkey/inc/api.php',
'7d3b315c4f303f2fc14aca642a738e50' => $vendorDir . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
'38fbb71d514eee25044aa9d94851ee76' => $vendorDir . '/wp-phpunit/wp-phpunit/__loaded.php',
);

View file

@ -1,9 +0,0 @@
<?php
// autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
);

View file

@ -1,16 +0,0 @@
<?php
// autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'PhpParser\\' => array($vendorDir . '/nikic/php-parser/lib/PhpParser'),
'Mockery\\' => array($vendorDir . '/mockery/mockery/library/Mockery'),
'HVAC\\CommunityEvents\\' => array($baseDir . '/includes'),
'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),
'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'),
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
'Brain\\Monkey\\' => array($vendorDir . '/brain/monkey/src'),
);

View file

@ -1,50 +0,0 @@
<?php
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitb64ab6ec83fc8ada31fa44f753742a80
{
private static $loader;
public static function loadClassLoader($class)
{
if ('Composer\Autoload\ClassLoader' === $class) {
require __DIR__ . '/ClassLoader.php';
}
}
/**
* @return \Composer\Autoload\ClassLoader
*/
public static function getLoader()
{
if (null !== self::$loader) {
return self::$loader;
}
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitb64ab6ec83fc8ada31fa44f753742a80', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitb64ab6ec83fc8ada31fa44f753742a80', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitb64ab6ec83fc8ada31fa44f753742a80::getInitializer($loader));
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInitb64ab6ec83fc8ada31fa44f753742a80::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}, null, null);
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file);
}
return $loader;
}
}

View file

@ -1,793 +0,0 @@
<?php
// autoload_static.php @generated by Composer
namespace Composer\Autoload;
class ComposerStaticInitb64ab6ec83fc8ada31fa44f753742a80
{
public static $files = array (
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'c72349b1fe8d0deeedd3a52e8aa814d8' => __DIR__ . '/..' . '/mockery/mockery/library/helpers.php',
'ce9671a430e4846b44e1c68c7611f9f5' => __DIR__ . '/..' . '/mockery/mockery/library/Mockery.php',
'ec07570ca5a812141189b1fa81503674' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert/Functions.php',
'051bafe20e2674435a162870efa2d2a7' => __DIR__ . '/..' . '/brain/monkey/inc/api.php',
'7d3b315c4f303f2fc14aca642a738e50' => __DIR__ . '/..' . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
'38fbb71d514eee25044aa9d94851ee76' => __DIR__ . '/..' . '/wp-phpunit/wp-phpunit/__loaded.php',
);
public static $prefixLengthsPsr4 = array (
'P' =>
array (
'PhpParser\\' => 10,
),
'M' =>
array (
'Mockery\\' => 8,
),
'H' =>
array (
'HVAC\\CommunityEvents\\' => 21,
),
'D' =>
array (
'Doctrine\\Instantiator\\' => 22,
'DeepCopy\\' => 9,
),
'C' =>
array (
'Composer\\Installers\\' => 20,
),
'B' =>
array (
'Brain\\Monkey\\' => 13,
),
);
public static $prefixDirsPsr4 = array (
'PhpParser\\' =>
array (
0 => __DIR__ . '/..' . '/nikic/php-parser/lib/PhpParser',
),
'Mockery\\' =>
array (
0 => __DIR__ . '/..' . '/mockery/mockery/library/Mockery',
),
'HVAC\\CommunityEvents\\' =>
array (
0 => __DIR__ . '/../..' . '/includes',
),
'Doctrine\\Instantiator\\' =>
array (
0 => __DIR__ . '/..' . '/doctrine/instantiator/src/Doctrine/Instantiator',
),
'DeepCopy\\' =>
array (
0 => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy',
),
'Composer\\Installers\\' =>
array (
0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
),
'Brain\\Monkey\\' =>
array (
0 => __DIR__ . '/..' . '/brain/monkey/src',
),
);
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Hamcrest\\Arrays\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArray.php',
'Hamcrest\\Arrays\\IsArrayContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContaining.php',
'Hamcrest\\Arrays\\IsArrayContainingInAnyOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInAnyOrder.php',
'Hamcrest\\Arrays\\IsArrayContainingInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingInOrder.php',
'Hamcrest\\Arrays\\IsArrayContainingKey' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKey.php',
'Hamcrest\\Arrays\\IsArrayContainingKeyValuePair' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayContainingKeyValuePair.php',
'Hamcrest\\Arrays\\IsArrayWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/IsArrayWithSize.php',
'Hamcrest\\Arrays\\MatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/MatchingOnce.php',
'Hamcrest\\Arrays\\SeriesMatchingOnce' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Arrays/SeriesMatchingOnce.php',
'Hamcrest\\AssertionError' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/AssertionError.php',
'Hamcrest\\BaseDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseDescription.php',
'Hamcrest\\BaseMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/BaseMatcher.php',
'Hamcrest\\Collection\\IsEmptyTraversable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsEmptyTraversable.php',
'Hamcrest\\Collection\\IsTraversableWithSize' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Collection/IsTraversableWithSize.php',
'Hamcrest\\Core\\AllOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AllOf.php',
'Hamcrest\\Core\\AnyOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/AnyOf.php',
'Hamcrest\\Core\\CombinableMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/CombinableMatcher.php',
'Hamcrest\\Core\\DescribedAs' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/DescribedAs.php',
'Hamcrest\\Core\\Every' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Every.php',
'Hamcrest\\Core\\HasToString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/HasToString.php',
'Hamcrest\\Core\\Is' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Is.php',
'Hamcrest\\Core\\IsAnything' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsAnything.php',
'Hamcrest\\Core\\IsCollectionContaining' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsCollectionContaining.php',
'Hamcrest\\Core\\IsEqual' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsEqual.php',
'Hamcrest\\Core\\IsIdentical' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsIdentical.php',
'Hamcrest\\Core\\IsInstanceOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsInstanceOf.php',
'Hamcrest\\Core\\IsNot' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNot.php',
'Hamcrest\\Core\\IsNull' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsNull.php',
'Hamcrest\\Core\\IsSame' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsSame.php',
'Hamcrest\\Core\\IsTypeOf' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/IsTypeOf.php',
'Hamcrest\\Core\\Set' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/Set.php',
'Hamcrest\\Core\\ShortcutCombination' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Core/ShortcutCombination.php',
'Hamcrest\\Description' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Description.php',
'Hamcrest\\DiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/DiagnosingMatcher.php',
'Hamcrest\\FeatureMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/FeatureMatcher.php',
'Hamcrest\\Internal\\SelfDescribingValue' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Internal/SelfDescribingValue.php',
'Hamcrest\\Matcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matcher.php',
'Hamcrest\\MatcherAssert' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/MatcherAssert.php',
'Hamcrest\\Matchers' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Matchers.php',
'Hamcrest\\NullDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/NullDescription.php',
'Hamcrest\\Number\\IsCloseTo' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/IsCloseTo.php',
'Hamcrest\\Number\\OrderingComparison' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Number/OrderingComparison.php',
'Hamcrest\\SelfDescribing' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/SelfDescribing.php',
'Hamcrest\\StringDescription' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/StringDescription.php',
'Hamcrest\\Text\\IsEmptyString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEmptyString.php',
'Hamcrest\\Text\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringCase.php',
'Hamcrest\\Text\\IsEqualIgnoringWhiteSpace' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/IsEqualIgnoringWhiteSpace.php',
'Hamcrest\\Text\\MatchesPattern' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/MatchesPattern.php',
'Hamcrest\\Text\\StringContains' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContains.php',
'Hamcrest\\Text\\StringContainsIgnoringCase' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsIgnoringCase.php',
'Hamcrest\\Text\\StringContainsInOrder' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringContainsInOrder.php',
'Hamcrest\\Text\\StringEndsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringEndsWith.php',
'Hamcrest\\Text\\StringStartsWith' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/StringStartsWith.php',
'Hamcrest\\Text\\SubstringMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Text/SubstringMatcher.php',
'Hamcrest\\TypeSafeDiagnosingMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeDiagnosingMatcher.php',
'Hamcrest\\TypeSafeMatcher' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/TypeSafeMatcher.php',
'Hamcrest\\Type\\IsArray' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsArray.php',
'Hamcrest\\Type\\IsBoolean' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsBoolean.php',
'Hamcrest\\Type\\IsCallable' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsCallable.php',
'Hamcrest\\Type\\IsDouble' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsDouble.php',
'Hamcrest\\Type\\IsInteger' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsInteger.php',
'Hamcrest\\Type\\IsNumeric' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsNumeric.php',
'Hamcrest\\Type\\IsObject' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsObject.php',
'Hamcrest\\Type\\IsResource' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsResource.php',
'Hamcrest\\Type\\IsScalar' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsScalar.php',
'Hamcrest\\Type\\IsString' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Type/IsString.php',
'Hamcrest\\Util' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Util.php',
'Hamcrest\\Xml\\HasXPath' => __DIR__ . '/..' . '/hamcrest/hamcrest-php/hamcrest/Hamcrest/Xml/HasXPath.php',
'PHPUnit\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Exception.php',
'PHPUnit\\Framework\\ActualValueIsNotAnObjectException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ActualValueIsNotAnObjectException.php',
'PHPUnit\\Framework\\Assert' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Assert.php',
'PHPUnit\\Framework\\AssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/AssertionFailedError.php',
'PHPUnit\\Framework\\CodeCoverageException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CodeCoverageException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotAcceptParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotAcceptParameterTypeException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareBoolReturnTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareBoolReturnTypeException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareExactlyOneParameterException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareExactlyOneParameterException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotDeclareParameterTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotDeclareParameterTypeException.php',
'PHPUnit\\Framework\\ComparisonMethodDoesNotExistException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ComparisonMethodDoesNotExistException.php',
'PHPUnit\\Framework\\Constraint\\ArrayHasKey' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/ArrayHasKey.php',
'PHPUnit\\Framework\\Constraint\\BinaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/BinaryOperator.php',
'PHPUnit\\Framework\\Constraint\\Callback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Callback.php',
'PHPUnit\\Framework\\Constraint\\ClassHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\ClassHasStaticAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ClassHasStaticAttribute.php',
'PHPUnit\\Framework\\Constraint\\Constraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Constraint.php',
'PHPUnit\\Framework\\Constraint\\Count' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/Count.php',
'PHPUnit\\Framework\\Constraint\\DirectoryExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/DirectoryExists.php',
'PHPUnit\\Framework\\Constraint\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/Exception.php',
'PHPUnit\\Framework\\Constraint\\ExceptionCode' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionCode.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessage' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessage.php',
'PHPUnit\\Framework\\Constraint\\ExceptionMessageRegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Exception/ExceptionMessageRegularExpression.php',
'PHPUnit\\Framework\\Constraint\\FileExists' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/FileExists.php',
'PHPUnit\\Framework\\Constraint\\GreaterThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/GreaterThan.php',
'PHPUnit\\Framework\\Constraint\\IsAnything' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsAnything.php',
'PHPUnit\\Framework\\Constraint\\IsEmpty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/IsEmpty.php',
'PHPUnit\\Framework\\Constraint\\IsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php',
'PHPUnit\\Framework\\Constraint\\IsEqualCanonicalizing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualCanonicalizing.php',
'PHPUnit\\Framework\\Constraint\\IsEqualIgnoringCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualIgnoringCase.php',
'PHPUnit\\Framework\\Constraint\\IsEqualWithDelta' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqualWithDelta.php',
'PHPUnit\\Framework\\Constraint\\IsFalse' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsFalse.php',
'PHPUnit\\Framework\\Constraint\\IsFinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsFinite.php',
'PHPUnit\\Framework\\Constraint\\IsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php',
'PHPUnit\\Framework\\Constraint\\IsInfinite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsInfinite.php',
'PHPUnit\\Framework\\Constraint\\IsInstanceOf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsInstanceOf.php',
'PHPUnit\\Framework\\Constraint\\IsJson' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/IsJson.php',
'PHPUnit\\Framework\\Constraint\\IsNan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Math/IsNan.php',
'PHPUnit\\Framework\\Constraint\\IsNull' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsNull.php',
'PHPUnit\\Framework\\Constraint\\IsReadable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsReadable.php',
'PHPUnit\\Framework\\Constraint\\IsTrue' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Boolean/IsTrue.php',
'PHPUnit\\Framework\\Constraint\\IsType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Type/IsType.php',
'PHPUnit\\Framework\\Constraint\\IsWritable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Filesystem/IsWritable.php',
'PHPUnit\\Framework\\Constraint\\JsonMatches' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatches.php',
'PHPUnit\\Framework\\Constraint\\JsonMatchesErrorMessageProvider' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/JsonMatchesErrorMessageProvider.php',
'PHPUnit\\Framework\\Constraint\\LessThan' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/LessThan.php',
'PHPUnit\\Framework\\Constraint\\LogicalAnd' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalAnd.php',
'PHPUnit\\Framework\\Constraint\\LogicalNot' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalNot.php',
'PHPUnit\\Framework\\Constraint\\LogicalOr' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalOr.php',
'PHPUnit\\Framework\\Constraint\\LogicalXor' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/LogicalXor.php',
'PHPUnit\\Framework\\Constraint\\ObjectEquals' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectEquals.php',
'PHPUnit\\Framework\\Constraint\\ObjectHasAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasAttribute.php',
'PHPUnit\\Framework\\Constraint\\ObjectHasProperty' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Object/ObjectHasProperty.php',
'PHPUnit\\Framework\\Constraint\\Operator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/Operator.php',
'PHPUnit\\Framework\\Constraint\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/RegularExpression.php',
'PHPUnit\\Framework\\Constraint\\SameSize' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Cardinality/SameSize.php',
'PHPUnit\\Framework\\Constraint\\StringContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringContains.php',
'PHPUnit\\Framework\\Constraint\\StringEndsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringEndsWith.php',
'PHPUnit\\Framework\\Constraint\\StringMatchesFormatDescription' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringMatchesFormatDescription.php',
'PHPUnit\\Framework\\Constraint\\StringStartsWith' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/String/StringStartsWith.php',
'PHPUnit\\Framework\\Constraint\\TraversableContains' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContains.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsEqual' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsEqual.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsIdentical' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsIdentical.php',
'PHPUnit\\Framework\\Constraint\\TraversableContainsOnly' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Traversable/TraversableContainsOnly.php',
'PHPUnit\\Framework\\Constraint\\UnaryOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Constraint/Operator/UnaryOperator.php',
'PHPUnit\\Framework\\CoveredCodeNotExecutedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/CoveredCodeNotExecutedException.php',
'PHPUnit\\Framework\\DataProviderTestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/DataProviderTestSuite.php',
'PHPUnit\\Framework\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Error.php',
'PHPUnit\\Framework\\ErrorTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ErrorTestCase.php',
'PHPUnit\\Framework\\Error\\Deprecated' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Deprecated.php',
'PHPUnit\\Framework\\Error\\Error' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Error.php',
'PHPUnit\\Framework\\Error\\Notice' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Notice.php',
'PHPUnit\\Framework\\Error\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Error/Warning.php',
'PHPUnit\\Framework\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Exception.php',
'PHPUnit\\Framework\\ExceptionWrapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExceptionWrapper.php',
'PHPUnit\\Framework\\ExecutionOrderDependency' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/ExecutionOrderDependency.php',
'PHPUnit\\Framework\\ExpectationFailedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/ExpectationFailedException.php',
'PHPUnit\\Framework\\IncompleteTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTest.php',
'PHPUnit\\Framework\\IncompleteTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/IncompleteTestCase.php',
'PHPUnit\\Framework\\IncompleteTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/IncompleteTestError.php',
'PHPUnit\\Framework\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidArgumentException.php',
'PHPUnit\\Framework\\InvalidCoversTargetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidCoversTargetException.php',
'PHPUnit\\Framework\\InvalidDataProviderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/InvalidDataProviderException.php',
'PHPUnit\\Framework\\InvalidParameterGroupException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/InvalidParameterGroupException.php',
'PHPUnit\\Framework\\MissingCoversAnnotationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/MissingCoversAnnotationException.php',
'PHPUnit\\Framework\\MockObject\\Api' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Api.php',
'PHPUnit\\Framework\\MockObject\\BadMethodCallException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/BadMethodCallException.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Identity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Identity.php',
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationMocker' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationMocker.php',
'PHPUnit\\Framework\\MockObject\\Builder\\InvocationStubber' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/InvocationStubber.php',
'PHPUnit\\Framework\\MockObject\\Builder\\MethodNameMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/MethodNameMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\ParametersMatch' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/ParametersMatch.php',
'PHPUnit\\Framework\\MockObject\\Builder\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Builder/Stub.php',
'PHPUnit\\Framework\\MockObject\\CannotUseAddMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseAddMethodsException.php',
'PHPUnit\\Framework\\MockObject\\CannotUseOnlyMethodsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/CannotUseOnlyMethodsException.php',
'PHPUnit\\Framework\\MockObject\\ClassAlreadyExistsException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassAlreadyExistsException.php',
'PHPUnit\\Framework\\MockObject\\ClassIsFinalException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsFinalException.php',
'PHPUnit\\Framework\\MockObject\\ClassIsReadonlyException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ClassIsReadonlyException.php',
'PHPUnit\\Framework\\MockObject\\ConfigurableMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/ConfigurableMethod.php',
'PHPUnit\\Framework\\MockObject\\ConfigurableMethodsAlreadyInitializedException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ConfigurableMethodsAlreadyInitializedException.php',
'PHPUnit\\Framework\\MockObject\\DuplicateMethodException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/DuplicateMethodException.php',
'PHPUnit\\Framework\\MockObject\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/Exception.php',
'PHPUnit\\Framework\\MockObject\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Generator.php',
'PHPUnit\\Framework\\MockObject\\IncompatibleReturnValueException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/IncompatibleReturnValueException.php',
'PHPUnit\\Framework\\MockObject\\InvalidMethodNameException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/InvalidMethodNameException.php',
'PHPUnit\\Framework\\MockObject\\Invocation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Invocation.php',
'PHPUnit\\Framework\\MockObject\\InvocationHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/InvocationHandler.php',
'PHPUnit\\Framework\\MockObject\\MatchBuilderNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatchBuilderNotFoundException.php',
'PHPUnit\\Framework\\MockObject\\Matcher' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Matcher.php',
'PHPUnit\\Framework\\MockObject\\MatcherAlreadyRegisteredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MatcherAlreadyRegisteredException.php',
'PHPUnit\\Framework\\MockObject\\Method' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Api/Method.php',
'PHPUnit\\Framework\\MockObject\\MethodCannotBeConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodCannotBeConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MethodNameAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameAlreadyConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MethodNameConstraint' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MethodNameConstraint.php',
'PHPUnit\\Framework\\MockObject\\MethodNameNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodNameNotConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MethodParametersAlreadyConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/MethodParametersAlreadyConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\MockBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockBuilder.php',
'PHPUnit\\Framework\\MockObject\\MockClass' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockClass.php',
'PHPUnit\\Framework\\MockObject\\MockMethod' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethod.php',
'PHPUnit\\Framework\\MockObject\\MockMethodSet' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockMethodSet.php',
'PHPUnit\\Framework\\MockObject\\MockObject' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockObject.php',
'PHPUnit\\Framework\\MockObject\\MockTrait' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockTrait.php',
'PHPUnit\\Framework\\MockObject\\MockType' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/MockType.php',
'PHPUnit\\Framework\\MockObject\\OriginalConstructorInvocationRequiredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/OriginalConstructorInvocationRequiredException.php',
'PHPUnit\\Framework\\MockObject\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReflectionException.php',
'PHPUnit\\Framework\\MockObject\\ReturnValueNotConfiguredException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/ReturnValueNotConfiguredException.php',
'PHPUnit\\Framework\\MockObject\\Rule\\AnyInvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyInvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\AnyParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/AnyParameters.php',
'PHPUnit\\Framework\\MockObject\\Rule\\ConsecutiveParameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ConsecutiveParameters.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvocationOrder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvocationOrder.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtIndex' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtIndex.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtLeastOnce' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtLeastOnce.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedAtMostCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedAtMostCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\InvokedCount' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/InvokedCount.php',
'PHPUnit\\Framework\\MockObject\\Rule\\MethodName' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/MethodName.php',
'PHPUnit\\Framework\\MockObject\\Rule\\Parameters' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/Parameters.php',
'PHPUnit\\Framework\\MockObject\\Rule\\ParametersRule' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Rule/ParametersRule.php',
'PHPUnit\\Framework\\MockObject\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/RuntimeException.php',
'PHPUnit\\Framework\\MockObject\\SoapExtensionNotAvailableException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/SoapExtensionNotAvailableException.php',
'PHPUnit\\Framework\\MockObject\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ConsecutiveCalls' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ConsecutiveCalls.php',
'PHPUnit\\Framework\\MockObject\\Stub\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Exception.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnArgument' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnArgument.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnCallback' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnCallback.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnReference' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnReference.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnSelf' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnStub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnStub.php',
'PHPUnit\\Framework\\MockObject\\Stub\\ReturnValueMap' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnValueMap.php',
'PHPUnit\\Framework\\MockObject\\Stub\\Stub' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Stub/Stub.php',
'PHPUnit\\Framework\\MockObject\\UnknownClassException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownClassException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTraitException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTraitException.php',
'PHPUnit\\Framework\\MockObject\\UnknownTypeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Exception/UnknownTypeException.php',
'PHPUnit\\Framework\\MockObject\\Verifiable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/MockObject/Verifiable.php',
'PHPUnit\\Framework\\NoChildTestSuiteException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/NoChildTestSuiteException.php',
'PHPUnit\\Framework\\OutputError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/OutputError.php',
'PHPUnit\\Framework\\PHPTAssertionFailedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/PHPTAssertionFailedError.php',
'PHPUnit\\Framework\\Reorderable' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Reorderable.php',
'PHPUnit\\Framework\\RiskyTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/RiskyTestError.php',
'PHPUnit\\Framework\\SelfDescribing' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SelfDescribing.php',
'PHPUnit\\Framework\\SkippedTest' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTest.php',
'PHPUnit\\Framework\\SkippedTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/SkippedTestCase.php',
'PHPUnit\\Framework\\SkippedTestError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestError.php',
'PHPUnit\\Framework\\SkippedTestSuiteError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SkippedTestSuiteError.php',
'PHPUnit\\Framework\\SyntheticError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticError.php',
'PHPUnit\\Framework\\SyntheticSkippedError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/SyntheticSkippedError.php',
'PHPUnit\\Framework\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Test.php',
'PHPUnit\\Framework\\TestBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestBuilder.php',
'PHPUnit\\Framework\\TestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestCase.php',
'PHPUnit\\Framework\\TestFailure' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestFailure.php',
'PHPUnit\\Framework\\TestListener' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListener.php',
'PHPUnit\\Framework\\TestListenerDefaultImplementation' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestListenerDefaultImplementation.php',
'PHPUnit\\Framework\\TestResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestResult.php',
'PHPUnit\\Framework\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuite.php',
'PHPUnit\\Framework\\TestSuiteIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/TestSuiteIterator.php',
'PHPUnit\\Framework\\UnintentionallyCoveredCodeError' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/UnintentionallyCoveredCodeError.php',
'PHPUnit\\Framework\\Warning' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/Exception/Warning.php',
'PHPUnit\\Framework\\WarningTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Framework/WarningTestCase.php',
'PHPUnit\\Runner\\AfterIncompleteTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterIncompleteTestHook.php',
'PHPUnit\\Runner\\AfterLastTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterLastTestHook.php',
'PHPUnit\\Runner\\AfterRiskyTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterRiskyTestHook.php',
'PHPUnit\\Runner\\AfterSkippedTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSkippedTestHook.php',
'PHPUnit\\Runner\\AfterSuccessfulTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterSuccessfulTestHook.php',
'PHPUnit\\Runner\\AfterTestErrorHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestErrorHook.php',
'PHPUnit\\Runner\\AfterTestFailureHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestFailureHook.php',
'PHPUnit\\Runner\\AfterTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestHook.php',
'PHPUnit\\Runner\\AfterTestWarningHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/AfterTestWarningHook.php',
'PHPUnit\\Runner\\BaseTestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/BaseTestRunner.php',
'PHPUnit\\Runner\\BeforeFirstTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeFirstTestHook.php',
'PHPUnit\\Runner\\BeforeTestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/BeforeTestHook.php',
'PHPUnit\\Runner\\DefaultTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/DefaultTestResultCache.php',
'PHPUnit\\Runner\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Exception.php',
'PHPUnit\\Runner\\Extension\\ExtensionHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/ExtensionHandler.php',
'PHPUnit\\Runner\\Extension\\PharLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Extension/PharLoader.php',
'PHPUnit\\Runner\\Filter\\ExcludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/ExcludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\Factory' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/Factory.php',
'PHPUnit\\Runner\\Filter\\GroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/GroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\IncludeGroupFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php',
'PHPUnit\\Runner\\Filter\\NameFilterIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Filter/NameFilterIterator.php',
'PHPUnit\\Runner\\Hook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/Hook.php',
'PHPUnit\\Runner\\NullTestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/NullTestResultCache.php',
'PHPUnit\\Runner\\PhptTestCase' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/PhptTestCase.php',
'PHPUnit\\Runner\\ResultCacheExtension' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/ResultCacheExtension.php',
'PHPUnit\\Runner\\StandardTestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/StandardTestSuiteLoader.php',
'PHPUnit\\Runner\\TestHook' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestHook.php',
'PHPUnit\\Runner\\TestListenerAdapter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Hook/TestListenerAdapter.php',
'PHPUnit\\Runner\\TestResultCache' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestResultCache.php',
'PHPUnit\\Runner\\TestSuiteLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteLoader.php',
'PHPUnit\\Runner\\TestSuiteSorter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/TestSuiteSorter.php',
'PHPUnit\\Runner\\Version' => __DIR__ . '/..' . '/phpunit/phpunit/src/Runner/Version.php',
'PHPUnit\\TextUI\\CliArguments\\Builder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Builder.php',
'PHPUnit\\TextUI\\CliArguments\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Configuration.php',
'PHPUnit\\TextUI\\CliArguments\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Exception.php',
'PHPUnit\\TextUI\\CliArguments\\Mapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/CliArguments/Mapper.php',
'PHPUnit\\TextUI\\Command' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Command.php',
'PHPUnit\\TextUI\\DefaultResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/DefaultResultPrinter.php',
'PHPUnit\\TextUI\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/Exception.php',
'PHPUnit\\TextUI\\Help' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Help.php',
'PHPUnit\\TextUI\\ReflectionException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/ReflectionException.php',
'PHPUnit\\TextUI\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/ResultPrinter.php',
'PHPUnit\\TextUI\\RuntimeException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/RuntimeException.php',
'PHPUnit\\TextUI\\TestDirectoryNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestDirectoryNotFoundException.php',
'PHPUnit\\TextUI\\TestFileNotFoundException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/Exception/TestFileNotFoundException.php',
'PHPUnit\\TextUI\\TestRunner' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestRunner.php',
'PHPUnit\\TextUI\\TestSuiteMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/TestSuiteMapper.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/CodeCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\FilterMapper' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/FilterMapper.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/Directory.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Filter\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Filter/DirectoryCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Clover.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Cobertura.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Crap4j.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Html.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Php.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Text.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CodeCoverage\\Report\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/CodeCoverage/Report/Xml.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Configuration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Configuration.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Constant' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Constant.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ConstantCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/ConstantCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ConvertLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/ConvertLogTypes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCloverToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCloverToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageCrap4jToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageCrap4jToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageHtmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageHtmlToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoveragePhpToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoveragePhpToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageTextToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageTextToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\CoverageXmlToReport' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/CoverageXmlToReport.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Directory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/Directory.php',
'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\DirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/DirectoryCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Exception.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Extension' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/Extension.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\ExtensionCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/ExtensionCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\File' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/File.php',
'PHPUnit\\TextUI\\XmlConfiguration\\FileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\FileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Filesystem/FileCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Generator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Generator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Group' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Group.php',
'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\GroupCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/GroupCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Groups' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Group/Groups.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IniSetting' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSetting.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IniSettingCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/IniSettingCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\IntroduceCoverageElement' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/IntroduceCoverageElement.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Loader.php',
'PHPUnit\\TextUI\\XmlConfiguration\\LogToReportMigration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/LogToReportMigration.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Junit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Junit.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Logging' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Logging.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TeamCity.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Html' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Html.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Text.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\TestDox\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/TestDox/Xml.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Logging\\Text' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Logging/Text.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Migration' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/Migration.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilder' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilder.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MigrationBuilderException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationBuilderException.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MigrationException' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/MigrationException.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Migrator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromFilterWhitelistToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromFilterWhitelistToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveAttributesFromRootToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveAttributesFromRootToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistExcludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistExcludesToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\MoveWhitelistIncludesToCoverage' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/MoveWhitelistIncludesToCoverage.php',
'PHPUnit\\TextUI\\XmlConfiguration\\PHPUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHPUnit/PHPUnit.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Php' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Php.php',
'PHPUnit\\TextUI\\XmlConfiguration\\PhpHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/PhpHandler.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveCacheTokensAttribute' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveCacheTokensAttribute.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveEmptyFilter' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveEmptyFilter.php',
'PHPUnit\\TextUI\\XmlConfiguration\\RemoveLogTypes' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/RemoveLogTypes.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectory' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectory.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestDirectoryCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestDirectoryCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestFile' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFile.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestFileCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestFileCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestSuite' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuite.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\TestSuiteCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/TestSuite/TestSuiteCollectionIterator.php',
'PHPUnit\\TextUI\\XmlConfiguration\\UpdateSchemaLocationTo93' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/Migration/Migrations/UpdateSchemaLocationTo93.php',
'PHPUnit\\TextUI\\XmlConfiguration\\Variable' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/Variable.php',
'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollection' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollection.php',
'PHPUnit\\TextUI\\XmlConfiguration\\VariableCollectionIterator' => __DIR__ . '/..' . '/phpunit/phpunit/src/TextUI/XmlConfiguration/PHP/VariableCollectionIterator.php',
'PHPUnit\\Util\\Annotation\\DocBlock' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/DocBlock.php',
'PHPUnit\\Util\\Annotation\\Registry' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Annotation/Registry.php',
'PHPUnit\\Util\\Blacklist' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Blacklist.php',
'PHPUnit\\Util\\Cloner' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Cloner.php',
'PHPUnit\\Util\\Color' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Color.php',
'PHPUnit\\Util\\ErrorHandler' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ErrorHandler.php',
'PHPUnit\\Util\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Exception.php',
'PHPUnit\\Util\\ExcludeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/ExcludeList.php',
'PHPUnit\\Util\\FileLoader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/FileLoader.php',
'PHPUnit\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filesystem.php',
'PHPUnit\\Util\\Filter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Filter.php',
'PHPUnit\\Util\\GlobalState' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/GlobalState.php',
'PHPUnit\\Util\\InvalidDataSetException' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/InvalidDataSetException.php',
'PHPUnit\\Util\\Json' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Json.php',
'PHPUnit\\Util\\Log\\JUnit' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/JUnit.php',
'PHPUnit\\Util\\Log\\TeamCity' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Log/TeamCity.php',
'PHPUnit\\Util\\PHP\\AbstractPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php',
'PHPUnit\\Util\\PHP\\DefaultPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/DefaultPhpProcess.php',
'PHPUnit\\Util\\PHP\\WindowsPhpProcess' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/PHP/WindowsPhpProcess.php',
'PHPUnit\\Util\\Printer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Printer.php',
'PHPUnit\\Util\\Reflection' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Reflection.php',
'PHPUnit\\Util\\RegularExpression' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/RegularExpression.php',
'PHPUnit\\Util\\Test' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Test.php',
'PHPUnit\\Util\\TestDox\\CliTestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/CliTestDoxPrinter.php',
'PHPUnit\\Util\\TestDox\\HtmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/HtmlResultPrinter.php',
'PHPUnit\\Util\\TestDox\\NamePrettifier' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php',
'PHPUnit\\Util\\TestDox\\ResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php',
'PHPUnit\\Util\\TestDox\\TestDoxPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TestDoxPrinter.php',
'PHPUnit\\Util\\TestDox\\TextResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/TextResultPrinter.php',
'PHPUnit\\Util\\TestDox\\XmlResultPrinter' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TestDox/XmlResultPrinter.php',
'PHPUnit\\Util\\TextTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/TextTestListRenderer.php',
'PHPUnit\\Util\\Type' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Type.php',
'PHPUnit\\Util\\VersionComparisonOperator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/VersionComparisonOperator.php',
'PHPUnit\\Util\\XdebugFilterScriptGenerator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XdebugFilterScriptGenerator.php',
'PHPUnit\\Util\\Xml' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml.php',
'PHPUnit\\Util\\XmlTestListRenderer' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/XmlTestListRenderer.php',
'PHPUnit\\Util\\Xml\\Exception' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Exception.php',
'PHPUnit\\Util\\Xml\\FailedSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/FailedSchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\Loader' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Loader.php',
'PHPUnit\\Util\\Xml\\SchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\SchemaDetector' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaDetector.php',
'PHPUnit\\Util\\Xml\\SchemaFinder' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SchemaFinder.php',
'PHPUnit\\Util\\Xml\\SnapshotNodeList' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SnapshotNodeList.php',
'PHPUnit\\Util\\Xml\\SuccessfulSchemaDetectionResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/SuccessfulSchemaDetectionResult.php',
'PHPUnit\\Util\\Xml\\ValidationResult' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/ValidationResult.php',
'PHPUnit\\Util\\Xml\\Validator' => __DIR__ . '/..' . '/phpunit/phpunit/src/Util/Xml/Validator.php',
'PharIo\\Manifest\\Application' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Application.php',
'PharIo\\Manifest\\ApplicationName' => __DIR__ . '/..' . '/phar-io/manifest/src/values/ApplicationName.php',
'PharIo\\Manifest\\Author' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Author.php',
'PharIo\\Manifest\\AuthorCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollection.php',
'PharIo\\Manifest\\AuthorCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/AuthorCollectionIterator.php',
'PharIo\\Manifest\\AuthorElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElement.php',
'PharIo\\Manifest\\AuthorElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/AuthorElementCollection.php',
'PharIo\\Manifest\\BundledComponent' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponent.php',
'PharIo\\Manifest\\BundledComponentCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollection.php',
'PharIo\\Manifest\\BundledComponentCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/BundledComponentCollectionIterator.php',
'PharIo\\Manifest\\BundlesElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/BundlesElement.php',
'PharIo\\Manifest\\ComponentElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElement.php',
'PharIo\\Manifest\\ComponentElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ComponentElementCollection.php',
'PharIo\\Manifest\\ContainsElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ContainsElement.php',
'PharIo\\Manifest\\CopyrightElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/CopyrightElement.php',
'PharIo\\Manifest\\CopyrightInformation' => __DIR__ . '/..' . '/phar-io/manifest/src/values/CopyrightInformation.php',
'PharIo\\Manifest\\ElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ElementCollection.php',
'PharIo\\Manifest\\ElementCollectionException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ElementCollectionException.php',
'PharIo\\Manifest\\Email' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Email.php',
'PharIo\\Manifest\\Exception' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/Exception.php',
'PharIo\\Manifest\\ExtElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElement.php',
'PharIo\\Manifest\\ExtElementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtElementCollection.php',
'PharIo\\Manifest\\Extension' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Extension.php',
'PharIo\\Manifest\\ExtensionElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ExtensionElement.php',
'PharIo\\Manifest\\InvalidApplicationNameException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidApplicationNameException.php',
'PharIo\\Manifest\\InvalidEmailException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidEmailException.php',
'PharIo\\Manifest\\InvalidUrlException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/InvalidUrlException.php',
'PharIo\\Manifest\\Library' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Library.php',
'PharIo\\Manifest\\License' => __DIR__ . '/..' . '/phar-io/manifest/src/values/License.php',
'PharIo\\Manifest\\LicenseElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/LicenseElement.php',
'PharIo\\Manifest\\Manifest' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Manifest.php',
'PharIo\\Manifest\\ManifestDocument' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestDocument.php',
'PharIo\\Manifest\\ManifestDocumentException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentException.php',
'PharIo\\Manifest\\ManifestDocumentLoadingException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentLoadingException.php',
'PharIo\\Manifest\\ManifestDocumentMapper' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestDocumentMapper.php',
'PharIo\\Manifest\\ManifestDocumentMapperException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestDocumentMapperException.php',
'PharIo\\Manifest\\ManifestElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/ManifestElement.php',
'PharIo\\Manifest\\ManifestElementException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestElementException.php',
'PharIo\\Manifest\\ManifestLoader' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestLoader.php',
'PharIo\\Manifest\\ManifestLoaderException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/ManifestLoaderException.php',
'PharIo\\Manifest\\ManifestSerializer' => __DIR__ . '/..' . '/phar-io/manifest/src/ManifestSerializer.php',
'PharIo\\Manifest\\NoEmailAddressException' => __DIR__ . '/..' . '/phar-io/manifest/src/exceptions/NoEmailAddressException.php',
'PharIo\\Manifest\\PhpElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/PhpElement.php',
'PharIo\\Manifest\\PhpExtensionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpExtensionRequirement.php',
'PharIo\\Manifest\\PhpVersionRequirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/PhpVersionRequirement.php',
'PharIo\\Manifest\\Requirement' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Requirement.php',
'PharIo\\Manifest\\RequirementCollection' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollection.php',
'PharIo\\Manifest\\RequirementCollectionIterator' => __DIR__ . '/..' . '/phar-io/manifest/src/values/RequirementCollectionIterator.php',
'PharIo\\Manifest\\RequiresElement' => __DIR__ . '/..' . '/phar-io/manifest/src/xml/RequiresElement.php',
'PharIo\\Manifest\\Type' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Type.php',
'PharIo\\Manifest\\Url' => __DIR__ . '/..' . '/phar-io/manifest/src/values/Url.php',
'PharIo\\Version\\AbstractVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AbstractVersionConstraint.php',
'PharIo\\Version\\AndVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AndVersionConstraintGroup.php',
'PharIo\\Version\\AnyVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/AnyVersionConstraint.php',
'PharIo\\Version\\BuildMetaData' => __DIR__ . '/..' . '/phar-io/version/src/BuildMetaData.php',
'PharIo\\Version\\ExactVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/ExactVersionConstraint.php',
'PharIo\\Version\\Exception' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/Exception.php',
'PharIo\\Version\\GreaterThanOrEqualToVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/GreaterThanOrEqualToVersionConstraint.php',
'PharIo\\Version\\InvalidPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidPreReleaseSuffixException.php',
'PharIo\\Version\\InvalidVersionException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/InvalidVersionException.php',
'PharIo\\Version\\NoBuildMetaDataException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoBuildMetaDataException.php',
'PharIo\\Version\\NoPreReleaseSuffixException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/NoPreReleaseSuffixException.php',
'PharIo\\Version\\OrVersionConstraintGroup' => __DIR__ . '/..' . '/phar-io/version/src/constraints/OrVersionConstraintGroup.php',
'PharIo\\Version\\PreReleaseSuffix' => __DIR__ . '/..' . '/phar-io/version/src/PreReleaseSuffix.php',
'PharIo\\Version\\SpecificMajorAndMinorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorAndMinorVersionConstraint.php',
'PharIo\\Version\\SpecificMajorVersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/SpecificMajorVersionConstraint.php',
'PharIo\\Version\\UnsupportedVersionConstraintException' => __DIR__ . '/..' . '/phar-io/version/src/exceptions/UnsupportedVersionConstraintException.php',
'PharIo\\Version\\Version' => __DIR__ . '/..' . '/phar-io/version/src/Version.php',
'PharIo\\Version\\VersionConstraint' => __DIR__ . '/..' . '/phar-io/version/src/constraints/VersionConstraint.php',
'PharIo\\Version\\VersionConstraintParser' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintParser.php',
'PharIo\\Version\\VersionConstraintValue' => __DIR__ . '/..' . '/phar-io/version/src/VersionConstraintValue.php',
'PharIo\\Version\\VersionNumber' => __DIR__ . '/..' . '/phar-io/version/src/VersionNumber.php',
'SebastianBergmann\\CliParser\\AmbiguousOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/AmbiguousOptionException.php',
'SebastianBergmann\\CliParser\\Exception' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/Exception.php',
'SebastianBergmann\\CliParser\\OptionDoesNotAllowArgumentException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/OptionDoesNotAllowArgumentException.php',
'SebastianBergmann\\CliParser\\Parser' => __DIR__ . '/..' . '/sebastian/cli-parser/src/Parser.php',
'SebastianBergmann\\CliParser\\RequiredOptionArgumentMissingException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/RequiredOptionArgumentMissingException.php',
'SebastianBergmann\\CliParser\\UnknownOptionException' => __DIR__ . '/..' . '/sebastian/cli-parser/src/exceptions/UnknownOptionException.php',
'SebastianBergmann\\CodeCoverage\\BranchAndPathCoverageNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/BranchAndPathCoverageNotSupportedException.php',
'SebastianBergmann\\CodeCoverage\\CodeCoverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/CodeCoverage.php',
'SebastianBergmann\\CodeCoverage\\DeadCodeDetectionNotSupportedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DeadCodeDetectionNotSupportedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PathExistsButIsNotDirectoryException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PathExistsButIsNotDirectoryException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PcovDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PcovDriver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PcovNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PcovNotAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgDriver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/PhpdbgDriver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\PhpdbgNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/PhpdbgNotAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Selector' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Selector.php',
'SebastianBergmann\\CodeCoverage\\Driver\\WriteOperationFailedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WriteOperationFailedException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\WrongXdebugVersionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/WrongXdebugVersionException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug2Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug2NotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Xdebug2NotEnabledException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3Driver' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Driver/Xdebug3Driver.php',
'SebastianBergmann\\CodeCoverage\\Driver\\Xdebug3NotEnabledException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Xdebug3NotEnabledException.php',
'SebastianBergmann\\CodeCoverage\\Driver\\XdebugNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XdebugNotAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Exception' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/Exception.php',
'SebastianBergmann\\CodeCoverage\\Filter' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Filter.php',
'SebastianBergmann\\CodeCoverage\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverAvailableException.php',
'SebastianBergmann\\CodeCoverage\\NoCodeCoverageDriverWithPathCoverageSupportAvailableException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/NoCodeCoverageDriverWithPathCoverageSupportAvailableException.php',
'SebastianBergmann\\CodeCoverage\\Node\\AbstractNode' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/AbstractNode.php',
'SebastianBergmann\\CodeCoverage\\Node\\Builder' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Builder.php',
'SebastianBergmann\\CodeCoverage\\Node\\CrapIndex' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/CrapIndex.php',
'SebastianBergmann\\CodeCoverage\\Node\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Directory.php',
'SebastianBergmann\\CodeCoverage\\Node\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/File.php',
'SebastianBergmann\\CodeCoverage\\Node\\Iterator' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Node/Iterator.php',
'SebastianBergmann\\CodeCoverage\\ParserException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ParserException.php',
'SebastianBergmann\\CodeCoverage\\ProcessedCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/ProcessedCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\RawCodeCoverageData' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/RawCodeCoverageData.php',
'SebastianBergmann\\CodeCoverage\\ReflectionException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReflectionException.php',
'SebastianBergmann\\CodeCoverage\\ReportAlreadyFinalizedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/ReportAlreadyFinalizedException.php',
'SebastianBergmann\\CodeCoverage\\Report\\Clover' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Clover.php',
'SebastianBergmann\\CodeCoverage\\Report\\Cobertura' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Cobertura.php',
'SebastianBergmann\\CodeCoverage\\Report\\Crap4j' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Crap4j.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Dashboard' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Dashboard.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Html\\Renderer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Html/Renderer.php',
'SebastianBergmann\\CodeCoverage\\Report\\PHP' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/PHP.php',
'SebastianBergmann\\CodeCoverage\\Report\\Text' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Text.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\BuildInformation' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/BuildInformation.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Coverage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Coverage.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Directory' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Directory.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Facade' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Facade.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\File' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/File.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Method' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Method.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Node' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Node.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Project' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Project.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Report' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Report.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Source' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Source.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Tests' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Tests.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Totals' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Totals.php',
'SebastianBergmann\\CodeCoverage\\Report\\Xml\\Unit' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Report/Xml/Unit.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysisCacheNotConfiguredException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/StaticAnalysisCacheNotConfiguredException.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CacheWarmer' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CacheWarmer.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CachingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CachingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\CodeUnitFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/CodeUnitFindingVisitor.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ExecutableLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ExecutableLinesFindingVisitor.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\FileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/FileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\IgnoredLinesFindingVisitor' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/IgnoredLinesFindingVisitor.php',
'SebastianBergmann\\CodeCoverage\\StaticAnalysis\\ParsingFileAnalyser' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/StaticAnalysis/ParsingFileAnalyser.php',
'SebastianBergmann\\CodeCoverage\\TestIdMissingException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/TestIdMissingException.php',
'SebastianBergmann\\CodeCoverage\\UnintentionallyCoveredCodeException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/UnintentionallyCoveredCodeException.php',
'SebastianBergmann\\CodeCoverage\\Util\\DirectoryCouldNotBeCreatedException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/DirectoryCouldNotBeCreatedException.php',
'SebastianBergmann\\CodeCoverage\\Util\\Filesystem' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Filesystem.php',
'SebastianBergmann\\CodeCoverage\\Util\\Percentage' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Util/Percentage.php',
'SebastianBergmann\\CodeCoverage\\Version' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Version.php',
'SebastianBergmann\\CodeCoverage\\XmlException' => __DIR__ . '/..' . '/phpunit/php-code-coverage/src/Exception/XmlException.php',
'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => __DIR__ . '/..' . '/sebastian/code-unit-reverse-lookup/src/Wizard.php',
'SebastianBergmann\\CodeUnit\\ClassMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassMethodUnit.php',
'SebastianBergmann\\CodeUnit\\ClassUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/ClassUnit.php',
'SebastianBergmann\\CodeUnit\\CodeUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnit.php',
'SebastianBergmann\\CodeUnit\\CodeUnitCollection' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollection.php',
'SebastianBergmann\\CodeUnit\\CodeUnitCollectionIterator' => __DIR__ . '/..' . '/sebastian/code-unit/src/CodeUnitCollectionIterator.php',
'SebastianBergmann\\CodeUnit\\Exception' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/Exception.php',
'SebastianBergmann\\CodeUnit\\FunctionUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/FunctionUnit.php',
'SebastianBergmann\\CodeUnit\\InterfaceMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceMethodUnit.php',
'SebastianBergmann\\CodeUnit\\InterfaceUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/InterfaceUnit.php',
'SebastianBergmann\\CodeUnit\\InvalidCodeUnitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/InvalidCodeUnitException.php',
'SebastianBergmann\\CodeUnit\\Mapper' => __DIR__ . '/..' . '/sebastian/code-unit/src/Mapper.php',
'SebastianBergmann\\CodeUnit\\NoTraitException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/NoTraitException.php',
'SebastianBergmann\\CodeUnit\\ReflectionException' => __DIR__ . '/..' . '/sebastian/code-unit/src/exceptions/ReflectionException.php',
'SebastianBergmann\\CodeUnit\\TraitMethodUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitMethodUnit.php',
'SebastianBergmann\\CodeUnit\\TraitUnit' => __DIR__ . '/..' . '/sebastian/code-unit/src/TraitUnit.php',
'SebastianBergmann\\Comparator\\ArrayComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ArrayComparator.php',
'SebastianBergmann\\Comparator\\Comparator' => __DIR__ . '/..' . '/sebastian/comparator/src/Comparator.php',
'SebastianBergmann\\Comparator\\ComparisonFailure' => __DIR__ . '/..' . '/sebastian/comparator/src/ComparisonFailure.php',
'SebastianBergmann\\Comparator\\DOMNodeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DOMNodeComparator.php',
'SebastianBergmann\\Comparator\\DateTimeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DateTimeComparator.php',
'SebastianBergmann\\Comparator\\DoubleComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/DoubleComparator.php',
'SebastianBergmann\\Comparator\\Exception' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/Exception.php',
'SebastianBergmann\\Comparator\\ExceptionComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ExceptionComparator.php',
'SebastianBergmann\\Comparator\\Factory' => __DIR__ . '/..' . '/sebastian/comparator/src/Factory.php',
'SebastianBergmann\\Comparator\\MockObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/MockObjectComparator.php',
'SebastianBergmann\\Comparator\\NumericComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/NumericComparator.php',
'SebastianBergmann\\Comparator\\ObjectComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ObjectComparator.php',
'SebastianBergmann\\Comparator\\ResourceComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ResourceComparator.php',
'SebastianBergmann\\Comparator\\RuntimeException' => __DIR__ . '/..' . '/sebastian/comparator/src/exceptions/RuntimeException.php',
'SebastianBergmann\\Comparator\\ScalarComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/ScalarComparator.php',
'SebastianBergmann\\Comparator\\SplObjectStorageComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/SplObjectStorageComparator.php',
'SebastianBergmann\\Comparator\\TypeComparator' => __DIR__ . '/..' . '/sebastian/comparator/src/TypeComparator.php',
'SebastianBergmann\\Complexity\\Calculator' => __DIR__ . '/..' . '/sebastian/complexity/src/Calculator.php',
'SebastianBergmann\\Complexity\\Complexity' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/Complexity.php',
'SebastianBergmann\\Complexity\\ComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/ComplexityCalculatingVisitor.php',
'SebastianBergmann\\Complexity\\ComplexityCollection' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollection.php',
'SebastianBergmann\\Complexity\\ComplexityCollectionIterator' => __DIR__ . '/..' . '/sebastian/complexity/src/Complexity/ComplexityCollectionIterator.php',
'SebastianBergmann\\Complexity\\CyclomaticComplexityCalculatingVisitor' => __DIR__ . '/..' . '/sebastian/complexity/src/Visitor/CyclomaticComplexityCalculatingVisitor.php',
'SebastianBergmann\\Complexity\\Exception' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/Exception.php',
'SebastianBergmann\\Complexity\\RuntimeException' => __DIR__ . '/..' . '/sebastian/complexity/src/Exception/RuntimeException.php',
'SebastianBergmann\\Diff\\Chunk' => __DIR__ . '/..' . '/sebastian/diff/src/Chunk.php',
'SebastianBergmann\\Diff\\ConfigurationException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/ConfigurationException.php',
'SebastianBergmann\\Diff\\Diff' => __DIR__ . '/..' . '/sebastian/diff/src/Diff.php',
'SebastianBergmann\\Diff\\Differ' => __DIR__ . '/..' . '/sebastian/diff/src/Differ.php',
'SebastianBergmann\\Diff\\Exception' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/Exception.php',
'SebastianBergmann\\Diff\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/diff/src/Exception/InvalidArgumentException.php',
'SebastianBergmann\\Diff\\Line' => __DIR__ . '/..' . '/sebastian/diff/src/Line.php',
'SebastianBergmann\\Diff\\LongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/LongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\MemoryEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/MemoryEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Diff\\Output\\AbstractChunkOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/AbstractChunkOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOnlyOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOnlyOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\DiffOutputBuilderInterface' => __DIR__ . '/..' . '/sebastian/diff/src/Output/DiffOutputBuilderInterface.php',
'SebastianBergmann\\Diff\\Output\\StrictUnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/StrictUnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Output\\UnifiedDiffOutputBuilder' => __DIR__ . '/..' . '/sebastian/diff/src/Output/UnifiedDiffOutputBuilder.php',
'SebastianBergmann\\Diff\\Parser' => __DIR__ . '/..' . '/sebastian/diff/src/Parser.php',
'SebastianBergmann\\Diff\\TimeEfficientLongestCommonSubsequenceCalculator' => __DIR__ . '/..' . '/sebastian/diff/src/TimeEfficientLongestCommonSubsequenceCalculator.php',
'SebastianBergmann\\Environment\\Console' => __DIR__ . '/..' . '/sebastian/environment/src/Console.php',
'SebastianBergmann\\Environment\\OperatingSystem' => __DIR__ . '/..' . '/sebastian/environment/src/OperatingSystem.php',
'SebastianBergmann\\Environment\\Runtime' => __DIR__ . '/..' . '/sebastian/environment/src/Runtime.php',
'SebastianBergmann\\Exporter\\Exporter' => __DIR__ . '/..' . '/sebastian/exporter/src/Exporter.php',
'SebastianBergmann\\FileIterator\\Facade' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Facade.php',
'SebastianBergmann\\FileIterator\\Factory' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Factory.php',
'SebastianBergmann\\FileIterator\\Iterator' => __DIR__ . '/..' . '/phpunit/php-file-iterator/src/Iterator.php',
'SebastianBergmann\\GlobalState\\CodeExporter' => __DIR__ . '/..' . '/sebastian/global-state/src/CodeExporter.php',
'SebastianBergmann\\GlobalState\\Exception' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/Exception.php',
'SebastianBergmann\\GlobalState\\ExcludeList' => __DIR__ . '/..' . '/sebastian/global-state/src/ExcludeList.php',
'SebastianBergmann\\GlobalState\\Restorer' => __DIR__ . '/..' . '/sebastian/global-state/src/Restorer.php',
'SebastianBergmann\\GlobalState\\RuntimeException' => __DIR__ . '/..' . '/sebastian/global-state/src/exceptions/RuntimeException.php',
'SebastianBergmann\\GlobalState\\Snapshot' => __DIR__ . '/..' . '/sebastian/global-state/src/Snapshot.php',
'SebastianBergmann\\Invoker\\Exception' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/Exception.php',
'SebastianBergmann\\Invoker\\Invoker' => __DIR__ . '/..' . '/phpunit/php-invoker/src/Invoker.php',
'SebastianBergmann\\Invoker\\ProcessControlExtensionNotLoadedException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/ProcessControlExtensionNotLoadedException.php',
'SebastianBergmann\\Invoker\\TimeoutException' => __DIR__ . '/..' . '/phpunit/php-invoker/src/exceptions/TimeoutException.php',
'SebastianBergmann\\LinesOfCode\\Counter' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Counter.php',
'SebastianBergmann\\LinesOfCode\\Exception' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/Exception.php',
'SebastianBergmann\\LinesOfCode\\IllogicalValuesException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/IllogicalValuesException.php',
'SebastianBergmann\\LinesOfCode\\LineCountingVisitor' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LineCountingVisitor.php',
'SebastianBergmann\\LinesOfCode\\LinesOfCode' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/LinesOfCode.php',
'SebastianBergmann\\LinesOfCode\\NegativeValueException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/NegativeValueException.php',
'SebastianBergmann\\LinesOfCode\\RuntimeException' => __DIR__ . '/..' . '/sebastian/lines-of-code/src/Exception/RuntimeException.php',
'SebastianBergmann\\ObjectEnumerator\\Enumerator' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Enumerator.php',
'SebastianBergmann\\ObjectEnumerator\\Exception' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/Exception.php',
'SebastianBergmann\\ObjectEnumerator\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-enumerator/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\Exception' => __DIR__ . '/..' . '/sebastian/object-reflector/src/Exception.php',
'SebastianBergmann\\ObjectReflector\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/object-reflector/src/InvalidArgumentException.php',
'SebastianBergmann\\ObjectReflector\\ObjectReflector' => __DIR__ . '/..' . '/sebastian/object-reflector/src/ObjectReflector.php',
'SebastianBergmann\\RecursionContext\\Context' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Context.php',
'SebastianBergmann\\RecursionContext\\Exception' => __DIR__ . '/..' . '/sebastian/recursion-context/src/Exception.php',
'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => __DIR__ . '/..' . '/sebastian/recursion-context/src/InvalidArgumentException.php',
'SebastianBergmann\\ResourceOperations\\ResourceOperations' => __DIR__ . '/..' . '/sebastian/resource-operations/src/ResourceOperations.php',
'SebastianBergmann\\Template\\Exception' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/Exception.php',
'SebastianBergmann\\Template\\InvalidArgumentException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/InvalidArgumentException.php',
'SebastianBergmann\\Template\\RuntimeException' => __DIR__ . '/..' . '/phpunit/php-text-template/src/exceptions/RuntimeException.php',
'SebastianBergmann\\Template\\Template' => __DIR__ . '/..' . '/phpunit/php-text-template/src/Template.php',
'SebastianBergmann\\Timer\\Duration' => __DIR__ . '/..' . '/phpunit/php-timer/src/Duration.php',
'SebastianBergmann\\Timer\\Exception' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/Exception.php',
'SebastianBergmann\\Timer\\NoActiveTimerException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/NoActiveTimerException.php',
'SebastianBergmann\\Timer\\ResourceUsageFormatter' => __DIR__ . '/..' . '/phpunit/php-timer/src/ResourceUsageFormatter.php',
'SebastianBergmann\\Timer\\TimeSinceStartOfRequestNotAvailableException' => __DIR__ . '/..' . '/phpunit/php-timer/src/exceptions/TimeSinceStartOfRequestNotAvailableException.php',
'SebastianBergmann\\Timer\\Timer' => __DIR__ . '/..' . '/phpunit/php-timer/src/Timer.php',
'SebastianBergmann\\Type\\CallableType' => __DIR__ . '/..' . '/sebastian/type/src/type/CallableType.php',
'SebastianBergmann\\Type\\Exception' => __DIR__ . '/..' . '/sebastian/type/src/exception/Exception.php',
'SebastianBergmann\\Type\\FalseType' => __DIR__ . '/..' . '/sebastian/type/src/type/FalseType.php',
'SebastianBergmann\\Type\\GenericObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/GenericObjectType.php',
'SebastianBergmann\\Type\\IntersectionType' => __DIR__ . '/..' . '/sebastian/type/src/type/IntersectionType.php',
'SebastianBergmann\\Type\\IterableType' => __DIR__ . '/..' . '/sebastian/type/src/type/IterableType.php',
'SebastianBergmann\\Type\\MixedType' => __DIR__ . '/..' . '/sebastian/type/src/type/MixedType.php',
'SebastianBergmann\\Type\\NeverType' => __DIR__ . '/..' . '/sebastian/type/src/type/NeverType.php',
'SebastianBergmann\\Type\\NullType' => __DIR__ . '/..' . '/sebastian/type/src/type/NullType.php',
'SebastianBergmann\\Type\\ObjectType' => __DIR__ . '/..' . '/sebastian/type/src/type/ObjectType.php',
'SebastianBergmann\\Type\\Parameter' => __DIR__ . '/..' . '/sebastian/type/src/Parameter.php',
'SebastianBergmann\\Type\\ReflectionMapper' => __DIR__ . '/..' . '/sebastian/type/src/ReflectionMapper.php',
'SebastianBergmann\\Type\\RuntimeException' => __DIR__ . '/..' . '/sebastian/type/src/exception/RuntimeException.php',
'SebastianBergmann\\Type\\SimpleType' => __DIR__ . '/..' . '/sebastian/type/src/type/SimpleType.php',
'SebastianBergmann\\Type\\StaticType' => __DIR__ . '/..' . '/sebastian/type/src/type/StaticType.php',
'SebastianBergmann\\Type\\TrueType' => __DIR__ . '/..' . '/sebastian/type/src/type/TrueType.php',
'SebastianBergmann\\Type\\Type' => __DIR__ . '/..' . '/sebastian/type/src/type/Type.php',
'SebastianBergmann\\Type\\TypeName' => __DIR__ . '/..' . '/sebastian/type/src/TypeName.php',
'SebastianBergmann\\Type\\UnionType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnionType.php',
'SebastianBergmann\\Type\\UnknownType' => __DIR__ . '/..' . '/sebastian/type/src/type/UnknownType.php',
'SebastianBergmann\\Type\\VoidType' => __DIR__ . '/..' . '/sebastian/type/src/type/VoidType.php',
'SebastianBergmann\\Version' => __DIR__ . '/..' . '/sebastian/version/src/Version.php',
'TheSeer\\Tokenizer\\Exception' => __DIR__ . '/..' . '/theseer/tokenizer/src/Exception.php',
'TheSeer\\Tokenizer\\NamespaceUri' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUri.php',
'TheSeer\\Tokenizer\\NamespaceUriException' => __DIR__ . '/..' . '/theseer/tokenizer/src/NamespaceUriException.php',
'TheSeer\\Tokenizer\\Token' => __DIR__ . '/..' . '/theseer/tokenizer/src/Token.php',
'TheSeer\\Tokenizer\\TokenCollection' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollection.php',
'TheSeer\\Tokenizer\\TokenCollectionException' => __DIR__ . '/..' . '/theseer/tokenizer/src/TokenCollectionException.php',
'TheSeer\\Tokenizer\\Tokenizer' => __DIR__ . '/..' . '/theseer/tokenizer/src/Tokenizer.php',
'TheSeer\\Tokenizer\\XMLSerializer' => __DIR__ . '/..' . '/theseer/tokenizer/src/XMLSerializer.php',
'Yoast\\WPTestUtils\\BrainMonkey\\TestCase' => __DIR__ . '/..' . '/yoast/wp-test-utils/src/BrainMonkey/TestCase.php',
'Yoast\\WPTestUtils\\BrainMonkey\\YoastTestCase' => __DIR__ . '/..' . '/yoast/wp-test-utils/src/BrainMonkey/YoastTestCase.php',
'Yoast\\WPTestUtils\\Helpers\\ExpectOutputHelper' => __DIR__ . '/..' . '/yoast/wp-test-utils/src/Helpers/ExpectOutputHelper.php',
'Yoast\\WPTestUtils\\WPIntegration\\Autoload' => __DIR__ . '/..' . '/yoast/wp-test-utils/src/WPIntegration/Autoload.php',
'Yoast\\WPTestUtils\\WPIntegration\\TestCase' => __DIR__ . '/..' . '/yoast/wp-test-utils/src/WPIntegration/TestCaseOnlyObjectPropertyPolyfill.php',
);
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitb64ab6ec83fc8ada31fa44f753742a80::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitb64ab6ec83fc8ada31fa44f753742a80::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitb64ab6ec83fc8ada31fa44f753742a80::$classMap;
}, null, ClassLoader::class);
}
}

View file

@ -1,377 +0,0 @@
<?php return array(
'uberrxmprk' => array(
'name' => 'upskill/hvac-community-events',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '5af52fcab993fb6e4a9633e0ef329b29f36855ae',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'antecedent/patchwork' => array(
'pretty_version' => '2.2.1',
'version' => '2.2.1.0',
'reference' => '1bf183a3e1bd094f231a2128b9ecc5363c269245',
'type' => 'library',
'install_path' => __DIR__ . '/../antecedent/patchwork',
'aliases' => array(),
'dev_requirement' => true,
),
'brain/monkey' => array(
'pretty_version' => '2.6.2',
'version' => '2.6.2.0',
'reference' => 'd95a9d895352c30f47604ad1b825ab8fa9d1a373',
'type' => 'library',
'install_path' => __DIR__ . '/../brain/monkey',
'aliases' => array(),
'dev_requirement' => true,
),
'composer/installers' => array(
'pretty_version' => 'v1.12.0',
'version' => '1.12.0.0',
'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/./installers',
'aliases' => array(),
'dev_requirement' => false,
),
'cordoval/hamcrest-php' => array(
'dev_requirement' => true,
'replaced' => array(
0 => '*',
),
),
'davedevelopment/hamcrest-php' => array(
'dev_requirement' => true,
'replaced' => array(
0 => '*',
),
),
'doctrine/instantiator' => array(
'pretty_version' => '2.0.0',
'version' => '2.0.0.0',
'reference' => 'c6222283fa3f4ac679f8b9ced9a4e23f163e80d0',
'type' => 'library',
'install_path' => __DIR__ . '/../doctrine/instantiator',
'aliases' => array(),
'dev_requirement' => true,
),
'hamcrest/hamcrest-php' => array(
'pretty_version' => 'v2.0.1',
'version' => '2.0.1.0',
'reference' => '8c3d0a3f6af734494ad8f6fbbee0ba92422859f3',
'type' => 'library',
'install_path' => __DIR__ . '/../hamcrest/hamcrest-php',
'aliases' => array(),
'dev_requirement' => true,
),
'kodova/hamcrest-php' => array(
'dev_requirement' => true,
'replaced' => array(
0 => '*',
),
),
'mockery/mockery' => array(
'pretty_version' => '1.6.12',
'version' => '1.6.12.0',
'reference' => '1f4efdd7d3beafe9807b08156dfcb176d18f1699',
'type' => 'library',
'install_path' => __DIR__ . '/../mockery/mockery',
'aliases' => array(),
'dev_requirement' => true,
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.13.0',
'version' => '1.13.0.0',
'reference' => '024473a478be9df5fdaca2c793f2232fe788e414',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/deep-copy',
'aliases' => array(),
'dev_requirement' => true,
),
'nikic/php-parser' => array(
'pretty_version' => 'v5.4.0',
'version' => '5.4.0.0',
'reference' => '447a020a1f875a434d62f2a401f53b82a396e494',
'type' => 'library',
'install_path' => __DIR__ . '/../nikic/php-parser',
'aliases' => array(),
'dev_requirement' => true,
),
'phar-io/manifest' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'reference' => '54750ef60c58e43759730615a392c31c80e23176',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/manifest',
'aliases' => array(),
'dev_requirement' => true,
),
'phar-io/version' => array(
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74',
'type' => 'library',
'install_path' => __DIR__ . '/../phar-io/version',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-code-coverage' => array(
'pretty_version' => '9.2.32',
'version' => '9.2.32.0',
'reference' => '85402a822d1ecf1db1096959413d35e1c37cf1a5',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-code-coverage',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-file-iterator' => array(
'pretty_version' => '3.0.6',
'version' => '3.0.6.0',
'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-file-iterator',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-invoker' => array(
'pretty_version' => '3.1.1',
'version' => '3.1.1.0',
'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-invoker',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-text-template' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-text-template',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/php-timer' => array(
'pretty_version' => '5.0.3',
'version' => '5.0.3.0',
'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/php-timer',
'aliases' => array(),
'dev_requirement' => true,
),
'phpunit/phpunit' => array(
'pretty_version' => '9.6.22',
'version' => '9.6.22.0',
'reference' => 'f80235cb4d3caa59ae09be3adf1ded27521d1a9c',
'type' => 'library',
'install_path' => __DIR__ . '/../phpunit/phpunit',
'aliases' => array(),
'dev_requirement' => true,
),
'roundcube/plugin-installer' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
'sebastian/cli-parser' => array(
'pretty_version' => '1.0.2',
'version' => '1.0.2.0',
'reference' => '2b56bea83a09de3ac06bb18b92f068e60cc6f50b',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/cli-parser',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/code-unit' => array(
'pretty_version' => '1.0.8',
'version' => '1.0.8.0',
'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/code-unit-reverse-lookup' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/comparator' => array(
'pretty_version' => '4.0.8',
'version' => '4.0.8.0',
'reference' => 'fa0f136dd2334583309d32b62544682ee972b51a',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/comparator',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/complexity' => array(
'pretty_version' => '2.0.3',
'version' => '2.0.3.0',
'reference' => '25f207c40d62b8b7aa32f5ab026c53561964053a',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/complexity',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/diff' => array(
'pretty_version' => '4.0.6',
'version' => '4.0.6.0',
'reference' => 'ba01945089c3a293b01ba9badc29ad55b106b0bc',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/diff',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/environment' => array(
'pretty_version' => '5.1.5',
'version' => '5.1.5.0',
'reference' => '830c43a844f1f8d5b7a1f6d6076b784454d8b7ed',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/environment',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/exporter' => array(
'pretty_version' => '4.0.6',
'version' => '4.0.6.0',
'reference' => '78c00df8f170e02473b682df15bfcdacc3d32d72',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/exporter',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/global-state' => array(
'pretty_version' => '5.0.7',
'version' => '5.0.7.0',
'reference' => 'bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/global-state',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/lines-of-code' => array(
'pretty_version' => '1.0.4',
'version' => '1.0.4.0',
'reference' => 'e1e4a170560925c26d424b6a03aed157e7dcc5c5',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/lines-of-code',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/object-enumerator' => array(
'pretty_version' => '4.0.4',
'version' => '4.0.4.0',
'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-enumerator',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/object-reflector' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/object-reflector',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/recursion-context' => array(
'pretty_version' => '4.0.5',
'version' => '4.0.5.0',
'reference' => 'e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/recursion-context',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/resource-operations' => array(
'pretty_version' => '3.0.4',
'version' => '3.0.4.0',
'reference' => '05d5692a7993ecccd56a03e40cd7e5b09b1d404e',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/resource-operations',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/type' => array(
'pretty_version' => '3.2.1',
'version' => '3.2.1.0',
'reference' => '75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/type',
'aliases' => array(),
'dev_requirement' => true,
),
'sebastian/version' => array(
'pretty_version' => '3.0.2',
'version' => '3.0.2.0',
'reference' => 'c6c1022351a901512170118436c764e473f6de8c',
'type' => 'library',
'install_path' => __DIR__ . '/../sebastian/version',
'aliases' => array(),
'dev_requirement' => true,
),
'shama/baton' => array(
'dev_requirement' => false,
'replaced' => array(
0 => '*',
),
),
'theseer/tokenizer' => array(
'pretty_version' => '1.2.3',
'version' => '1.2.3.0',
'reference' => '737eda637ed5e28c3413cb1ebe8bb52cbf1ca7a2',
'type' => 'library',
'install_path' => __DIR__ . '/../theseer/tokenizer',
'aliases' => array(),
'dev_requirement' => true,
),
'upskill/hvac-community-events' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '5af52fcab993fb6e4a9633e0ef329b29f36855ae',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'wp-phpunit/wp-phpunit' => array(
'pretty_version' => '6.7.2',
'version' => '6.7.2.0',
'reference' => 'e2bb06bacc92a8e9e405e83f56989e8ed9359db1',
'type' => 'library',
'install_path' => __DIR__ . '/../wp-phpunit/wp-phpunit',
'aliases' => array(),
'dev_requirement' => true,
),
'yoast/phpunit-polyfills' => array(
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'reference' => 'e6faedf5e34cea4438e341f660e2f719760c531d',
'type' => 'library',
'install_path' => __DIR__ . '/../yoast/phpunit-polyfills',
'aliases' => array(),
'dev_requirement' => true,
),
'yoast/wp-test-utils' => array(
'pretty_version' => '1.2.0',
'version' => '1.2.0.0',
'reference' => '2e0f62e0281e4859707c5f13b7da1422aa1c8f7b',
'type' => 'library',
'install_path' => __DIR__ . '/../yoast/wp-test-utils',
'aliases' => array(),
'dev_requirement' => true,
),
),
);

Some files were not shown because too many files have changed in this diff Show more