';
echo 'Click here to pay';
diff --git a/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php b/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php
index 3685f8348..7a373a1a5 100644
--- a/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php
+++ b/vendor/mollie/mollie-api-php/examples/orders/refund-order-completely.php
@@ -5,6 +5,10 @@
/*
* Refund all eligible items for an order using the Mollie API.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function htmlspecialchars;
+
try {
/*
* Initialize the Mollie API library with your API key or OAuth access token.
@@ -19,6 +23,6 @@
$refund = $order->refundAll();
echo 'Refund ' . $refund->id . ' was created for order ' . $order->id;
echo 'You will receive ' . $refund->amount->currency . $refund->amount->value;
-} catch (\_PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException $e) {
- echo "API call failed: " . \htmlspecialchars($e->getMessage());
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php b/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php
index e3f5131ee..414175135 100644
--- a/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php
+++ b/vendor/mollie/mollie-api-php/examples/orders/refund-order-partially.php
@@ -5,6 +5,10 @@
/*
* Refund some items for an order using the Mollie API.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function htmlspecialchars;
+
try {
/*
* Initialize the Mollie API library with your API key or OAuth access token.
@@ -19,6 +23,6 @@
$refund = $order->refund(['lines' => [['id' => 'odl_dgtxyl', 'quantity' => 1]], "description" => "Required quantity not in stock, refunding one photo book."]);
echo 'Refund ' . $refund->id . ' was created for part of your order ' . $order->id;
echo 'You will receive ' . $refund->amount->currency . $refund->amount->value;
-} catch (\_PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException $e) {
- echo "API call failed: " . \htmlspecialchars($e->getMessage());
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/orders/webhook.php b/vendor/mollie/mollie-api-php/examples/orders/webhook.php
index 1230219fc..01c7ff9c3 100644
--- a/vendor/mollie/mollie-api-php/examples/orders/webhook.php
+++ b/vendor/mollie/mollie-api-php/examples/orders/webhook.php
@@ -5,6 +5,10 @@
/*
* Handle an order status change using the Mollie API.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function htmlspecialchars;
+
try {
/*
* Initialize the Mollie API library with your API key or OAuth access token.
@@ -21,7 +25,7 @@
/*
* Update the order in the database.
*/
- \_PhpScoper5ea00cc67502b\database_write($orderId, $order->status);
+ database_write($orderId, $order->status);
if ($order->isPaid() || $order->isAuthorized()) {
/*
* The order is paid or authorized
@@ -44,6 +48,6 @@
* The order is pending.
*/
}
-} catch (\_PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException $e) {
- echo "API call failed: " . \htmlspecialchars($e->getMessage());
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php b/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php
index f32dabd05..459173ee5 100644
--- a/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php
+++ b/vendor/mollie/mollie-api-php/examples/payments/create-ideal-payment.php
@@ -5,6 +5,15 @@
/*
* How to prepare an iDEAL payment with the Mollie API.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use _PhpScoper5ea00cc67502b\Mollie\Api\Types\PaymentMethod;
+use function dirname;
+use function header;
+use function htmlspecialchars;
+use function strcasecmp;
+use function time;
+
try {
/*
* Initialize the Mollie API library with your API key.
@@ -16,10 +25,10 @@
* First, let the customer pick the bank in a simple HTML form. This step is actually optional.
*/
if ($_SERVER["REQUEST_METHOD"] != "POST") {
- $method = $mollie->methods->get(\_PhpScoper5ea00cc67502b\Mollie\Api\Types\PaymentMethod::IDEAL, ["include" => "issuers"]);
+ $method = $mollie->methods->get(PaymentMethod::IDEAL, ["include" => "issuers"]);
echo '';
@@ -29,13 +38,13 @@
* Generate a unique order id for this example. It is important to include this unique attribute
* in the redirectUrl (below) so a proper return page can be shown to the customer.
*/
- $orderId = \time();
+ $orderId = time();
/*
* Determine the url parts to these example files.
*/
- $protocol = isset($_SERVER['HTTPS']) && \strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
+ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
$hostname = $_SERVER['HTTP_HOST'];
- $path = \dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
+ $path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
/*
* Payment parameters:
* amount Amount in EUROs. This example creates a € 27.50 payment.
@@ -46,16 +55,16 @@
* metadata Custom metadata that is stored with the payment.
* issuer The customer's bank. If empty the customer can select it later.
*/
- $payment = $mollie->payments->create(["amount" => ["currency" => "EUR", "value" => "27.50"], "method" => \_PhpScoper5ea00cc67502b\Mollie\Api\Types\PaymentMethod::IDEAL, "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php", "metadata" => ["order_id" => $orderId], "issuer" => !empty($_POST["issuer"]) ? $_POST["issuer"] : null]);
+ $payment = $mollie->payments->create(["amount" => ["currency" => "EUR", "value" => "27.50"], "method" => PaymentMethod::IDEAL, "description" => "Order #{$orderId}", "redirectUrl" => "{$protocol}://{$hostname}{$path}/payments/return.php?order_id={$orderId}", "webhookUrl" => "{$protocol}://{$hostname}{$path}/payments/webhook.php", "metadata" => ["order_id" => $orderId], "issuer" => !empty($_POST["issuer"]) ? $_POST["issuer"] : null]);
/*
* In this example we store the order with its payment status in a database.
*/
- \_PhpScoper5ea00cc67502b\database_write($orderId, $payment->status);
+ database_write($orderId, $payment->status);
/*
* Send the customer off to complete the payment.
* This request should always be a GET, thus we enforce 303 http response code
*/
- \header("Location: " . $payment->getCheckoutUrl(), \true, 303);
-} catch (\_PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException $e) {
- echo "API call failed: " . \htmlspecialchars($e->getMessage());
+ header("Location: " . $payment->getCheckoutUrl(), true, 303);
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php b/vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php
index dfa01e293..4be57890a 100644
--- a/vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php
+++ b/vendor/mollie/mollie-api-php/examples/payments/create-payment-oauth.php
@@ -5,6 +5,17 @@
/*
* Example 10 - Using OAuth access token to prepare a new payment.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function dirname;
+use function header;
+use function htmlspecialchars;
+use function reset;
+use function strcasecmp;
+use function time;
+use const PHP_EOL;
+use const PHP_SAPI;
+
try {
/*
* Initialize the Mollie API library with your OAuth access token.
@@ -14,19 +25,19 @@
* Generate a unique order id for this example. It is important to include this unique attribute
* in the redirectUrl (below) so a proper return page can be shown to the customer.
*/
- $orderId = \time();
+ $orderId = time();
/*
* Determine the url parts to these example files.
*/
- $protocol = isset($_SERVER['HTTPS']) && \strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
+ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
$hostname = $_SERVER['HTTP_HOST'] ?: "my.app";
- $path = \dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
+ $path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
/*
* Since unlike an API key the OAuth access token does NOT belong to a profile, we need to retrieve a profile
* so we can specify the profileId-parameter when creating a payment below.
*/
$profiles = $mollie->profiles->page();
- $profile = \reset($profiles);
+ $profile = reset($profiles);
/**
* Paramaters for creating a payment via oAuth
*
@@ -36,16 +47,16 @@
/*
* In this example we store the order with its payment status in a database.
*/
- \_PhpScoper5ea00cc67502b\database_write($orderId, $payment->status);
+ database_write($orderId, $payment->status);
/*
* Send the customer off to complete the payment.
* This request should always be a GET, thus we enforce 303 http response code
*/
- if (\PHP_SAPI === "cli") {
- echo "Redirect to: " . $payment->getCheckoutUrl() . \PHP_EOL;
+ if (PHP_SAPI === "cli") {
+ echo "Redirect to: " . $payment->getCheckoutUrl() . PHP_EOL;
return;
}
- \header("Location: " . $payment->getCheckoutUrl(), \true, 303);
-} catch (\_PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException $e) {
- echo "API call failed: " . \htmlspecialchars($e->getMessage());
+ header("Location: " . $payment->getCheckoutUrl(), true, 303);
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/payments/create-payment.php b/vendor/mollie/mollie-api-php/examples/payments/create-payment.php
index b361f4a90..bca5d2c97 100644
--- a/vendor/mollie/mollie-api-php/examples/payments/create-payment.php
+++ b/vendor/mollie/mollie-api-php/examples/payments/create-payment.php
@@ -5,6 +5,14 @@
/*
* How to prepare a new payment with the Mollie API.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function dirname;
+use function header;
+use function htmlspecialchars;
+use function strcasecmp;
+use function time;
+
try {
/*
* Initialize the Mollie API library with your API key.
@@ -16,13 +24,13 @@
* Generate a unique order id for this example. It is important to include this unique attribute
* in the redirectUrl (below) so a proper return page can be shown to the customer.
*/
- $orderId = \time();
+ $orderId = time();
/*
* Determine the url parts to these example files.
*/
- $protocol = isset($_SERVER['HTTPS']) && \strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
+ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
$hostname = $_SERVER['HTTP_HOST'];
- $path = \dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
+ $path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
/*
* Payment parameters:
* amount Amount in EUROs. This example creates a € 10,- payment.
@@ -35,12 +43,12 @@
/*
* In this example we store the order with its payment status in a database.
*/
- \_PhpScoper5ea00cc67502b\database_write($orderId, $payment->status);
+ database_write($orderId, $payment->status);
/*
* Send the customer off to complete the payment.
* This request should always be a GET, thus we enforce 303 http response code
*/
- \header("Location: " . $payment->getCheckoutUrl(), \true, 303);
-} catch (\_PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException $e) {
- echo "API call failed: " . \htmlspecialchars($e->getMessage());
+ header("Location: " . $payment->getCheckoutUrl(), true, 303);
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/payments/index.php b/vendor/mollie/mollie-api-php/examples/payments/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/mollie/mollie-api-php/examples/payments/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/mollie/mollie-api-php/examples/payments/list-methods.php b/vendor/mollie/mollie-api-php/examples/payments/list-methods.php
index 2df8fc65b..d9a9191e4 100644
--- a/vendor/mollie/mollie-api-php/examples/payments/list-methods.php
+++ b/vendor/mollie/mollie-api-php/examples/payments/list-methods.php
@@ -5,6 +5,10 @@
/*
* How to get the currently activated payment methods for the Payments API.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function htmlspecialchars;
+
try {
/*
* Initialize the Mollie API library with your API key.
@@ -20,10 +24,10 @@
$methods = $mollie->methods->allActive();
foreach ($methods as $method) {
echo '
The subscription status is now: '" . htmlspecialchars($canceledSubscription->status) . "'.
\n";
+} catch (ApiException $e) {
+ echo "API call failed: " . htmlspecialchars($e->getMessage());
}
diff --git a/vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php b/vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php
index 8a8ff8d3a..3b2663312 100644
--- a/vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php
+++ b/vendor/mollie/mollie-api-php/examples/subscriptions/create-subscription.php
@@ -5,6 +5,13 @@
/*
* How to create a regular subscription.
*/
+
+use _PhpScoper5ea00cc67502b\Mollie\Api\Exceptions\ApiException;
+use function dirname;
+use function htmlspecialchars;
+use function strcasecmp;
+use function time;
+
try {
/*
* Initialize the Mollie API library with your API key or OAuth access token.
@@ -13,9 +20,9 @@
/*
* Determine the url parts to these example files.
*/
- $protocol = isset($_SERVER['HTTPS']) && \strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
+ $protocol = isset($_SERVER['HTTPS']) && strcasecmp('off', $_SERVER['HTTPS']) !== 0 ? "https" : "http";
$hostname = $_SERVER['HTTP_HOST'];
- $path = \dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
+ $path = dirname(isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_SERVER['PHP_SELF']);
/*
* Retrieve the last created customer for this example.
* If no customers are created yet, run create-customer example.
@@ -25,7 +32,7 @@
* Generate a unique subscription id for this example. It is important to include this unique attribute
* in the webhookUrl (below) so new payments can be associated with this subscription.
*/
- $subscriptionId = \time();
+ $subscriptionId = time();
/**
* Customer Subscription creation parameters.
*
@@ -41,10 +48,10 @@
* a pending or valid mandate. If the customer has no mandates an error is returned. You
* should then set up a "first payment" for the customer.
*/
- echo "
The subscription status is '" . \htmlspecialchars($subscription->status) . "'.
\n";
+ echo "
The subscription status is '" . htmlspecialchars($subscription->status) . "'.
*
@@ -19,8 +23,8 @@ class RedisProxy
{
private $redis;
private $initializer;
- private $ready = \false;
- public function __construct(\_PhpScoper5ea00cc67502b\Redis $redis, \Closure $initializer)
+ private $ready = false;
+ public function __construct(Redis $redis, Closure $initializer)
{
$this->redis = $redis;
$this->initializer = $initializer;
@@ -28,7 +32,7 @@ public function __construct(\_PhpScoper5ea00cc67502b\Redis $redis, \Closure $ini
public function __call($method, array $args)
{
$this->ready ?: ($this->ready = $this->initializer->__invoke($this->redis));
- return \call_user_func_array([$this->redis, $method], $args);
+ return call_user_func_array([$this->redis, $method], $args);
}
public function hscan($strKey, &$iIterator, $strPattern = null, $iCount = null)
{
diff --git a/vendor/symfony/cache/Traits/RedisTrait.php b/vendor/symfony/cache/Traits/RedisTrait.php
index 812929b34..dbd6c47b0 100644
--- a/vendor/symfony/cache/Traits/RedisTrait.php
+++ b/vendor/symfony/cache/Traits/RedisTrait.php
@@ -10,12 +10,43 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Cache\Traits;
+use _PhpScoper5ea00cc67502b\Predis\Client;
use _PhpScoper5ea00cc67502b\Predis\Connection\Aggregate\ClusterInterface;
use _PhpScoper5ea00cc67502b\Predis\Connection\Aggregate\RedisCluster;
use _PhpScoper5ea00cc67502b\Predis\Connection\Factory;
use _PhpScoper5ea00cc67502b\Predis\Response\Status;
+use _PhpScoper5ea00cc67502b\Redis;
+use _PhpScoper5ea00cc67502b\RedisArray;
+use _PhpScoper5ea00cc67502b\RedisException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\CacheException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException;
+use Closure;
+use Exception;
+use Traversable;
+use function array_combine;
+use function call_user_func_array;
+use function class_exists;
+use function count;
+use function extension_loaded;
+use function get_class;
+use function gettype;
+use function is_a;
+use function is_array;
+use function is_object;
+use function parse_str;
+use function parse_url;
+use function preg_match;
+use function preg_replace;
+use function preg_replace_callback;
+use function restore_error_handler;
+use function serialize;
+use function set_error_handler;
+use function sprintf;
+use function strlen;
+use function strpos;
+use function substr;
+use function version_compare;
+
/**
* @author Aurimas Niekis
* @author Nicolas Grekas
@@ -24,7 +55,7 @@
*/
trait RedisTrait
{
- private static $defaultConnectionOptions = ['class' => null, 'persistent' => 0, 'persistent_id' => null, 'timeout' => 30, 'read_timeout' => 0, 'retry_interval' => 0, 'lazy' => \false];
+ private static $defaultConnectionOptions = ['class' => null, 'persistent' => 0, 'persistent_id' => null, 'timeout' => 30, 'read_timeout' => 0, 'retry_interval' => 0, 'lazy' => false];
private $redis;
/**
* @param \Redis|\RedisArray|\RedisCluster|\Predis\Client $redisClient
@@ -32,11 +63,11 @@ trait RedisTrait
private function init($redisClient, $namespace = '', $defaultLifetime = 0)
{
parent::__construct($namespace, $defaultLifetime);
- if (\preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
+ if (preg_match('#[^-+_.A-Za-z0-9]#', $namespace, $match)) {
+ throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
}
- if (!$redisClient instanceof \_PhpScoper5ea00cc67502b\Redis && !$redisClient instanceof \_PhpScoper5ea00cc67502b\RedisArray && !$redisClient instanceof \_PhpScoper5ea00cc67502b\RedisCluster && !$redisClient instanceof \_PhpScoper5ea00cc67502b\Predis\Client && !$redisClient instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Traits\RedisProxy) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\\Client, "%s" given.', __METHOD__, \is_object($redisClient) ? \get_class($redisClient) : \gettype($redisClient)));
+ if (!$redisClient instanceof Redis && !$redisClient instanceof RedisArray && !$redisClient instanceof \_PhpScoper5ea00cc67502b\RedisCluster && !$redisClient instanceof Client && !$redisClient instanceof RedisProxy) {
+ throw new InvalidArgumentException(sprintf('"%s()" expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\\Client, "%s" given.', __METHOD__, is_object($redisClient) ? get_class($redisClient) : gettype($redisClient)));
}
$this->redis = $redisClient;
}
@@ -59,24 +90,24 @@ private function init($redisClient, $namespace = '', $defaultLifetime = 0)
*/
public static function createConnection($dsn, array $options = [])
{
- if (0 !== \strpos($dsn, 'redis://')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Invalid Redis DSN: "%s" does not start with "redis://".', $dsn));
+ if (0 !== strpos($dsn, 'redis://')) {
+ throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s" does not start with "redis://".', $dsn));
}
- $params = \preg_replace_callback('#^redis://(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use(&$auth) {
+ $params = preg_replace_callback('#^redis://(?:(?:[^:@]*+:)?([^@]*+)@)?#', function ($m) use(&$auth) {
if (isset($m[1])) {
$auth = $m[1];
}
return 'file://';
}, $dsn);
- if (\false === ($params = \parse_url($params))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Invalid Redis DSN: "%s".', $dsn));
+ if (false === ($params = parse_url($params))) {
+ throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn));
}
if (!isset($params['host']) && !isset($params['path'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Invalid Redis DSN: "%s".', $dsn));
+ throw new InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn));
}
- if (isset($params['path']) && \preg_match('#/(\\d+)$#', $params['path'], $m)) {
+ if (isset($params['path']) && preg_match('#/(\\d+)$#', $params['path'], $m)) {
$params['dbindex'] = $m[1];
- $params['path'] = \substr($params['path'], 0, -\strlen($m[0]));
+ $params['path'] = substr($params['path'], 0, -strlen($m[0]));
}
if (isset($params['host'])) {
$scheme = 'tcp';
@@ -85,52 +116,52 @@ public static function createConnection($dsn, array $options = [])
}
$params += ['host' => isset($params['host']) ? $params['host'] : $params['path'], 'port' => isset($params['host']) ? 6379 : null, 'dbindex' => 0];
if (isset($params['query'])) {
- \parse_str($params['query'], $query);
+ parse_str($params['query'], $query);
$params += $query;
}
$params += $options + self::$defaultConnectionOptions;
- if (null === $params['class'] && !\extension_loaded('redis') && !\class_exists(\_PhpScoper5ea00cc67502b\Predis\Client::class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\CacheException(\sprintf('Cannot find the "redis" extension, and "predis/predis" is not installed: "%s".', $dsn));
+ if (null === $params['class'] && !extension_loaded('redis') && !class_exists(Client::class)) {
+ throw new CacheException(sprintf('Cannot find the "redis" extension, and "predis/predis" is not installed: "%s".', $dsn));
}
- $class = null === $params['class'] ? \extension_loaded('redis') ? \_PhpScoper5ea00cc67502b\Redis::class : \_PhpScoper5ea00cc67502b\Predis\Client::class : $params['class'];
- if (\is_a($class, \_PhpScoper5ea00cc67502b\Redis::class, \true)) {
+ $class = null === $params['class'] ? extension_loaded('redis') ? Redis::class : Client::class : $params['class'];
+ if (is_a($class, Redis::class, true)) {
$connect = $params['persistent'] || $params['persistent_id'] ? 'pconnect' : 'connect';
$redis = new $class();
$initializer = function ($redis) use($connect, $params, $dsn, $auth) {
try {
@$redis->{$connect}($params['host'], $params['port'], $params['timeout'], $params['persistent_id'], $params['retry_interval']);
- } catch (\_PhpScoper5ea00cc67502b\RedisException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Redis connection failed (%s): "%s".', $e->getMessage(), $dsn));
+ } catch (RedisException $e) {
+ throw new InvalidArgumentException(sprintf('Redis connection failed (%s): "%s".', $e->getMessage(), $dsn));
}
- \set_error_handler(function ($type, $msg) use(&$error) {
+ set_error_handler(function ($type, $msg) use(&$error) {
$error = $msg;
});
$isConnected = $redis->isConnected();
- \restore_error_handler();
+ restore_error_handler();
if (!$isConnected) {
- $error = \preg_match('/^Redis::p?connect\\(\\): (.*)/', $error, $error) ? \sprintf(' (%s)', $error[1]) : '';
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Redis connection failed%s: "%s".', $error, $dsn));
+ $error = preg_match('/^Redis::p?connect\\(\\): (.*)/', $error, $error) ? sprintf(' (%s)', $error[1]) : '';
+ throw new InvalidArgumentException(sprintf('Redis connection failed%s: "%s".', $error, $dsn));
}
- if (null !== $auth && !$redis->auth($auth) || $params['dbindex'] && !$redis->select($params['dbindex']) || $params['read_timeout'] && !$redis->setOption(\_PhpScoper5ea00cc67502b\Redis::OPT_READ_TIMEOUT, $params['read_timeout'])) {
- $e = \preg_replace('/^ERR /', '', $redis->getLastError());
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Redis connection failed (%s): "%s".', $e, $dsn));
+ if (null !== $auth && !$redis->auth($auth) || $params['dbindex'] && !$redis->select($params['dbindex']) || $params['read_timeout'] && !$redis->setOption(Redis::OPT_READ_TIMEOUT, $params['read_timeout'])) {
+ $e = preg_replace('/^ERR /', '', $redis->getLastError());
+ throw new InvalidArgumentException(sprintf('Redis connection failed (%s): "%s".', $e, $dsn));
}
- return \true;
+ return true;
};
if ($params['lazy']) {
- $redis = new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Traits\RedisProxy($redis, $initializer);
+ $redis = new RedisProxy($redis, $initializer);
} else {
$initializer($redis);
}
- } elseif (\is_a($class, \_PhpScoper5ea00cc67502b\Predis\Client::class, \true)) {
+ } elseif (is_a($class, Client::class, true)) {
$params['scheme'] = $scheme;
$params['database'] = $params['dbindex'] ?: null;
$params['password'] = $auth;
- $redis = new $class((new \_PhpScoper5ea00cc67502b\Predis\Connection\Factory())->create($params));
- } elseif (\class_exists($class, \false)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('"%s" is not a subclass of "Redis" or "Predis\\Client".', $class));
+ $redis = new $class((new Factory())->create($params));
+ } elseif (class_exists($class, false)) {
+ throw new InvalidArgumentException(sprintf('"%s" is not a subclass of "Redis" or "Predis\\Client".', $class));
} else {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Exception\InvalidArgumentException(\sprintf('Class "%s" does not exist.', $class));
+ throw new InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
}
return $redis;
}
@@ -143,7 +174,7 @@ protected function doFetch(array $ids)
return [];
}
$result = [];
- if ($this->redis instanceof \_PhpScoper5ea00cc67502b\Predis\Client && $this->redis->getConnection() instanceof \_PhpScoper5ea00cc67502b\Predis\Connection\Aggregate\ClusterInterface) {
+ if ($this->redis instanceof Client && $this->redis->getConnection() instanceof ClusterInterface) {
$values = $this->pipeline(function () use($ids) {
foreach ($ids as $id) {
(yield 'get' => [$id]);
@@ -151,10 +182,10 @@ protected function doFetch(array $ids)
});
} else {
$values = $this->redis->mget($ids);
- if (!\is_array($values) || \count($values) !== \count($ids)) {
+ if (!is_array($values) || count($values) !== count($ids)) {
return [];
}
- $values = \array_combine($ids, $values);
+ $values = array_combine($ids, $values);
}
foreach ($values as $id => $v) {
if ($v) {
@@ -175,19 +206,19 @@ protected function doHave($id)
*/
protected function doClear($namespace)
{
- $cleared = \true;
+ $cleared = true;
$hosts = [$this->redis];
$evalArgs = [[$namespace], 0];
- if ($this->redis instanceof \_PhpScoper5ea00cc67502b\Predis\Client) {
+ if ($this->redis instanceof Client) {
$evalArgs = [0, $namespace];
$connection = $this->redis->getConnection();
- if ($connection instanceof \_PhpScoper5ea00cc67502b\Predis\Connection\Aggregate\ClusterInterface && $connection instanceof \Traversable) {
+ if ($connection instanceof ClusterInterface && $connection instanceof Traversable) {
$hosts = [];
foreach ($connection as $c) {
- $hosts[] = new \_PhpScoper5ea00cc67502b\Predis\Client($c);
+ $hosts[] = new Client($c);
}
}
- } elseif ($this->redis instanceof \_PhpScoper5ea00cc67502b\RedisArray) {
+ } elseif ($this->redis instanceof RedisArray) {
$hosts = [];
foreach ($this->redis->_hosts() as $host) {
$hosts[] = $this->redis->_instance($host);
@@ -195,7 +226,7 @@ protected function doClear($namespace)
} elseif ($this->redis instanceof \_PhpScoper5ea00cc67502b\RedisCluster) {
$hosts = [];
foreach ($this->redis->_masters() as $host) {
- $hosts[] = $h = new \_PhpScoper5ea00cc67502b\Redis();
+ $hosts[] = $h = new Redis();
$h->connect($host[0], $host[1]);
}
}
@@ -206,7 +237,7 @@ protected function doClear($namespace)
}
$info = $host->info('Server');
$info = isset($info['Server']) ? $info['Server'] : $info;
- if (!\version_compare($info['redis_version'], '2.8', '>=')) {
+ if (!version_compare($info['redis_version'], '2.8', '>=')) {
// As documented in Redis documentation (http://redis.io/commands/keys) using KEYS
// can hang your server when it is executed against large databases (millions of items).
// Whenever you hit this scale, you should really consider upgrading to Redis 2.8 or above.
@@ -215,8 +246,8 @@ protected function doClear($namespace)
}
$cursor = null;
do {
- $keys = $host instanceof \_PhpScoper5ea00cc67502b\Predis\Client ? $host->scan($cursor, 'MATCH', $namespace . '*', 'COUNT', 1000) : $host->scan($cursor, $namespace . '*', 1000);
- if (isset($keys[1]) && \is_array($keys[1])) {
+ $keys = $host instanceof Client ? $host->scan($cursor, 'MATCH', $namespace . '*', 'COUNT', 1000) : $host->scan($cursor, $namespace . '*', 1000);
+ if (isset($keys[1]) && is_array($keys[1])) {
$cursor = $keys[0];
$keys = $keys[1];
}
@@ -233,9 +264,9 @@ protected function doClear($namespace)
protected function doDelete(array $ids)
{
if (!$ids) {
- return \true;
+ return true;
}
- if ($this->redis instanceof \_PhpScoper5ea00cc67502b\Predis\Client && $this->redis->getConnection() instanceof \_PhpScoper5ea00cc67502b\Predis\Connection\Aggregate\ClusterInterface) {
+ if ($this->redis instanceof Client && $this->redis->getConnection() instanceof ClusterInterface) {
$this->pipeline(function () use($ids) {
foreach ($ids as $id) {
(yield 'del' => [$id]);
@@ -244,7 +275,7 @@ protected function doDelete(array $ids)
} else {
$this->redis->del($ids);
}
- return \true;
+ return true;
}
/**
* {@inheritdoc}
@@ -255,8 +286,8 @@ protected function doSave(array $values, $lifetime)
$failed = [];
foreach ($values as $id => $value) {
try {
- $serialized[$id] = \serialize($value);
- } catch (\Exception $e) {
+ $serialized[$id] = serialize($value);
+ } catch (Exception $e) {
$failed[] = $id;
}
}
@@ -273,52 +304,52 @@ protected function doSave(array $values, $lifetime)
}
});
foreach ($results as $id => $result) {
- if (\true !== $result && (!$result instanceof \_PhpScoper5ea00cc67502b\Predis\Response\Status || $result !== \_PhpScoper5ea00cc67502b\Predis\Response\Status::get('OK'))) {
+ if (true !== $result && (!$result instanceof Status || $result !== Status::get('OK'))) {
$failed[] = $id;
}
}
return $failed;
}
- private function pipeline(\Closure $generator)
+ private function pipeline(Closure $generator)
{
$ids = [];
- if ($this->redis instanceof \_PhpScoper5ea00cc67502b\RedisCluster || $this->redis instanceof \_PhpScoper5ea00cc67502b\Predis\Client && $this->redis->getConnection() instanceof \_PhpScoper5ea00cc67502b\Predis\Connection\Aggregate\RedisCluster) {
+ if ($this->redis instanceof \_PhpScoper5ea00cc67502b\RedisCluster || $this->redis instanceof Client && $this->redis->getConnection() instanceof RedisCluster) {
// phpredis & predis don't support pipelining with RedisCluster
// see https://github.com/phpredis/phpredis/blob/develop/cluster.markdown#pipelining
// see https://github.com/nrk/predis/issues/267#issuecomment-123781423
$results = [];
foreach ($generator() as $command => $args) {
- $results[] = \call_user_func_array([$this->redis, $command], $args);
+ $results[] = call_user_func_array([$this->redis, $command], $args);
$ids[] = $args[0];
}
- } elseif ($this->redis instanceof \_PhpScoper5ea00cc67502b\Predis\Client) {
+ } elseif ($this->redis instanceof Client) {
$results = $this->redis->pipeline(function ($redis) use($generator, &$ids) {
foreach ($generator() as $command => $args) {
- \call_user_func_array([$redis, $command], $args);
+ call_user_func_array([$redis, $command], $args);
$ids[] = $args[0];
}
});
- } elseif ($this->redis instanceof \_PhpScoper5ea00cc67502b\RedisArray) {
+ } elseif ($this->redis instanceof RedisArray) {
$connections = $results = $ids = [];
foreach ($generator() as $command => $args) {
if (!isset($connections[$h = $this->redis->_target($args[0])])) {
$connections[$h] = [$this->redis->_instance($h), -1];
- $connections[$h][0]->multi(\_PhpScoper5ea00cc67502b\Redis::PIPELINE);
+ $connections[$h][0]->multi(Redis::PIPELINE);
}
- \call_user_func_array([$connections[$h][0], $command], $args);
+ call_user_func_array([$connections[$h][0], $command], $args);
$results[] = [$h, ++$connections[$h][1]];
$ids[] = $args[0];
}
foreach ($connections as $h => $c) {
$connections[$h] = $c[0]->exec();
}
- foreach ($results as $k => list($h, $c)) {
+ foreach ($results as $k => [$h, $c]) {
$results[$k] = $connections[$h][$c];
}
} else {
- $this->redis->multi(\_PhpScoper5ea00cc67502b\Redis::PIPELINE);
+ $this->redis->multi(Redis::PIPELINE);
foreach ($generator() as $command => $args) {
- \call_user_func_array([$this->redis, $command], $args);
+ call_user_func_array([$this->redis, $command], $args);
$ids[] = $args[0];
}
$results = $this->redis->exec();
diff --git a/vendor/symfony/cache/Traits/index.php b/vendor/symfony/cache/Traits/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/cache/Traits/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/cache/index.php b/vendor/symfony/cache/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/cache/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/ConfigCache.php b/vendor/symfony/config/ConfigCache.php
index b02f637bc..59b29e295 100644
--- a/vendor/symfony/config/ConfigCache.php
+++ b/vendor/symfony/config/ConfigCache.php
@@ -11,6 +11,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\SelfCheckingResourceChecker;
+use function is_file;
+
/**
* ConfigCache caches arbitrary content in files on disk.
*
@@ -21,7 +23,7 @@
* @author Fabien Potencier
* @author Matthias Pigulla
*/
-class ConfigCache extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache
+class ConfigCache extends ResourceCheckerConfigCache
{
private $debug;
/**
@@ -32,8 +34,8 @@ public function __construct($file, $debug)
{
$this->debug = (bool) $debug;
$checkers = [];
- if (\true === $this->debug) {
- $checkers = [new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\SelfCheckingResourceChecker()];
+ if (true === $this->debug) {
+ $checkers = [new SelfCheckingResourceChecker()];
}
parent::__construct($file, $checkers);
}
@@ -47,8 +49,8 @@ public function __construct($file, $debug)
*/
public function isFresh()
{
- if (!$this->debug && \is_file($this->getPath())) {
- return \true;
+ if (!$this->debug && is_file($this->getPath())) {
+ return true;
}
return parent::isFresh();
}
diff --git a/vendor/symfony/config/ConfigCacheFactory.php b/vendor/symfony/config/ConfigCacheFactory.php
index fed309378..1396eef53 100644
--- a/vendor/symfony/config/ConfigCacheFactory.php
+++ b/vendor/symfony/config/ConfigCacheFactory.php
@@ -10,6 +10,12 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config;
+use InvalidArgumentException;
+use function call_user_func;
+use function gettype;
+use function is_callable;
+use function sprintf;
+
/**
* Basic implementation of ConfigCacheFactoryInterface that
* creates an instance of the default ConfigCache.
@@ -19,7 +25,7 @@
*
* @author Matthias Pigulla
*/
-class ConfigCacheFactory implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ConfigCacheFactoryInterface
+class ConfigCacheFactory implements ConfigCacheFactoryInterface
{
private $debug;
/**
@@ -34,12 +40,12 @@ public function __construct($debug)
*/
public function cache($file, $callback)
{
- if (!\is_callable($callback)) {
- throw new \InvalidArgumentException(\sprintf('Invalid type for callback argument. Expected callable, but got "%s".', \gettype($callback)));
+ if (!is_callable($callback)) {
+ throw new InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', gettype($callback)));
}
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ConfigCache($file, $this->debug);
+ $cache = new ConfigCache($file, $this->debug);
if (!$cache->isFresh()) {
- \call_user_func($callback, $cache);
+ call_user_func($callback, $cache);
}
return $cache;
}
diff --git a/vendor/symfony/config/ConfigCacheInterface.php b/vendor/symfony/config/ConfigCacheInterface.php
index 61d5388b8..1433a1165 100644
--- a/vendor/symfony/config/ConfigCacheInterface.php
+++ b/vendor/symfony/config/ConfigCacheInterface.php
@@ -11,6 +11,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface;
+use RuntimeException;
+
/**
* Interface for ConfigCache.
*
@@ -39,7 +41,7 @@ public function isFresh();
* @param string $content The content to write into the cache
* @param ResourceInterface[]|null $metadata An array of ResourceInterface instances
*
- * @throws \RuntimeException When the cache file cannot be written
+ * @throws RuntimeException When the cache file cannot be written
*/
public function write($content, array $metadata = null);
}
diff --git a/vendor/symfony/config/Definition/ArrayNode.php b/vendor/symfony/config/Definition/ArrayNode.php
index 2bfe789c3..46c0c39b0 100644
--- a/vendor/symfony/config/Definition/ArrayNode.php
+++ b/vendor/symfony/config/Definition/ArrayNode.php
@@ -13,22 +13,38 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidTypeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\UnsetKeyException;
+use InvalidArgumentException;
+use RuntimeException;
+use function array_key_exists;
+use function array_keys;
+use function count;
+use function gettype;
+use function implode;
+use function is_array;
+use function json_encode;
+use function sprintf;
+use function str_replace;
+use function strlen;
+use function strpos;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Represents an Array node in the config tree.
*
* @author Johannes M. Schmitt
*/
-class ArrayNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\BaseNode implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypeNodeInterface
+class ArrayNode extends BaseNode implements PrototypeNodeInterface
{
protected $xmlRemappings = [];
protected $children = [];
- protected $allowFalse = \false;
- protected $allowNewKeys = \true;
- protected $addIfNotSet = \false;
- protected $performDeepMerging = \true;
- protected $ignoreExtraKeys = \false;
- protected $removeExtraKeys = \true;
- protected $normalizeKeys = \true;
+ protected $allowFalse = false;
+ protected $allowNewKeys = true;
+ protected $addIfNotSet = false;
+ protected $performDeepMerging = true;
+ protected $ignoreExtraKeys = false;
+ protected $removeExtraKeys = true;
+ protected $normalizeKeys = true;
public function setNormalizeKeys($normalizeKeys)
{
$this->normalizeKeys = (bool) $normalizeKeys;
@@ -44,12 +60,12 @@ public function setNormalizeKeys($normalizeKeys)
*/
protected function preNormalize($value)
{
- if (!$this->normalizeKeys || !\is_array($value)) {
+ if (!$this->normalizeKeys || !is_array($value)) {
return $value;
}
$normalized = [];
foreach ($value as $k => $v) {
- if (\false !== \strpos($k, '-') && \false === \strpos($k, '_') && !\array_key_exists($normalizedKey = \str_replace('-', '_', $k), $value)) {
+ if (false !== strpos($k, '-') && false === strpos($k, '_') && !array_key_exists($normalizedKey = str_replace('-', '_', $k), $value)) {
$normalized[$normalizedKey] = $v;
} else {
$normalized[$k] = $v;
@@ -127,7 +143,7 @@ public function setPerformDeepMerging($boolean)
* @param bool $boolean To allow extra keys
* @param bool $remove To remove extra keys
*/
- public function setIgnoreExtraKeys($boolean, $remove = \true)
+ public function setIgnoreExtraKeys($boolean, $remove = true)
{
$this->ignoreExtraKeys = (bool) $boolean;
$this->removeExtraKeys = $this->ignoreExtraKeys && $remove;
@@ -152,7 +168,7 @@ public function hasDefaultValue()
public function getDefaultValue()
{
if (!$this->hasDefaultValue()) {
- throw new \RuntimeException(\sprintf('The node at path "%s" has no default value.', $this->getPath()));
+ throw new RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath()));
}
$defaults = [];
foreach ($this->children as $name => $child) {
@@ -165,17 +181,17 @@ public function getDefaultValue()
/**
* Adds a child node.
*
- * @throws \InvalidArgumentException when the child node has no name
- * @throws \InvalidArgumentException when the child node's name is not unique
+ * @throws InvalidArgumentException when the child node has no name
+ * @throws InvalidArgumentException when the child node's name is not unique
*/
- public function addChild(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface $node)
+ public function addChild(NodeInterface $node)
{
$name = $node->getName();
- if (!\strlen($name)) {
- throw new \InvalidArgumentException('Child nodes must be named.');
+ if (!strlen($name)) {
+ throw new InvalidArgumentException('Child nodes must be named.');
}
if (isset($this->children[$name])) {
- throw new \InvalidArgumentException(\sprintf('A child node named "%s" already exists.', $name));
+ throw new InvalidArgumentException(sprintf('A child node named "%s" already exists.', $name));
}
$this->children[$name] = $node;
}
@@ -191,13 +207,13 @@ public function addChild(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Defin
*/
protected function finalizeValue($value)
{
- if (\false === $value) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\UnsetKeyException(\sprintf('Unsetting key for path "%s", value: "%s".', $this->getPath(), \json_encode($value)));
+ if (false === $value) {
+ throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: "%s".', $this->getPath(), json_encode($value)));
}
foreach ($this->children as $name => $child) {
- if (!\array_key_exists($name, $value)) {
+ if (!array_key_exists($name, $value)) {
if ($child->isRequired()) {
- $ex = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException(\sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()));
+ $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()));
$ex->setPath($this->getPath());
throw $ex;
}
@@ -207,11 +223,11 @@ protected function finalizeValue($value)
continue;
}
if ($child->isDeprecated()) {
- @\trigger_error($child->getDeprecationMessage($name, $this->getPath()), \E_USER_DEPRECATED);
+ @trigger_error($child->getDeprecationMessage($name, $this->getPath()), E_USER_DEPRECATED);
}
try {
$value[$name] = $child->finalize($value[$name]);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\UnsetKeyException $e) {
+ } catch (UnsetKeyException $e) {
unset($value[$name]);
}
}
@@ -226,8 +242,8 @@ protected function finalizeValue($value)
*/
protected function validateType($value)
{
- if (!\is_array($value) && (!$this->allowFalse || \false !== $value)) {
- $ex = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidTypeException(\sprintf('Invalid type for path "%s". Expected array, but got %s', $this->getPath(), \gettype($value)));
+ if (!is_array($value) && (!$this->allowFalse || false !== $value)) {
+ $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected array, but got %s', $this->getPath(), gettype($value)));
if ($hint = $this->getInfo()) {
$ex->addHint($hint);
}
@@ -246,7 +262,7 @@ protected function validateType($value)
*/
protected function normalizeValue($value)
{
- if (\false === $value) {
+ if (false === $value) {
return $value;
}
$value = $this->remapXml($value);
@@ -255,7 +271,7 @@ protected function normalizeValue($value)
if (isset($this->children[$name])) {
try {
$normalized[$name] = $this->children[$name]->normalize($val);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\UnsetKeyException $e) {
+ } catch (UnsetKeyException $e) {
}
unset($value[$name]);
} elseif (!$this->removeExtraKeys) {
@@ -263,8 +279,8 @@ protected function normalizeValue($value)
}
}
// if extra fields are present, throw exception
- if (\count($value) && !$this->ignoreExtraKeys) {
- $ex = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException(\sprintf('Unrecognized option%s "%s" under "%s"', 1 === \count($value) ? '' : 's', \implode(', ', \array_keys($value)), $this->getPath()));
+ if (count($value) && !$this->ignoreExtraKeys) {
+ $ex = new InvalidConfigurationException(sprintf('Unrecognized option%s "%s" under "%s"', 1 === count($value) ? '' : 's', implode(', ', array_keys($value)), $this->getPath()));
$ex->setPath($this->getPath());
throw $ex;
}
@@ -279,11 +295,11 @@ protected function normalizeValue($value)
*/
protected function remapXml($value)
{
- foreach ($this->xmlRemappings as list($singular, $plural)) {
+ foreach ($this->xmlRemappings as [$singular, $plural]) {
if (!isset($value[$singular])) {
continue;
}
- $value[$plural] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Processor::normalizeConfig($value, $singular, $plural);
+ $value[$plural] = Processor::normalizeConfig($value, $singular, $plural);
unset($value[$singular]);
}
return $value;
@@ -297,23 +313,23 @@ protected function remapXml($value)
* @return mixed The merged values
*
* @throws InvalidConfigurationException
- * @throws \RuntimeException
+ * @throws RuntimeException
*/
protected function mergeValues($leftSide, $rightSide)
{
- if (\false === $rightSide) {
+ if (false === $rightSide) {
// if this is still false after the last config has been merged the
// finalization pass will take care of removing this key entirely
- return \false;
+ return false;
}
- if (\false === $leftSide || !$this->performDeepMerging) {
+ if (false === $leftSide || !$this->performDeepMerging) {
return $rightSide;
}
foreach ($rightSide as $k => $v) {
// no conflict
- if (!\array_key_exists($k, $leftSide)) {
+ if (!array_key_exists($k, $leftSide)) {
if (!$this->allowNewKeys) {
- $ex = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException(\sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath()));
+ $ex = new InvalidConfigurationException(sprintf('You are not allowed to define new elements for path "%s". Please define all elements for this path in one config file. If you are trying to overwrite an element, make sure you redefine it with the same name.', $this->getPath()));
$ex->setPath($this->getPath());
throw $ex;
}
@@ -321,7 +337,7 @@ protected function mergeValues($leftSide, $rightSide)
continue;
}
if (!isset($this->children[$k])) {
- throw new \RuntimeException('merge() expects a normalized config array.');
+ throw new RuntimeException('merge() expects a normalized config array.');
}
$leftSide[$k] = $this->children[$k]->merge($leftSide[$k], $v);
}
diff --git a/vendor/symfony/config/Definition/BaseNode.php b/vendor/symfony/config/Definition/BaseNode.php
index fd662692e..00d63bf78 100644
--- a/vendor/symfony/config/Definition/BaseNode.php
+++ b/vendor/symfony/config/Definition/BaseNode.php
@@ -14,19 +14,25 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+use Closure;
+use InvalidArgumentException;
+use function sprintf;
+use function strpos;
+use function strtr;
+
/**
* The base node class.
*
* @author Johannes M. Schmitt
*/
-abstract class BaseNode implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface
+abstract class BaseNode implements NodeInterface
{
protected $name;
protected $parent;
protected $normalizationClosures = [];
protected $finalValidationClosures = [];
- protected $allowOverwrite = \true;
- protected $required = \false;
+ protected $allowOverwrite = true;
+ protected $required = false;
protected $deprecationMessage = null;
protected $equivalentValues = [];
protected $attributes = [];
@@ -34,12 +40,12 @@ abstract class BaseNode implements \_PhpScoper5ea00cc67502b\Symfony\Component\Co
* @param string|null $name The name of the node
* @param NodeInterface|null $parent The parent of this node
*
- * @throws \InvalidArgumentException if the name contains a period
+ * @throws InvalidArgumentException if the name contains a period
*/
- public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface $parent = null)
+ public function __construct($name, NodeInterface $parent = null)
{
- if (\false !== \strpos($name = (string) $name, '.')) {
- throw new \InvalidArgumentException('The name must not contain ".".');
+ if (false !== strpos($name = (string) $name, '.')) {
+ throw new InvalidArgumentException('The name must not contain ".".');
}
$this->name = $name;
$this->parent = $parent;
@@ -166,7 +172,7 @@ public function setAllowOverwrite($allow)
/**
* Sets the closures used for normalization.
*
- * @param \Closure[] $closures An array of Closures used for normalization
+ * @param Closure[] $closures An array of Closures used for normalization
*/
public function setNormalizationClosures(array $closures)
{
@@ -175,7 +181,7 @@ public function setNormalizationClosures(array $closures)
/**
* Sets the closures used for final validation.
*
- * @param \Closure[] $closures An array of Closures used for final validation
+ * @param Closure[] $closures An array of Closures used for final validation
*/
public function setFinalValidationClosures(array $closures)
{
@@ -207,7 +213,7 @@ public function isDeprecated()
*/
public function getDeprecationMessage($node, $path)
{
- return \strtr($this->deprecationMessage, ['%node%' => $node, '%path%' => $path]);
+ return strtr($this->deprecationMessage, ['%node%' => $node, '%path%' => $path]);
}
/**
* {@inheritdoc}
@@ -233,7 +239,7 @@ public function getPath()
public final function merge($leftSide, $rightSide)
{
if (!$this->allowOverwrite) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException(\sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath()));
+ throw new ForbiddenOverwriteException(sprintf('Configuration path "%s" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section.', $this->getPath()));
}
$this->validateType($leftSide);
$this->validateType($rightSide);
@@ -292,10 +298,10 @@ public final function finalize($value)
foreach ($this->finalValidationClosures as $closure) {
try {
$value = $closure($value);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\Exception $e) {
+ } catch (Exception $e) {
throw $e;
} catch (\Exception $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidConfigurationException(\sprintf('Invalid configuration for path "%s": %s.', $this->getPath(), $e->getMessage()), $e->getCode(), $e);
+ throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": %s.', $this->getPath(), $e->getMessage()), $e->getCode(), $e);
}
}
return $value;
diff --git a/vendor/symfony/config/Definition/BooleanNode.php b/vendor/symfony/config/Definition/BooleanNode.php
index 151a338ed..9b911fd77 100644
--- a/vendor/symfony/config/Definition/BooleanNode.php
+++ b/vendor/symfony/config/Definition/BooleanNode.php
@@ -11,20 +11,24 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+use function gettype;
+use function is_bool;
+use function sprintf;
+
/**
* This node represents a Boolean value in the config tree.
*
* @author Johannes M. Schmitt
*/
-class BooleanNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode
+class BooleanNode extends ScalarNode
{
/**
* {@inheritdoc}
*/
protected function validateType($value)
{
- if (!\is_bool($value)) {
- $ex = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidTypeException(\sprintf('Invalid type for path "%s". Expected boolean, but got %s.', $this->getPath(), \gettype($value)));
+ if (!is_bool($value)) {
+ $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected boolean, but got %s.', $this->getPath(), gettype($value)));
if ($hint = $this->getInfo()) {
$ex->addHint($hint);
}
@@ -38,6 +42,6 @@ protected function validateType($value)
protected function isValueEmpty($value)
{
// a boolean value cannot be empty
- return \false;
+ return false;
}
}
diff --git a/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php b/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
index 145d615b2..4793a8e2b 100644
--- a/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
@@ -13,30 +13,37 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode;
+use function is_array;
+use function is_int;
+use function is_string;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class provides a fluent interface for defining an array node.
*
* @author Johannes M. Schmitt
*/
-class ArrayNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ParentNodeDefinitionInterface
+class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface
{
- protected $performDeepMerging = \true;
- protected $ignoreExtraKeys = \false;
- protected $removeExtraKeys = \true;
+ protected $performDeepMerging = true;
+ protected $ignoreExtraKeys = false;
+ protected $removeExtraKeys = true;
protected $children = [];
protected $prototype;
- protected $atLeastOne = \false;
- protected $allowNewKeys = \true;
+ protected $atLeastOne = false;
+ protected $allowNewKeys = true;
protected $key;
protected $removeKeyItem;
- protected $addDefaults = \false;
- protected $addDefaultChildren = \false;
+ protected $addDefaults = false;
+ protected $addDefaultChildren = false;
protected $nodeBuilder;
- protected $normalizeKeys = \true;
+ protected $normalizeKeys = true;
/**
* {@inheritdoc}
*/
- public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface $parent = null)
+ public function __construct($name, NodeParentInterface $parent = null)
{
parent::__construct($name, $parent);
$this->nullEquivalent = [];
@@ -45,7 +52,7 @@ public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Co
/**
* {@inheritdoc}
*/
- public function setBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder $builder)
+ public function setBuilder(NodeBuilder $builder)
{
$this->nodeBuilder = $builder;
}
@@ -127,7 +134,7 @@ public function enumPrototype()
*/
public function addDefaultsIfNotSet()
{
- $this->addDefaults = \true;
+ $this->addDefaults = true;
return $this;
}
/**
@@ -153,7 +160,7 @@ public function addDefaultChildrenIfNoneSet($children = null)
*/
public function requiresAtLeastOneElement()
{
- $this->atLeastOne = \true;
+ $this->atLeastOne = true;
return $this;
}
/**
@@ -165,7 +172,7 @@ public function requiresAtLeastOneElement()
*/
public function disallowNewKeysInSubsequentConfigs()
{
- $this->allowNewKeys = \false;
+ $this->allowNewKeys = false;
return $this;
}
/**
@@ -209,7 +216,7 @@ public function fixXmlConfig($singular, $plural = null)
*
* @return $this
*/
- public function useAttributeAsKey($name, $removeKeyItem = \true)
+ public function useAttributeAsKey($name, $removeKeyItem = true)
{
$this->key = $name;
$this->removeKeyItem = $removeKeyItem;
@@ -222,7 +229,7 @@ public function useAttributeAsKey($name, $removeKeyItem = \true)
*
* @return $this
*/
- public function canBeUnset($allow = \true)
+ public function canBeUnset($allow = true)
{
$this->merge()->allowUnset($allow);
return $this;
@@ -244,8 +251,8 @@ public function canBeUnset($allow = \true)
*/
public function canBeEnabled()
{
- $this->addDefaultsIfNotSet()->treatFalseLike(['enabled' => \false])->treatTrueLike(['enabled' => \true])->treatNullLike(['enabled' => \true])->beforeNormalization()->ifArray()->then(function ($v) {
- $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : \true;
+ $this->addDefaultsIfNotSet()->treatFalseLike(['enabled' => false])->treatTrueLike(['enabled' => true])->treatNullLike(['enabled' => true])->beforeNormalization()->ifArray()->then(function ($v) {
+ $v['enabled'] = isset($v['enabled']) ? $v['enabled'] : true;
return $v;
})->end()->children()->booleanNode('enabled')->defaultFalse();
return $this;
@@ -259,7 +266,7 @@ public function canBeEnabled()
*/
public function canBeDisabled()
{
- $this->addDefaultsIfNotSet()->treatFalseLike(['enabled' => \false])->treatTrueLike(['enabled' => \true])->treatNullLike(['enabled' => \true])->children()->booleanNode('enabled')->defaultTrue();
+ $this->addDefaultsIfNotSet()->treatFalseLike(['enabled' => false])->treatTrueLike(['enabled' => true])->treatNullLike(['enabled' => true])->children()->booleanNode('enabled')->defaultTrue();
return $this;
}
/**
@@ -269,7 +276,7 @@ public function canBeDisabled()
*/
public function performNoDeepMerging()
{
- $this->performDeepMerging = \false;
+ $this->performDeepMerging = false;
return $this;
}
/**
@@ -285,9 +292,9 @@ public function performNoDeepMerging()
*
* @return $this
*/
- public function ignoreExtraKeys($remove = \true)
+ public function ignoreExtraKeys($remove = true)
{
- $this->ignoreExtraKeys = \true;
+ $this->ignoreExtraKeys = true;
$this->removeExtraKeys = $remove;
return $this;
}
@@ -306,7 +313,7 @@ public function normalizeKeys($bool)
/**
* {@inheritdoc}
*/
- public function append(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node)
+ public function append(NodeDefinition $node)
{
$this->children[$node->name] = $node->setParent($this);
return $this;
@@ -319,7 +326,7 @@ public function append(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definit
protected function getNodeBuilder()
{
if (null === $this->nodeBuilder) {
- $this->nodeBuilder = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder();
+ $this->nodeBuilder = new NodeBuilder();
}
return $this->nodeBuilder->setParent($this);
}
@@ -329,7 +336,7 @@ protected function getNodeBuilder()
protected function createNode()
{
if (null === $this->prototype) {
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode($this->name, $this->parent);
+ $node = new ArrayNode($this->name, $this->parent);
$this->validateConcreteNode($node);
$node->setAddIfNotSet($this->addDefaults);
foreach ($this->children as $child) {
@@ -337,21 +344,21 @@ protected function createNode()
$node->addChild($child->getNode());
}
} else {
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode($this->name, $this->parent);
+ $node = new PrototypedArrayNode($this->name, $this->parent);
$this->validatePrototypeNode($node);
if (null !== $this->key) {
$node->setKeyAttribute($this->key, $this->removeKeyItem);
}
- if (\false === $this->allowEmptyValue) {
- @\trigger_error(\sprintf('Using %s::cannotBeEmpty() at path "%s" has no effect, consider requiresAtLeastOneElement() instead. In 4.0 both methods will behave the same.', __CLASS__, $node->getPath()), \E_USER_DEPRECATED);
+ if (false === $this->allowEmptyValue) {
+ @trigger_error(sprintf('Using %s::cannotBeEmpty() at path "%s" has no effect, consider requiresAtLeastOneElement() instead. In 4.0 both methods will behave the same.', __CLASS__, $node->getPath()), E_USER_DEPRECATED);
}
- if (\true === $this->atLeastOne) {
+ if (true === $this->atLeastOne) {
$node->setMinNumberOfElements(1);
}
if ($this->default) {
$node->setDefaultValue($this->defaultValue);
}
- if (\false !== $this->addDefaultChildren) {
+ if (false !== $this->addDefaultChildren) {
$node->setAddChildrenIfNoneSet($this->addDefaultChildren);
if ($this->prototype instanceof static && null === $this->prototype->prototype) {
$this->prototype->addDefaultsIfNotSet();
@@ -362,8 +369,8 @@ protected function createNode()
}
$node->setAllowNewKeys($this->allowNewKeys);
$node->addEquivalentValue(null, $this->nullEquivalent);
- $node->addEquivalentValue(\true, $this->trueEquivalent);
- $node->addEquivalentValue(\false, $this->falseEquivalent);
+ $node->addEquivalentValue(true, $this->trueEquivalent);
+ $node->addEquivalentValue(false, $this->falseEquivalent);
$node->setPerformDeepMerging($this->performDeepMerging);
$node->setRequired($this->required);
$node->setDeprecated($this->deprecationMessage);
@@ -387,23 +394,23 @@ protected function createNode()
*
* @throws InvalidDefinitionException
*/
- protected function validateConcreteNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode $node)
+ protected function validateConcreteNode(ArrayNode $node)
{
$path = $node->getPath();
if (null !== $this->key) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s".', $path));
+ throw new InvalidDefinitionException(sprintf('->useAttributeAsKey() is not applicable to concrete nodes at path "%s".', $path));
}
- if (\false === $this->allowEmptyValue) {
- @\trigger_error(\sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s". In 4.0 it will throw an exception.', $path), \E_USER_DEPRECATED);
+ if (false === $this->allowEmptyValue) {
+ @trigger_error(sprintf('->cannotBeEmpty() is not applicable to concrete nodes at path "%s". In 4.0 it will throw an exception.', $path), E_USER_DEPRECATED);
}
- if (\true === $this->atLeastOne) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path));
+ if (true === $this->atLeastOne) {
+ throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path));
}
if ($this->default) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->defaultValue() is not applicable to concrete nodes at path "%s".', $path));
+ throw new InvalidDefinitionException(sprintf('->defaultValue() is not applicable to concrete nodes at path "%s".', $path));
}
- if (\false !== $this->addDefaultChildren) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s".', $path));
+ if (false !== $this->addDefaultChildren) {
+ throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() is not applicable to concrete nodes at path "%s".', $path));
}
}
/**
@@ -411,21 +418,21 @@ protected function validateConcreteNode(\_PhpScoper5ea00cc67502b\Symfony\Compone
*
* @throws InvalidDefinitionException
*/
- protected function validatePrototypeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode $node)
+ protected function validatePrototypeNode(PrototypedArrayNode $node)
{
$path = $node->getPath();
if ($this->addDefaults) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path));
+ throw new InvalidDefinitionException(sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path));
}
- if (\false !== $this->addDefaultChildren) {
+ if (false !== $this->addDefaultChildren) {
if ($this->default) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('A default value and default children might not be used together at path "%s".', $path));
+ throw new InvalidDefinitionException(sprintf('A default value and default children might not be used together at path "%s".', $path));
}
- if (null !== $this->key && (null === $this->addDefaultChildren || \is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s".', $path));
+ if (null !== $this->key && (null === $this->addDefaultChildren || is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) {
+ throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s".', $path));
}
- if (null === $this->key && (\is_string($this->addDefaultChildren) || \is_array($this->addDefaultChildren))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException(\sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path));
+ if (null === $this->key && (is_string($this->addDefaultChildren) || is_array($this->addDefaultChildren))) {
+ throw new InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path));
}
}
}
diff --git a/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php b/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
index 0ff95f86f..410087918 100644
--- a/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
@@ -17,15 +17,15 @@
*
* @author Johannes M. Schmitt
*/
-class BooleanNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition
+class BooleanNodeDefinition extends ScalarNodeDefinition
{
/**
* {@inheritdoc}
*/
- public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface $parent = null)
+ public function __construct($name, NodeParentInterface $parent = null)
{
parent::__construct($name, $parent);
- $this->nullEquivalent = \true;
+ $this->nullEquivalent = true;
}
/**
* Instantiate a Node.
@@ -34,7 +34,7 @@ public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Co
*/
protected function instantiateNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\BooleanNode($this->name, $this->parent);
+ return new BooleanNode($this->name, $this->parent);
}
/**
* {@inheritdoc}
@@ -43,6 +43,6 @@ protected function instantiateNode()
*/
public function cannotBeEmpty()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.');
+ throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.');
}
}
diff --git a/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php b/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
index eda74aeef..c988a52fe 100644
--- a/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
@@ -11,12 +11,16 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode;
+use InvalidArgumentException;
+use RuntimeException;
+use function array_unique;
+
/**
* Enum Node Definition.
*
* @author Johannes M. Schmitt
*/
-class EnumNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition
+class EnumNodeDefinition extends ScalarNodeDefinition
{
private $values;
/**
@@ -24,9 +28,9 @@ class EnumNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Conf
*/
public function values(array $values)
{
- $values = \array_unique($values);
+ $values = array_unique($values);
if (empty($values)) {
- throw new \InvalidArgumentException('->values() must be called with at least one value.');
+ throw new InvalidArgumentException('->values() must be called with at least one value.');
}
$this->values = $values;
return $this;
@@ -36,13 +40,13 @@ public function values(array $values)
*
* @return EnumNode The node
*
- * @throws \RuntimeException
+ * @throws RuntimeException
*/
protected function instantiateNode()
{
if (null === $this->values) {
- throw new \RuntimeException('You must call ->values() on enum nodes.');
+ throw new RuntimeException('You must call ->values() on enum nodes.');
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode($this->name, $this->parent, $this->values);
+ return new EnumNode($this->name, $this->parent, $this->values);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/vendor/symfony/config/Definition/Builder/ExprBuilder.php
index 5805e193a..cdd633460 100644
--- a/vendor/symfony/config/Definition/Builder/ExprBuilder.php
+++ b/vendor/symfony/config/Definition/Builder/ExprBuilder.php
@@ -11,6 +11,15 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\UnsetKeyException;
+use Closure;
+use InvalidArgumentException;
+use RuntimeException;
+use function in_array;
+use function is_array;
+use function is_string;
+use function json_encode;
+use function sprintf;
+
/**
* This class builds an if expression.
*
@@ -22,7 +31,7 @@ class ExprBuilder
protected $node;
public $ifPart;
public $thenPart;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node)
+ public function __construct(NodeDefinition $node)
{
$this->node = $node;
}
@@ -31,10 +40,10 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\De
*
* @return $this
*/
- public function always(\Closure $then = null)
+ public function always(Closure $then = null)
{
$this->ifPart = function ($v) {
- return \true;
+ return true;
};
if (null !== $then) {
$this->thenPart = $then;
@@ -48,11 +57,11 @@ public function always(\Closure $then = null)
*
* @return $this
*/
- public function ifTrue(\Closure $closure = null)
+ public function ifTrue(Closure $closure = null)
{
if (null === $closure) {
$closure = function ($v) {
- return \true === $v;
+ return true === $v;
};
}
$this->ifPart = $closure;
@@ -66,7 +75,7 @@ public function ifTrue(\Closure $closure = null)
public function ifString()
{
$this->ifPart = function ($v) {
- return \is_string($v);
+ return is_string($v);
};
return $this;
}
@@ -102,7 +111,7 @@ public function ifEmpty()
public function ifArray()
{
$this->ifPart = function ($v) {
- return \is_array($v);
+ return is_array($v);
};
return $this;
}
@@ -114,7 +123,7 @@ public function ifArray()
public function ifInArray(array $array)
{
$this->ifPart = function ($v) use($array) {
- return \in_array($v, $array, \true);
+ return in_array($v, $array, true);
};
return $this;
}
@@ -126,7 +135,7 @@ public function ifInArray(array $array)
public function ifNotInArray(array $array)
{
$this->ifPart = function ($v) use($array) {
- return !\in_array($v, $array, \true);
+ return !in_array($v, $array, true);
};
return $this;
}
@@ -138,7 +147,7 @@ public function ifNotInArray(array $array)
public function castToArray()
{
$this->ifPart = function ($v) {
- return !\is_array($v);
+ return !is_array($v);
};
$this->thenPart = function ($v) {
return [$v];
@@ -150,7 +159,7 @@ public function castToArray()
*
* @return $this
*/
- public function then(\Closure $closure)
+ public function then(Closure $closure)
{
$this->thenPart = $closure;
return $this;
@@ -176,12 +185,12 @@ public function thenEmptyArray()
*
* @return $this
*
- * @throws \InvalidArgumentException
+ * @throws InvalidArgumentException
*/
public function thenInvalid($message)
{
$this->thenPart = function ($v) use($message) {
- throw new \InvalidArgumentException(\sprintf($message, \json_encode($v)));
+ throw new InvalidArgumentException(sprintf($message, json_encode($v)));
};
return $this;
}
@@ -195,7 +204,7 @@ public function thenInvalid($message)
public function thenUnset()
{
$this->thenPart = function ($v) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\UnsetKeyException('Unsetting key.');
+ throw new UnsetKeyException('Unsetting key.');
};
return $this;
}
@@ -204,15 +213,15 @@ public function thenUnset()
*
* @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
*
- * @throws \RuntimeException
+ * @throws RuntimeException
*/
public function end()
{
if (null === $this->ifPart) {
- throw new \RuntimeException('You must specify an if part.');
+ throw new RuntimeException('You must specify an if part.');
}
if (null === $this->thenPart) {
- throw new \RuntimeException('You must specify a then part.');
+ throw new RuntimeException('You must specify a then part.');
}
return $this->node;
}
diff --git a/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php b/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
index cddf14843..220cbef0c 100644
--- a/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
@@ -16,7 +16,7 @@
*
* @author Jeanmonod David
*/
-class FloatNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NumericNodeDefinition
+class FloatNodeDefinition extends NumericNodeDefinition
{
/**
* Instantiates a Node.
@@ -25,6 +25,6 @@ class FloatNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Con
*/
protected function instantiateNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\FloatNode($this->name, $this->parent, $this->min, $this->max);
+ return new FloatNode($this->name, $this->parent, $this->min, $this->max);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php b/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
index 06591249d..5dbe5f7de 100644
--- a/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
@@ -16,7 +16,7 @@
*
* @author Jeanmonod David
*/
-class IntegerNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NumericNodeDefinition
+class IntegerNodeDefinition extends NumericNodeDefinition
{
/**
* Instantiates a Node.
@@ -25,6 +25,6 @@ class IntegerNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\C
*/
protected function instantiateNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\IntegerNode($this->name, $this->parent, $this->min, $this->max);
+ return new IntegerNode($this->name, $this->parent, $this->min, $this->max);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/MergeBuilder.php b/vendor/symfony/config/Definition/Builder/MergeBuilder.php
index 6c2623163..6b958cdb9 100644
--- a/vendor/symfony/config/Definition/Builder/MergeBuilder.php
+++ b/vendor/symfony/config/Definition/Builder/MergeBuilder.php
@@ -18,9 +18,9 @@
class MergeBuilder
{
protected $node;
- public $allowFalse = \false;
- public $allowOverwrite = \true;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node)
+ public $allowFalse = false;
+ public $allowOverwrite = true;
+ public function __construct(NodeDefinition $node)
{
$this->node = $node;
}
@@ -31,7 +31,7 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\De
*
* @return $this
*/
- public function allowUnset($allow = \true)
+ public function allowUnset($allow = true)
{
$this->allowFalse = $allow;
return $this;
@@ -43,7 +43,7 @@ public function allowUnset($allow = \true)
*
* @return $this
*/
- public function denyOverwrite($deny = \true)
+ public function denyOverwrite($deny = true)
{
$this->allowOverwrite = !$deny;
return $this;
diff --git a/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/vendor/symfony/config/Definition/Builder/NodeBuilder.php
index c5cfa11c1..449688fb9 100644
--- a/vendor/symfony/config/Definition/Builder/NodeBuilder.php
+++ b/vendor/symfony/config/Definition/Builder/NodeBuilder.php
@@ -10,25 +10,30 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
+use RuntimeException;
+use function class_exists;
+use function sprintf;
+use function strtolower;
+
/**
* This class provides a fluent interface for building a node.
*
* @author Johannes M. Schmitt
*/
-class NodeBuilder implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface
+class NodeBuilder implements NodeParentInterface
{
protected $parent;
protected $nodeMapping;
public function __construct()
{
- $this->nodeMapping = ['variable' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\VariableNodeDefinition::class, 'scalar' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition::class, 'boolean' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition::class, 'integer' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition::class, 'float' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\FloatNodeDefinition::class, 'array' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::class, 'enum' => \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\EnumNodeDefinition::class];
+ $this->nodeMapping = ['variable' => VariableNodeDefinition::class, 'scalar' => ScalarNodeDefinition::class, 'boolean' => BooleanNodeDefinition::class, 'integer' => IntegerNodeDefinition::class, 'float' => FloatNodeDefinition::class, 'array' => ArrayNodeDefinition::class, 'enum' => EnumNodeDefinition::class];
}
/**
* Set the parent node.
*
* @return $this
*/
- public function setParent(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ParentNodeDefinitionInterface $parent = null)
+ public function setParent(ParentNodeDefinitionInterface $parent = null)
{
$this->parent = $parent;
return $this;
@@ -127,8 +132,8 @@ public function end()
*
* @return NodeDefinition The child node
*
- * @throws \RuntimeException When the node type is not registered
- * @throws \RuntimeException When the node class is not found
+ * @throws RuntimeException When the node type is not registered
+ * @throws RuntimeException When the node class is not found
*/
public function node($name, $type)
{
@@ -152,9 +157,9 @@ public function node($name, $type)
*
* @return $this
*/
- public function append(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node)
+ public function append(NodeDefinition $node)
{
- if ($node instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ParentNodeDefinitionInterface) {
+ if ($node instanceof ParentNodeDefinitionInterface) {
$builder = clone $this;
$builder->setParent(null);
$node->setBuilder($builder);
@@ -176,7 +181,7 @@ public function append(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definit
*/
public function setNodeClass($type, $class)
{
- $this->nodeMapping[\strtolower($type)] = $class;
+ $this->nodeMapping[strtolower($type)] = $class;
return $this;
}
/**
@@ -186,18 +191,18 @@ public function setNodeClass($type, $class)
*
* @return string The node definition class name
*
- * @throws \RuntimeException When the node type is not registered
- * @throws \RuntimeException When the node class is not found
+ * @throws RuntimeException When the node type is not registered
+ * @throws RuntimeException When the node class is not found
*/
protected function getNodeClass($type)
{
- $type = \strtolower($type);
+ $type = strtolower($type);
if (!isset($this->nodeMapping[$type])) {
- throw new \RuntimeException(\sprintf('The node type "%s" is not registered.', $type));
+ throw new RuntimeException(sprintf('The node type "%s" is not registered.', $type));
}
$class = $this->nodeMapping[$type];
- if (!\class_exists($class)) {
- throw new \RuntimeException(\sprintf('The node class "%s" does not exist.', $class));
+ if (!class_exists($class)) {
+ throw new RuntimeException(sprintf('The node class "%s" does not exist.', $class));
}
return $class;
}
diff --git a/vendor/symfony/config/Definition/Builder/NodeDefinition.php b/vendor/symfony/config/Definition/Builder/NodeDefinition.php
index 44ee3faa6..d11cb6919 100644
--- a/vendor/symfony/config/Definition/Builder/NodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/NodeDefinition.php
@@ -17,27 +17,27 @@
*
* @author Johannes M. Schmitt
*/
-abstract class NodeDefinition implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface
+abstract class NodeDefinition implements NodeParentInterface
{
protected $name;
protected $normalization;
protected $validation;
protected $defaultValue;
- protected $default = \false;
- protected $required = \false;
+ protected $default = false;
+ protected $required = false;
protected $deprecationMessage = null;
protected $merge;
- protected $allowEmptyValue = \true;
+ protected $allowEmptyValue = true;
protected $nullEquivalent;
- protected $trueEquivalent = \true;
- protected $falseEquivalent = \false;
+ protected $trueEquivalent = true;
+ protected $falseEquivalent = false;
protected $parent;
protected $attributes = [];
/**
* @param string|null $name The name of the node
* @param NodeParentInterface|null $parent The parent
*/
- public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface $parent = null)
+ public function __construct($name, NodeParentInterface $parent = null)
{
$this->parent = $parent;
$this->name = $name;
@@ -47,7 +47,7 @@ public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\Co
*
* @return $this
*/
- public function setParent(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface $parent)
+ public function setParent(NodeParentInterface $parent)
{
$this->parent = $parent;
return $this;
@@ -103,16 +103,16 @@ public function end()
*
* @return NodeInterface
*/
- public function getNode($forceRootNode = \false)
+ public function getNode($forceRootNode = false)
{
if ($forceRootNode) {
$this->parent = null;
}
if (null !== $this->normalization) {
- $this->normalization->before = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ExprBuilder::buildExpressions($this->normalization->before);
+ $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before);
}
if (null !== $this->validation) {
- $this->validation->rules = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ExprBuilder::buildExpressions($this->validation->rules);
+ $this->validation->rules = ExprBuilder::buildExpressions($this->validation->rules);
}
$node = $this->createNode();
$node->setAttributes($this->attributes);
@@ -127,7 +127,7 @@ public function getNode($forceRootNode = \false)
*/
public function defaultValue($value)
{
- $this->default = \true;
+ $this->default = true;
$this->defaultValue = $value;
return $this;
}
@@ -138,7 +138,7 @@ public function defaultValue($value)
*/
public function isRequired()
{
- $this->required = \true;
+ $this->required = true;
return $this;
}
/**
@@ -208,7 +208,7 @@ public function defaultNull()
*/
public function defaultTrue()
{
- return $this->defaultValue(\true);
+ return $this->defaultValue(true);
}
/**
* Sets false as the default value.
@@ -217,7 +217,7 @@ public function defaultTrue()
*/
public function defaultFalse()
{
- return $this->defaultValue(\false);
+ return $this->defaultValue(false);
}
/**
* Sets an expression to run before the normalization.
@@ -235,7 +235,7 @@ public function beforeNormalization()
*/
public function cannotBeEmpty()
{
- $this->allowEmptyValue = \false;
+ $this->allowEmptyValue = false;
return $this;
}
/**
@@ -258,7 +258,7 @@ public function validate()
*
* @return $this
*/
- public function cannotBeOverwritten($deny = \true)
+ public function cannotBeOverwritten($deny = true)
{
$this->merge()->denyOverwrite($deny);
return $this;
@@ -271,7 +271,7 @@ public function cannotBeOverwritten($deny = \true)
protected function validation()
{
if (null === $this->validation) {
- $this->validation = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ValidationBuilder($this);
+ $this->validation = new ValidationBuilder($this);
}
return $this->validation;
}
@@ -283,7 +283,7 @@ protected function validation()
protected function merge()
{
if (null === $this->merge) {
- $this->merge = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\MergeBuilder($this);
+ $this->merge = new MergeBuilder($this);
}
return $this->merge;
}
@@ -295,7 +295,7 @@ protected function merge()
protected function normalization()
{
if (null === $this->normalization) {
- $this->normalization = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NormalizationBuilder($this);
+ $this->normalization = new NormalizationBuilder($this);
}
return $this->normalization;
}
diff --git a/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php b/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
index ee7ca162d..36f1c852c 100644
--- a/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
+++ b/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
@@ -10,6 +10,8 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
+use Closure;
+
/**
* This class builds normalization conditions.
*
@@ -20,7 +22,7 @@ class NormalizationBuilder
protected $node;
public $before = [];
public $remappings = [];
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node)
+ public function __construct(NodeDefinition $node)
{
$this->node = $node;
}
@@ -42,12 +44,12 @@ public function remap($key, $plural = null)
*
* @return ExprBuilder|$this
*/
- public function before(\Closure $closure = null)
+ public function before(Closure $closure = null)
{
if (null !== $closure) {
$this->before[] = $closure;
return $this;
}
- return $this->before[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ExprBuilder($this->node);
+ return $this->before[] = new ExprBuilder($this->node);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php b/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
index 430aa522e..81439cef2 100644
--- a/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
@@ -11,12 +11,15 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
+use InvalidArgumentException;
+use function sprintf;
+
/**
* Abstract class that contains common code of integer and float node definitions.
*
* @author David Jeanmonod
*/
-abstract class NumericNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition
+abstract class NumericNodeDefinition extends ScalarNodeDefinition
{
protected $min;
protected $max;
@@ -27,12 +30,12 @@ abstract class NumericNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Co
*
* @return $this
*
- * @throws \InvalidArgumentException when the constraint is inconsistent
+ * @throws InvalidArgumentException when the constraint is inconsistent
*/
public function max($max)
{
if (isset($this->min) && $this->min > $max) {
- throw new \InvalidArgumentException(\sprintf('You cannot define a max(%s) as you already have a min(%s).', $max, $this->min));
+ throw new InvalidArgumentException(sprintf('You cannot define a max(%s) as you already have a min(%s).', $max, $this->min));
}
$this->max = $max;
return $this;
@@ -44,12 +47,12 @@ public function max($max)
*
* @return $this
*
- * @throws \InvalidArgumentException when the constraint is inconsistent
+ * @throws InvalidArgumentException when the constraint is inconsistent
*/
public function min($min)
{
if (isset($this->max) && $this->max < $min) {
- throw new \InvalidArgumentException(\sprintf('You cannot define a min(%s) as you already have a max(%s).', $min, $this->max));
+ throw new InvalidArgumentException(sprintf('You cannot define a min(%s) as you already have a max(%s).', $min, $this->max));
}
$this->min = $min;
return $this;
@@ -61,6 +64,6 @@ public function min($min)
*/
public function cannotBeEmpty()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Exception\InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.');
+ throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.');
}
}
diff --git a/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php b/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
index c508114bb..d04c17d1f 100644
--- a/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
+++ b/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
@@ -38,9 +38,9 @@ public function children();
*
* @return $this
*/
- public function append(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node);
+ public function append(NodeDefinition $node);
/**
* Sets a custom children builder.
*/
- public function setBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder $builder);
+ public function setBuilder(NodeBuilder $builder);
}
diff --git a/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php b/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
index 5384358c7..2c6b223be 100644
--- a/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
@@ -16,7 +16,7 @@
*
* @author Johannes M. Schmitt
*/
-class ScalarNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\VariableNodeDefinition
+class ScalarNodeDefinition extends VariableNodeDefinition
{
/**
* Instantiate a Node.
@@ -25,6 +25,6 @@ class ScalarNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Co
*/
protected function instantiateNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode($this->name, $this->parent);
+ return new ScalarNode($this->name, $this->parent);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/TreeBuilder.php b/vendor/symfony/config/Definition/Builder/TreeBuilder.php
index b0c17d844..ce1b8a026 100644
--- a/vendor/symfony/config/Definition/Builder/TreeBuilder.php
+++ b/vendor/symfony/config/Definition/Builder/TreeBuilder.php
@@ -11,12 +11,14 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface;
+use RuntimeException;
+
/**
* This is the entry class for building a config tree.
*
* @author Johannes M. Schmitt
*/
-class TreeBuilder implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeParentInterface
+class TreeBuilder implements NodeParentInterface
{
protected $tree;
protected $root;
@@ -33,11 +35,11 @@ class TreeBuilder implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\D
*
* @return ArrayNodeDefinition|NodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')
*
- * @throws \RuntimeException When the node type is not supported
+ * @throws RuntimeException When the node type is not supported
*/
- public function root($name, $type = 'array', \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder $builder = null)
+ public function root($name, $type = 'array', NodeBuilder $builder = null)
{
- $builder = $builder ?: new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder();
+ $builder = $builder ?: new NodeBuilder();
return $this->root = $builder->node($name, $type)->setParent($this);
}
/**
@@ -45,16 +47,16 @@ public function root($name, $type = 'array', \_PhpScoper5ea00cc67502b\Symfony\Co
*
* @return NodeInterface
*
- * @throws \RuntimeException
+ * @throws RuntimeException
*/
public function buildTree()
{
if (null === $this->root) {
- throw new \RuntimeException('The configuration tree has no root node.');
+ throw new RuntimeException('The configuration tree has no root node.');
}
if (null !== $this->tree) {
return $this->tree;
}
- return $this->tree = $this->root->getNode(\true);
+ return $this->tree = $this->root->getNode(true);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/ValidationBuilder.php b/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
index c9b69948c..746408e94 100644
--- a/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
+++ b/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
@@ -10,6 +10,8 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder;
+use Closure;
+
/**
* This class builds validation conditions.
*
@@ -19,7 +21,7 @@ class ValidationBuilder
{
protected $node;
public $rules = [];
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition $node)
+ public function __construct(NodeDefinition $node)
{
$this->node = $node;
}
@@ -28,12 +30,12 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\De
*
* @return ExprBuilder|$this
*/
- public function rule(\Closure $closure = null)
+ public function rule(Closure $closure = null)
{
if (null !== $closure) {
$this->rules[] = $closure;
return $this;
}
- return $this->rules[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\ExprBuilder($this->node);
+ return $this->rules[] = new ExprBuilder($this->node);
}
}
diff --git a/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php b/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
index c00028d90..646d14676 100644
--- a/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
+++ b/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
@@ -16,7 +16,7 @@
*
* @author Johannes M. Schmitt
*/
-class VariableNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition
+class VariableNodeDefinition extends NodeDefinition
{
/**
* Instantiate a Node.
@@ -25,7 +25,7 @@ class VariableNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\
*/
protected function instantiateNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\VariableNode($this->name, $this->parent);
+ return new VariableNode($this->name, $this->parent);
}
/**
* {@inheritdoc}
@@ -39,13 +39,13 @@ protected function createNode()
if (null !== $this->merge) {
$node->setAllowOverwrite($this->merge->allowOverwrite);
}
- if (\true === $this->default) {
+ if (true === $this->default) {
$node->setDefaultValue($this->defaultValue);
}
$node->setAllowEmptyValue($this->allowEmptyValue);
$node->addEquivalentValue(null, $this->nullEquivalent);
- $node->addEquivalentValue(\true, $this->trueEquivalent);
- $node->addEquivalentValue(\false, $this->falseEquivalent);
+ $node->addEquivalentValue(true, $this->trueEquivalent);
+ $node->addEquivalentValue(false, $this->falseEquivalent);
$node->setRequired($this->required);
$node->setDeprecated($this->deprecationMessage);
if (null !== $this->validation) {
diff --git a/vendor/symfony/config/Definition/Builder/index.php b/vendor/symfony/config/Definition/Builder/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Definition/Builder/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Definition/ConfigurationInterface.php b/vendor/symfony/config/Definition/ConfigurationInterface.php
index 7eb7956fe..f34fda10d 100644
--- a/vendor/symfony/config/Definition/ConfigurationInterface.php
+++ b/vendor/symfony/config/Definition/ConfigurationInterface.php
@@ -10,6 +10,8 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition;
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+
/**
* Configuration interface.
*
@@ -20,7 +22,7 @@ interface ConfigurationInterface
/**
* Generates the configuration tree builder.
*
- * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
+ * @return TreeBuilder The tree builder
*/
public function getConfigTreeBuilder();
}
diff --git a/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php b/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
index d6f4f90e8..86da8a531 100644
--- a/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
+++ b/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
@@ -15,6 +15,24 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode;
+use function array_filter;
+use function array_keys;
+use function array_map;
+use function array_unshift;
+use function count;
+use function current;
+use function explode;
+use function get_class;
+use function implode;
+use function is_array;
+use function is_numeric;
+use function is_string;
+use function sprintf;
+use function str_repeat;
+use function str_replace;
+use function strlen;
+use const PHP_EOL;
+
/**
* Dumps a XML reference configuration for the given configuration/node instance.
*
@@ -23,14 +41,14 @@
class XmlReferenceDumper
{
private $reference;
- public function dump(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ConfigurationInterface $configuration, $namespace = null)
+ public function dump(ConfigurationInterface $configuration, $namespace = null)
{
return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace);
}
- public function dumpNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface $node, $namespace = null)
+ public function dumpNode(NodeInterface $node, $namespace = null)
{
$this->reference = '';
- $this->writeNode($node, 0, \true, $namespace);
+ $this->writeNode($node, 0, true, $namespace);
$ref = $this->reference;
$this->reference = null;
return $ref;
@@ -40,26 +58,26 @@ public function dumpNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Defin
* @param bool $root If the node is the root node
* @param string $namespace The namespace of the node
*/
- private function writeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface $node, $depth = 0, $root = \false, $namespace = null)
+ private function writeNode(NodeInterface $node, $depth = 0, $root = false, $namespace = null)
{
$rootName = $root ? 'config' : $node->getName();
$rootNamespace = $namespace ?: ($root ? 'http://example.org/schema/dic/' . $node->getName() : null);
// xml remapping
if ($node->getParent()) {
- $remapping = \array_filter($node->getParent()->getXmlRemappings(), function ($mapping) use($rootName) {
+ $remapping = array_filter($node->getParent()->getXmlRemappings(), function ($mapping) use($rootName) {
return $rootName === $mapping[1];
});
- if (\count($remapping)) {
- list($singular) = \current($remapping);
+ if (count($remapping)) {
+ [$singular] = current($remapping);
$rootName = $singular;
}
}
- $rootName = \str_replace('_', '-', $rootName);
+ $rootName = str_replace('_', '-', $rootName);
$rootAttributes = [];
$rootAttributeComments = [];
$rootChildren = [];
$rootComments = [];
- if ($node instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode) {
+ if ($node instanceof ArrayNode) {
$children = $node->getChildren();
// comments about the root node
if ($rootInfo = $node->getInfo()) {
@@ -69,26 +87,26 @@ private function writeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Def
$rootComments[] = 'Namespace: ' . $rootNamespace;
}
// render prototyped nodes
- if ($node instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode) {
+ if ($node instanceof PrototypedArrayNode) {
$prototype = $node->getPrototype();
$info = 'prototype';
if (null !== $prototype->getInfo()) {
$info .= ': ' . $prototype->getInfo();
}
- \array_unshift($rootComments, $info);
+ array_unshift($rootComments, $info);
if ($key = $node->getKeyAttribute()) {
- $rootAttributes[$key] = \str_replace('-', ' ', $rootName) . ' ' . $key;
+ $rootAttributes[$key] = str_replace('-', ' ', $rootName) . ' ' . $key;
}
- if ($prototype instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode) {
+ if ($prototype instanceof PrototypedArrayNode) {
$prototype->setName($key);
$children = [$key => $prototype];
- } elseif ($prototype instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode) {
+ } elseif ($prototype instanceof ArrayNode) {
$children = $prototype->getChildren();
} else {
if ($prototype->hasDefaultValue()) {
$prototypeValue = $prototype->getDefaultValue();
} else {
- switch (\get_class($prototype)) {
+ switch (get_class($prototype)) {
case 'Symfony\\Component\\Config\\Definition\\ScalarNode':
$prototypeValue = 'scalar value';
break;
@@ -100,7 +118,7 @@ private function writeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Def
$prototypeValue = 'true|false';
break;
case 'Symfony\\Component\\Config\\Definition\\EnumNode':
- $prototypeValue = \implode('|', \array_map('json_encode', $prototype->getValues()));
+ $prototypeValue = implode('|', array_map('json_encode', $prototype->getValues()));
break;
default:
$prototypeValue = 'value';
@@ -110,10 +128,10 @@ private function writeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Def
}
// get attributes and elements
foreach ($children as $child) {
- if (!$child instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode) {
+ if (!$child instanceof ArrayNode) {
// get attributes
// metadata
- $name = \str_replace('_', '-', $child->getName());
+ $name = str_replace('_', '-', $child->getName());
$value = '%%%%not_defined%%%%';
// use a string which isn't used in the normal world
// comments
@@ -128,13 +146,13 @@ private function writeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Def
$comments[] = 'Required';
}
if ($child->isDeprecated()) {
- $comments[] = \sprintf('Deprecated (%s)', $child->getDeprecationMessage($child->getName(), $node->getPath()));
+ $comments[] = sprintf('Deprecated (%s)', $child->getDeprecationMessage($child->getName(), $node->getPath()));
}
- if ($child instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode) {
- $comments[] = 'One of ' . \implode('; ', \array_map('json_encode', $child->getValues()));
+ if ($child instanceof EnumNode) {
+ $comments[] = 'One of ' . implode('; ', array_map('json_encode', $child->getValues()));
}
- if (\count($comments)) {
- $rootAttributeComments[$name] = \implode(";\n", $comments);
+ if (count($comments)) {
+ $rootAttributeComments[$name] = implode(";\n", $comments);
}
// default values
if ($child->hasDefaultValue()) {
@@ -150,18 +168,18 @@ private function writeNode(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Def
}
// render comments
// root node comment
- if (\count($rootComments)) {
+ if (count($rootComments)) {
foreach ($rootComments as $comment) {
$this->writeLine('', $depth);
}
}
// attribute comments
- if (\count($rootAttributeComments)) {
+ if (count($rootAttributeComments)) {
foreach ($rootAttributeComments as $attrName => $comment) {
- $commentDepth = $depth + 4 + \strlen($attrName) + 2;
- $commentLines = \explode("\n", $comment);
- $multiline = \count($commentLines) > 1;
- $comment = \implode(\PHP_EOL . \str_repeat(' ', $commentDepth), $commentLines);
+ $commentDepth = $depth + 4 + strlen($attrName) + 2;
+ $commentLines = explode("\n", $comment);
+ $multiline = count($commentLines) > 1;
+ $comment = implode(PHP_EOL . str_repeat(' ', $commentDepth), $commentLines);
if ($multiline) {
$this->writeLine('
diff --git a/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
index d94c376b0..757a3cf3b 100644
--- a/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
+++ b/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
@@ -13,12 +13,14 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration;
-class YamlReferenceDumperTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function trim;
+
+class YamlReferenceDumperTest extends TestCase
{
public function testDumper()
{
- $configuration = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper();
+ $configuration = new ExampleConfiguration();
+ $dumper = new YamlReferenceDumper();
$this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration));
}
public function provideDumpAtPath()
@@ -62,9 +64,9 @@ public function provideDumpAtPath()
*/
public function testDumpAtPath($path, $expected)
{
- $configuration = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper();
- $this->assertSame(\trim($expected), \trim($dumper->dumpAtPath($configuration, $path)));
+ $configuration = new ExampleConfiguration();
+ $dumper = new YamlReferenceDumper();
+ $this->assertSame(trim($expected), trim($dumper->dumpAtPath($configuration, $path)));
}
private function getConfigurationAsString()
{
diff --git a/vendor/symfony/config/Tests/Definition/Dumper/index.php b/vendor/symfony/config/Tests/Definition/Dumper/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Definition/Dumper/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Definition/EnumNodeTest.php b/vendor/symfony/config/Tests/Definition/EnumNodeTest.php
index 91dc149fe..7cbd885ba 100644
--- a/vendor/symfony/config/Tests/Definition/EnumNodeTest.php
+++ b/vendor/symfony/config/Tests/Definition/EnumNodeTest.php
@@ -12,34 +12,34 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode;
-class EnumNodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class EnumNodeTest extends TestCase
{
public function testFinalizeValue()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode('foo', null, ['foo', 'bar']);
+ $node = new EnumNode('foo', null, ['foo', 'bar']);
$this->assertSame('foo', $node->finalize('foo'));
}
public function testConstructionWithNoValues()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('$values must contain at least one element.');
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode('foo', null, []);
+ new EnumNode('foo', null, []);
}
public function testConstructionWithOneValue()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode('foo', null, ['foo']);
+ $node = new EnumNode('foo', null, ['foo']);
$this->assertSame('foo', $node->finalize('foo'));
}
public function testConstructionWithOneDistinctValue()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode('foo', null, ['foo', 'foo']);
+ $node = new EnumNode('foo', null, ['foo', 'foo']);
$this->assertSame('foo', $node->finalize('foo'));
}
public function testFinalizeWithInvalidValue()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException');
$this->expectExceptionMessage('The value "foobar" is not allowed for path "foo". Permissible values: "foo", "bar"');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\EnumNode('foo', null, ['foo', 'bar']);
+ $node = new EnumNode('foo', null, ['foo', 'bar']);
$node->finalize('foobar');
}
}
diff --git a/vendor/symfony/config/Tests/Definition/FinalizationTest.php b/vendor/symfony/config/Tests/Definition/FinalizationTest.php
index d177abcc9..c9950833e 100644
--- a/vendor/symfony/config/Tests/Definition/FinalizationTest.php
+++ b/vendor/symfony/config/Tests/Definition/FinalizationTest.php
@@ -14,19 +14,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Processor;
-class FinalizationTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class FinalizationTest extends TestCase
{
public function testUnsetKeyWithDeepHierarchy()
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('config', 'array')->children()->node('level1', 'array')->canBeUnset()->children()->node('level2', 'array')->canBeUnset()->children()->node('somevalue', 'scalar')->end()->node('anothervalue', 'scalar')->end()->end()->end()->node('level1_scalar', 'scalar')->end()->end()->end()->end()->end()->buildTree();
$a = ['level1' => ['level2' => ['somevalue' => 'foo', 'anothervalue' => 'bar'], 'level1_scalar' => 'foo']];
- $b = ['level1' => ['level2' => \false]];
+ $b = ['level1' => ['level2' => false]];
$this->assertEquals(['level1' => ['level1_scalar' => 'foo']], $this->process($tree, [$a, $b]));
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface $tree, array $configs)
+ protected function process(NodeInterface $tree, array $configs)
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Processor();
+ $processor = new Processor();
return $processor->process($tree, $configs);
}
}
diff --git a/vendor/symfony/config/Tests/Definition/FloatNodeTest.php b/vendor/symfony/config/Tests/Definition/FloatNodeTest.php
index 31050e15f..495bc888d 100644
--- a/vendor/symfony/config/Tests/Definition/FloatNodeTest.php
+++ b/vendor/symfony/config/Tests/Definition/FloatNodeTest.php
@@ -12,14 +12,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\FloatNode;
-class FloatNodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use stdClass;
+
+class FloatNodeTest extends TestCase
{
/**
* @dataProvider getValidValues
*/
public function testNormalize($value)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\FloatNode('test');
+ $node = new FloatNode('test');
$this->assertSame($value, $node->normalize($value));
}
/**
@@ -29,8 +31,8 @@ public function testNormalize($value)
*/
public function testValidNonEmptyValues($value)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\FloatNode('test');
- $node->setAllowEmptyValue(\false);
+ $node = new FloatNode('test');
+ $node->setAllowEmptyValue(false);
$this->assertSame($value, $node->finalize($value));
}
public function getValidValues()
@@ -52,11 +54,11 @@ public function getValidValues()
public function testNormalizeThrowsExceptionOnInvalidValues($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\FloatNode('test');
+ $node = new FloatNode('test');
$node->normalize($value);
}
public function getInvalidValues()
{
- return [[null], [''], ['foo'], [\true], [\false], [[]], [['foo' => 'bar']], [new \stdClass()]];
+ return [[null], [''], ['foo'], [true], [false], [[]], [['foo' => 'bar']], [new stdClass()]];
}
}
diff --git a/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php b/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php
index 433d39936..377fc24ba 100644
--- a/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php
+++ b/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php
@@ -12,14 +12,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\IntegerNode;
-class IntegerNodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use stdClass;
+
+class IntegerNodeTest extends TestCase
{
/**
* @dataProvider getValidValues
*/
public function testNormalize($value)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\IntegerNode('test');
+ $node = new IntegerNode('test');
$this->assertSame($value, $node->normalize($value));
}
/**
@@ -29,8 +31,8 @@ public function testNormalize($value)
*/
public function testValidNonEmptyValues($value)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\IntegerNode('test');
- $node->setAllowEmptyValue(\false);
+ $node = new IntegerNode('test');
+ $node->setAllowEmptyValue(false);
$this->assertSame($value, $node->finalize($value));
}
public function getValidValues()
@@ -43,11 +45,11 @@ public function getValidValues()
public function testNormalizeThrowsExceptionOnInvalidValues($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\IntegerNode('test');
+ $node = new IntegerNode('test');
$node->normalize($value);
}
public function getInvalidValues()
{
- return [[null], [''], ['foo'], [\true], [\false], [0.0], [0.1], [[]], [['foo' => 'bar']], [new \stdClass()]];
+ return [[null], [''], ['foo'], [true], [false], [0.0], [0.1], [[]], [['foo' => 'bar']], [new stdClass()]];
}
}
diff --git a/vendor/symfony/config/Tests/Definition/MergeTest.php b/vendor/symfony/config/Tests/Definition/MergeTest.php
index 8476c407a..e9bf57f07 100644
--- a/vendor/symfony/config/Tests/Definition/MergeTest.php
+++ b/vendor/symfony/config/Tests/Definition/MergeTest.php
@@ -12,12 +12,12 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder;
-class MergeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class MergeTest extends TestCase
{
public function testForbiddenOverwrite()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\ForbiddenOverwriteException');
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('root', 'array')->children()->node('foo', 'scalar')->cannotBeOverwritten()->end()->end()->end()->buildTree();
$a = ['foo' => 'bar'];
$b = ['foo' => 'moo'];
@@ -25,16 +25,16 @@ public function testForbiddenOverwrite()
}
public function testUnsetKey()
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('root', 'array')->children()->node('foo', 'scalar')->end()->node('bar', 'scalar')->end()->node('unsettable', 'array')->canBeUnset()->children()->node('foo', 'scalar')->end()->node('bar', 'scalar')->end()->end()->end()->node('unsetted', 'array')->canBeUnset()->prototype('scalar')->end()->end()->end()->end()->buildTree();
- $a = ['foo' => 'bar', 'unsettable' => ['foo' => 'a', 'bar' => 'b'], 'unsetted' => \false];
- $b = ['foo' => 'moo', 'bar' => 'b', 'unsettable' => \false, 'unsetted' => ['a', 'b']];
- $this->assertEquals(['foo' => 'moo', 'bar' => 'b', 'unsettable' => \false, 'unsetted' => ['a', 'b']], $tree->merge($a, $b));
+ $a = ['foo' => 'bar', 'unsettable' => ['foo' => 'a', 'bar' => 'b'], 'unsetted' => false];
+ $b = ['foo' => 'moo', 'bar' => 'b', 'unsettable' => false, 'unsetted' => ['a', 'b']];
+ $this->assertEquals(['foo' => 'moo', 'bar' => 'b', 'unsettable' => false, 'unsetted' => ['a', 'b']], $tree->merge($a, $b));
}
public function testDoesNotAllowNewKeysInSubsequentConfigs()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException');
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('config', 'array')->children()->node('test', 'array')->disallowNewKeysInSubsequentConfigs()->useAttributeAsKey('key')->prototype('array')->children()->node('value', 'scalar')->end()->end()->end()->end()->end()->end()->buildTree();
$a = ['test' => ['a' => ['value' => 'foo']]];
$b = ['test' => ['b' => ['value' => 'foo']]];
@@ -42,7 +42,7 @@ public function testDoesNotAllowNewKeysInSubsequentConfigs()
}
public function testPerformsNoDeepMerging()
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('config', 'array')->children()->node('no_deep_merging', 'array')->performNoDeepMerging()->children()->node('foo', 'scalar')->end()->node('bar', 'scalar')->end()->end()->end()->end()->end()->buildTree();
$a = ['no_deep_merging' => ['foo' => 'a', 'bar' => 'b']];
$b = ['no_deep_merging' => ['c' => 'd']];
@@ -50,7 +50,7 @@ public function testPerformsNoDeepMerging()
}
public function testPrototypeWithoutAKeyAttribute()
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('config', 'array')->children()->arrayNode('append_elements')->prototype('scalar')->end()->end()->end()->end()->buildTree();
$a = ['append_elements' => ['a', 'b']];
$b = ['append_elements' => ['c', 'd']];
diff --git a/vendor/symfony/config/Tests/Definition/NormalizationTest.php b/vendor/symfony/config/Tests/Definition/NormalizationTest.php
index 725d9a052..859e3affc 100644
--- a/vendor/symfony/config/Tests/Definition/NormalizationTest.php
+++ b/vendor/symfony/config/Tests/Definition/NormalizationTest.php
@@ -13,14 +13,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface;
-class NormalizationTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function array_map;
+
+class NormalizationTest extends TestCase
{
/**
* @dataProvider getEncoderTests
*/
public function testNormalizeEncoders($denormalized)
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('root_name', 'array')->fixXmlConfig('encoder')->children()->node('encoders', 'array')->useAttributeAsKey('class')->prototype('array')->beforeNormalization()->ifString()->then(function ($v) {
return ['algorithm' => $v];
})->end()->children()->node('algorithm', 'scalar')->end()->end()->end()->end()->end()->end()->buildTree();
@@ -40,7 +42,7 @@ public function getEncoderTests()
$configs[] = ['encoders' => ['foo' => 'plaintext']];
// YAML/PHP
$configs[] = ['encoders' => ['foo' => ['algorithm' => 'plaintext']]];
- return \array_map(function ($v) {
+ return array_map(function ($v) {
return [$v];
}, $configs);
}
@@ -49,7 +51,7 @@ public function getEncoderTests()
*/
public function testAnonymousKeysArray($denormalized)
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('root', 'array')->children()->node('logout', 'array')->fixXmlConfig('handler')->children()->node('handlers', 'array')->prototype('scalar')->end()->end()->end()->end()->end()->end()->buildTree();
$normalized = ['logout' => ['handlers' => ['a', 'b', 'c']]];
$this->assertNormalized($tree, $denormalized, $normalized);
@@ -59,7 +61,7 @@ public function getAnonymousKeysTests()
$configs = [];
$configs[] = ['logout' => ['handlers' => ['a', 'b', 'c']]];
$configs[] = ['logout' => ['handler' => ['a', 'b', 'c']]];
- return \array_map(function ($v) {
+ return array_map(function ($v) {
return [$v];
}, $configs);
}
@@ -76,7 +78,7 @@ public function getNumericKeysTests()
$configs = [];
$configs[] = ['thing' => [42 => ['foo', 'bar'], 1337 => ['baz', 'qux']]];
$configs[] = ['thing' => [['foo', 'bar', 'id' => 42], ['baz', 'qux', 'id' => 1337]]];
- return \array_map(function ($v) {
+ return array_map(function ($v) {
return [$v];
}, $configs);
}
@@ -89,18 +91,18 @@ public function testNonAssociativeArrayThrowsExceptionIfAttributeNotSet()
}
public function testAssociativeArrayPreserveKeys()
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('root', 'array')->prototype('array')->children()->node('foo', 'scalar')->end()->end()->end()->end()->buildTree();
$data = ['first' => ['foo' => 'bar']];
$this->assertNormalized($tree, $data, $data);
}
- public static function assertNormalized(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\NodeInterface $tree, $denormalized, $normalized)
+ public static function assertNormalized(NodeInterface $tree, $denormalized, $normalized)
{
self::assertSame($normalized, $tree->normalize($denormalized));
}
private function getNumericKeysTestTree()
{
- $tb = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $tb = new TreeBuilder();
$tree = $tb->root('root', 'array')->children()->node('thing', 'array')->useAttributeAsKey('id')->prototype('array')->prototype('scalar')->end()->end()->end()->end()->end()->buildTree();
return $tree;
}
diff --git a/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php b/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php
index aaa300d2e..5e50d66c0 100644
--- a/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php
+++ b/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php
@@ -15,19 +15,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\VariableNode;
-class PrototypedArrayNodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class PrototypedArrayNodeTest extends TestCase
{
public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('root');
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode(null, $node);
+ $node = new PrototypedArrayNode('root');
+ $prototype = new ArrayNode(null, $node);
$node->setPrototype($prototype);
$this->assertEmpty($node->getDefaultValue());
}
public function testGetDefaultValueReturnsDefaultValueForPrototypes()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('root');
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode(null, $node);
+ $node = new PrototypedArrayNode('root');
+ $prototype = new ArrayNode(null, $node);
$node->setPrototype($prototype);
$node->setDefaultValue(['test']);
$this->assertEquals(['test'], $node->getDefaultValue());
@@ -35,11 +35,11 @@ public function testGetDefaultValueReturnsDefaultValueForPrototypes()
// a remapped key (e.g. "mapping" -> "mappings") should be unset after being used
public function testRemappedKeysAreUnset()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode('root');
- $mappingsNode = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('mappings');
+ $node = new ArrayNode('root');
+ $mappingsNode = new PrototypedArrayNode('mappings');
$node->addChild($mappingsNode);
// each item under mappings is just a scalar
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode(null, $mappingsNode);
+ $prototype = new ScalarNode(null, $mappingsNode);
$mappingsNode->setPrototype($prototype);
$remappings = [];
$remappings[] = ['mapping', 'mappings'];
@@ -67,11 +67,11 @@ public function testRemappedKeysAreUnset()
*/
public function testMappedAttributeKeyIsRemoved()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('root');
- $node->setKeyAttribute('id', \true);
+ $node = new PrototypedArrayNode('root');
+ $node->setKeyAttribute('id', true);
// each item under the root is an array, with one scalar item
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode(null, $node);
- $prototype->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('foo'));
+ $prototype = new ArrayNode(null, $node);
+ $prototype->addChild(new ScalarNode('foo'));
$node->setPrototype($prototype);
$children = [];
$children[] = ['id' => 'item_name', 'foo' => 'bar'];
@@ -86,12 +86,12 @@ public function testMappedAttributeKeyIsRemoved()
*/
public function testMappedAttributeKeyNotRemoved()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('root');
- $node->setKeyAttribute('id', \false);
+ $node = new PrototypedArrayNode('root');
+ $node->setKeyAttribute('id', false);
// each item under the root is an array, with two scalar items
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode(null, $node);
- $prototype->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('foo'));
- $prototype->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('id'));
+ $prototype = new ArrayNode(null, $node);
+ $prototype->addChild(new ScalarNode('foo'));
+ $prototype->addChild(new ScalarNode('id'));
// the key attribute will remain
$node->setPrototype($prototype);
$children = [];
@@ -146,12 +146,12 @@ public function testDefaultChildrenWinsOverDefaultValue()
}
protected function getPrototypeNodeWithDefaultChildren()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('root');
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode(null, $node);
- $child = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('foo');
+ $node = new PrototypedArrayNode('root');
+ $prototype = new ArrayNode(null, $node);
+ $child = new ScalarNode('foo');
$child->setDefaultValue('bar');
$prototype->addChild($child);
- $prototype->setAddIfNotSet(\true);
+ $prototype->setAddIfNotSet(true);
$node->setPrototype($prototype);
return $node;
}
@@ -241,12 +241,12 @@ protected function getPrototypeNodeWithDefaultChildren()
*/
public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, $children, $expected)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\PrototypedArrayNode('root');
- $node->setKeyAttribute('id', \true);
+ $node = new PrototypedArrayNode('root');
+ $node->setKeyAttribute('id', true);
// each item under the root is an array, with one scalar item
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode(null, $node);
- $prototype->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('id'));
- $prototype->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('foo'));
+ $prototype = new ArrayNode(null, $node);
+ $prototype->addChild(new ScalarNode('id'));
+ $prototype->addChild(new ScalarNode('foo'));
$prototype->addChild($value);
$node->setPrototype($prototype);
$normalized = $node->normalize($children);
@@ -254,11 +254,11 @@ public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, $children,
}
public function getDataForKeyRemovedLeftValueOnly()
{
- $scalarValue = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('value');
- $arrayValue = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode('value');
- $arrayValue->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('foo'));
- $arrayValue->addChild(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('bar'));
- $variableValue = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\VariableNode('value');
+ $scalarValue = new ScalarNode('value');
+ $arrayValue = new ArrayNode('value');
+ $arrayValue->addChild(new ScalarNode('foo'));
+ $arrayValue->addChild(new ScalarNode('bar'));
+ $variableValue = new VariableNode('value');
return [[$scalarValue, [['id' => 'option1', 'value' => 'value1']], ['option1' => 'value1']], [$scalarValue, [['id' => 'option1', 'value' => 'value1'], ['id' => 'option2', 'value' => 'value2', 'foo' => 'foo2']], ['option1' => 'value1', 'option2' => ['value' => 'value2', 'foo' => 'foo2']]], [$arrayValue, [['id' => 'option1', 'value' => ['foo' => 'foo1', 'bar' => 'bar1']]], ['option1' => ['foo' => 'foo1', 'bar' => 'bar1']]], [$variableValue, [['id' => 'option1', 'value' => ['foo' => 'foo1', 'bar' => 'bar1']], ['id' => 'option2', 'value' => 'value2']], ['option1' => ['foo' => 'foo1', 'bar' => 'bar1'], 'option2' => 'value2']]];
}
}
diff --git a/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php b/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php
index 00c576a65..a55c22069 100644
--- a/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php
+++ b/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php
@@ -13,42 +13,47 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode;
-class ScalarNodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use stdClass;
+use function restore_error_handler;
+use function set_error_handler;
+use const E_USER_DEPRECATED;
+
+class ScalarNodeTest extends TestCase
{
/**
* @dataProvider getValidValues
*/
public function testNormalize($value)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('test');
+ $node = new ScalarNode('test');
$this->assertSame($value, $node->normalize($value));
}
public function getValidValues()
{
- return [[\false], [\true], [null], [''], ['foo'], [0], [1], [0.0], [0.1]];
+ return [[false], [true], [null], [''], ['foo'], [0], [1], [0.0], [0.1]];
}
public function testSetDeprecated()
{
- $childNode = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('foo');
+ $childNode = new ScalarNode('foo');
$childNode->setDeprecated('"%node%" is deprecated');
$this->assertTrue($childNode->isDeprecated());
$this->assertSame('"foo" is deprecated', $childNode->getDeprecationMessage($childNode->getName(), $childNode->getPath()));
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode('root');
+ $node = new ArrayNode('root');
$node->addChild($childNode);
$deprecationTriggered = 0;
$deprecationHandler = function ($level, $message, $file, $line) use(&$prevErrorHandler, &$deprecationTriggered) {
- if (\E_USER_DEPRECATED === $level) {
+ if (E_USER_DEPRECATED === $level) {
return ++$deprecationTriggered;
}
- return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : \false;
+ return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false;
};
- $prevErrorHandler = \set_error_handler($deprecationHandler);
+ $prevErrorHandler = set_error_handler($deprecationHandler);
$node->finalize([]);
- \restore_error_handler();
+ restore_error_handler();
$this->assertSame(0, $deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set');
- $prevErrorHandler = \set_error_handler($deprecationHandler);
+ $prevErrorHandler = set_error_handler($deprecationHandler);
$node->finalize(['foo' => '']);
- \restore_error_handler();
+ restore_error_handler();
$this->assertSame(1, $deprecationTriggered, '->finalize() should trigger if the deprecated node is set');
}
/**
@@ -57,23 +62,23 @@ public function testSetDeprecated()
public function testNormalizeThrowsExceptionOnInvalidValues($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('test');
+ $node = new ScalarNode('test');
$node->normalize($value);
}
public function getInvalidValues()
{
- return [[[]], [['foo' => 'bar']], [new \stdClass()]];
+ return [[[]], [['foo' => 'bar']], [new stdClass()]];
}
public function testNormalizeThrowsExceptionWithoutHint()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('test');
+ $node = new ScalarNode('test');
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException');
$this->expectExceptionMessage('Invalid type for path "test". Expected scalar, but got array.');
$node->normalize([]);
}
public function testNormalizeThrowsExceptionWithErrorMessage()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('test');
+ $node = new ScalarNode('test');
$node->setInfo('"the test value"');
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidTypeException');
$this->expectExceptionMessage("Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\"");
@@ -86,13 +91,13 @@ public function testNormalizeThrowsExceptionWithErrorMessage()
*/
public function testValidNonEmptyValues($value)
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('test');
- $node->setAllowEmptyValue(\false);
+ $node = new ScalarNode('test');
+ $node->setAllowEmptyValue(false);
$this->assertSame($value, $node->finalize($value));
}
public function getValidNonEmptyValues()
{
- return [[\false], [\true], ['foo'], [0], [1], [0.0], [0.1]];
+ return [[false], [true], ['foo'], [0], [1], [0.0], [0.1]];
}
/**
* @dataProvider getEmptyValues
@@ -102,8 +107,8 @@ public function getValidNonEmptyValues()
public function testNotAllowedEmptyValuesThrowException($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ScalarNode('test');
- $node->setAllowEmptyValue(\false);
+ $node = new ScalarNode('test');
+ $node->setAllowEmptyValue(false);
$node->finalize($value);
}
public function getEmptyValues()
diff --git a/vendor/symfony/config/Tests/Definition/index.php b/vendor/symfony/config/Tests/Definition/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Definition/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php b/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php
index e56307330..1d1d12b16 100644
--- a/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php
+++ b/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php
@@ -15,29 +15,31 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function count;
+
/**
* @group legacy
*/
-class ConfigCachePassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ConfigCachePassTest extends TestCase
{
public function testThatCheckersAreProcessedInPriorityOrder()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$definition = $container->register('config_cache_factory')->addArgument(null);
$container->register('checker_2')->addTag('config_cache.resource_checker', ['priority' => 100]);
$container->register('checker_1')->addTag('config_cache.resource_checker', ['priority' => 200]);
$container->register('checker_3')->addTag('config_cache.resource_checker');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\DependencyInjection\ConfigCachePass();
+ $pass = new ConfigCachePass();
$pass->process($container);
- $expected = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('checker_1'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('checker_2'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('checker_3')]);
+ $expected = new IteratorArgument([new Reference('checker_1'), new Reference('checker_2'), new Reference('checker_3')]);
$this->assertEquals($expected, $definition->getArgument(0));
}
public function testThatCheckersCanBeMissing()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definitionsBefore = \count($container->getDefinitions());
- $aliasesBefore = \count($container->getAliases());
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\DependencyInjection\ConfigCachePass();
+ $container = new ContainerBuilder();
+ $definitionsBefore = count($container->getDefinitions());
+ $aliasesBefore = count($container->getAliases());
+ $pass = new ConfigCachePass();
$pass->process($container);
// the container is untouched (i.e. no new definitions or aliases)
$this->assertCount($definitionsBefore, $container->getDefinitions());
diff --git a/vendor/symfony/config/Tests/DependencyInjection/index.php b/vendor/symfony/config/Tests/DependencyInjection/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/DependencyInjection/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php b/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php
index a0234d528..c234a3301 100644
--- a/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php
+++ b/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php
@@ -12,46 +12,48 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException;
-class FileLoaderLoadExceptionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+
+class FileLoaderLoadExceptionTest extends TestCase
{
public function testMessageCannotLoadResource()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('resource', null);
+ $exception = new FileLoaderLoadException('resource', null);
$this->assertEquals('Cannot load resource "resource".', $exception->getMessage());
}
public function testMessageCannotLoadResourceWithType()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('resource', null, null, null, 'foobar');
+ $exception = new FileLoaderLoadException('resource', null, null, null, 'foobar');
$this->assertEquals('Cannot load resource "resource". Make sure there is a loader supporting the "foobar" type.', $exception->getMessage());
}
public function testMessageCannotLoadResourceWithAnnotationType()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('resource', null, null, null, 'annotation');
+ $exception = new FileLoaderLoadException('resource', null, null, null, 'annotation');
$this->assertEquals('Cannot load resource "resource". Make sure annotations are installed and enabled.', $exception->getMessage());
}
public function testMessageCannotImportResourceFromSource()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('resource', 'sourceResource');
+ $exception = new FileLoaderLoadException('resource', 'sourceResource');
$this->assertEquals('Cannot import resource "resource" from "sourceResource".', $exception->getMessage());
}
public function testMessageCannotImportBundleResource()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('@resource', 'sourceResource');
+ $exception = new FileLoaderLoadException('@resource', 'sourceResource');
$this->assertEquals('Cannot import resource "@resource" from "sourceResource". ' . 'Make sure the "resource" bundle is correctly registered and loaded in the application kernel class. ' . 'If the bundle is registered, make sure the bundle path "@resource" is not empty.', $exception->getMessage());
}
public function testMessageHasPreviousErrorWithDotAndUnableToLoad()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('resource', null, null, new \Exception('There was a previous error with an ending dot.'));
+ $exception = new FileLoaderLoadException('resource', null, null, new Exception('There was a previous error with an ending dot.'));
$this->assertEquals('There was a previous error with an ending dot in resource (which is loaded in resource "resource").', $exception->getMessage());
}
public function testMessageHasPreviousErrorWithoutDotAndUnableToLoad()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('resource', null, null, new \Exception('There was a previous error with no ending dot'));
+ $exception = new FileLoaderLoadException('resource', null, null, new Exception('There was a previous error with no ending dot'));
$this->assertEquals('There was a previous error with no ending dot in resource (which is loaded in resource "resource").', $exception->getMessage());
}
public function testMessageHasPreviousErrorAndUnableToLoadBundle()
{
- $exception = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Exception\FileLoaderLoadException('@resource', null, null, new \Exception('There was a previous error with an ending dot.'));
+ $exception = new FileLoaderLoadException('@resource', null, null, new Exception('There was a previous error with an ending dot.'));
$this->assertEquals('There was a previous error with an ending dot in @resource ' . '(which is loaded in resource "@resource"). ' . 'Make sure the "resource" bundle is correctly registered and loaded in the application kernel class. ' . 'If the bundle is registered, make sure the bundle path "@resource" is not empty.', $exception->getMessage());
}
}
diff --git a/vendor/symfony/config/Tests/Exception/index.php b/vendor/symfony/config/Tests/Exception/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Exception/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/FileLocatorTest.php b/vendor/symfony/config/Tests/FileLocatorTest.php
index a1f8fcae8..b8a8b5c36 100644
--- a/vendor/symfony/config/Tests/FileLocatorTest.php
+++ b/vendor/symfony/config/Tests/FileLocatorTest.php
@@ -12,17 +12,20 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
-class FileLocatorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use ReflectionObject;
+use const DIRECTORY_SEPARATOR;
+
+class FileLocatorTest extends TestCase
{
/**
* @dataProvider getIsAbsolutePathTests
*/
public function testIsAbsolutePath($path)
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator([]);
- $r = new \ReflectionObject($loader);
+ $loader = new FileLocator([]);
+ $r = new ReflectionObject($loader);
$m = $r->getMethod('isAbsolutePath');
- $m->setAccessible(\true);
+ $m->setAccessible(true);
$this->assertTrue($m->invoke($loader, $path), '->isAbsolutePath() returns true for an absolute path');
}
public function getIsAbsolutePathTests()
@@ -31,34 +34,34 @@ public function getIsAbsolutePathTests()
}
public function testLocate()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(__DIR__ . '/Fixtures');
- $this->assertEquals(__DIR__ . \DIRECTORY_SEPARATOR . 'FileLocatorTest.php', $loader->locate('FileLocatorTest.php', __DIR__), '->locate() returns the absolute filename if the file exists in the given path');
- $this->assertEquals(__DIR__ . '/Fixtures' . \DIRECTORY_SEPARATOR . 'foo.xml', $loader->locate('foo.xml', __DIR__), '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor');
- $this->assertEquals(__DIR__ . '/Fixtures' . \DIRECTORY_SEPARATOR . 'foo.xml', $loader->locate(__DIR__ . '/Fixtures' . \DIRECTORY_SEPARATOR . 'foo.xml', __DIR__), '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator([__DIR__ . '/Fixtures', __DIR__ . '/Fixtures/Again']);
- $this->assertEquals([__DIR__ . '/Fixtures' . \DIRECTORY_SEPARATOR . 'foo.xml', __DIR__ . '/Fixtures/Again' . \DIRECTORY_SEPARATOR . 'foo.xml'], $loader->locate('foo.xml', __DIR__, \false), '->locate() returns an array of absolute filenames');
- $this->assertEquals([__DIR__ . '/Fixtures' . \DIRECTORY_SEPARATOR . 'foo.xml', __DIR__ . '/Fixtures/Again' . \DIRECTORY_SEPARATOR . 'foo.xml'], $loader->locate('foo.xml', __DIR__ . '/Fixtures', \false), '->locate() returns an array of absolute filenames');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(__DIR__ . '/Fixtures/Again');
- $this->assertEquals([__DIR__ . '/Fixtures' . \DIRECTORY_SEPARATOR . 'foo.xml', __DIR__ . '/Fixtures/Again' . \DIRECTORY_SEPARATOR . 'foo.xml'], $loader->locate('foo.xml', __DIR__ . '/Fixtures', \false), '->locate() returns an array of absolute filenames');
+ $loader = new FileLocator(__DIR__ . '/Fixtures');
+ $this->assertEquals(__DIR__ . DIRECTORY_SEPARATOR . 'FileLocatorTest.php', $loader->locate('FileLocatorTest.php', __DIR__), '->locate() returns the absolute filename if the file exists in the given path');
+ $this->assertEquals(__DIR__ . '/Fixtures' . DIRECTORY_SEPARATOR . 'foo.xml', $loader->locate('foo.xml', __DIR__), '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor');
+ $this->assertEquals(__DIR__ . '/Fixtures' . DIRECTORY_SEPARATOR . 'foo.xml', $loader->locate(__DIR__ . '/Fixtures' . DIRECTORY_SEPARATOR . 'foo.xml', __DIR__), '->locate() returns the absolute filename if the file exists in one of the paths given in the constructor');
+ $loader = new FileLocator([__DIR__ . '/Fixtures', __DIR__ . '/Fixtures/Again']);
+ $this->assertEquals([__DIR__ . '/Fixtures' . DIRECTORY_SEPARATOR . 'foo.xml', __DIR__ . '/Fixtures/Again' . DIRECTORY_SEPARATOR . 'foo.xml'], $loader->locate('foo.xml', __DIR__, false), '->locate() returns an array of absolute filenames');
+ $this->assertEquals([__DIR__ . '/Fixtures' . DIRECTORY_SEPARATOR . 'foo.xml', __DIR__ . '/Fixtures/Again' . DIRECTORY_SEPARATOR . 'foo.xml'], $loader->locate('foo.xml', __DIR__ . '/Fixtures', false), '->locate() returns an array of absolute filenames');
+ $loader = new FileLocator(__DIR__ . '/Fixtures/Again');
+ $this->assertEquals([__DIR__ . '/Fixtures' . DIRECTORY_SEPARATOR . 'foo.xml', __DIR__ . '/Fixtures/Again' . DIRECTORY_SEPARATOR . 'foo.xml'], $loader->locate('foo.xml', __DIR__ . '/Fixtures', false), '->locate() returns an array of absolute filenames');
}
public function testLocateThrowsAnExceptionIfTheFileDoesNotExists()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException');
$this->expectExceptionMessage('The file "foobar.xml" does not exist');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator([__DIR__ . '/Fixtures']);
+ $loader = new FileLocator([__DIR__ . '/Fixtures']);
$loader->locate('foobar.xml', __DIR__);
}
public function testLocateThrowsAnExceptionIfTheFileDoesNotExistsInAbsolutePath()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Exception\\FileLocatorFileNotFoundException');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator([__DIR__ . '/Fixtures']);
+ $loader = new FileLocator([__DIR__ . '/Fixtures']);
$loader->locate(__DIR__ . '/Fixtures/foobar.xml', __DIR__);
}
public function testLocateEmpty()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('An empty file name is not valid to be located.');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator([__DIR__ . '/Fixtures']);
+ $loader = new FileLocator([__DIR__ . '/Fixtures']);
$loader->locate(null, __DIR__);
}
}
diff --git a/vendor/symfony/config/Tests/Fixtures/Again/index.php b/vendor/symfony/config/Tests/Fixtures/Again/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Fixtures/Again/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Fixtures/BadFileName.php b/vendor/symfony/config/Tests/Fixtures/BadFileName.php
index 9f4184551..9fee7a7e7 100644
--- a/vendor/symfony/config/Tests/Fixtures/BadFileName.php
+++ b/vendor/symfony/config/Tests/Fixtures/BadFileName.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures;
+use RuntimeException;
+
class FileNameMismatchOnPurpose
{
}
-throw new \RuntimeException('Mismatch between file name and class name.');
+throw new RuntimeException('Mismatch between file name and class name.');
diff --git a/vendor/symfony/config/Tests/Fixtures/BadParent.php b/vendor/symfony/config/Tests/Fixtures/BadParent.php
index 7c6f727ca..45deeae39 100644
--- a/vendor/symfony/config/Tests/Fixtures/BadParent.php
+++ b/vendor/symfony/config/Tests/Fixtures/BadParent.php
@@ -2,6 +2,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures;
-class BadParent extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\MissingParent
+class BadParent extends MissingParent
{
}
diff --git a/vendor/symfony/config/Tests/Fixtures/BarNode.php b/vendor/symfony/config/Tests/Fixtures/BarNode.php
index ec5023add..db5efe9f7 100644
--- a/vendor/symfony/config/Tests/Fixtures/BarNode.php
+++ b/vendor/symfony/config/Tests/Fixtures/BarNode.php
@@ -11,6 +11,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode;
-class BarNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ArrayNode
+class BarNode extends ArrayNode
{
}
diff --git a/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php b/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php
index 289113083..c796eaecd 100644
--- a/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php
+++ b/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php
@@ -12,10 +12,10 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BarNode;
-class BarNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeDefinition
+class BarNodeDefinition extends NodeDefinition
{
protected function createNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BarNode($this->name);
+ return new BarNode($this->name);
}
}
diff --git a/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php b/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php
index ca83abb3f..c3ae3c44b 100644
--- a/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php
+++ b/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php
@@ -11,7 +11,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Builder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder;
-class NodeBuilder extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\NodeBuilder
+use function ucfirst;
+
+class NodeBuilder extends BaseNodeBuilder
{
public function barNode($name)
{
@@ -21,9 +23,9 @@ protected function getNodeClass($type)
{
switch ($type) {
case 'variable':
- return __NAMESPACE__ . '\\' . \ucfirst($type) . 'NodeDefinition';
+ return __NAMESPACE__ . '\\' . ucfirst($type) . 'NodeDefinition';
case 'bar':
- return __NAMESPACE__ . '\\' . \ucfirst($type) . 'NodeDefinition';
+ return __NAMESPACE__ . '\\' . ucfirst($type) . 'NodeDefinition';
default:
return parent::getNodeClass($type);
}
diff --git a/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php b/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php
index 7429d15a0..3e8c61ca8 100644
--- a/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php
+++ b/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php
@@ -11,6 +11,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Builder;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition;
-class VariableNodeDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\VariableNodeDefinition
+class VariableNodeDefinition extends BaseVariableNodeDefinition
{
}
diff --git a/vendor/symfony/config/Tests/Fixtures/Builder/index.php b/vendor/symfony/config/Tests/Fixtures/Builder/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Fixtures/Builder/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Fixtures/Configuration/index.php b/vendor/symfony/config/Tests/Fixtures/Configuration/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Fixtures/Configuration/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Fixtures/ParseError.php b/vendor/symfony/config/Tests/Fixtures/ParseError.php
index 6bb221382..cb066448c 100644
--- a/vendor/symfony/config/Tests/Fixtures/ParseError.php
+++ b/vendor/symfony/config/Tests/Fixtures/ParseError.php
@@ -5,3 +5,4 @@
class ParseError
{
// missing closing bracket
+}
\ No newline at end of file
diff --git a/vendor/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php b/vendor/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php
index c8da4deab..8ffa80b2c 100644
--- a/vendor/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php
+++ b/vendor/symfony/config/Tests/Fixtures/Resource/ConditionalClass.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Resource;
-if (!\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Resource\MissingClass::class)) {
+use function class_exists;
+
+if (!class_exists(MissingClass::class)) {
class ConditionalClass
{
}
diff --git a/vendor/symfony/config/Tests/Fixtures/Resource/index.php b/vendor/symfony/config/Tests/Fixtures/Resource/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Fixtures/Resource/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Fixtures/Util/index.php b/vendor/symfony/config/Tests/Fixtures/Util/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Fixtures/Util/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Fixtures/index.php b/vendor/symfony/config/Tests/Fixtures/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Fixtures/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php b/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php
index d91fa9929..02d85ae12 100644
--- a/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php
+++ b/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php
@@ -13,48 +13,48 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver;
-class DelegatingLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class DelegatingLoaderTest extends TestCase
{
public function testConstructor()
{
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader($resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver());
- $this->assertTrue(\true, '__construct() takes a loader resolver as its first argument');
+ new DelegatingLoader($resolver = new LoaderResolver());
+ $this->assertTrue(true, '__construct() takes a loader resolver as its first argument');
}
public function testGetSetResolver()
{
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader($resolver);
+ $resolver = new LoaderResolver();
+ $loader = new DelegatingLoader($resolver);
$this->assertSame($resolver, $loader->getResolver(), '->getResolver() gets the resolver loader');
- $loader->setResolver($resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver());
+ $loader->setResolver($resolver = new LoaderResolver());
$this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader');
}
public function testSupports()
{
$loader1 = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
- $loader1->expects($this->once())->method('supports')->willReturn(\true);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader1]));
+ $loader1->expects($this->once())->method('supports')->willReturn(true);
+ $loader = new DelegatingLoader(new LoaderResolver([$loader1]));
$this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable');
$loader1 = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
- $loader1->expects($this->once())->method('supports')->willReturn(\false);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader1]));
+ $loader1->expects($this->once())->method('supports')->willReturn(false);
+ $loader = new DelegatingLoader(new LoaderResolver([$loader1]));
$this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable');
}
public function testLoad()
{
$loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
- $loader->expects($this->once())->method('supports')->willReturn(\true);
+ $loader->expects($this->once())->method('supports')->willReturn(true);
$loader->expects($this->once())->method('load');
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader]);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader($resolver);
+ $resolver = new LoaderResolver([$loader]);
+ $loader = new DelegatingLoader($resolver);
$loader->load('foo');
}
public function testLoadThrowsAnExceptionIfTheResourceCannotBeLoaded()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Exception\\FileLoaderLoadException');
$loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
- $loader->expects($this->once())->method('supports')->willReturn(\false);
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader]);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\DelegatingLoader($resolver);
+ $loader->expects($this->once())->method('supports')->willReturn(false);
+ $resolver = new LoaderResolver([$loader]);
+ $loader = new DelegatingLoader($resolver);
$loader->load('foo');
}
}
diff --git a/vendor/symfony/config/Tests/Loader/FileLoaderTest.php b/vendor/symfony/config/Tests/Loader/FileLoaderTest.php
index cd22287e1..604c53d16 100644
--- a/vendor/symfony/config/Tests/Loader/FileLoaderTest.php
+++ b/vendor/symfony/config/Tests/Loader/FileLoaderTest.php
@@ -14,7 +14,11 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\FileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver;
-class FileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use function strtr;
+use const DIRECTORY_SEPARATOR;
+
+class FileLoaderTest extends TestCase
{
public function testImportWithFileLocatorDelegation()
{
@@ -31,12 +35,12 @@ public function testImportWithFileLocatorDelegation()
// Exception
['path/to/file1', 'path/to/file2']
));
- $fileLoader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\TestFileLoader($locatorMock);
- $fileLoader->setSupports(\false);
+ $fileLoader = new TestFileLoader($locatorMock);
+ $fileLoader->setSupports(false);
$fileLoader->setCurrentDir('.');
- $additionalLoader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\TestFileLoader($locatorMockForAdditionalLoader);
+ $additionalLoader = new TestFileLoader($locatorMockForAdditionalLoader);
$additionalLoader->setCurrentDir('.');
- $fileLoader->setResolver($loaderResolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$fileLoader, $additionalLoader]));
+ $fileLoader->setResolver($loaderResolver = new LoaderResolver([$fileLoader, $additionalLoader]));
// Default case
$this->assertSame('path/to/file1', $fileLoader->import('my_resource'));
// Check first file is imported if not already loading
@@ -48,7 +52,7 @@ public function testImportWithFileLocatorDelegation()
try {
$fileLoader->import('my_resource');
$this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Exception\\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
}
// Check exception throws if all files are already loading
@@ -56,31 +60,31 @@ public function testImportWithFileLocatorDelegation()
$fileLoader->addLoading('path/to/file2');
$fileLoader->import('my_resource');
$this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Exception\\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
}
}
public function testImportWithGlobLikeResource()
{
$locatorMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\FileLocatorInterface')->getMock();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\TestFileLoader($locatorMock);
+ $loader = new TestFileLoader($locatorMock);
$this->assertSame('[foo]', $loader->import('[foo]'));
}
public function testImportWithNoGlobMatch()
{
$locatorMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\FileLocatorInterface')->getMock();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\TestFileLoader($locatorMock);
+ $loader = new TestFileLoader($locatorMock);
$this->assertNull($loader->import('./*.abc'));
}
public function testImportWithSimpleGlob()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\TestFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(__DIR__));
- $this->assertSame(__FILE__, \strtr($loader->import('FileLoaderTest.*'), '/', \DIRECTORY_SEPARATOR));
+ $loader = new TestFileLoader(new FileLocator(__DIR__));
+ $this->assertSame(__FILE__, strtr($loader->import('FileLoaderTest.*'), '/', DIRECTORY_SEPARATOR));
}
}
-class TestFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\FileLoader
+class TestFileLoader extends FileLoader
{
- private $supports = \true;
+ private $supports = true;
public function load($resource, $type = null)
{
return $resource;
@@ -91,7 +95,7 @@ public function supports($resource, $type = null)
}
public function addLoading($resource)
{
- self::$loading[$resource] = \true;
+ self::$loading[$resource] = true;
}
public function removeLoading($resource)
{
diff --git a/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php b/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php
index 52c5e3a1d..8838a69fb 100644
--- a/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php
+++ b/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php
@@ -12,27 +12,27 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver;
-class LoaderResolverTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class LoaderResolverTest extends TestCase
{
public function testConstructor()
{
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock()]);
+ $resolver = new LoaderResolver([$loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock()]);
$this->assertEquals([$loader], $resolver->getLoaders(), '__construct() takes an array of loaders as its first argument');
}
public function testResolve()
{
$loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader]);
+ $resolver = new LoaderResolver([$loader]);
$this->assertFalse($resolver->resolve('foo.foo'), '->resolve() returns false if no loader is able to load the resource');
$loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
- $loader->expects($this->once())->method('supports')->willReturn(\true);
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([$loader]);
+ $loader->expects($this->once())->method('supports')->willReturn(true);
+ $resolver = new LoaderResolver([$loader]);
$this->assertEquals($loader, $resolver->resolve(function () {
}), '->resolve() returns the loader for the given resource');
}
public function testLoaders()
{
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver();
+ $resolver = new LoaderResolver();
$resolver->addLoader($loader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock());
$this->assertEquals([$loader], $resolver->getLoaders(), 'addLoader() adds a loader');
}
diff --git a/vendor/symfony/config/Tests/Loader/LoaderTest.php b/vendor/symfony/config/Tests/Loader/LoaderTest.php
index f0b613c04..f13e16df3 100644
--- a/vendor/symfony/config/Tests/Loader/LoaderTest.php
+++ b/vendor/symfony/config/Tests/Loader/LoaderTest.php
@@ -12,12 +12,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\Loader;
-class LoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function is_string;
+use function pathinfo;
+use const PATHINFO_EXTENSION;
+
+class LoaderTest extends TestCase
{
public function testGetSetResolver()
{
$resolver = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderResolverInterface')->getMock();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\ProjectLoader1();
+ $loader = new ProjectLoader1();
$loader->setResolver($resolver);
$this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader');
}
@@ -26,7 +30,7 @@ public function testResolve()
$resolvedLoader = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderInterface')->getMock();
$resolver = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderResolverInterface')->getMock();
$resolver->expects($this->once())->method('resolve')->with('foo.xml')->willReturn($resolvedLoader);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\ProjectLoader1();
+ $loader = new ProjectLoader1();
$loader->setResolver($resolver);
$this->assertSame($loader, $loader->resolve('foo.foo'), '->resolve() finds a loader');
$this->assertSame($resolvedLoader, $loader->resolve('foo.xml'), '->resolve() finds a loader');
@@ -35,8 +39,8 @@ public function testResolveWhenResolverCannotFindLoader()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Exception\\FileLoaderLoadException');
$resolver = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderResolverInterface')->getMock();
- $resolver->expects($this->once())->method('resolve')->with('FOOBAR')->willReturn(\false);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\ProjectLoader1();
+ $resolver->expects($this->once())->method('resolve')->with('FOOBAR')->willReturn(false);
+ $loader = new ProjectLoader1();
$loader->setResolver($resolver);
$loader->resolve('FOOBAR');
}
@@ -46,7 +50,7 @@ public function testImport()
$resolvedLoader->expects($this->once())->method('load')->with('foo')->willReturn('yes');
$resolver = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderResolverInterface')->getMock();
$resolver->expects($this->once())->method('resolve')->with('foo')->willReturn($resolvedLoader);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\ProjectLoader1();
+ $loader = new ProjectLoader1();
$loader->setResolver($resolver);
$this->assertEquals('yes', $loader->import('foo'));
}
@@ -56,19 +60,19 @@ public function testImportWithType()
$resolvedLoader->expects($this->once())->method('load')->with('foo', 'bar')->willReturn('yes');
$resolver = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Loader\\LoaderResolverInterface')->getMock();
$resolver->expects($this->once())->method('resolve')->with('foo', 'bar')->willReturn($resolvedLoader);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Loader\ProjectLoader1();
+ $loader = new ProjectLoader1();
$loader->setResolver($resolver);
$this->assertEquals('yes', $loader->import('foo', 'bar'));
}
}
-class ProjectLoader1 extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\Loader
+class ProjectLoader1 extends Loader
{
public function load($resource, $type = null)
{
}
public function supports($resource, $type = null)
{
- return \is_string($resource) && 'foo' === \pathinfo($resource, \PATHINFO_EXTENSION);
+ return is_string($resource) && 'foo' === pathinfo($resource, PATHINFO_EXTENSION);
}
public function getType()
{
diff --git a/vendor/symfony/config/Tests/Loader/index.php b/vendor/symfony/config/Tests/Loader/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Loader/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php b/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php
index 07f5157b3..f2725f574 100644
--- a/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php
@@ -16,22 +16,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BadParent;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\ParseError;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
-class ClassExistenceResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function spl_autoload_register;
+use function spl_autoload_unregister;
+use function time;
+
+class ClassExistenceResourceTest extends TestCase
{
public function testToString()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource('BarClass');
+ $res = new ClassExistenceResource('BarClass');
$this->assertSame('BarClass', (string) $res);
}
public function testGetResource()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource('BarClass');
+ $res = new ClassExistenceResource('BarClass');
$this->assertSame('BarClass', $res->getResource());
}
public function testIsFreshWhenClassDoesNotExist()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Tests\\Fixtures\\BarClass');
- $this->assertTrue($res->isFresh(\time()));
+ $res = new ClassExistenceResource('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Tests\\Fixtures\\BarClass');
+ $this->assertTrue($res->isFresh(time()));
eval(<<assertFalse($res->isFresh(\time()));
+ $this->assertFalse($res->isFresh(time()));
}
public function testIsFreshWhenClassExists()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Tests\\Resource\\ClassExistenceResourceTest');
- $this->assertTrue($res->isFresh(\time()));
+ $res = new ClassExistenceResource('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Tests\\Resource\\ClassExistenceResourceTest');
+ $this->assertTrue($res->isFresh(time()));
}
public function testExistsKo()
{
- \spl_autoload_register($autoloader = function ($class) use(&$loadedClass) {
+ spl_autoload_register($autoloader = function ($class) use(&$loadedClass) {
$loadedClass = $class;
});
try {
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource('MissingFooClass');
+ $res = new ClassExistenceResource('MissingFooClass');
$this->assertTrue($res->isFresh(0));
$this->assertSame('MissingFooClass', $loadedClass);
$loadedClass = 123;
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource('MissingFooClass', \false);
+ new ClassExistenceResource('MissingFooClass', false);
$this->assertSame(123, $loadedClass);
} finally {
- \spl_autoload_unregister($autoloader);
+ spl_autoload_unregister($autoloader);
}
}
public function testBadParentWithTimestamp()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BadParent::class, \false);
- $this->assertTrue($res->isFresh(\time()));
+ $res = new ClassExistenceResource(BadParent::class, false);
+ $this->assertTrue($res->isFresh(time()));
}
public function testBadParentWithNoTimestamp()
{
$this->expectException('ReflectionException');
$this->expectExceptionMessage('Class "Symfony\\Component\\Config\\Tests\\Fixtures\\MissingParent" not found while loading "Symfony\\Component\\Config\\Tests\\Fixtures\\BadParent".');
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BadParent::class, \false);
+ $res = new ClassExistenceResource(BadParent::class, false);
$res->isFresh(0);
}
public function testBadFileName()
{
$this->expectException('ReflectionException');
$this->expectExceptionMessage('Mismatch between file name and class name.');
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BadFileName::class, \false);
+ $res = new ClassExistenceResource(BadFileName::class, false);
$res->isFresh(0);
}
public function testBadFileNameBis()
{
$this->expectException('ReflectionException');
$this->expectExceptionMessage('Mismatch between file name and class name.');
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\BadFileName::class, \false);
+ $res = new ClassExistenceResource(BadFileName::class, false);
$res->isFresh(0);
}
public function testConditionalClass()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass::class, \false);
+ $res = new ClassExistenceResource(ConditionalClass::class, false);
$this->assertFalse($res->isFresh(0));
}
/**
@@ -100,7 +104,7 @@ public function testConditionalClass()
public function testParseError()
{
$this->expectException('ParseError');
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Fixtures\ParseError::class, \false);
+ $res = new ClassExistenceResource(ParseError::class, false);
$res->isFresh(0);
}
}
diff --git a/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php b/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php
index a44794944..7f787fe29 100644
--- a/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php
@@ -13,16 +13,21 @@
use _PhpScoper5ea00cc67502b\Composer\Autoload\ClassLoader;
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ComposerResource;
-class ComposerResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use ReflectionClass;
+use function serialize;
+use function strpos;
+use function unserialize;
+
+class ComposerResourceTest extends TestCase
{
public function testGetVendor()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ComposerResource();
- $r = new \ReflectionClass(\_PhpScoper5ea00cc67502b\Composer\Autoload\ClassLoader::class);
- $found = \false;
+ $res = new ComposerResource();
+ $r = new ReflectionClass(ClassLoader::class);
+ $found = false;
foreach ($res->getVendors() as $vendor) {
- if ($vendor && 0 === \strpos($r->getFileName(), $vendor)) {
- $found = \true;
+ if ($vendor && 0 === strpos($r->getFileName(), $vendor)) {
+ $found = true;
break;
}
}
@@ -30,8 +35,8 @@ public function testGetVendor()
}
public function testSerializeUnserialize()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ComposerResource();
- $ser = \unserialize(\serialize($res));
+ $res = new ComposerResource();
+ $ser = unserialize(serialize($res));
$this->assertTrue($res->isFresh(0));
$this->assertTrue($ser->isFresh(0));
$this->assertEquals($res, $ser);
diff --git a/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php b/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php
index e5ad97d4f..2febebdf5 100644
--- a/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php
@@ -12,139 +12,158 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource;
-class DirectoryResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use RecursiveDirectoryIterator;
+use RecursiveIteratorIterator;
+use function array_unique;
+use function file_exists;
+use function is_dir;
+use function mkdir;
+use function mt_rand;
+use function preg_match;
+use function realpath;
+use function rmdir;
+use function serialize;
+use function sleep;
+use function sys_get_temp_dir;
+use function time;
+use function touch;
+use function unlink;
+use function unserialize;
+use const DIRECTORY_SEPARATOR;
+
+class DirectoryResourceTest extends TestCase
{
protected $directory;
protected function setUp()
{
- $this->directory = \sys_get_temp_dir() . \DIRECTORY_SEPARATOR . 'symfonyDirectoryIterator';
- if (!\file_exists($this->directory)) {
- \mkdir($this->directory);
+ $this->directory = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'symfonyDirectoryIterator';
+ if (!file_exists($this->directory)) {
+ mkdir($this->directory);
}
- \touch($this->directory . '/tmp.xml');
+ touch($this->directory . '/tmp.xml');
}
protected function tearDown()
{
- if (!\is_dir($this->directory)) {
+ if (!is_dir($this->directory)) {
return;
}
$this->removeDirectory($this->directory);
}
protected function removeDirectory($directory)
{
- $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory), \RecursiveIteratorIterator::CHILD_FIRST);
+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($directory), RecursiveIteratorIterator::CHILD_FIRST);
foreach ($iterator as $path) {
- if (\preg_match('#[/\\\\]\\.\\.?$#', $path->__toString())) {
+ if (preg_match('#[/\\\\]\\.\\.?$#', $path->__toString())) {
continue;
}
if ($path->isDir()) {
- \rmdir($path->__toString());
+ rmdir($path->__toString());
} else {
- \unlink($path->__toString());
+ unlink($path->__toString());
}
}
- \rmdir($directory);
+ rmdir($directory);
}
public function testGetResource()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
- $this->assertSame(\realpath($this->directory), $resource->getResource(), '->getResource() returns the path to the resource');
+ $resource = new DirectoryResource($this->directory);
+ $this->assertSame(realpath($this->directory), $resource->getResource(), '->getResource() returns the path to the resource');
}
public function testGetPattern()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, 'bar');
+ $resource = new DirectoryResource($this->directory, 'bar');
$this->assertEquals('bar', $resource->getPattern());
}
public function testResourceDoesNotExist()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The directory ".*" does not exist./');
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource('/____foo/foobar' . \mt_rand(1, 999999));
+ new DirectoryResource('/____foo/foobar' . mt_rand(1, 999999));
}
public function testIsFresh()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
- $this->assertTrue($resource->isFresh(\time() + 10), '->isFresh() returns true if the resource has not changed');
- $this->assertFalse($resource->isFresh(\time() - 86400), '->isFresh() returns false if the resource has been updated');
+ $resource = new DirectoryResource($this->directory);
+ $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if the resource has not changed');
+ $this->assertFalse($resource->isFresh(time() - 86400), '->isFresh() returns false if the resource has been updated');
}
public function testIsFreshForDeletedResources()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
+ $resource = new DirectoryResource($this->directory);
$this->removeDirectory($this->directory);
- $this->assertFalse($resource->isFresh(\time()), '->isFresh() returns false if the resource does not exist');
+ $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the resource does not exist');
}
public function testIsFreshUpdateFile()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
- \touch($this->directory . '/tmp.xml', \time() + 20);
- $this->assertFalse($resource->isFresh(\time() + 10), '->isFresh() returns false if an existing file is modified');
+ $resource = new DirectoryResource($this->directory);
+ touch($this->directory . '/tmp.xml', time() + 20);
+ $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an existing file is modified');
}
public function testIsFreshNewFile()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
- \touch($this->directory . '/new.xml', \time() + 20);
- $this->assertFalse($resource->isFresh(\time() + 10), '->isFresh() returns false if a new file is added');
+ $resource = new DirectoryResource($this->directory);
+ touch($this->directory . '/new.xml', time() + 20);
+ $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a new file is added');
}
public function testIsFreshNewFileWithDifferentPattern()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, '/.xml$/');
- \touch($this->directory . '/new.yaml', \time() + 20);
- $this->assertTrue($resource->isFresh(\time() + 10), '->isFresh() returns true if a new file with a non-matching pattern is added');
+ $resource = new DirectoryResource($this->directory, '/.xml$/');
+ touch($this->directory . '/new.yaml', time() + 20);
+ $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if a new file with a non-matching pattern is added');
}
public function testIsFreshDeleteFile()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
- $time = \time();
- \sleep(1);
- \unlink($this->directory . '/tmp.xml');
+ $resource = new DirectoryResource($this->directory);
+ $time = time();
+ sleep(1);
+ unlink($this->directory . '/tmp.xml');
$this->assertFalse($resource->isFresh($time), '->isFresh() returns false if an existing file is removed');
}
public function testIsFreshDeleteDirectory()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
+ $resource = new DirectoryResource($this->directory);
$this->removeDirectory($this->directory);
- $this->assertFalse($resource->isFresh(\time()), '->isFresh() returns false if the whole resource is removed');
+ $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the whole resource is removed');
}
public function testIsFreshCreateFileInSubdirectory()
{
$subdirectory = $this->directory . '/subdirectory';
- \mkdir($subdirectory);
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
- $this->assertTrue($resource->isFresh(\time() + 10), '->isFresh() returns true if an unmodified subdirectory exists');
- \touch($subdirectory . '/newfile.xml', \time() + 20);
- $this->assertFalse($resource->isFresh(\time() + 10), '->isFresh() returns false if a new file in a subdirectory is added');
+ mkdir($subdirectory);
+ $resource = new DirectoryResource($this->directory);
+ $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if an unmodified subdirectory exists');
+ touch($subdirectory . '/newfile.xml', time() + 20);
+ $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a new file in a subdirectory is added');
}
public function testIsFreshModifySubdirectory()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory);
+ $resource = new DirectoryResource($this->directory);
$subdirectory = $this->directory . '/subdirectory';
- \mkdir($subdirectory);
- \touch($subdirectory, \time() + 20);
- $this->assertFalse($resource->isFresh(\time() + 10), '->isFresh() returns false if a subdirectory is modified (e.g. a file gets deleted)');
+ mkdir($subdirectory);
+ touch($subdirectory, time() + 20);
+ $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if a subdirectory is modified (e.g. a file gets deleted)');
}
public function testFilterRegexListNoMatch()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, '/\\.(foo|xml)$/');
- \touch($this->directory . '/new.bar', \time() + 20);
- $this->assertTrue($resource->isFresh(\time() + 10), '->isFresh() returns true if a new file not matching the filter regex is created');
+ $resource = new DirectoryResource($this->directory, '/\\.(foo|xml)$/');
+ touch($this->directory . '/new.bar', time() + 20);
+ $this->assertTrue($resource->isFresh(time() + 10), '->isFresh() returns true if a new file not matching the filter regex is created');
}
public function testFilterRegexListMatch()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, '/\\.(foo|xml)$/');
- \touch($this->directory . '/new.xml', \time() + 20);
- $this->assertFalse($resource->isFresh(\time() + 10), '->isFresh() returns false if an new file matching the filter regex is created ');
+ $resource = new DirectoryResource($this->directory, '/\\.(foo|xml)$/');
+ touch($this->directory . '/new.xml', time() + 20);
+ $this->assertFalse($resource->isFresh(time() + 10), '->isFresh() returns false if an new file matching the filter regex is created ');
}
public function testSerializeUnserialize()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, '/\\.(foo|xml)$/');
- \unserialize(\serialize($resource));
- $this->assertSame(\realpath($this->directory), $resource->getResource());
+ $resource = new DirectoryResource($this->directory, '/\\.(foo|xml)$/');
+ unserialize(serialize($resource));
+ $this->assertSame(realpath($this->directory), $resource->getResource());
$this->assertSame('/\\.(foo|xml)$/', $resource->getPattern());
}
public function testResourcesWithDifferentPatternsAreDifferent()
{
- $resourceA = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, '/.xml$/');
- $resourceB = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($this->directory, '/.yaml$/');
- $this->assertCount(2, \array_unique([$resourceA, $resourceB]));
+ $resourceA = new DirectoryResource($this->directory, '/.xml$/');
+ $resourceB = new DirectoryResource($this->directory, '/.yaml$/');
+ $this->assertCount(2, array_unique([$resourceA, $resourceB]));
}
}
diff --git a/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php b/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php
index e2a3a72ad..74cf0573c 100644
--- a/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php
@@ -12,21 +12,30 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileExistenceResource;
-class FileExistenceResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function file_exists;
+use function realpath;
+use function serialize;
+use function sys_get_temp_dir;
+use function time;
+use function touch;
+use function unlink;
+use function unserialize;
+
+class FileExistenceResourceTest extends TestCase
{
protected $resource;
protected $file;
protected $time;
protected function setUp()
{
- $this->file = \realpath(\sys_get_temp_dir()) . '/tmp.xml';
- $this->time = \time();
- $this->resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileExistenceResource($this->file);
+ $this->file = realpath(sys_get_temp_dir()) . '/tmp.xml';
+ $this->time = time();
+ $this->resource = new FileExistenceResource($this->file);
}
protected function tearDown()
{
- if (\file_exists($this->file)) {
- \unlink($this->file);
+ if (file_exists($this->file)) {
+ unlink($this->file);
}
}
public function testToString()
@@ -39,21 +48,21 @@ public function testGetResource()
}
public function testIsFreshWithExistingResource()
{
- \touch($this->file, $this->time);
- $serialized = \serialize(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileExistenceResource($this->file));
- $resource = \unserialize($serialized);
+ touch($this->file, $this->time);
+ $serialized = serialize(new FileExistenceResource($this->file));
+ $resource = unserialize($serialized);
$this->assertTrue($resource->isFresh($this->time), '->isFresh() returns true if the resource is still present');
- \unlink($this->file);
- $resource = \unserialize($serialized);
+ unlink($this->file);
+ $resource = unserialize($serialized);
$this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been deleted');
}
public function testIsFreshWithAbsentResource()
{
- $serialized = \serialize(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileExistenceResource($this->file));
- $resource = \unserialize($serialized);
+ $serialized = serialize(new FileExistenceResource($this->file));
+ $resource = unserialize($serialized);
$this->assertTrue($resource->isFresh($this->time), '->isFresh() returns true if the resource is still absent');
- \touch($this->file, $this->time);
- $resource = \unserialize($serialized);
+ touch($this->file, $this->time);
+ $resource = unserialize($serialized);
$this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been created');
}
}
diff --git a/vendor/symfony/config/Tests/Resource/FileResourceTest.php b/vendor/symfony/config/Tests/Resource/FileResourceTest.php
index 844fd36e7..0fa8374f2 100644
--- a/vendor/symfony/config/Tests/Resource/FileResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/FileResourceTest.php
@@ -12,43 +12,53 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource;
-class FileResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function file_exists;
+use function mt_rand;
+use function realpath;
+use function serialize;
+use function sys_get_temp_dir;
+use function time;
+use function touch;
+use function unlink;
+use function unserialize;
+
+class FileResourceTest extends TestCase
{
protected $resource;
protected $file;
protected $time;
protected function setUp()
{
- $this->file = \sys_get_temp_dir() . '/tmp.xml';
- $this->time = \time();
- \touch($this->file, $this->time);
- $this->resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource($this->file);
+ $this->file = sys_get_temp_dir() . '/tmp.xml';
+ $this->time = time();
+ touch($this->file, $this->time);
+ $this->resource = new FileResource($this->file);
}
protected function tearDown()
{
- if (!\file_exists($this->file)) {
+ if (!file_exists($this->file)) {
return;
}
- \unlink($this->file);
+ unlink($this->file);
}
public function testGetResource()
{
- $this->assertSame(\realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource');
+ $this->assertSame(realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource');
}
public function testGetResourceWithScheme()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource('file://' . $this->file);
+ $resource = new FileResource('file://' . $this->file);
$this->assertSame('file://' . $this->file, $resource->getResource(), '->getResource() returns the path to the schemed resource');
}
public function testToString()
{
- $this->assertSame(\realpath($this->file), (string) $this->resource);
+ $this->assertSame(realpath($this->file), (string) $this->resource);
}
public function testResourceDoesNotExist()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The file ".*" does not exist./');
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource('/____foo/foobar' . \mt_rand(1, 999999));
+ new FileResource('/____foo/foobar' . mt_rand(1, 999999));
}
public function testIsFresh()
{
@@ -58,12 +68,12 @@ public function testIsFresh()
}
public function testIsFreshForDeletedResources()
{
- \unlink($this->file);
+ unlink($this->file);
$this->assertFalse($this->resource->isFresh($this->time), '->isFresh() returns false if the resource does not exist');
}
public function testSerializeUnserialize()
{
- \unserialize(\serialize($this->resource));
- $this->assertSame(\realpath($this->file), $this->resource->getResource());
+ unserialize(serialize($this->resource));
+ $this->assertSame(realpath($this->file), $this->resource->getResource());
}
}
diff --git a/vendor/symfony/config/Tests/Resource/GlobResourceTest.php b/vendor/symfony/config/Tests/Resource/GlobResourceTest.php
index a9765775a..53e109fb1 100644
--- a/vendor/symfony/config/Tests/Resource/GlobResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/GlobResourceTest.php
@@ -12,77 +12,87 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource;
-class GlobResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use SplFileInfo;
+use function current;
+use function dirname;
+use function iterator_to_array;
+use function mkdir;
+use function rmdir;
+use function touch;
+use function unlink;
+use const DIRECTORY_SEPARATOR;
+
+class GlobResourceTest extends TestCase
{
protected function tearDown()
{
- $dir = \dirname(__DIR__) . '/Fixtures';
- @\rmdir($dir . '/TmpGlob');
- @\unlink($dir . '/TmpGlob');
- @\unlink($dir . '/Resource/TmpGlob');
- \touch($dir . '/Resource/.hiddenFile');
+ $dir = dirname(__DIR__) . '/Fixtures';
+ @rmdir($dir . '/TmpGlob');
+ @unlink($dir . '/TmpGlob');
+ @unlink($dir . '/Resource/TmpGlob');
+ touch($dir . '/Resource/.hiddenFile');
}
public function testIterator()
{
- $dir = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixtures';
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($dir, '/Resource', \true);
- $paths = \iterator_to_array($resource);
- $file = $dir . '/Resource' . \DIRECTORY_SEPARATOR . 'ConditionalClass.php';
- $this->assertEquals([$file => new \SplFileInfo($file)], $paths);
- $this->assertInstanceOf('SplFileInfo', \current($paths));
+ $dir = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Fixtures';
+ $resource = new GlobResource($dir, '/Resource', true);
+ $paths = iterator_to_array($resource);
+ $file = $dir . '/Resource' . DIRECTORY_SEPARATOR . 'ConditionalClass.php';
+ $this->assertEquals([$file => new SplFileInfo($file)], $paths);
+ $this->assertInstanceOf('SplFileInfo', current($paths));
$this->assertSame($dir, $resource->getPrefix());
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($dir, '/**/Resource', \true);
- $paths = \iterator_to_array($resource);
- $file = $dir . \DIRECTORY_SEPARATOR . 'Resource' . \DIRECTORY_SEPARATOR . 'ConditionalClass.php';
+ $resource = new GlobResource($dir, '/**/Resource', true);
+ $paths = iterator_to_array($resource);
+ $file = $dir . DIRECTORY_SEPARATOR . 'Resource' . DIRECTORY_SEPARATOR . 'ConditionalClass.php';
$this->assertEquals([$file => $file], $paths);
- $this->assertInstanceOf('SplFileInfo', \current($paths));
+ $this->assertInstanceOf('SplFileInfo', current($paths));
$this->assertSame($dir, $resource->getPrefix());
}
public function testIsFreshNonRecursiveDetectsNewFile()
{
- $dir = \dirname(__DIR__) . '/Fixtures';
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($dir, '/*', \false);
+ $dir = dirname(__DIR__) . '/Fixtures';
+ $resource = new GlobResource($dir, '/*', false);
$this->assertTrue($resource->isFresh(0));
- \mkdir($dir . '/TmpGlob');
+ mkdir($dir . '/TmpGlob');
$this->assertTrue($resource->isFresh(0));
- \rmdir($dir . '/TmpGlob');
+ rmdir($dir . '/TmpGlob');
$this->assertTrue($resource->isFresh(0));
- \touch($dir . '/TmpGlob');
+ touch($dir . '/TmpGlob');
$this->assertFalse($resource->isFresh(0));
- \unlink($dir . '/TmpGlob');
+ unlink($dir . '/TmpGlob');
$this->assertTrue($resource->isFresh(0));
}
public function testIsFreshNonRecursiveDetectsRemovedFile()
{
- $dir = \dirname(__DIR__) . '/Fixtures';
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($dir, '/*', \false);
- \touch($dir . '/TmpGlob');
- \touch($dir . '/.TmpGlob');
+ $dir = dirname(__DIR__) . '/Fixtures';
+ $resource = new GlobResource($dir, '/*', false);
+ touch($dir . '/TmpGlob');
+ touch($dir . '/.TmpGlob');
$this->assertTrue($resource->isFresh(0));
- \unlink($dir . '/.TmpGlob');
+ unlink($dir . '/.TmpGlob');
$this->assertTrue($resource->isFresh(0));
- \unlink($dir . '/TmpGlob');
+ unlink($dir . '/TmpGlob');
$this->assertFalse($resource->isFresh(0));
}
public function testIsFreshRecursiveDetectsRemovedFile()
{
- $dir = \dirname(__DIR__) . '/Fixtures';
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($dir, '/*', \true);
- \touch($dir . '/Resource/TmpGlob');
+ $dir = dirname(__DIR__) . '/Fixtures';
+ $resource = new GlobResource($dir, '/*', true);
+ touch($dir . '/Resource/TmpGlob');
$this->assertTrue($resource->isFresh(0));
- \unlink($dir . '/Resource/TmpGlob');
+ unlink($dir . '/Resource/TmpGlob');
$this->assertFalse($resource->isFresh(0));
- \touch($dir . '/Resource/TmpGlob');
+ touch($dir . '/Resource/TmpGlob');
$this->assertTrue($resource->isFresh(0));
- \unlink($dir . '/Resource/.hiddenFile');
+ unlink($dir . '/Resource/.hiddenFile');
$this->assertTrue($resource->isFresh(0));
}
public function testIsFreshRecursiveDetectsNewFile()
{
- $dir = \dirname(__DIR__) . '/Fixtures';
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($dir, '/*', \true);
+ $dir = dirname(__DIR__) . '/Fixtures';
+ $resource = new GlobResource($dir, '/*', true);
$this->assertTrue($resource->isFresh(0));
- \touch($dir . '/Resource/TmpGlob');
+ touch($dir . '/Resource/TmpGlob');
$this->assertFalse($resource->isFresh(0));
}
}
diff --git a/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php b/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php
index ab738f0b0..0c9433a77 100644
--- a/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php
+++ b/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php
@@ -14,38 +14,55 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\EventDispatcher\EventSubscriberInterface;
-class ReflectionClassResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use ReflectionClass;
+use function define;
+use function explode;
+use function file_put_contents;
+use function filemtime;
+use function implode;
+use function iterator_to_array;
+use function serialize;
+use function sprintf;
+use function str_replace;
+use function sys_get_temp_dir;
+use function time;
+use function uniqid;
+use function unlink;
+use function unserialize;
+use const PHP_VERSION_ID;
+
+class ReflectionClassResourceTest extends TestCase
{
public function testToString()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass('ErrorException'));
+ $res = new ReflectionClassResource(new ReflectionClass('ErrorException'));
$this->assertSame('reflection.ErrorException', (string) $res);
}
public function testSerializeUnserialize()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\DummyInterface::class));
- $ser = \unserialize(\serialize($res));
+ $res = new ReflectionClassResource(new ReflectionClass(DummyInterface::class));
+ $ser = unserialize(serialize($res));
$this->assertTrue($res->isFresh(0));
$this->assertTrue($ser->isFresh(0));
$this->assertSame((string) $res, (string) $ser);
}
public function testIsFresh()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(__CLASS__));
- $mtime = \filemtime(__FILE__);
+ $res = new ReflectionClassResource(new ReflectionClass(__CLASS__));
+ $mtime = filemtime(__FILE__);
$this->assertTrue($res->isFresh($mtime), '->isFresh() returns true if the resource has not changed in same second');
$this->assertTrue($res->isFresh($mtime + 10), '->isFresh() returns true if the resource has not changed');
$this->assertTrue($res->isFresh($mtime - 86400), '->isFresh() returns true if the resource has not changed');
}
public function testIsFreshForDeletedResources()
{
- $now = \time();
- $tmp = \sys_get_temp_dir() . '/tmp.php';
- \file_put_contents($tmp, 'assertTrue($res->isFresh($now));
- \unlink($tmp);
+ unlink($tmp);
$this->assertFalse($res->isFresh($now), '->isFresh() returns false if the resource does not exist');
}
/**
@@ -79,19 +96,19 @@ public function testHashedSignature($changeExpected, $changedLine, $changedCode,
EOPHP;
static $expectedSignature, $generateSignature;
if (null === $expectedSignature) {
- eval(\sprintf($code, $class = 'Foo' . \str_replace('.', '_', \uniqid('', \true))));
- $r = new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource::class);
+ eval(sprintf($code, $class = 'Foo' . str_replace('.', '_', uniqid('', true))));
+ $r = new ReflectionClass(ReflectionClassResource::class);
$generateSignature = $r->getMethod('generateSignature');
- $generateSignature->setAccessible(\true);
+ $generateSignature->setAccessible(true);
$generateSignature = $generateSignature->getClosure($r->newInstanceWithoutConstructor());
- $expectedSignature = \implode("\n", \iterator_to_array($generateSignature(new \ReflectionClass($class))));
+ $expectedSignature = implode("\n", iterator_to_array($generateSignature(new ReflectionClass($class))));
}
- $code = \explode("\n", $code);
+ $code = explode("\n", $code);
if (null !== $changedCode) {
$code[$changedLine] = $changedCode;
}
- eval(\sprintf(\implode("\n", $code), $class = 'Foo' . \str_replace('.', '_', \uniqid('', \true))));
- $signature = \implode("\n", \iterator_to_array($generateSignature(new \ReflectionClass($class))));
+ eval(sprintf(implode("\n", $code), $class = 'Foo' . str_replace('.', '_', uniqid('', true))));
+ $signature = implode("\n", iterator_to_array($generateSignature(new ReflectionClass($class))));
if ($changeExpected) {
$this->assertNotSame($expectedSignature, $signature);
} else {
@@ -105,7 +122,7 @@ public function provideHashedSignature()
(yield [1, 1, 'abstract class %s']);
(yield [1, 1, 'final class %s']);
(yield [1, 1, 'class %s extends Exception']);
- (yield [1, 1, 'class %s implements ' . \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\DummyInterface::class]);
+ (yield [1, 1, 'class %s implements ' . DummyInterface::class]);
(yield [1, 3, 'const FOO = 456;']);
(yield [1, 3, 'const BAR = 123;']);
(yield [1, 4, '/** pub docblock */']);
@@ -116,10 +133,10 @@ public function provideHashedSignature()
(yield [0, 8, '/** priv docblock */']);
(yield [0, 9, 'private $priv = 123;']);
(yield [1, 10, '/** pub docblock */']);
- if (\PHP_VERSION_ID >= 50600) {
+ if (PHP_VERSION_ID >= 50600) {
(yield [1, 11, 'public function pub(...$arg) {}']);
}
- if (\PHP_VERSION_ID >= 70000) {
+ if (PHP_VERSION_ID >= 70000) {
(yield [1, 11, 'public function pub($arg = null): Foo {}']);
}
(yield [0, 11, "public function pub(\$arg = null) {\nreturn 123;\n}"]);
@@ -127,7 +144,7 @@ public function provideHashedSignature()
(yield [1, 13, 'protected function prot($a = [123]) {}']);
(yield [0, 14, '/** priv docblock */']);
(yield [0, 15, '']);
- if (\PHP_VERSION_ID >= 70400) {
+ if (PHP_VERSION_ID >= 70400) {
// PHP7.4 typed properties without default value are
// undefined, make sure this doesn't throw an error
(yield [1, 5, 'public array $pub;']);
@@ -137,39 +154,39 @@ public function provideHashedSignature()
(yield [1, 17, 'public function ccc($bar = 187) {}']);
(yield [1, 17, 'public function ccc($bar = ANOTHER_ONE_THAT_WILL_NEVER_BE_DEFINED_CCCCCCCCC) {}']);
(yield [1, 17, null, static function () {
- \define('A_CONSTANT_THAT_FOR_SURE_WILL_NEVER_BE_DEFINED_CCCCCC', 'foo');
+ define('A_CONSTANT_THAT_FOR_SURE_WILL_NEVER_BE_DEFINED_CCCCCC', 'foo');
}]);
}
public function testEventSubscriber()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestEventSubscriber::class));
+ $res = new ReflectionClassResource(new ReflectionClass(TestEventSubscriber::class));
$this->assertTrue($res->isFresh(0));
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestEventSubscriber::$subscribedEvents = [123];
+ TestEventSubscriber::$subscribedEvents = [123];
$this->assertFalse($res->isFresh(0));
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestEventSubscriber::class));
+ $res = new ReflectionClassResource(new ReflectionClass(TestEventSubscriber::class));
$this->assertTrue($res->isFresh(0));
}
public function testServiceSubscriber()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestServiceSubscriber::class));
+ $res = new ReflectionClassResource(new ReflectionClass(TestServiceSubscriber::class));
$this->assertTrue($res->isFresh(0));
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestServiceSubscriber::$subscribedServices = [123];
+ TestServiceSubscriber::$subscribedServices = [123];
$this->assertFalse($res->isFresh(0));
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestServiceSubscriber::class));
+ $res = new ReflectionClassResource(new ReflectionClass(TestServiceSubscriber::class));
$this->assertTrue($res->isFresh(0));
}
public function testIgnoresObjectsInSignature()
{
- $res = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestServiceWithStaticProperty::class));
+ $res = new ReflectionClassResource(new ReflectionClass(TestServiceWithStaticProperty::class));
$this->assertTrue($res->isFresh(0));
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestServiceWithStaticProperty::$initializedObject = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\TestServiceWithStaticProperty();
+ TestServiceWithStaticProperty::$initializedObject = new TestServiceWithStaticProperty();
$this->assertTrue($res->isFresh(0));
}
}
interface DummyInterface
{
}
-class TestEventSubscriber implements \_PhpScoper5ea00cc67502b\Symfony\Component\EventDispatcher\EventSubscriberInterface
+class TestEventSubscriber implements EventSubscriberInterface
{
public static $subscribedEvents = [];
public static function getSubscribedEvents()
@@ -177,7 +194,7 @@ public static function getSubscribedEvents()
return self::$subscribedEvents;
}
}
-class TestServiceSubscriber implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface
+class TestServiceSubscriber implements ServiceSubscriberInterface
{
public static $subscribedServices = [];
public static function getSubscribedServices()
diff --git a/vendor/symfony/config/Tests/Resource/ResourceStub.php b/vendor/symfony/config/Tests/Resource/ResourceStub.php
index a39abc45b..b17510658 100644
--- a/vendor/symfony/config/Tests/Resource/ResourceStub.php
+++ b/vendor/symfony/config/Tests/Resource/ResourceStub.php
@@ -11,9 +11,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
-class ResourceStub implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\SelfCheckingResourceInterface
+class ResourceStub implements SelfCheckingResourceInterface
{
- private $fresh = \true;
+ private $fresh = true;
public function setFresh($isFresh)
{
$this->fresh = $isFresh;
diff --git a/vendor/symfony/config/Tests/Resource/index.php b/vendor/symfony/config/Tests/Resource/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Resource/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php b/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php
index 8753de768..e8aef6ce9 100644
--- a/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php
+++ b/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php
@@ -14,25 +14,34 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\ResourceStub;
-class ResourceCheckerConfigCacheTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use ArrayIterator;
+use function file_exists;
+use function file_get_contents;
+use function file_put_contents;
+use function str_replace;
+use function sys_get_temp_dir;
+use function tempnam;
+use function unlink;
+
+class ResourceCheckerConfigCacheTest extends TestCase
{
private $cacheFile = null;
protected function setUp()
{
- $this->cacheFile = \tempnam(\sys_get_temp_dir(), 'config_');
+ $this->cacheFile = tempnam(sys_get_temp_dir(), 'config_');
}
protected function tearDown()
{
$files = [$this->cacheFile, "{$this->cacheFile}.meta"];
foreach ($files as $file) {
- if (\file_exists($file)) {
- \unlink($file);
+ if (file_exists($file)) {
+ unlink($file);
}
}
}
public function testGetPath()
{
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile);
$this->assertSame($this->cacheFile, $cache->getPath());
}
public function testCacheIsNotFreshIfEmpty()
@@ -40,71 +49,71 @@ public function testCacheIsNotFreshIfEmpty()
$checker = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\ResourceCheckerInterface')->getMock()->expects($this->never())->method('supports');
/* If there is nothing in the cache, it needs to be filled (and thus it's not fresh).
It does not matter if you provide checkers or not. */
- \unlink($this->cacheFile);
+ unlink($this->cacheFile);
// remove tempnam() side effect
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile, [$checker]);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]);
$this->assertFalse($cache->isFresh());
}
public function testCacheIsFreshIfNoCheckerProvided()
{
/* For example in prod mode, you may choose not to run any checkers
at all. In that case, the cache should always be considered fresh. */
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile);
$this->assertTrue($cache->isFresh());
}
public function testCacheIsFreshIfEmptyCheckerIteratorProvided()
{
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile, new \ArrayIterator([]));
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, new ArrayIterator([]));
$this->assertTrue($cache->isFresh());
}
public function testResourcesWithoutcheckersAreIgnoredAndConsideredFresh()
{
/* As in the previous test, but this time we have a resource. */
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile);
- $cache->write('', [new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\ResourceStub()]);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile);
+ $cache->write('', [new ResourceStub()]);
$this->assertTrue($cache->isFresh());
// no (matching) ResourceChecker passed
}
public function testIsFreshWithchecker()
{
$checker = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\ResourceCheckerInterface')->getMock();
- $checker->expects($this->once())->method('supports')->willReturn(\true);
- $checker->expects($this->once())->method('isFresh')->willReturn(\true);
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile, [$checker]);
- $cache->write('', [new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\ResourceStub()]);
+ $checker->expects($this->once())->method('supports')->willReturn(true);
+ $checker->expects($this->once())->method('isFresh')->willReturn(true);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]);
+ $cache->write('', [new ResourceStub()]);
$this->assertTrue($cache->isFresh());
}
public function testIsNotFreshWithchecker()
{
$checker = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\ResourceCheckerInterface')->getMock();
- $checker->expects($this->once())->method('supports')->willReturn(\true);
- $checker->expects($this->once())->method('isFresh')->willReturn(\false);
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile, [$checker]);
- $cache->write('', [new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Resource\ResourceStub()]);
+ $checker->expects($this->once())->method('supports')->willReturn(true);
+ $checker->expects($this->once())->method('isFresh')->willReturn(false);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]);
+ $cache->write('', [new ResourceStub()]);
$this->assertFalse($cache->isFresh());
}
public function testCacheIsNotFreshWhenUnserializeFails()
{
$checker = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\ResourceCheckerInterface')->getMock();
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile, [$checker]);
- $cache->write('foo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__FILE__)]);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]);
+ $cache->write('foo', [new FileResource(__FILE__)]);
$metaFile = "{$this->cacheFile}.meta";
- \file_put_contents($metaFile, \str_replace('FileResource', 'ClassNotHere', \file_get_contents($metaFile)));
+ file_put_contents($metaFile, str_replace('FileResource', 'ClassNotHere', file_get_contents($metaFile)));
$this->assertFalse($cache->isFresh());
}
public function testCacheKeepsContent()
{
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile);
$cache->write('FOOBAR');
- $this->assertSame('FOOBAR', \file_get_contents($cache->getPath()));
+ $this->assertSame('FOOBAR', file_get_contents($cache->getPath()));
}
public function testCacheIsNotFreshIfNotExistsMetaFile()
{
$checker = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\ResourceCheckerInterface')->getMock();
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerConfigCache($this->cacheFile, [$checker]);
- $cache->write('foo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__FILE__)]);
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]);
+ $cache->write('foo', [new FileResource(__FILE__)]);
$metaFile = "{$this->cacheFile}.meta";
- \unlink($metaFile);
+ unlink($metaFile);
$this->assertFalse($cache->isFresh());
}
}
diff --git a/vendor/symfony/config/Tests/Util/XmlUtilsTest.php b/vendor/symfony/config/Tests/Util/XmlUtilsTest.php
index dede1d13d..a0fa49230 100644
--- a/vendor/symfony/config/Tests/Util/XmlUtilsTest.php
+++ b/vendor/symfony/config/Tests/Util/XmlUtilsTest.php
@@ -12,144 +12,159 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils;
-class XmlUtilsTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use DOMDocument;
+use Exception;
+use InvalidArgumentException;
+use function chmod;
+use function error_reporting;
+use function file_get_contents;
+use function libxml_clear_errors;
+use function libxml_disable_entity_loader;
+use function libxml_get_errors;
+use function libxml_use_internal_errors;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use const DIRECTORY_SEPARATOR;
+
+class XmlUtilsTest extends TestCase
{
public function testLoadFile()
{
$fixtures = __DIR__ . '/../Fixtures/Util/';
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures);
+ XmlUtils::loadFile($fixtures);
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertStringContainsString('is not a file', $e->getMessage());
}
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'non_existing.xml');
+ XmlUtils::loadFile($fixtures . 'non_existing.xml');
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertStringContainsString('is not a file', $e->getMessage());
}
try {
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('chmod is not supported on Windows');
}
- \chmod($fixtures . 'not_readable.xml', 00);
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'not_readable.xml');
+ chmod($fixtures . 'not_readable.xml', 00);
+ XmlUtils::loadFile($fixtures . 'not_readable.xml');
$this->fail();
- } catch (\InvalidArgumentException $e) {
- \chmod($fixtures . 'not_readable.xml', 0644);
+ } catch (InvalidArgumentException $e) {
+ chmod($fixtures . 'not_readable.xml', 0644);
$this->assertStringContainsString('is not readable', $e->getMessage());
}
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'invalid.xml');
+ XmlUtils::loadFile($fixtures . 'invalid.xml');
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertStringContainsString('ERROR ', $e->getMessage());
}
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'document_type.xml');
+ XmlUtils::loadFile($fixtures . 'document_type.xml');
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertStringContainsString('Document types are not allowed', $e->getMessage());
}
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'invalid_schema.xml', $fixtures . 'schema.xsd');
+ XmlUtils::loadFile($fixtures . 'invalid_schema.xml', $fixtures . 'schema.xsd');
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertStringContainsString('ERROR 1845', $e->getMessage());
}
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'invalid_schema.xml', 'invalid_callback_or_file');
+ XmlUtils::loadFile($fixtures . 'invalid_schema.xml', 'invalid_callback_or_file');
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertStringContainsString('XSD file or callable', $e->getMessage());
}
- $mock = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Util\Validator::class)->getMock();
- $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(\false, \true));
+ $mock = $this->getMockBuilder(Validator::class)->getMock();
+ $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true));
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'valid.xml', [$mock, 'validate']);
+ XmlUtils::loadFile($fixtures . 'valid.xml', [$mock, 'validate']);
$this->fail();
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertRegExp('/The XML file ".+" is not valid\\./', $e->getMessage());
}
- $this->assertInstanceOf('DOMDocument', \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($fixtures . 'valid.xml', [$mock, 'validate']));
- $this->assertSame([], \libxml_get_errors());
+ $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures . 'valid.xml', [$mock, 'validate']));
+ $this->assertSame([], libxml_get_errors());
}
public function testParseWithInvalidValidatorCallable()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Util\\Exception\\InvalidXmlException');
$this->expectExceptionMessage('The XML is not valid');
$fixtures = __DIR__ . '/../Fixtures/Util/';
- $mock = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Tests\Util\Validator::class)->getMock();
- $mock->expects($this->once())->method('validate')->willReturn(\false);
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::parse(\file_get_contents($fixtures . 'valid.xml'), [$mock, 'validate']);
+ $mock = $this->getMockBuilder(Validator::class)->getMock();
+ $mock->expects($this->once())->method('validate')->willReturn(false);
+ XmlUtils::parse(file_get_contents($fixtures . 'valid.xml'), [$mock, 'validate']);
}
public function testLoadFileWithInternalErrorsEnabled()
{
- $internalErrors = \libxml_use_internal_errors(\true);
- $this->assertSame([], \libxml_get_errors());
- $this->assertInstanceOf('DOMDocument', \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile(__DIR__ . '/../Fixtures/Util/invalid_schema.xml'));
- $this->assertSame([], \libxml_get_errors());
- \libxml_clear_errors();
- \libxml_use_internal_errors($internalErrors);
+ $internalErrors = libxml_use_internal_errors(true);
+ $this->assertSame([], libxml_get_errors());
+ $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile(__DIR__ . '/../Fixtures/Util/invalid_schema.xml'));
+ $this->assertSame([], libxml_get_errors());
+ libxml_clear_errors();
+ libxml_use_internal_errors($internalErrors);
}
/**
* @dataProvider getDataForConvertDomToArray
*/
- public function testConvertDomToArray($expected, $xml, $root = \false, $checkPrefix = \true)
+ public function testConvertDomToArray($expected, $xml, $root = false, $checkPrefix = true)
{
- $dom = new \DOMDocument();
+ $dom = new DOMDocument();
$dom->loadXML($root ? $xml : '' . $xml . '');
- $this->assertSame($expected, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::convertDomElementToArray($dom->documentElement, $checkPrefix));
+ $this->assertSame($expected, XmlUtils::convertDomElementToArray($dom->documentElement, $checkPrefix));
}
public function getDataForConvertDomToArray()
{
- return [[null, ''], ['bar', 'bar'], [['bar' => 'foobar'], '', \true], [['foo' => null], ''], [['foo' => 'bar'], 'bar'], [['foo' => ['foo' => 'bar']], ''], [['foo' => ['foo' => 0]], '0'], [['foo' => ['foo' => 'bar']], 'bar'], [['foo' => ['foo' => 'bar', 'value' => 'text']], 'text'], [['foo' => ['attr' => 'bar', 'foo' => 'text']], 'text'], [['foo' => ['bar', 'text']], 'bartext'], [['foo' => [['foo' => 'bar'], ['foo' => 'text']]], ''], [['foo' => ['foo' => ['bar', 'text']]], 'text'], [['foo' => 'bar'], 'bar'], [['foo' => 'text'], 'text'], [['foo' => ['bar' => 'bar', 'value' => 'text']], 'text', \false, \false], [['attr' => 1, 'b' => 'hello'], 'hello2', \true]];
+ return [[null, ''], ['bar', 'bar'], [['bar' => 'foobar'], '', true], [['foo' => null], ''], [['foo' => 'bar'], 'bar'], [['foo' => ['foo' => 'bar']], ''], [['foo' => ['foo' => 0]], '0'], [['foo' => ['foo' => 'bar']], 'bar'], [['foo' => ['foo' => 'bar', 'value' => 'text']], 'text'], [['foo' => ['attr' => 'bar', 'foo' => 'text']], 'text'], [['foo' => ['bar', 'text']], 'bartext'], [['foo' => [['foo' => 'bar'], ['foo' => 'text']]], ''], [['foo' => ['foo' => ['bar', 'text']]], 'text'], [['foo' => 'bar'], 'bar'], [['foo' => 'text'], 'text'], [['foo' => ['bar' => 'bar', 'value' => 'text']], 'text', false, false], [['attr' => 1, 'b' => 'hello'], 'hello2', true]];
}
/**
* @dataProvider getDataForPhpize
*/
public function testPhpize($expected, $value)
{
- $this->assertSame($expected, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value));
+ $this->assertSame($expected, XmlUtils::phpize($value));
}
public function getDataForPhpize()
{
- return [['', ''], [null, 'null'], [\true, 'true'], [\false, 'false'], [null, 'Null'], [\true, 'True'], [\false, 'False'], [0, '0'], [1, '1'], [-1, '-1'], [0777, '0777'], [255, '0xFF'], [100.0, '1e2'], [-120.0, '-1.2E2'], [-10100.1, '-10100.1'], ['-10,100.1', '-10,100.1'], ['1234 5678 9101 1121 3141', '1234 5678 9101 1121 3141'], ['1,2,3,4', '1,2,3,4'], ['11,22,33,44', '11,22,33,44'], ['11,222,333,4', '11,222,333,4'], ['1,222,333,444', '1,222,333,444'], ['11,222,333,444', '11,222,333,444'], ['111,222,333,444', '111,222,333,444'], ['1111,2222,3333,4444,5555', '1111,2222,3333,4444,5555'], ['foo', 'foo'], [6, '0b0110']];
+ return [['', ''], [null, 'null'], [true, 'true'], [false, 'false'], [null, 'Null'], [true, 'True'], [false, 'False'], [0, '0'], [1, '1'], [-1, '-1'], [0777, '0777'], [255, '0xFF'], [100.0, '1e2'], [-120.0, '-1.2E2'], [-10100.1, '-10100.1'], ['-10,100.1', '-10,100.1'], ['1234 5678 9101 1121 3141', '1234 5678 9101 1121 3141'], ['1,2,3,4', '1,2,3,4'], ['11,22,33,44', '11,22,33,44'], ['11,222,333,4', '11,222,333,4'], ['1,222,333,444', '1,222,333,444'], ['11,222,333,444', '11,222,333,444'], ['111,222,333,444', '111,222,333,444'], ['1111,2222,3333,4444,5555', '1111,2222,3333,4444,5555'], ['foo', 'foo'], [6, '0b0110']];
}
public function testLoadEmptyXmlFile()
{
$file = __DIR__ . '/../Fixtures/foo.xml';
$this->expectException('InvalidArgumentException');
- $this->expectExceptionMessage(\sprintf('File "%s" does not contain valid XML, it is empty.', $file));
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($file);
+ $this->expectExceptionMessage(sprintf('File "%s" does not contain valid XML, it is empty.', $file));
+ XmlUtils::loadFile($file);
}
// test for issue https://github.com/symfony/symfony/issues/9731
public function testLoadWrongEmptyXMLWithErrorHandler()
{
- $originalDisableEntities = \libxml_disable_entity_loader(\false);
- $errorReporting = \error_reporting(-1);
- \set_error_handler(function ($errno, $errstr) {
- throw new \Exception($errstr, $errno);
+ $originalDisableEntities = libxml_disable_entity_loader(false);
+ $errorReporting = error_reporting(-1);
+ set_error_handler(function ($errno, $errstr) {
+ throw new Exception($errstr, $errno);
});
$file = __DIR__ . '/../Fixtures/foo.xml';
try {
try {
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($file);
+ XmlUtils::loadFile($file);
$this->fail('An exception should have been raised');
- } catch (\InvalidArgumentException $e) {
- $this->assertEquals(\sprintf('File "%s" does not contain valid XML, it is empty.', $file), $e->getMessage());
+ } catch (InvalidArgumentException $e) {
+ $this->assertEquals(sprintf('File "%s" does not contain valid XML, it is empty.', $file), $e->getMessage());
}
} finally {
- \restore_error_handler();
- \error_reporting($errorReporting);
+ restore_error_handler();
+ error_reporting($errorReporting);
}
- $disableEntities = \libxml_disable_entity_loader(\true);
- \libxml_disable_entity_loader($disableEntities);
- \libxml_disable_entity_loader($originalDisableEntities);
+ $disableEntities = libxml_disable_entity_loader(true);
+ libxml_disable_entity_loader($disableEntities);
+ libxml_disable_entity_loader($originalDisableEntities);
$this->assertFalse($disableEntities);
// should not throw an exception
- \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile(__DIR__ . '/../Fixtures/Util/valid.xml', __DIR__ . '/../Fixtures/Util/schema.xsd');
+ XmlUtils::loadFile(__DIR__ . '/../Fixtures/Util/valid.xml', __DIR__ . '/../Fixtures/Util/schema.xsd');
}
}
interface Validator
diff --git a/vendor/symfony/config/Tests/Util/index.php b/vendor/symfony/config/Tests/Util/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/Util/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Tests/index.php b/vendor/symfony/config/Tests/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Tests/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Util/Exception/InvalidXmlException.php b/vendor/symfony/config/Util/Exception/InvalidXmlException.php
index e2bc9a0f4..c51608150 100644
--- a/vendor/symfony/config/Util/Exception/InvalidXmlException.php
+++ b/vendor/symfony/config/Util/Exception/InvalidXmlException.php
@@ -16,6 +16,6 @@
*
* @author Ole Rößner
*/
-class InvalidXmlException extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException
+class InvalidXmlException extends XmlParsingException
{
}
diff --git a/vendor/symfony/config/Util/Exception/XmlParsingException.php b/vendor/symfony/config/Util/Exception/XmlParsingException.php
index d8e427020..143387a73 100644
--- a/vendor/symfony/config/Util/Exception/XmlParsingException.php
+++ b/vendor/symfony/config/Util/Exception/XmlParsingException.php
@@ -10,11 +10,13 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception;
+use InvalidArgumentException;
+
/**
* Exception class for when XML cannot be parsed properly.
*
* @author Ole Rößner
*/
-class XmlParsingException extends \InvalidArgumentException
+class XmlParsingException extends InvalidArgumentException
{
}
diff --git a/vendor/symfony/config/Util/Exception/index.php b/vendor/symfony/config/Util/Exception/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Util/Exception/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/Util/XmlUtils.php b/vendor/symfony/config/Util/XmlUtils.php
index 0f18189bc..49acac880 100644
--- a/vendor/symfony/config/Util/XmlUtils.php
+++ b/vendor/symfony/config/Util/XmlUtils.php
@@ -12,6 +12,45 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\InvalidXmlException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException;
+use DOMComment;
+use DOMDocument;
+use DOMElement;
+use DOMText;
+use Exception;
+use InvalidArgumentException;
+use RuntimeException;
+use function bindec;
+use function call_user_func;
+use function count;
+use function ctype_digit;
+use function defined;
+use function extension_loaded;
+use function file_get_contents;
+use function hexdec;
+use function implode;
+use function in_array;
+use function is_array;
+use function is_callable;
+use function is_file;
+use function is_int;
+use function is_numeric;
+use function is_readable;
+use function key;
+use function libxml_clear_errors;
+use function libxml_disable_entity_loader;
+use function libxml_get_errors;
+use function libxml_use_internal_errors;
+use function octdec;
+use function preg_match;
+use function sprintf;
+use function strtolower;
+use function substr;
+use function trim;
+use const LIBXML_COMPACT;
+use const LIBXML_ERR_WARNING;
+use const LIBXML_NONET;
+use const XML_DOCUMENT_TYPE_NODE;
+
/**
* XMLUtils is a bunch of utility methods to XML operations.
*
@@ -35,61 +74,61 @@ private function __construct()
* @param string $content An XML string
* @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation
*
- * @return \DOMDocument
+ * @return DOMDocument
*
* @throws XmlParsingException When parsing of XML file returns error
* @throws InvalidXmlException When parsing of XML with schema or callable produces any errors unrelated to the XML parsing itself
- * @throws \RuntimeException When DOM extension is missing
+ * @throws RuntimeException When DOM extension is missing
*/
public static function parse($content, $schemaOrCallable = null)
{
- if (!\extension_loaded('dom')) {
- throw new \RuntimeException('Extension DOM is required.');
+ if (!extension_loaded('dom')) {
+ throw new RuntimeException('Extension DOM is required.');
}
- $internalErrors = \libxml_use_internal_errors(\true);
- $disableEntities = \libxml_disable_entity_loader(\true);
- \libxml_clear_errors();
- $dom = new \DOMDocument();
- $dom->validateOnParse = \true;
- if (!$dom->loadXML($content, \LIBXML_NONET | (\defined('LIBXML_COMPACT') ? \LIBXML_COMPACT : 0))) {
- \libxml_disable_entity_loader($disableEntities);
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException(\implode("\n", static::getXmlErrors($internalErrors)));
+ $internalErrors = libxml_use_internal_errors(true);
+ $disableEntities = libxml_disable_entity_loader(true);
+ libxml_clear_errors();
+ $dom = new DOMDocument();
+ $dom->validateOnParse = true;
+ if (!$dom->loadXML($content, LIBXML_NONET | (defined('LIBXML_COMPACT') ? LIBXML_COMPACT : 0))) {
+ libxml_disable_entity_loader($disableEntities);
+ throw new XmlParsingException(implode("\n", static::getXmlErrors($internalErrors)));
}
$dom->normalizeDocument();
- \libxml_use_internal_errors($internalErrors);
- \libxml_disable_entity_loader($disableEntities);
+ libxml_use_internal_errors($internalErrors);
+ libxml_disable_entity_loader($disableEntities);
foreach ($dom->childNodes as $child) {
- if (\XML_DOCUMENT_TYPE_NODE === $child->nodeType) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException('Document types are not allowed.');
+ if (XML_DOCUMENT_TYPE_NODE === $child->nodeType) {
+ throw new XmlParsingException('Document types are not allowed.');
}
}
if (null !== $schemaOrCallable) {
- $internalErrors = \libxml_use_internal_errors(\true);
- \libxml_clear_errors();
+ $internalErrors = libxml_use_internal_errors(true);
+ libxml_clear_errors();
$e = null;
- if (\is_callable($schemaOrCallable)) {
+ if (is_callable($schemaOrCallable)) {
try {
- $valid = \call_user_func($schemaOrCallable, $dom, $internalErrors);
- } catch (\Exception $e) {
- $valid = \false;
+ $valid = call_user_func($schemaOrCallable, $dom, $internalErrors);
+ } catch (Exception $e) {
+ $valid = false;
}
- } elseif (!\is_array($schemaOrCallable) && \is_file((string) $schemaOrCallable)) {
- $schemaSource = \file_get_contents((string) $schemaOrCallable);
+ } elseif (!is_array($schemaOrCallable) && is_file((string) $schemaOrCallable)) {
+ $schemaSource = file_get_contents((string) $schemaOrCallable);
$valid = @$dom->schemaValidateSource($schemaSource);
} else {
- \libxml_use_internal_errors($internalErrors);
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException('The schemaOrCallable argument has to be a valid path to XSD file or callable.');
+ libxml_use_internal_errors($internalErrors);
+ throw new XmlParsingException('The schemaOrCallable argument has to be a valid path to XSD file or callable.');
}
if (!$valid) {
$messages = static::getXmlErrors($internalErrors);
if (empty($messages)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\InvalidXmlException('The XML is not valid.', 0, $e);
+ throw new InvalidXmlException('The XML is not valid.', 0, $e);
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException(\implode("\n", $messages), 0, $e);
+ throw new XmlParsingException(implode("\n", $messages), 0, $e);
}
}
- \libxml_clear_errors();
- \libxml_use_internal_errors($internalErrors);
+ libxml_clear_errors();
+ libxml_use_internal_errors($internalErrors);
return $dom;
}
/**
@@ -98,28 +137,28 @@ public static function parse($content, $schemaOrCallable = null)
* @param string $file An XML file path
* @param string|callable|null $schemaOrCallable An XSD schema file path, a callable, or null to disable validation
*
- * @return \DOMDocument
+ * @return DOMDocument
*
- * @throws \InvalidArgumentException When loading of XML file returns error
+ * @throws InvalidArgumentException When loading of XML file returns error
* @throws XmlParsingException When XML parsing returns any errors
- * @throws \RuntimeException When DOM extension is missing
+ * @throws RuntimeException When DOM extension is missing
*/
public static function loadFile($file, $schemaOrCallable = null)
{
- if (!\is_file($file)) {
- throw new \InvalidArgumentException(\sprintf('Resource "%s" is not a file.', $file));
+ if (!is_file($file)) {
+ throw new InvalidArgumentException(sprintf('Resource "%s" is not a file.', $file));
}
- if (!\is_readable($file)) {
- throw new \InvalidArgumentException(\sprintf('File "%s" is not readable.', $file));
+ if (!is_readable($file)) {
+ throw new InvalidArgumentException(sprintf('File "%s" is not readable.', $file));
}
- $content = @\file_get_contents($file);
- if ('' === \trim($content)) {
- throw new \InvalidArgumentException(\sprintf('File "%s" does not contain valid XML, it is empty.', $file));
+ $content = @file_get_contents($file);
+ if ('' === trim($content)) {
+ throw new InvalidArgumentException(sprintf('File "%s" does not contain valid XML, it is empty.', $file));
}
try {
return static::parse($content, $schemaOrCallable);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\InvalidXmlException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\Exception\XmlParsingException(\sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious());
+ } catch (InvalidXmlException $e) {
+ throw new XmlParsingException(sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious());
}
}
/**
@@ -137,49 +176,49 @@ public static function loadFile($file, $schemaOrCallable = null)
*
* * The nested-tags are converted to keys (bar)
*
- * @param \DOMElement $element A \DOMElement instance
+ * @param DOMElement $element A \DOMElement instance
* @param bool $checkPrefix Check prefix in an element or an attribute name
*
* @return mixed
*/
- public static function convertDomElementToArray(\DOMElement $element, $checkPrefix = \true)
+ public static function convertDomElementToArray(DOMElement $element, $checkPrefix = true)
{
$prefix = (string) $element->prefix;
- $empty = \true;
+ $empty = true;
$config = [];
foreach ($element->attributes as $name => $node) {
- if ($checkPrefix && !\in_array((string) $node->prefix, ['', $prefix], \true)) {
+ if ($checkPrefix && !in_array((string) $node->prefix, ['', $prefix], true)) {
continue;
}
$config[$name] = static::phpize($node->value);
- $empty = \false;
+ $empty = false;
}
- $nodeValue = \false;
+ $nodeValue = false;
foreach ($element->childNodes as $node) {
- if ($node instanceof \DOMText) {
- if ('' !== \trim($node->nodeValue)) {
- $nodeValue = \trim($node->nodeValue);
- $empty = \false;
+ if ($node instanceof DOMText) {
+ if ('' !== trim($node->nodeValue)) {
+ $nodeValue = trim($node->nodeValue);
+ $empty = false;
}
} elseif ($checkPrefix && $prefix != (string) $node->prefix) {
continue;
- } elseif (!$node instanceof \DOMComment) {
+ } elseif (!$node instanceof DOMComment) {
$value = static::convertDomElementToArray($node, $checkPrefix);
$key = $node->localName;
if (isset($config[$key])) {
- if (!\is_array($config[$key]) || !\is_int(\key($config[$key]))) {
+ if (!is_array($config[$key]) || !is_int(key($config[$key]))) {
$config[$key] = [$config[$key]];
}
$config[$key][] = $value;
} else {
$config[$key] = $value;
}
- $empty = \false;
+ $empty = false;
}
}
- if (\false !== $nodeValue) {
+ if (false !== $nodeValue) {
$value = static::phpize($nodeValue);
- if (\count($config)) {
+ if (count($config)) {
$config['value'] = $value;
} else {
$config = $value;
@@ -197,29 +236,29 @@ public static function convertDomElementToArray(\DOMElement $element, $checkPref
public static function phpize($value)
{
$value = (string) $value;
- $lowercaseValue = \strtolower($value);
- switch (\true) {
+ $lowercaseValue = strtolower($value);
+ switch (true) {
case 'null' === $lowercaseValue:
return null;
- case \ctype_digit($value):
+ case ctype_digit($value):
$raw = $value;
$cast = (int) $value;
- return '0' == $value[0] ? \octdec($value) : ((string) $raw === (string) $cast ? $cast : $raw);
- case isset($value[1]) && '-' === $value[0] && \ctype_digit(\substr($value, 1)):
+ return '0' == $value[0] ? octdec($value) : ((string) $raw === (string) $cast ? $cast : $raw);
+ case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)):
$raw = $value;
$cast = (int) $value;
- return '0' == $value[1] ? \octdec($value) : ((string) $raw === (string) $cast ? $cast : $raw);
+ return '0' == $value[1] ? octdec($value) : ((string) $raw === (string) $cast ? $cast : $raw);
case 'true' === $lowercaseValue:
- return \true;
+ return true;
case 'false' === $lowercaseValue:
- return \false;
- case isset($value[1]) && '0b' == $value[0] . $value[1] && \preg_match('/^0b[01]*$/', $value):
- return \bindec($value);
- case \is_numeric($value):
- return '0x' === $value[0] . $value[1] ? \hexdec($value) : (float) $value;
- case \preg_match('/^0x[0-9a-f]++$/i', $value):
- return \hexdec($value);
- case \preg_match('/^[+-]?[0-9]+(\\.[0-9]+)?$/', $value):
+ return false;
+ case isset($value[1]) && '0b' == $value[0] . $value[1] && preg_match('/^0b[01]*$/', $value):
+ return bindec($value);
+ case is_numeric($value):
+ return '0x' === $value[0] . $value[1] ? hexdec($value) : (float) $value;
+ case preg_match('/^0x[0-9a-f]++$/i', $value):
+ return hexdec($value);
+ case preg_match('/^[+-]?[0-9]+(\\.[0-9]+)?$/', $value):
return (float) $value;
default:
return $value;
@@ -228,11 +267,11 @@ public static function phpize($value)
protected static function getXmlErrors($internalErrors)
{
$errors = [];
- foreach (\libxml_get_errors() as $error) {
- $errors[] = \sprintf('[%s %s] %s (in %s - line %d, column %d)', \LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', $error->code, \trim($error->message), $error->file ?: 'n/a', $error->line, $error->column);
+ foreach (libxml_get_errors() as $error) {
+ $errors[] = sprintf('[%s %s] %s (in %s - line %d, column %d)', LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR', $error->code, trim($error->message), $error->file ?: 'n/a', $error->line, $error->column);
}
- \libxml_clear_errors();
- \libxml_use_internal_errors($internalErrors);
+ libxml_clear_errors();
+ libxml_use_internal_errors($internalErrors);
return $errors;
}
}
diff --git a/vendor/symfony/config/Util/index.php b/vendor/symfony/config/Util/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/Util/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/config/index.php b/vendor/symfony/config/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/config/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Alias.php b/vendor/symfony/dependency-injection/Alias.php
index c82c214fe..91adbaa32 100644
--- a/vendor/symfony/dependency-injection/Alias.php
+++ b/vendor/symfony/dependency-injection/Alias.php
@@ -10,6 +10,8 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection;
+use function func_num_args;
+
class Alias
{
private $id;
@@ -19,11 +21,11 @@ class Alias
* @param string $id Alias identifier
* @param bool $public If this alias is public
*/
- public function __construct($id, $public = \true)
+ public function __construct($id, $public = true)
{
$this->id = (string) $id;
$this->public = $public;
- $this->private = 2 > \func_num_args();
+ $this->private = 2 > func_num_args();
}
/**
* Checks if this DI Alias should be public or not.
@@ -44,7 +46,7 @@ public function isPublic()
public function setPublic($boolean)
{
$this->public = (bool) $boolean;
- $this->private = \false;
+ $this->private = false;
return $this;
}
/**
diff --git a/vendor/symfony/dependency-injection/Argument/BoundArgument.php b/vendor/symfony/dependency-injection/Argument/BoundArgument.php
index 41fea5b5e..994a4b26c 100644
--- a/vendor/symfony/dependency-injection/Argument/BoundArgument.php
+++ b/vendor/symfony/dependency-injection/Argument/BoundArgument.php
@@ -13,7 +13,7 @@
/**
* @author Guilhem Niot
*/
-final class BoundArgument implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface
+final class BoundArgument implements ArgumentInterface
{
private static $sequence = 0;
private $value;
diff --git a/vendor/symfony/dependency-injection/Argument/IteratorArgument.php b/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
index 8a95f3866..2729b5348 100644
--- a/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
+++ b/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
@@ -12,12 +12,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function get_class;
+use function gettype;
+use function is_object;
+use function sprintf;
+
/**
* Represents a collection of values to lazily iterate over.
*
* @author Titouan Galopin
*/
-class IteratorArgument implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface
+class IteratorArgument implements ArgumentInterface
{
private $values;
/**
@@ -40,8 +45,8 @@ public function getValues()
public function setValues(array $values)
{
foreach ($values as $k => $v) {
- if (null !== $v && !$v instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('An IteratorArgument must hold only Reference instances, "%s" given.', \is_object($v) ? \get_class($v) : \gettype($v)));
+ if (null !== $v && !$v instanceof Reference) {
+ throw new InvalidArgumentException(sprintf('An IteratorArgument must hold only Reference instances, "%s" given.', is_object($v) ? get_class($v) : gettype($v)));
}
}
$this->values = $values;
diff --git a/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php b/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
index 1b92f074e..466f15617 100644
--- a/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
+++ b/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
@@ -10,10 +10,14 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument;
+use Countable;
+use IteratorAggregate;
+use function is_callable;
+
/**
* @internal
*/
-class RewindableGenerator implements \IteratorAggregate, \Countable
+class RewindableGenerator implements IteratorAggregate, Countable
{
private $generator;
private $count;
@@ -32,7 +36,7 @@ public function getIterator()
}
public function count()
{
- if (\is_callable($count = $this->count)) {
+ if (is_callable($count = $this->count)) {
$this->count = $count();
}
return $this->count;
diff --git a/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php b/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
index 820ade829..25c75a330 100644
--- a/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
+++ b/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
@@ -12,15 +12,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function array_keys;
+
/**
* Represents a service wrapped in a memoizing closure.
*
* @author Nicolas Grekas
*/
-class ServiceClosureArgument implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface
+class ServiceClosureArgument implements ArgumentInterface
{
private $values;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference $reference)
+ public function __construct(Reference $reference)
{
$this->values = [$reference];
}
@@ -36,8 +38,8 @@ public function getValues()
*/
public function setValues(array $values)
{
- if ([0] !== \array_keys($values) || !($values[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference || null === $values[0])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.');
+ if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) {
+ throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.');
}
$this->values = $values;
}
diff --git a/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php b/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
index b2cc963b5..03a87d996 100644
--- a/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
+++ b/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
@@ -15,7 +15,7 @@
*
* @author Roland Franssen
*/
-class TaggedIteratorArgument extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument
+class TaggedIteratorArgument extends IteratorArgument
{
private $tag;
/**
diff --git a/vendor/symfony/dependency-injection/Argument/index.php b/vendor/symfony/dependency-injection/Argument/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Argument/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/ChildDefinition.php b/vendor/symfony/dependency-injection/ChildDefinition.php
index 70b6dc1ed..60d28c560 100644
--- a/vendor/symfony/dependency-injection/ChildDefinition.php
+++ b/vendor/symfony/dependency-injection/ChildDefinition.php
@@ -13,12 +13,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
+use function array_key_exists;
+use function class_alias;
+use function is_int;
+use function strpos;
+
/**
* This definition extends another definition.
*
* @author Johannes M. Schmitt
*/
-class ChildDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition
+class ChildDefinition extends Definition
{
private $parent;
/**
@@ -27,7 +32,7 @@ class ChildDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\Depende
public function __construct($parent)
{
$this->parent = $parent;
- $this->setPrivate(\false);
+ $this->setPrivate(false);
}
/**
* Returns the Definition to inherit from.
@@ -64,7 +69,7 @@ public function setParent($parent)
*/
public function getArgument($index)
{
- if (\array_key_exists('index_' . $index, $this->arguments)) {
+ if (array_key_exists('index_' . $index, $this->arguments)) {
return $this->arguments['index_' . $index];
}
return parent::getArgument($index);
@@ -86,12 +91,12 @@ public function getArgument($index)
*/
public function replaceArgument($index, $value)
{
- if (\is_int($index)) {
+ if (is_int($index)) {
$this->arguments['index_' . $index] = $value;
- } elseif (0 === \strpos($index, '$')) {
+ } elseif (0 === strpos($index, '$')) {
$this->arguments[$index] = $value;
} else {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.');
+ throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.');
}
return $this;
}
@@ -100,14 +105,14 @@ public function replaceArgument($index, $value)
*/
public function setAutoconfigured($autoconfigured)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException('A ChildDefinition cannot be autoconfigured.');
+ throw new BadMethodCallException('A ChildDefinition cannot be autoconfigured.');
}
/**
* @internal
*/
public function setInstanceofConditionals(array $instanceof)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException('A ChildDefinition cannot have instanceof conditionals set on it.');
+ throw new BadMethodCallException('A ChildDefinition cannot have instanceof conditionals set on it.');
}
}
-\class_alias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator::class);
+class_alias(ChildDefinition::class, DefinitionDecorator::class);
diff --git a/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php b/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
index acd0283fd..9bbe2131d 100644
--- a/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
+++ b/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
@@ -15,10 +15,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use ReflectionException;
+use ReflectionFunction;
+use ReflectionFunctionAbstract;
+use function file_exists;
+use function function_exists;
+use function is_array;
+use function is_string;
+use function lcfirst;
+use function rtrim;
+use function sprintf;
+
/**
* @author Nicolas Grekas
*/
-abstract class AbstractRecursivePass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+abstract class AbstractRecursivePass implements CompilerPassInterface
{
/**
* @var ContainerBuilder
@@ -28,11 +39,11 @@ abstract class AbstractRecursivePass implements \_PhpScoper5ea00cc67502b\Symfony
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$this->container = $container;
try {
- $this->processValue($container->getDefinitions(), \true);
+ $this->processValue($container->getDefinitions(), true);
} finally {
$this->container = null;
}
@@ -45,9 +56,9 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
*
* @return mixed The processed value
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (\is_array($value)) {
+ if (is_array($value)) {
foreach ($value as $k => $v) {
if ($isRoot) {
$this->currentId = $k;
@@ -56,9 +67,9 @@ protected function processValue($value, $isRoot = \false)
$value[$k] = $processedValue;
}
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
+ } elseif ($value instanceof ArgumentInterface) {
$value->setValues($this->processValue($value->getValues()));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($value instanceof Definition) {
$value->setArguments($this->processValue($value->getArguments()));
$value->setProperties($this->processValue($value->getProperties()));
$value->setMethodCalls($this->processValue($value->getMethodCalls()));
@@ -75,51 +86,51 @@ protected function processValue($value, $isRoot = \false)
/**
* @param bool $required
*
- * @return \ReflectionFunctionAbstract|null
+ * @return ReflectionFunctionAbstract|null
*
* @throws RuntimeException
*/
- protected function getConstructor(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $required)
+ protected function getConstructor(Definition $definition, $required)
{
if ($definition->isSynthetic()) {
return null;
}
- if (\is_string($factory = $definition->getFactory())) {
- if (!\function_exists($factory)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": function "%s" does not exist.', $this->currentId, $factory));
+ if (is_string($factory = $definition->getFactory())) {
+ if (!function_exists($factory)) {
+ throw new RuntimeException(sprintf('Invalid service "%s": function "%s" does not exist.', $this->currentId, $factory));
}
- $r = new \ReflectionFunction($factory);
- if (\false !== $r->getFileName() && \file_exists($r->getFileName())) {
+ $r = new ReflectionFunction($factory);
+ if (false !== $r->getFileName() && file_exists($r->getFileName())) {
$this->container->fileExists($r->getFileName());
}
return $r;
}
if ($factory) {
- list($class, $method) = $factory;
- if ($class instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ [$class, $method] = $factory;
+ if ($class instanceof Reference) {
$class = $this->container->findDefinition((string) $class)->getClass();
} elseif (null === $class) {
$class = $definition->getClass();
}
if ('__construct' === $method) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": "__construct()" cannot be used as a factory method.', $this->currentId));
+ throw new RuntimeException(sprintf('Invalid service "%s": "__construct()" cannot be used as a factory method.', $this->currentId));
}
- return $this->getReflectionMethod(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition($class), $method);
+ return $this->getReflectionMethod(new Definition($class), $method);
}
$class = $definition->getClass();
try {
if (!($r = $this->container->getReflectionClass($class))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
+ throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
}
- } catch (\ReflectionException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": %s.', $this->currentId, \lcfirst(\rtrim($e->getMessage(), '.'))));
+ } catch (ReflectionException $e) {
+ throw new RuntimeException(sprintf('Invalid service "%s": %s.', $this->currentId, lcfirst(rtrim($e->getMessage(), '.'))));
}
if (!($r = $r->getConstructor())) {
if ($required) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, \sprintf($class !== $this->currentId ? ' "%s"' : '', $class)));
+ throw new RuntimeException(sprintf('Invalid service "%s": class%s has no constructor.', $this->currentId, sprintf($class !== $this->currentId ? ' "%s"' : '', $class)));
}
} elseif (!$r->isPublic()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": %s must be public.', $this->currentId, \sprintf($class !== $this->currentId ? 'constructor of class "%s"' : 'its constructor', $class)));
+ throw new RuntimeException(sprintf('Invalid service "%s": %s must be public.', $this->currentId, sprintf($class !== $this->currentId ? 'constructor of class "%s"' : 'its constructor', $class)));
}
return $r;
}
@@ -128,25 +139,25 @@ protected function getConstructor(\_PhpScoper5ea00cc67502b\Symfony\Component\Dep
*
* @throws RuntimeException
*
- * @return \ReflectionFunctionAbstract
+ * @return ReflectionFunctionAbstract
*/
- protected function getReflectionMethod(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $method)
+ protected function getReflectionMethod(Definition $definition, $method)
{
if ('__construct' === $method) {
- return $this->getConstructor($definition, \true);
+ return $this->getConstructor($definition, true);
}
if (!($class = $definition->getClass())) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": the class is not set.', $this->currentId));
+ throw new RuntimeException(sprintf('Invalid service "%s": the class is not set.', $this->currentId));
}
if (!($r = $this->container->getReflectionClass($class))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
+ throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
}
if (!$r->hasMethod($method)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": method "%s()" does not exist.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method));
+ throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" does not exist.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method));
}
$r = $r->getMethod($method);
if (!$r->isPublic()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid service "%s": method "%s()" must be public.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method));
+ throw new RuntimeException(sprintf('Invalid service "%s": method "%s()" must be public.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method));
}
return $r;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
index 24bfb25e1..aa0b399b2 100644
--- a/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
@@ -18,6 +18,12 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ExpressionLanguage;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
+use function class_exists;
+use function sprintf;
+use function stripcslashes;
+use function substr;
+use function substr_replace;
+
/**
* Run this pass before passes that need to know more about the relation of
* your services.
@@ -27,7 +33,7 @@
*
* @author Johannes M. Schmitt
*/
-class AnalyzeServiceReferencesPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatablePassInterface
+class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements RepeatablePassInterface
{
private $graph;
private $currentDefinition;
@@ -39,7 +45,7 @@ class AnalyzeServiceReferencesPass extends \_PhpScoper5ea00cc67502b\Symfony\Comp
/**
* @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls
*/
- public function __construct($onlyConstructorArguments = \false, $hasProxyDumper = \true)
+ public function __construct($onlyConstructorArguments = false, $hasProxyDumper = true)
{
$this->onlyConstructorArguments = (bool) $onlyConstructorArguments;
$this->hasProxyDumper = (bool) $hasProxyDumper;
@@ -47,46 +53,46 @@ public function __construct($onlyConstructorArguments = \false, $hasProxyDumper
/**
* {@inheritdoc}
*/
- public function setRepeatedPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass $repeatedPass)
+ public function setRepeatedPass(RepeatedPass $repeatedPass)
{
// no-op for BC
}
/**
* Processes a ContainerBuilder object to populate the service reference graph.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$this->container = $container;
$this->graph = $container->getCompiler()->getServiceReferenceGraph();
$this->graph->clear();
- $this->lazy = \false;
- $this->byConstructor = \false;
+ $this->lazy = false;
+ $this->byConstructor = false;
foreach ($container->getAliases() as $id => $alias) {
$targetId = $this->getDefinitionId((string) $alias);
$this->graph->connect($id, $alias, $targetId, $this->getDefinition($targetId), null);
}
parent::process($container);
}
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
$lazy = $this->lazy;
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
- $this->lazy = \true;
+ if ($value instanceof ArgumentInterface) {
+ $this->lazy = true;
parent::processValue($value->getValues());
$this->lazy = $lazy;
return $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression) {
+ if ($value instanceof Expression) {
$this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
return $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ if ($value instanceof Reference) {
$targetId = $this->getDefinitionId((string) $value);
$targetDefinition = $this->getDefinition($targetId);
- $this->graph->connect($this->currentId, $this->currentDefinition, $targetId, $targetDefinition, $value, $this->lazy || $this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy(), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), $this->byConstructor);
+ $this->graph->connect($this->currentId, $this->currentDefinition, $targetId, $targetDefinition, $value, $this->lazy || $this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy(), ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), $this->byConstructor);
return $value;
}
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
if ($isRoot) {
@@ -97,7 +103,7 @@ protected function processValue($value, $isRoot = \false)
} elseif ($this->currentDefinition === $value) {
return $value;
}
- $this->lazy = \false;
+ $this->lazy = false;
$byConstructor = $this->byConstructor;
$this->byConstructor = $isRoot || $byConstructor;
$this->processValue($value->getFactory());
@@ -135,17 +141,17 @@ private function getDefinitionId($id)
private function getExpressionLanguage()
{
if (null === $this->expressionLanguage) {
- if (!\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ExpressionLanguage::class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
+ if (!class_exists(ExpressionLanguage::class)) {
+ throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
}
$providers = $this->container->getExpressionLanguageProviders();
- $this->expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ExpressionLanguage(null, $providers, function ($arg) {
- if ('""' === \substr_replace($arg, '', 1, -1)) {
- $id = \stripcslashes(\substr($arg, 1, -1));
+ $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) {
+ if ('""' === substr_replace($arg, '', 1, -1)) {
+ $id = stripcslashes(substr($arg, 1, -1));
$id = $this->getDefinitionId($id);
$this->graph->connect($this->currentId, $this->currentDefinition, $id, $this->getDefinition($id));
}
- return \sprintf('$this->get(%s)', $arg);
+ return sprintf('$this->get(%s)', $arg);
});
}
return $this->expressionLanguage;
diff --git a/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php b/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
index 0523b4f53..4b06ba513 100644
--- a/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
+++ b/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
@@ -13,24 +13,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function sprintf;
+
/**
* Sets a service to be an alias of another one, given a format pattern.
*/
-class AutoAliasServicePass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class AutoAliasServicePass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) {
foreach ($tags as $tag) {
if (!isset($tag['format'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId));
+ throw new InvalidArgumentException(sprintf('Missing tag information "format" on auto_alias service "%s".', $serviceId));
}
$aliasId = $container->getParameterBag()->resolveValue($tag['format']);
if ($container->hasDefinition($aliasId) || $container->hasAlias($aliasId)) {
- $container->setAlias($serviceId, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias($aliasId, \true));
+ $container->setAlias($serviceId, new Alias($aliasId, true));
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php
index 64d7aba97..62bf49a77 100644
--- a/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php
@@ -10,8 +10,11 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
-@\trigger_error('The ' . __NAMESPACE__ . '\\AutowireExceptionPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the DefinitionErrorExceptionPass class instead.', \E_USER_DEPRECATED);
+@trigger_error('The ' . __NAMESPACE__ . '\\AutowireExceptionPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the DefinitionErrorExceptionPass class instead.', E_USER_DEPRECATED);
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Throws autowire exceptions from AutowirePass for definitions that still exist.
*
@@ -19,16 +22,16 @@
*
* @author Ryan Weaver
*/
-class AutowireExceptionPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class AutowireExceptionPass implements CompilerPassInterface
{
private $autowirePass;
private $inlineServicePass;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass $autowirePass, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass $inlineServicePass)
+ public function __construct(AutowirePass $autowirePass, InlineServiceDefinitionsPass $inlineServicePass)
{
$this->autowirePass = $autowirePass;
$this->inlineServicePass = $inlineServicePass;
}
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
// the pass should only be run once
if (null === $this->autowirePass || null === $this->inlineServicePass) {
@@ -45,19 +48,19 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
}
}
}
- private function doesServiceExistInTheContainer($serviceId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, array $inlinedIds)
+ private function doesServiceExistInTheContainer($serviceId, ContainerBuilder $container, array $inlinedIds)
{
if ($container->hasDefinition($serviceId)) {
- return \true;
+ return true;
}
// was the service inlined? Of so, does its parent service exist?
if (isset($inlinedIds[$serviceId])) {
foreach ($inlinedIds[$serviceId] as $parentId) {
if ($this->doesServiceExistInTheContainer($parentId, $container, $inlinedIds)) {
- return \true;
+ return true;
}
}
}
- return \false;
+ return false;
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
index e900a8eea..5d91655b4 100644
--- a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
+++ b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
@@ -18,13 +18,33 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
+use ReflectionClass;
+use ReflectionException;
+use ReflectionFunctionAbstract;
+use ReflectionMethod;
+use function array_key_exists;
+use function array_pop;
+use function array_shift;
+use function array_unshift;
+use function class_exists;
+use function class_implements;
+use function class_parents;
+use function count;
+use function implode;
+use function ksort;
+use function method_exists;
+use function preg_match;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Inspects existing service definitions and wires the autowired ones using the type hints of their classes.
*
* @author Kévin Dunglas
* @author Nicolas Grekas
*/
-class AutowirePass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class AutowirePass extends AbstractRecursivePass
{
private $definedTypes = [];
private $types;
@@ -37,7 +57,7 @@ class AutowirePass extends \_PhpScoper5ea00cc67502b\Symfony\Component\Dependency
/**
* @param bool $throwOnAutowireException Errors can be retrieved via Definition::getErrors()
*/
- public function __construct($throwOnAutowireException = \true)
+ public function __construct($throwOnAutowireException = true)
{
$this->throwOnAutowiringException = $throwOnAutowireException;
}
@@ -48,13 +68,13 @@ public function __construct($throwOnAutowireException = \true)
*/
public function getAutowiringExceptions()
{
- @\trigger_error('Calling AutowirePass::getAutowiringExceptions() is deprecated since Symfony 3.4 and will be removed in 4.0. Use Definition::getErrors() instead.', \E_USER_DEPRECATED);
+ @trigger_error('Calling AutowirePass::getAutowiringExceptions() is deprecated since Symfony 3.4 and will be removed in 4.0. Use Definition::getErrors() instead.', E_USER_DEPRECATED);
return $this->autowiringExceptions;
}
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
// clear out any possibly stored exceptions from before
$this->autowiringExceptions = [];
@@ -75,25 +95,25 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
*
* @deprecated since version 3.3, to be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.
*/
- public static function createResourceForClass(\ReflectionClass $reflectionClass)
+ public static function createResourceForClass(ReflectionClass $reflectionClass)
{
- @\trigger_error('The ' . __METHOD__ . '() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', \E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . '() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
$metadata = [];
- foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
+ foreach ($reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
if (!$reflectionMethod->isStatic()) {
$metadata[$reflectionMethod->name] = self::getResourceMetadataForMethod($reflectionMethod);
}
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\AutowireServiceResource($reflectionClass->name, $reflectionClass->getFileName(), $metadata);
+ return new AutowireServiceResource($reflectionClass->name, $reflectionClass->getFileName(), $metadata);
}
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
try {
return $this->doProcessValue($value, $isRoot);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException $e) {
+ } catch (AutowiringFailedException $e) {
if ($this->throwOnAutowiringException) {
throw $e;
}
@@ -102,34 +122,34 @@ protected function processValue($value, $isRoot = \false)
return parent::processValue($value, $isRoot);
}
}
- private function doProcessValue($value, $isRoot = \false)
+ private function doProcessValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference) {
- if ($ref = $this->getAutowiredReference($value, $value->getRequiringClass() ? \sprintf('for "%s" in "%s"', $value->getType(), $value->getRequiringClass()) : '')) {
+ if ($value instanceof TypedReference) {
+ if ($ref = $this->getAutowiredReference($value, $value->getRequiringClass() ? sprintf('for "%s" in "%s"', $value->getType(), $value->getRequiringClass()) : '')) {
return $ref;
}
$this->container->log($this, $this->createTypeNotFoundMessage($value, 'it'));
}
$value = parent::processValue($value, $isRoot);
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
+ if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
return $value;
}
- if (!($reflectionClass = $this->container->getReflectionClass($value->getClass(), \false))) {
- $this->container->log($this, \sprintf('Skipping service "%s": Class or interface "%s" cannot be loaded.', $this->currentId, $value->getClass()));
+ if (!($reflectionClass = $this->container->getReflectionClass($value->getClass(), false))) {
+ $this->container->log($this, sprintf('Skipping service "%s": Class or interface "%s" cannot be loaded.', $this->currentId, $value->getClass()));
return $value;
}
$methodCalls = $value->getMethodCalls();
try {
- $constructor = $this->getConstructor($value, \false);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException($this->currentId, $e->getMessage(), 0, $e);
+ $constructor = $this->getConstructor($value, false);
+ } catch (RuntimeException $e) {
+ throw new AutowiringFailedException($this->currentId, $e->getMessage(), 0, $e);
}
if ($constructor) {
- \array_unshift($methodCalls, [$constructor, $value->getArguments()]);
+ array_unshift($methodCalls, [$constructor, $value->getArguments()]);
}
$methodCalls = $this->autowireCalls($reflectionClass, $methodCalls);
if ($constructor) {
- list(, $arguments) = \array_shift($methodCalls);
+ [, $arguments] = array_shift($methodCalls);
if ($arguments !== $value->getArguments()) {
$value->setArguments($arguments);
}
@@ -142,17 +162,17 @@ private function doProcessValue($value, $isRoot = \false)
/**
* @return array
*/
- private function autowireCalls(\ReflectionClass $reflectionClass, array $methodCalls)
+ private function autowireCalls(ReflectionClass $reflectionClass, array $methodCalls)
{
foreach ($methodCalls as $i => $call) {
- list($method, $arguments) = $call;
- if ($method instanceof \ReflectionFunctionAbstract) {
+ [$method, $arguments] = $call;
+ if ($method instanceof ReflectionFunctionAbstract) {
$reflectionMethod = $method;
} else {
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition($reflectionClass->name);
+ $definition = new Definition($reflectionClass->name);
try {
$reflectionMethod = $this->getReflectionMethod($definition, $method);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
+ } catch (RuntimeException $e) {
if ($definition->getFactory()) {
continue;
}
@@ -173,19 +193,19 @@ private function autowireCalls(\ReflectionClass $reflectionClass, array $methodC
*
* @throws AutowiringFailedException
*/
- private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments)
+ private function autowireMethod(ReflectionFunctionAbstract $reflectionMethod, array $arguments)
{
- $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId;
+ $class = $reflectionMethod instanceof ReflectionMethod ? $reflectionMethod->class : $this->currentId;
$method = $reflectionMethod->name;
$parameters = $reflectionMethod->getParameters();
- if (\method_exists('ReflectionMethod', 'isVariadic') && $reflectionMethod->isVariadic()) {
- \array_pop($parameters);
+ if (method_exists('ReflectionMethod', 'isVariadic') && $reflectionMethod->isVariadic()) {
+ array_pop($parameters);
}
foreach ($parameters as $index => $parameter) {
- if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) {
+ if (array_key_exists($index, $arguments) && '' !== $arguments[$index]) {
continue;
}
- $type = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper::getTypeHint($reflectionMethod, $parameter, \true);
+ $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true);
if (!$type) {
if (isset($arguments[$index])) {
continue;
@@ -198,20 +218,20 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
if ($parameter->isOptional()) {
continue;
}
- $type = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper::getTypeHint($reflectionMethod, $parameter, \false);
- $type = $type ? \sprintf('is type-hinted "%s"', $type) : 'has no type-hint';
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException($this->currentId, \sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class . '::' . $method : $method, $type));
+ $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, false);
+ $type = $type ? sprintf('is type-hinted "%s"', $type) : 'has no type-hint';
+ throw new AutowiringFailedException($this->currentId, sprintf('Cannot autowire service "%s": argument "$%s" of method "%s()" %s, you should configure its value explicitly.', $this->currentId, $parameter->name, $class !== $this->currentId ? $class . '::' . $method : $method, $type));
}
// specifically pass the default value
$arguments[$index] = $parameter->getDefaultValue();
continue;
}
- if (!($value = $this->getAutowiredReference($ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference($type, $type, !$parameter->isOptional() ? $class : ''), 'for ' . \sprintf('argument "$%s" of method "%s()"', $parameter->name, $class . '::' . $method)))) {
- $failureMessage = $this->createTypeNotFoundMessage($ref, \sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $this->currentId ? $class . '::' . $method : $method));
+ if (!($value = $this->getAutowiredReference($ref = new TypedReference($type, $type, !$parameter->isOptional() ? $class : ''), 'for ' . sprintf('argument "$%s" of method "%s()"', $parameter->name, $class . '::' . $method)))) {
+ $failureMessage = $this->createTypeNotFoundMessage($ref, sprintf('argument "$%s" of method "%s()"', $parameter->name, $class !== $this->currentId ? $class . '::' . $method : $method));
if ($parameter->isDefaultValueAvailable()) {
$value = $parameter->getDefaultValue();
} elseif (!$parameter->allowsNull()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException($this->currentId, $failureMessage);
+ throw new AutowiringFailedException($this->currentId, $failureMessage);
}
$this->container->log($this, $failureMessage);
}
@@ -228,13 +248,13 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
}
// it's possible index 1 was set, then index 0, then 2, etc
// make sure that we re-order so they're injected as expected
- \ksort($arguments);
+ ksort($arguments);
return $arguments;
}
/**
* @return TypedReference|null A reference to the service matching the given type, if any
*/
- private function getAutowiredReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference $reference, $deprecationMessage)
+ private function getAutowiredReference(TypedReference $reference, $deprecationMessage)
{
$this->lastFailure = null;
$type = $reference->getType();
@@ -245,23 +265,23 @@ private function getAutowiredReference(\_PhpScoper5ea00cc67502b\Symfony\Componen
$this->populateAvailableTypes($this->strictMode);
}
if (isset($this->definedTypes[$type])) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference($this->types[$type], $type);
+ return new TypedReference($this->types[$type], $type);
}
if (!$this->strictMode && isset($this->types[$type])) {
$message = 'Autowiring services based on the types they implement is deprecated since Symfony 3.3 and won\'t be supported in version 4.0.';
if ($aliasSuggestion = $this->getAliasesSuggestionForType($type = $reference->getType(), $deprecationMessage)) {
$message .= ' ' . $aliasSuggestion;
} else {
- $message .= \sprintf(' You should %s the "%s" service to "%s" instead.', isset($this->types[$this->types[$type]]) ? 'alias' : 'rename (or alias)', $this->types[$type], $type);
+ $message .= sprintf(' You should %s the "%s" service to "%s" instead.', isset($this->types[$this->types[$type]]) ? 'alias' : 'rename (or alias)', $this->types[$type], $type);
}
- @\trigger_error($message, \E_USER_DEPRECATED);
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference($this->types[$type], $type);
+ @trigger_error($message, E_USER_DEPRECATED);
+ return new TypedReference($this->types[$type], $type);
}
if (!$reference->canBeAutoregistered() || isset($this->types[$type]) || isset($this->ambiguousServiceTypes[$type])) {
return null;
}
if (isset($this->autowired[$type])) {
- return $this->autowired[$type] ? new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference($this->autowired[$type], $type) : null;
+ return $this->autowired[$type] ? new TypedReference($this->autowired[$type], $type) : null;
}
if (!$this->strictMode) {
return $this->createAutowiredDefinition($type);
@@ -271,7 +291,7 @@ private function getAutowiredReference(\_PhpScoper5ea00cc67502b\Symfony\Componen
/**
* Populates the list of available types.
*/
- private function populateAvailableTypes($onlyAutowiringTypes = \false)
+ private function populateAvailableTypes($onlyAutowiringTypes = false)
{
$this->types = [];
if (!$onlyAutowiringTypes) {
@@ -286,21 +306,21 @@ private function populateAvailableTypes($onlyAutowiringTypes = \false)
*
* @param string $id
*/
- private function populateAvailableType($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $onlyAutowiringTypes)
+ private function populateAvailableType($id, Definition $definition, $onlyAutowiringTypes)
{
// Never use abstract services
if ($definition->isAbstract()) {
return;
}
- foreach ($definition->getAutowiringTypes(\false) as $type) {
- $this->definedTypes[$type] = \true;
+ foreach ($definition->getAutowiringTypes(false) as $type) {
+ $this->definedTypes[$type] = true;
$this->types[$type] = $id;
unset($this->ambiguousServiceTypes[$type]);
}
if ($onlyAutowiringTypes) {
return;
}
- if (\preg_match('/^\\d+_[^~]++~[._a-zA-Z\\d]{7}$/', $id) || $definition->isDeprecated() || !($reflectionClass = $this->container->getReflectionClass($definition->getClass(), \false))) {
+ if (preg_match('/^\\d+_[^~]++~[._a-zA-Z\\d]{7}$/', $id) || $definition->isDeprecated() || !($reflectionClass = $this->container->getReflectionClass($definition->getClass(), false))) {
return;
}
foreach ($reflectionClass->getInterfaces() as $reflectionInterface) {
@@ -347,22 +367,22 @@ private function set($type, $id)
*/
private function createAutowiredDefinition($type)
{
- if (!($typeHint = $this->container->getReflectionClass($type, \false)) || !$typeHint->isInstantiable()) {
+ if (!($typeHint = $this->container->getReflectionClass($type, false)) || !$typeHint->isInstantiable()) {
return null;
}
$currentId = $this->currentId;
$this->currentId = $type;
- $this->autowired[$type] = $argumentId = \sprintf('autowired.%s', $type);
- $argumentDefinition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition($type);
- $argumentDefinition->setPublic(\false);
- $argumentDefinition->setAutowired(\true);
+ $this->autowired[$type] = $argumentId = sprintf('autowired.%s', $type);
+ $argumentDefinition = new Definition($type);
+ $argumentDefinition->setPublic(false);
+ $argumentDefinition->setAutowired(true);
try {
$originalThrowSetting = $this->throwOnAutowiringException;
- $this->throwOnAutowiringException = \true;
- $this->processValue($argumentDefinition, \true);
+ $this->throwOnAutowiringException = true;
+ $this->processValue($argumentDefinition, true);
$this->container->setDefinition($argumentId, $argumentDefinition);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException $e) {
- $this->autowired[$type] = \false;
+ } catch (AutowiringFailedException $e) {
+ $this->autowired[$type] = false;
$this->lastFailure = $e->getMessage();
$this->container->log($this, $this->lastFailure);
return null;
@@ -370,16 +390,16 @@ private function createAutowiredDefinition($type)
$this->throwOnAutowiringException = $originalThrowSetting;
$this->currentId = $currentId;
}
- @\trigger_error(\sprintf('Relying on service auto-registration for type "%s" is deprecated since Symfony 3.4 and won\'t be supported in 4.0. Create a service named "%s" instead.', $type, $type), \E_USER_DEPRECATED);
- $this->container->log($this, \sprintf('Type "%s" has been auto-registered for service "%s".', $type, $this->currentId));
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference($argumentId, $type);
+ @trigger_error(sprintf('Relying on service auto-registration for type "%s" is deprecated since Symfony 3.4 and won\'t be supported in 4.0. Create a service named "%s" instead.', $type, $type), E_USER_DEPRECATED);
+ $this->container->log($this, sprintf('Type "%s" has been auto-registered for service "%s".', $type, $this->currentId));
+ return new TypedReference($argumentId, $type);
}
- private function createTypeNotFoundMessage(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference $reference, $label)
+ private function createTypeNotFoundMessage(TypedReference $reference, $label)
{
$trackResources = $this->container->isTrackingResources();
- $this->container->setResourceTracking(\false);
+ $this->container->setResourceTracking(false);
try {
- if ($r = $this->container->getReflectionClass($type = $reference->getType(), \false)) {
+ if ($r = $this->container->getReflectionClass($type = $reference->getType(), false)) {
$alternatives = $this->createTypeAlternatives($reference);
}
} finally {
@@ -388,29 +408,29 @@ private function createTypeNotFoundMessage(\_PhpScoper5ea00cc67502b\Symfony\Comp
if (!$r) {
// either $type does not exist or a parent class does not exist
try {
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource($type, \false);
+ $resource = new ClassExistenceResource($type, false);
// isFresh() will explode ONLY if a parent class/trait does not exist
$resource->isFresh(0);
- $parentMsg = \false;
- } catch (\ReflectionException $e) {
+ $parentMsg = false;
+ } catch (ReflectionException $e) {
$parentMsg = $e->getMessage();
}
- $message = \sprintf('has type "%s" but this class %s.', $type, $parentMsg ? \sprintf('is missing a parent class (%s)', $parentMsg) : 'was not found');
+ $message = sprintf('has type "%s" but this class %s.', $type, $parentMsg ? sprintf('is missing a parent class (%s)', $parentMsg) : 'was not found');
} else {
$message = $this->container->has($type) ? 'this service is abstract' : 'no such service exists';
- $message = \sprintf('references %s "%s" but %s.%s', $r->isInterface() ? 'interface' : 'class', $type, $message, $alternatives);
+ $message = sprintf('references %s "%s" but %s.%s', $r->isInterface() ? 'interface' : 'class', $type, $message, $alternatives);
if ($r->isInterface() && !$alternatives) {
$message .= ' Did you create a class that implements this interface?';
}
}
- $message = \sprintf('Cannot autowire service "%s": %s %s', $this->currentId, $label, $message);
+ $message = sprintf('Cannot autowire service "%s": %s %s', $this->currentId, $label, $message);
if (null !== $this->lastFailure) {
$message = $this->lastFailure . "\n" . $message;
$this->lastFailure = null;
}
return $message;
}
- private function createTypeAlternatives(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference $reference)
+ private function createTypeAlternatives(TypedReference $reference)
{
// try suggesting available aliases first
if ($message = $this->getAliasesSuggestionForType($type = $reference->getType())) {
@@ -420,30 +440,30 @@ private function createTypeAlternatives(\_PhpScoper5ea00cc67502b\Symfony\Compone
$this->populateAvailableTypes();
}
if (isset($this->ambiguousServiceTypes[$type])) {
- $message = \sprintf('one of these existing services: "%s"', \implode('", "', $this->ambiguousServiceTypes[$type]));
+ $message = sprintf('one of these existing services: "%s"', implode('", "', $this->ambiguousServiceTypes[$type]));
} elseif (isset($this->types[$type])) {
- $message = \sprintf('the existing "%s" service', $this->types[$type]);
+ $message = sprintf('the existing "%s" service', $this->types[$type]);
} elseif ($reference->getRequiringClass() && !$reference->canBeAutoregistered() && !$this->strictMode) {
return ' It cannot be auto-registered because it is from a different root namespace.';
} else {
return '';
}
- return \sprintf(' You should maybe alias this %s to %s.', \class_exists($type, \false) ? 'class' : 'interface', $message);
+ return sprintf(' You should maybe alias this %s to %s.', class_exists($type, false) ? 'class' : 'interface', $message);
}
/**
* @deprecated since version 3.3, to be removed in 4.0.
*/
- private static function getResourceMetadataForMethod(\ReflectionMethod $method)
+ private static function getResourceMetadataForMethod(ReflectionMethod $method)
{
$methodArgumentsMetadata = [];
foreach ($method->getParameters() as $parameter) {
try {
$class = $parameter->getClass();
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
// type-hint is against a non-existent class
- $class = \false;
+ $class = false;
}
- $isVariadic = \method_exists($parameter, 'isVariadic') && $parameter->isVariadic();
+ $isVariadic = method_exists($parameter, 'isVariadic') && $parameter->isVariadic();
$methodArgumentsMetadata[] = ['class' => $class, 'isOptional' => $parameter->isOptional(), 'defaultValue' => $parameter->isOptional() && !$isVariadic ? $parameter->getDefaultValue() : null];
}
return $methodArgumentsMetadata;
@@ -451,22 +471,22 @@ private static function getResourceMetadataForMethod(\ReflectionMethod $method)
private function getAliasesSuggestionForType($type, $extraContext = null)
{
$aliases = [];
- foreach (\class_parents($type) + \class_implements($type) as $parent) {
+ foreach (class_parents($type) + class_implements($type) as $parent) {
if ($this->container->has($parent) && !$this->container->findDefinition($parent)->isAbstract()) {
$aliases[] = $parent;
}
}
$extraContext = $extraContext ? ' ' . $extraContext : '';
- if (1 < ($len = \count($aliases))) {
- $message = \sprintf('Try changing the type-hint%s to one of its parents: ', $extraContext);
+ if (1 < ($len = count($aliases))) {
+ $message = sprintf('Try changing the type-hint%s to one of its parents: ', $extraContext);
for ($i = 0, --$len; $i < $len; ++$i) {
- $message .= \sprintf('%s "%s", ', \class_exists($aliases[$i], \false) ? 'class' : 'interface', $aliases[$i]);
+ $message .= sprintf('%s "%s", ', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]);
}
- $message .= \sprintf('or %s "%s".', \class_exists($aliases[$i], \false) ? 'class' : 'interface', $aliases[$i]);
+ $message .= sprintf('or %s "%s".', class_exists($aliases[$i], false) ? 'class' : 'interface', $aliases[$i]);
return $message;
}
if ($aliases) {
- return \sprintf('Try changing the type-hint%s to "%s" instead.', $extraContext, $aliases[0]);
+ return sprintf('Try changing the type-hint%s to "%s" instead.', $extraContext, $aliases[0]);
}
return null;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php b/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
index 46bf22046..bad2a0659 100644
--- a/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
@@ -11,47 +11,52 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
+use ReflectionException;
+use function preg_match;
+use function stripos;
+use function strtolower;
+
/**
* Looks for definitions with autowiring enabled and registers their corresponding "@required" methods as setters.
*
* @author Nicolas Grekas
*/
-class AutowireRequiredMethodsPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class AutowireRequiredMethodsPass extends AbstractRecursivePass
{
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
$value = parent::processValue($value, $isRoot);
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
+ if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
return $value;
}
- if (!($reflectionClass = $this->container->getReflectionClass($value->getClass(), \false))) {
+ if (!($reflectionClass = $this->container->getReflectionClass($value->getClass(), false))) {
return $value;
}
$alreadyCalledMethods = [];
- foreach ($value->getMethodCalls() as list($method)) {
- $alreadyCalledMethods[\strtolower($method)] = \true;
+ foreach ($value->getMethodCalls() as [$method]) {
+ $alreadyCalledMethods[strtolower($method)] = true;
}
foreach ($reflectionClass->getMethods() as $reflectionMethod) {
$r = $reflectionMethod;
- if ($r->isConstructor() || isset($alreadyCalledMethods[\strtolower($r->name)])) {
+ if ($r->isConstructor() || isset($alreadyCalledMethods[strtolower($r->name)])) {
continue;
}
- while (\true) {
- if (\false !== ($doc = $r->getDocComment())) {
- if (\false !== \stripos($doc, '@required') && \preg_match('#(?:^/\\*\\*|\\n\\s*+\\*)\\s*+@required(?:\\s|\\*/$)#i', $doc)) {
+ while (true) {
+ if (false !== ($doc = $r->getDocComment())) {
+ if (false !== stripos($doc, '@required') && preg_match('#(?:^/\\*\\*|\\n\\s*+\\*)\\s*+@required(?:\\s|\\*/$)#i', $doc)) {
$value->addMethodCall($reflectionMethod->name);
break;
}
- if (\false === \stripos($doc, '@inheritdoc') || !\preg_match('#(?:^/\\*\\*|\\n\\s*+\\*)\\s*+(?:\\{@inheritdoc\\}|@inheritdoc)(?:\\s|\\*/$)#i', $doc)) {
+ if (false === stripos($doc, '@inheritdoc') || !preg_match('#(?:^/\\*\\*|\\n\\s*+\\*)\\s*+(?:\\{@inheritdoc\\}|@inheritdoc)(?:\\s|\\*/$)#i', $doc)) {
break;
}
}
try {
$r = $r->getPrototype();
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
break;
// method has no prototype
}
diff --git a/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
index 1715e355a..0ae2cabeb 100644
--- a/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
@@ -12,42 +12,45 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function is_int;
+use function sprintf;
+
/**
* Checks if arguments of methods are properly configured.
*
* @author Kévin Dunglas
* @author Nicolas Grekas
*/
-class CheckArgumentsValidityPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class CheckArgumentsValidityPass extends AbstractRecursivePass
{
private $throwExceptions;
- public function __construct($throwExceptions = \true)
+ public function __construct($throwExceptions = true)
{
$this->throwExceptions = $throwExceptions;
}
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
$i = 0;
foreach ($value->getArguments() as $k => $v) {
if ($k !== $i++) {
- if (!\is_int($k)) {
- $msg = \sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k);
+ if (!is_int($k)) {
+ $msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k);
$value->addError($msg);
if ($this->throwExceptions) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException($msg);
+ throw new RuntimeException($msg);
}
break;
}
- $msg = \sprintf('Invalid constructor argument %d for service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $this->currentId, $i);
+ $msg = sprintf('Invalid constructor argument %d for service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $this->currentId, $i);
$value->addError($msg);
if ($this->throwExceptions) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException($msg);
+ throw new RuntimeException($msg);
}
}
}
@@ -55,18 +58,18 @@ protected function processValue($value, $isRoot = \false)
$i = 0;
foreach ($methodCall[1] as $k => $v) {
if ($k !== $i++) {
- if (!\is_int($k)) {
- $msg = \sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k);
+ if (!is_int($k)) {
+ $msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k);
$value->addError($msg);
if ($this->throwExceptions) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException($msg);
+ throw new RuntimeException($msg);
}
break;
}
- $msg = \sprintf('Invalid argument %d for method call "%s" of service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $methodCall[0], $this->currentId, $i);
+ $msg = sprintf('Invalid argument %d for method call "%s" of service "%s": argument %d must be defined before. Check your service definition.', 1 + $k, $methodCall[0], $this->currentId, $i);
$value->addError($msg);
if ($this->throwExceptions) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException($msg);
+ throw new RuntimeException($msg);
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
index 4cdcac6f3..6a3c5a472 100644
--- a/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
@@ -12,6 +12,10 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use function array_pop;
+use function array_search;
+use function array_slice;
+
/**
* Checks your services for circular references.
*
@@ -22,14 +26,14 @@
*
* @author Johannes M. Schmitt
*/
-class CheckCircularReferencesPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class CheckCircularReferencesPass implements CompilerPassInterface
{
private $currentPath;
private $checkedNodes;
/**
* Checks the ContainerBuilder object for circular references.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$graph = $container->getCompiler()->getServiceReferenceGraph();
$this->checkedNodes = [];
@@ -53,15 +57,15 @@ private function checkOutEdges(array $edges)
if (empty($this->checkedNodes[$id])) {
// Don't check circular references for lazy edges
if (!$node->getValue() || !$edge->isLazy() && !$edge->isWeak()) {
- $searchKey = \array_search($id, $this->currentPath);
+ $searchKey = array_search($id, $this->currentPath);
$this->currentPath[] = $id;
- if (\false !== $searchKey) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey));
+ if (false !== $searchKey) {
+ throw new ServiceCircularReferenceException($id, array_slice($this->currentPath, $searchKey));
}
$this->checkOutEdges($node->getOutEdges());
}
- $this->checkedNodes[$id] = \true;
- \array_pop($this->currentPath);
+ $this->checkedNodes[$id] = true;
+ array_pop($this->currentPath);
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
index 36eddeded..eabf0d899 100644
--- a/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
@@ -13,6 +13,14 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvParameterException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function class_exists;
+use function interface_exists;
+use function is_scalar;
+use function sprintf;
+use function strpos;
+use function substr;
+use function substr_count;
+
/**
* This pass validates each definition individually only taking the information
* into account which is contained in the definition itself.
@@ -25,39 +33,39 @@
*
* @author Johannes M. Schmitt
*/
-class CheckDefinitionValidityPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class CheckDefinitionValidityPass implements CompilerPassInterface
{
/**
* Processes the ContainerBuilder to validate the Definition.
*
* @throws RuntimeException When the Definition is invalid
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getDefinitions() as $id => $definition) {
// synthetic service is public
if ($definition->isSynthetic() && !($definition->isPublic() || $definition->isPrivate())) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('A synthetic service ("%s") must be public.', $id));
+ throw new RuntimeException(sprintf('A synthetic service ("%s") must be public.', $id));
}
// non-synthetic, non-abstract service has class
if (!$definition->isAbstract() && !$definition->isSynthetic() && !$definition->getClass()) {
if ($definition->getFactory()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id));
+ throw new RuntimeException(sprintf('Please add the class to service "%s" even if it is constructed by a factory since we might need to add method calls based on compile-time checks.', $id));
}
- if (\class_exists($id) || \interface_exists($id, \false)) {
- if (0 === \strpos($id, '\\') && 1 < \substr_count($id, '\\')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface. Please specify the class attribute explicitly or remove the leading backslash by renaming the service to "%s" to get rid of this error.', $id, \substr($id, 1)));
+ if (class_exists($id) || interface_exists($id, false)) {
+ if (0 === strpos($id, '\\') && 1 < substr_count($id, '\\')) {
+ throw new RuntimeException(sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface. Please specify the class attribute explicitly or remove the leading backslash by renaming the service to "%s" to get rid of this error.', $id, substr($id, 1)));
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface in the global namespace. Leaving out the "class" attribute is only allowed for namespaced classes. Please specify the class attribute explicitly to get rid of this error.', $id));
+ throw new RuntimeException(sprintf('The definition for "%s" has no class attribute, and appears to reference a class or interface in the global namespace. Leaving out the "class" attribute is only allowed for namespaced classes. Please specify the class attribute explicitly to get rid of this error.', $id));
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The definition for "%s" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.', $id));
+ throw new RuntimeException(sprintf('The definition for "%s" has no class. If you intend to inject this service dynamically at runtime, please mark it as synthetic=true. If this is an abstract definition solely used by child definitions, please add abstract=true, otherwise specify a class to get rid of this error.', $id));
}
// tag attribute values must be scalars
foreach ($definition->getTags() as $name => $tags) {
foreach ($tags as $attributes) {
foreach ($attributes as $attribute => $value) {
- if (!\is_scalar($value) && null !== $value) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute));
+ if (!is_scalar($value) && null !== $value) {
+ throw new RuntimeException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute));
}
}
}
@@ -65,7 +73,7 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
if ($definition->isPublic() && !$definition->isPrivate()) {
$resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
if (null !== $usedEnvs) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.');
+ throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.');
}
}
}
@@ -73,7 +81,7 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
if ($alias->isPublic() && !$alias->isPrivate()) {
$resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
if (null !== $usedEnvs) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.');
+ throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.');
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
index 550dd1c0a..ce3adcc09 100644
--- a/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
@@ -18,15 +18,15 @@
*
* @author Johannes M. Schmitt
*/
-class CheckExceptionOnInvalidReferenceBehaviorPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
{
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ if (!$value instanceof Reference) {
return parent::processValue($value, $isRoot);
}
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior() && !$this->container->has($id = (string) $value)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id, $this->currentId);
+ if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE === $value->getInvalidBehavior() && !$this->container->has($id = (string) $value)) {
+ throw new ServiceNotFoundException($id, $this->currentId);
}
return $value;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php b/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
index d3d9dfe5d..038eadcbb 100644
--- a/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
@@ -13,6 +13,8 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function sprintf;
+
/**
* Checks the validity of references.
*
@@ -21,17 +23,17 @@
*
* @author Johannes M. Schmitt
*/
-class CheckReferenceValidityPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class CheckReferenceValidityPass extends AbstractRecursivePass
{
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($isRoot && $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition && ($value->isSynthetic() || $value->isAbstract())) {
+ if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) {
return $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && $this->container->hasDefinition((string) $value)) {
+ if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) {
$targetDefinition = $this->container->getDefinition((string) $value);
if ($targetDefinition->isAbstract()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $value));
+ throw new RuntimeException(sprintf('The definition "%s" has a reference to an abstract definition "%s". Abstract definitions cannot be the target of references.', $this->currentId, $value));
}
}
return parent::processValue($value, $isRoot);
diff --git a/vendor/symfony/dependency-injection/Compiler/Compiler.php b/vendor/symfony/dependency-injection/Compiler/Compiler.php
index c9905a579..879fe7aea 100644
--- a/vendor/symfony/dependency-injection/Compiler/Compiler.php
+++ b/vendor/symfony/dependency-injection/Compiler/Compiler.php
@@ -12,6 +12,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvParameterException;
+use Exception;
+use ReflectionMethod;
+use ReflectionProperty;
+use function func_get_arg;
+use function func_num_args;
+use function get_class;
+use function sprintf;
+use function str_replace;
+use function strpos;
+use function trigger_error;
+use function trim;
+use const E_USER_DEPRECATED;
+
/**
* This class is used to remove circular dependencies between individual passes.
*
@@ -25,8 +38,8 @@ class Compiler
private $serviceReferenceGraph;
public function __construct()
{
- $this->passConfig = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig();
- $this->serviceReferenceGraph = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraph();
+ $this->passConfig = new PassConfig();
+ $this->serviceReferenceGraph = new ServiceReferenceGraph();
}
/**
* Returns the PassConfig.
@@ -56,8 +69,8 @@ public function getServiceReferenceGraph()
public function getLoggingFormatter()
{
if (null === $this->loggingFormatter) {
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), \E_USER_DEPRECATED);
- $this->loggingFormatter = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\LoggingFormatter();
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
+ $this->loggingFormatter = new LoggingFormatter();
}
return $this->loggingFormatter;
}
@@ -67,15 +80,15 @@ public function getLoggingFormatter()
* @param CompilerPassInterface $pass A compiler pass
* @param string $type The type of the pass
*/
- public function addPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $type = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION)
+ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
{
- if (\func_num_args() >= 3) {
- $priority = \func_get_arg(2);
+ if (func_num_args() >= 3) {
+ $priority = func_get_arg(2);
} else {
if (__CLASS__ !== static::class) {
- $r = new \ReflectionMethod($this, __FUNCTION__);
+ $r = new ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
- @\trigger_error(\sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
}
}
$priority = 0;
@@ -91,18 +104,18 @@ public function addPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
*/
public function addLogMessage($string)
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
$this->log[] = $string;
}
/**
* @final
*/
- public function log(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $message)
+ public function log(CompilerPassInterface $pass, $message)
{
- if (\false !== \strpos($message, "\n")) {
- $message = \str_replace("\n", "\n" . \get_class($pass) . ': ', \trim($message));
+ if (false !== strpos($message, "\n")) {
+ $message = str_replace("\n", "\n" . get_class($pass) . ': ', trim($message));
}
- $this->log[] = \get_class($pass) . ': ' . $message;
+ $this->log[] = get_class($pass) . ': ' . $message;
}
/**
* Returns the log.
@@ -116,25 +129,25 @@ public function getLog()
/**
* Run the Compiler and process all Passes.
*/
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function compile(ContainerBuilder $container)
{
try {
foreach ($this->passConfig->getPasses() as $pass) {
$pass->process($container);
}
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$usedEnvs = [];
$prev = $e;
do {
$msg = $prev->getMessage();
if ($msg !== ($resolvedMsg = $container->resolveEnvPlaceholders($msg, null, $usedEnvs))) {
- $r = new \ReflectionProperty($prev, 'message');
- $r->setAccessible(\true);
+ $r = new ReflectionProperty($prev, 'message');
+ $r->setAccessible(true);
$r->setValue($prev, $resolvedMsg);
}
} while ($prev = $prev->getPrevious());
if ($usedEnvs) {
- $e = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvParameterException($usedEnvs, $e);
+ $e = new EnvParameterException($usedEnvs, $e);
}
throw $e;
} finally {
diff --git a/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php b/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
index 2db1600b4..68d955b54 100644
--- a/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
+++ b/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
@@ -21,5 +21,5 @@ interface CompilerPassInterface
/**
* You can modify the container here before it is dumped to PHP code.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container);
+ public function process(ContainerBuilder $container);
}
diff --git a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
index 654726fa9..8c65ff036 100644
--- a/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
+++ b/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
@@ -12,6 +12,10 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use SplPriorityQueue;
+use function array_merge;
+use const PHP_INT_MAX;
+
/**
* Overwrites a service but keeps the overridden one.
*
@@ -19,12 +23,12 @@
* @author Fabien Potencier
* @author Diego Saint Esteben
*/
-class DecoratorServicePass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class DecoratorServicePass implements CompilerPassInterface
{
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
- $definitions = new \SplPriorityQueue();
- $order = \PHP_INT_MAX;
+ $definitions = new SplPriorityQueue();
+ $order = PHP_INT_MAX;
foreach ($container->getDefinitions() as $id => $definition) {
if (!($decorated = $definition->getDecoratedService())) {
continue;
@@ -32,8 +36,8 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
$definitions->insert([$id, $definition], [$decorated[2], --$order]);
}
$decoratingDefinitions = [];
- foreach ($definitions as list($id, $definition)) {
- list($inner, $renamedId) = $definition->getDecoratedService();
+ foreach ($definitions as [$id, $definition]) {
+ [$inner, $renamedId] = $definition->getDecoratedService();
$definition->setDecoratedService(null);
if (!$renamedId) {
$renamedId = $id . '.inner';
@@ -44,20 +48,20 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
$alias = $container->getAlias($inner);
$public = $alias->isPublic();
$private = $alias->isPrivate();
- $container->setAlias($renamedId, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias($container->normalizeId($alias), \false));
+ $container->setAlias($renamedId, new Alias($container->normalizeId($alias), false));
} else {
$decoratedDefinition = $container->getDefinition($inner);
$public = $decoratedDefinition->isPublic();
$private = $decoratedDefinition->isPrivate();
- $decoratedDefinition->setPublic(\false);
+ $decoratedDefinition->setPublic(false);
$container->setDefinition($renamedId, $decoratedDefinition);
$decoratingDefinitions[$inner] = $decoratedDefinition;
}
if (isset($decoratingDefinitions[$inner])) {
$decoratingDefinition = $decoratingDefinitions[$inner];
- $definition->setTags(\array_merge($decoratingDefinition->getTags(), $definition->getTags()));
- $autowiringTypes = $decoratingDefinition->getAutowiringTypes(\false);
- if ($types = \array_merge($autowiringTypes, $definition->getAutowiringTypes(\false))) {
+ $definition->setTags(array_merge($decoratingDefinition->getTags(), $definition->getTags()));
+ $autowiringTypes = $decoratingDefinition->getAutowiringTypes(false);
+ if ($types = array_merge($autowiringTypes, $definition->getAutowiringTypes(false))) {
$definition->setAutowiringTypes($types);
}
$decoratingDefinition->setTags([]);
diff --git a/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php b/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
index a48b7b0ac..2303ff12a 100644
--- a/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
@@ -12,24 +12,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function reset;
+
/**
* Throws an exception for any Definitions that have errors and still exist.
*
* @author Ryan Weaver
*/
-class DefinitionErrorExceptionPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class DefinitionErrorExceptionPass extends AbstractRecursivePass
{
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || empty($value->getErrors())) {
+ if (!$value instanceof Definition || empty($value->getErrors())) {
return parent::processValue($value, $isRoot);
}
// only show the first error so the user can focus on it
$errors = $value->getErrors();
- $message = \reset($errors);
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException($message);
+ $message = reset($errors);
+ throw new RuntimeException($message);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php b/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
index 16bcea4a6..f7779b6e6 100644
--- a/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
@@ -17,15 +17,15 @@
*
* @author Wouter J
*/
-class ExtensionCompilerPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class ExtensionCompilerPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getExtensions() as $extension) {
- if (!$extension instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface) {
+ if (!$extension instanceof CompilerPassInterface) {
continue;
}
$extension->process($container);
diff --git a/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php b/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php
index 209ad6fb3..2181be602 100644
--- a/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php
+++ b/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php
@@ -13,28 +13,41 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use ReflectionException;
+use ReflectionFunction;
+use ReflectionMethod;
+use ReflectionNamedType;
+use function file_exists;
+use function get_parent_class;
+use function is_string;
+use function method_exists;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* @author Guilhem N.
*
* @deprecated since version 3.3, to be removed in 4.0.
*/
-class FactoryReturnTypePass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class FactoryReturnTypePass implements CompilerPassInterface
{
private $resolveClassPass;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass $resolveClassPass = null)
+ public function __construct(ResolveClassPass $resolveClassPass = null)
{
if (null === $resolveClassPass) {
- @\trigger_error('The ' . __CLASS__ . ' class is deprecated since Symfony 3.3 and will be removed in 4.0.', \E_USER_DEPRECATED);
+ @trigger_error('The ' . __CLASS__ . ' class is deprecated since Symfony 3.3 and will be removed in 4.0.', E_USER_DEPRECATED);
}
$this->resolveClassPass = $resolveClassPass;
}
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
// works only since php 7.0 and hhvm 3.11
- if (!\method_exists(\ReflectionMethod::class, 'getReturnType')) {
+ if (!method_exists(ReflectionMethod::class, 'getReturnType')) {
return;
}
$resolveClassPassChanges = null !== $this->resolveClassPass ? $this->resolveClassPass->getChanges() : [];
@@ -42,7 +55,7 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
$this->updateDefinition($container, $id, $definition, $resolveClassPassChanges);
}
}
- private function updateDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, $id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, array $resolveClassPassChanges, array $previous = [])
+ private function updateDefinition(ContainerBuilder $container, $id, Definition $definition, array $resolveClassPassChanges, array $previous = [])
{
// circular reference
if (isset($previous[$id])) {
@@ -53,18 +66,18 @@ private function updateDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\Dep
return;
}
$class = null;
- if (\is_string($factory)) {
+ if (is_string($factory)) {
try {
- $m = new \ReflectionFunction($factory);
- if (\false !== $m->getFileName() && \file_exists($m->getFileName())) {
+ $m = new ReflectionFunction($factory);
+ if (false !== $m->getFileName() && file_exists($m->getFileName())) {
$container->fileExists($m->getFileName());
}
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
return;
}
} else {
- if ($factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- $previous[$id] = \true;
+ if ($factory[0] instanceof Reference) {
+ $previous[$id] = true;
$factoryId = $container->normalizeId($factory[0]);
$factoryDefinition = $container->findDefinition($factoryId);
$this->updateDefinition($container, $factoryId, $factoryDefinition, $resolveClassPassChanges, $previous);
@@ -72,28 +85,28 @@ private function updateDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\Dep
} else {
$class = $factory[0];
}
- if (!($m = $container->getReflectionClass($class, \false))) {
+ if (!($m = $container->getReflectionClass($class, false))) {
return;
}
try {
$m = $m->getMethod($factory[1]);
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
return;
}
}
$returnType = $m->getReturnType();
if (null !== $returnType && !$returnType->isBuiltin()) {
- $returnType = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : $returnType->__toString();
+ $returnType = $returnType instanceof ReflectionNamedType ? $returnType->getName() : $returnType->__toString();
if (null !== $class) {
$declaringClass = $m->getDeclaringClass()->getName();
- if ('self' === \strtolower($returnType)) {
+ if ('self' === strtolower($returnType)) {
$returnType = $declaringClass;
- } elseif ('parent' === \strtolower($returnType)) {
- $returnType = \get_parent_class($declaringClass) ?: null;
+ } elseif ('parent' === strtolower($returnType)) {
+ $returnType = get_parent_class($declaringClass) ?: null;
}
}
if (null !== $returnType && (!isset($resolveClassPassChanges[$id]) || $returnType !== $resolveClassPassChanges[$id])) {
- @\trigger_error(\sprintf('Relying on its factory\'s return-type to define the class of service "%s" is deprecated since Symfony 3.3 and won\'t work in 4.0. Set the "class" attribute to "%s" on the service definition instead.', $id, $returnType), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Relying on its factory\'s return-type to define the class of service "%s" is deprecated since Symfony 3.3 and won\'t work in 4.0. Set the "class" attribute to "%s" on the service definition instead.', $id, $returnType), E_USER_DEPRECATED);
}
$definition->setClass($returnType);
}
diff --git a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
index f822d3893..76fd20715 100644
--- a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
@@ -14,19 +14,29 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function array_keys;
+use function array_search;
+use function array_slice;
+use function array_unique;
+use function count;
+use function is_array;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Inline service definitions where this is possible.
*
* @author Johannes M. Schmitt
*/
-class InlineServiceDefinitionsPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatablePassInterface
+class InlineServiceDefinitionsPass extends AbstractRecursivePass implements RepeatablePassInterface
{
private $cloningIds = [];
private $inlinedServiceIds = [];
/**
* {@inheritdoc}
*/
- public function setRepeatedPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass $repeatedPass)
+ public function setRepeatedPass(RepeatedPass $repeatedPass)
{
// no-op for BC
}
@@ -41,42 +51,42 @@ public function setRepeatedPass(\_PhpScoper5ea00cc67502b\Symfony\Component\Depen
*/
public function getInlinedServiceIds()
{
- @\trigger_error('Calling InlineServiceDefinitionsPass::getInlinedServiceIds() is deprecated since Symfony 3.4 and will be removed in 4.0.', \E_USER_DEPRECATED);
+ @trigger_error('Calling InlineServiceDefinitionsPass::getInlinedServiceIds() is deprecated since Symfony 3.4 and will be removed in 4.0.', E_USER_DEPRECATED);
return $this->inlinedServiceIds;
}
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
+ if ($value instanceof ArgumentInterface) {
// Reference found in ArgumentInterface::getValues() are not inlineable
return $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition && $this->cloningIds) {
+ if ($value instanceof Definition && $this->cloningIds) {
if ($value->isShared()) {
return $value;
}
$value = clone $value;
}
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference || !$this->container->hasDefinition($id = $this->container->normalizeId($value))) {
+ if (!$value instanceof Reference || !$this->container->hasDefinition($id = $this->container->normalizeId($value))) {
return parent::processValue($value, $isRoot);
}
$definition = $this->container->getDefinition($id);
if (!$this->isInlineableDefinition($id, $definition, $this->container->getCompiler()->getServiceReferenceGraph())) {
return $value;
}
- $this->container->log($this, \sprintf('Inlined service "%s" to "%s".', $id, $this->currentId));
+ $this->container->log($this, sprintf('Inlined service "%s" to "%s".', $id, $this->currentId));
$this->inlinedServiceIds[$id][] = $this->currentId;
if ($definition->isShared()) {
return $definition;
}
if (isset($this->cloningIds[$id])) {
- $ids = \array_keys($this->cloningIds);
+ $ids = array_keys($this->cloningIds);
$ids[] = $id;
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($id, \array_slice($ids, \array_search($id, $ids)));
+ throw new ServiceCircularReferenceException($id, array_slice($ids, array_search($id, $ids)));
}
- $this->cloningIds[$id] = \true;
+ $this->cloningIds[$id] = true;
try {
return $this->processValue($definition);
} finally {
@@ -88,40 +98,40 @@ protected function processValue($value, $isRoot = \false)
*
* @return bool If the definition is inlineable
*/
- private function isInlineableDefinition($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraph $graph)
+ private function isInlineableDefinition($id, Definition $definition, ServiceReferenceGraph $graph)
{
if ($definition->getErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic()) {
- return \false;
+ return false;
}
if (!$definition->isShared()) {
- return \true;
+ return true;
}
if ($definition->isPublic() || $definition->isPrivate()) {
- return \false;
+ return false;
}
if (!$graph->hasNode($id)) {
- return \true;
+ return true;
}
if ($this->currentId == $id) {
- return \false;
+ return false;
}
$ids = [];
- $isReferencedByConstructor = \false;
+ $isReferencedByConstructor = false;
foreach ($graph->getNode($id)->getInEdges() as $edge) {
$isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
if ($edge->isWeak() || $edge->isLazy()) {
- return \false;
+ return false;
}
$ids[] = $edge->getSourceNode()->getId();
}
if (!$ids) {
- return \true;
+ return true;
}
- if (\count(\array_unique($ids)) > 1) {
- return \false;
+ if (count(array_unique($ids)) > 1) {
+ return false;
}
- if (\count($ids) > 1 && \is_array($factory = $definition->getFactory()) && ($factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference || $factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition)) {
- return \false;
+ if (count($ids) > 1 && is_array($factory = $definition->getFactory()) && ($factory[0] instanceof Reference || $factory[0] instanceof Definition)) {
+ return false;
}
return $this->container->getDefinition($ids[0])->isShared();
}
diff --git a/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php b/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php
index 5a011d9fa..fca65f7b8 100644
--- a/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php
+++ b/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php
@@ -10,7 +10,13 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
-@\trigger_error('The ' . __NAMESPACE__ . '\\LoggingFormatter class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', \E_USER_DEPRECATED);
+use function get_class;
+use function implode;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
+@trigger_error('The ' . __NAMESPACE__ . '\\LoggingFormatter class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', E_USER_DEPRECATED);
/**
* Used to format logging messages during the compilation.
*
@@ -20,28 +26,28 @@
*/
class LoggingFormatter
{
- public function formatRemoveService(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $id, $reason)
+ public function formatRemoveService(CompilerPassInterface $pass, $id, $reason)
{
- return $this->format($pass, \sprintf('Removed service "%s"; reason: %s.', $id, $reason));
+ return $this->format($pass, sprintf('Removed service "%s"; reason: %s.', $id, $reason));
}
- public function formatInlineService(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $id, $target)
+ public function formatInlineService(CompilerPassInterface $pass, $id, $target)
{
- return $this->format($pass, \sprintf('Inlined service "%s" to "%s".', $id, $target));
+ return $this->format($pass, sprintf('Inlined service "%s" to "%s".', $id, $target));
}
- public function formatUpdateReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $serviceId, $oldDestId, $newDestId)
+ public function formatUpdateReference(CompilerPassInterface $pass, $serviceId, $oldDestId, $newDestId)
{
- return $this->format($pass, \sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $serviceId, $oldDestId, $newDestId));
+ return $this->format($pass, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $serviceId, $oldDestId, $newDestId));
}
- public function formatResolveInheritance(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $childId, $parentId)
+ public function formatResolveInheritance(CompilerPassInterface $pass, $childId, $parentId)
{
- return $this->format($pass, \sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
+ return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
}
- public function formatUnusedAutowiringPatterns(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $id, array $patterns)
+ public function formatUnusedAutowiringPatterns(CompilerPassInterface $pass, $id, array $patterns)
{
- return $this->format($pass, \sprintf('Autowiring\'s patterns "%s" for service "%s" don\'t match any method.', \implode('", "', $patterns), $id));
+ return $this->format($pass, sprintf('Autowiring\'s patterns "%s" for service "%s" don\'t match any method.', implode('", "', $patterns), $id));
}
- public function format(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $message)
+ public function format(CompilerPassInterface $pass, $message)
{
- return \sprintf('%s: %s', \get_class($pass), $message);
+ return sprintf('%s: %s', get_class($pass), $message);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php b/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
index a21ac582d..147b68824 100644
--- a/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
@@ -19,24 +19,32 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
+use Exception;
+use function get_class;
+use function is_string;
+use function serialize;
+use function sprintf;
+use function stripos;
+use function strpos;
+
/**
* Merges extension configs into the container builder.
*
* @author Fabien Potencier
*/
-class MergeExtensionConfigurationPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class MergeExtensionConfigurationPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$parameters = $container->getParameterBag()->all();
$definitions = $container->getDefinitions();
$aliases = $container->getAliases();
$exprLangProviders = $container->getExpressionLanguageProviders();
foreach ($container->getExtensions() as $extension) {
- if ($extension instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface) {
+ if ($extension instanceof PrependExtensionInterface) {
$extension->prepend($container);
}
}
@@ -46,29 +54,29 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
continue;
}
$resolvingBag = $container->getParameterBag();
- if ($resolvingBag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag && $extension instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension) {
+ if ($resolvingBag instanceof EnvPlaceholderParameterBag && $extension instanceof Extension) {
// create a dedicated bag so that we can track env vars per-extension
- $resolvingBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationParameterBag($resolvingBag);
+ $resolvingBag = new MergeExtensionConfigurationParameterBag($resolvingBag);
}
$config = $resolvingBag->resolveValue($config);
try {
- $tmpContainer = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder($extension, $resolvingBag);
+ $tmpContainer = new MergeExtensionConfigurationContainerBuilder($extension, $resolvingBag);
$tmpContainer->setResourceTracking($container->isTrackingResources());
$tmpContainer->addObjectResource($extension);
- if ($extension instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface && null !== ($configuration = $extension->getConfiguration($config, $tmpContainer))) {
+ if ($extension instanceof ConfigurationExtensionInterface && null !== ($configuration = $extension->getConfiguration($config, $tmpContainer))) {
$tmpContainer->addObjectResource($configuration);
}
foreach ($exprLangProviders as $provider) {
$tmpContainer->addExpressionLanguageProvider($provider);
}
$extension->load($config, $tmpContainer);
- } catch (\Exception $e) {
- if ($resolvingBag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationParameterBag) {
+ } catch (Exception $e) {
+ if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
$container->getParameterBag()->mergeEnvPlaceholders($resolvingBag);
}
throw $e;
}
- if ($resolvingBag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationParameterBag) {
+ if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
// don't keep track of env vars that are *overridden* when configs are merged
$resolvingBag->freezeAfterProcessing($extension, $tmpContainer);
}
@@ -82,7 +90,7 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
/**
* @internal
*/
-class MergeExtensionConfigurationParameterBag extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag
+class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag
{
private $processedEnvPlaceholders;
public function __construct(parent $parameterBag)
@@ -90,7 +98,7 @@ public function __construct(parent $parameterBag)
parent::__construct($parameterBag->all());
$this->mergeEnvPlaceholders($parameterBag);
}
- public function freezeAfterProcessing(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension $extension, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function freezeAfterProcessing(Extension $extension, ContainerBuilder $container)
{
if (!($config = $extension->getProcessedConfigs())) {
// Extension::processConfiguration() wasn't called, we cannot know how configs were merged
@@ -98,10 +106,10 @@ public function freezeAfterProcessing(\_PhpScoper5ea00cc67502b\Symfony\Component
}
$this->processedEnvPlaceholders = [];
// serialize config and container to catch env vars nested in object graphs
- $config = \serialize($config) . \serialize($container->getDefinitions()) . \serialize($container->getAliases()) . \serialize($container->getParameterBag()->all());
+ $config = serialize($config) . serialize($container->getDefinitions()) . serialize($container->getAliases()) . serialize($container->getParameterBag()->all());
foreach (parent::getEnvPlaceholders() as $env => $placeholders) {
foreach ($placeholders as $placeholder) {
- if (\false !== \stripos($config, $placeholder)) {
+ if (false !== stripos($config, $placeholder)) {
$this->processedEnvPlaceholders[$env] = $placeholders;
break;
}
@@ -121,55 +129,55 @@ public function getEnvPlaceholders()
*
* @internal
*/
-class MergeExtensionConfigurationContainerBuilder extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder
+class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder
{
private $extensionClass;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ExtensionInterface $extension, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface $parameterBag = null)
+ public function __construct(ExtensionInterface $extension, ParameterBagInterface $parameterBag = null)
{
parent::__construct($parameterBag);
- $this->extensionClass = \get_class($extension);
+ $this->extensionClass = get_class($extension);
}
/**
* {@inheritdoc}
*/
- public function addCompilerPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $type = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION)
+ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException(\sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', \get_class($pass), $this->extensionClass));
+ throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', get_class($pass), $this->extensionClass));
}
/**
* {@inheritdoc}
*/
- public function registerExtension(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ExtensionInterface $extension)
+ public function registerExtension(ExtensionInterface $extension)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException(\sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', \get_class($extension), $this->extensionClass));
+ throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_class($extension), $this->extensionClass));
}
/**
* {@inheritdoc}
*/
- public function compile($resolveEnvPlaceholders = \false)
+ public function compile($resolveEnvPlaceholders = false)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException(\sprintf('Cannot compile the container in extension "%s".', $this->extensionClass));
+ throw new LogicException(sprintf('Cannot compile the container in extension "%s".', $this->extensionClass));
}
/**
* {@inheritdoc}
*/
public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null)
{
- if (\true !== $format || !\is_string($value)) {
+ if (true !== $format || !is_string($value)) {
return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
}
$bag = $this->getParameterBag();
$value = $bag->resolveValue($value);
- if (!$bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag) {
+ if (!$bag instanceof EnvPlaceholderParameterBag) {
return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
}
foreach ($bag->getEnvPlaceholders() as $env => $placeholders) {
- if (\false === \strpos($env, ':')) {
+ if (false === strpos($env, ':')) {
continue;
}
foreach ($placeholders as $placeholder) {
- if (\false !== \stripos($value, $placeholder)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Using a cast in "env(%s)" is incompatible with resolution at compile time in "%s". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.', $env, $this->extensionClass));
+ if (false !== stripos($value, $placeholder)) {
+ throw new RuntimeException(sprintf('Using a cast in "env(%s)" is incompatible with resolution at compile time in "%s". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.', $env, $this->extensionClass));
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php
index 1b8b3210b..503f7ca77 100644
--- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php
+++ b/vendor/symfony/dependency-injection/Compiler/PassConfig.php
@@ -11,6 +11,17 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use ReflectionMethod;
+use function array_merge;
+use function call_user_func_array;
+use function count;
+use function func_get_arg;
+use function func_num_args;
+use function krsort;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Compiler Pass Configuration.
*
@@ -33,11 +44,11 @@ class PassConfig
private $removingPasses;
public function __construct()
{
- $this->mergePass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass();
- $this->beforeOptimizationPasses = [100 => [$resolveClassPass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterEnvVarProcessorsPass()], -1000 => [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ExtensionCompilerPass()]];
- $this->optimizationPasses = [[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass(\false, \false), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\FactoryReturnTypePass($resolveClassPass), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass(\false), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveTaggedIteratorArgumentPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveServiceSubscribersPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveReferencesToAliasesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInvalidReferencesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass(\false)]];
- $this->beforeRemovingPasses = [-100 => [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolvePrivatesPass()]];
- $this->removingPasses = [[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RemovePrivateAliasesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RemoveAbstractDefinitionsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass()]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveHotPathPass()]];
+ $this->mergePass = new MergeExtensionConfigurationPass();
+ $this->beforeOptimizationPasses = [100 => [$resolveClassPass = new ResolveClassPass(), new ResolveInstanceofConditionalsPass(), new RegisterEnvVarProcessorsPass()], -1000 => [new ExtensionCompilerPass()]];
+ $this->optimizationPasses = [[new ResolveChildDefinitionsPass(), new ServiceLocatorTagPass(), new RegisterServiceSubscribersPass(), new DecoratorServicePass(), new ResolveParameterPlaceHoldersPass(false, false), new ResolveFactoryClassPass(), new FactoryReturnTypePass($resolveClassPass), new CheckDefinitionValidityPass(), new ResolveNamedArgumentsPass(), new AutowireRequiredMethodsPass(), new ResolveBindingsPass(), new AutowirePass(false), new ResolveTaggedIteratorArgumentPass(), new ResolveServiceSubscribersPass(), new ResolveReferencesToAliasesPass(), new ResolveInvalidReferencesPass(), new AnalyzeServiceReferencesPass(true), new CheckCircularReferencesPass(), new CheckReferenceValidityPass(), new CheckArgumentsValidityPass(false)]];
+ $this->beforeRemovingPasses = [-100 => [new ResolvePrivatesPass()]];
+ $this->removingPasses = [[new RemovePrivateAliasesPass(), new ReplaceAliasByActualDefinitionPass(), new RemoveAbstractDefinitionsPass(), new RepeatedPass([new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass(), new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass()]), new DefinitionErrorExceptionPass(), new CheckExceptionOnInvalidReferenceBehaviorPass(), new ResolveHotPathPass()]];
}
/**
* Returns all passes in order to be processed.
@@ -46,7 +57,7 @@ public function __construct()
*/
public function getPasses()
{
- return \array_merge([$this->mergePass], $this->getBeforeOptimizationPasses(), $this->getOptimizationPasses(), $this->getBeforeRemovingPasses(), $this->getRemovingPasses(), $this->getAfterRemovingPasses());
+ return array_merge([$this->mergePass], $this->getBeforeOptimizationPasses(), $this->getOptimizationPasses(), $this->getBeforeRemovingPasses(), $this->getRemovingPasses(), $this->getAfterRemovingPasses());
}
/**
* Adds a pass.
@@ -56,22 +67,22 @@ public function getPasses()
*
* @throws InvalidArgumentException when a pass type doesn't exist
*/
- public function addPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION)
+ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION)
{
- if (\func_num_args() >= 3) {
- $priority = \func_get_arg(2);
+ if (func_num_args() >= 3) {
+ $priority = func_get_arg(2);
} else {
if (__CLASS__ !== static::class) {
- $r = new \ReflectionMethod($this, __FUNCTION__);
+ $r = new ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
- @\trigger_error(\sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
}
}
$priority = 0;
}
$property = $type . 'Passes';
if (!isset($this->{$property})) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid type "%s".', $type));
+ throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type));
}
$passes =& $this->{$property};
if (!isset($passes[$priority])) {
@@ -133,7 +144,7 @@ public function getMergePass()
{
return $this->mergePass;
}
- public function setMergePass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass)
+ public function setMergePass(CompilerPassInterface $pass)
{
$this->mergePass = $pass;
}
@@ -191,11 +202,11 @@ public function setRemovingPasses(array $passes)
*/
private function sortPasses(array $passes)
{
- if (0 === \count($passes)) {
+ if (0 === count($passes)) {
return [];
}
- \krsort($passes);
+ krsort($passes);
// Flatten the array
- return \call_user_func_array('array_merge', $passes);
+ return call_user_func_array('array_merge', $passes);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php b/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
index 6b54d37c0..f043f383c 100644
--- a/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
+++ b/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
@@ -12,6 +12,9 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function call_user_func_array;
+use function krsort;
+
/**
* Trait that allows a generic method to find and sort service by priority option in the tag.
*
@@ -33,16 +36,16 @@ trait PriorityTaggedServiceTrait
*
* @return Reference[]
*/
- private function findAndSortTaggedServices($tagName, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ private function findAndSortTaggedServices($tagName, ContainerBuilder $container)
{
$services = [];
- foreach ($container->findTaggedServiceIds($tagName, \true) as $serviceId => $attributes) {
+ foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) {
$priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
- $services[$priority][] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($serviceId);
+ $services[$priority][] = new Reference($serviceId);
}
if ($services) {
- \krsort($services);
- $services = \call_user_func_array('array_merge', $services);
+ krsort($services);
+ $services = call_user_func_array('array_merge', $services);
}
return $services;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
index c2cedb424..dc3a23105 100644
--- a/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
@@ -18,48 +18,53 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator;
+use function explode;
+use function implode;
+use function in_array;
+use function sprintf;
+
/**
* Creates the container.env_var_processors_locator service.
*
* @author Nicolas Grekas
*/
-class RegisterEnvVarProcessorsPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class RegisterEnvVarProcessorsPass implements CompilerPassInterface
{
private static $allowedTypes = ['array', 'bool', 'float', 'int', 'string'];
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$bag = $container->getParameterBag();
$types = [];
$processors = [];
foreach ($container->findTaggedServiceIds('container.env_var_processor') as $id => $tags) {
if (!($r = $container->getReflectionClass($class = $container->getDefinition($id)->getClass()))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
- } elseif (!$r->isSubclassOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessorInterface::class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service "%s" must implement interface "%s".', $id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessorInterface::class));
+ throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $id));
+ } elseif (!$r->isSubclassOf(EnvVarProcessorInterface::class)) {
+ throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $id, EnvVarProcessorInterface::class));
}
foreach ($class::getProvidedTypes() as $prefix => $type) {
- $processors[$prefix] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($id));
+ $processors[$prefix] = new ServiceClosureArgument(new Reference($id));
$types[$prefix] = self::validateProvidedTypes($type, $class);
}
}
- if ($bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag) {
- foreach (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor::getProvidedTypes() as $prefix => $type) {
+ if ($bag instanceof EnvPlaceholderParameterBag) {
+ foreach (EnvVarProcessor::getProvidedTypes() as $prefix => $type) {
if (!isset($types[$prefix])) {
- $types[$prefix] = self::validateProvidedTypes($type, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor::class);
+ $types[$prefix] = self::validateProvidedTypes($type, EnvVarProcessor::class);
}
}
$bag->setProvidedTypes($types);
}
if ($processors) {
- $container->register('container.env_var_processors_locator', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\true)->setArguments([$processors]);
+ $container->register('container.env_var_processors_locator', ServiceLocator::class)->setPublic(true)->setArguments([$processors]);
}
}
private static function validateProvidedTypes($types, $class)
{
- $types = \explode('|', $types);
+ $types = explode('|', $types);
foreach ($types as $type) {
- if (!\in_array($type, self::$allowedTypes)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid type "%s" returned by "%s::getProvidedTypes()", expected one of "%s".', $type, $class, \implode('", "', self::$allowedTypes)));
+ if (!in_array($type, self::$allowedTypes)) {
+ throw new InvalidArgumentException(sprintf('Invalid type "%s" returned by "%s::getProvidedTypes()", expected one of "%s".', $type, $class, implode('", "', self::$allowedTypes)));
}
}
return $types;
diff --git a/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php b/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
index b8f49baeb..082215925 100644
--- a/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
@@ -16,75 +16,90 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
+use ReflectionMethod;
+use function array_diff;
+use function array_key_exists;
+use function array_keys;
+use function count;
+use function gettype;
+use function implode;
+use function is_int;
+use function is_string;
+use function ksort;
+use function preg_match;
+use function sprintf;
+use function str_replace;
+use function substr;
+
/**
* Compiler pass to register tagged services that require a service locator.
*
* @author Nicolas Grekas
*/
-class RegisterServiceSubscribersPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class RegisterServiceSubscribersPass extends AbstractRecursivePass
{
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) {
+ if (!$value instanceof Definition || $value->isAbstract() || $value->isSynthetic() || !$value->hasTag('container.service_subscriber')) {
return parent::processValue($value, $isRoot);
}
$serviceMap = [];
$autowire = $value->isAutowired();
foreach ($value->getTag('container.service_subscriber') as $attributes) {
if (!$attributes) {
- $autowire = \true;
+ $autowire = true;
continue;
}
- \ksort($attributes);
- if ([] !== \array_diff(\array_keys($attributes), ['id', 'key'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".', \implode('", "', \array_keys($attributes)), $this->currentId));
+ ksort($attributes);
+ if ([] !== array_diff(array_keys($attributes), ['id', 'key'])) {
+ throw new InvalidArgumentException(sprintf('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "%s" given for service "%s".', implode('", "', array_keys($attributes)), $this->currentId));
}
- if (!\array_key_exists('id', $attributes)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".', $attributes['key'], $this->currentId));
+ if (!array_key_exists('id', $attributes)) {
+ throw new InvalidArgumentException(sprintf('Missing "id" attribute on "container.service_subscriber" tag with key="%s" for service "%s".', $attributes['key'], $this->currentId));
}
- if (!\array_key_exists('key', $attributes)) {
+ if (!array_key_exists('key', $attributes)) {
$attributes['key'] = $attributes['id'];
}
if (isset($serviceMap[$attributes['key']])) {
continue;
}
- $serviceMap[$attributes['key']] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($attributes['id']);
+ $serviceMap[$attributes['key']] = new Reference($attributes['id']);
}
$class = $value->getClass();
if (!($r = $this->container->getReflectionClass($class))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Class "%s" used for service "%s" cannot be found.', $class, $this->currentId));
+ throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $this->currentId));
}
- if (!$r->isSubclassOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface::class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service "%s" must implement interface "%s".', $this->currentId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface::class));
+ if (!$r->isSubclassOf(ServiceSubscriberInterface::class)) {
+ throw new InvalidArgumentException(sprintf('Service "%s" must implement interface "%s".', $this->currentId, ServiceSubscriberInterface::class));
}
$class = $r->name;
$subscriberMap = [];
- $declaringClass = (new \ReflectionMethod($class, 'getSubscribedServices'))->class;
+ $declaringClass = (new ReflectionMethod($class, 'getSubscribedServices'))->class;
foreach ($class::getSubscribedServices() as $key => $type) {
- if (!\is_string($type) || !\preg_match('/^\\??[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+$/', $type)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.', $class, $this->currentId, $key, \is_string($type) ? $type : \gettype($type)));
+ if (!is_string($type) || !preg_match('/^\\??[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+$/', $type)) {
+ throw new InvalidArgumentException(sprintf('"%s::getSubscribedServices()" must return valid PHP types for service "%s" key "%s", "%s" returned.', $class, $this->currentId, $key, is_string($type) ? $type : gettype($type)));
}
if ($optionalBehavior = '?' === $type[0]) {
- $type = \substr($type, 1);
- $optionalBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
+ $type = substr($type, 1);
+ $optionalBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
}
- if (\is_int($key)) {
+ if (is_int($key)) {
$key = $type;
}
if (!isset($serviceMap[$key])) {
if (!$autowire) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service "%s" misses a "container.service_subscriber" tag with "key"/"id" attributes corresponding to entry "%s" as returned by "%s::getSubscribedServices()".', $this->currentId, $key, $class));
+ throw new InvalidArgumentException(sprintf('Service "%s" misses a "container.service_subscriber" tag with "key"/"id" attributes corresponding to entry "%s" as returned by "%s::getSubscribedServices()".', $this->currentId, $key, $class));
}
- $serviceMap[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($type);
+ $serviceMap[$key] = new Reference($type);
}
- $subscriberMap[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference($this->container->normalizeId($serviceMap[$key]), $type, $declaringClass, $optionalBehavior ?: \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
+ $subscriberMap[$key] = new TypedReference($this->container->normalizeId($serviceMap[$key]), $type, $declaringClass, $optionalBehavior ?: ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
unset($serviceMap[$key]);
}
- if ($serviceMap = \array_keys($serviceMap)) {
- $message = \sprintf(1 < \count($serviceMap) ? 'keys "%s" do' : 'key "%s" does', \str_replace('%', '%%', \implode('", "', $serviceMap)));
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".', $message, $class, $this->currentId));
+ if ($serviceMap = array_keys($serviceMap)) {
+ $message = sprintf(1 < count($serviceMap) ? 'keys "%s" do' : 'key "%s" does', str_replace('%', '%%', implode('", "', $serviceMap)));
+ throw new InvalidArgumentException(sprintf('Service %s not exist in the map returned by "%s::getSubscribedServices()" for service "%s".', $message, $class, $this->currentId));
}
- $value->addTag('container.service_subscriber.locator', ['id' => (string) \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId)]);
+ $value->addTag('container.service_subscriber.locator', ['id' => (string) ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId)]);
return parent::processValue($value);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
index ff8f85db2..ebf664ccb 100644
--- a/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
@@ -11,20 +11,22 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use function sprintf;
+
/**
* Removes abstract Definitions.
*/
-class RemoveAbstractDefinitionsPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class RemoveAbstractDefinitionsPass implements CompilerPassInterface
{
/**
* Removes abstract definitions from the ContainerBuilder.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getDefinitions() as $id => $definition) {
if ($definition->isAbstract()) {
$container->removeDefinition($id);
- $container->log($this, \sprintf('Removed service "%s"; reason: abstract.', $id));
+ $container->log($this, sprintf('Removed service "%s"; reason: abstract.', $id));
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
index 0c6295a8a..dc547c625 100644
--- a/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
@@ -11,6 +11,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use function sprintf;
+
/**
* Remove private aliases from the container. They were only used to establish
* dependencies between services, and these dependencies have been resolved in
@@ -18,19 +20,19 @@
*
* @author Johannes M. Schmitt
*/
-class RemovePrivateAliasesPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class RemovePrivateAliasesPass implements CompilerPassInterface
{
/**
* Removes private aliases from the ContainerBuilder.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getAliases() as $id => $alias) {
if ($alias->isPublic() || $alias->isPrivate()) {
continue;
}
$container->removeAlias($id);
- $container->log($this, \sprintf('Removed service "%s"; reason: private alias.', $id));
+ $container->log($this, sprintf('Removed service "%s"; reason: private alias.', $id));
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
index 827c553f6..4938f381d 100644
--- a/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
@@ -11,28 +11,34 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use function array_unique;
+use function count;
+use function reset;
+use function serialize;
+use function sprintf;
+
/**
* Removes unused service definitions from the container.
*
* @author Johannes M. Schmitt
*/
-class RemoveUnusedDefinitionsPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatablePassInterface
+class RemoveUnusedDefinitionsPass implements RepeatablePassInterface
{
private $repeatedPass;
/**
* {@inheritdoc}
*/
- public function setRepeatedPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass $repeatedPass)
+ public function setRepeatedPass(RepeatedPass $repeatedPass)
{
$this->repeatedPass = $repeatedPass;
}
/**
* Processes the ContainerBuilder to remove unused definitions.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$graph = $container->getCompiler()->getServiceReferenceGraph();
- $hasChanged = \false;
+ $hasChanged = false;
foreach ($container->getDefinitions() as $id => $definition) {
if ($definition->isPublic() || $definition->isPrivate()) {
continue;
@@ -51,22 +57,22 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
$referencingAliases[] = $node->getValue();
}
}
- $isReferenced = \count(\array_unique($sourceIds)) - \count($referencingAliases) > 0;
+ $isReferenced = count(array_unique($sourceIds)) - count($referencingAliases) > 0;
} else {
$referencingAliases = [];
- $isReferenced = \false;
+ $isReferenced = false;
}
- if (1 === \count($referencingAliases) && \false === $isReferenced) {
- $container->setDefinition((string) \reset($referencingAliases), $definition);
+ if (1 === count($referencingAliases) && false === $isReferenced) {
+ $container->setDefinition((string) reset($referencingAliases), $definition);
$definition->setPublic(!$definition->isPrivate());
- $definition->setPrivate(\reset($referencingAliases)->isPrivate());
+ $definition->setPrivate(reset($referencingAliases)->isPrivate());
$container->removeDefinition($id);
- $container->log($this, \sprintf('Removed service "%s"; reason: replaces alias %s.', $id, \reset($referencingAliases)));
- } elseif (0 === \count($referencingAliases) && \false === $isReferenced) {
+ $container->log($this, sprintf('Removed service "%s"; reason: replaces alias %s.', $id, reset($referencingAliases)));
+ } elseif (0 === count($referencingAliases) && false === $isReferenced) {
$container->removeDefinition($id);
- $container->resolveEnvPlaceholders(\serialize($definition));
- $container->log($this, \sprintf('Removed service "%s"; reason: unused.', $id));
- $hasChanged = \true;
+ $container->resolveEnvPlaceholders(serialize($definition));
+ $container->log($this, sprintf('Removed service "%s"; reason: unused.', $id));
+ $hasChanged = true;
}
}
if ($hasChanged) {
diff --git a/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php b/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
index ed09d059d..33f82bdee 100644
--- a/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
+++ b/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
@@ -16,7 +16,7 @@
*
* @author Johannes M. Schmitt
*/
-interface RepeatablePassInterface extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+interface RepeatablePassInterface extends CompilerPassInterface
{
- public function setRepeatedPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass $repeatedPass);
+ public function setRepeatedPass(RepeatedPass $repeatedPass);
}
diff --git a/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php b/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
index 8968bccce..e25a77240 100644
--- a/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
@@ -17,12 +17,12 @@
*
* @author Johannes M. Schmitt
*/
-class RepeatedPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class RepeatedPass implements CompilerPassInterface
{
/**
* @var bool
*/
- private $repeat = \false;
+ private $repeat = false;
private $passes;
/**
* @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects
@@ -32,8 +32,8 @@ class RepeatedPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\Depende
public function __construct(array $passes)
{
foreach ($passes as $pass) {
- if (!$pass instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatablePassInterface) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('$passes must be an array of RepeatablePassInterface.');
+ if (!$pass instanceof RepeatablePassInterface) {
+ throw new InvalidArgumentException('$passes must be an array of RepeatablePassInterface.');
}
$pass->setRepeatedPass($this);
}
@@ -42,10 +42,10 @@ public function __construct(array $passes)
/**
* Process the repeatable passes that run more than once.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
do {
- $this->repeat = \false;
+ $this->repeat = false;
foreach ($this->passes as $pass) {
$pass->process($container);
}
@@ -56,7 +56,7 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
*/
public function setRepeat()
{
- $this->repeat = \true;
+ $this->repeat = true;
}
/**
* Returns the passes.
diff --git a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php b/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
index fe89f5c42..2462cebd5 100644
--- a/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
@@ -13,13 +13,15 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function sprintf;
+
/**
* Replaces aliases with actual service definitions, effectively removing these
* aliases.
*
* @author Johannes M. Schmitt
*/
-class ReplaceAliasByActualDefinitionPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass
{
private $replacements;
/**
@@ -27,7 +29,7 @@ class ReplaceAliasByActualDefinitionPass extends \_PhpScoper5ea00cc67502b\Symfon
*
* @throws InvalidArgumentException if the service definition does not exist
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
// First collect all alias targets that need to be replaced
$seenAliasTargets = [];
@@ -47,11 +49,11 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
continue;
}
// Process new target
- $seenAliasTargets[$targetId] = \true;
+ $seenAliasTargets[$targetId] = true;
try {
$definition = $container->getDefinition($targetId);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Unable to replace alias "%s" with actual definition "%s".', $definitionId, $targetId), null, $e);
+ } catch (InvalidArgumentException $e) {
+ throw new InvalidArgumentException(sprintf('Unable to replace alias "%s" with actual definition "%s".', $definitionId, $targetId), null, $e);
}
if ($definition->isPublic() || $definition->isPrivate()) {
continue;
@@ -70,13 +72,13 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && isset($this->replacements[$referenceId = $this->container->normalizeId($value)])) {
+ if ($value instanceof Reference && isset($this->replacements[$referenceId = $this->container->normalizeId($value)])) {
// Perform the replacement
$newId = $this->replacements[$referenceId];
- $value = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($newId, $value->getInvalidBehavior());
- $this->container->log($this, \sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId));
+ $value = new Reference($newId, $value->getInvalidBehavior());
+ $this->container->log($this, sprintf('Changed reference of service "%s" previously pointing to "%s" to "%s".', $this->currentId, $referenceId, $newId));
}
return parent::processValue($value, $isRoot);
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
index 025d082cb..23d3f41ba 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
@@ -18,10 +18,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
+use ReflectionFunctionAbstract;
+use function array_key_exists;
+use function array_pop;
+use function count;
+use function gettype;
+use function ksort;
+use function sprintf;
+
/**
* @author Guilhem Niot
*/
-class ResolveBindingsPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveBindingsPass extends AbstractRecursivePass
{
private $usedBindings = [];
private $unusedBindings = [];
@@ -29,20 +37,20 @@ class ResolveBindingsPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\Dep
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$this->usedBindings = $container->getRemovedBindingIds();
try {
parent::process($container);
- foreach ($this->unusedBindings as list($key, $serviceId)) {
- $message = \sprintf('Unused binding "%s" in service "%s".', $key, $serviceId);
+ foreach ($this->unusedBindings as [$key, $serviceId]) {
+ $message = sprintf('Unused binding "%s" in service "%s".', $key, $serviceId);
if ($this->errorMessages) {
- $message .= \sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : '');
+ $message .= sprintf("\nCould be related to%s:", 1 < count($this->errorMessages) ? ' one of' : '');
}
foreach ($this->errorMessages as $m) {
$message .= "\n - " . $m;
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException($message);
+ throw new InvalidArgumentException($message);
}
} finally {
$this->usedBindings = [];
@@ -53,9 +61,9 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference && $value->getType() === $this->container->normalizeId($value)) {
+ if ($value instanceof TypedReference && $value->getType() === $this->container->normalizeId($value)) {
// Already checked
$bindings = $this->container->getDefinition($this->currentId)->getBindings();
if (isset($bindings[$value->getType()])) {
@@ -63,13 +71,13 @@ protected function processValue($value, $isRoot = \false)
}
return parent::processValue($value, $isRoot);
}
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || !($bindings = $value->getBindings())) {
+ if (!$value instanceof Definition || !($bindings = $value->getBindings())) {
return parent::processValue($value, $isRoot);
}
foreach ($bindings as $key => $binding) {
- list($bindingValue, $bindingId, $used) = $binding->getValues();
+ [$bindingValue, $bindingId, $used] = $binding->getValues();
if ($used) {
- $this->usedBindings[$bindingId] = \true;
+ $this->usedBindings[$bindingId] = true;
unset($this->unusedBindings[$bindingId]);
} elseif (!isset($this->usedBindings[$bindingId])) {
$this->unusedBindings[$bindingId] = [$key, $this->currentId];
@@ -77,8 +85,8 @@ protected function processValue($value, $isRoot = \false)
if (isset($key[0]) && '$' === $key[0]) {
continue;
}
- if (null !== $bindingValue && !$bindingValue instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && !$bindingValue instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid value for binding key "%s" for service "%s": expected null, an instance of "%s" or an instance of "%s", "%s" given.', $key, $this->currentId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition::class, \gettype($bindingValue)));
+ if (null !== $bindingValue && !$bindingValue instanceof Reference && !$bindingValue instanceof Definition) {
+ throw new InvalidArgumentException(sprintf('Invalid value for binding key "%s" for service "%s": expected null, an instance of "%s" or an instance of "%s", "%s" given.', $key, $this->currentId, Reference::class, Definition::class, gettype($bindingValue)));
}
}
if ($value->isAbstract()) {
@@ -86,22 +94,22 @@ protected function processValue($value, $isRoot = \false)
}
$calls = $value->getMethodCalls();
try {
- if ($constructor = $this->getConstructor($value, \false)) {
+ if ($constructor = $this->getConstructor($value, false)) {
$calls[] = [$constructor, $value->getArguments()];
}
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
+ } catch (RuntimeException $e) {
$this->errorMessages[] = $e->getMessage();
$this->container->getDefinition($this->currentId)->addError($e->getMessage());
return parent::processValue($value, $isRoot);
}
foreach ($calls as $i => $call) {
- list($method, $arguments) = $call;
- if ($method instanceof \ReflectionFunctionAbstract) {
+ [$method, $arguments] = $call;
+ if ($method instanceof ReflectionFunctionAbstract) {
$reflectionMethod = $method;
} else {
try {
$reflectionMethod = $this->getReflectionMethod($value, $method);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
+ } catch (RuntimeException $e) {
if ($value->getFactory()) {
continue;
}
@@ -109,26 +117,26 @@ protected function processValue($value, $isRoot = \false)
}
}
foreach ($reflectionMethod->getParameters() as $key => $parameter) {
- if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
+ if (array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
continue;
}
- if (\array_key_exists('$' . $parameter->name, $bindings)) {
+ if (array_key_exists('$' . $parameter->name, $bindings)) {
$arguments[$key] = $this->getBindingValue($bindings['$' . $parameter->name]);
continue;
}
- $typeHint = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper::getTypeHint($reflectionMethod, $parameter, \true);
+ $typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true);
if (!isset($bindings[$typeHint])) {
continue;
}
$arguments[$key] = $this->getBindingValue($bindings[$typeHint]);
}
if ($arguments !== $call[1]) {
- \ksort($arguments);
+ ksort($arguments);
$calls[$i][1] = $arguments;
}
}
if ($constructor) {
- list(, $arguments) = \array_pop($calls);
+ [, $arguments] = array_pop($calls);
if ($arguments !== $value->getArguments()) {
$value->setArguments($arguments);
}
@@ -138,10 +146,10 @@ protected function processValue($value, $isRoot = \false)
}
return parent::processValue($value, $isRoot);
}
- private function getBindingValue(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument $binding)
+ private function getBindingValue(BoundArgument $binding)
{
- list($bindingValue, $bindingId) = $binding->getValues();
- $this->usedBindings[$bindingId] = \true;
+ [$bindingValue, $bindingId] = $binding->getValues();
+ $this->usedBindings[$bindingId] = true;
unset($this->unusedBindings[$bindingId]);
return $bindingValue;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
index 298d25af7..3b4ff16a2 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
@@ -15,6 +15,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use ReflectionProperty;
+use function array_merge;
+use function array_search;
+use function array_slice;
+use function class_alias;
+use function is_numeric;
+use function sprintf;
+use function strlen;
+use function strpos;
+use function substr;
+
/**
* This replaces all ChildDefinition instances with their equivalent fully
* merged Definition instance.
@@ -22,12 +33,12 @@
* @author Johannes M. Schmitt
* @author Nicolas Grekas
*/
-class ResolveChildDefinitionsPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveChildDefinitionsPass extends AbstractRecursivePass
{
private $currentPath;
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
if ($isRoot) {
@@ -35,7 +46,7 @@ protected function processValue($value, $isRoot = \false)
// container to ensure we are not operating on stale data
$value = $this->container->getDefinition($this->currentId);
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
+ if ($value instanceof ChildDefinition) {
$this->currentPath = [];
$value = $this->resolveDefinition($value);
if ($isRoot) {
@@ -51,50 +62,50 @@ protected function processValue($value, $isRoot = \false)
*
* @throws RuntimeException When the definition is invalid
*/
- private function resolveDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition $definition)
+ private function resolveDefinition(ChildDefinition $definition)
{
try {
return $this->doResolveDefinition($definition);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException $e) {
+ } catch (ServiceCircularReferenceException $e) {
throw $e;
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface $e) {
- $r = new \ReflectionProperty($e, 'message');
- $r->setAccessible(\true);
- $r->setValue($e, \sprintf('Service "%s": %s', $this->currentId, $e->getMessage()));
+ } catch (ExceptionInterface $e) {
+ $r = new ReflectionProperty($e, 'message');
+ $r->setAccessible(true);
+ $r->setValue($e, sprintf('Service "%s": %s', $this->currentId, $e->getMessage()));
throw $e;
}
}
- private function doResolveDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition $definition)
+ private function doResolveDefinition(ChildDefinition $definition)
{
if (!$this->container->has($parent = $definition->getParent())) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Parent definition "%s" does not exist.', $parent));
+ throw new RuntimeException(sprintf('Parent definition "%s" does not exist.', $parent));
}
- $searchKey = \array_search($parent, $this->currentPath);
+ $searchKey = array_search($parent, $this->currentPath);
$this->currentPath[] = $parent;
- if (\false !== $searchKey) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($parent, \array_slice($this->currentPath, $searchKey));
+ if (false !== $searchKey) {
+ throw new ServiceCircularReferenceException($parent, array_slice($this->currentPath, $searchKey));
}
$parentDef = $this->container->findDefinition($parent);
- if ($parentDef instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
+ if ($parentDef instanceof ChildDefinition) {
$id = $this->currentId;
$this->currentId = $parent;
$parentDef = $this->resolveDefinition($parentDef);
$this->container->setDefinition($parent, $parentDef);
$this->currentId = $id;
}
- $this->container->log($this, \sprintf('Resolving inheritance for "%s" (parent: %s).', $this->currentId, $parent));
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $this->container->log($this, sprintf('Resolving inheritance for "%s" (parent: %s).', $this->currentId, $parent));
+ $def = new Definition();
// merge in parent definition
// purposely ignored attributes: abstract, shared, tags, autoconfigured
$def->setClass($parentDef->getClass());
$def->setArguments($parentDef->getArguments());
$def->setMethodCalls($parentDef->getMethodCalls());
$def->setProperties($parentDef->getProperties());
- if ($parentDef->getAutowiringTypes(\false)) {
- $def->setAutowiringTypes($parentDef->getAutowiringTypes(\false));
+ if ($parentDef->getAutowiringTypes(false)) {
+ $def->setAutowiringTypes($parentDef->getAutowiringTypes(false));
}
if ($parentDef->isDeprecated()) {
- $def->setDeprecated(\true, $parentDef->getDeprecationMessage('%service_id%'));
+ $def->setDeprecated(true, $parentDef->getDeprecationMessage('%service_id%'));
}
$def->setFactory($parentDef->getFactory());
$def->setConfigurator($parentDef->getConfigurator());
@@ -145,10 +156,10 @@ private function doResolveDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\
}
// merge arguments
foreach ($definition->getArguments() as $k => $v) {
- if (\is_numeric($k)) {
+ if (is_numeric($k)) {
$def->addArgument($v);
- } elseif (0 === \strpos($k, 'index_')) {
- $def->replaceArgument((int) \substr($k, \strlen('index_')), $v);
+ } elseif (0 === strpos($k, 'index_')) {
+ $def->replaceArgument((int) substr($k, strlen('index_')), $v);
} else {
$def->setArgument($k, $v);
}
@@ -159,10 +170,10 @@ private function doResolveDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\
}
// append method calls
if ($calls = $definition->getMethodCalls()) {
- $def->setMethodCalls(\array_merge($def->getMethodCalls(), $calls));
+ $def->setMethodCalls(array_merge($def->getMethodCalls(), $calls));
}
// merge autowiring types
- foreach ($definition->getAutowiringTypes(\false) as $autowiringType) {
+ foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
$def->addAutowiringType($autowiringType);
}
// these attributes are always taken from the child
@@ -174,4 +185,4 @@ private function doResolveDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\
return $def;
}
}
-\class_alias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass::class);
+class_alias(ResolveChildDefinitionsPass::class, ResolveDefinitionTemplatesPass::class);
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
index e437ab9b8..46e2867f2 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
@@ -13,26 +13,31 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function class_exists;
+use function preg_match;
+use function sprintf;
+use function strtolower;
+
/**
* @author Nicolas Grekas
*/
-class ResolveClassPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class ResolveClassPass implements CompilerPassInterface
{
private $changes = [];
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getDefinitions() as $id => $definition) {
if ($definition->isSynthetic() || null !== $definition->getClass()) {
continue;
}
- if (\preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)++$/', $id)) {
- if ($definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition && !\class_exists($id)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service definition "%s" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id));
+ if (preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)++$/', $id)) {
+ if ($definition instanceof ChildDefinition && !class_exists($id)) {
+ throw new InvalidArgumentException(sprintf('Service definition "%s" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.', $id));
}
- $this->changes[\strtolower($id)] = $id;
+ $this->changes[strtolower($id)] = $id;
$definition->setClass($id);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php
index ebdf38d8a..70b989f9f 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php
@@ -10,9 +10,13 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
-@\trigger_error('The ' . __NAMESPACE__ . '\\ResolveDefinitionTemplatesPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the ResolveChildDefinitionsPass class instead.', \E_USER_DEPRECATED);
-\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass::class);
-if (\false) {
+use function class_exists;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
+@trigger_error('The ' . __NAMESPACE__ . '\\ResolveDefinitionTemplatesPass class is deprecated since Symfony 3.4 and will be removed in 4.0. Use the ResolveChildDefinitionsPass class instead.', E_USER_DEPRECATED);
+class_exists(ResolveChildDefinitionsPass::class);
+if (false) {
/**
* This definition decorates another definition.
*
@@ -20,7 +24,7 @@
*
* @deprecated The ResolveDefinitionTemplatesPass class is deprecated since version 3.4 and will be removed in 4.0. Use the ResolveChildDefinitionsPass class instead.
*/
- class ResolveDefinitionTemplatesPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+ class ResolveDefinitionTemplatesPass extends AbstractRecursivePass
{
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
index c7e39477f..a3333e38f 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
@@ -11,28 +11,33 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
+use function array_combine;
+use function array_keys;
+use function is_array;
+use function is_string;
+
/**
* Replaces env var placeholders by their current values.
*/
-class ResolveEnvPlaceholdersPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveEnvPlaceholdersPass extends AbstractRecursivePass
{
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (\is_string($value)) {
- return $this->container->resolveEnvPlaceholders($value, \true);
+ if (is_string($value)) {
+ return $this->container->resolveEnvPlaceholders($value, true);
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if ($value instanceof Definition) {
$changes = $value->getChanges();
if (isset($changes['class'])) {
- $value->setClass($this->container->resolveEnvPlaceholders($value->getClass(), \true));
+ $value->setClass($this->container->resolveEnvPlaceholders($value->getClass(), true));
}
if (isset($changes['file'])) {
- $value->setFile($this->container->resolveEnvPlaceholders($value->getFile(), \true));
+ $value->setFile($this->container->resolveEnvPlaceholders($value->getFile(), true));
}
}
$value = parent::processValue($value, $isRoot);
- if ($value && \is_array($value) && !$isRoot) {
- $value = \array_combine($this->container->resolveEnvPlaceholders(\array_keys($value), \true), $value);
+ if ($value && is_array($value) && !$isRoot) {
+ $value = array_combine($this->container->resolveEnvPlaceholders(array_keys($value), true), $value);
}
return $value;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
index bca98ab45..18f095169 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
@@ -12,19 +12,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function is_array;
+use function sprintf;
+
/**
* @author Maxime Steinhausser
*/
-class ResolveFactoryClassPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveFactoryClassPass extends AbstractRecursivePass
{
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) {
+ if ($value instanceof Definition && is_array($factory = $value->getFactory()) && null === $factory[0]) {
if (null === ($class = $value->getClass())) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?', $this->currentId));
+ throw new RuntimeException(sprintf('The "%s" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?', $this->currentId));
}
$factory[0] = $class;
$value->setFactory($factory);
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
index c63046f42..8e2f01c35 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
@@ -19,7 +19,7 @@
*
* @author Nicolas Grekas
*/
-class ResolveHotPathPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveHotPathPass extends AbstractRecursivePass
{
private $tagName;
private $resolvedIds = [];
@@ -30,7 +30,7 @@ public function __construct($tagName = 'container.hot_path')
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
try {
parent::process($container);
@@ -42,20 +42,20 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
+ if ($value instanceof ArgumentInterface) {
return $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition && $isRoot && (isset($this->resolvedIds[$this->currentId]) || !$value->hasTag($this->tagName) || $value->isDeprecated())) {
+ if ($value instanceof Definition && $isRoot && (isset($this->resolvedIds[$this->currentId]) || !$value->hasTag($this->tagName) || $value->isDeprecated())) {
return $value->isDeprecated() ? $value->clearTag($this->tagName) : $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = $this->container->normalizeId($value))) {
+ if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = $this->container->normalizeId($value))) {
$definition = $this->container->findDefinition($id);
if (!$definition->hasTag($this->tagName) && !$definition->isDeprecated()) {
- $this->resolvedIds[$id] = \true;
+ $this->resolvedIds[$id] = true;
$definition->addTag($this->tagName);
- parent::processValue($definition, \false);
+ parent::processValue($definition, false);
}
return $value;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php
index 712672630..8911a379a 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveInstanceofConditionalsPass.php
@@ -15,35 +15,44 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function array_map;
+use function count;
+use function in_array;
+use function is_subclass_of;
+use function serialize;
+use function sprintf;
+use function substr_replace;
+use function unserialize;
+
/**
* Applies instanceof conditionals to definitions.
*
* @author Nicolas Grekas
*/
-class ResolveInstanceofConditionalsPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class ResolveInstanceofConditionalsPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) {
if ($definition->getArguments()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Autoconfigured instanceof for type "%s" defines arguments but these are not supported and should be removed.', $interface));
+ throw new InvalidArgumentException(sprintf('Autoconfigured instanceof for type "%s" defines arguments but these are not supported and should be removed.', $interface));
}
if ($definition->getMethodCalls()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Autoconfigured instanceof for type "%s" defines method calls but these are not supported and should be removed.', $interface));
+ throw new InvalidArgumentException(sprintf('Autoconfigured instanceof for type "%s" defines method calls but these are not supported and should be removed.', $interface));
}
}
foreach ($container->getDefinitions() as $id => $definition) {
- if ($definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
+ if ($definition instanceof ChildDefinition) {
// don't apply "instanceof" to children: it will be applied to their parent
continue;
}
$container->setDefinition($id, $this->processDefinition($container, $id, $definition));
}
}
- private function processDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, $id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ private function processDefinition(ContainerBuilder $container, $id, Definition $definition)
{
$instanceofConditionals = $definition->getInstanceofConditionals();
$autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : [];
@@ -59,16 +68,16 @@ private function processDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\De
$instanceofTags = [];
$reflectionClass = null;
foreach ($conditionals as $interface => $instanceofDefs) {
- if ($interface !== $class && !(null === $reflectionClass ? $reflectionClass = $container->getReflectionClass($class, \false) ?: \false : $reflectionClass)) {
+ if ($interface !== $class && !(null === $reflectionClass ? $reflectionClass = $container->getReflectionClass($class, false) ?: false : $reflectionClass)) {
continue;
}
- if ($interface !== $class && !\is_subclass_of($class, $interface)) {
+ if ($interface !== $class && !is_subclass_of($class, $interface)) {
continue;
}
foreach ($instanceofDefs as $key => $instanceofDef) {
/** @var ChildDefinition $instanceofDef */
$instanceofDef = clone $instanceofDef;
- $instanceofDef->setAbstract(\true)->setParent($parent ?: 'abstract.instanceof.' . $id);
+ $instanceofDef->setAbstract(true)->setParent($parent ?: 'abstract.instanceof.' . $id);
$parent = 'instanceof.' . $interface . '.' . $key . '.' . $id;
$container->setDefinition($parent, $instanceofDef);
$instanceofTags[] = $instanceofDef->getTags();
@@ -83,19 +92,19 @@ private function processDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\De
$abstract = $container->setDefinition('abstract.instanceof.' . $id, $definition);
// cast Definition to ChildDefinition
$definition->setBindings([]);
- $definition = \serialize($definition);
- $definition = \substr_replace($definition, '53', 2, 2);
- $definition = \substr_replace($definition, 'Child', 44, 0);
- $definition = \unserialize($definition);
+ $definition = serialize($definition);
+ $definition = substr_replace($definition, '53', 2, 2);
+ $definition = substr_replace($definition, 'Child', 44, 0);
+ $definition = unserialize($definition);
$definition->setParent($parent);
if (null !== $shared && !isset($definition->getChanges()['shared'])) {
$definition->setShared($shared);
}
- $i = \count($instanceofTags);
+ $i = count($instanceofTags);
while (0 <= --$i) {
foreach ($instanceofTags[$i] as $k => $v) {
foreach ($v as $v) {
- if ($definition->hasTag($k) && \in_array($v, $definition->getTag($k))) {
+ if ($definition->hasTag($k) && in_array($v, $definition->getTag($k))) {
continue;
}
$definition->addTag($k, $v);
@@ -104,20 +113,20 @@ private function processDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\De
}
$definition->setBindings($bindings);
// reset fields with "merge" behavior
- $abstract->setBindings([])->setArguments([])->setMethodCalls([])->setDecoratedService(null)->setTags([])->setAbstract(\true);
+ $abstract->setBindings([])->setArguments([])->setMethodCalls([])->setDecoratedService(null)->setTags([])->setAbstract(true);
}
return $definition;
}
- private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, ContainerBuilder $container)
{
// make each value an array of ChildDefinition
- $conditionals = \array_map(function ($childDef) {
+ $conditionals = array_map(function ($childDef) {
return [$childDef];
}, $autoconfiguredInstanceof);
foreach ($instanceofConditionals as $interface => $instanceofDef) {
// make sure the interface/class exists (but don't validate automaticInstanceofConditionals)
if (!$container->getReflectionClass($interface)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('"%s" is set as an "instanceof" conditional, but it does not exist.', $interface));
+ throw new RuntimeException(sprintf('"%s" is set as an "instanceof" conditional, but it does not exist.', $interface));
}
if (!isset($autoconfiguredInstanceof[$interface])) {
$conditionals[$interface] = [];
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
index 28167e166..794740dcc 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
@@ -17,23 +17,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function array_values;
+use function is_array;
+
/**
* Emulates the invalid behavior if the reference is not found within the
* container.
*
* @author Johannes M. Schmitt
*/
-class ResolveInvalidReferencesPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class ResolveInvalidReferencesPass implements CompilerPassInterface
{
private $container;
private $signalingException;
/**
* Process the ContainerBuilder to resolve invalid references.
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$this->container = $container;
- $this->signalingException = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Invalid reference.');
+ $this->signalingException = new RuntimeException('Invalid reference.');
try {
$this->processValue($container->getDefinitions(), 1);
} finally {
@@ -47,28 +50,28 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
*/
private function processValue($value, $rootLevel = 0, $level = 0)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument) {
+ if ($value instanceof ServiceClosureArgument) {
$value->setValues($this->processValue($value->getValues(), 1, 1));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
+ } elseif ($value instanceof ArgumentInterface) {
$value->setValues($this->processValue($value->getValues(), $rootLevel, 1 + $level));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($value instanceof Definition) {
if ($value->isSynthetic() || $value->isAbstract()) {
return $value;
}
$value->setArguments($this->processValue($value->getArguments(), 0));
$value->setProperties($this->processValue($value->getProperties(), 1));
$value->setMethodCalls($this->processValue($value->getMethodCalls(), 2));
- } elseif (\is_array($value)) {
+ } elseif (is_array($value)) {
$i = 0;
foreach ($value as $k => $v) {
try {
- if (\false !== $i && $k !== $i++) {
- $i = \false;
+ if (false !== $i && $k !== $i++) {
+ $i = false;
}
if ($v !== ($processedValue = $this->processValue($v, $rootLevel, 1 + $level))) {
$value[$k] = $processedValue;
}
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
+ } catch (RuntimeException $e) {
if ($rootLevel < $level || $rootLevel && !$level) {
unset($value[$k]);
} elseif ($rootLevel) {
@@ -79,18 +82,18 @@ private function processValue($value, $rootLevel = 0, $level = 0)
}
}
// Ensure numerically indexed arguments have sequential numeric keys.
- if (\false !== $i) {
- $value = \array_values($value);
+ if (false !== $i) {
+ $value = array_values($value);
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($value instanceof Reference) {
if ($this->container->has($value)) {
return $value;
}
$invalidBehavior = $value->getInvalidBehavior();
// resolve invalid behavior
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) {
+ if (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) {
$value = null;
- } elseif (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) {
+ } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) {
if (0 < $level || $rootLevel) {
throw $this->signalingException;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
index 3dc0f3503..065079f0b 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
@@ -14,35 +14,43 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use ReflectionMethod;
+use function array_key_exists;
+use function array_pop;
+use function gettype;
+use function is_int;
+use function ksort;
+use function sprintf;
+
/**
* Resolves named arguments to their corresponding numeric index.
*
* @author Kévin Dunglas
*/
-class ResolveNamedArgumentsPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveNamedArgumentsPass extends AbstractRecursivePass
{
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
$calls = $value->getMethodCalls();
$calls[] = ['__construct', $value->getArguments()];
foreach ($calls as $i => $call) {
- list($method, $arguments) = $call;
+ [$method, $arguments] = $call;
$parameters = null;
$resolvedArguments = [];
foreach ($arguments as $key => $argument) {
- if (\is_int($key)) {
+ if (is_int($key)) {
$resolvedArguments[$key] = $argument;
continue;
}
if (null === $parameters) {
$r = $this->getReflectionMethod($value, $method);
- $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId;
+ $class = $r instanceof ReflectionMethod ? $r->class : $this->currentId;
$method = $r->getName();
$parameters = $r->getParameters();
}
@@ -53,28 +61,28 @@ protected function processValue($value, $isRoot = \false)
continue 2;
}
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid service "%s": method "%s()" has no argument named "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method, $key));
+ throw new InvalidArgumentException(sprintf('Invalid service "%s": method "%s()" has no argument named "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method, $key));
}
- if (null !== $argument && !$argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && !$argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid service "%s": the value of argument "%s" of method "%s()" must be null, an instance of "%s" or an instance of "%s", "%s" given.', $this->currentId, $key, $class !== $this->currentId ? $class . '::' . $method : $method, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition::class, \gettype($argument)));
+ if (null !== $argument && !$argument instanceof Reference && !$argument instanceof Definition) {
+ throw new InvalidArgumentException(sprintf('Invalid service "%s": the value of argument "%s" of method "%s()" must be null, an instance of "%s" or an instance of "%s", "%s" given.', $this->currentId, $key, $class !== $this->currentId ? $class . '::' . $method : $method, Reference::class, Definition::class, gettype($argument)));
}
- $typeFound = \false;
+ $typeFound = false;
foreach ($parameters as $j => $p) {
- if (!\array_key_exists($j, $resolvedArguments) && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper::getTypeHint($r, $p, \true) === $key) {
+ if (!array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) {
$resolvedArguments[$j] = $argument;
- $typeFound = \true;
+ $typeFound = true;
}
}
if (!$typeFound) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid service "%s": method "%s()" has no argument type-hinted as "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method, $key));
+ throw new InvalidArgumentException(sprintf('Invalid service "%s": method "%s()" has no argument type-hinted as "%s". Check your service definition.', $this->currentId, $class !== $this->currentId ? $class . '::' . $method : $method, $key));
}
}
if ($resolvedArguments !== $call[1]) {
- \ksort($resolvedArguments);
+ ksort($resolvedArguments);
$calls[$i][1] = $resolvedArguments;
}
}
- list(, $arguments) = \array_pop($calls);
+ [, $arguments] = array_pop($calls);
if ($arguments !== $value->getArguments()) {
$value->setArguments($arguments);
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
index 17fb2620b..8f1f4d21c 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
@@ -13,17 +13,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
+use function array_combine;
+use function array_keys;
+use function is_array;
+use function is_string;
+
/**
* Resolves all parameter placeholders "%somevalue%" to their real values.
*
* @author Johannes M. Schmitt
*/
-class ResolveParameterPlaceHoldersPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass
{
private $bag;
private $resolveArrays;
private $throwOnResolveException;
- public function __construct($resolveArrays = \true, $throwOnResolveException = \true)
+ public function __construct($resolveArrays = true, $throwOnResolveException = true)
{
$this->resolveArrays = $resolveArrays;
$this->throwOnResolveException = $throwOnResolveException;
@@ -33,7 +38,7 @@ public function __construct($resolveArrays = \true, $throwOnResolveException = \
*
* @throws ParameterNotFoundException
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$this->bag = $container->getParameterBag();
try {
@@ -44,28 +49,28 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
$aliases[$this->bag->resolveValue($name)] = $target;
}
$container->setAliases($aliases);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
$e->setSourceId($this->currentId);
throw $e;
}
$this->bag->resolve();
$this->bag = null;
}
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (\is_string($value)) {
+ if (is_string($value)) {
try {
$v = $this->bag->resolveValue($value);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
if ($this->throwOnResolveException) {
throw $e;
}
$v = null;
$this->container->getDefinition($this->currentId)->addError($e->getMessage());
}
- return $this->resolveArrays || !$v || !\is_array($v) ? $v : $value;
+ return $this->resolveArrays || !$v || !is_array($v) ? $v : $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if ($value instanceof Definition) {
$value->setBindings($this->processValue($value->getBindings()));
$changes = $value->getChanges();
if (isset($changes['class'])) {
@@ -76,8 +81,8 @@ protected function processValue($value, $isRoot = \false)
}
}
$value = parent::processValue($value, $isRoot);
- if ($value && \is_array($value)) {
- $value = \array_combine($this->bag->resolveValue(\array_keys($value)), $value);
+ if ($value && is_array($value)) {
+ $value = array_combine($this->bag->resolveValue(array_keys($value)), $value);
}
return $value;
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
index dd87a2811..cf86af7c5 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
@@ -14,23 +14,23 @@
/**
* @author Nicolas Grekas
*/
-class ResolvePrivatesPass implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class ResolvePrivatesPass implements CompilerPassInterface
{
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
foreach ($container->getDefinitions() as $id => $definition) {
if ($definition->isPrivate()) {
- $definition->setPublic(\false);
- $definition->setPrivate(\true);
+ $definition->setPublic(false);
+ $definition->setPrivate(true);
}
}
foreach ($container->getAliases() as $id => $alias) {
if ($alias->isPrivate()) {
- $alias->setPublic(\false);
- $alias->setPrivate(\true);
+ $alias->setPublic(false);
+ $alias->setPrivate(true);
}
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
index 4b7faed6d..39c2f6c07 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
@@ -13,17 +13,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function array_keys;
+use function array_merge;
+
/**
* Replaces all references to aliases with references to the actual service.
*
* @author Johannes M. Schmitt
*/
-class ResolveReferencesToAliasesPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveReferencesToAliasesPass extends AbstractRecursivePass
{
/**
* {@inheritdoc}
*/
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
parent::process($container);
foreach ($container->getAliases() as $id => $alias) {
@@ -36,12 +39,12 @@ public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ if ($value instanceof Reference) {
$defId = $this->getDefinitionId($id = $this->container->normalizeId($value), $this->container);
if ($defId !== $id) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($defId, $value->getInvalidBehavior());
+ return new Reference($defId, $value->getInvalidBehavior());
}
}
return parent::processValue($value);
@@ -53,14 +56,14 @@ protected function processValue($value, $isRoot = \false)
*
* @return string The definition id with aliases resolved
*/
- private function getDefinitionId($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ private function getDefinitionId($id, ContainerBuilder $container)
{
$seen = [];
while ($container->hasAlias($id)) {
if (isset($seen[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($id, \array_merge(\array_keys($seen), [$id]));
+ throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), [$id]));
}
- $seen[$id] = \true;
+ $seen[$id] = true;
$id = $container->normalizeId($container->getAlias($id));
}
return $id;
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
index ded28fc2d..475eb4cb8 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
@@ -18,15 +18,15 @@
*
* @author Nicolas Grekas
*/
-class ResolveServiceSubscribersPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveServiceSubscribersPass extends AbstractRecursivePass
{
private $serviceLocator;
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && $this->serviceLocator && \_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class === $this->container->normalizeId($value)) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($this->serviceLocator);
+ if ($value instanceof Reference && $this->serviceLocator && ContainerInterface::class === $this->container->normalizeId($value)) {
+ return new Reference($this->serviceLocator);
}
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (!$value instanceof Definition) {
return parent::processValue($value, $isRoot);
}
$serviceLocator = $this->serviceLocator;
diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
index 69338cf0a..ce5f058cb 100644
--- a/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
@@ -16,15 +16,15 @@
*
* @author Roland Franssen
*/
-class ResolveTaggedIteratorArgumentPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass
{
use PriorityTaggedServiceTrait;
/**
* {@inheritdoc}
*/
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument) {
+ if (!$value instanceof TaggedIteratorArgument) {
return parent::processValue($value, $isRoot);
}
$value->setValues($this->findAndSortTaggedServices($value->getTag(), $this->container));
diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php b/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
index f680e4d28..2bfe34d7a 100644
--- a/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
+++ b/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
@@ -17,53 +17,61 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator;
+use function get_class;
+use function gettype;
+use function is_array;
+use function is_int;
+use function is_object;
+use function ksort;
+use function sprintf;
+
/**
* Applies the "container.service_locator" tag by wrapping references into ServiceClosureArgument instances.
*
* @author Nicolas Grekas
*/
-final class ServiceLocatorTagPass extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AbstractRecursivePass
+final class ServiceLocatorTagPass extends AbstractRecursivePass
{
- protected function processValue($value, $isRoot = \false)
+ protected function processValue($value, $isRoot = false)
{
- if (!$value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || !$value->hasTag('container.service_locator')) {
+ if (!$value instanceof Definition || !$value->hasTag('container.service_locator')) {
return parent::processValue($value, $isRoot);
}
if (!$value->getClass()) {
- $value->setClass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class);
+ $value->setClass(ServiceLocator::class);
}
$arguments = $value->getArguments();
- if (!isset($arguments[0]) || !\is_array($arguments[0])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.', $this->currentId));
+ if (!isset($arguments[0]) || !is_array($arguments[0])) {
+ throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set.', $this->currentId));
}
$i = 0;
foreach ($arguments[0] as $k => $v) {
- if ($v instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument) {
+ if ($v instanceof ServiceClosureArgument) {
continue;
}
- if (!$v instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, \is_object($v) ? \get_class($v) : \gettype($v), $k));
+ if (!$v instanceof Reference) {
+ throw new InvalidArgumentException(sprintf('Invalid definition for service "%s": an array of references is expected as first argument when the "container.service_locator" tag is set, "%s" found for key "%s".', $this->currentId, is_object($v) ? get_class($v) : gettype($v), $k));
}
if ($i === $k) {
unset($arguments[0][$k]);
$k = (string) $v;
++$i;
- } elseif (\is_int($k)) {
+ } elseif (is_int($k)) {
$i = null;
}
- $arguments[0][$k] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument($v);
+ $arguments[0][$k] = new ServiceClosureArgument($v);
}
- \ksort($arguments[0]);
+ ksort($arguments[0]);
$value->setArguments($arguments);
- $id = 'service_locator.' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::hash($value);
+ $id = 'service_locator.' . ContainerBuilder::hash($value);
if ($isRoot) {
if ($id !== $this->currentId) {
- $this->container->setAlias($id, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias($this->currentId, \false));
+ $this->container->setAlias($id, new Alias($this->currentId, false));
}
return $value;
}
- $this->container->setDefinition($id, $value->setPublic(\false));
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($id);
+ $this->container->setDefinition($id, $value->setPublic(false));
+ return new Reference($id);
}
/**
* @param Reference[] $refMap
@@ -71,20 +79,20 @@ protected function processValue($value, $isRoot = \false)
*
* @return Reference
*/
- public static function register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, array $refMap, $callerId = null)
+ public static function register(ContainerBuilder $container, array $refMap, $callerId = null)
{
foreach ($refMap as $id => $ref) {
- if (!$ref instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', \is_object($ref) ? \get_class($ref) : \gettype($ref), $id));
+ if (!$ref instanceof Reference) {
+ throw new InvalidArgumentException(sprintf('Invalid service locator definition: only services can be referenced, "%s" found for key "%s". Inject parameter values using constructors instead.', is_object($ref) ? get_class($ref) : gettype($ref), $id));
}
- $refMap[$id] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument($ref);
+ $refMap[$id] = new ServiceClosureArgument($ref);
}
- \ksort($refMap);
- $locator = (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class))->addArgument($refMap)->setPublic(\false)->addTag('container.service_locator');
+ ksort($refMap);
+ $locator = (new Definition(ServiceLocator::class))->addArgument($refMap)->setPublic(false)->addTag('container.service_locator');
if (null !== $callerId && $container->hasDefinition($callerId)) {
$locator->setBindings($container->getDefinition($callerId)->getBindings());
}
- if (!$container->hasDefinition($id = 'service_locator.' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::hash($locator))) {
+ if (!$container->hasDefinition($id = 'service_locator.' . ContainerBuilder::hash($locator))) {
$container->setDefinition($id, $locator);
}
if (null !== $callerId) {
@@ -92,8 +100,8 @@ public static function register(\_PhpScoper5ea00cc67502b\Symfony\Component\Depen
// Locators are shared when they hold the exact same list of factories;
// to have them specialized per consumer service, we use a cloning factory
// to derivate customized instances from the prototype one.
- $container->register($id .= '.' . $callerId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\false)->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($locatorId), 'withContext'])->addArgument($callerId)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container'));
+ $container->register($id .= '.' . $callerId, ServiceLocator::class)->setPublic(false)->setFactory([new Reference($locatorId), 'withContext'])->addArgument($callerId)->addArgument(new Reference('service_container'));
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($id);
+ return new Reference($id);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
index af7515faa..f93b3a739 100644
--- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
+++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
@@ -11,6 +11,10 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function func_get_arg;
+use function func_num_args;
+use function sprintf;
+
/**
* This is a directed graph of your services.
*
@@ -50,7 +54,7 @@ public function hasNode($id)
public function getNode($id)
{
if (!isset($this->nodes[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('There is no node with id "%s".', $id));
+ throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id));
}
return $this->nodes[$id];
}
@@ -84,15 +88,15 @@ public function clear()
*/
public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null)
{
- $lazy = \func_num_args() >= 6 ? \func_get_arg(5) : \false;
- $weak = \func_num_args() >= 7 ? \func_get_arg(6) : \false;
- $byConstructor = \func_num_args() >= 8 ? \func_get_arg(7) : \false;
+ $lazy = func_num_args() >= 6 ? func_get_arg(5) : false;
+ $weak = func_num_args() >= 7 ? func_get_arg(6) : false;
+ $byConstructor = func_num_args() >= 8 ? func_get_arg(7) : false;
if (null === $sourceId || null === $destId) {
return;
}
$sourceNode = $this->createNode($sourceId, $sourceValue);
$destNode = $this->createNode($destId, $destValue);
- $edge = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor);
+ $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor);
$sourceNode->addOutEdge($edge);
$destNode->addInEdge($edge);
}
@@ -109,6 +113,6 @@ private function createNode($id, $value)
if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) {
return $this->nodes[$id];
}
- return $this->nodes[$id] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode($id, $value);
+ return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value);
}
}
diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
index 0993c236d..11dea26b0 100644
--- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
+++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
@@ -31,7 +31,7 @@ class ServiceReferenceGraphEdge
* @param bool $weak
* @param bool $byConstructor
*/
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode $sourceNode, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphNode $destNode, $value = null, $lazy = \false, $weak = \false, $byConstructor = \false)
+ public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false, $byConstructor = false)
{
$this->sourceNode = $sourceNode;
$this->destNode = $destNode;
diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
index 9573eeccc..6e70fd0d8 100644
--- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
+++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
@@ -34,11 +34,11 @@ public function __construct($id, $value)
$this->id = $id;
$this->value = $value;
}
- public function addInEdge(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphEdge $edge)
+ public function addInEdge(ServiceReferenceGraphEdge $edge)
{
$this->inEdges[] = $edge;
}
- public function addOutEdge(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceReferenceGraphEdge $edge)
+ public function addOutEdge(ServiceReferenceGraphEdge $edge)
{
$this->outEdges[] = $edge;
}
@@ -49,7 +49,7 @@ public function addOutEdge(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependency
*/
public function isAlias()
{
- return $this->value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias;
+ return $this->value instanceof Alias;
}
/**
* Checks if the value of this node is a Definition.
@@ -58,7 +58,7 @@ public function isAlias()
*/
public function isDefinition()
{
- return $this->value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
+ return $this->value instanceof Definition;
}
/**
* Returns the identifier.
diff --git a/vendor/symfony/dependency-injection/Compiler/index.php b/vendor/symfony/dependency-injection/Compiler/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Compiler/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php b/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php
index 92ded018b..c89645779 100644
--- a/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php
+++ b/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php
@@ -10,13 +10,24 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config;
-@\trigger_error('The ' . __NAMESPACE__ . '\\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', \E_USER_DEPRECATED);
+@trigger_error('The ' . __NAMESPACE__ . '\\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass;
+use ReflectionClass;
+use ReflectionException;
+use Serializable;
+use function file_exists;
+use function filemtime;
+use function serialize;
+use function trigger_error;
+use function unserialize;
+use const E_USER_DEPRECATED;
+use const PHP_VERSION_ID;
+
/**
* @deprecated since version 3.3, to be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.
*/
-class AutowireServiceResource implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\SelfCheckingResourceInterface, \Serializable
+class AutowireServiceResource implements SelfCheckingResourceInterface, Serializable
{
private $class;
private $filePath;
@@ -29,20 +40,20 @@ public function __construct($class, $path, array $autowiringMetadata)
}
public function isFresh($timestamp)
{
- if (!\file_exists($this->filePath)) {
- return \false;
+ if (!file_exists($this->filePath)) {
+ return false;
}
// has the file *not* been modified? Definitely fresh
- if (@\filemtime($this->filePath) <= $timestamp) {
- return \true;
+ if (@filemtime($this->filePath) <= $timestamp) {
+ return true;
}
try {
- $reflectionClass = new \ReflectionClass($this->class);
- } catch (\ReflectionException $e) {
+ $reflectionClass = new ReflectionClass($this->class);
+ } catch (ReflectionException $e) {
// the class does not exist anymore!
- return \false;
+ return false;
}
- return (array) $this === (array) \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass($reflectionClass);
+ return (array) $this === (array) AutowirePass::createResourceForClass($reflectionClass);
}
public function __toString()
{
@@ -53,17 +64,17 @@ public function __toString()
*/
public function serialize()
{
- return \serialize([$this->class, $this->filePath, $this->autowiringMetadata]);
+ return serialize([$this->class, $this->filePath, $this->autowiringMetadata]);
}
/**
* @internal
*/
public function unserialize($serialized)
{
- if (\PHP_VERSION_ID >= 70000) {
- list($this->class, $this->filePath, $this->autowiringMetadata) = \unserialize($serialized, ['allowed_classes' => \false]);
+ if (PHP_VERSION_ID >= 70000) {
+ [$this->class, $this->filePath, $this->autowiringMetadata] = unserialize($serialized, ['allowed_classes' => false]);
} else {
- list($this->class, $this->filePath, $this->autowiringMetadata) = \unserialize($serialized);
+ [$this->class, $this->filePath, $this->autowiringMetadata] = unserialize($serialized);
}
}
/**
diff --git a/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php b/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
index 27c35109a..01629dc53 100644
--- a/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
+++ b/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
@@ -11,12 +11,17 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface;
+use Serializable;
+use function md5;
+use function serialize;
+use function unserialize;
+
/**
* Tracks container parameters.
*
* @author Maxime Steinhausser
*/
-class ContainerParametersResource implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface, \Serializable
+class ContainerParametersResource implements ResourceInterface, Serializable
{
private $parameters;
/**
@@ -31,21 +36,21 @@ public function __construct(array $parameters)
*/
public function __toString()
{
- return 'container_parameters_' . \md5(\serialize($this->parameters));
+ return 'container_parameters_' . md5(serialize($this->parameters));
}
/**
* @internal
*/
public function serialize()
{
- return \serialize($this->parameters);
+ return serialize($this->parameters);
}
/**
* @internal
*/
public function unserialize($serialized)
{
- $this->parameters = \unserialize($serialized);
+ $this->parameters = unserialize($serialized);
}
/**
* @return array Tracked parameters
diff --git a/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php b/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
index c4bbf5138..b4636c388 100644
--- a/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
+++ b/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
@@ -16,31 +16,31 @@
/**
* @author Maxime Steinhausser
*/
-class ContainerParametersResourceChecker implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\ResourceCheckerInterface
+class ContainerParametersResourceChecker implements ResourceCheckerInterface
{
/** @var ContainerInterface */
private $container;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface $container)
+ public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
/**
* {@inheritdoc}
*/
- public function supports(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface $metadata)
+ public function supports(ResourceInterface $metadata)
{
- return $metadata instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
+ return $metadata instanceof ContainerParametersResource;
}
/**
* {@inheritdoc}
*/
- public function isFresh(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface $resource, $timestamp)
+ public function isFresh(ResourceInterface $resource, $timestamp)
{
foreach ($resource->getParameters() as $key => $value) {
if (!$this->container->hasParameter($key) || $this->container->getParameter($key) !== $value) {
- return \false;
+ return false;
}
}
- return \true;
+ return true;
}
}
diff --git a/vendor/symfony/dependency-injection/Config/index.php b/vendor/symfony/dependency-injection/Config/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Config/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Container.php b/vendor/symfony/dependency-injection/Container.php
index a734beb93..1dbd58ef4 100644
--- a/vendor/symfony/dependency-injection/Container.php
+++ b/vendor/symfony/dependency-injection/Container.php
@@ -18,6 +18,31 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
+use Closure;
+use Exception;
+use ReflectionMethod;
+use function array_key_exists;
+use function array_keys;
+use function array_map;
+use function array_merge;
+use function array_unique;
+use function get_class_methods;
+use function is_string;
+use function levenshtein;
+use function method_exists;
+use function preg_match;
+use function preg_replace;
+use function sprintf;
+use function str_replace;
+use function strlen;
+use function strpos;
+use function strtolower;
+use function strtr;
+use function substr;
+use function trigger_error;
+use function ucwords;
+use const E_USER_DEPRECATED;
+
/**
* Container is a dependency injection container.
*
@@ -35,7 +60,7 @@
* @author Fabien Potencier
* @author Johannes M. Schmitt
*/
-class Container implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ResettableContainerInterface
+class Container implements ResettableContainerInterface
{
protected $parameterBag;
protected $services = [];
@@ -55,11 +80,11 @@ class Container implements \_PhpScoper5ea00cc67502b\Symfony\Component\Dependency
protected $normalizedIds = [];
private $underscoreMap = ['_' => '', '.' => '_', '\\' => '_'];
private $envCache = [];
- private $compiled = \false;
+ private $compiled = false;
private $getEnv;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface $parameterBag = null)
+ public function __construct(ParameterBagInterface $parameterBag = null)
{
- $this->parameterBag = $parameterBag ?: new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $this->parameterBag = $parameterBag ?: new EnvPlaceholderParameterBag();
}
/**
* Compiles the container.
@@ -72,8 +97,8 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
public function compile()
{
$this->parameterBag->resolve();
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($this->parameterBag->all());
- $this->compiled = \true;
+ $this->parameterBag = new FrozenParameterBag($this->parameterBag->all());
+ $this->compiled = true;
}
/**
* Returns true if the container is compiled.
@@ -93,8 +118,8 @@ public function isCompiled()
*/
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return $this->parameterBag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return $this->parameterBag instanceof FrozenParameterBag;
}
/**
* Gets the service container parameter bag.
@@ -151,29 +176,29 @@ public function setParameter($name, $value)
public function set($id, $service)
{
// Runs the internal initializer; used by the dumped container to include always-needed files
- if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) {
+ if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof Closure) {
$initialize = $this->privates['service_container'];
unset($this->privates['service_container']);
$initialize();
}
$id = $this->normalizeId($id);
if ('service_container' === $id) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('You cannot set service "service_container".');
+ throw new InvalidArgumentException('You cannot set service "service_container".');
}
if (isset($this->privates[$id]) || !(isset($this->fileMap[$id]) || isset($this->methodMap[$id]))) {
if (!isset($this->privates[$id]) && !isset($this->getRemovedIds()[$id])) {
// no-op
} elseif (null === $service) {
- @\trigger_error(\sprintf('The "%s" service is private, unsetting it is deprecated since Symfony 3.2 and will fail in 4.0.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "%s" service is private, unsetting it is deprecated since Symfony 3.2 and will fail in 4.0.', $id), E_USER_DEPRECATED);
unset($this->privates[$id]);
} else {
- @\trigger_error(\sprintf('The "%s" service is private, replacing it is deprecated since Symfony 3.2 and will fail in 4.0.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "%s" service is private, replacing it is deprecated since Symfony 3.2 and will fail in 4.0.', $id), E_USER_DEPRECATED);
}
} elseif (isset($this->services[$id])) {
if (null === $service) {
- @\trigger_error(\sprintf('The "%s" service is already initialized, unsetting it is deprecated since Symfony 3.3 and will fail in 4.0.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "%s" service is already initialized, unsetting it is deprecated since Symfony 3.3 and will fail in 4.0.', $id), E_USER_DEPRECATED);
} else {
- @\trigger_error(\sprintf('The "%s" service is already initialized, replacing it is deprecated since Symfony 3.3 and will fail in 4.0.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "%s" service is already initialized, replacing it is deprecated since Symfony 3.3 and will fail in 4.0.', $id), E_USER_DEPRECATED);
}
}
if (isset($this->aliases[$id])) {
@@ -196,19 +221,19 @@ public function has($id)
{
for ($i = 2;;) {
if (isset($this->privates[$id])) {
- @\trigger_error(\sprintf('The "%s" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "%s" service is private, checking for its existence is deprecated since Symfony 3.2 and will fail in 4.0.', $id), E_USER_DEPRECATED);
}
if (isset($this->aliases[$id])) {
$id = $this->aliases[$id];
}
if (isset($this->services[$id])) {
- return \true;
+ return true;
}
if ('service_container' === $id) {
- return \true;
+ return true;
}
if (isset($this->fileMap[$id]) || isset($this->methodMap[$id])) {
- return \true;
+ return true;
}
if (--$i && $id !== ($normalizedId = $this->normalizeId($id))) {
$id = $normalizedId;
@@ -216,11 +241,11 @@ public function has($id)
}
// We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
// and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
- if (!$this->methodMap && !$this instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder && __CLASS__ !== static::class && \method_exists($this, 'get' . \strtr($id, $this->underscoreMap) . 'Service')) {
- @\trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', \E_USER_DEPRECATED);
- return \true;
+ if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, 'get' . strtr($id, $this->underscoreMap) . 'Service')) {
+ @trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
+ return true;
}
- return \false;
+ return false;
}
}
/**
@@ -236,7 +261,7 @@ public function has($id)
*
* @throws ServiceCircularReferenceException When a circular reference is detected
* @throws ServiceNotFoundException When the service is not defined
- * @throws \Exception if an exception has been thrown when the service has been resolved
+ * @throws Exception if an exception has been thrown when the service has been resolved
*
* @see Reference
*/
@@ -248,7 +273,7 @@ public function get($id, $invalidBehavior = 1)
// calling $this->normalizeId($id) unless necessary.
for ($i = 2;;) {
if (isset($this->privates[$id])) {
- @\trigger_error(\sprintf('The "%s" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "%s" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.', $id), E_USER_DEPRECATED);
}
if (isset($this->aliases[$id])) {
$id = $this->aliases[$id];
@@ -261,9 +286,9 @@ public function get($id, $invalidBehavior = 1)
return $this;
}
if (isset($this->loading[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($id, \array_merge(\array_keys($this->loading), [$id]));
+ throw new ServiceCircularReferenceException($id, array_merge(array_keys($this->loading), [$id]));
}
- $this->loading[$id] = \true;
+ $this->loading[$id] = true;
try {
if (isset($this->fileMap[$id])) {
return 4 === $invalidBehavior ? null : $this->load($this->fileMap[$id]);
@@ -273,14 +298,14 @@ public function get($id, $invalidBehavior = 1)
unset($this->loading[$id]);
$id = $normalizedId;
continue;
- } elseif (!$this->methodMap && !$this instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder && __CLASS__ !== static::class && \method_exists($this, $method = 'get' . \strtr($id, $this->underscoreMap) . 'Service')) {
+ } elseif (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, $method = 'get' . strtr($id, $this->underscoreMap) . 'Service')) {
// We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
// and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
- @\trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', \E_USER_DEPRECATED);
+ @trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
return 4 === $invalidBehavior ? null : $this->{$method}();
}
break;
- } catch (\Exception $e) {
+ } catch (Exception $e) {
unset($this->services[$id]);
throw $e;
} finally {
@@ -289,22 +314,22 @@ public function get($id, $invalidBehavior = 1)
}
if (1 === $invalidBehavior) {
if (!$id) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id);
+ throw new ServiceNotFoundException($id);
}
if (isset($this->syntheticIds[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id));
+ throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.', $id));
}
if (isset($this->getRemovedIds()[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id, null, null, [], \sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id));
+ throw new ServiceNotFoundException($id, null, null, [], sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.', $id));
}
$alternatives = [];
foreach ($this->getServiceIds() as $knownId) {
- $lev = \levenshtein($id, $knownId);
- if ($lev <= \strlen($id) / 3 || \false !== \strpos($knownId, $id)) {
+ $lev = levenshtein($id, $knownId);
+ if ($lev <= strlen($id) / 3 || false !== strpos($knownId, $id)) {
$alternatives[] = $knownId;
}
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id, null, null, $alternatives);
+ throw new ServiceNotFoundException($id, null, null, $alternatives);
}
}
/**
@@ -318,13 +343,13 @@ public function initialized($id)
{
$id = $this->normalizeId($id);
if (isset($this->privates[$id])) {
- @\trigger_error(\sprintf('Checking for the initialization of the "%s" private service is deprecated since Symfony 3.4 and won\'t be supported anymore in Symfony 4.0.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Checking for the initialization of the "%s" private service is deprecated since Symfony 3.4 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED);
}
if (isset($this->aliases[$id])) {
$id = $this->aliases[$id];
}
if ('service_container' === $id) {
- return \false;
+ return false;
}
return isset($this->services[$id]);
}
@@ -343,18 +368,18 @@ public function reset()
public function getServiceIds()
{
$ids = [];
- if (!$this->methodMap && !$this instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder && __CLASS__ !== static::class) {
+ if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class) {
// We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
// and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
- @\trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', \E_USER_DEPRECATED);
- foreach (\get_class_methods($this) as $method) {
- if (\preg_match('/^get(.+)Service$/', $method, $match)) {
+ @trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
+ foreach (get_class_methods($this) as $method) {
+ if (preg_match('/^get(.+)Service$/', $method, $match)) {
$ids[] = self::underscore($match[1]);
}
}
}
$ids[] = 'service_container';
- return \array_map('strval', \array_unique(\array_merge($ids, \array_keys($this->methodMap), \array_keys($this->fileMap), \array_keys($this->aliases), \array_keys($this->services))));
+ return array_map('strval', array_unique(array_merge($ids, array_keys($this->methodMap), array_keys($this->fileMap), array_keys($this->aliases), array_keys($this->services))));
}
/**
* Gets service ids that existed at compile time.
@@ -374,7 +399,7 @@ public function getRemovedIds()
*/
public static function camelize($id)
{
- return \strtr(\ucwords(\strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']);
+ return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']);
}
/**
* A string to underscore.
@@ -385,7 +410,7 @@ public static function camelize($id)
*/
public static function underscore($id)
{
- return \strtolower(\preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], \str_replace('_', '.', $id)));
+ return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], str_replace('_', '.', $id)));
}
/**
* Creates a service by requiring its factory file.
@@ -406,29 +431,29 @@ protected function load($file)
protected function getEnv($name)
{
if (isset($this->resolving[$envName = "env({$name})"])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException(\array_keys($this->resolving));
+ throw new ParameterCircularReferenceException(array_keys($this->resolving));
}
- if (isset($this->envCache[$name]) || \array_key_exists($name, $this->envCache)) {
+ if (isset($this->envCache[$name]) || array_key_exists($name, $this->envCache)) {
return $this->envCache[$name];
}
if (!$this->has($id = 'container.env_var_processors_locator')) {
- $this->set($id, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator([]));
+ $this->set($id, new ServiceLocator([]));
}
if (!$this->getEnv) {
- $this->getEnv = new \ReflectionMethod($this, __FUNCTION__);
- $this->getEnv->setAccessible(\true);
+ $this->getEnv = new ReflectionMethod($this, __FUNCTION__);
+ $this->getEnv->setAccessible(true);
$this->getEnv = $this->getEnv->getClosure($this);
}
$processors = $this->get($id);
- if (\false !== ($i = \strpos($name, ':'))) {
- $prefix = \substr($name, 0, $i);
- $localName = \substr($name, 1 + $i);
+ if (false !== ($i = strpos($name, ':'))) {
+ $prefix = substr($name, 0, $i);
+ $localName = substr($name, 1 + $i);
} else {
$prefix = 'string';
$localName = $name;
}
- $processor = $processors->has($prefix) ? $processors->get($prefix) : new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor($this);
- $this->resolving[$envName] = \true;
+ $processor = $processors->has($prefix) ? $processors->get($prefix) : new EnvVarProcessor($this);
+ $this->resolving[$envName] = true;
try {
return $this->envCache[$name] = $processor->getEnv($prefix, $localName, $this->getEnv);
} finally {
@@ -446,13 +471,13 @@ protected function getEnv($name)
*/
public function normalizeId($id)
{
- if (!\is_string($id)) {
+ if (!is_string($id)) {
$id = (string) $id;
}
- if (isset($this->normalizedIds[$normalizedId = \strtolower($id)])) {
+ if (isset($this->normalizedIds[$normalizedId = strtolower($id)])) {
$normalizedId = $this->normalizedIds[$normalizedId];
if ($id !== $normalizedId) {
- @\trigger_error(\sprintf('Service identifiers will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.3.', $id, $normalizedId), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Service identifiers will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.3.', $id, $normalizedId), E_USER_DEPRECATED);
}
} else {
$normalizedId = $this->normalizedIds[$normalizedId] = $id;
diff --git a/vendor/symfony/dependency-injection/ContainerAwareInterface.php b/vendor/symfony/dependency-injection/ContainerAwareInterface.php
index 32c27344e..286a61b12 100644
--- a/vendor/symfony/dependency-injection/ContainerAwareInterface.php
+++ b/vendor/symfony/dependency-injection/ContainerAwareInterface.php
@@ -20,5 +20,5 @@ interface ContainerAwareInterface
/**
* Sets the container.
*/
- public function setContainer(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface $container = null);
+ public function setContainer(ContainerInterface $container = null);
}
diff --git a/vendor/symfony/dependency-injection/ContainerAwareTrait.php b/vendor/symfony/dependency-injection/ContainerAwareTrait.php
index 2c3ba4f4e..cc5f054e9 100644
--- a/vendor/symfony/dependency-injection/ContainerAwareTrait.php
+++ b/vendor/symfony/dependency-injection/ContainerAwareTrait.php
@@ -21,7 +21,7 @@ trait ContainerAwareTrait
* @var ContainerInterface
*/
protected $container;
- public function setContainer(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface $container = null)
+ public function setContainer(ContainerInterface $container = null)
{
$this->container = $container;
}
diff --git a/vendor/symfony/dependency-injection/ContainerBuilder.php b/vendor/symfony/dependency-injection/ContainerBuilder.php
index 0829e33f3..68f4e3448 100644
--- a/vendor/symfony/dependency-injection/ContainerBuilder.php
+++ b/vendor/symfony/dependency-injection/ContainerBuilder.php
@@ -41,12 +41,59 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
+use Exception;
+use ReflectionClass;
+use ReflectionException;
+use ReflectionMethod;
+use function array_diff;
+use function array_keys;
+use function array_map;
+use function array_merge;
+use function array_search;
+use function array_slice;
+use function array_unique;
+use function array_unshift;
+use function array_values;
+use function base64_encode;
+use function call_user_func;
+use function call_user_func_array;
+use function class_exists;
+use function file_exists;
+use function func_get_arg;
+use function func_num_args;
+use function get_class;
+use function gettype;
+use function hash;
+use function interface_exists;
+use function is_array;
+use function is_callable;
+use function is_dir;
+use function is_numeric;
+use function is_object;
+use function is_string;
+use function realpath;
+use function serialize;
+use function spl_object_hash;
+use function sprintf;
+use function str_ireplace;
+use function str_replace;
+use function strcspn;
+use function stripos;
+use function strlen;
+use function strpbrk;
+use function strpos;
+use function strtolower;
+use function substr;
+use function trigger_error;
+use const DIRECTORY_SEPARATOR;
+use const E_USER_DEPRECATED;
+
/**
* ContainerBuilder is a DI container that provides an API to easily describe services.
*
* @author Fabien Potencier
*/
-class ContainerBuilder extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TaggedContainerInterface
+class ContainerBuilder extends Container implements TaggedContainerInterface
{
/**
* @var ExtensionInterface[]
@@ -105,17 +152,17 @@ class ContainerBuilder extends \_PhpScoper5ea00cc67502b\Symfony\Component\Depend
private $autoconfiguredInstanceof = [];
private $removedIds = [];
private $removedBindingIds = [];
- private static $internalTypes = ['int' => \true, 'float' => \true, 'string' => \true, 'bool' => \true, 'resource' => \true, 'object' => \true, 'array' => \true, 'null' => \true, 'callable' => \true, 'iterable' => \true, 'mixed' => \true];
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface $parameterBag = null)
+ private static $internalTypes = ['int' => true, 'float' => true, 'string' => true, 'bool' => true, 'resource' => true, 'object' => true, 'array' => true, 'null' => true, 'callable' => true, 'iterable' => true, 'mixed' => true];
+ public function __construct(ParameterBagInterface $parameterBag = null)
{
parent::__construct($parameterBag);
- $this->trackResources = \interface_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Resource\\ResourceInterface');
- $this->setDefinition('service_container', (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class))->setSynthetic(\true)->setPublic(\true));
- $this->setAlias(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('service_container', \false));
- $this->setAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('service_container', \false));
+ $this->trackResources = interface_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Resource\\ResourceInterface');
+ $this->setDefinition('service_container', (new Definition(ContainerInterface::class))->setSynthetic(true)->setPublic(true));
+ $this->setAlias(PsrContainerInterface::class, new Alias('service_container', false));
+ $this->setAlias(ContainerInterface::class, new Alias('service_container', false));
}
/**
- * @var \ReflectionClass[] a list of class reflectors
+ * @var ReflectionClass[] a list of class reflectors
*/
private $classReflectors;
/**
@@ -142,14 +189,14 @@ public function isTrackingResources()
/**
* Sets the instantiator to be used when fetching proxies.
*/
- public function setProxyInstantiator(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface $proxyInstantiator)
+ public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator)
{
$this->proxyInstantiator = $proxyInstantiator;
}
- public function registerExtension(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ExtensionInterface $extension)
+ public function registerExtension(ExtensionInterface $extension)
{
$this->extensions[$extension->getAlias()] = $extension;
- if (\false !== $extension->getNamespace()) {
+ if (false !== $extension->getNamespace()) {
$this->extensionsByNs[$extension->getNamespace()] = $extension;
}
}
@@ -170,7 +217,7 @@ public function getExtension($name)
if (isset($this->extensionsByNs[$name])) {
return $this->extensionsByNs[$name];
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException(\sprintf('Container extension "%s" is not registered.', $name));
+ throw new LogicException(sprintf('Container extension "%s" is not registered.', $name));
}
/**
* Returns all registered extensions.
@@ -199,17 +246,17 @@ public function hasExtension($name)
*/
public function getResources()
{
- return \array_values($this->resources);
+ return array_values($this->resources);
}
/**
* @return $this
*/
- public function addResource(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface $resource)
+ public function addResource(ResourceInterface $resource)
{
if (!$this->trackResources) {
return $this;
}
- if ($resource instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource && $this->inVendors($resource->getPrefix())) {
+ if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) {
return $this;
}
$this->resources[(string) $resource] = $resource;
@@ -240,25 +287,25 @@ public function setResources(array $resources)
public function addObjectResource($object)
{
if ($this->trackResources) {
- if (\is_object($object)) {
- $object = \get_class($object);
+ if (is_object($object)) {
+ $object = get_class($object);
}
if (!isset($this->classReflectors[$object])) {
- $this->classReflectors[$object] = new \ReflectionClass($object);
+ $this->classReflectors[$object] = new ReflectionClass($object);
}
$class = $this->classReflectors[$object];
foreach ($class->getInterfaceNames() as $name) {
if (null === ($interface =& $this->classReflectors[$name])) {
- $interface = new \ReflectionClass($name);
+ $interface = new ReflectionClass($name);
}
$file = $interface->getFileName();
- if (\false !== $file && \file_exists($file)) {
+ if (false !== $file && file_exists($file)) {
$this->fileExists($file);
}
}
do {
$file = $class->getFileName();
- if (\false !== $file && \file_exists($file)) {
+ if (false !== $file && file_exists($file)) {
$this->fileExists($file);
}
foreach ($class->getTraitNames() as $name) {
@@ -275,9 +322,9 @@ public function addObjectResource($object)
*
* @deprecated since version 3.3, to be removed in 4.0. Use addObjectResource() or getReflectionClass() instead.
*/
- public function addClassResource(\ReflectionClass $class)
+ public function addClassResource(ReflectionClass $class)
{
- @\trigger_error('The ' . __METHOD__ . '() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the addObjectResource() or the getReflectionClass() method instead.', \E_USER_DEPRECATED);
+ @trigger_error('The ' . __METHOD__ . '() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the addObjectResource() or the getReflectionClass() method instead.', E_USER_DEPRECATED);
return $this->addObjectResource($class->name);
}
/**
@@ -286,13 +333,13 @@ public function addClassResource(\ReflectionClass $class)
* @param string $class
* @param bool $throw
*
- * @return \ReflectionClass|null
+ * @return ReflectionClass|null
*
- * @throws \ReflectionException when a parent class/interface/trait is not found and $throw is true
+ * @throws ReflectionException when a parent class/interface/trait is not found and $throw is true
*
* @final
*/
- public function getReflectionClass($class, $throw = \true)
+ public function getReflectionClass($class, $throw = true)
{
if (!($class = $this->getParameterBag()->resolveValue($class))) {
return null;
@@ -304,24 +351,24 @@ public function getReflectionClass($class, $throw = \true)
try {
if (isset($this->classReflectors[$class])) {
$classReflector = $this->classReflectors[$class];
- } elseif (\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource::class)) {
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource($class, \false);
- $classReflector = $resource->isFresh(0) ? \false : new \ReflectionClass($class);
+ } elseif (class_exists(ClassExistenceResource::class)) {
+ $resource = new ClassExistenceResource($class, false);
+ $classReflector = $resource->isFresh(0) ? false : new ReflectionClass($class);
} else {
- $classReflector = \class_exists($class) ? new \ReflectionClass($class) : \false;
+ $classReflector = class_exists($class) ? new ReflectionClass($class) : false;
}
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
if ($throw) {
throw $e;
}
}
if ($this->trackResources) {
if (!$classReflector) {
- $this->addResource($resource ?: new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ClassExistenceResource($class, \false));
+ $this->addResource($resource ?: new ClassExistenceResource($class, false));
} elseif (!$classReflector->isInternal()) {
$path = $classReflector->getFileName();
if (!$this->inVendors($path)) {
- $this->addResource(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ReflectionClassResource($classReflector, $this->vendors));
+ $this->addResource(new ReflectionClassResource($classReflector, $this->vendors));
}
}
$this->classReflectors[$class] = $classReflector;
@@ -339,24 +386,24 @@ public function getReflectionClass($class, $throw = \true)
*
* @final
*/
- public function fileExists($path, $trackContents = \true)
+ public function fileExists($path, $trackContents = true)
{
- $exists = \file_exists($path);
+ $exists = file_exists($path);
if (!$this->trackResources || $this->inVendors($path)) {
return $exists;
}
if (!$exists) {
- $this->addResource(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileExistenceResource($path));
+ $this->addResource(new FileExistenceResource($path));
return $exists;
}
- if (\is_dir($path)) {
+ if (is_dir($path)) {
if ($trackContents) {
- $this->addResource(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($path, \is_string($trackContents) ? $trackContents : null));
+ $this->addResource(new DirectoryResource($path, is_string($trackContents) ? $trackContents : null));
} else {
- $this->addResource(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($path, '/*', \false));
+ $this->addResource(new GlobResource($path, '/*', false));
}
} elseif ($trackContents) {
- $this->addResource(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource($path));
+ $this->addResource(new FileResource($path));
}
return $exists;
}
@@ -374,9 +421,9 @@ public function fileExists($path, $trackContents = \true)
public function loadFromExtension($extension, array $values = null)
{
if ($this->isCompiled()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException('Cannot load from an extension on a compiled container.');
+ throw new BadMethodCallException('Cannot load from an extension on a compiled container.');
}
- if (\func_num_args() < 2) {
+ if (func_num_args() < 2) {
$values = [];
}
$namespace = $this->getExtension($extension)->getAlias();
@@ -392,15 +439,15 @@ public function loadFromExtension($extension, array $values = null)
*
* @return $this
*/
- public function addCompilerPass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $type = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION)
+ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
{
- if (\func_num_args() >= 3) {
- $priority = \func_get_arg(2);
+ if (func_num_args() >= 3) {
+ $priority = func_get_arg(2);
} else {
if (__CLASS__ !== static::class) {
- $r = new \ReflectionMethod($this, __FUNCTION__);
+ $r = new ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
- @\trigger_error(\sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
}
}
$priority = 0;
@@ -426,7 +473,7 @@ public function getCompilerPassConfig()
public function getCompiler()
{
if (null === $this->compiler) {
- $this->compiler = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\Compiler();
+ $this->compiler = new Compiler();
}
return $this->compiler;
}
@@ -443,7 +490,7 @@ public function set($id, $service)
$id = $this->normalizeId($id);
if ($this->isCompiled() && (isset($this->definitions[$id]) && !$this->definitions[$id]->isSynthetic())) {
// setting a synthetic service on a compiled container is alright
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException(\sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id));
+ throw new BadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id));
}
unset($this->definitions[$id], $this->aliasDefinitions[$id], $this->removedIds[$id]);
parent::set($id, $service);
@@ -457,7 +504,7 @@ public function removeDefinition($id)
{
if (isset($this->definitions[$id = $this->normalizeId($id)])) {
unset($this->definitions[$id]);
- $this->removedIds[$id] = \true;
+ $this->removedIds[$id] = true;
}
}
/**
@@ -483,35 +530,35 @@ public function has($id)
* @throws InvalidArgumentException when no definitions are available
* @throws ServiceCircularReferenceException When a circular reference is detected
* @throws ServiceNotFoundException When the service is not defined
- * @throws \Exception
+ * @throws Exception
*
* @see Reference
*/
- public function get($id, $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
+ public function get($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
if ($this->isCompiled() && isset($this->removedIds[$id = $this->normalizeId($id)])) {
- @\trigger_error(\sprintf('Fetching the "%s" private service or alias is deprecated since Symfony 3.4 and will fail in 4.0. Make it public instead.', $id), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Fetching the "%s" private service or alias is deprecated since Symfony 3.4 and will fail in 4.0. Make it public instead.', $id), E_USER_DEPRECATED);
}
return $this->doGet($id, $invalidBehavior);
}
- private function doGet($id, $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, array &$inlineServices = null, $isConstructorArgument = \false)
+ private function doGet($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE, array &$inlineServices = null, $isConstructorArgument = false)
{
$id = $this->normalizeId($id);
if (isset($inlineServices[$id])) {
return $inlineServices[$id];
}
if (null === $inlineServices) {
- $isConstructorArgument = \true;
+ $isConstructorArgument = true;
$inlineServices = [];
}
try {
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) {
+ if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) {
return parent::get($id, $invalidBehavior);
}
- if ($service = parent::get($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE)) {
+ if ($service = parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) {
return $service;
}
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException $e) {
+ } catch (ServiceCircularReferenceException $e) {
if ($isConstructorArgument) {
throw $e;
}
@@ -521,14 +568,14 @@ private function doGet($id, $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\
}
try {
$definition = $this->getDefinition($id);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException $e) {
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
+ } catch (ServiceNotFoundException $e) {
+ if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
return null;
}
throw $e;
}
if ($isConstructorArgument) {
- $this->loading[$id] = \true;
+ $this->loading[$id] = true;
}
try {
return $this->createService($definition, $inlineServices, $isConstructorArgument, $id);
@@ -561,7 +608,7 @@ private function doGet($id, $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\
public function merge(self $container)
{
if ($this->isCompiled()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException('Cannot merge on a compiled container.');
+ throw new BadMethodCallException('Cannot merge on a compiled container.');
}
$this->addDefinitions($container->getDefinitions());
$this->addAliases($container->getAliases());
@@ -575,9 +622,9 @@ public function merge(self $container)
if (!isset($this->extensionConfigs[$name])) {
$this->extensionConfigs[$name] = [];
}
- $this->extensionConfigs[$name] = \array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name));
+ $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name));
}
- if ($this->getParameterBag() instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag && $container->getParameterBag() instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag) {
+ if ($this->getParameterBag() instanceof EnvPlaceholderParameterBag && $container->getParameterBag() instanceof EnvPlaceholderParameterBag) {
$envPlaceholders = $container->getParameterBag()->getEnvPlaceholders();
$this->getParameterBag()->mergeEnvPlaceholders($container->getParameterBag());
} else {
@@ -595,7 +642,7 @@ public function merge(self $container)
}
foreach ($container->getAutoconfiguredInstanceof() as $interface => $childDefinition) {
if (isset($this->autoconfiguredInstanceof[$interface])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface));
+ throw new InvalidArgumentException(sprintf('"%s" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.', $interface));
}
$this->autoconfiguredInstanceof[$interface] = $childDefinition;
}
@@ -625,7 +672,7 @@ public function prependExtensionConfig($name, array $config)
if (!isset($this->extensionConfigs[$name])) {
$this->extensionConfigs[$name] = [];
}
- \array_unshift($this->extensionConfigs[$name], $config);
+ array_unshift($this->extensionConfigs[$name], $config);
}
/**
* Compiles the container.
@@ -648,16 +695,16 @@ public function prependExtensionConfig($name, array $config)
*/
public function compile()
{
- if (1 <= \func_num_args()) {
- $resolveEnvPlaceholders = \func_get_arg(0);
+ if (1 <= func_num_args()) {
+ $resolveEnvPlaceholders = func_get_arg(0);
} else {
if (__CLASS__ !== static::class) {
- $r = new \ReflectionMethod($this, __FUNCTION__);
+ $r = new ReflectionMethod($this, __FUNCTION__);
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (1 > $r->getNumberOfParameters() || 'resolveEnvPlaceholders' !== $r->getParameters()[0]->name)) {
- @\trigger_error(\sprintf('The %s::compile() method expects a first "$resolveEnvPlaceholders" argument since Symfony 3.3. It will be made mandatory in 4.0.', static::class), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The %s::compile() method expects a first "$resolveEnvPlaceholders" argument since Symfony 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED);
}
}
- $resolveEnvPlaceholders = \false;
+ $resolveEnvPlaceholders = false;
}
$compiler = $this->getCompiler();
if ($this->trackResources) {
@@ -666,8 +713,8 @@ public function compile()
}
}
$bag = $this->getParameterBag();
- if ($resolveEnvPlaceholders && $bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag) {
- $compiler->addPass(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass(), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_AFTER_REMOVING, -1000);
+ if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) {
+ $compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000);
}
$compiler->compile($this);
foreach ($this->definitions as $id => $definition) {
@@ -676,16 +723,16 @@ public function compile()
}
}
$this->extensionConfigs = [];
- if ($bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag) {
+ if ($bag instanceof EnvPlaceholderParameterBag) {
if ($resolveEnvPlaceholders) {
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($this->resolveEnvPlaceholders($bag->all(), \true));
+ $this->parameterBag = new ParameterBag($this->resolveEnvPlaceholders($bag->all(), true));
}
$this->envPlaceholders = $bag->getEnvPlaceholders();
}
parent::compile();
foreach ($this->definitions + $this->aliasDefinitions as $id => $definition) {
if (!$definition->isPublic() || $definition->isPrivate()) {
- $this->removedIds[$id] = \true;
+ $this->removedIds[$id] = true;
}
}
}
@@ -694,7 +741,7 @@ public function compile()
*/
public function getServiceIds()
{
- return \array_map('strval', \array_unique(\array_merge(\array_keys($this->getDefinitions()), \array_keys($this->aliasDefinitions), parent::getServiceIds())));
+ return array_map('strval', array_unique(array_merge(array_keys($this->getDefinitions()), array_keys($this->aliasDefinitions), parent::getServiceIds())));
}
/**
* Gets removed service or alias ids.
@@ -736,16 +783,16 @@ public function setAliases(array $aliases)
public function setAlias($alias, $id)
{
$alias = $this->normalizeId($alias);
- if ('' === $alias || '\\' === \substr($alias, -1) || \strlen($alias) !== \strcspn($alias, "\0\r\n'")) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid alias id: "%s".', $alias));
+ if ('' === $alias || '\\' === substr($alias, -1) || strlen($alias) !== strcspn($alias, "\0\r\n'")) {
+ throw new InvalidArgumentException(sprintf('Invalid alias id: "%s".', $alias));
}
- if (\is_string($id)) {
- $id = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias($this->normalizeId($id));
- } elseif (!$id instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('$id must be a string, or an Alias object.');
+ if (is_string($id)) {
+ $id = new Alias($this->normalizeId($id));
+ } elseif (!$id instanceof Alias) {
+ throw new InvalidArgumentException('$id must be a string, or an Alias object.');
}
if ($alias === (string) $id) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('An alias can not reference itself, got a circular reference on "%s".', $alias));
+ throw new InvalidArgumentException(sprintf('An alias can not reference itself, got a circular reference on "%s".', $alias));
}
unset($this->definitions[$alias], $this->removedIds[$alias]);
return $this->aliasDefinitions[$alias] = $id;
@@ -759,7 +806,7 @@ public function removeAlias($alias)
{
if (isset($this->aliasDefinitions[$alias = $this->normalizeId($alias)])) {
unset($this->aliasDefinitions[$alias]);
- $this->removedIds[$alias] = \true;
+ $this->removedIds[$alias] = true;
}
}
/**
@@ -795,7 +842,7 @@ public function getAlias($id)
{
$id = $this->normalizeId($id);
if (!isset($this->aliasDefinitions[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service alias "%s" does not exist.', $id));
+ throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id));
}
return $this->aliasDefinitions[$id];
}
@@ -812,7 +859,7 @@ public function getAlias($id)
*/
public function register($id, $class = null)
{
- return $this->setDefinition($id, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition($class));
+ return $this->setDefinition($id, new Definition($class));
}
/**
* Registers an autowired service definition.
@@ -827,7 +874,7 @@ public function register($id, $class = null)
*/
public function autowire($id, $class = null)
{
- return $this->setDefinition($id, (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition($class))->setAutowired(\true));
+ return $this->setDefinition($id, (new Definition($class))->setAutowired(true));
}
/**
* Adds the service definitions.
@@ -869,14 +916,14 @@ public function getDefinitions()
*
* @throws BadMethodCallException When this ContainerBuilder is compiled
*/
- public function setDefinition($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ public function setDefinition($id, Definition $definition)
{
if ($this->isCompiled()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException('Adding definition to a compiled container is not allowed.');
+ throw new BadMethodCallException('Adding definition to a compiled container is not allowed.');
}
$id = $this->normalizeId($id);
- if ('' === $id || '\\' === \substr($id, -1) || \strlen($id) !== \strcspn($id, "\0\r\n'")) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid service id: "%s".', $id));
+ if ('' === $id || '\\' === substr($id, -1) || strlen($id) !== strcspn($id, "\0\r\n'")) {
+ throw new InvalidArgumentException(sprintf('Invalid service id: "%s".', $id));
}
unset($this->aliasDefinitions[$id], $this->removedIds[$id]);
return $this->definitions[$id] = $definition;
@@ -905,7 +952,7 @@ public function getDefinition($id)
{
$id = $this->normalizeId($id);
if (!isset($this->definitions[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id);
+ throw new ServiceNotFoundException($id);
}
return $this->definitions[$id];
}
@@ -927,10 +974,10 @@ public function findDefinition($id)
while (isset($this->aliasDefinitions[$id])) {
$id = (string) $this->aliasDefinitions[$id];
if (isset($seen[$id])) {
- $seen = \array_values($seen);
- $seen = \array_slice($seen, \array_search($id, $seen));
+ $seen = array_values($seen);
+ $seen = array_slice($seen, array_search($id, $seen));
$seen[] = $id;
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($id, $seen);
+ throw new ServiceCircularReferenceException($id, $seen);
}
$seen[$id] = $id;
}
@@ -949,23 +996,23 @@ public function findDefinition($id)
* @throws RuntimeException When the service is a synthetic service
* @throws InvalidArgumentException When configure callable is not callable
*/
- private function createService(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, array &$inlineServices, $isConstructorArgument = \false, $id = null, $tryProxy = \true)
+ private function createService(Definition $definition, array &$inlineServices, $isConstructorArgument = false, $id = null, $tryProxy = true)
{
- if (null === $id && isset($inlineServices[$h = \spl_object_hash($definition)])) {
+ if (null === $id && isset($inlineServices[$h = spl_object_hash($definition)])) {
return $inlineServices[$h];
}
- if ($definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id));
+ if ($definition instanceof ChildDefinition) {
+ throw new RuntimeException(sprintf('Constructing service "%s" from a parent definition is not supported at build time.', $id));
}
if ($definition->isSynthetic()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id));
+ throw new RuntimeException(sprintf('You have requested a synthetic service ("%s"). The DIC does not know how to construct this service.', $id));
}
if ($definition->isDeprecated()) {
- @\trigger_error($definition->getDeprecationMessage($id), \E_USER_DEPRECATED);
+ @trigger_error($definition->getDeprecationMessage($id), E_USER_DEPRECATED);
}
- if ($tryProxy && $definition->isLazy() && !($tryProxy = !($proxy = $this->proxyInstantiator) || $proxy instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator)) {
+ if ($tryProxy && $definition->isLazy() && !($tryProxy = !($proxy = $this->proxyInstantiator) || $proxy instanceof RealServiceInstantiator)) {
$proxy = $proxy->instantiateProxy($this, $definition, $id, function () use($definition, &$inlineServices, $id) {
- return $this->createService($definition, $inlineServices, \true, $id, \false);
+ return $this->createService($definition, $inlineServices, true, $id, false);
});
$this->shareService($definition, $proxy, $id, $inlineServices);
return $proxy;
@@ -976,31 +1023,31 @@ private function createService(\_PhpScoper5ea00cc67502b\Symfony\Component\Depend
}
$arguments = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())), $inlineServices, $isConstructorArgument);
if (null !== ($factory = $definition->getFactory())) {
- if (\is_array($factory)) {
+ if (is_array($factory)) {
$factory = [$this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]];
- } elseif (!\is_string($factory)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Cannot create service "%s" because of invalid factory.', $id));
+ } elseif (!is_string($factory)) {
+ throw new RuntimeException(sprintf('Cannot create service "%s" because of invalid factory.', $id));
}
}
if (null !== $id && $definition->isShared() && isset($this->services[$id]) && ($tryProxy || !$definition->isLazy())) {
return $this->services[$id];
}
if (null !== $factory) {
- $service = \call_user_func_array($factory, $arguments);
- if (!$definition->isDeprecated() && \is_array($factory) && \is_string($factory[0])) {
- $r = new \ReflectionClass($factory[0]);
- if (0 < \strpos($r->getDocComment(), "\n * @deprecated ")) {
- @\trigger_error(\sprintf('The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name), \E_USER_DEPRECATED);
+ $service = call_user_func_array($factory, $arguments);
+ if (!$definition->isDeprecated() && is_array($factory) && is_string($factory[0])) {
+ $r = new ReflectionClass($factory[0]);
+ if (0 < strpos($r->getDocComment(), "\n * @deprecated ")) {
+ @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" factory class. It should either be deprecated or its factory upgraded.', $id, $r->name), E_USER_DEPRECATED);
}
}
} else {
- $r = new \ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
+ $r = new ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
// don't trigger deprecations for internal uses
// @deprecated since version 3.3, to be removed in 4.0 along with the deprecated class
- $deprecationWhitelist = ['event_dispatcher' => \_PhpScoper5ea00cc67502b\Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher::class];
- if (!$definition->isDeprecated() && 0 < \strpos($r->getDocComment(), "\n * @deprecated ") && (!isset($deprecationWhitelist[$id]) || $deprecationWhitelist[$id] !== $class)) {
- @\trigger_error(\sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), \E_USER_DEPRECATED);
+ $deprecationWhitelist = ['event_dispatcher' => ContainerAwareEventDispatcher::class];
+ if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ") && (!isset($deprecationWhitelist[$id]) || $deprecationWhitelist[$id] !== $class)) {
+ @trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), E_USER_DEPRECATED);
}
}
if ($tryProxy || !$definition->isLazy()) {
@@ -1015,18 +1062,18 @@ private function createService(\_PhpScoper5ea00cc67502b\Symfony\Component\Depend
$this->callMethod($service, $call, $inlineServices);
}
if ($callable = $definition->getConfigurator()) {
- if (\is_array($callable)) {
+ if (is_array($callable)) {
$callable[0] = $parameterBag->resolveValue($callable[0]);
- if ($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ if ($callable[0] instanceof Reference) {
$callable[0] = $this->doGet((string) $callable[0], $callable[0]->getInvalidBehavior(), $inlineServices);
- } elseif ($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($callable[0] instanceof Definition) {
$callable[0] = $this->createService($callable[0], $inlineServices);
}
}
- if (!\is_callable($callable)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The configure callable for class "%s" is not a callable.', \get_class($service)));
+ if (!is_callable($callable)) {
+ throw new InvalidArgumentException(sprintf('The configure callable for class "%s" is not a callable.', get_class($service)));
}
- \call_user_func($callable, $service);
+ call_user_func($callable, $service);
}
return $service;
}
@@ -1042,19 +1089,19 @@ public function resolveServices($value)
{
return $this->doResolveServices($value);
}
- private function doResolveServices($value, array &$inlineServices = [], $isConstructorArgument = \false)
+ private function doResolveServices($value, array &$inlineServices = [], $isConstructorArgument = false)
{
- if (\is_array($value)) {
+ if (is_array($value)) {
foreach ($value as $k => $v) {
$value[$k] = $this->doResolveServices($v, $inlineServices, $isConstructorArgument);
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument) {
+ } elseif ($value instanceof ServiceClosureArgument) {
$reference = $value->getValues()[0];
$value = function () use($reference) {
return $this->resolveServices($reference);
};
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument) {
- $value = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () use($value) {
+ } elseif ($value instanceof IteratorArgument) {
+ $value = new RewindableGenerator(function () use($value) {
foreach ($value->getValues() as $k => $v) {
foreach (self::getServiceConditionals($v) as $s) {
if (!$this->has($s)) {
@@ -1062,7 +1109,7 @@ private function doResolveServices($value, array &$inlineServices = [], $isConst
}
}
foreach (self::getInitializedConditionals($v) as $s) {
- if (!$this->doGet($s, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
+ if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
continue 2;
}
}
@@ -1077,7 +1124,7 @@ private function doResolveServices($value, array &$inlineServices = [], $isConst
}
}
foreach (self::getInitializedConditionals($v) as $s) {
- if (!$this->doGet($s, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
+ if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
continue 2;
}
}
@@ -1085,13 +1132,13 @@ private function doResolveServices($value, array &$inlineServices = [], $isConst
}
return $count;
});
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($value instanceof Reference) {
$value = $this->doGet((string) $value, $value->getInvalidBehavior(), $inlineServices, $isConstructorArgument);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($value instanceof Definition) {
$value = $this->createService($value, $inlineServices, $isConstructorArgument);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter) {
+ } elseif ($value instanceof Parameter) {
$value = $this->getParameter((string) $value);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression) {
+ } elseif ($value instanceof Expression) {
$value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]);
}
return $value;
@@ -1115,14 +1162,14 @@ private function doResolveServices($value, array &$inlineServices = [], $isConst
*
* @return array An array of tags with the tagged service as key, holding a list of attribute arrays
*/
- public function findTaggedServiceIds($name, $throwOnAbstract = \false)
+ public function findTaggedServiceIds($name, $throwOnAbstract = false)
{
$this->usedTags[] = $name;
$tags = [];
foreach ($this->getDefinitions() as $id => $definition) {
if ($definition->hasTag($name)) {
if ($throwOnAbstract && $definition->isAbstract()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name));
+ throw new InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name));
}
$tags[$id] = $definition->getTag($name);
}
@@ -1138,9 +1185,9 @@ public function findTags()
{
$tags = [];
foreach ($this->getDefinitions() as $id => $definition) {
- $tags = \array_merge(\array_keys($definition->getTags()), $tags);
+ $tags = array_merge(array_keys($definition->getTags()), $tags);
}
- return \array_unique($tags);
+ return array_unique($tags);
}
/**
* Returns all tags not queried by findTaggedServiceIds.
@@ -1149,9 +1196,9 @@ public function findTags()
*/
public function findUnusedTags()
{
- return \array_values(\array_diff($this->findTags(), $this->usedTags));
+ return array_values(array_diff($this->findTags(), $this->usedTags));
}
- public function addExpressionLanguageProvider(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface $provider)
+ public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
{
$this->expressionLanguageProviders[] = $provider;
}
@@ -1172,7 +1219,7 @@ public function getExpressionLanguageProviders()
public function registerForAutoconfiguration($interface)
{
if (!isset($this->autoconfiguredInstanceof[$interface])) {
- $this->autoconfiguredInstanceof[$interface] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('');
+ $this->autoconfiguredInstanceof[$interface] = new ChildDefinition('');
}
return $this->autoconfiguredInstanceof[$interface];
}
@@ -1202,37 +1249,37 @@ public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs
$format = '%%env(%s)%%';
}
$bag = $this->getParameterBag();
- if (\true === $format) {
+ if (true === $format) {
$value = $bag->resolveValue($value);
}
- if (\is_array($value)) {
+ if (is_array($value)) {
$result = [];
foreach ($value as $k => $v) {
- $result[\is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs);
+ $result[is_string($k) ? $this->resolveEnvPlaceholders($k, $format, $usedEnvs) : $k] = $this->resolveEnvPlaceholders($v, $format, $usedEnvs);
}
return $result;
}
- if (!\is_string($value) || 38 > \strlen($value)) {
+ if (!is_string($value) || 38 > strlen($value)) {
return $value;
}
- $envPlaceholders = $bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
- $completed = \false;
+ $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
+ $completed = false;
foreach ($envPlaceholders as $env => $placeholders) {
foreach ($placeholders as $placeholder) {
- if (\false !== \stripos($value, $placeholder)) {
- if (\true === $format) {
+ if (false !== stripos($value, $placeholder)) {
+ if (true === $format) {
$resolved = $bag->escapeValue($this->getEnv($env));
} else {
- $resolved = \sprintf($format, $env);
+ $resolved = sprintf($format, $env);
}
if ($placeholder === $value) {
$value = $resolved;
- $completed = \true;
+ $completed = true;
} else {
- if (!\is_string($resolved) && !\is_numeric($resolved)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('A string value must be composed of strings and/or numbers, but found parameter "env(%s)" of type "%s" inside string value "%s".', $env, \gettype($resolved), $this->resolveEnvPlaceholders($value)));
+ if (!is_string($resolved) && !is_numeric($resolved)) {
+ throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "env(%s)" of type "%s" inside string value "%s".', $env, gettype($resolved), $this->resolveEnvPlaceholders($value)));
}
- $value = \str_ireplace($placeholder, $resolved, $value);
+ $value = str_ireplace($placeholder, $resolved, $value);
}
$usedEnvs[$env] = $env;
$this->envCounters[$env] = isset($this->envCounters[$env]) ? 1 + $this->envCounters[$env] : 1;
@@ -1252,7 +1299,7 @@ public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs
public function getEnvCounters()
{
$bag = $this->getParameterBag();
- $envPlaceholders = $bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
+ $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
foreach ($envPlaceholders as $env => $placeholders) {
if (!isset($this->envCounters[$env])) {
$this->envCounters[$env] = 0;
@@ -1276,7 +1323,7 @@ public function getNormalizedIds()
/**
* @final
*/
- public function log(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface $pass, $message)
+ public function log(CompilerPassInterface $pass, $message)
{
$this->getCompiler()->log($pass, $this->resolveEnvPlaceholders($message));
}
@@ -1285,7 +1332,7 @@ public function log(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjecti
*/
public function normalizeId($id)
{
- if (!\is_string($id)) {
+ if (!is_string($id)) {
$id = (string) $id;
}
return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || isset($this->removedIds[$id]) ? $id : parent::normalizeId($id);
@@ -1312,8 +1359,8 @@ public function removeBindings($id)
{
if ($this->hasDefinition($id)) {
foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
- list(, $bindingId) = $binding->getValues();
- $this->removedBindingIds[(int) $bindingId] = \true;
+ [, $bindingId] = $binding->getValues();
+ $this->removedBindingIds[(int) $bindingId] = true;
}
}
}
@@ -1329,11 +1376,11 @@ public function removeBindings($id)
public static function getServiceConditionals($value)
{
$services = [];
- if (\is_array($value)) {
+ if (is_array($value)) {
foreach ($value as $v) {
- $services = \array_unique(\array_merge($services, self::getServiceConditionals($v)));
+ $services = array_unique(array_merge($services, self::getServiceConditionals($v)));
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
+ } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
$services[] = (string) $value;
}
return $services;
@@ -1350,11 +1397,11 @@ public static function getServiceConditionals($value)
public static function getInitializedConditionals($value)
{
$services = [];
- if (\is_array($value)) {
+ if (is_array($value)) {
foreach ($value as $v) {
- $services = \array_unique(\array_merge($services, self::getInitializedConditionals($v)));
+ $services = array_unique(array_merge($services, self::getInitializedConditionals($v)));
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()) {
+ } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()) {
$services[] = (string) $value;
}
return $services;
@@ -1368,8 +1415,8 @@ public static function getInitializedConditionals($value)
*/
public static function hash($value)
{
- $hash = \substr(\base64_encode(\hash('sha256', \serialize($value), \true)), 0, 7);
- return \str_replace(['/', '+'], ['.', '_'], \strtolower($hash));
+ $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7);
+ return str_replace(['/', '+'], ['.', '_'], strtolower($hash));
}
/**
* {@inheritdoc}
@@ -1378,18 +1425,18 @@ protected function getEnv($name)
{
$value = parent::getEnv($name);
$bag = $this->getParameterBag();
- if (!\is_string($value) || !$bag instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag) {
+ if (!is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) {
return $value;
}
foreach ($bag->getEnvPlaceholders() as $env => $placeholders) {
if (isset($placeholders[$value])) {
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($bag->all());
+ $bag = new ParameterBag($bag->all());
return $bag->unescapeValue($bag->get("env({$name})"));
}
}
- $this->resolving["env({$name})"] = \true;
+ $this->resolving["env({$name})"] = true;
try {
- return $bag->unescapeValue($this->resolveEnvPlaceholders($bag->escapeValue($value), \true));
+ return $bag->unescapeValue($this->resolveEnvPlaceholders($bag->escapeValue($value), true));
} finally {
unset($this->resolving["env({$name})"]);
}
@@ -1402,11 +1449,11 @@ private function callMethod($service, $call, array &$inlineServices)
}
}
foreach (self::getInitializedConditionals($call[1]) as $s) {
- if (!$this->doGet($s, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) {
+ if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE, $inlineServices)) {
return;
}
}
- \call_user_func_array([$service, $call[0]], $this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices));
+ call_user_func_array([$service, $call[0]], $this->doResolveServices($this->getParameterBag()->unescapeValue($this->getParameterBag()->resolveValue($call[1])), $inlineServices));
}
/**
* Shares a given service in the container.
@@ -1414,9 +1461,9 @@ private function callMethod($service, $call, array &$inlineServices)
* @param mixed $service
* @param string|null $id
*/
- private function shareService(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $service, $id, array &$inlineServices)
+ private function shareService(Definition $definition, $service, $id, array &$inlineServices)
{
- $inlineServices[null !== $id ? $id : \spl_object_hash($definition)] = $service;
+ $inlineServices[null !== $id ? $id : spl_object_hash($definition)] = $service;
if (null !== $id && $definition->isShared()) {
$this->services[$id] = $service;
unset($this->loading[$id]);
@@ -1425,26 +1472,26 @@ private function shareService(\_PhpScoper5ea00cc67502b\Symfony\Component\Depende
private function getExpressionLanguage()
{
if (null === $this->expressionLanguage) {
- if (!\class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
+ if (!class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
+ throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
}
- $this->expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ExpressionLanguage(null, $this->expressionLanguageProviders);
+ $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders);
}
return $this->expressionLanguage;
}
private function inVendors($path)
{
if (null === $this->vendors) {
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ComposerResource();
+ $resource = new ComposerResource();
$this->vendors = $resource->getVendors();
$this->addResource($resource);
}
- $path = \realpath($path) ?: $path;
+ $path = realpath($path) ?: $path;
foreach ($this->vendors as $vendor) {
- if (0 === \strpos($path, $vendor) && \false !== \strpbrk(\substr($path, \strlen($vendor), 1), '/' . \DIRECTORY_SEPARATOR)) {
- return \true;
+ if (0 === strpos($path, $vendor) && false !== strpbrk(substr($path, strlen($vendor), 1), '/' . DIRECTORY_SEPARATOR)) {
+ return true;
}
}
- return \false;
+ return false;
}
}
diff --git a/vendor/symfony/dependency-injection/ContainerInterface.php b/vendor/symfony/dependency-injection/ContainerInterface.php
index ce8ca9aad..91063867d 100644
--- a/vendor/symfony/dependency-injection/ContainerInterface.php
+++ b/vendor/symfony/dependency-injection/ContainerInterface.php
@@ -20,7 +20,7 @@
* @author Fabien Potencier
* @author Johannes M. Schmitt
*/
-interface ContainerInterface extends \_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface
+interface ContainerInterface extends PsrContainerInterface
{
const EXCEPTION_ON_INVALID_REFERENCE = 1;
const NULL_ON_INVALID_REFERENCE = 2;
diff --git a/vendor/symfony/dependency-injection/Definition.php b/vendor/symfony/dependency-injection/Definition.php
index 818c2d4e3..a200a8572 100644
--- a/vendor/symfony/dependency-injection/Definition.php
+++ b/vendor/symfony/dependency-injection/Definition.php
@@ -13,6 +13,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
+use function array_key_exists;
+use function array_keys;
+use function count;
+use function explode;
+use function func_get_arg;
+use function func_num_args;
+use function is_int;
+use function is_string;
+use function preg_match;
+use function sprintf;
+use function str_replace;
+use function strpos;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Definition represents a service definition.
*
@@ -23,22 +38,22 @@ class Definition
private $class;
private $file;
private $factory;
- private $shared = \true;
- private $deprecated = \false;
+ private $shared = true;
+ private $deprecated = false;
private $deprecationTemplate;
private $properties = [];
private $calls = [];
private $instanceof = [];
- private $autoconfigured = \false;
+ private $autoconfigured = false;
private $configurator;
private $tags = [];
- private $public = \true;
- private $private = \true;
- private $synthetic = \false;
- private $abstract = \false;
- private $lazy = \false;
+ private $public = true;
+ private $private = true;
+ private $synthetic = false;
+ private $abstract = false;
+ private $lazy = false;
private $decoratedService;
- private $autowired = \false;
+ private $autowired = false;
private $autowiringTypes = [];
private $changes = [];
private $bindings = [];
@@ -86,9 +101,9 @@ public function setChanges(array $changes)
*/
public function setFactory($factory)
{
- $this->changes['factory'] = \true;
- if (\is_string($factory) && \false !== \strpos($factory, '::')) {
- $factory = \explode('::', $factory, 2);
+ $this->changes['factory'] = true;
+ if (is_string($factory) && false !== strpos($factory, '::')) {
+ $factory = explode('::', $factory, 2);
}
$this->factory = $factory;
return $this;
@@ -116,9 +131,9 @@ public function getFactory()
public function setDecoratedService($id, $renamedId = null, $priority = 0)
{
if ($renamedId && $id === $renamedId) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id));
+ throw new InvalidArgumentException(sprintf('The decorated service inner name for "%s" must be different than the service name itself.', $id));
}
- $this->changes['decorated_service'] = \true;
+ $this->changes['decorated_service'] = true;
if (null === $id) {
$this->decoratedService = null;
} else {
@@ -144,7 +159,7 @@ public function getDecoratedService()
*/
public function setClass($class)
{
- $this->changes['class'] = \true;
+ $this->changes['class'] = true;
$this->class = $class;
return $this;
}
@@ -223,14 +238,14 @@ public function addArgument($argument)
*/
public function replaceArgument($index, $argument)
{
- if (0 === \count($this->arguments)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\OutOfBoundsException('Cannot replace arguments if none have been configured yet.');
+ if (0 === count($this->arguments)) {
+ throw new OutOfBoundsException('Cannot replace arguments if none have been configured yet.');
}
- if (\is_int($index) && ($index < 0 || $index > \count($this->arguments) - 1)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\OutOfBoundsException(\sprintf('The index "%d" is not in the range [0, %d].', $index, \count($this->arguments) - 1));
+ if (is_int($index) && ($index < 0 || $index > count($this->arguments) - 1)) {
+ throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, count($this->arguments) - 1));
}
- if (!\array_key_exists($index, $this->arguments)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\OutOfBoundsException(\sprintf('The argument "%s" doesn\'t exist.', $index));
+ if (!array_key_exists($index, $this->arguments)) {
+ throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index));
}
$this->arguments[$index] = $argument;
return $this;
@@ -268,8 +283,8 @@ public function getArguments()
*/
public function getArgument($index)
{
- if (!\array_key_exists($index, $this->arguments)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\OutOfBoundsException(\sprintf('The argument "%s" doesn\'t exist.', $index));
+ if (!array_key_exists($index, $this->arguments)) {
+ throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index));
}
return $this->arguments[$index];
}
@@ -299,7 +314,7 @@ public function setMethodCalls(array $calls = [])
public function addMethodCall($method, array $arguments = [])
{
if (empty($method)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('Method name cannot be empty.');
+ throw new InvalidArgumentException('Method name cannot be empty.');
}
$this->calls[] = [$method, $arguments];
return $this;
@@ -332,10 +347,10 @@ public function hasMethodCall($method)
{
foreach ($this->calls as $call) {
if ($call[0] === $method) {
- return \true;
+ return true;
}
}
- return \false;
+ return false;
}
/**
* Gets the methods to call after service initialization.
@@ -376,7 +391,7 @@ public function getInstanceofConditionals()
*/
public function setAutoconfigured($autoconfigured)
{
- $this->changes['autoconfigured'] = \true;
+ $this->changes['autoconfigured'] = true;
$this->autoconfigured = $autoconfigured;
return $this;
}
@@ -472,7 +487,7 @@ public function clearTags()
*/
public function setFile($file)
{
- $this->changes['file'] = \true;
+ $this->changes['file'] = true;
$this->file = $file;
return $this;
}
@@ -494,7 +509,7 @@ public function getFile()
*/
public function setShared($shared)
{
- $this->changes['shared'] = \true;
+ $this->changes['shared'] = true;
$this->shared = (bool) $shared;
return $this;
}
@@ -516,9 +531,9 @@ public function isShared()
*/
public function setPublic($boolean)
{
- $this->changes['public'] = \true;
+ $this->changes['public'] = true;
$this->public = (bool) $boolean;
- $this->private = \false;
+ $this->private = false;
return $this;
}
/**
@@ -565,7 +580,7 @@ public function isPrivate()
*/
public function setLazy($lazy)
{
- $this->changes['lazy'] = \true;
+ $this->changes['lazy'] = true;
$this->lazy = (bool) $lazy;
return $this;
}
@@ -635,18 +650,18 @@ public function isAbstract()
*
* @throws InvalidArgumentException when the message template is invalid
*/
- public function setDeprecated($status = \true, $template = null)
+ public function setDeprecated($status = true, $template = null)
{
if (null !== $template) {
- if (\preg_match('#[\\r\\n]|\\*/#', $template)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('Invalid characters found in deprecation template.');
+ if (preg_match('#[\\r\\n]|\\*/#', $template)) {
+ throw new InvalidArgumentException('Invalid characters found in deprecation template.');
}
- if (\false === \strpos($template, '%service_id%')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.');
+ if (false === strpos($template, '%service_id%')) {
+ throw new InvalidArgumentException('The deprecation template must contain the "%service_id%" placeholder.');
}
$this->deprecationTemplate = $template;
}
- $this->changes['deprecated'] = \true;
+ $this->changes['deprecated'] = true;
$this->deprecated = (bool) $status;
return $this;
}
@@ -669,7 +684,7 @@ public function isDeprecated()
*/
public function getDeprecationMessage($id)
{
- return \str_replace('%service_id%', $id, $this->deprecationTemplate ?: self::$defaultDeprecationTemplate);
+ return str_replace('%service_id%', $id, $this->deprecationTemplate ?: self::$defaultDeprecationTemplate);
}
/**
* Sets a configurator to call after the service is fully initialized.
@@ -680,9 +695,9 @@ public function getDeprecationMessage($id)
*/
public function setConfigurator($configurator)
{
- $this->changes['configurator'] = \true;
- if (\is_string($configurator) && \false !== \strpos($configurator, '::')) {
- $configurator = \explode('::', $configurator, 2);
+ $this->changes['configurator'] = true;
+ if (is_string($configurator) && false !== strpos($configurator, '::')) {
+ $configurator = explode('::', $configurator, 2);
}
$this->configurator = $configurator;
return $this;
@@ -707,10 +722,10 @@ public function getConfigurator()
*/
public function setAutowiringTypes(array $types)
{
- @\trigger_error('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.', \E_USER_DEPRECATED);
+ @trigger_error('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.', E_USER_DEPRECATED);
$this->autowiringTypes = [];
foreach ($types as $type) {
- $this->autowiringTypes[$type] = \true;
+ $this->autowiringTypes[$type] = true;
}
return $this;
}
@@ -732,7 +747,7 @@ public function isAutowired()
*/
public function setAutowired($autowired)
{
- $this->changes['autowired'] = \true;
+ $this->changes['autowired'] = true;
$this->autowired = (bool) $autowired;
return $this;
}
@@ -745,10 +760,10 @@ public function setAutowired($autowired)
*/
public function getAutowiringTypes()
{
- if (1 > \func_num_args() || \func_get_arg(0)) {
- @\trigger_error('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.', \E_USER_DEPRECATED);
+ if (1 > func_num_args() || func_get_arg(0)) {
+ @trigger_error('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead.', E_USER_DEPRECATED);
}
- return \array_keys($this->autowiringTypes);
+ return array_keys($this->autowiringTypes);
}
/**
* Adds a type that will default to this definition.
@@ -761,8 +776,8 @@ public function getAutowiringTypes()
*/
public function addAutowiringType($type)
{
- @\trigger_error(\sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), \E_USER_DEPRECATED);
- $this->autowiringTypes[$type] = \true;
+ @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED);
+ $this->autowiringTypes[$type] = true;
return $this;
}
/**
@@ -776,7 +791,7 @@ public function addAutowiringType($type)
*/
public function removeAutowiringType($type)
{
- @\trigger_error(\sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED);
unset($this->autowiringTypes[$type]);
return $this;
}
@@ -791,7 +806,7 @@ public function removeAutowiringType($type)
*/
public function hasAutowiringType($type)
{
- @\trigger_error(\sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Autowiring-types are deprecated since Symfony 3.3 and will be removed in 4.0. Use aliases instead for "%s".', $type), E_USER_DEPRECATED);
return isset($this->autowiringTypes[$type]);
}
/**
@@ -815,8 +830,8 @@ public function getBindings()
public function setBindings(array $bindings)
{
foreach ($bindings as $key => $binding) {
- if (!$binding instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument) {
- $bindings[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument($binding);
+ if (!$binding instanceof BoundArgument) {
+ $bindings[$key] = new BoundArgument($binding);
}
}
$this->bindings = $bindings;
diff --git a/vendor/symfony/dependency-injection/DefinitionDecorator.php b/vendor/symfony/dependency-injection/DefinitionDecorator.php
index 4bd94620a..759560c1b 100644
--- a/vendor/symfony/dependency-injection/DefinitionDecorator.php
+++ b/vendor/symfony/dependency-injection/DefinitionDecorator.php
@@ -10,9 +10,13 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection;
-@\trigger_error('The ' . __NAMESPACE__ . '\\DefinitionDecorator class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Symfony\\Component\\DependencyInjection\\ChildDefinition class instead.', \E_USER_DEPRECATED);
-\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition::class);
-if (\false) {
+use function class_exists;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
+@trigger_error('The ' . __NAMESPACE__ . '\\DefinitionDecorator class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Symfony\\Component\\DependencyInjection\\ChildDefinition class instead.', E_USER_DEPRECATED);
+class_exists(ChildDefinition::class);
+if (false) {
/**
* This definition decorates another definition.
*
@@ -20,7 +24,7 @@
*
* @deprecated The DefinitionDecorator class is deprecated since version 3.3 and will be removed in 4.0. Use the Symfony\Component\DependencyInjection\ChildDefinition class instead.
*/
- class DefinitionDecorator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition
+ class DefinitionDecorator extends Definition
{
}
}
diff --git a/vendor/symfony/dependency-injection/Dumper/Dumper.php b/vendor/symfony/dependency-injection/Dumper/Dumper.php
index 038f69eb0..49eb3cdb8 100644
--- a/vendor/symfony/dependency-injection/Dumper/Dumper.php
+++ b/vendor/symfony/dependency-injection/Dumper/Dumper.php
@@ -16,10 +16,10 @@
*
* @author Fabien Potencier
*/
-abstract class Dumper implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\DumperInterface
+abstract class Dumper implements DumperInterface
{
protected $container;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function __construct(ContainerBuilder $container)
{
$this->container = $container;
}
diff --git a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
index cad585f96..e22053325 100644
--- a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
+++ b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
@@ -17,6 +17,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function array_key_exists;
+use function array_merge;
+use function get_class;
+use function implode;
+use function is_array;
+use function is_string;
+use function preg_match;
+use function preg_replace;
+use function sprintf;
+use function str_replace;
+use function strtolower;
+use function substr;
+
/**
* GraphvizDumper dumps a service container as a graphviz file.
*
@@ -26,7 +39,7 @@
*
* @author Fabien Potencier
*/
-class GraphvizDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\Dumper
+class GraphvizDumper extends Dumper
{
private $nodes;
private $edges;
@@ -50,15 +63,15 @@ public function dump(array $options = [])
{
foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) {
if (isset($options[$key])) {
- $this->options[$key] = \array_merge($this->options[$key], $options[$key]);
+ $this->options[$key] = array_merge($this->options[$key], $options[$key]);
}
}
$this->nodes = $this->findNodes();
$this->edges = [];
foreach ($this->container->getDefinitions() as $id => $definition) {
- $this->edges[$id] = \array_merge($this->findEdges($id, $definition->getArguments(), \true, ''), $this->findEdges($id, $definition->getProperties(), \false, ''));
+ $this->edges[$id] = array_merge($this->findEdges($id, $definition->getArguments(), true, ''), $this->findEdges($id, $definition->getProperties(), false, ''));
foreach ($definition->getMethodCalls() as $call) {
- $this->edges[$id] = \array_merge($this->edges[$id], $this->findEdges($id, $call[1], \false, $call[0] . '()'));
+ $this->edges[$id] = array_merge($this->edges[$id], $this->findEdges($id, $call[1], false, $call[0] . '()'));
}
}
return $this->container->resolveEnvPlaceholders($this->startDot() . $this->addNodes() . $this->addEdges() . $this->endDot(), '__ENV_%s__');
@@ -73,7 +86,7 @@ private function addNodes()
$code = '';
foreach ($this->nodes as $id => $node) {
$aliases = $this->getAliases($id);
- $code .= \sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id . ($aliases ? ' (' . \implode(', ', $aliases) . ')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes']));
+ $code .= sprintf(" node_%s [label=\"%s\\n%s\\n\", shape=%s%s];\n", $this->dotize($id), $id . ($aliases ? ' (' . implode(', ', $aliases) . ')' : ''), $node['class'], $this->options['node']['shape'], $this->addAttributes($node['attributes']));
}
return $code;
}
@@ -87,7 +100,7 @@ private function addEdges()
$code = '';
foreach ($this->edges as $id => $edges) {
foreach ($edges as $edge) {
- $code .= \sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : '');
+ $code .= sprintf(" node_%s -> node_%s [label=\"%s\" style=\"%s\"%s];\n", $this->dotize($id), $this->dotize($edge['to']), $edge['name'], $edge['required'] ? 'filled' : 'dashed', $edge['lazy'] ? ' color="#9999ff"' : '');
}
}
return $code;
@@ -102,16 +115,16 @@ private function addEdges()
*
* @return array An array of edges
*/
- private function findEdges($id, array $arguments, $required, $name, $lazy = \false)
+ private function findEdges($id, array $arguments, $required, $name, $lazy = false)
{
$edges = [];
foreach ($arguments as $argument) {
- if ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter) {
+ if ($argument instanceof Parameter) {
$argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null;
- } elseif (\is_string($argument) && \preg_match('/^%([^%]+)%$/', $argument, $match)) {
+ } elseif (is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) {
$argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null;
}
- if ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ if ($argument instanceof Reference) {
$lazyEdge = $lazy;
if (!$this->container->has((string) $argument)) {
$this->nodes[(string) $argument] = ['name' => $name, 'required' => $required, 'class' => '', 'attributes' => $this->options['node.missing']];
@@ -119,15 +132,15 @@ private function findEdges($id, array $arguments, $required, $name, $lazy = \fal
$lazyEdge = $lazy || $this->container->getDefinition((string) $argument)->isLazy();
}
$edges[] = ['name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge];
- } elseif ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
- $edges = \array_merge($edges, $this->findEdges($id, $argument->getValues(), $required, $name, \true));
- } elseif ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
- $edges = \array_merge($edges, $this->findEdges($id, $argument->getArguments(), $required, ''), $this->findEdges($id, $argument->getProperties(), \false, ''));
+ } elseif ($argument instanceof ArgumentInterface) {
+ $edges = array_merge($edges, $this->findEdges($id, $argument->getValues(), $required, $name, true));
+ } elseif ($argument instanceof Definition) {
+ $edges = array_merge($edges, $this->findEdges($id, $argument->getArguments(), $required, ''), $this->findEdges($id, $argument->getProperties(), false, ''));
foreach ($argument->getMethodCalls() as $call) {
- $edges = \array_merge($edges, $this->findEdges($id, $call[1], \false, $call[0] . '()'));
+ $edges = array_merge($edges, $this->findEdges($id, $call[1], false, $call[0] . '()'));
}
- } elseif (\is_array($argument)) {
- $edges = \array_merge($edges, $this->findEdges($id, $argument, $required, $name, $lazy));
+ } elseif (is_array($argument)) {
+ $edges = array_merge($edges, $this->findEdges($id, $argument, $required, $name, $lazy));
}
}
return $edges;
@@ -143,30 +156,30 @@ private function findNodes()
$container = $this->cloneContainer();
foreach ($container->getDefinitions() as $id => $definition) {
$class = $definition->getClass();
- if ('\\' === \substr($class, 0, 1)) {
- $class = \substr($class, 1);
+ if ('\\' === substr($class, 0, 1)) {
+ $class = substr($class, 1);
}
try {
$class = $this->container->getParameterBag()->resolveValue($class);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
}
- $nodes[$id] = ['class' => \str_replace('\\', '\\\\', $class), 'attributes' => \array_merge($this->options['node.definition'], ['style' => $definition->isShared() ? 'filled' : 'dotted'])];
- $container->setDefinition($id, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass'));
+ $nodes[$id] = ['class' => str_replace('\\', '\\\\', $class), 'attributes' => array_merge($this->options['node.definition'], ['style' => $definition->isShared() ? 'filled' : 'dotted'])];
+ $container->setDefinition($id, new Definition('stdClass'));
}
foreach ($container->getServiceIds() as $id) {
- if (\array_key_exists($id, $container->getAliases())) {
+ if (array_key_exists($id, $container->getAliases())) {
continue;
}
if (!$container->hasDefinition($id)) {
- $nodes[$id] = ['class' => \str_replace('\\', '\\\\', \get_class($container->get($id))), 'attributes' => $this->options['node.instance']];
+ $nodes[$id] = ['class' => str_replace('\\', '\\\\', get_class($container->get($id))), 'attributes' => $this->options['node.instance']];
}
}
return $nodes;
}
private function cloneContainer()
{
- $parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($this->container->getParameterBag()->all());
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder($parameterBag);
+ $parameterBag = new ParameterBag($this->container->getParameterBag()->all());
+ $container = new ContainerBuilder($parameterBag);
$container->setDefinitions($this->container->getDefinitions());
$container->setAliases($this->container->getAliases());
$container->setResources($this->container->getResources());
@@ -182,7 +195,7 @@ private function cloneContainer()
*/
private function startDot()
{
- return \sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n", $this->addOptions($this->options['graph']), $this->addOptions($this->options['node']), $this->addOptions($this->options['edge']));
+ return sprintf("digraph sc {\n %s\n node [%s];\n edge [%s];\n\n", $this->addOptions($this->options['graph']), $this->addOptions($this->options['node']), $this->addOptions($this->options['edge']));
}
/**
* Returns the end dot.
@@ -204,9 +217,9 @@ private function addAttributes(array $attributes)
{
$code = [];
foreach ($attributes as $k => $v) {
- $code[] = \sprintf('%s="%s"', $k, $v);
+ $code[] = sprintf('%s="%s"', $k, $v);
}
- return $code ? ', ' . \implode(', ', $code) : '';
+ return $code ? ', ' . implode(', ', $code) : '';
}
/**
* Adds options.
@@ -219,9 +232,9 @@ private function addOptions(array $options)
{
$code = [];
foreach ($options as $k => $v) {
- $code[] = \sprintf('%s="%s"', $k, $v);
+ $code[] = sprintf('%s="%s"', $k, $v);
}
- return \implode(' ', $code);
+ return implode(' ', $code);
}
/**
* Dotizes an identifier.
@@ -232,7 +245,7 @@ private function addOptions(array $options)
*/
private function dotize($id)
{
- return \strtolower(\preg_replace('/\\W/i', '_', $id));
+ return strtolower(preg_replace('/\\W/i', '_', $id));
}
/**
* Compiles an array of aliases for a specified service id.
diff --git a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
index da5f392e3..33a471c78 100644
--- a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
+++ b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
@@ -32,13 +32,71 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
use _PhpScoper5ea00cc67502b\Symfony\Component\HttpKernel\Kernel;
+use SplObjectStorage;
+use function array_combine;
+use function array_diff_key;
+use function array_fill;
+use function array_filter;
+use function array_flip;
+use function array_keys;
+use function array_map;
+use function array_merge;
+use function array_pop;
+use function array_reverse;
+use function array_search;
+use function class_exists;
+use function count;
+use function dirname;
+use function end;
+use function explode;
+use function get_class;
+use function hash;
+use function implode;
+use function in_array;
+use function is_array;
+use function is_dir;
+use function is_object;
+use function is_resource;
+use function is_scalar;
+use function is_string;
+use function key;
+use function ksort;
+use function ltrim;
+use function method_exists;
+use function min;
+use function preg_match;
+use function preg_quote;
+use function preg_replace;
+use function preg_replace_callback;
+use function realpath;
+use function rtrim;
+use function sort;
+use function sprintf;
+use function str_repeat;
+use function str_replace;
+use function stripcslashes;
+use function strlen;
+use function strpos;
+use function strrpos;
+use function strtolower;
+use function strtr;
+use function substr;
+use function substr_replace;
+use function time;
+use function trigger_error;
+use function ucfirst;
+use function var_export;
+use const DIRECTORY_SEPARATOR;
+use const E_USER_DEPRECATED;
+use const PREG_OFFSET_CAPTURE;
+
/**
* PhpDumper dumps a service container as a PHP class.
*
* @author Fabien Potencier
* @author Johannes M. Schmitt
*/
-class PhpDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\Dumper
+class PhpDumper extends Dumper
{
/**
* Characters that might appear in the generated variable name as first character.
@@ -73,17 +131,17 @@ class PhpDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
/**
* {@inheritdoc}
*/
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function __construct(ContainerBuilder $container)
{
if (!$container->isCompiled()) {
- @\trigger_error('Dumping an uncompiled ContainerBuilder is deprecated since Symfony 3.3 and will not be supported anymore in 4.0. Compile the container beforehand.', \E_USER_DEPRECATED);
+ @trigger_error('Dumping an uncompiled ContainerBuilder is deprecated since Symfony 3.3 and will not be supported anymore in 4.0. Compile the container beforehand.', E_USER_DEPRECATED);
}
parent::__construct($container);
}
/**
* Sets the dumper to be used when dumping proxies in the generated container.
*/
- public function setProxyDumper(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface $proxyDumper)
+ public function setProxyDumper(ProxyDumper $proxyDumper)
{
$this->proxyDumper = $proxyDumper;
}
@@ -105,36 +163,36 @@ public function dump(array $options = [])
{
$this->targetDirRegex = null;
$this->inlinedRequires = [];
- $options = \array_merge(['class' => 'ProjectServiceContainer', 'base_class' => 'Container', 'namespace' => '', 'as_files' => \false, 'debug' => \true, 'hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'container.dumper.inline_class_loader', 'build_time' => \time()], $options);
+ $options = array_merge(['class' => 'ProjectServiceContainer', 'base_class' => 'Container', 'namespace' => '', 'as_files' => false, 'debug' => true, 'hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'container.dumper.inline_class_loader', 'build_time' => time()], $options);
$this->namespace = $options['namespace'];
$this->asFiles = $options['as_files'];
$this->hotPathTag = $options['hot_path_tag'];
$this->inlineRequires = $options['inline_class_loader_parameter'] && $this->container->hasParameter($options['inline_class_loader_parameter']) && $this->container->getParameter($options['inline_class_loader_parameter']);
- if (0 !== \strpos($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) {
- $baseClass = \sprintf('%s\\%s', $options['namespace'] ? '\\' . $options['namespace'] : '', $baseClass);
+ if (0 !== strpos($baseClass = $options['base_class'], '\\') && 'Container' !== $baseClass) {
+ $baseClass = sprintf('%s\\%s', $options['namespace'] ? '\\' . $options['namespace'] : '', $baseClass);
$baseClassWithNamespace = $baseClass;
} elseif ('Container' === $baseClass) {
- $baseClassWithNamespace = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::class;
+ $baseClassWithNamespace = Container::class;
} else {
$baseClassWithNamespace = $baseClass;
}
- $this->initializeMethodNamesMap('Container' === $baseClass ? \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::class : $baseClass);
- if ($this->getProxyDumper() instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper) {
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(\true, \false))->process($this->container);
+ $this->initializeMethodNamesMap('Container' === $baseClass ? Container::class : $baseClass);
+ if ($this->getProxyDumper() instanceof NullDumper) {
+ (new AnalyzeServiceReferencesPass(true, false))->process($this->container);
try {
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass())->process($this->container);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException $e) {
+ (new CheckCircularReferencesPass())->process($this->container);
+ } catch (ServiceCircularReferenceException $e) {
$path = $e->getPath();
- \end($path);
- $path[\key($path)] .= '". Try running "composer require symfony/proxy-manager-bridge';
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($e->getServiceId(), $path);
+ end($path);
+ $path[key($path)] .= '". Try running "composer require symfony/proxy-manager-bridge';
+ throw new ServiceCircularReferenceException($e->getServiceId(), $path);
}
}
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(\false, !$this->getProxyDumper() instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper))->process($this->container);
+ (new AnalyzeServiceReferencesPass(false, !$this->getProxyDumper() instanceof NullDumper))->process($this->container);
$checkedNodes = [];
$this->circularReferences = [];
foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) {
- if (!$node->getValue() instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (!$node->getValue() instanceof Definition) {
continue;
}
if (!isset($checkedNodes[$id])) {
@@ -144,23 +202,23 @@ public function dump(array $options = [])
$this->container->getCompiler()->getServiceReferenceGraph()->clear();
$checkedNodes = [];
$this->docStar = $options['debug'] ? '*' : '';
- if (!empty($options['file']) && \is_dir($dir = \dirname($options['file']))) {
+ if (!empty($options['file']) && is_dir($dir = dirname($options['file']))) {
// Build a regexp where the first root dirs are mandatory,
// but every other sub-dir is optional up to the full path in $dir
// Mandate at least 1 root dir and not more than 5 optional dirs.
- $dir = \explode(\DIRECTORY_SEPARATOR, \realpath($dir));
- $i = \count($dir);
- if (2 + (int) ('\\' === \DIRECTORY_SEPARATOR) <= $i) {
+ $dir = explode(DIRECTORY_SEPARATOR, realpath($dir));
+ $i = count($dir);
+ if (2 + (int) ('\\' === DIRECTORY_SEPARATOR) <= $i) {
$regex = '';
- $lastOptionalDir = $i > 8 ? $i - 5 : 2 + (int) ('\\' === \DIRECTORY_SEPARATOR);
+ $lastOptionalDir = $i > 8 ? $i - 5 : 2 + (int) ('\\' === DIRECTORY_SEPARATOR);
$this->targetDirMaxMatches = $i - $lastOptionalDir;
while (--$i >= $lastOptionalDir) {
- $regex = \sprintf('(%s%s)?', \preg_quote(\DIRECTORY_SEPARATOR . $dir[$i], '#'), $regex);
+ $regex = sprintf('(%s%s)?', preg_quote(DIRECTORY_SEPARATOR . $dir[$i], '#'), $regex);
}
do {
- $regex = \preg_quote(\DIRECTORY_SEPARATOR . $dir[$i], '#') . $regex;
+ $regex = preg_quote(DIRECTORY_SEPARATOR . $dir[$i], '#') . $regex;
} while (0 < --$i);
- $this->targetDirRegex = '#' . \preg_quote($dir[0], '#') . $regex . '#';
+ $this->targetDirRegex = '#' . preg_quote($dir[0], '#') . $regex . '#';
}
}
$code = $this->startClass($options['class'], $baseClass, $baseClassWithNamespace) . $this->addServices() . $this->addDefaultParametersMethod() . $this->endClass();
@@ -174,8 +232,8 @@ public function dump(array $options = [])
EOF;
$files = [];
- if ($ids = \array_keys($this->container->getRemovedIds())) {
- \sort($ids);
+ if ($ids = array_keys($this->container->getRemovedIds())) {
+ sort($ids);
$c = "doExport($id) . " => true,\n";
@@ -189,16 +247,16 @@ public function dump(array $options = [])
$files[$file] = " $c) {
$code["Container{$hash}/{$file}"] = $c;
}
- \array_pop($code);
- $code["Container{$hash}/{$options['class']}.php"] = \substr_replace($files[$options['class'] . '.php'], "namespace ? "\nnamespace {$this->namespace};\n" : '';
$time = $options['build_time'];
- $id = \hash('crc32', $hash . $time);
+ $id = hash('crc32', $hash . $time);
$code[$options['class'] . '.php'] = <<proxyDumper) {
- $this->proxyDumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper();
+ $this->proxyDumper = new NullDumper();
}
return $this->proxyDumper;
}
- private function analyzeCircularReferences($sourceId, array $edges, &$checkedNodes, &$currentPath = [], $byConstructor = \true)
+ private function analyzeCircularReferences($sourceId, array $edges, &$checkedNodes, &$currentPath = [], $byConstructor = true)
{
- $checkedNodes[$sourceId] = \true;
+ $checkedNodes[$sourceId] = true;
$currentPath[$sourceId] = $byConstructor;
foreach ($edges as $edge) {
$node = $edge->getDestNode();
$id = $node->getId();
- if (!$node->getValue() instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || $sourceId === $id || $edge->isLazy() || $edge->isWeak()) {
+ if (!$node->getValue() instanceof Definition || $sourceId === $id || $edge->isLazy() || $edge->isWeak()) {
// no-op
} elseif (isset($currentPath[$id])) {
$this->addCircularReferences($id, $currentPath, $edge->isReferencedByConstructor());
@@ -289,7 +347,7 @@ private function addCircularReferences($id, $currentPath, $byConstructor)
{
$currentPath[$id] = $byConstructor;
$circularRefs = [];
- foreach (\array_reverse($currentPath) as $parentId => $v) {
+ foreach (array_reverse($currentPath) as $parentId => $v) {
$byConstructor = $byConstructor && $v;
$circularRefs[] = $parentId;
if ($parentId === $id) {
@@ -309,7 +367,7 @@ private function collectLineage($class, array &$lineage)
if (isset($lineage[$class])) {
return;
}
- if (!($r = $this->container->getReflectionClass($class, \false))) {
+ if (!($r = $this->container->getReflectionClass($class, false))) {
return;
}
if ($this->container instanceof $class) {
@@ -328,15 +386,15 @@ private function collectLineage($class, array &$lineage)
foreach ($r->getTraits() as $parent) {
$this->collectLineage($parent->name, $lineage);
}
- $lineage[$class] = \substr($exportedFile, 1, -1);
+ $lineage[$class] = substr($exportedFile, 1, -1);
}
private function generateProxyClasses()
{
$alreadyGenerated = [];
$definitions = $this->container->getDefinitions();
- $strip = '' === $this->docStar && \method_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\HttpKernel\\Kernel', 'stripComments');
+ $strip = '' === $this->docStar && method_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\HttpKernel\\Kernel', 'stripComments');
$proxyDumper = $this->getProxyDumper();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $definition) {
if (!$proxyDumper->isProxyCandidate($definition)) {
continue;
@@ -344,7 +402,7 @@ private function generateProxyClasses()
if (isset($alreadyGenerated[$class = $definition->getClass()])) {
continue;
}
- $alreadyGenerated[$class] = \true;
+ $alreadyGenerated[$class] = true;
// register class' reflector for resource tracking
$this->container->getReflectionClass($class);
if ("\n" === ($proxyCode = "\n" . $proxyDumper->getProxyCode($definition))) {
@@ -352,9 +410,9 @@ private function generateProxyClasses()
}
if ($strip) {
$proxyCode = " $proxyCode);
+ (yield sprintf('%s.php', explode(' ', $proxyCode, 3)[1]) => $proxyCode);
}
}
/**
@@ -362,28 +420,28 @@ private function generateProxyClasses()
*
* @return string
*/
- private function addServiceInclude($cId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ private function addServiceInclude($cId, Definition $definition)
{
$code = '';
if ($this->inlineRequires && !$this->isHotPath($definition)) {
$lineage = [];
foreach ($this->inlinedDefinitions as $def) {
- if (!$def->isDeprecated() && \is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) {
+ if (!$def->isDeprecated() && is_string($class = is_array($factory = $def->getFactory()) && is_string($factory[0]) ? $factory[0] : $def->getClass())) {
$this->collectLineage($class, $lineage);
}
}
- foreach ($this->serviceCalls as $id => list($callCount, $behavior)) {
- if ('service_container' !== $id && $id !== $cId && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $behavior && $this->container->has($id) && $this->isTrivialInstance($def = $this->container->findDefinition($id)) && \is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) {
+ foreach ($this->serviceCalls as $id => [$callCount, $behavior]) {
+ if ('service_container' !== $id && $id !== $cId && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE !== $behavior && $this->container->has($id) && $this->isTrivialInstance($def = $this->container->findDefinition($id)) && is_string($class = is_array($factory = $def->getFactory()) && is_string($factory[0]) ? $factory[0] : $def->getClass())) {
$this->collectLineage($class, $lineage);
}
}
- foreach (\array_diff_key(\array_flip($lineage), $this->inlinedRequires) as $file => $class) {
- $code .= \sprintf(" include_once %s;\n", $file);
+ foreach (array_diff_key(array_flip($lineage), $this->inlinedRequires) as $file => $class) {
+ $code .= sprintf(" include_once %s;\n", $file);
}
}
foreach ($this->inlinedDefinitions as $def) {
if ($file = $def->getFile()) {
- $code .= \sprintf(" include_once %s;\n", $this->dumpValue($file));
+ $code .= sprintf(" include_once %s;\n", $this->dumpValue($file));
}
}
if ('' !== $code) {
@@ -402,16 +460,16 @@ private function addServiceInclude($cId, \_PhpScoper5ea00cc67502b\Symfony\Compon
* @throws InvalidArgumentException
* @throws RuntimeException
*/
- private function addServiceInstance($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $isSimpleInstance)
+ private function addServiceInstance($id, Definition $definition, $isSimpleInstance)
{
$class = $this->dumpValue($definition->getClass());
- if (0 === \strpos($class, "'") && \false === \strpos($class, '$') && !\preg_match('/^\'(?:\\\\{2})?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*(?:\\\\{2}[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)*\'$/', $class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id));
+ if (0 === strpos($class, "'") && false === strpos($class, '$') && !preg_match('/^\'(?:\\\\{2})?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*(?:\\\\{2}[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)*\'$/', $class)) {
+ throw new InvalidArgumentException(sprintf('"%s" is not a valid class name for the "%s" service.', $class, $id));
}
$isProxyCandidate = $this->getProxyDumper()->isProxyCandidate($definition);
$instantiation = '';
if (!$isProxyCandidate && $definition->isShared()) {
- $instantiation = \sprintf('$this->services[%s] = %s', $this->doExport($id), $isSimpleInstance ? '' : '$instance');
+ $instantiation = sprintf('$this->services[%s] = %s', $this->doExport($id), $isSimpleInstance ? '' : '$instance');
} elseif (!$isSimpleInstance) {
$instantiation = '$instance';
}
@@ -428,40 +486,40 @@ private function addServiceInstance($id, \_PhpScoper5ea00cc67502b\Symfony\Compon
*
* @return bool
*/
- private function isTrivialInstance(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ private function isTrivialInstance(Definition $definition)
{
if ($definition->isSynthetic() || $definition->getFile() || $definition->getMethodCalls() || $definition->getProperties() || $definition->getConfigurator()) {
- return \false;
+ return false;
}
- if ($definition->isDeprecated() || $definition->isLazy() || $definition->getFactory() || 3 < \count($definition->getArguments())) {
- return \false;
+ if ($definition->isDeprecated() || $definition->isLazy() || $definition->getFactory() || 3 < count($definition->getArguments())) {
+ return false;
}
foreach ($definition->getArguments() as $arg) {
- if (!$arg || $arg instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter) {
+ if (!$arg || $arg instanceof Parameter) {
continue;
}
- if (\is_array($arg) && 3 >= \count($arg)) {
+ if (is_array($arg) && 3 >= count($arg)) {
foreach ($arg as $k => $v) {
- if ($this->dumpValue($k) !== $this->dumpValue($k, \false)) {
- return \false;
+ if ($this->dumpValue($k) !== $this->dumpValue($k, false)) {
+ return false;
}
- if (!$v || $v instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter) {
+ if (!$v || $v instanceof Parameter) {
continue;
}
- if ($v instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && $this->container->has($id = (string) $v) && $this->container->findDefinition($id)->isSynthetic()) {
+ if ($v instanceof Reference && $this->container->has($id = (string) $v) && $this->container->findDefinition($id)->isSynthetic()) {
continue;
}
- if (!\is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, \false)) {
- return \false;
+ if (!is_scalar($v) || $this->dumpValue($v) !== $this->dumpValue($v, false)) {
+ return false;
}
}
- } elseif ($arg instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference && $this->container->has($id = (string) $arg) && $this->container->findDefinition($id)->isSynthetic()) {
+ } elseif ($arg instanceof Reference && $this->container->has($id = (string) $arg) && $this->container->findDefinition($id)->isSynthetic()) {
continue;
- } elseif (!\is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, \false)) {
- return \false;
+ } elseif (!is_scalar($arg) || $this->dumpValue($arg) !== $this->dumpValue($arg, false)) {
+ return false;
}
}
- return \true;
+ return true;
}
/**
* Adds method calls to a service definition.
@@ -470,7 +528,7 @@ private function isTrivialInstance(\_PhpScoper5ea00cc67502b\Symfony\Component\De
*
* @return string
*/
- private function addServiceMethodCalls(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $variableName = 'instance')
+ private function addServiceMethodCalls(Definition $definition, $variableName = 'instance')
{
$calls = '';
foreach ($definition->getMethodCalls() as $call) {
@@ -478,15 +536,15 @@ private function addServiceMethodCalls(\_PhpScoper5ea00cc67502b\Symfony\Componen
foreach ($call[1] as $value) {
$arguments[] = $this->dumpValue($value);
}
- $calls .= $this->wrapServiceConditionals($call[1], \sprintf(" \$%s->%s(%s);\n", $variableName, $call[0], \implode(', ', $arguments)));
+ $calls .= $this->wrapServiceConditionals($call[1], sprintf(" \$%s->%s(%s);\n", $variableName, $call[0], implode(', ', $arguments)));
}
return $calls;
}
- private function addServiceProperties(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $variableName = 'instance')
+ private function addServiceProperties(Definition $definition, $variableName = 'instance')
{
$code = '';
foreach ($definition->getProperties() as $name => $value) {
- $code .= \sprintf(" \$%s->%s = %s;\n", $variableName, $name, $this->dumpValue($value));
+ $code .= sprintf(" \$%s->%s = %s;\n", $variableName, $name, $this->dumpValue($value));
}
return $code;
}
@@ -497,26 +555,26 @@ private function addServiceProperties(\_PhpScoper5ea00cc67502b\Symfony\Component
*
* @return string
*/
- private function addServiceConfigurator(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $variableName = 'instance')
+ private function addServiceConfigurator(Definition $definition, $variableName = 'instance')
{
if (!($callable = $definition->getConfigurator())) {
return '';
}
- if (\is_array($callable)) {
- if ($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference || $callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition && $this->definitionVariables->contains($callable[0])) {
- return \sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
+ if (is_array($callable)) {
+ if ($callable[0] instanceof Reference || $callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0])) {
+ return sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
}
$class = $this->dumpValue($callable[0]);
// If the class is a string we can optimize call_user_func away
- if (0 === \strpos($class, "'") && \false === \strpos($class, '$')) {
- return \sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $callable[1], $variableName);
+ if (0 === strpos($class, "'") && false === strpos($class, '$')) {
+ return sprintf(" %s::%s(\$%s);\n", $this->dumpLiteralClass($class), $callable[1], $variableName);
}
- if (0 === \strpos($class, 'new ')) {
- return \sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
+ if (0 === strpos($class, 'new ')) {
+ return sprintf(" (%s)->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
}
- return \sprintf(" \\call_user_func([%s, '%s'], \$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
+ return sprintf(" \\call_user_func([%s, '%s'], \$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName);
}
- return \sprintf(" %s(\$%s);\n", $callable, $variableName);
+ return sprintf(" %s(\$%s);\n", $callable, $variableName);
}
/**
* Adds a service.
@@ -526,33 +584,33 @@ private function addServiceConfigurator(\_PhpScoper5ea00cc67502b\Symfony\Compone
*
* @return string
*/
- private function addService($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, &$file = null)
+ private function addService($id, Definition $definition, &$file = null)
{
- $this->definitionVariables = new \SplObjectStorage();
+ $this->definitionVariables = new SplObjectStorage();
$this->referenceVariables = [];
$this->variableCount = 0;
- $this->referenceVariables[$id] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable('instance');
+ $this->referenceVariables[$id] = new Variable('instance');
$return = [];
if ($class = $definition->getClass()) {
- $class = $class instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter ? '%' . $class . '%' : $this->container->resolveEnvPlaceholders($class);
- $return[] = \sprintf(0 === \strpos($class, '%') ? '@return object A %1$s instance' : '@return \\%s', \ltrim($class, '\\'));
+ $class = $class instanceof Parameter ? '%' . $class . '%' : $this->container->resolveEnvPlaceholders($class);
+ $return[] = sprintf(0 === strpos($class, '%') ? '@return object A %1$s instance' : '@return \\%s', ltrim($class, '\\'));
} elseif ($definition->getFactory()) {
$factory = $definition->getFactory();
- if (\is_string($factory)) {
- $return[] = \sprintf('@return object An instance returned by %s()', $factory);
- } elseif (\is_array($factory) && (\is_string($factory[0]) || $factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition || $factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference)) {
- $class = $factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition ? $factory[0]->getClass() : (string) $factory[0];
- $class = $class instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter ? '%' . $class . '%' : $this->container->resolveEnvPlaceholders($class);
- $return[] = \sprintf('@return object An instance returned by %s::%s()', $class, $factory[1]);
+ if (is_string($factory)) {
+ $return[] = sprintf('@return object An instance returned by %s()', $factory);
+ } elseif (is_array($factory) && (is_string($factory[0]) || $factory[0] instanceof Definition || $factory[0] instanceof Reference)) {
+ $class = $factory[0] instanceof Definition ? $factory[0]->getClass() : (string) $factory[0];
+ $class = $class instanceof Parameter ? '%' . $class . '%' : $this->container->resolveEnvPlaceholders($class);
+ $return[] = sprintf('@return object An instance returned by %s::%s()', $class, $factory[1]);
}
}
if ($definition->isDeprecated()) {
- if ($return && 0 === \strpos($return[\count($return) - 1], '@return')) {
+ if ($return && 0 === strpos($return[count($return) - 1], '@return')) {
$return[] = '';
}
- $return[] = \sprintf('@deprecated %s', $definition->getDeprecationMessage($id));
+ $return[] = sprintf('@deprecated %s', $definition->getDeprecationMessage($id));
}
- $return = \str_replace("\n * \n", "\n *\n", \implode("\n * ", $return));
+ $return = str_replace("\n * \n", "\n *\n", implode("\n * ", $return));
$return = $this->container->resolveEnvPlaceholders($return);
$shared = $definition->isShared() ? ' shared' : '';
$public = $definition->isPublic() ? 'public' : 'private';
@@ -575,7 +633,7 @@ private function addService($id, \_PhpScoper5ea00cc67502b\Symfony\Component\Depe
*
* {$return}
EOF;
- $code = \str_replace('*/', ' ', $code) . <<addServiceInclude($id, $definition);
if ($this->getProxyDumper()->isProxyCandidate($definition)) {
$factoryCode = $asFile ? "\$this->load('%s.php', false)" : '$this->%s(false)';
- $code .= $this->getProxyDumper()->getProxyFactoryCode($definition, $id, \sprintf($factoryCode, $methodName, $this->doExport($id)));
+ $code .= $this->getProxyDumper()->getProxyFactoryCode($definition, $id, sprintf($factoryCode, $methodName, $this->doExport($id)));
}
if ($definition->isDeprecated()) {
- $code .= \sprintf(" @trigger_error(%s, E_USER_DEPRECATED);\n\n", $this->export($definition->getDeprecationMessage($id)));
+ $code .= sprintf(" @trigger_error(%s, E_USER_DEPRECATED);\n\n", $this->export($definition->getDeprecationMessage($id)));
}
$code .= $this->addInlineService($id, $definition);
if ($asFile) {
- $code = \implode("\n", \array_map(function ($line) {
- return $line ? \substr($line, 8) : $line;
- }, \explode("\n", $code)));
+ $code = implode("\n", array_map(function ($line) {
+ return $line ? substr($line, 8) : $line;
+ }, explode("\n", $code)));
} else {
$code .= " }\n";
}
@@ -605,26 +663,26 @@ protected function {$methodName}({$lazyInitialization})
$this->referenceVariables = $this->serviceCalls = null;
return $code;
}
- private function addInlineVariables($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, array $arguments, $forConstructor)
+ private function addInlineVariables($id, Definition $definition, array $arguments, $forConstructor)
{
$code = '';
foreach ($arguments as $argument) {
- if (\is_array($argument)) {
+ if (is_array($argument)) {
$code .= $this->addInlineVariables($id, $definition, $argument, $forConstructor);
- } elseif ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($argument instanceof Reference) {
$code .= $this->addInlineReference($id, $definition, $this->container->normalizeId($argument), $forConstructor);
- } elseif ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($argument instanceof Definition) {
$code .= $this->addInlineService($id, $definition, $argument, $forConstructor);
}
}
return $code;
}
- private function addInlineReference($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $targetId, $forConstructor)
+ private function addInlineReference($id, Definition $definition, $targetId, $forConstructor)
{
while ($this->container->hasAlias($targetId)) {
$targetId = (string) $this->container->getAlias($targetId);
}
- list($callCount, $behavior) = $this->serviceCalls[$targetId];
+ [$callCount, $behavior] = $this->serviceCalls[$targetId];
if ($id === $targetId) {
return $this->addInlineService($id, $definition, $definition);
}
@@ -641,13 +699,13 @@ private function addInlineReference($id, \_PhpScoper5ea00cc67502b\Symfony\Compon
return $code;
}
$name = $this->getNextVariableName();
- $this->referenceVariables[$targetId] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable($name);
- $reference = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $behavior ? new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($targetId, $behavior) : null;
- $code .= \sprintf(" \$%s = %s;\n", $name, $this->getServiceCall($targetId, $reference));
+ $this->referenceVariables[$targetId] = new Variable($name);
+ $reference = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE >= $behavior ? new Reference($targetId, $behavior) : null;
+ $code .= sprintf(" \$%s = %s;\n", $name, $this->getServiceCall($targetId, $reference));
if (!$hasSelfRef || !$forConstructor) {
return $code;
}
- $code .= \sprintf(<<<'EOTXT'
+ $code .= sprintf(<<<'EOTXT'
if (isset($this->%s[%s])) {
return $this->%1$s[%2$s];
@@ -657,11 +715,11 @@ private function addInlineReference($id, \_PhpScoper5ea00cc67502b\Symfony\Compon
, 'services', $this->doExport($id));
return $code;
}
- private function addInlineService($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $inlineDef = null, $forConstructor = \true)
+ private function addInlineService($id, Definition $definition, Definition $inlineDef = null, $forConstructor = true)
{
$code = '';
if ($isSimpleInstance = $isRootInstance = null === $inlineDef) {
- foreach ($this->serviceCalls as $targetId => list($callCount, $behavior, $byConstructor)) {
+ foreach ($this->serviceCalls as $targetId => [$callCount, $behavior, $byConstructor]) {
if ($byConstructor && isset($this->circularReferences[$id][$targetId]) && !$this->circularReferences[$id][$targetId]) {
$code .= $this->addInlineReference($id, $definition, $targetId, $forConstructor);
}
@@ -672,23 +730,23 @@ private function addInlineService($id, \_PhpScoper5ea00cc67502b\Symfony\Componen
}
$arguments = [$inlineDef->getArguments(), $inlineDef->getFactory()];
$code .= $this->addInlineVariables($id, $definition, $arguments, $forConstructor);
- if ($arguments = \array_filter([$inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()])) {
- $isSimpleInstance = \false;
+ if ($arguments = array_filter([$inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()])) {
+ $isSimpleInstance = false;
} elseif ($definition !== $inlineDef && 2 > $this->inlinedDefinitions[$inlineDef]) {
return $code;
}
if (isset($this->definitionVariables[$inlineDef])) {
- $isSimpleInstance = \false;
+ $isSimpleInstance = false;
} else {
$name = $definition === $inlineDef ? 'instance' : $this->getNextVariableName();
- $this->definitionVariables[$inlineDef] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable($name);
+ $this->definitionVariables[$inlineDef] = new Variable($name);
$code .= '' !== $code ? "\n" : '';
if ('instance' === $name) {
$code .= $this->addServiceInstance($id, $definition, $isSimpleInstance);
} else {
$code .= $this->addNewInstance($inlineDef, '$' . $name, ' = ', $id);
}
- if ('' !== ($inline = $this->addInlineVariables($id, $definition, $arguments, \false))) {
+ if ('' !== ($inline = $this->addInlineVariables($id, $definition, $arguments, false))) {
$code .= "\n" . $inline . "\n";
} elseif ($arguments && 'instance' === $name) {
$code .= "\n";
@@ -711,7 +769,7 @@ private function addServices()
{
$publicServices = $privateServices = '';
$definitions = $this->container->getDefinitions();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $id => $definition) {
if ($definition->isSynthetic() || $this->asFiles && $definition->isShared() && !$this->isHotPath($definition)) {
continue;
@@ -727,7 +785,7 @@ private function addServices()
private function generateServiceFiles()
{
$definitions = $this->container->getDefinitions();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $id => $definition) {
if (!$definition->isSynthetic() && $definition->isShared() && !$this->isHotPath($definition)) {
$code = $this->addService($id, $definition, $file);
@@ -735,7 +793,7 @@ private function generateServiceFiles()
}
}
}
- private function addNewInstance(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $return, $instantiation, $id)
+ private function addNewInstance(Definition $definition, $return, $instantiation, $id)
{
$class = $this->dumpValue($definition->getClass());
$return = ' ' . $return . $instantiation;
@@ -745,32 +803,32 @@ private function addNewInstance(\_PhpScoper5ea00cc67502b\Symfony\Component\Depen
}
if (null !== $definition->getFactory()) {
$callable = $definition->getFactory();
- if (\is_array($callable)) {
- if (!\preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $callable[1])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Cannot dump definition because of invalid factory method (%s).', $callable[1] ?: 'n/a'));
+ if (is_array($callable)) {
+ if (!preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $callable[1])) {
+ throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s).', $callable[1] ?: 'n/a'));
}
- if ($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference || $callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition && $this->definitionVariables->contains($callable[0])) {
- return $return . \sprintf("%s->%s(%s);\n", $this->dumpValue($callable[0]), $callable[1], $arguments ? \implode(', ', $arguments) : '');
+ if ($callable[0] instanceof Reference || $callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0])) {
+ return $return . sprintf("%s->%s(%s);\n", $this->dumpValue($callable[0]), $callable[1], $arguments ? implode(', ', $arguments) : '');
}
$class = $this->dumpValue($callable[0]);
// If the class is a string we can optimize call_user_func away
- if (0 === \strpos($class, "'") && \false === \strpos($class, '$')) {
+ if (0 === strpos($class, "'") && false === strpos($class, '$')) {
if ("''" === $class) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Cannot dump definition: The "%s" service is defined to be created by a factory but is missing the service reference, did you forget to define the factory service id or class?', $id));
+ throw new RuntimeException(sprintf('Cannot dump definition: The "%s" service is defined to be created by a factory but is missing the service reference, did you forget to define the factory service id or class?', $id));
}
- return $return . \sprintf("%s::%s(%s);\n", $this->dumpLiteralClass($class), $callable[1], $arguments ? \implode(', ', $arguments) : '');
+ return $return . sprintf("%s::%s(%s);\n", $this->dumpLiteralClass($class), $callable[1], $arguments ? implode(', ', $arguments) : '');
}
- if (0 === \strpos($class, 'new ')) {
- return $return . \sprintf("(%s)->%s(%s);\n", $class, $callable[1], $arguments ? \implode(', ', $arguments) : '');
+ if (0 === strpos($class, 'new ')) {
+ return $return . sprintf("(%s)->%s(%s);\n", $class, $callable[1], $arguments ? implode(', ', $arguments) : '');
}
- return $return . \sprintf("\\call_user_func([%s, '%s']%s);\n", $class, $callable[1], $arguments ? ', ' . \implode(', ', $arguments) : '');
+ return $return . sprintf("\\call_user_func([%s, '%s']%s);\n", $class, $callable[1], $arguments ? ', ' . implode(', ', $arguments) : '');
}
- return $return . \sprintf("%s(%s);\n", $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? \implode(', ', $arguments) : '');
+ return $return . sprintf("%s(%s);\n", $this->dumpLiteralClass($this->dumpValue($callable)), $arguments ? implode(', ', $arguments) : '');
}
- if (\false !== \strpos($class, '$')) {
- return \sprintf(" \$class = %s;\n\n%snew \$class(%s);\n", $class, $return, \implode(', ', $arguments));
+ if (false !== strpos($class, '$')) {
+ return sprintf(" \$class = %s;\n\n%snew \$class(%s);\n", $class, $return, implode(', ', $arguments));
}
- return $return . \sprintf("new %s(%s);\n", $this->dumpLiteralClass($class), \implode(', ', $arguments));
+ return $return . sprintf("new %s(%s);\n", $this->dumpLiteralClass($class), implode(', ', $arguments));
}
/**
* Adds the class headers.
@@ -822,15 +880,15 @@ public function __construct()
EOF;
}
if ($this->asFiles) {
- $code = \str_replace('$parameters', "\$buildParameters;\n private \$containerDir;\n private \$parameters", $code);
- $code = \str_replace('__construct()', '__construct(array $buildParameters = [], $containerDir = __DIR__)', $code);
+ $code = str_replace('$parameters', "\$buildParameters;\n private \$containerDir;\n private \$parameters", $code);
+ $code = str_replace('__construct()', '__construct(array $buildParameters = [], $containerDir = __DIR__)', $code);
$code .= " \$this->buildParameters = \$buildParameters;\n";
$code .= " \$this->containerDir = \$containerDir;\n";
}
if ($this->container->isCompiled()) {
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::class !== $baseClassWithNamespace) {
- $r = $this->container->getReflectionClass($baseClassWithNamespace, \false);
- if (null !== $r && null !== ($constructor = $r->getConstructor()) && 0 === $constructor->getNumberOfRequiredParameters() && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::class !== $constructor->getDeclaringClass()->name) {
+ if (Container::class !== $baseClassWithNamespace) {
+ $r = $this->container->getReflectionClass($baseClassWithNamespace, false);
+ if (null !== $r && null !== ($constructor = $r->getConstructor()) && 0 === $constructor->getNumberOfRequiredParameters() && Container::class !== $constructor->getDeclaringClass()->name) {
$code .= " parent::__construct();\n";
$code .= " \$this->parameterBag = null;\n\n";
}
@@ -923,7 +981,7 @@ private function addNormalizedIds()
{
$code = '';
$normalizedIds = $this->container->getNormalizedIds();
- \ksort($normalizedIds);
+ ksort($normalizedIds);
foreach ($normalizedIds as $id => $normalizedId) {
if ($this->container->has($normalizedId)) {
$code .= ' ' . $this->doExport($id) . ' => ' . $this->doExport($normalizedId) . ",\n";
@@ -940,7 +998,7 @@ private function addSyntheticIds()
{
$code = '';
$definitions = $this->container->getDefinitions();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $id => $definition) {
if ($definition->isSynthetic() && 'service_container' !== $id) {
$code .= ' ' . $this->doExport($id) . " => true,\n";
@@ -962,10 +1020,10 @@ private function addRemovedIds()
$code = "require \$this->containerDir.\\DIRECTORY_SEPARATOR.'removed-ids.php'";
} else {
$code = '';
- $ids = \array_keys($ids);
- \sort($ids);
+ $ids = array_keys($ids);
+ sort($ids);
foreach ($ids as $id) {
- if (\preg_match('/^\\d+_[^~]++~[._a-zA-Z\\d]{7}$/', $id)) {
+ if (preg_match('/^\\d+_[^~]++~[._a-zA-Z\\d]{7}$/', $id)) {
continue;
}
$code .= ' ' . $this->doExport($id) . " => true,\n";
@@ -990,7 +1048,7 @@ private function addMethodMap()
{
$code = '';
$definitions = $this->container->getDefinitions();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $id => $definition) {
if (!$definition->isSynthetic() && (!$this->asFiles || !$definition->isShared() || $this->isHotPath($definition))) {
$code .= ' ' . $this->doExport($id) . ' => ' . $this->doExport($this->generateMethodName($id)) . ",\n";
@@ -1007,10 +1065,10 @@ private function addFileMap()
{
$code = '';
$definitions = $this->container->getDefinitions();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $id => $definition) {
if (!$definition->isSynthetic() && $definition->isShared() && !$this->isHotPath($definition)) {
- $code .= \sprintf(" %s => '%s.php',\n", $this->doExport($id), $this->generateMethodName($id));
+ $code .= sprintf(" %s => '%s.php',\n", $this->doExport($id), $this->generateMethodName($id));
}
}
return $code ? " \$this->fileMap = [\n{$code} ];\n" : '';
@@ -1024,14 +1082,14 @@ private function addPrivateServices()
{
$code = '';
$aliases = $this->container->getAliases();
- \ksort($aliases);
+ ksort($aliases);
foreach ($aliases as $id => $alias) {
if ($alias->isPrivate()) {
$code .= ' ' . $this->doExport($id) . " => true,\n";
}
}
$definitions = $this->container->getDefinitions();
- \ksort($definitions);
+ ksort($definitions);
foreach ($definitions as $id => $definition) {
if (!$definition->isPublic()) {
$code .= ' ' . $this->doExport($id) . " => true,\n";
@@ -1056,7 +1114,7 @@ private function addAliases()
return $this->container->isCompiled() ? "\n \$this->aliases = [];\n" : '';
}
$code = " \$this->aliases = [\n";
- \ksort($aliases);
+ ksort($aliases);
foreach ($aliases as $alias => $id) {
$id = $this->container->normalizeId($id);
while (isset($aliases[$id])) {
@@ -1076,7 +1134,7 @@ private function addInlineRequires()
$definition = $this->container->getDefinition($id);
$inlinedDefinitions = $this->getDefinitionsFromArguments([$definition]);
foreach ($inlinedDefinitions as $def) {
- if (\is_string($class = \is_array($factory = $def->getFactory()) && \is_string($factory[0]) ? $factory[0] : $def->getClass())) {
+ if (is_string($class = is_array($factory = $def->getFactory()) && is_string($factory[0]) ? $factory[0] : $def->getClass())) {
$this->collectLineage($class, $lineage);
}
}
@@ -1084,11 +1142,11 @@ private function addInlineRequires()
$code = '';
foreach ($lineage as $file) {
if (!isset($this->inlinedRequires[$file])) {
- $this->inlinedRequires[$file] = \true;
- $code .= \sprintf("\n include_once %s;", $file);
+ $this->inlinedRequires[$file] = true;
+ $code .= sprintf("\n include_once %s;", $file);
}
}
- return $code ? \sprintf("\n \$this->privates['service_container'] = function () {%s\n };\n", $code) : '';
+ return $code ? sprintf("\n \$this->privates['service_container'] = function () {%s\n };\n", $code) : '';
}
/**
* Adds default parameters method.
@@ -1105,20 +1163,20 @@ private function addDefaultParametersMethod()
$normalizedParams = [];
foreach ($this->container->getParameterBag()->all() as $key => $value) {
if ($key !== ($resolvedKey = $this->container->resolveEnvPlaceholders($key))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter name cannot use env parameters: "%s".', $resolvedKey));
+ throw new InvalidArgumentException(sprintf('Parameter name cannot use env parameters: "%s".', $resolvedKey));
}
- if ($key !== ($lcKey = \strtolower($key))) {
- $normalizedParams[] = \sprintf(' %s => %s,', $this->export($lcKey), $this->export($key));
+ if ($key !== ($lcKey = strtolower($key))) {
+ $normalizedParams[] = sprintf(' %s => %s,', $this->export($lcKey), $this->export($key));
}
$export = $this->exportParameters([$value]);
- $export = \explode('0 => ', \substr(\rtrim($export, " ]\n"), 2, -1), 2);
- if (\preg_match("/\\\$this->(?:getEnv\\('(?:\\w++:)*+\\w++'\\)|targetDirs\\[\\d++\\])/", $export[1])) {
- $dynamicPhp[$key] = \sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]);
+ $export = explode('0 => ', substr(rtrim($export, " ]\n"), 2, -1), 2);
+ if (preg_match("/\\\$this->(?:getEnv\\('(?:\\w++:)*+\\w++'\\)|targetDirs\\[\\d++\\])/", $export[1])) {
+ $dynamicPhp[$key] = sprintf('%scase %s: $value = %s; break;', $export[0], $this->export($key), $export[1]);
} else {
- $php[] = \sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]);
+ $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]);
}
}
- $parameters = \sprintf("[\n%s\n%s]", \implode("\n", $php), \str_repeat(' ', 8));
+ $parameters = sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', 8));
$code = '';
if ($this->container->isCompiled()) {
$code .= <<<'EOF'
@@ -1177,10 +1235,10 @@ public function getParameterBag()
EOF;
if (!$this->asFiles) {
- $code = \preg_replace('/^.*buildParameters.*\\n.*\\n.*\\n/m', '', $code);
+ $code = preg_replace('/^.*buildParameters.*\\n.*\\n.*\\n/m', '', $code);
}
if ($dynamicPhp) {
- $loadedDynamicParameters = $this->exportParameters(\array_combine(\array_keys($dynamicPhp), \array_fill(0, \count($dynamicPhp), \false)), '', 8);
+ $loadedDynamicParameters = $this->exportParameters(array_combine(array_keys($dynamicPhp), array_fill(0, count($dynamicPhp), false)), '', 8);
$getDynamicParameter = <<<'EOF'
switch ($name) {
%s
@@ -1190,10 +1248,10 @@ public function getParameterBag()
return $this->dynamicParameters[$name] = $value;
EOF;
- $getDynamicParameter = \sprintf($getDynamicParameter, \implode("\n", $dynamicPhp));
+ $getDynamicParameter = sprintf($getDynamicParameter, implode("\n", $dynamicPhp));
} else {
$loadedDynamicParameters = '[]';
- $getDynamicParameter = \str_repeat(' ', 8) . 'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));';
+ $getDynamicParameter = str_repeat(' ', 8) . 'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));';
}
$code .= << $value) {
- if (\is_array($value)) {
+ if (is_array($value)) {
$value = $this->exportParameters($value, $path . '/' . $key, $indent + 4);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain special arguments. "%s" found in "%s".', \get_class($value), $path . '/' . $key));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain variable references. Variable "%s" found in "%s".', $value, $path . '/' . $key));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found in "%s".', $value->getClass(), $path . '/' . $key));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain references to other services (reference to service "%s" found in "%s").', $value, $path . '/' . $key));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path . '/' . $key));
+ } elseif ($value instanceof ArgumentInterface) {
+ throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain special arguments. "%s" found in "%s".', get_class($value), $path . '/' . $key));
+ } elseif ($value instanceof Variable) {
+ throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain variable references. Variable "%s" found in "%s".', $value, $path . '/' . $key));
+ } elseif ($value instanceof Definition) {
+ throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain service definitions. Definition for "%s" found in "%s".', $value->getClass(), $path . '/' . $key));
+ } elseif ($value instanceof Reference) {
+ throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain references to other services (reference to service "%s" found in "%s").', $value, $path . '/' . $key));
+ } elseif ($value instanceof Expression) {
+ throw new InvalidArgumentException(sprintf('You cannot dump a container with parameters that contain expressions. Expression "%s" found in "%s".', $value, $path . '/' . $key));
} else {
$value = $this->export($value);
}
- $php[] = \sprintf('%s%s => %s,', \str_repeat(' ', $indent), $this->export($key), $value);
+ $php[] = sprintf('%s%s => %s,', str_repeat(' ', $indent), $this->export($key), $value);
}
- return \sprintf("[\n%s\n%s]", \implode("\n", $php), \str_repeat(' ', $indent - 4));
+ return sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', $indent - 4));
}
/**
* Ends the class definition.
@@ -1311,10 +1369,10 @@ private function wrapServiceConditionals($value, $code)
return $code;
}
// re-indent the wrapped code
- $code = \implode("\n", \array_map(function ($line) {
+ $code = implode("\n", array_map(function ($line) {
return $line ? ' ' . $line : $line;
- }, \explode("\n", $code)));
- return \sprintf(" if (%s) {\n%s }\n", $condition, $code);
+ }, explode("\n", $code)));
+ return sprintf(" if (%s) {\n%s }\n", $condition, $code);
}
/**
* Get the conditions to execute for conditional services.
@@ -1326,32 +1384,32 @@ private function wrapServiceConditionals($value, $code)
private function getServiceConditionals($value)
{
$conditions = [];
- foreach (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::getInitializedConditionals($value) as $service) {
+ foreach (ContainerBuilder::getInitializedConditionals($value) as $service) {
if (!$this->container->hasDefinition($service)) {
return 'false';
}
- $conditions[] = \sprintf('isset($this->services[%s])', $this->doExport($service));
+ $conditions[] = sprintf('isset($this->services[%s])', $this->doExport($service));
}
- foreach (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::getServiceConditionals($value) as $service) {
+ foreach (ContainerBuilder::getServiceConditionals($value) as $service) {
if ($this->container->hasDefinition($service) && !$this->container->getDefinition($service)->isPublic()) {
continue;
}
- $conditions[] = \sprintf('$this->has(%s)', $this->doExport($service));
+ $conditions[] = sprintf('$this->has(%s)', $this->doExport($service));
}
if (!$conditions) {
return '';
}
- return \implode(' && ', $conditions);
+ return implode(' && ', $conditions);
}
- private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage $definitions = null, array &$calls = [], $byConstructor = null)
+ private function getDefinitionsFromArguments(array $arguments, SplObjectStorage $definitions = null, array &$calls = [], $byConstructor = null)
{
if (null === $definitions) {
- $definitions = new \SplObjectStorage();
+ $definitions = new SplObjectStorage();
}
foreach ($arguments as $argument) {
- if (\is_array($argument)) {
+ if (is_array($argument)) {
$this->getDefinitionsFromArguments($argument, $definitions, $calls, $byConstructor);
- } elseif ($argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($argument instanceof Reference) {
$id = $this->container->normalizeId($argument);
while ($this->container->hasAlias($id)) {
$id = (string) $this->container->getAlias($id);
@@ -1359,10 +1417,10 @@ private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage
if (!isset($calls[$id])) {
$calls[$id] = [0, $argument->getInvalidBehavior(), $byConstructor];
} else {
- $calls[$id][1] = \min($calls[$id][1], $argument->getInvalidBehavior());
+ $calls[$id][1] = min($calls[$id][1], $argument->getInvalidBehavior());
}
++$calls[$id][0];
- } elseif (!$argument instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif (!$argument instanceof Definition) {
// no-op
} elseif (isset($definitions[$argument])) {
$definitions[$argument] = 1 + $definitions[$argument];
@@ -1386,32 +1444,32 @@ private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage
*
* @throws RuntimeException
*/
- private function dumpValue($value, $interpolate = \true)
+ private function dumpValue($value, $interpolate = true)
{
- if (\is_array($value)) {
- if ($value && $interpolate && \false !== ($param = \array_search($value, $this->container->getParameterBag()->all(), \true))) {
+ if (is_array($value)) {
+ if ($value && $interpolate && false !== ($param = array_search($value, $this->container->getParameterBag()->all(), true))) {
return $this->dumpValue("%{$param}%");
}
$code = [];
foreach ($value as $k => $v) {
- $code[] = \sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate));
+ $code[] = sprintf('%s => %s', $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate));
}
- return \sprintf('[%s]', \implode(', ', $code));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
+ return sprintf('[%s]', implode(', ', $code));
+ } elseif ($value instanceof ArgumentInterface) {
$scope = [$this->definitionVariables, $this->referenceVariables];
$this->definitionVariables = $this->referenceVariables = null;
try {
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument) {
+ if ($value instanceof ServiceClosureArgument) {
$value = $value->getValues()[0];
$code = $this->dumpValue($value, $interpolate);
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference) {
- $code = \sprintf('$f = function (\\%s $v%s) { return $v; }; return $f(%s);', $value->getType(), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $value->getInvalidBehavior() ? ' = null' : '', $code);
+ if ($value instanceof TypedReference) {
+ $code = sprintf('$f = function (\\%s $v%s) { return $v; }; return $f(%s);', $value->getType(), ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $value->getInvalidBehavior() ? ' = null' : '', $code);
} else {
- $code = \sprintf('return %s;', $code);
+ $code = sprintf('return %s;', $code);
}
- return \sprintf("function () {\n %s\n }", $code);
+ return sprintf("function () {\n %s\n }", $code);
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument) {
+ if ($value instanceof IteratorArgument) {
$operands = [0];
$code = [];
$code[] = 'new RewindableGenerator(function () {';
@@ -1422,34 +1480,34 @@ private function dumpValue($value, $interpolate = \true)
$countCode[] = 'function () {';
foreach ($values as $k => $v) {
($c = $this->getServiceConditionals($v)) ? $operands[] = "(int) ({$c})" : ++$operands[0];
- $v = $this->wrapServiceConditionals($v, \sprintf(" yield %s => %s;\n", $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)));
- foreach (\explode("\n", $v) as $v) {
+ $v = $this->wrapServiceConditionals($v, sprintf(" yield %s => %s;\n", $this->dumpValue($k, $interpolate), $this->dumpValue($v, $interpolate)));
+ foreach (explode("\n", $v) as $v) {
if ($v) {
$code[] = ' ' . $v;
}
}
}
- $countCode[] = \sprintf(' return %s;', \implode(' + ', $operands));
+ $countCode[] = sprintf(' return %s;', implode(' + ', $operands));
$countCode[] = ' }';
}
- $code[] = \sprintf(' }, %s)', \count($operands) > 1 ? \implode("\n", $countCode) : $operands[0]);
- return \implode("\n", $code);
+ $code[] = sprintf(' }, %s)', count($operands) > 1 ? implode("\n", $countCode) : $operands[0]);
+ return implode("\n", $code);
}
} finally {
- list($this->definitionVariables, $this->referenceVariables) = $scope;
+ [$this->definitionVariables, $this->referenceVariables] = $scope;
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($value instanceof Definition) {
if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) {
return $this->dumpValue($this->definitionVariables[$value], $interpolate);
}
if ($value->getMethodCalls()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Cannot dump definitions which have method calls.');
+ throw new RuntimeException('Cannot dump definitions which have method calls.');
}
if ($value->getProperties()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Cannot dump definitions which have properties.');
+ throw new RuntimeException('Cannot dump definitions which have properties.');
}
if (null !== $value->getConfigurator()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Cannot dump definitions which have a configurator.');
+ throw new RuntimeException('Cannot dump definitions which have a configurator.');
}
$arguments = [];
foreach ($value->getArguments() as $argument) {
@@ -1457,37 +1515,37 @@ private function dumpValue($value, $interpolate = \true)
}
if (null !== $value->getFactory()) {
$factory = $value->getFactory();
- if (\is_string($factory)) {
- return \sprintf('%s(%s)', $this->dumpLiteralClass($this->dumpValue($factory)), \implode(', ', $arguments));
+ if (is_string($factory)) {
+ return sprintf('%s(%s)', $this->dumpLiteralClass($this->dumpValue($factory)), implode(', ', $arguments));
}
- if (\is_array($factory)) {
- if (!\preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $factory[1])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Cannot dump definition because of invalid factory method (%s).', $factory[1] ?: 'n/a'));
+ if (is_array($factory)) {
+ if (!preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*$/', $factory[1])) {
+ throw new RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s).', $factory[1] ?: 'n/a'));
}
$class = $this->dumpValue($factory[0]);
- if (\is_string($factory[0])) {
- return \sprintf('%s::%s(%s)', $this->dumpLiteralClass($class), $factory[1], \implode(', ', $arguments));
+ if (is_string($factory[0])) {
+ return sprintf('%s::%s(%s)', $this->dumpLiteralClass($class), $factory[1], implode(', ', $arguments));
}
- if ($factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
- if (0 === \strpos($class, 'new ')) {
- return \sprintf('(%s)->%s(%s)', $class, $factory[1], \implode(', ', $arguments));
+ if ($factory[0] instanceof Definition) {
+ if (0 === strpos($class, 'new ')) {
+ return sprintf('(%s)->%s(%s)', $class, $factory[1], implode(', ', $arguments));
}
- return \sprintf("\\call_user_func([%s, '%s']%s)", $class, $factory[1], \count($arguments) > 0 ? ', ' . \implode(', ', $arguments) : '');
+ return sprintf("\\call_user_func([%s, '%s']%s)", $class, $factory[1], count($arguments) > 0 ? ', ' . implode(', ', $arguments) : '');
}
- if ($factory[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- return \sprintf('%s->%s(%s)', $class, $factory[1], \implode(', ', $arguments));
+ if ($factory[0] instanceof Reference) {
+ return sprintf('%s->%s(%s)', $class, $factory[1], implode(', ', $arguments));
}
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Cannot dump definition because of invalid factory.');
+ throw new RuntimeException('Cannot dump definition because of invalid factory.');
}
$class = $value->getClass();
if (null === $class) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Cannot dump definitions which have no class nor factory.');
+ throw new RuntimeException('Cannot dump definitions which have no class nor factory.');
}
- return \sprintf('new %s(%s)', $this->dumpLiteralClass($this->dumpValue($class)), \implode(', ', $arguments));
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable) {
+ return sprintf('new %s(%s)', $this->dumpLiteralClass($this->dumpValue($class)), implode(', ', $arguments));
+ } elseif ($value instanceof Variable) {
return '$' . $value;
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($value instanceof Reference) {
$id = $this->container->normalizeId($value);
while ($this->container->hasAlias($id)) {
$id = (string) $this->container->getAlias($id);
@@ -1496,12 +1554,12 @@ private function dumpValue($value, $interpolate = \true)
return $this->dumpValue($this->referenceVariables[$id], $interpolate);
}
return $this->getServiceCall($id, $value);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression) {
+ } elseif ($value instanceof Expression) {
return $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter) {
+ } elseif ($value instanceof Parameter) {
return $this->dumpParameter($value);
- } elseif (\true === $interpolate && \is_string($value)) {
- if (\preg_match('/^%([^%]+)%$/', $value, $match)) {
+ } elseif (true === $interpolate && is_string($value)) {
+ if (preg_match('/^%([^%]+)%$/', $value, $match)) {
// we do this to deal with non string values (Boolean, integer, ...)
// the preg_replace_callback converts them to strings
return $this->dumpParameter($match[1]);
@@ -1509,11 +1567,11 @@ private function dumpValue($value, $interpolate = \true)
$replaceParameters = function ($match) {
return "'." . $this->dumpParameter($match[2]) . ".'";
};
- $code = \str_replace('%%', '%', \preg_replace_callback('/(?export($value)));
+ $code = str_replace('%%', '%', preg_replace_callback('/(?export($value)));
return $code;
}
- } elseif (\is_object($value) || \is_resource($value)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
+ } elseif (is_object($value) || is_resource($value)) {
+ throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
}
return $this->export($value);
}
@@ -1528,14 +1586,14 @@ private function dumpValue($value, $interpolate = \true)
*/
private function dumpLiteralClass($class)
{
- if (\false !== \strpos($class, '$')) {
- return \sprintf('${($_ = %s) && false ?: "_"}', $class);
+ if (false !== strpos($class, '$')) {
+ return sprintf('${($_ = %s) && false ?: "_"}', $class);
}
- if (0 !== \strpos($class, "'") || !\preg_match('/^\'(?:\\\\{2})?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*(?:\\\\{2}[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)*\'$/', $class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Cannot dump definition because of invalid class name (%s).', $class ?: 'n/a'));
+ if (0 !== strpos($class, "'") || !preg_match('/^\'(?:\\\\{2})?[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*(?:\\\\{2}[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*)*\'$/', $class)) {
+ throw new RuntimeException(sprintf('Cannot dump definition because of invalid class name (%s).', $class ?: 'n/a'));
}
- $class = \substr(\str_replace('\\\\', '\\', $class), 1, -1);
- return 0 === \strpos($class, '\\') ? $class : '\\' . $class;
+ $class = substr(str_replace('\\\\', '\\', $class), 1, -1);
+ return 0 === strpos($class, '\\') ? $class : '\\' . $class;
}
/**
* Dumps a parameter.
@@ -1549,15 +1607,15 @@ private function dumpParameter($name)
$name = (string) $name;
if ($this->container->isCompiled() && $this->container->hasParameter($name)) {
$value = $this->container->getParameter($name);
- $dumpedValue = $this->dumpValue($value, \false);
- if (!$value || !\is_array($value)) {
+ $dumpedValue = $this->dumpValue($value, false);
+ if (!$value || !is_array($value)) {
return $dumpedValue;
}
- if (!\preg_match("/\\\$this->(?:getEnv\\('(?:\\w++:)*+\\w++'\\)|targetDirs\\[\\d++\\])/", $dumpedValue)) {
- return \sprintf('$this->parameters[%s]', $this->doExport($name));
+ if (!preg_match("/\\\$this->(?:getEnv\\('(?:\\w++:)*+\\w++'\\)|targetDirs\\[\\d++\\])/", $dumpedValue)) {
+ return sprintf('$this->parameters[%s]', $this->doExport($name));
}
}
- return \sprintf('$this->getParameter(%s)', $this->doExport($name));
+ return sprintf('$this->getParameter(%s)', $this->doExport($name));
}
/**
* Gets a service call.
@@ -1567,7 +1625,7 @@ private function dumpParameter($name)
*
* @return string
*/
- private function getServiceCall($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference $reference = null)
+ private function getServiceCall($id, Reference $reference = null)
{
while ($this->container->hasAlias($id)) {
$id = (string) $this->container->getAlias($id);
@@ -1578,32 +1636,32 @@ private function getServiceCall($id, \_PhpScoper5ea00cc67502b\Symfony\Component\
}
if ($this->container->hasDefinition($id) && ($definition = $this->container->getDefinition($id))) {
if ($definition->isSynthetic()) {
- $code = \sprintf('$this->get(%s%s)', $this->doExport($id), null !== $reference ? ', ' . $reference->getInvalidBehavior() : '');
- } elseif (null !== $reference && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
+ $code = sprintf('$this->get(%s%s)', $this->doExport($id), null !== $reference ? ', ' . $reference->getInvalidBehavior() : '');
+ } elseif (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
$code = 'null';
if (!$definition->isShared()) {
return $code;
}
} elseif ($this->isTrivialInstance($definition)) {
- $code = \substr($this->addNewInstance($definition, '', '', $id), 8, -2);
+ $code = substr($this->addNewInstance($definition, '', '', $id), 8, -2);
if ($definition->isShared()) {
- $code = \sprintf('$this->services[%s] = %s', $this->doExport($id), $code);
+ $code = sprintf('$this->services[%s] = %s', $this->doExport($id), $code);
}
$code = "({$code})";
} elseif ($this->asFiles && $definition->isShared() && !$this->isHotPath($definition)) {
- $code = \sprintf("\$this->load('%s.php')", $this->generateMethodName($id));
+ $code = sprintf("\$this->load('%s.php')", $this->generateMethodName($id));
} else {
- $code = \sprintf('$this->%s()', $this->generateMethodName($id));
+ $code = sprintf('$this->%s()', $this->generateMethodName($id));
}
- } elseif (null !== $reference && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
+ } elseif (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
return 'null';
- } elseif (null !== $reference && \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) {
- $code = \sprintf('$this->get(%s, /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ %d)', $this->doExport($id), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE);
+ } elseif (null !== $reference && ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $reference->getInvalidBehavior()) {
+ $code = sprintf('$this->get(%s, /* ContainerInterface::NULL_ON_INVALID_REFERENCE */ %d)', $this->doExport($id), ContainerInterface::NULL_ON_INVALID_REFERENCE);
} else {
- $code = \sprintf('$this->get(%s)', $this->doExport($id));
+ $code = sprintf('$this->get(%s)', $this->doExport($id));
}
// The following is PHP 5.5 syntax for what could be written as "(\$this->services['$id'] ?? $code)" on PHP>=7.0
- return \sprintf("\${(\$_ = isset(\$this->services[%s]) ? \$this->services[%1\$s] : %s) && false ?: '_'}", $this->doExport($id), $code);
+ return sprintf("\${(\$_ = isset(\$this->services[%s]) ? \$this->services[%1\$s] : %s) && false ?: '_'}", $this->doExport($id), $code);
}
/**
* Initializes the method names map to avoid conflicts with the Container methods.
@@ -1616,7 +1674,7 @@ private function initializeMethodNamesMap($class)
$this->usedMethodNames = [];
if ($reflectionClass = $this->container->getReflectionClass($class)) {
foreach ($reflectionClass->getMethods() as $method) {
- $this->usedMethodNames[\strtolower($method->getName())] = \true;
+ $this->usedMethodNames[strtolower($method->getName())] = true;
}
}
}
@@ -1634,17 +1692,17 @@ private function generateMethodName($id)
if (isset($this->serviceIdToMethodNameMap[$id])) {
return $this->serviceIdToMethodNameMap[$id];
}
- $i = \strrpos($id, '\\');
- $name = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::camelize(\false !== $i && isset($id[1 + $i]) ? \substr($id, 1 + $i) : $id);
- $name = \preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]/', '', $name);
+ $i = strrpos($id, '\\');
+ $name = Container::camelize(false !== $i && isset($id[1 + $i]) ? substr($id, 1 + $i) : $id);
+ $name = preg_replace('/[^a-zA-Z0-9_\\x7f-\\xff]/', '', $name);
$methodName = 'get' . $name . 'Service';
$suffix = 1;
- while (isset($this->usedMethodNames[\strtolower($methodName)])) {
+ while (isset($this->usedMethodNames[strtolower($methodName)])) {
++$suffix;
$methodName = 'get' . $name . $suffix . 'Service';
}
$this->serviceIdToMethodNameMap[$id] = $methodName;
- $this->usedMethodNames[\strtolower($methodName)] = \true;
+ $this->usedMethodNames[strtolower($methodName)] = true;
return $methodName;
}
/**
@@ -1655,10 +1713,10 @@ private function generateMethodName($id)
private function getNextVariableName()
{
$firstChars = self::FIRST_CHARS;
- $firstCharsLength = \strlen($firstChars);
+ $firstCharsLength = strlen($firstChars);
$nonFirstChars = self::NON_FIRST_CHARS;
- $nonFirstCharsLength = \strlen($nonFirstChars);
- while (\true) {
+ $nonFirstCharsLength = strlen($nonFirstChars);
+ while (true) {
$name = '';
$i = $this->variableCount;
if ('' === $name) {
@@ -1672,7 +1730,7 @@ private function getNextVariableName()
}
++$this->variableCount;
// check that the name is not reserved
- if (\in_array($name, $this->reservedVariables, \true)) {
+ if (in_array($name, $this->reservedVariables, true)) {
continue;
}
return $name;
@@ -1681,16 +1739,16 @@ private function getNextVariableName()
private function getExpressionLanguage()
{
if (null === $this->expressionLanguage) {
- if (!\class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
+ if (!class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ExpressionLanguage')) {
+ throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
}
$providers = $this->container->getExpressionLanguageProviders();
- $this->expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ExpressionLanguage(null, $providers, function ($arg) {
- $id = '""' === \substr_replace($arg, '', 1, -1) ? \stripcslashes(\substr($arg, 1, -1)) : null;
+ $this->expressionLanguage = new ExpressionLanguage(null, $providers, function ($arg) {
+ $id = '""' === substr_replace($arg, '', 1, -1) ? stripcslashes(substr($arg, 1, -1)) : null;
if (null !== $id && ($this->container->hasAlias($id) || $this->container->hasDefinition($id))) {
return $this->getServiceCall($id);
}
- return \sprintf('$this->get(%s)', $arg);
+ return sprintf('$this->get(%s)', $arg);
});
if ($this->container->isTrackingResources()) {
foreach ($providers as $provider) {
@@ -1700,49 +1758,49 @@ private function getExpressionLanguage()
}
return $this->expressionLanguage;
}
- private function isHotPath(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ private function isHotPath(Definition $definition)
{
return $this->hotPathTag && $definition->hasTag($this->hotPathTag) && !$definition->isDeprecated();
}
private function export($value)
{
- if (null !== $this->targetDirRegex && \is_string($value) && \preg_match($this->targetDirRegex, $value, $matches, \PREG_OFFSET_CAPTURE)) {
- $prefix = $matches[0][1] ? $this->doExport(\substr($value, 0, $matches[0][1]), \true) . '.' : '';
- $suffix = $matches[0][1] + \strlen($matches[0][0]);
- $suffix = isset($value[$suffix]) ? '.' . $this->doExport(\substr($value, $suffix), \true) : '';
+ if (null !== $this->targetDirRegex && is_string($value) && preg_match($this->targetDirRegex, $value, $matches, PREG_OFFSET_CAPTURE)) {
+ $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true) . '.' : '';
+ $suffix = $matches[0][1] + strlen($matches[0][0]);
+ $suffix = isset($value[$suffix]) ? '.' . $this->doExport(substr($value, $suffix), true) : '';
$dirname = $this->asFiles ? '$this->containerDir' : '__DIR__';
- $offset = 1 + $this->targetDirMaxMatches - \count($matches);
+ $offset = 1 + $this->targetDirMaxMatches - count($matches);
if ($this->asFiles || 0 < $offset) {
- $dirname = \sprintf('$this->targetDirs[%d]', $offset);
+ $dirname = sprintf('$this->targetDirs[%d]', $offset);
}
if ($prefix || $suffix) {
- return \sprintf('(%s%s%s)', $prefix, $dirname, $suffix);
+ return sprintf('(%s%s%s)', $prefix, $dirname, $suffix);
}
return $dirname;
}
- return $this->doExport($value, \true);
+ return $this->doExport($value, true);
}
- private function doExport($value, $resolveEnv = \false)
+ private function doExport($value, $resolveEnv = false)
{
- if (\is_string($value) && \false !== \strpos($value, "\n")) {
- $cleanParts = \explode("\n", $value);
- $cleanParts = \array_map(function ($part) {
- return \var_export($part, \true);
+ if (is_string($value) && false !== strpos($value, "\n")) {
+ $cleanParts = explode("\n", $value);
+ $cleanParts = array_map(function ($part) {
+ return var_export($part, true);
}, $cleanParts);
- $export = \implode('."\\n".', $cleanParts);
+ $export = implode('."\\n".', $cleanParts);
} else {
- $export = \var_export($value, \true);
+ $export = var_export($value, true);
}
if ($resolveEnv && "'" === $export[0] && $export !== ($resolvedExport = $this->container->resolveEnvPlaceholders($export, "'.\$this->getEnv('string:%s').'"))) {
$export = $resolvedExport;
- if (".''" === \substr($export, -3)) {
- $export = \substr($export, 0, -3);
+ if (".''" === substr($export, -3)) {
+ $export = substr($export, 0, -3);
if ("'" === $export[1]) {
- $export = \substr_replace($export, '', 18, 7);
+ $export = substr_replace($export, '', 18, 7);
}
}
if ("'" === $export[1]) {
- $export = \substr($export, 3);
+ $export = substr($export, 3);
}
}
return $export;
diff --git a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php b/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
index f378d978e..35939679c 100644
--- a/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
+++ b/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
@@ -20,16 +20,31 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
+use DOMDocument;
+use DOMElement;
+use function array_keys;
+use function count;
+use function in_array;
+use function is_array;
+use function is_numeric;
+use function is_object;
+use function is_resource;
+use function is_string;
+use function preg_match;
+use function range;
+use function str_replace;
+use function substr;
+
/**
* XmlDumper dumps a service container as an XML string.
*
* @author Fabien Potencier
* @author Martin Hasoň
*/
-class XmlDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\Dumper
+class XmlDumper extends Dumper
{
/**
- * @var \DOMDocument
+ * @var DOMDocument
*/
private $document;
/**
@@ -39,8 +54,8 @@ class XmlDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInj
*/
public function dump(array $options = [])
{
- $this->document = new \DOMDocument('1.0', 'utf-8');
- $this->document->formatOutput = \true;
+ $this->document = new DOMDocument('1.0', 'utf-8');
+ $this->document->formatOutput = true;
$container = $this->document->createElementNS('http://symfony.com/schema/dic/services', 'container');
$container->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$container->setAttribute('xsi:schemaLocation', 'http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd');
@@ -51,7 +66,7 @@ public function dump(array $options = [])
$this->document = null;
return $this->container->resolveEnvPlaceholders($xml);
}
- private function addParameters(\DOMElement $parent)
+ private function addParameters(DOMElement $parent)
{
$data = $this->container->getParameterBag()->all();
if (!$data) {
@@ -64,12 +79,12 @@ private function addParameters(\DOMElement $parent)
$parent->appendChild($parameters);
$this->convertParameters($data, 'parameter', $parameters);
}
- private function addMethodCalls(array $methodcalls, \DOMElement $parent)
+ private function addMethodCalls(array $methodcalls, DOMElement $parent)
{
foreach ($methodcalls as $methodcall) {
$call = $this->document->createElement('call');
$call->setAttribute('method', $methodcall[0]);
- if (\count($methodcall[1])) {
+ if (count($methodcall[1])) {
$this->convertParameters($methodcall[1], 'argument', $call);
}
$parent->appendChild($call);
@@ -81,15 +96,15 @@ private function addMethodCalls(array $methodcalls, \DOMElement $parent)
* @param Definition $definition
* @param string $id
*/
- private function addService($definition, $id, \DOMElement $parent)
+ private function addService($definition, $id, DOMElement $parent)
{
$service = $this->document->createElement('service');
if (null !== $id) {
$service->setAttribute('id', $id);
}
if ($class = $definition->getClass()) {
- if ('\\' === \substr($class, 0, 1)) {
- $class = \substr($class, 1);
+ if ('\\' === substr($class, 0, 1)) {
+ $class = substr($class, 1);
}
$service->setAttribute('class', $class);
}
@@ -106,7 +121,7 @@ private function addService($definition, $id, \DOMElement $parent)
$service->setAttribute('lazy', 'true');
}
if (null !== ($decorated = $definition->getDecoratedService())) {
- list($decorated, $renamedId, $priority) = $decorated;
+ [$decorated, $renamedId, $priority] = $decorated;
$service->setAttribute('decorates', $decorated);
if (null !== $renamedId) {
$service->setAttribute('decoration-inner-name', $renamedId);
@@ -139,12 +154,12 @@ private function addService($definition, $id, \DOMElement $parent)
$this->addMethodCalls($definition->getMethodCalls(), $service);
if ($callable = $definition->getFactory()) {
$factory = $this->document->createElement('factory');
- if (\is_array($callable) && $callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (is_array($callable) && $callable[0] instanceof Definition) {
$this->addService($callable[0], null, $factory);
$factory->setAttribute('method', $callable[1]);
- } elseif (\is_array($callable)) {
+ } elseif (is_array($callable)) {
if (null !== $callable[0]) {
- $factory->setAttribute($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference ? 'service' : 'class', $callable[0]);
+ $factory->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]);
}
$factory->setAttribute('method', $callable[1]);
} else {
@@ -160,7 +175,7 @@ private function addService($definition, $id, \DOMElement $parent)
if ($definition->isAutowired()) {
$service->setAttribute('autowire', 'true');
}
- foreach ($definition->getAutowiringTypes(\false) as $autowiringTypeValue) {
+ foreach ($definition->getAutowiringTypes(false) as $autowiringTypeValue) {
$autowiringType = $this->document->createElement('autowiring-type');
$autowiringType->appendChild($this->document->createTextNode($autowiringTypeValue));
$service->appendChild($autowiringType);
@@ -173,11 +188,11 @@ private function addService($definition, $id, \DOMElement $parent)
}
if ($callable = $definition->getConfigurator()) {
$configurator = $this->document->createElement('configurator');
- if (\is_array($callable) && $callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ if (is_array($callable) && $callable[0] instanceof Definition) {
$this->addService($callable[0], null, $configurator);
$configurator->setAttribute('method', $callable[1]);
- } elseif (\is_array($callable)) {
- $configurator->setAttribute($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference ? 'service' : 'class', $callable[0]);
+ } elseif (is_array($callable)) {
+ $configurator->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]);
$configurator->setAttribute('method', $callable[1]);
} else {
$configurator->setAttribute('function', $callable);
@@ -191,7 +206,7 @@ private function addService($definition, $id, \DOMElement $parent)
*
* @param string $alias
*/
- private function addServiceAlias($alias, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias $id, \DOMElement $parent)
+ private function addServiceAlias($alias, Alias $id, DOMElement $parent)
{
$service = $this->document->createElement('service');
$service->setAttribute('id', $alias);
@@ -201,7 +216,7 @@ private function addServiceAlias($alias, \_PhpScoper5ea00cc67502b\Symfony\Compon
}
$parent->appendChild($service);
}
- private function addServices(\DOMElement $parent)
+ private function addServices(DOMElement $parent)
{
$definitions = $this->container->getDefinitions();
if (!$definitions) {
@@ -226,49 +241,49 @@ private function addServices(\DOMElement $parent)
* @param string $type
* @param string $keyAttribute
*/
- private function convertParameters(array $parameters, $type, \DOMElement $parent, $keyAttribute = 'key')
+ private function convertParameters(array $parameters, $type, DOMElement $parent, $keyAttribute = 'key')
{
- $withKeys = \array_keys($parameters) !== \range(0, \count($parameters) - 1);
+ $withKeys = array_keys($parameters) !== range(0, count($parameters) - 1);
foreach ($parameters as $key => $value) {
$element = $this->document->createElement($type);
if ($withKeys) {
$element->setAttribute($keyAttribute, $key);
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument) {
+ if ($value instanceof ServiceClosureArgument) {
$value = $value->getValues()[0];
}
- if (\is_array($value)) {
+ if (is_array($value)) {
$element->setAttribute('type', 'collection');
$this->convertParameters($value, $type, $element, 'key');
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument) {
+ } elseif ($value instanceof TaggedIteratorArgument) {
$element->setAttribute('type', 'tagged');
$element->setAttribute('tag', $value->getTag());
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument) {
+ } elseif ($value instanceof IteratorArgument) {
$element->setAttribute('type', 'iterator');
$this->convertParameters($value->getValues(), $type, $element, 'key');
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($value instanceof Reference) {
$element->setAttribute('type', 'service');
$element->setAttribute('id', (string) $value);
$behavior = $value->getInvalidBehavior();
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) {
+ if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) {
$element->setAttribute('on-invalid', 'null');
- } elseif (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) {
+ } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) {
$element->setAttribute('on-invalid', 'ignore');
- } elseif (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) {
+ } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) {
$element->setAttribute('on-invalid', 'ignore_uninitialized');
}
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
+ } elseif ($value instanceof Definition) {
$element->setAttribute('type', 'service');
$this->addService($value, null, $element);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression) {
+ } elseif ($value instanceof Expression) {
$element->setAttribute('type', 'expression');
$text = $this->document->createTextNode(self::phpToXml((string) $value));
$element->appendChild($text);
} else {
- if (\in_array($value, ['null', 'true', 'false'], \true)) {
+ if (in_array($value, ['null', 'true', 'false'], true)) {
$element->setAttribute('type', 'string');
}
- if (\is_string($value) && (\is_numeric($value) || \preg_match('/^0b[01]*$/', $value) || \preg_match('/^0x[0-9a-f]++$/i', $value))) {
+ if (is_string($value) && (is_numeric($value) || preg_match('/^0b[01]*$/', $value) || preg_match('/^0x[0-9a-f]++$/i', $value))) {
$element->setAttribute('type', 'string');
}
$text = $this->document->createTextNode(self::phpToXml($value));
@@ -286,10 +301,10 @@ private function escape(array $arguments)
{
$args = [];
foreach ($arguments as $k => $v) {
- if (\is_array($v)) {
+ if (is_array($v)) {
$args[$k] = $this->escape($v);
- } elseif (\is_string($v)) {
- $args[$k] = \str_replace('%', '%%', $v);
+ } elseif (is_string($v)) {
+ $args[$k] = str_replace('%', '%%', $v);
} else {
$args[$k] = $v;
}
@@ -307,17 +322,17 @@ private function escape(array $arguments)
*/
public static function phpToXml($value)
{
- switch (\true) {
+ switch (true) {
case null === $value:
return 'null';
- case \true === $value:
+ case true === $value:
return 'true';
- case \false === $value:
+ case false === $value:
return 'false';
- case $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter:
+ case $value instanceof Parameter:
return '%' . $value . '%';
- case \is_object($value) || \is_resource($value):
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
+ case is_object($value) || is_resource($value):
+ throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
default:
return (string) $value;
}
diff --git a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php b/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
index c3e5f9393..6540a7a08 100644
--- a/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
+++ b/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
@@ -25,12 +25,24 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Parser;
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Tag\TaggedValue;
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml;
+use function class_exists;
+use function get_class;
+use function implode;
+use function is_array;
+use function is_object;
+use function is_resource;
+use function is_string;
+use function sprintf;
+use function str_replace;
+use function strpos;
+use function substr;
+
/**
* YamlDumper dumps a service container as a YAML string.
*
* @author Fabien Potencier
*/
-class YamlDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\Dumper
+class YamlDumper extends Dumper
{
private $dumper;
/**
@@ -40,11 +52,11 @@ class YamlDumper extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyIn
*/
public function dump(array $options = [])
{
- if (!\class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Yaml\\Dumper')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to dump the container as the Symfony Yaml Component is not installed.');
+ if (!class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Yaml\\Dumper')) {
+ throw new RuntimeException('Unable to dump the container as the Symfony Yaml Component is not installed.');
}
if (null === $this->dumper) {
- $this->dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Dumper();
+ $this->dumper = new YmlDumper();
}
return $this->container->resolveEnvPlaceholders($this->addParameters() . "\n" . $this->addServices());
}
@@ -55,50 +67,50 @@ public function dump(array $options = [])
*
* @return string
*/
- private function addService($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ private function addService($id, Definition $definition)
{
$code = " {$id}:\n";
if ($class = $definition->getClass()) {
- if ('\\' === \substr($class, 0, 1)) {
- $class = \substr($class, 1);
+ if ('\\' === substr($class, 0, 1)) {
+ $class = substr($class, 1);
}
- $code .= \sprintf(" class: %s\n", $this->dumper->dump($class));
+ $code .= sprintf(" class: %s\n", $this->dumper->dump($class));
}
if (!$definition->isPrivate()) {
- $code .= \sprintf(" public: %s\n", $definition->isPublic() ? 'true' : 'false');
+ $code .= sprintf(" public: %s\n", $definition->isPublic() ? 'true' : 'false');
}
$tagsCode = '';
foreach ($definition->getTags() as $name => $tags) {
foreach ($tags as $attributes) {
$att = [];
foreach ($attributes as $key => $value) {
- $att[] = \sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value));
+ $att[] = sprintf('%s: %s', $this->dumper->dump($key), $this->dumper->dump($value));
}
- $att = $att ? ', ' . \implode(', ', $att) : '';
- $tagsCode .= \sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att);
+ $att = $att ? ', ' . implode(', ', $att) : '';
+ $tagsCode .= sprintf(" - { name: %s%s }\n", $this->dumper->dump($name), $att);
}
}
if ($tagsCode) {
$code .= " tags:\n" . $tagsCode;
}
if ($definition->getFile()) {
- $code .= \sprintf(" file: %s\n", $this->dumper->dump($definition->getFile()));
+ $code .= sprintf(" file: %s\n", $this->dumper->dump($definition->getFile()));
}
if ($definition->isSynthetic()) {
$code .= " synthetic: true\n";
}
if ($definition->isDeprecated()) {
- $code .= \sprintf(" deprecated: %s\n", $this->dumper->dump($definition->getDeprecationMessage('%service_id%')));
+ $code .= sprintf(" deprecated: %s\n", $this->dumper->dump($definition->getDeprecationMessage('%service_id%')));
}
if ($definition->isAutowired()) {
$code .= " autowire: true\n";
}
$autowiringTypesCode = '';
- foreach ($definition->getAutowiringTypes(\false) as $autowiringType) {
- $autowiringTypesCode .= \sprintf(" - %s\n", $this->dumper->dump($autowiringType));
+ foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
+ $autowiringTypesCode .= sprintf(" - %s\n", $this->dumper->dump($autowiringType));
}
if ($autowiringTypesCode) {
- $code .= \sprintf(" autowiring_types:\n%s", $autowiringTypesCode);
+ $code .= sprintf(" autowiring_types:\n%s", $autowiringTypesCode);
}
if ($definition->isAutoconfigured()) {
$code .= " autoconfigure: true\n";
@@ -110,32 +122,32 @@ private function addService($id, \_PhpScoper5ea00cc67502b\Symfony\Component\Depe
$code .= " lazy: true\n";
}
if ($definition->getArguments()) {
- $code .= \sprintf(" arguments: %s\n", $this->dumper->dump($this->dumpValue($definition->getArguments()), 0));
+ $code .= sprintf(" arguments: %s\n", $this->dumper->dump($this->dumpValue($definition->getArguments()), 0));
}
if ($definition->getProperties()) {
- $code .= \sprintf(" properties: %s\n", $this->dumper->dump($this->dumpValue($definition->getProperties()), 0));
+ $code .= sprintf(" properties: %s\n", $this->dumper->dump($this->dumpValue($definition->getProperties()), 0));
}
if ($definition->getMethodCalls()) {
- $code .= \sprintf(" calls:\n%s\n", $this->dumper->dump($this->dumpValue($definition->getMethodCalls()), 1, 12));
+ $code .= sprintf(" calls:\n%s\n", $this->dumper->dump($this->dumpValue($definition->getMethodCalls()), 1, 12));
}
if (!$definition->isShared()) {
$code .= " shared: false\n";
}
if (null !== ($decorated = $definition->getDecoratedService())) {
- list($decorated, $renamedId, $priority) = $decorated;
- $code .= \sprintf(" decorates: %s\n", $decorated);
+ [$decorated, $renamedId, $priority] = $decorated;
+ $code .= sprintf(" decorates: %s\n", $decorated);
if (null !== $renamedId) {
- $code .= \sprintf(" decoration_inner_name: %s\n", $renamedId);
+ $code .= sprintf(" decoration_inner_name: %s\n", $renamedId);
}
if (0 !== $priority) {
- $code .= \sprintf(" decoration_priority: %s\n", $priority);
+ $code .= sprintf(" decoration_priority: %s\n", $priority);
}
}
if ($callable = $definition->getFactory()) {
- $code .= \sprintf(" factory: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0));
+ $code .= sprintf(" factory: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0));
}
if ($callable = $definition->getConfigurator()) {
- $code .= \sprintf(" configurator: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0));
+ $code .= sprintf(" configurator: %s\n", $this->dumper->dump($this->dumpCallable($callable), 0));
}
return $code;
}
@@ -146,12 +158,12 @@ private function addService($id, \_PhpScoper5ea00cc67502b\Symfony\Component\Depe
*
* @return string
*/
- private function addServiceAlias($alias, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias $id)
+ private function addServiceAlias($alias, Alias $id)
{
if ($id->isPrivate()) {
- return \sprintf(" %s: '@%s'\n", $alias, $id);
+ return sprintf(" %s: '@%s'\n", $alias, $id);
}
- return \sprintf(" %s:\n alias: %s\n public: %s\n", $alias, $id, $id->isPublic() ? 'true' : 'false');
+ return sprintf(" %s:\n alias: %s\n public: %s\n", $alias, $id, $id->isPublic() ? 'true' : 'false');
}
/**
* Adds services.
@@ -196,8 +208,8 @@ private function addParameters()
*/
private function dumpCallable($callable)
{
- if (\is_array($callable)) {
- if ($callable[0] instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ if (is_array($callable)) {
+ if ($callable[0] instanceof Reference) {
$callable = [$this->getServiceCall((string) $callable[0], $callable[0]), $callable[1]];
} else {
$callable = [$callable[0], $callable[1]];
@@ -216,36 +228,36 @@ private function dumpCallable($callable)
*/
private function dumpValue($value)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument) {
+ if ($value instanceof ServiceClosureArgument) {
$value = $value->getValues()[0];
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface) {
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Tag\TaggedValue('tagged', $value->getTag());
+ if ($value instanceof ArgumentInterface) {
+ if ($value instanceof TaggedIteratorArgument) {
+ return new TaggedValue('tagged', $value->getTag());
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument) {
+ if ($value instanceof IteratorArgument) {
$tag = 'iterator';
} else {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Unspecified Yaml tag for type "%s".', \get_class($value)));
+ throw new RuntimeException(sprintf('Unspecified Yaml tag for type "%s".', get_class($value)));
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Tag\TaggedValue($tag, $this->dumpValue($value->getValues()));
+ return new TaggedValue($tag, $this->dumpValue($value->getValues()));
}
- if (\is_array($value)) {
+ if (is_array($value)) {
$code = [];
foreach ($value as $k => $v) {
$code[$k] = $this->dumpValue($v);
}
return $code;
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
+ } elseif ($value instanceof Reference) {
return $this->getServiceCall((string) $value, $value);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter) {
+ } elseif ($value instanceof Parameter) {
return $this->getParameterCall((string) $value);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression) {
+ } elseif ($value instanceof Expression) {
return $this->getExpressionCall((string) $value);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Tag\TaggedValue('service', (new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Parser())->parse("_:\n" . $this->addService('_', $value), \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml::PARSE_CUSTOM_TAGS)['_']['_']);
- } elseif (\is_object($value) || \is_resource($value)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
+ } elseif ($value instanceof Definition) {
+ return new TaggedValue('service', (new Parser())->parse("_:\n" . $this->addService('_', $value), Yaml::PARSE_CUSTOM_TAGS)['_']['_']);
+ } elseif (is_object($value) || is_resource($value)) {
+ throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
}
return $value;
}
@@ -257,19 +269,19 @@ private function dumpValue($value)
*
* @return string
*/
- private function getServiceCall($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference $reference = null)
+ private function getServiceCall($id, Reference $reference = null)
{
if (null !== $reference) {
switch ($reference->getInvalidBehavior()) {
- case \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE:
+ case ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE:
break;
- case \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE:
- return \sprintf('@!%s', $id);
+ case ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE:
+ return sprintf('@!%s', $id);
default:
- return \sprintf('@?%s', $id);
+ return sprintf('@?%s', $id);
}
}
- return \sprintf('@%s', $id);
+ return sprintf('@%s', $id);
}
/**
* Gets parameter call.
@@ -280,11 +292,11 @@ private function getServiceCall($id, \_PhpScoper5ea00cc67502b\Symfony\Component\
*/
private function getParameterCall($id)
{
- return \sprintf('%%%s%%', $id);
+ return sprintf('%%%s%%', $id);
}
private function getExpressionCall($expression)
{
- return \sprintf('@=%s', $expression);
+ return sprintf('@=%s', $expression);
}
/**
* Prepares parameters.
@@ -293,13 +305,13 @@ private function getExpressionCall($expression)
*
* @return array
*/
- private function prepareParameters(array $parameters, $escape = \true)
+ private function prepareParameters(array $parameters, $escape = true)
{
$filtered = [];
foreach ($parameters as $key => $value) {
- if (\is_array($value)) {
+ if (is_array($value)) {
$value = $this->prepareParameters($value, $escape);
- } elseif ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference || \is_string($value) && 0 === \strpos($value, '@')) {
+ } elseif ($value instanceof Reference || is_string($value) && 0 === strpos($value, '@')) {
$value = '@' . $value;
}
$filtered[$key] = $value;
@@ -315,10 +327,10 @@ private function escape(array $arguments)
{
$args = [];
foreach ($arguments as $k => $v) {
- if (\is_array($v)) {
+ if (is_array($v)) {
$args[$k] = $this->escape($v);
- } elseif (\is_string($v)) {
- $args[$k] = \str_replace('%', '%%', $v);
+ } elseif (is_string($v)) {
+ $args[$k] = str_replace('%', '%%', $v);
} else {
$args[$k] = $v;
}
diff --git a/vendor/symfony/dependency-injection/Dumper/index.php b/vendor/symfony/dependency-injection/Dumper/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Dumper/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/EnvVarProcessor.php b/vendor/symfony/dependency-injection/EnvVarProcessor.php
index d6ea2e186..79d27fbb2 100644
--- a/vendor/symfony/dependency-injection/EnvVarProcessor.php
+++ b/vendor/symfony/dependency-injection/EnvVarProcessor.php
@@ -13,13 +13,33 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Closure;
+use function base64_decode;
+use function class_exists;
+use function constant;
+use function defined;
+use function file_exists;
+use function file_get_contents;
+use function getenv;
+use function gettype;
+use function is_array;
+use function is_numeric;
+use function is_scalar;
+use function json_decode;
+use function json_last_error;
+use function json_last_error_msg;
+use function preg_replace_callback;
+use function sprintf;
+use function strpos;
+use const JSON_ERROR_NONE;
+
/**
* @author Nicolas Grekas
*/
-class EnvVarProcessor implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessorInterface
+class EnvVarProcessor implements EnvVarProcessorInterface
{
private $container;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface $container)
+ public function __construct(ContainerInterface $container)
{
$this->container = $container;
}
@@ -33,37 +53,37 @@ public static function getProvidedTypes()
/**
* {@inheritdoc}
*/
- public function getEnv($prefix, $name, \Closure $getEnv)
+ public function getEnv($prefix, $name, Closure $getEnv)
{
- $i = \strpos($name, ':');
+ $i = strpos($name, ':');
if ('file' === $prefix) {
- if (!\is_scalar($file = $getEnv($name))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid file name: env var "%s" is non-scalar.', $name));
+ if (!is_scalar($file = $getEnv($name))) {
+ throw new RuntimeException(sprintf('Invalid file name: env var "%s" is non-scalar.', $name));
}
- if (!\file_exists($file)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Env "file:%s" not found: "%s" does not exist.', $name, $file));
+ if (!file_exists($file)) {
+ throw new RuntimeException(sprintf('Env "file:%s" not found: "%s" does not exist.', $name, $file));
}
- return \file_get_contents($file);
+ return file_get_contents($file);
}
- if (\false !== $i || 'string' !== $prefix) {
+ if (false !== $i || 'string' !== $prefix) {
if (null === ($env = $getEnv($name))) {
return null;
}
} elseif (isset($_ENV[$name])) {
$env = $_ENV[$name];
- } elseif (isset($_SERVER[$name]) && 0 !== \strpos($name, 'HTTP_')) {
+ } elseif (isset($_SERVER[$name]) && 0 !== strpos($name, 'HTTP_')) {
$env = $_SERVER[$name];
- } elseif (\false === ($env = \getenv($name)) || null === $env) {
+ } elseif (false === ($env = getenv($name)) || null === $env) {
// null is a possible value because of thread safety issues
if (!$this->container->hasParameter("env({$name})")) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\EnvNotFoundException($name);
+ throw new EnvNotFoundException($name);
}
if (null === ($env = $this->container->getParameter("env({$name})"))) {
return null;
}
}
- if (!\is_scalar($env)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Non-scalar env var "%s" cannot be cast to "%s".', $name, $prefix));
+ if (!is_scalar($env)) {
+ throw new RuntimeException(sprintf('Non-scalar env var "%s" cannot be cast to "%s".', $name, $prefix));
}
if ('string' === $prefix) {
return (string) $env;
@@ -72,55 +92,55 @@ public function getEnv($prefix, $name, \Closure $getEnv)
return (bool) self::phpize($env);
}
if ('int' === $prefix) {
- if (!\is_numeric($env = self::phpize($env))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Non-numeric env var "%s" cannot be cast to int.', $name));
+ if (!is_numeric($env = self::phpize($env))) {
+ throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to int.', $name));
}
return (int) $env;
}
if ('float' === $prefix) {
- if (!\is_numeric($env = self::phpize($env))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Non-numeric env var "%s" cannot be cast to float.', $name));
+ if (!is_numeric($env = self::phpize($env))) {
+ throw new RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to float.', $name));
}
return (float) $env;
}
if ('const' === $prefix) {
- if (!\defined($env)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env));
+ if (!defined($env)) {
+ throw new RuntimeException(sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env));
}
- return \constant($env);
+ return constant($env);
}
if ('base64' === $prefix) {
- return \base64_decode($env);
+ return base64_decode($env);
}
if ('json' === $prefix) {
- $env = \json_decode($env, \true);
- if (\JSON_ERROR_NONE !== \json_last_error()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid JSON in env var "%s": ' . \json_last_error_msg(), $name));
+ $env = json_decode($env, true);
+ if (JSON_ERROR_NONE !== json_last_error()) {
+ throw new RuntimeException(sprintf('Invalid JSON in env var "%s": ' . json_last_error_msg(), $name));
}
- if (!\is_array($env)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Invalid JSON env var "%s": array expected, "%s" given.', $name, \gettype($env)));
+ if (!is_array($env)) {
+ throw new RuntimeException(sprintf('Invalid JSON env var "%s": array expected, "%s" given.', $name, gettype($env)));
}
return $env;
}
if ('resolve' === $prefix) {
- return \preg_replace_callback('/%%|%([^%\\s]+)%/', function ($match) use($name) {
+ return preg_replace_callback('/%%|%([^%\\s]+)%/', function ($match) use($name) {
if (!isset($match[1])) {
return '%';
}
$value = $this->container->getParameter($match[1]);
- if (!\is_scalar($value)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, \gettype($value)));
+ if (!is_scalar($value)) {
+ throw new RuntimeException(sprintf('Parameter "%s" found when resolving env var "%s" must be scalar, "%s" given.', $match[1], $name, gettype($value)));
}
return $value;
}, $env);
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Unsupported env var prefix "%s".', $prefix));
+ throw new RuntimeException(sprintf('Unsupported env var prefix "%s".', $prefix));
}
private static function phpize($value)
{
- if (!\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::class)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('The Symfony Config component is required to cast env vars to "bool", "int" or "float".');
+ if (!class_exists(XmlUtils::class)) {
+ throw new RuntimeException('The Symfony Config component is required to cast env vars to "bool", "int" or "float".');
}
- return \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value);
+ return XmlUtils::phpize($value);
}
}
diff --git a/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php b/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
index 4504638af..0dec8d7b5 100644
--- a/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
+++ b/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
@@ -11,6 +11,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Closure;
+
/**
* The EnvVarProcessorInterface is implemented by objects that manage environment-like variables.
*
@@ -23,13 +25,13 @@ interface EnvVarProcessorInterface
*
* @param string $prefix The namespace of the variable
* @param string $name The name of the variable within the namespace
- * @param \Closure $getEnv A closure that allows fetching more env vars
+ * @param Closure $getEnv A closure that allows fetching more env vars
*
* @return mixed
*
* @throws RuntimeException on error
*/
- public function getEnv($prefix, $name, \Closure $getEnv);
+ public function getEnv($prefix, $name, Closure $getEnv);
/**
* @return string[] The PHP-types managed by getEnv(), keyed by prefixes
*/
diff --git a/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php b/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
index c8004102a..e7cb47df2 100644
--- a/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
+++ b/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
@@ -10,13 +10,15 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
+use Exception;
+
/**
* Thrown when a definition cannot be autowired.
*/
-class AutowiringFailedException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException
+class AutowiringFailedException extends RuntimeException
{
private $serviceId;
- public function __construct($serviceId, $message = '', $code = 0, \Exception $previous = null)
+ public function __construct($serviceId, $message = '', $code = 0, Exception $previous = null)
{
$this->serviceId = $serviceId;
parent::__construct($message, $code, $previous);
diff --git a/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php b/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
index eac16e3b5..6e1762685 100644
--- a/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
+++ b/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
@@ -13,6 +13,6 @@
/**
* Base BadMethodCallException for Dependency Injection component.
*/
-class BadMethodCallException extends \BadMethodCallException implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface
+class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php b/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
index f71795ee6..20e6c8843 100644
--- a/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
+++ b/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
@@ -10,15 +10,17 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
+use function sprintf;
+
/**
* This exception is thrown when an environment variable is not found.
*
* @author Nicolas Grekas
*/
-class EnvNotFoundException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
+class EnvNotFoundException extends InvalidArgumentException
{
public function __construct($name)
{
- parent::__construct(\sprintf('Environment variable not found: "%s".', $name));
+ parent::__construct(sprintf('Environment variable not found: "%s".', $name));
}
}
diff --git a/vendor/symfony/dependency-injection/Exception/EnvParameterException.php b/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
index 66630c304..2c71cf7cb 100644
--- a/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
+++ b/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
@@ -10,15 +10,19 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
+use Exception;
+use function implode;
+use function sprintf;
+
/**
* This exception wraps exceptions whose messages contain a reference to an env parameter.
*
* @author Nicolas Grekas
*/
-class EnvParameterException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
+class EnvParameterException extends InvalidArgumentException
{
- public function __construct(array $envs, \Exception $previous = null, $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.')
+ public function __construct(array $envs, Exception $previous = null, $message = 'Incompatible use of dynamic environment variables "%s" found in parameters.')
{
- parent::__construct(\sprintf($message, \implode('", "', $envs)), 0, $previous);
+ parent::__construct(sprintf($message, implode('", "', $envs)), 0, $previous);
}
}
diff --git a/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php b/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
index f6c31e185..b8c8bc93c 100644
--- a/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
+++ b/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
@@ -17,6 +17,6 @@
* @author Fabien Potencier
* @author Bulat Shakirzyanov
*/
-interface ExceptionInterface extends \_PhpScoper5ea00cc67502b\Psr\Container\ContainerExceptionInterface
+interface ExceptionInterface extends ContainerExceptionInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php b/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
index 52cc05305..fe8877f34 100644
--- a/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
+++ b/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
@@ -15,6 +15,6 @@
*
* @author Bulat Shakirzyanov
*/
-class InvalidArgumentException extends \InvalidArgumentException implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface
+class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Exception/LogicException.php b/vendor/symfony/dependency-injection/Exception/LogicException.php
index 7ab622485..42b209992 100644
--- a/vendor/symfony/dependency-injection/Exception/LogicException.php
+++ b/vendor/symfony/dependency-injection/Exception/LogicException.php
@@ -13,6 +13,6 @@
/**
* Base LogicException for Dependency Injection component.
*/
-class LogicException extends \LogicException implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface
+class LogicException extends \LogicException implements ExceptionInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php b/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
index 77aa6199b..4bf39c052 100644
--- a/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
+++ b/vendor/symfony/dependency-injection/Exception/OutOfBoundsException.php
@@ -13,6 +13,6 @@
/**
* Base OutOfBoundsException for Dependency Injection component.
*/
-class OutOfBoundsException extends \OutOfBoundsException implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface
+class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php b/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
index dfd3eca9f..94ba9a25f 100644
--- a/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
+++ b/vendor/symfony/dependency-injection/Exception/ParameterCircularReferenceException.php
@@ -10,17 +10,21 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
+use Exception;
+use function implode;
+use function sprintf;
+
/**
* This exception is thrown when a circular reference in a parameter is detected.
*
* @author Fabien Potencier
*/
-class ParameterCircularReferenceException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException
+class ParameterCircularReferenceException extends RuntimeException
{
private $parameters;
- public function __construct($parameters, \Exception $previous = null)
+ public function __construct($parameters, Exception $previous = null)
{
- parent::__construct(\sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], \implode('" > "', $parameters), $parameters[0]), 0, $previous);
+ parent::__construct(sprintf('Circular reference detected for parameter "%s" ("%s" > "%s").', $parameters[0], implode('" > "', $parameters), $parameters[0]), 0, $previous);
$this->parameters = $parameters;
}
public function getParameters()
diff --git a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
index 7c209df11..eab858443 100644
--- a/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
+++ b/vendor/symfony/dependency-injection/Exception/ParameterNotFoundException.php
@@ -10,12 +10,17 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
+use Exception;
+use function count;
+use function implode;
+use function sprintf;
+
/**
* This exception is thrown when a non-existent parameter is used.
*
* @author Fabien Potencier
*/
-class ParameterNotFoundException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
+class ParameterNotFoundException extends InvalidArgumentException
{
private $key;
private $sourceId;
@@ -26,11 +31,11 @@ class ParameterNotFoundException extends \_PhpScoper5ea00cc67502b\Symfony\Compon
* @param string $key The requested parameter key
* @param string $sourceId The service id that references the non-existent parameter
* @param string $sourceKey The parameter key that references the non-existent parameter
- * @param \Exception $previous The previous exception
+ * @param Exception $previous The previous exception
* @param string[] $alternatives Some parameter name alternatives
* @param string|null $nonNestedAlternative The alternative parameter name when the user expected dot notation for nested parameters
*/
- public function __construct($key, $sourceId = null, $sourceKey = null, \Exception $previous = null, array $alternatives = [], $nonNestedAlternative = null)
+ public function __construct($key, $sourceId = null, $sourceKey = null, Exception $previous = null, array $alternatives = [], $nonNestedAlternative = null)
{
$this->key = $key;
$this->sourceId = $sourceId;
@@ -43,19 +48,19 @@ public function __construct($key, $sourceId = null, $sourceKey = null, \Exceptio
public function updateRepr()
{
if (null !== $this->sourceId) {
- $this->message = \sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key);
+ $this->message = sprintf('The service "%s" has a dependency on a non-existent parameter "%s".', $this->sourceId, $this->key);
} elseif (null !== $this->sourceKey) {
- $this->message = \sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key);
+ $this->message = sprintf('The parameter "%s" has a dependency on a non-existent parameter "%s".', $this->sourceKey, $this->key);
} else {
- $this->message = \sprintf('You have requested a non-existent parameter "%s".', $this->key);
+ $this->message = sprintf('You have requested a non-existent parameter "%s".', $this->key);
}
if ($this->alternatives) {
- if (1 == \count($this->alternatives)) {
+ if (1 == count($this->alternatives)) {
$this->message .= ' Did you mean this: "';
} else {
$this->message .= ' Did you mean one of these: "';
}
- $this->message .= \implode('", "', $this->alternatives) . '"?';
+ $this->message .= implode('", "', $this->alternatives) . '"?';
} elseif (null !== $this->nonNestedAlternative) {
$this->message .= ' You cannot access nested array items, do you want to inject "' . $this->nonNestedAlternative . '" instead?';
}
diff --git a/vendor/symfony/dependency-injection/Exception/RuntimeException.php b/vendor/symfony/dependency-injection/Exception/RuntimeException.php
index d50d51485..24ff45155 100644
--- a/vendor/symfony/dependency-injection/Exception/RuntimeException.php
+++ b/vendor/symfony/dependency-injection/Exception/RuntimeException.php
@@ -15,6 +15,6 @@
*
* @author Johannes M. Schmitt
*/
-class RuntimeException extends \RuntimeException implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ExceptionInterface
+class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php b/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
index a9043bd01..efb3dbb15 100644
--- a/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
+++ b/vendor/symfony/dependency-injection/Exception/ServiceCircularReferenceException.php
@@ -10,18 +10,22 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
+use Exception;
+use function implode;
+use function sprintf;
+
/**
* This exception is thrown when a circular reference is detected.
*
* @author Johannes M. Schmitt
*/
-class ServiceCircularReferenceException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException
+class ServiceCircularReferenceException extends RuntimeException
{
private $serviceId;
private $path;
- public function __construct($serviceId, array $path, \Exception $previous = null)
+ public function __construct($serviceId, array $path, Exception $previous = null)
{
- parent::__construct(\sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, \implode(' -> ', $path)), 0, $previous);
+ parent::__construct(sprintf('Circular reference detected for service "%s", path: "%s".', $serviceId, implode(' -> ', $path)), 0, $previous);
$this->serviceId = $serviceId;
$this->path = $path;
}
diff --git a/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php b/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
index 166c4921b..254e12322 100644
--- a/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
+++ b/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php
@@ -11,32 +11,37 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception;
use _PhpScoper5ea00cc67502b\Psr\Container\NotFoundExceptionInterface;
+use Exception;
+use function count;
+use function implode;
+use function sprintf;
+
/**
* This exception is thrown when a non-existent service is requested.
*
* @author Johannes M. Schmitt
*/
-class ServiceNotFoundException extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException implements \_PhpScoper5ea00cc67502b\Psr\Container\NotFoundExceptionInterface
+class ServiceNotFoundException extends InvalidArgumentException implements NotFoundExceptionInterface
{
private $id;
private $sourceId;
private $alternatives;
- public function __construct($id, $sourceId = null, \Exception $previous = null, array $alternatives = [], $msg = null)
+ public function __construct($id, $sourceId = null, Exception $previous = null, array $alternatives = [], $msg = null)
{
if (null !== $msg) {
// no-op
} elseif (null === $sourceId) {
- $msg = \sprintf('You have requested a non-existent service "%s".', $id);
+ $msg = sprintf('You have requested a non-existent service "%s".', $id);
} else {
- $msg = \sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id);
+ $msg = sprintf('The service "%s" has a dependency on a non-existent service "%s".', $sourceId, $id);
}
if ($alternatives) {
- if (1 == \count($alternatives)) {
+ if (1 == count($alternatives)) {
$msg .= ' Did you mean this: "';
} else {
$msg .= ' Did you mean one of these: "';
}
- $msg .= \implode('", "', $alternatives) . '"?';
+ $msg .= implode('", "', $alternatives) . '"?';
}
parent::__construct($msg, 0, $previous);
$this->id = $id;
diff --git a/vendor/symfony/dependency-injection/Exception/index.php b/vendor/symfony/dependency-injection/Exception/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Exception/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/ExpressionLanguage.php b/vendor/symfony/dependency-injection/ExpressionLanguage.php
index fe9239ca6..fd97f773e 100644
--- a/vendor/symfony/dependency-injection/ExpressionLanguage.php
+++ b/vendor/symfony/dependency-injection/ExpressionLanguage.php
@@ -11,6 +11,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage as BaseExpressionLanguage;
+use function array_unshift;
+
/**
* Adds some function to the default ExpressionLanguage.
*
@@ -18,7 +20,7 @@
*
* @see ExpressionLanguageProvider
*/
-class ExpressionLanguage extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage
+class ExpressionLanguage extends BaseExpressionLanguage
{
/**
* {@inheritdoc}
@@ -26,7 +28,7 @@ class ExpressionLanguage extends \_PhpScoper5ea00cc67502b\Symfony\Component\Expr
public function __construct($cache = null, array $providers = [], callable $serviceCompiler = null)
{
// prepend the default provider to let users override it easily
- \array_unshift($providers, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ExpressionLanguageProvider($serviceCompiler));
+ array_unshift($providers, new ExpressionLanguageProvider($serviceCompiler));
parent::__construct($cache, $providers);
}
}
diff --git a/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php b/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php
index 2b486c92d..1df141638 100644
--- a/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php
+++ b/vendor/symfony/dependency-injection/ExpressionLanguageProvider.php
@@ -12,6 +12,8 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
+use function sprintf;
+
/**
* Define some ExpressionLanguage functions.
*
@@ -20,7 +22,7 @@
*
* @author Fabien Potencier
*/
-class ExpressionLanguageProvider implements \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface
+class ExpressionLanguageProvider implements ExpressionFunctionProviderInterface
{
private $serviceCompiler;
public function __construct(callable $serviceCompiler = null)
@@ -29,12 +31,12 @@ public function __construct(callable $serviceCompiler = null)
}
public function getFunctions()
{
- return [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) {
- return \sprintf('$this->get(%s)', $arg);
+ return [new ExpressionFunction('service', $this->serviceCompiler ?: function ($arg) {
+ return sprintf('$this->get(%s)', $arg);
}, function (array $variables, $value) {
return $variables['container']->get($value);
- }), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction('parameter', function ($arg) {
- return \sprintf('$this->getParameter(%s)', $arg);
+ }), new ExpressionFunction('parameter', function ($arg) {
+ return sprintf('$this->getParameter(%s)', $arg);
}, function (array $variables, $value) {
return $variables['container']->getParameter($value);
})];
diff --git a/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php
index d2b7b45ad..c4b0e6f20 100644
--- a/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php
+++ b/vendor/symfony/dependency-injection/Extension/ConfigurationExtensionInterface.php
@@ -24,5 +24,5 @@ interface ConfigurationExtensionInterface
*
* @return ConfigurationInterface|null The configuration or null
*/
- public function getConfiguration(array $config, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container);
+ public function getConfiguration(array $config, ContainerBuilder $container);
}
diff --git a/vendor/symfony/dependency-injection/Extension/Extension.php b/vendor/symfony/dependency-injection/Extension/Extension.php
index 5d5a92496..e90d47ed3 100644
--- a/vendor/symfony/dependency-injection/Extension/Extension.php
+++ b/vendor/symfony/dependency-injection/Extension/Extension.php
@@ -16,12 +16,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function array_key_exists;
+use function strpos;
+use function strrchr;
+use function strrpos;
+use function substr;
+use function substr_replace;
+
/**
* Provides useful features shared by many extensions.
*
* @author Fabien Potencier
*/
-abstract class Extension implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ExtensionInterface, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface
+abstract class Extension implements ExtensionInterface, ConfigurationExtensionInterface
{
private $processedConfigs = [];
/**
@@ -29,7 +36,7 @@ abstract class Extension implements \_PhpScoper5ea00cc67502b\Symfony\Component\D
*/
public function getXsdValidationBasePath()
{
- return \false;
+ return false;
}
/**
* {@inheritdoc}
@@ -61,23 +68,23 @@ public function getNamespace()
public function getAlias()
{
$className = static::class;
- if ('Extension' != \substr($className, -9)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');
+ if ('Extension' != substr($className, -9)) {
+ throw new BadMethodCallException('This extension does not follow the naming convention; you must overwrite the getAlias() method.');
}
- $classBaseName = \substr(\strrchr($className, '\\'), 1, -9);
- return \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::underscore($classBaseName);
+ $classBaseName = substr(strrchr($className, '\\'), 1, -9);
+ return Container::underscore($classBaseName);
}
/**
* {@inheritdoc}
*/
- public function getConfiguration(array $config, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function getConfiguration(array $config, ContainerBuilder $container)
{
$class = static::class;
- if (\false !== \strpos($class, "\0")) {
+ if (false !== strpos($class, "\0")) {
return null;
// ignore anonymous classes
}
- $class = \substr_replace($class, '\\Configuration', \strrpos($class, '\\'));
+ $class = substr_replace($class, '\\Configuration', strrpos($class, '\\'));
$class = $container->getReflectionClass($class);
$constructor = $class ? $class->getConstructor() : null;
return $class && (!$constructor || !$constructor->getNumberOfRequiredParameters()) ? $class->newInstance() : null;
@@ -85,9 +92,9 @@ public function getConfiguration(array $config, \_PhpScoper5ea00cc67502b\Symfony
/**
* @return array
*/
- protected final function processConfiguration(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ConfigurationInterface $configuration, array $configs)
+ protected final function processConfiguration(ConfigurationInterface $configuration, array $configs)
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Processor();
+ $processor = new Processor();
return $this->processedConfigs[] = $processor->processConfiguration($configuration, $configs);
}
/**
@@ -106,10 +113,10 @@ public final function getProcessedConfigs()
*
* @throws InvalidArgumentException When the config is not enableable
*/
- protected function isConfigEnabled(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, array $config)
+ protected function isConfigEnabled(ContainerBuilder $container, array $config)
{
- if (!\array_key_exists('enabled', $config)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException("The config array has no 'enabled' key.");
+ if (!array_key_exists('enabled', $config)) {
+ throw new InvalidArgumentException("The config array has no 'enabled' key.");
}
return (bool) $container->getParameterBag()->resolveValue($config['enabled']);
}
diff --git a/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php
index a4131ab05..2e2717812 100644
--- a/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php
+++ b/vendor/symfony/dependency-injection/Extension/ExtensionInterface.php
@@ -11,6 +11,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use InvalidArgumentException;
+
/**
* ExtensionInterface is the interface implemented by container extension classes.
*
@@ -21,9 +23,9 @@ interface ExtensionInterface
/**
* Loads a specific configuration.
*
- * @throws \InvalidArgumentException When provided tag is not defined in this extension
+ * @throws InvalidArgumentException When provided tag is not defined in this extension
*/
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container);
+ public function load(array $configs, ContainerBuilder $container);
/**
* Returns the namespace to be used for this extension (XML namespace).
*
diff --git a/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php b/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php
index bbc231d10..aa2d3049a 100644
--- a/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php
+++ b/vendor/symfony/dependency-injection/Extension/PrependExtensionInterface.php
@@ -16,5 +16,5 @@ interface PrependExtensionInterface
/**
* Allow an extension to prepend the extension configurations.
*/
- public function prepend(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container);
+ public function prepend(ContainerBuilder $container);
}
diff --git a/vendor/symfony/dependency-injection/Extension/index.php b/vendor/symfony/dependency-injection/Extension/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Extension/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php
index 2633b6f5e..d38e36af6 100644
--- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php
+++ b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/InstantiatorInterface.php
@@ -30,5 +30,5 @@ interface InstantiatorInterface
*
* @return object
*/
- public function instantiateProxy(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface $container, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id, $realInstantiator);
+ public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator);
}
diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php
index 5a138a55e..0cfdc510d 100644
--- a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php
+++ b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/RealServiceInstantiator.php
@@ -12,6 +12,8 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
+use function call_user_func;
+
/**
* {@inheritdoc}
*
@@ -19,13 +21,13 @@
*
* @author Marco Pivetta
*/
-class RealServiceInstantiator implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface
+class RealServiceInstantiator implements InstantiatorInterface
{
/**
* {@inheritdoc}
*/
- public function instantiateProxy(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface $container, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id, $realInstantiator)
+ public function instantiateProxy(ContainerInterface $container, Definition $definition, $id, $realInstantiator)
{
- return \call_user_func($realInstantiator);
+ return call_user_func($realInstantiator);
}
}
diff --git a/vendor/symfony/dependency-injection/LazyProxy/Instantiator/index.php b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/LazyProxy/Instantiator/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php
index ec06a642b..012920d11 100644
--- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php
+++ b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/DumperInterface.php
@@ -23,7 +23,7 @@ interface DumperInterface
*
* @return bool
*/
- public function isProxyCandidate(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition);
+ public function isProxyCandidate(Definition $definition);
/**
* Generates the code to be used to instantiate a proxy in the dumped factory code.
*
@@ -31,11 +31,11 @@ public function isProxyCandidate(\_PhpScoper5ea00cc67502b\Symfony\Component\Depe
*
* @return string
*/
- public function getProxyFactoryCode(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id);
+ public function getProxyFactoryCode(Definition $definition, $id);
/**
* Generates the code for the lazy proxy.
*
* @return string
*/
- public function getProxyCode(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition);
+ public function getProxyCode(Definition $definition);
}
diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php
index f7db10973..521d9c63e 100644
--- a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php
+++ b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/NullDumper.php
@@ -18,26 +18,26 @@
*
* @final since version 3.3
*/
-class NullDumper implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface
+class NullDumper implements DumperInterface
{
/**
* {@inheritdoc}
*/
- public function isProxyCandidate(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ public function isProxyCandidate(Definition $definition)
{
- return \false;
+ return false;
}
/**
* {@inheritdoc}
*/
- public function getProxyFactoryCode(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id, $factoryCode = null)
+ public function getProxyFactoryCode(Definition $definition, $id, $factoryCode = null)
{
return '';
}
/**
* {@inheritdoc}
*/
- public function getProxyCode(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ public function getProxyCode(Definition $definition)
{
return '';
}
diff --git a/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/index.php b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/LazyProxy/PhpDumper/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php b/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php
index c789c53cf..cae74ca1c 100644
--- a/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php
+++ b/vendor/symfony/dependency-injection/LazyProxy/ProxyHelper.php
@@ -10,6 +10,15 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy;
+use ReflectionFunctionAbstract;
+use ReflectionMethod;
+use ReflectionNamedType;
+use ReflectionParameter;
+use function is_string;
+use function method_exists;
+use function preg_match;
+use function strtolower;
+
/**
* @author Nicolas Grekas
*
@@ -20,35 +29,35 @@ class ProxyHelper
/**
* @return string|null The FQCN or builtin name of the type hint, or null when the type hint references an invalid self|parent context
*/
- public static function getTypeHint(\ReflectionFunctionAbstract $r, \ReflectionParameter $p = null, $noBuiltin = \false)
+ public static function getTypeHint(ReflectionFunctionAbstract $r, ReflectionParameter $p = null, $noBuiltin = false)
{
- if ($p instanceof \ReflectionParameter) {
- if (\method_exists($p, 'getType')) {
+ if ($p instanceof ReflectionParameter) {
+ if (method_exists($p, 'getType')) {
$type = $p->getType();
- } elseif (\preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\\x7F-\\xFF][^ ]++)/', $p, $type)) {
+ } elseif (preg_match('/^(?:[^ ]++ ){4}([a-zA-Z_\\x7F-\\xFF][^ ]++)/', $p, $type)) {
$name = $type = $type[1];
if ('callable' === $name || 'array' === $name) {
return $noBuiltin ? null : $name;
}
}
} else {
- $type = \method_exists($r, 'getReturnType') ? $r->getReturnType() : null;
+ $type = method_exists($r, 'getReturnType') ? $r->getReturnType() : null;
}
if (!$type) {
return null;
}
- if (!\is_string($type)) {
- $name = $type instanceof \ReflectionNamedType ? $type->getName() : $type->__toString();
+ if (!is_string($type)) {
+ $name = $type instanceof ReflectionNamedType ? $type->getName() : $type->__toString();
if ($type->isBuiltin()) {
return $noBuiltin ? null : $name;
}
}
- $lcName = \strtolower($name);
+ $lcName = strtolower($name);
$prefix = $noBuiltin ? '' : '\\';
if ('self' !== $lcName && 'parent' !== $lcName) {
return $prefix . $name;
}
- if (!$r instanceof \ReflectionMethod) {
+ if (!$r instanceof ReflectionMethod) {
return null;
}
if ('self' === $lcName) {
diff --git a/vendor/symfony/dependency-injection/LazyProxy/index.php b/vendor/symfony/dependency-injection/LazyProxy/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/LazyProxy/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php b/vendor/symfony/dependency-injection/Loader/ClosureLoader.php
index 58ce783f6..b169c38ff 100644
--- a/vendor/symfony/dependency-injection/Loader/ClosureLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/ClosureLoader.php
@@ -12,6 +12,9 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\Loader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use Closure;
+use function call_user_func;
+
/**
* ClosureLoader loads service definitions from a PHP closure.
*
@@ -19,10 +22,10 @@
*
* @author Fabien Potencier
*/
-class ClosureLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\Loader
+class ClosureLoader extends Loader
{
private $container;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function __construct(ContainerBuilder $container)
{
$this->container = $container;
}
@@ -31,13 +34,13 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
*/
public function load($resource, $type = null)
{
- \call_user_func($resource, $this->container);
+ call_user_func($resource, $this->container);
}
/**
* {@inheritdoc}
*/
public function supports($resource, $type = null)
{
- return $resource instanceof \Closure;
+ return $resource instanceof Closure;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php
index 26a2395b5..7373d9406 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractConfigurator.php
@@ -16,6 +16,16 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
+use BadMethodCallException;
+use function call_user_func_array;
+use function get_class;
+use function gettype;
+use function is_array;
+use function is_object;
+use function is_scalar;
+use function method_exists;
+use function sprintf;
+
abstract class AbstractConfigurator
{
const FACTORY = 'unknown';
@@ -23,10 +33,10 @@ abstract class AbstractConfigurator
protected $definition;
public function __call($method, $args)
{
- if (\method_exists($this, 'set' . $method)) {
- return \call_user_func_array([$this, 'set' . $method], $args);
+ if (method_exists($this, 'set' . $method)) {
+ return call_user_func_array([$this, 'set' . $method], $args);
}
- throw new \BadMethodCallException(\sprintf('Call to undefined method "%s::%s()".', static::class, $method));
+ throw new BadMethodCallException(sprintf('Call to undefined method "%s::%s()".', static::class, $method));
}
/**
* Checks that a value is valid, optionally replacing Definition and Reference configurators by their configure value.
@@ -36,38 +46,38 @@ public function __call($method, $args)
*
* @return mixed the value, optionally cast to a Definition/Reference
*/
- public static function processValue($value, $allowServices = \false)
+ public static function processValue($value, $allowServices = false)
{
- if (\is_array($value)) {
+ if (is_array($value)) {
foreach ($value as $k => $v) {
$value[$k] = static::processValue($v, $allowServices);
}
return $value;
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($value->id, $value->invalidBehavior);
+ if ($value instanceof ReferenceConfigurator) {
+ return new Reference($value->id, $value->invalidBehavior);
}
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\InlineServiceConfigurator) {
+ if ($value instanceof InlineServiceConfigurator) {
$def = $value->definition;
$value->definition = null;
return $def;
}
if ($value instanceof self) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"%s()" can be used only at the root of service configuration files.', $value::FACTORY));
+ throw new InvalidArgumentException(sprintf('"%s()" can be used only at the root of service configuration files.', $value::FACTORY));
}
- switch (\true) {
+ switch (true) {
case null === $value:
- case \is_scalar($value):
+ case is_scalar($value):
return $value;
- case $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ArgumentInterface:
- case $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition:
- case $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression:
- case $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter:
- case $value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference:
+ case $value instanceof ArgumentInterface:
+ case $value instanceof Definition:
+ case $value instanceof Expression:
+ case $value instanceof Parameter:
+ case $value instanceof Reference:
if ($allowServices) {
return $value;
}
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Cannot use values of type "%s" in service configuration files.', \is_object($value) ? \get_class($value) : \gettype($value)));
+ throw new InvalidArgumentException(sprintf('Cannot use values of type "%s" in service configuration files.', is_object($value) ? get_class($value) : gettype($value)));
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php
index 1c06edcc8..b50df2b1e 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/AbstractServiceConfigurator.php
@@ -12,12 +12,12 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
-abstract class AbstractServiceConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
+abstract class AbstractServiceConfigurator extends AbstractConfigurator
{
protected $parent;
protected $id;
private $defaultTags = [];
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator $parent, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id = null, array $defaultTags = [])
+ public function __construct(ServicesConfigurator $parent, Definition $definition, $id = null, array $defaultTags = [])
{
$this->parent = $parent;
$this->definition = $definition;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php
index 3e902f1e9..595c5d668 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/AliasConfigurator.php
@@ -14,11 +14,11 @@
/**
* @author Nicolas Grekas
*/
-class AliasConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractServiceConfigurator
+class AliasConfigurator extends AbstractServiceConfigurator
{
const FACTORY = 'alias';
use Traits\PublicTrait;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator $parent, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias $alias)
+ public function __construct(ServicesConfigurator $parent, Alias $alias)
{
$this->parent = $parent;
$this->definition = $alias;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
index cdf7797f6..3ba2ec134 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php
@@ -17,10 +17,16 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
+use function array_filter;
+use function array_map;
+use function dirname;
+use function implode;
+use function sprintf;
+
/**
* @author Nicolas Grekas
*/
-class ContainerConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
+class ContainerConfigurator extends AbstractConfigurator
{
const FACTORY = 'container';
private $container;
@@ -28,7 +34,7 @@ class ContainerConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\D
private $instanceof;
private $path;
private $file;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader $loader, array &$instanceof, $path, $file)
+ public function __construct(ContainerBuilder $container, PhpFileLoader $loader, array &$instanceof, $path, $file)
{
$this->container = $container;
$this->loader = $loader;
@@ -39,16 +45,16 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
public final function extension($namespace, array $config)
{
if (!$this->container->hasExtension($namespace)) {
- $extensions = \array_filter(\array_map(function ($ext) {
+ $extensions = array_filter(array_map(function ($ext) {
return $ext->getAlias();
}, $this->container->getExtensions()));
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $namespace, $this->file, $namespace, $extensions ? \implode('", "', $extensions) : 'none'));
+ throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $namespace, $this->file, $namespace, $extensions ? implode('", "', $extensions) : 'none'));
}
$this->container->loadFromExtension($namespace, static::processValue($config));
}
- public final function import($resource, $type = null, $ignoreErrors = \false)
+ public final function import($resource, $type = null, $ignoreErrors = false)
{
- $this->loader->setCurrentDir(\dirname($this->path));
+ $this->loader->setCurrentDir(dirname($this->path));
$this->loader->import($resource, $type, $ignoreErrors, $this->file);
}
/**
@@ -56,14 +62,14 @@ public final function import($resource, $type = null, $ignoreErrors = \false)
*/
public final function parameters()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ParametersConfigurator($this->container);
+ return new ParametersConfigurator($this->container);
}
/**
* @return ServicesConfigurator
*/
public final function services()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator($this->container, $this->loader, $this->instanceof);
+ return new ServicesConfigurator($this->container, $this->loader, $this->instanceof);
}
}
/**
@@ -75,7 +81,7 @@ public final function services()
*/
function ref($id)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator($id);
+ return new ReferenceConfigurator($id);
}
/**
* Creates an inline service.
@@ -86,7 +92,7 @@ function ref($id)
*/
function inline($class = null)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\InlineServiceConfigurator(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition($class));
+ return new InlineServiceConfigurator(new Definition($class));
}
/**
* Creates a lazy iterator.
@@ -97,7 +103,7 @@ function inline($class = null)
*/
function iterator(array $values)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator::processValue($values, \true));
+ return new IteratorArgument(AbstractConfigurator::processValue($values, true));
}
/**
* Creates a lazy iterator by tag name.
@@ -108,7 +114,7 @@ function iterator(array $values)
*/
function tagged($tag)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument($tag);
+ return new TaggedIteratorArgument($tag);
}
/**
* Creates an expression.
@@ -119,5 +125,5 @@ function tagged($tag)
*/
function expr($expression)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression($expression);
+ return new Expression($expression);
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php
index 0d3a25768..fedcaba66 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/DefaultsConfigurator.php
@@ -11,12 +11,16 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function is_scalar;
+use function is_string;
+use function sprintf;
+
/**
* @author Nicolas Grekas
*
* @method InstanceofConfigurator instanceof(string $fqcn)
*/
-class DefaultsConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractServiceConfigurator
+class DefaultsConfigurator extends AbstractServiceConfigurator
{
const FACTORY = 'defaults';
use Traits\AutoconfigureTrait;
@@ -35,12 +39,12 @@ class DefaultsConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\De
*/
public final function tag($name, array $attributes = [])
{
- if (!\is_string($name) || '' === $name) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
+ if (!is_string($name) || '' === $name) {
+ throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
}
foreach ($attributes as $attribute => $value) {
- if (!\is_scalar($value) && null !== $value) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
+ if (!is_scalar($value) && null !== $value) {
+ throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
}
}
$this->definition->addTag($name, $attributes);
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php
index d3a99ab6c..d396a9734 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/InlineServiceConfigurator.php
@@ -14,7 +14,7 @@
/**
* @author Nicolas Grekas
*/
-class InlineServiceConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
+class InlineServiceConfigurator extends AbstractConfigurator
{
const FACTORY = 'inline';
use Traits\ArgumentTrait;
@@ -25,7 +25,7 @@ class InlineServiceConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Compone
use Traits\LazyTrait;
use Traits\ParentTrait;
use Traits\TagTrait;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ public function __construct(Definition $definition)
{
$this->definition = $definition;
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php
index 487d8e904..1fe03036e 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/InstanceofConfigurator.php
@@ -15,7 +15,7 @@
*
* @method InstanceofConfigurator instanceof(string $fqcn)
*/
-class InstanceofConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractServiceConfigurator
+class InstanceofConfigurator extends AbstractServiceConfigurator
{
const FACTORY = 'instanceof';
use Traits\AutowireTrait;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php
index 039f568bf..5b346ff09 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/ParametersConfigurator.php
@@ -14,11 +14,11 @@
/**
* @author Nicolas Grekas
*/
-class ParametersConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
+class ParametersConfigurator extends AbstractConfigurator
{
const FACTORY = 'parameters';
private $container;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function __construct(ContainerBuilder $container)
{
$this->container = $container;
}
@@ -32,7 +32,7 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
*/
public final function set($name, $value)
{
- $this->container->setParameter($name, static::processValue($value, \true));
+ $this->container->setParameter($name, static::processValue($value, true));
return $this;
}
/**
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php
index 915b20564..46da9b1f9 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/PrototypeConfigurator.php
@@ -15,7 +15,7 @@
/**
* @author Nicolas Grekas
*/
-class PrototypeConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractServiceConfigurator
+class PrototypeConfigurator extends AbstractServiceConfigurator
{
const FACTORY = 'load';
use Traits\AbstractTrait;
@@ -37,9 +37,9 @@ class PrototypeConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\D
private $resource;
private $exclude;
private $allowParent;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator $parent, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader $loader, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $defaults, $namespace, $resource, $allowParent)
+ public function __construct(ServicesConfigurator $parent, PhpFileLoader $loader, Definition $defaults, $namespace, $resource, $allowParent)
{
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $definition = new Definition();
$definition->setPublic($defaults->isPublic());
$definition->setAutowired($defaults->isAutowired());
$definition->setAutoconfigured($defaults->isAutoconfigured());
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php
index 8e87f08dc..16288b19d 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/ReferenceConfigurator.php
@@ -14,12 +14,12 @@
/**
* @author Nicolas Grekas
*/
-class ReferenceConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
+class ReferenceConfigurator extends AbstractConfigurator
{
/** @internal */
protected $id;
/** @internal */
- protected $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
+ protected $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
public function __construct($id)
{
$this->id = $id;
@@ -29,7 +29,7 @@ public function __construct($id)
*/
public final function ignoreOnInvalid()
{
- $this->invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
+ $this->invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
return $this;
}
/**
@@ -37,7 +37,7 @@ public final function ignoreOnInvalid()
*/
public final function nullOnInvalid()
{
- $this->invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE;
+ $this->invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
return $this;
}
/**
@@ -45,7 +45,7 @@ public final function nullOnInvalid()
*/
public final function ignoreOnUninitialized()
{
- $this->invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
+ $this->invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
return $this;
}
public function __toString()
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php
index ca85c4dfa..d39613da6 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/ServiceConfigurator.php
@@ -16,7 +16,7 @@
/**
* @author Nicolas Grekas
*/
-class ServiceConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractServiceConfigurator
+class ServiceConfigurator extends AbstractServiceConfigurator
{
const FACTORY = 'services';
use Traits\AbstractTrait;
@@ -41,7 +41,7 @@ class ServiceConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\Dep
private $container;
private $instanceof;
private $allowParent;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, array $instanceof, $allowParent, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServicesConfigurator $parent, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id, array $defaultTags)
+ public function __construct(ContainerBuilder $container, array $instanceof, $allowParent, ServicesConfigurator $parent, Definition $definition, $id, array $defaultTags)
{
$this->container = $container;
$this->instanceof = $instanceof;
@@ -52,7 +52,7 @@ public function __destruct()
{
parent::__destruct();
$this->container->removeBindings($this->id);
- if (!$this->definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
+ if (!$this->definition instanceof ChildDefinition) {
$this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
} else {
$this->container->setDefinition($this->id, $this->definition);
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php b/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php
index 493c98ca7..1cd1cd7f2 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/ServicesConfigurator.php
@@ -21,16 +21,16 @@
*
* @method InstanceofConfigurator instanceof($fqcn)
*/
-class ServicesConfigurator extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AbstractConfigurator
+class ServicesConfigurator extends AbstractConfigurator
{
const FACTORY = 'services';
private $defaults;
private $container;
private $loader;
private $instanceof;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader $loader, array &$instanceof)
+ public function __construct(ContainerBuilder $container, PhpFileLoader $loader, array &$instanceof)
{
- $this->defaults = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $this->defaults = new Definition();
$this->container = $container;
$this->loader = $loader;
$this->instanceof =& $instanceof;
@@ -43,7 +43,7 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
*/
public final function defaults()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\DefaultsConfigurator($this, $this->defaults = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition());
+ return new DefaultsConfigurator($this, $this->defaults = new Definition());
}
/**
* Defines an instanceof-conditional to be applied to following service definitions.
@@ -54,8 +54,8 @@ public final function defaults()
*/
protected final function setInstanceof($fqcn)
{
- $this->instanceof[$fqcn] = $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('');
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\InstanceofConfigurator($this, $definition, $fqcn);
+ $this->instanceof[$fqcn] = $definition = new ChildDefinition('');
+ return new InstanceofConfigurator($this, $definition, $fqcn);
}
/**
* Registers a service.
@@ -69,13 +69,13 @@ public final function set($id, $class = null)
{
$defaults = $this->defaults;
$allowParent = !$defaults->getChanges() && empty($this->instanceof);
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $definition = new Definition();
$definition->setPublic($defaults->isPublic());
$definition->setAutowired($defaults->isAutowired());
$definition->setAutoconfigured($defaults->isAutoconfigured());
$definition->setBindings($defaults->getBindings());
$definition->setChanges([]);
- $configurator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags());
+ $configurator = new ServiceConfigurator($this->container, $this->instanceof, $allowParent, $this, $definition, $id, $defaults->getTags());
return null !== $class ? $configurator->class($class) : $configurator;
}
/**
@@ -88,10 +88,10 @@ public final function set($id, $class = null)
*/
public final function alias($id, $referencedId)
{
- $ref = static::processValue($referencedId, \true);
- $alias = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias((string) $ref, $this->defaults->isPublic());
+ $ref = static::processValue($referencedId, true);
+ $alias = new Alias((string) $ref, $this->defaults->isPublic());
$this->container->setAlias($id, $alias);
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\AliasConfigurator($this, $alias);
+ return new AliasConfigurator($this, $alias);
}
/**
* Registers a PSR-4 namespace using a glob pattern.
@@ -104,7 +104,7 @@ public final function alias($id, $referencedId)
public final function load($namespace, $resource)
{
$allowParent = !$this->defaults->getChanges() && empty($this->instanceof);
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, $allowParent);
+ return new PrototypeConfigurator($this, $this->loader, $this->defaults, $namespace, $resource, $allowParent);
}
/**
* Gets an already defined service definition.
@@ -119,7 +119,7 @@ public final function get($id)
{
$allowParent = !$this->defaults->getChanges() && empty($this->instanceof);
$definition = $this->container->getDefinition($id);
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, []);
+ return new ServiceConfigurator($this->container, $definition->getInstanceofConditionals(), $allowParent, $this, $definition, $id, []);
}
/**
* Registers a service.
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php
index ae9a7f1b1..2d653cc2f 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AbstractTrait.php
@@ -23,7 +23,7 @@ trait AbstractTrait
*
* @return $this
*/
- protected final function setAbstract($abstract = \true)
+ protected final function setAbstract($abstract = true)
{
$this->definition->setAbstract($abstract);
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php
index 9a9a2e31e..62b250a2f 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ArgumentTrait.php
@@ -21,7 +21,7 @@ trait ArgumentTrait
*/
public final function args(array $arguments)
{
- $this->definition->setArguments(static::processValue($arguments, \true));
+ $this->definition->setArguments(static::processValue($arguments, true));
return $this;
}
/**
@@ -34,7 +34,7 @@ public final function args(array $arguments)
*/
public final function arg($key, $value)
{
- $this->definition->setArgument($key, static::processValue($value, \true));
+ $this->definition->setArgument($key, static::processValue($value, true));
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php
index 0053667f0..0cb255ceb 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutoconfigureTrait.php
@@ -12,6 +12,8 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function sprintf;
+
trait AutoconfigureTrait
{
/**
@@ -23,10 +25,10 @@ trait AutoconfigureTrait
*
* @throws InvalidArgumentException when a parent is already set
*/
- public final function autoconfigure($autoconfigured = \true)
+ public final function autoconfigure($autoconfigured = true)
{
- if ($autoconfigured && $this->definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
+ if ($autoconfigured && $this->definition instanceof ChildDefinition) {
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
}
$this->definition->setAutoconfigured($autoconfigured);
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php
index 63ba3b656..d26898b53 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/AutowireTrait.php
@@ -19,7 +19,7 @@ trait AutowireTrait
*
* @return $this
*/
- public final function autowire($autowired = \true)
+ public final function autowire($autowired = true)
{
$this->definition->setAutowired($autowired);
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php
index 2c70984f6..4465644be 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/BindTrait.php
@@ -12,6 +12,8 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
+use function sprintf;
+
trait BindTrait
{
/**
@@ -28,9 +30,9 @@ trait BindTrait
*/
public final function bind($nameOrFqcn, $valueOrRef)
{
- $valueOrRef = static::processValue($valueOrRef, \true);
- if (isset($nameOrFqcn[0]) && '$' !== $nameOrFqcn[0] && !$valueOrRef instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid binding for service "%s": named arguments must start with a "$", and FQCN must map to references. Neither applies to binding "%s".', $this->id, $nameOrFqcn));
+ $valueOrRef = static::processValue($valueOrRef, true);
+ if (isset($nameOrFqcn[0]) && '$' !== $nameOrFqcn[0] && !$valueOrRef instanceof Reference) {
+ throw new InvalidArgumentException(sprintf('Invalid binding for service "%s": named arguments must start with a "$", and FQCN must map to references. Neither applies to binding "%s".', $this->id, $nameOrFqcn));
}
$bindings = $this->definition->getBindings();
$bindings[$nameOrFqcn] = $valueOrRef;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php
index 4c1a28883..1acbf1bfc 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/CallTrait.php
@@ -25,7 +25,7 @@ trait CallTrait
*/
public final function call($method, array $arguments = [])
{
- $this->definition->addMethodCall($method, static::processValue($arguments, \true));
+ $this->definition->addMethodCall($method, static::processValue($arguments, true));
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php
index 94b394d65..e69f3342f 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ConfiguratorTrait.php
@@ -21,7 +21,7 @@ trait ConfiguratorTrait
*/
public final function configurator($configurator)
{
- $this->definition->setConfigurator(static::processValue($configurator, \true));
+ $this->definition->setConfigurator(static::processValue($configurator, true));
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php
index 68edff99b..d5b682071 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/DeprecateTrait.php
@@ -24,7 +24,7 @@ trait DeprecateTrait
*/
public final function deprecate($template = null)
{
- $this->definition->setDeprecated(\true, $template);
+ $this->definition->setDeprecated(true, $template);
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php
index 96849577b..05570c430 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/FactoryTrait.php
@@ -11,6 +11,11 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function explode;
+use function is_string;
+use function sprintf;
+use function substr_count;
+
trait FactoryTrait
{
/**
@@ -22,11 +27,11 @@ trait FactoryTrait
*/
public final function factory($factory)
{
- if (\is_string($factory) && 1 === \substr_count($factory, ':')) {
- $factoryParts = \explode(':', $factory);
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid factory "%s": the `service:method` notation is not available when using PHP-based DI configuration. Use "[ref(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1]));
+ if (is_string($factory) && 1 === substr_count($factory, ':')) {
+ $factoryParts = explode(':', $factory);
+ throw new InvalidArgumentException(sprintf('Invalid factory "%s": the `service:method` notation is not available when using PHP-based DI configuration. Use "[ref(\'%s\'), \'%s\']" instead.', $factory, $factoryParts[0], $factoryParts[1]));
}
- $this->definition->setFactory(static::processValue($factory, \true));
+ $this->definition->setFactory(static::processValue($factory, true));
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php
index 8d6313df5..4b451a39a 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/LazyTrait.php
@@ -19,7 +19,7 @@ trait LazyTrait
*
* @return $this
*/
- public final function lazy($lazy = \true)
+ public final function lazy($lazy = true)
{
$this->definition->setLazy($lazy);
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php
index c40fbe173..8f6574192 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ParentTrait.php
@@ -12,6 +12,11 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function serialize;
+use function sprintf;
+use function substr_replace;
+use function unserialize;
+
/**
* @method $this parent(string $parent)
*/
@@ -29,20 +34,20 @@ trait ParentTrait
protected final function setParent($parent)
{
if (!$this->allowParent) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id));
+ throw new InvalidArgumentException(sprintf('A parent cannot be defined when either "_instanceof" or "_defaults" are also defined for service prototype "%s".', $this->id));
}
- if ($this->definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
+ if ($this->definition instanceof ChildDefinition) {
$this->definition->setParent($parent);
} elseif ($this->definition->isAutoconfigured()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
} elseif ($this->definition->getBindings()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot have a "parent" and also "bind" arguments.', $this->id));
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also "bind" arguments.', $this->id));
} else {
// cast Definition to ChildDefinition
- $definition = \serialize($this->definition);
- $definition = \substr_replace($definition, '53', 2, 2);
- $definition = \substr_replace($definition, 'Child', 44, 0);
- $definition = \unserialize($definition);
+ $definition = serialize($this->definition);
+ $definition = substr_replace($definition, '53', 2, 2);
+ $definition = substr_replace($definition, 'Child', 44, 0);
+ $definition = unserialize($definition);
$this->definition = $definition->setParent($parent);
}
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php
index 819ee0efa..888079138 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PropertyTrait.php
@@ -22,7 +22,7 @@ trait PropertyTrait
*/
public final function property($name, $value)
{
- $this->definition->setProperty($name, static::processValue($value, \true));
+ $this->definition->setProperty($name, static::processValue($value, true));
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php
index ed312d40a..c17fac96b 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/PublicTrait.php
@@ -21,7 +21,7 @@ trait PublicTrait
*/
protected final function setPublic()
{
- $this->definition->setPublic(\true);
+ $this->definition->setPublic(true);
return $this;
}
/**
@@ -29,7 +29,7 @@ protected final function setPublic()
*/
protected final function setPrivate()
{
- $this->definition->setPublic(\false);
+ $this->definition->setPublic(false);
return $this;
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php
index 8228ed4ac..abb7cdef7 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/ShareTrait.php
@@ -19,7 +19,7 @@ trait ShareTrait
*
* @return $this
*/
- public final function share($shared = \true)
+ public final function share($shared = true)
{
$this->definition->setShared($shared);
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php
index 64bb4bbc3..7448f3731 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/SyntheticTrait.php
@@ -20,7 +20,7 @@ trait SyntheticTrait
*
* @return $this
*/
- public final function synthetic($synthetic = \true)
+ public final function synthetic($synthetic = true)
{
$this->definition->setSynthetic($synthetic);
return $this;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php
index de6d2f961..9d577007b 100644
--- a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/TagTrait.php
@@ -11,6 +11,10 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\Traits;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function is_scalar;
+use function is_string;
+use function sprintf;
+
trait TagTrait
{
/**
@@ -23,12 +27,12 @@ trait TagTrait
*/
public final function tag($name, array $attributes = [])
{
- if (!\is_string($name) || '' === $name) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The tag name for service "%s" must be a non-empty string.', $this->id));
+ if (!is_string($name) || '' === $name) {
+ throw new InvalidArgumentException(sprintf('The tag name for service "%s" must be a non-empty string.', $this->id));
}
foreach ($attributes as $attribute => $value) {
- if (!\is_scalar($value) && null !== $value) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A tag attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $this->id, $name, $attribute));
+ if (!is_scalar($value) && null !== $value) {
+ throw new InvalidArgumentException(sprintf('A tag attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $this->id, $name, $attribute));
}
}
$this->definition->addTag($name, $attributes);
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/Traits/index.php b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/Traits/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Loader/Configurator/index.php b/vendor/symfony/dependency-injection/Loader/Configurator/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Loader/Configurator/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php b/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php
index 987e594cd..b2ac3aa99 100644
--- a/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php
@@ -10,29 +10,35 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader;
+use function is_dir;
+use function is_string;
+use function rtrim;
+use function scandir;
+use function substr;
+
/**
* DirectoryLoader is a recursive loader to go through directories.
*
* @author Sebastien Lavoie
*/
-class DirectoryLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class DirectoryLoader extends FileLoader
{
/**
* {@inheritdoc}
*/
public function load($file, $type = null)
{
- $file = \rtrim($file, '/');
+ $file = rtrim($file, '/');
$path = $this->locator->locate($file);
- $this->container->fileExists($path, \false);
- foreach (\scandir($path) as $dir) {
+ $this->container->fileExists($path, false);
+ foreach (scandir($path) as $dir) {
if ('.' !== $dir[0]) {
- if (\is_dir($path . '/' . $dir)) {
+ if (is_dir($path . '/' . $dir)) {
$dir .= '/';
// append / to allow recursion
}
$this->setCurrentDir($path);
- $this->import($dir, null, \false, $path);
+ $this->import($dir, null, false, $path);
}
}
}
@@ -42,8 +48,8 @@ public function load($file, $type = null)
public function supports($resource, $type = null)
{
if ('directory' === $type) {
- return \true;
+ return true;
}
- return null === $type && \is_string($resource) && '/' === \substr($resource, -1);
+ return null === $type && is_string($resource) && '/' === substr($resource, -1);
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/FileLoader.php b/vendor/symfony/dependency-injection/Loader/FileLoader.php
index 99d3080ce..1922a86c4 100644
--- a/vendor/symfony/dependency-injection/Loader/FileLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/FileLoader.php
@@ -17,17 +17,32 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use ReflectionException;
+use function class_implements;
+use function defined;
+use function get_class;
+use function interface_exists;
+use function ltrim;
+use function preg_match;
+use function serialize;
+use function sprintf;
+use function str_replace;
+use function strlen;
+use function strpos;
+use function substr;
+use function unserialize;
+
/**
* FileLoader is the abstract class used by all built-in loaders that are file based.
*
* @author Fabien Potencier
*/
-abstract class FileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\FileLoader
+abstract class FileLoader extends BaseFileLoader
{
protected $container;
- protected $isLoadingInstanceof = \false;
+ protected $isLoadingInstanceof = false;
protected $instanceof = [];
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocatorInterface $locator)
+ public function __construct(ContainerBuilder $container, FileLocatorInterface $locator)
{
$this->container = $container;
parent::__construct($locator);
@@ -40,36 +55,36 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
* @param string $resource The directory to look for classes, glob-patterns allowed
* @param string $exclude A globed path of files to exclude
*/
- public function registerClasses(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $prototype, $namespace, $resource, $exclude = null)
+ public function registerClasses(Definition $prototype, $namespace, $resource, $exclude = null)
{
- if ('\\' !== \substr($namespace, -1)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Namespace prefix must end with a "\\": "%s".', $namespace));
+ if ('\\' !== substr($namespace, -1)) {
+ throw new InvalidArgumentException(sprintf('Namespace prefix must end with a "\\": "%s".', $namespace));
}
- if (!\preg_match('/^(?:[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+\\\\)++$/', $namespace)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Namespace is not a valid PSR-4 prefix: "%s".', $namespace));
+ if (!preg_match('/^(?:[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+\\\\)++$/', $namespace)) {
+ throw new InvalidArgumentException(sprintf('Namespace is not a valid PSR-4 prefix: "%s".', $namespace));
}
$classes = $this->findClasses($namespace, $resource, $exclude);
// prepare for deep cloning
- $serializedPrototype = \serialize($prototype);
+ $serializedPrototype = serialize($prototype);
$interfaces = [];
$singlyImplemented = [];
foreach ($classes as $class => $errorMessage) {
- if (\interface_exists($class, \false)) {
+ if (interface_exists($class, false)) {
$interfaces[] = $class;
} else {
- $this->setDefinition($class, $definition = \unserialize($serializedPrototype));
+ $this->setDefinition($class, $definition = unserialize($serializedPrototype));
if (null !== $errorMessage) {
$definition->addError($errorMessage);
continue;
}
- foreach (\class_implements($class, \false) as $interface) {
- $singlyImplemented[$interface] = isset($singlyImplemented[$interface]) ? \false : $class;
+ foreach (class_implements($class, false) as $interface) {
+ $singlyImplemented[$interface] = isset($singlyImplemented[$interface]) ? false : $class;
}
}
}
foreach ($interfaces as $interface) {
if (!empty($singlyImplemented[$interface])) {
- $this->container->setAlias($interface, $singlyImplemented[$interface])->setPublic(\false);
+ $this->container->setAlias($interface, $singlyImplemented[$interface])->setPublic(false);
}
}
}
@@ -78,16 +93,16 @@ public function registerClasses(\_PhpScoper5ea00cc67502b\Symfony\Component\Depen
*
* @param string $id
*/
- protected function setDefinition($id, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ protected function setDefinition($id, Definition $definition)
{
$this->container->removeBindings($id);
if ($this->isLoadingInstanceof) {
- if (!$definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid type definition "%s": ChildDefinition expected, "%s" given.', $id, \get_class($definition)));
+ if (!$definition instanceof ChildDefinition) {
+ throw new InvalidArgumentException(sprintf('Invalid type definition "%s": ChildDefinition expected, "%s" given.', $id, get_class($definition)));
}
$this->instanceof[$id] = $definition;
} else {
- $this->container->setDefinition($id, $definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition ? $definition : $definition->setInstanceofConditionals($this->instanceof));
+ $this->container->setDefinition($id, $definition instanceof ChildDefinition ? $definition : $definition->setInstanceofConditionals($this->instanceof));
}
}
private function findClasses($namespace, $pattern, $excludePattern)
@@ -97,55 +112,55 @@ private function findClasses($namespace, $pattern, $excludePattern)
$excludePrefix = null;
if ($excludePattern) {
$excludePattern = $parameterBag->unescapeValue($parameterBag->resolveValue($excludePattern));
- foreach ($this->glob($excludePattern, \true, $resource, \true) as $path => $info) {
+ foreach ($this->glob($excludePattern, true, $resource, true) as $path => $info) {
if (null === $excludePrefix) {
$excludePrefix = $resource->getPrefix();
}
// normalize Windows slashes
- $excludePaths[\str_replace('\\', '/', $path)] = \true;
+ $excludePaths[str_replace('\\', '/', $path)] = true;
}
}
$pattern = $parameterBag->unescapeValue($parameterBag->resolveValue($pattern));
$classes = [];
- $extRegexp = \defined('HHVM_VERSION') ? '/\\.(?:php|hh)$/' : '/\\.php$/';
+ $extRegexp = defined('HHVM_VERSION') ? '/\\.(?:php|hh)$/' : '/\\.php$/';
$prefixLen = null;
- foreach ($this->glob($pattern, \true, $resource) as $path => $info) {
+ foreach ($this->glob($pattern, true, $resource) as $path => $info) {
if (null === $prefixLen) {
- $prefixLen = \strlen($resource->getPrefix());
- if ($excludePrefix && 0 !== \strpos($excludePrefix, $resource->getPrefix())) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid "exclude" pattern when importing classes for "%s": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s).', $namespace, $excludePattern, $pattern));
+ $prefixLen = strlen($resource->getPrefix());
+ if ($excludePrefix && 0 !== strpos($excludePrefix, $resource->getPrefix())) {
+ throw new InvalidArgumentException(sprintf('Invalid "exclude" pattern when importing classes for "%s": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s).', $namespace, $excludePattern, $pattern));
}
}
- if (isset($excludePaths[\str_replace('\\', '/', $path)])) {
+ if (isset($excludePaths[str_replace('\\', '/', $path)])) {
continue;
}
- if (!\preg_match($extRegexp, $path, $m) || !$info->isReadable()) {
+ if (!preg_match($extRegexp, $path, $m) || !$info->isReadable()) {
continue;
}
- $class = $namespace . \ltrim(\str_replace('/', '\\', \substr($path, $prefixLen, -\strlen($m[0]))), '\\');
- if (!\preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+$/', $class)) {
+ $class = $namespace . ltrim(str_replace('/', '\\', substr($path, $prefixLen, -strlen($m[0]))), '\\');
+ if (!preg_match('/^[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+(?:\\\\[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*+)*+$/', $class)) {
continue;
}
try {
$r = $this->container->getReflectionClass($class);
- } catch (\ReflectionException $e) {
+ } catch (ReflectionException $e) {
$classes[$class] = $e->getMessage();
continue;
}
// check to make sure the expected class exists
if (!$r) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern));
+ throw new InvalidArgumentException(sprintf('Expected to find class "%s" in file "%s" while importing services from resource "%s", but it was not found! Check the namespace prefix used with the resource.', $class, $path, $pattern));
}
if ($r->isInstantiable() || $r->isInterface()) {
$classes[$class] = null;
}
}
// track only for new & removed files
- if ($resource instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource) {
+ if ($resource instanceof GlobResource) {
$this->container->addResource($resource);
} else {
foreach ($resource as $path) {
- $this->container->fileExists($path, \false);
+ $this->container->fileExists($path, false);
}
}
return $classes;
diff --git a/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php b/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php
index 519f519fb..bf643f551 100644
--- a/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/GlobFileLoader.php
@@ -15,14 +15,14 @@
*
* @author Nicolas Grekas
*/
-class GlobFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class GlobFileLoader extends FileLoader
{
/**
* {@inheritdoc}
*/
public function load($resource, $type = null)
{
- foreach ($this->glob($resource, \false, $globResource) as $path => $info) {
+ foreach ($this->glob($resource, false, $globResource) as $path => $info) {
$this->import($path);
}
$this->container->addResource($globResource);
diff --git a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php
index 9f9b4d7ed..e2f1a1a09 100644
--- a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php
@@ -12,12 +12,27 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use function constant;
+use function defined;
+use function is_array;
+use function is_string;
+use function parse_ini_file;
+use function pathinfo;
+use function rtrim;
+use function sprintf;
+use function strlen;
+use function strtolower;
+use function substr;
+use function substr_replace;
+use const INI_SCANNER_RAW;
+use const PATHINFO_EXTENSION;
+
/**
* IniFileLoader loads parameters from INI files.
*
* @author Fabien Potencier
*/
-class IniFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class IniFileLoader extends FileLoader
{
/**
* {@inheritdoc}
@@ -27,13 +42,13 @@ public function load($resource, $type = null)
$path = $this->locator->locate($resource);
$this->container->fileExists($path);
// first pass to catch parsing errors
- $result = \parse_ini_file($path, \true);
- if (\false === $result || [] === $result) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The "%s" file is not valid.', $resource));
+ $result = parse_ini_file($path, true);
+ if (false === $result || [] === $result) {
+ throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource));
}
// real raw parsing
- $result = \parse_ini_file($path, \true, \INI_SCANNER_RAW);
- if (isset($result['parameters']) && \is_array($result['parameters'])) {
+ $result = parse_ini_file($path, true, INI_SCANNER_RAW);
+ if (isset($result['parameters']) && is_array($result['parameters'])) {
foreach ($result['parameters'] as $key => $value) {
$this->container->setParameter($key, $this->phpize($value));
}
@@ -44,11 +59,11 @@ public function load($resource, $type = null)
*/
public function supports($resource, $type = null)
{
- if (!\is_string($resource)) {
- return \false;
+ if (!is_string($resource)) {
+ return false;
}
- if (null === $type && 'ini' === \pathinfo($resource, \PATHINFO_EXTENSION)) {
- return \true;
+ if (null === $type && 'ini' === pathinfo($resource, PATHINFO_EXTENSION)) {
+ return true;
}
return 'ini' === $type;
}
@@ -60,22 +75,22 @@ public function supports($resource, $type = null)
private function phpize($value)
{
// trim on the right as comments removal keep whitespaces
- if ($value !== ($v = \rtrim($value))) {
- $value = '""' === \substr_replace($v, '', 1, -1) ? \substr($v, 1, -1) : $v;
+ if ($value !== ($v = rtrim($value))) {
+ $value = '""' === substr_replace($v, '', 1, -1) ? substr($v, 1, -1) : $v;
}
- $lowercaseValue = \strtolower($value);
- switch (\true) {
- case \defined($value):
- return \constant($value);
+ $lowercaseValue = strtolower($value);
+ switch (true) {
+ case defined($value):
+ return constant($value);
case 'yes' === $lowercaseValue || 'on' === $lowercaseValue:
- return \true;
+ return true;
case 'no' === $lowercaseValue || 'off' === $lowercaseValue || 'none' === $lowercaseValue:
- return \false;
- case isset($value[1]) && ("'" === $value[0] && "'" === $value[\strlen($value) - 1] || '"' === $value[0] && '"' === $value[\strlen($value) - 1]):
+ return false;
+ case isset($value[1]) && ("'" === $value[0] && "'" === $value[strlen($value) - 1] || '"' === $value[0] && '"' === $value[strlen($value) - 1]):
// quoted string
- return \substr($value, 1, -1);
+ return substr($value, 1, -1);
default:
- return \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value);
+ return XmlUtils::phpize($value);
}
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php b/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
index d5ae7fb3a..078975621 100644
--- a/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
@@ -11,6 +11,12 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
+use Closure;
+use function dirname;
+use function is_string;
+use function pathinfo;
+use const PATHINFO_EXTENSION;
+
/**
* PhpFileLoader loads service definitions from a PHP file.
*
@@ -19,7 +25,7 @@
*
* @author Fabien Potencier
*/
-class PhpFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class PhpFileLoader extends FileLoader
{
/**
* {@inheritdoc}
@@ -30,15 +36,15 @@ public function load($resource, $type = null)
$container = $this->container;
$loader = $this;
$path = $this->locator->locate($resource);
- $this->setCurrentDir(\dirname($path));
+ $this->setCurrentDir(dirname($path));
$this->container->fileExists($path);
// the closure forbids access to the private scope in the included file
- $load = \Closure::bind(function ($path) use($container, $loader, $resource, $type) {
+ $load = Closure::bind(function ($path) use($container, $loader, $resource, $type) {
return include $path;
- }, $this, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\ProtectedPhpFileLoader::class);
+ }, $this, ProtectedPhpFileLoader::class);
$callback = $load($path);
- if ($callback instanceof \Closure) {
- $callback(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource), $this->container, $this);
+ if ($callback instanceof Closure) {
+ $callback(new ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource), $this->container, $this);
}
}
/**
@@ -46,11 +52,11 @@ public function load($resource, $type = null)
*/
public function supports($resource, $type = null)
{
- if (!\is_string($resource)) {
- return \false;
+ if (!is_string($resource)) {
+ return false;
}
- if (null === $type && 'php' === \pathinfo($resource, \PATHINFO_EXTENSION)) {
- return \true;
+ if (null === $type && 'php' === pathinfo($resource, PATHINFO_EXTENSION)) {
+ return true;
}
return 'php' === $type;
}
@@ -58,6 +64,6 @@ public function supports($resource, $type = null)
/**
* @internal
*/
-final class ProtectedPhpFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader
+final class ProtectedPhpFileLoader extends PhpFileLoader
{
}
diff --git a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php b/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php
index c0d4b2cec..6400a925a 100644
--- a/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php
@@ -23,12 +23,57 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
+use DOMDocument;
+use DOMElement;
+use DOMNode;
+use DOMXPath;
+use LogicException;
+use function array_filter;
+use function array_key_exists;
+use function array_keys;
+use function array_map;
+use function array_merge;
+use function array_pop;
+use function array_reverse;
+use function array_shift;
+use function class_exists;
+use function constant;
+use function copy;
+use function count;
+use function dirname;
+use function explode;
+use function get_class;
+use function implode;
+use function in_array;
+use function is_array;
+use function is_file;
+use function is_string;
+use function libxml_disable_entity_loader;
+use function pathinfo;
+use function preg_replace;
+use function preg_split;
+use function serialize;
+use function sprintf;
+use function str_replace;
+use function stripos;
+use function strpos;
+use function sys_get_temp_dir;
+use function tempnam;
+use function trigger_error;
+use function trim;
+use function uksort;
+use function unlink;
+use function unserialize;
+use const DIRECTORY_SEPARATOR;
+use const E_USER_DEPRECATED;
+use const PATHINFO_EXTENSION;
+
/**
* XmlFileLoader loads XML files service definitions.
*
* @author Fabien Potencier
*/
-class XmlFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class XmlFileLoader extends FileLoader
{
const NS = 'http://symfony.com/schema/dic/services';
/**
@@ -60,11 +105,11 @@ public function load($resource, $type = null)
*/
public function supports($resource, $type = null)
{
- if (!\is_string($resource)) {
- return \false;
+ if (!is_string($resource)) {
+ return false;
}
- if (null === $type && 'xml' === \pathinfo($resource, \PATHINFO_EXTENSION)) {
- return \true;
+ if (null === $type && 'xml' === pathinfo($resource, PATHINFO_EXTENSION)) {
+ return true;
}
return 'xml' === $type;
}
@@ -73,7 +118,7 @@ public function supports($resource, $type = null)
*
* @param string $file
*/
- private function parseParameters(\DOMDocument $xml, $file)
+ private function parseParameters(DOMDocument $xml, $file)
{
if ($parameters = $this->getChildren($xml->documentElement, 'parameters')) {
$this->container->getParameterBag()->add($this->getArgumentsAsPhp($parameters[0], 'parameter', $file));
@@ -84,17 +129,17 @@ private function parseParameters(\DOMDocument $xml, $file)
*
* @param string $file
*/
- private function parseImports(\DOMDocument $xml, $file)
+ private function parseImports(DOMDocument $xml, $file)
{
- $xpath = new \DOMXPath($xml);
+ $xpath = new DOMXPath($xml);
$xpath->registerNamespace('container', self::NS);
- if (\false === ($imports = $xpath->query('//container:imports/container:import'))) {
+ if (false === ($imports = $xpath->query('//container:imports/container:import'))) {
return;
}
- $defaultDirectory = \dirname($file);
+ $defaultDirectory = dirname($file);
foreach ($imports as $import) {
$this->setCurrentDir($defaultDirectory);
- $this->import($import->getAttribute('resource'), \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($import->getAttribute('type')) ?: null, (bool) \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($import->getAttribute('ignore-errors')), $file);
+ $this->import($import->getAttribute('resource'), XmlUtils::phpize($import->getAttribute('type')) ?: null, (bool) XmlUtils::phpize($import->getAttribute('ignore-errors')), $file);
}
}
/**
@@ -102,21 +147,21 @@ private function parseImports(\DOMDocument $xml, $file)
*
* @param string $file
*/
- private function parseDefinitions(\DOMDocument $xml, $file, $defaults)
+ private function parseDefinitions(DOMDocument $xml, $file, $defaults)
{
- $xpath = new \DOMXPath($xml);
+ $xpath = new DOMXPath($xml);
$xpath->registerNamespace('container', self::NS);
- if (\false === ($services = $xpath->query('//container:services/container:service|//container:services/container:prototype'))) {
+ if (false === ($services = $xpath->query('//container:services/container:service|//container:services/container:prototype'))) {
return;
}
- $this->setCurrentDir(\dirname($file));
+ $this->setCurrentDir(dirname($file));
$this->instanceof = [];
- $this->isLoadingInstanceof = \true;
+ $this->isLoadingInstanceof = true;
$instanceof = $xpath->query('//container:services/container:instanceof');
foreach ($instanceof as $service) {
$this->setDefinition((string) $service->getAttribute('id'), $this->parseDefinition($service, $file, []));
}
- $this->isLoadingInstanceof = \false;
+ $this->isLoadingInstanceof = false;
foreach ($services as $service) {
if (null !== ($definition = $this->parseDefinition($service, $file, $defaults))) {
if ('prototype' === $service->tagName) {
@@ -132,29 +177,29 @@ private function parseDefinitions(\DOMDocument $xml, $file, $defaults)
*
* @return array
*/
- private function getServiceDefaults(\DOMDocument $xml, $file)
+ private function getServiceDefaults(DOMDocument $xml, $file)
{
- $xpath = new \DOMXPath($xml);
+ $xpath = new DOMXPath($xml);
$xpath->registerNamespace('container', self::NS);
if (null === ($defaultsNode = $xpath->query('//container:services/container:defaults')->item(0))) {
return [];
}
- $defaults = ['tags' => $this->getChildren($defaultsNode, 'tag'), 'bind' => \array_map(function ($v) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument($v);
+ $defaults = ['tags' => $this->getChildren($defaultsNode, 'tag'), 'bind' => array_map(function ($v) {
+ return new BoundArgument($v);
}, $this->getArgumentsAsPhp($defaultsNode, 'bind', $file))];
foreach ($defaults['tags'] as $tag) {
if ('' === $tag->getAttribute('name')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The tag name for tag "" in "%s" must be a non-empty string.', $file));
+ throw new InvalidArgumentException(sprintf('The tag name for tag "" in "%s" must be a non-empty string.', $file));
}
}
if ($defaultsNode->hasAttribute('autowire')) {
- $defaults['autowire'] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($defaultsNode->getAttribute('autowire'));
+ $defaults['autowire'] = XmlUtils::phpize($defaultsNode->getAttribute('autowire'));
}
if ($defaultsNode->hasAttribute('public')) {
- $defaults['public'] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($defaultsNode->getAttribute('public'));
+ $defaults['public'] = XmlUtils::phpize($defaultsNode->getAttribute('public'));
}
if ($defaultsNode->hasAttribute('autoconfigure')) {
- $defaults['autoconfigure'] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($defaultsNode->getAttribute('autoconfigure'));
+ $defaults['autoconfigure'] = XmlUtils::phpize($defaultsNode->getAttribute('autoconfigure'));
}
return $defaults;
}
@@ -165,23 +210,23 @@ private function getServiceDefaults(\DOMDocument $xml, $file)
*
* @return Definition|null
*/
- private function parseDefinition(\DOMElement $service, $file, array $defaults)
+ private function parseDefinition(DOMElement $service, $file, array $defaults)
{
if ($alias = $service->getAttribute('alias')) {
$this->validateAlias($service, $file);
- $this->container->setAlias((string) $service->getAttribute('id'), $alias = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias($alias));
+ $this->container->setAlias((string) $service->getAttribute('id'), $alias = new Alias($alias));
if ($publicAttr = $service->getAttribute('public')) {
- $alias->setPublic(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($publicAttr));
+ $alias->setPublic(XmlUtils::phpize($publicAttr));
} elseif (isset($defaults['public'])) {
$alias->setPublic($defaults['public']);
}
return null;
}
if ($this->isLoadingInstanceof) {
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('');
+ $definition = new ChildDefinition('');
} elseif ($parent = $service->getAttribute('parent')) {
if (!empty($this->instanceof)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot use the "parent" option in the same file where "instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $service->getAttribute('id')));
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot use the "parent" option in the same file where "instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $service->getAttribute('id')));
}
foreach ($defaults as $k => $v) {
if ('tags' === $k) {
@@ -191,17 +236,17 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
}
if ('bind' === $k) {
if ($defaults['bind']) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Bound values on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file.', $service->getAttribute('id')));
+ throw new InvalidArgumentException(sprintf('Bound values on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file.', $service->getAttribute('id')));
}
continue;
}
if (!$service->hasAttribute($k)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Attribute "%s" on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $service->getAttribute('id')));
+ throw new InvalidArgumentException(sprintf('Attribute "%s" on service "%s" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $service->getAttribute('id')));
}
}
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition($parent);
+ $definition = new ChildDefinition($parent);
} else {
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $definition = new Definition();
if (isset($defaults['public'])) {
$definition->setPublic($defaults['public']);
}
@@ -216,26 +261,26 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
foreach (['class', 'public', 'shared', 'synthetic', 'lazy', 'abstract'] as $key) {
if ($value = $service->getAttribute($key)) {
$method = 'set' . $key;
- $definition->{$method}(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value));
+ $definition->{$method}(XmlUtils::phpize($value));
}
}
if ($value = $service->getAttribute('autowire')) {
- $definition->setAutowired(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value));
+ $definition->setAutowired(XmlUtils::phpize($value));
}
if ($value = $service->getAttribute('autoconfigure')) {
- if (!$definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
- $definition->setAutoconfigured(\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value));
- } elseif ($value = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($value)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting autoconfigure="false" for the service.', $service->getAttribute('id')));
+ if (!$definition instanceof ChildDefinition) {
+ $definition->setAutoconfigured(XmlUtils::phpize($value));
+ } elseif ($value = XmlUtils::phpize($value)) {
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting autoconfigure="false" for the service.', $service->getAttribute('id')));
}
}
if ($files = $this->getChildren($service, 'file')) {
$definition->setFile($files[0]->nodeValue);
}
if ($deprecated = $this->getChildren($service, 'deprecated')) {
- $definition->setDeprecated(\true, $deprecated[0]->nodeValue ?: null);
+ $definition->setDeprecated(true, $deprecated[0]->nodeValue ?: null);
}
- $definition->setArguments($this->getArgumentsAsPhp($service, 'argument', $file, $definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition));
+ $definition->setArguments($this->getArgumentsAsPhp($service, 'argument', $file, $definition instanceof ChildDefinition));
$definition->setProperties($this->getArgumentsAsPhp($service, 'property', $file));
if ($factories = $this->getChildren($service, 'factory')) {
$factory = $factories[0];
@@ -243,7 +288,7 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
$definition->setFactory($function);
} else {
if ($childService = $factory->getAttribute('service')) {
- $class = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($childService, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
+ $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
} else {
$class = $factory->hasAttribute('class') ? $factory->getAttribute('class') : null;
}
@@ -256,7 +301,7 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
$definition->setConfigurator($function);
} else {
if ($childService = $configurator->getAttribute('service')) {
- $class = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($childService, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
+ $class = new Reference($childService, ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE);
} else {
$class = $configurator->getAttribute('class');
}
@@ -268,7 +313,7 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
}
$tags = $this->getChildren($service, 'tag');
if (!empty($defaults['tags'])) {
- $tags = \array_merge($tags, $defaults['tags']);
+ $tags = array_merge($tags, $defaults['tags']);
}
foreach ($tags as $tag) {
$parameters = [];
@@ -276,14 +321,14 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
if ('name' === $name) {
continue;
}
- if (\false !== \strpos($name, '-') && \false === \strpos($name, '_') && !\array_key_exists($normalizedName = \str_replace('-', '_', $name), $parameters)) {
- $parameters[$normalizedName] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($node->nodeValue);
+ if (false !== strpos($name, '-') && false === strpos($name, '_') && !array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) {
+ $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue);
}
// keep not normalized key
- $parameters[$name] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($node->nodeValue);
+ $parameters[$name] = XmlUtils::phpize($node->nodeValue);
}
if ('' === $tag->getAttribute('name')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', (string) $service->getAttribute('id'), $file));
+ throw new InvalidArgumentException(sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', (string) $service->getAttribute('id'), $file));
}
$definition->addTag($tag->getAttribute('name'), $parameters);
}
@@ -293,7 +338,7 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
$bindings = $this->getArgumentsAsPhp($service, 'bind', $file);
if (isset($defaults['bind'])) {
// deep clone, to avoid multiple process of the same instance in the passes
- $bindings = \array_merge(\unserialize(\serialize($defaults['bind'])), $bindings);
+ $bindings = array_merge(unserialize(serialize($defaults['bind'])), $bindings);
}
if ($bindings) {
$definition->setBindings($bindings);
@@ -310,16 +355,16 @@ private function parseDefinition(\DOMElement $service, $file, array $defaults)
*
* @param string $file Path to a file
*
- * @return \DOMDocument
+ * @return DOMDocument
*
* @throws InvalidArgumentException When loading of XML file returns error
*/
private function parseFileToDOM($file)
{
try {
- $dom = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::loadFile($file, [$this, 'validateSchema']);
+ $dom = XmlUtils::loadFile($file, [$this, 'validateSchema']);
} catch (\InvalidArgumentException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Unable to parse file "%s": "%s".', $file, $e->getMessage()), $e->getCode(), $e);
+ throw new InvalidArgumentException(sprintf('Unable to parse file "%s": "%s".', $file, $e->getMessage()), $e->getCode(), $e);
}
$this->validateExtensions($dom, $file);
return $dom;
@@ -330,22 +375,22 @@ private function parseFileToDOM($file)
* @param string $file
* @param array $defaults
*/
- private function processAnonymousServices(\DOMDocument $xml, $file, $defaults)
+ private function processAnonymousServices(DOMDocument $xml, $file, $defaults)
{
$definitions = [];
$count = 0;
- $suffix = '~' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::hash($file);
- $xpath = new \DOMXPath($xml);
+ $suffix = '~' . ContainerBuilder::hash($file);
+ $xpath = new DOMXPath($xml);
$xpath->registerNamespace('container', self::NS);
// anonymous services as arguments/properties
- if (\false !== ($nodes = $xpath->query('//container:argument[@type="service"][not(@id)]|//container:property[@type="service"][not(@id)]|//container:bind[not(@id)]|//container:factory[not(@service)]|//container:configurator[not(@service)]'))) {
+ if (false !== ($nodes = $xpath->query('//container:argument[@type="service"][not(@id)]|//container:property[@type="service"][not(@id)]|//container:bind[not(@id)]|//container:factory[not(@service)]|//container:configurator[not(@service)]'))) {
foreach ($nodes as $node) {
if ($services = $this->getChildren($node, 'service')) {
// give it a unique name
- $id = \sprintf('%d_%s', ++$count, \preg_replace('/^.*\\\\/', '', $services[0]->getAttribute('class')) . $suffix);
+ $id = sprintf('%d_%s', ++$count, preg_replace('/^.*\\\\/', '', $services[0]->getAttribute('class')) . $suffix);
$node->setAttribute('id', $id);
$node->setAttribute('service', $id);
- $definitions[$id] = [$services[0], $file, \false];
+ $definitions[$id] = [$services[0], $file, false];
$services[0]->setAttribute('id', $id);
// anonymous services are always private
// we could not use the constant false here, because of XML parsing
@@ -354,23 +399,23 @@ private function processAnonymousServices(\DOMDocument $xml, $file, $defaults)
}
}
// anonymous services "in the wild"
- if (\false !== ($nodes = $xpath->query('//container:services/container:service[not(@id)]'))) {
+ if (false !== ($nodes = $xpath->query('//container:services/container:service[not(@id)]'))) {
foreach ($nodes as $node) {
- @\trigger_error(\sprintf('Top-level anonymous services are deprecated since Symfony 3.4, the "id" attribute will be required in version 4.0 in %s at line %d.', $file, $node->getLineNo()), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Top-level anonymous services are deprecated since Symfony 3.4, the "id" attribute will be required in version 4.0 in %s at line %d.', $file, $node->getLineNo()), E_USER_DEPRECATED);
// give it a unique name
- $id = \sprintf('%d_%s', ++$count, \preg_replace('/^.*\\\\/', '', $node->getAttribute('class')) . $suffix);
+ $id = sprintf('%d_%s', ++$count, preg_replace('/^.*\\\\/', '', $node->getAttribute('class')) . $suffix);
$node->setAttribute('id', $id);
- $definitions[$id] = [$node, $file, \true];
+ $definitions[$id] = [$node, $file, true];
}
}
// resolve definitions
- \uksort($definitions, 'strnatcmp');
- foreach (\array_reverse($definitions) as $id => list($domElement, $file, $wild)) {
+ uksort($definitions, 'strnatcmp');
+ foreach (array_reverse($definitions) as $id => [$domElement, $file, $wild]) {
if (null !== ($definition = $this->parseDefinition($domElement, $file, $wild ? $defaults : []))) {
$this->setDefinition($id, $definition);
}
- if (\true === $wild) {
- $tmpDomElement = new \DOMElement('_services', null, self::NS);
+ if (true === $wild) {
+ $tmpDomElement = new DOMElement('_services', null, self::NS);
$domElement->parentNode->replaceChild($tmpDomElement, $domElement);
$tmpDomElement->setAttribute('id', $id);
}
@@ -384,7 +429,7 @@ private function processAnonymousServices(\DOMDocument $xml, $file, $defaults)
*
* @return mixed
*/
- private function getArgumentsAsPhp(\DOMElement $node, $name, $file, $isChildDefinition = \false)
+ private function getArgumentsAsPhp(DOMElement $node, $name, $file, $isChildDefinition = false)
{
$arguments = [];
foreach ($this->getChildren($node, $name) as $arg) {
@@ -398,35 +443,35 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $file, $isChildDefi
} elseif (!$arg->hasAttribute('key')) {
// Append an empty argument, then fetch its key to overwrite it later
$arguments[] = null;
- $keys = \array_keys($arguments);
- $key = \array_pop($keys);
+ $keys = array_keys($arguments);
+ $key = array_pop($keys);
} else {
$key = $arg->getAttribute('key');
}
$onInvalid = $arg->getAttribute('on-invalid');
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
+ $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
if ('ignore' == $onInvalid) {
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
+ $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
} elseif ('ignore_uninitialized' == $onInvalid) {
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
+ $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
} elseif ('null' == $onInvalid) {
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE;
+ $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE;
}
switch ($arg->getAttribute('type')) {
case 'service':
if ('' === $arg->getAttribute('id')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file));
+ throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="service" has no or empty "id" attribute in "%s".', $name, $file));
}
if ($arg->hasAttribute('strict')) {
- @\trigger_error(\sprintf('The "strict" attribute used when referencing the "%s" service is deprecated since Symfony 3.3 and will be removed in 4.0.', $arg->getAttribute('id')), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The "strict" attribute used when referencing the "%s" service is deprecated since Symfony 3.3 and will be removed in 4.0.', $arg->getAttribute('id')), E_USER_DEPRECATED);
}
- $arguments[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($arg->getAttribute('id'), $invalidBehavior);
+ $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior);
break;
case 'expression':
- if (!\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression::class)) {
- throw new \LogicException(\sprintf('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
+ if (!class_exists(Expression::class)) {
+ throw new LogicException(sprintf('The type="expression" attribute cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
}
- $arguments[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression($arg->nodeValue);
+ $arguments[$key] = new Expression($arg->nodeValue);
break;
case 'collection':
$arguments[$key] = $this->getArgumentsAsPhp($arg, $name, $file);
@@ -434,25 +479,25 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $file, $isChildDefi
case 'iterator':
$arg = $this->getArgumentsAsPhp($arg, $name, $file);
try {
- $arguments[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument($arg);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Tag "<%s>" with type="iterator" only accepts collections of type="service" references in "%s".', $name, $file));
+ $arguments[$key] = new IteratorArgument($arg);
+ } catch (InvalidArgumentException $e) {
+ throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="iterator" only accepts collections of type="service" references in "%s".', $name, $file));
}
break;
case 'tagged':
if (!$arg->getAttribute('tag')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Tag "<%s>" with type="tagged" has no or empty "tag" attribute in "%s".', $name, $file));
+ throw new InvalidArgumentException(sprintf('Tag "<%s>" with type="tagged" has no or empty "tag" attribute in "%s".', $name, $file));
}
- $arguments[$key] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument($arg->getAttribute('tag'));
+ $arguments[$key] = new TaggedIteratorArgument($arg->getAttribute('tag'));
break;
case 'string':
$arguments[$key] = $arg->nodeValue;
break;
case 'constant':
- $arguments[$key] = \constant(\trim($arg->nodeValue));
+ $arguments[$key] = constant(trim($arg->nodeValue));
break;
default:
- $arguments[$key] = \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::phpize($arg->nodeValue);
+ $arguments[$key] = XmlUtils::phpize($arg->nodeValue);
}
}
return $arguments;
@@ -462,13 +507,13 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $file, $isChildDefi
*
* @param mixed $name
*
- * @return \DOMElement[]
+ * @return DOMElement[]
*/
- private function getChildren(\DOMNode $node, $name)
+ private function getChildren(DOMNode $node, $name)
{
$children = [];
foreach ($node->childNodes as $child) {
- if ($child instanceof \DOMElement && $child->localName === $name && self::NS === $child->namespaceURI) {
+ if ($child instanceof DOMElement && $child->localName === $name && self::NS === $child->namespaceURI) {
$children[] = $child;
}
}
@@ -481,20 +526,20 @@ private function getChildren(\DOMNode $node, $name)
*
* @throws RuntimeException When extension references a non-existent XSD file
*/
- public function validateSchema(\DOMDocument $dom)
+ public function validateSchema(DOMDocument $dom)
{
- $schemaLocations = ['http://symfony.com/schema/dic/services' => \str_replace('\\', '/', __DIR__ . '/schema/dic/services/services-1.0.xsd')];
+ $schemaLocations = ['http://symfony.com/schema/dic/services' => str_replace('\\', '/', __DIR__ . '/schema/dic/services/services-1.0.xsd')];
if ($element = $dom->documentElement->getAttributeNS('http://www.w3.org/2001/XMLSchema-instance', 'schemaLocation')) {
- $items = \preg_split('/\\s+/', $element);
- for ($i = 0, $nb = \count($items); $i < $nb; $i += 2) {
+ $items = preg_split('/\\s+/', $element);
+ for ($i = 0, $nb = count($items); $i < $nb; $i += 2) {
if (!$this->container->hasExtension($items[$i])) {
continue;
}
- if (($extension = $this->container->getExtension($items[$i])) && \false !== $extension->getXsdValidationBasePath()) {
+ if (($extension = $this->container->getExtension($items[$i])) && false !== $extension->getXsdValidationBasePath()) {
$ns = $extension->getNamespace();
- $path = \str_replace([$ns, \str_replace('http://', 'https://', $ns)], \str_replace('\\', '/', $extension->getXsdValidationBasePath()) . '/', $items[$i + 1]);
- if (!\is_file($path)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('Extension "%s" references a non-existent XSD file "%s".', \get_class($extension), $path));
+ $path = str_replace([$ns, str_replace('http://', 'https://', $ns)], str_replace('\\', '/', $extension->getXsdValidationBasePath()) . '/', $items[$i + 1]);
+ if (!is_file($path)) {
+ throw new RuntimeException(sprintf('Extension "%s" references a non-existent XSD file "%s".', get_class($extension), $path));
}
$schemaLocations[$items[$i]] = $path;
}
@@ -503,22 +548,22 @@ public function validateSchema(\DOMDocument $dom)
$tmpfiles = [];
$imports = '';
foreach ($schemaLocations as $namespace => $location) {
- $parts = \explode('/', $location);
+ $parts = explode('/', $location);
$locationstart = 'file:///';
- if (0 === \stripos($location, 'phar://')) {
- $tmpfile = \tempnam(\sys_get_temp_dir(), 'symfony');
+ if (0 === stripos($location, 'phar://')) {
+ $tmpfile = tempnam(sys_get_temp_dir(), 'symfony');
if ($tmpfile) {
- \copy($location, $tmpfile);
+ copy($location, $tmpfile);
$tmpfiles[] = $tmpfile;
- $parts = \explode('/', \str_replace('\\', '/', $tmpfile));
+ $parts = explode('/', str_replace('\\', '/', $tmpfile));
} else {
- \array_shift($parts);
+ array_shift($parts);
$locationstart = 'phar:///';
}
}
- $drive = '\\' === \DIRECTORY_SEPARATOR ? \array_shift($parts) . '/' : '';
- $location = $locationstart . $drive . \implode('/', \array_map('rawurlencode', $parts));
- $imports .= \sprintf(' ' . "\n", $namespace, $location);
+ $drive = '\\' === DIRECTORY_SEPARATOR ? array_shift($parts) . '/' : '';
+ $location = $locationstart . $drive . implode('/', array_map('rawurlencode', $parts));
+ $imports .= sprintf(' ' . "\n", $namespace, $location);
}
$source = <<
@@ -531,11 +576,11 @@ public function validateSchema(\DOMDocument $dom)
{$imports}
EOF;
- $disableEntities = \libxml_disable_entity_loader(\false);
+ $disableEntities = libxml_disable_entity_loader(false);
$valid = @$dom->schemaValidateSource($source);
- \libxml_disable_entity_loader($disableEntities);
+ libxml_disable_entity_loader($disableEntities);
foreach ($tmpfiles as $tmpfile) {
- @\unlink($tmpfile);
+ @unlink($tmpfile);
}
return $valid;
}
@@ -544,16 +589,16 @@ public function validateSchema(\DOMDocument $dom)
*
* @param string $file
*/
- private function validateAlias(\DOMElement $alias, $file)
+ private function validateAlias(DOMElement $alias, $file)
{
foreach ($alias->attributes as $name => $node) {
- if (!\in_array($name, ['alias', 'id', 'public'])) {
- @\trigger_error(\sprintf('Using the attribute "%s" is deprecated for the service "%s" which is defined as an alias in "%s". Allowed attributes for service aliases are "alias", "id" and "public". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $name, $alias->getAttribute('id'), $file), \E_USER_DEPRECATED);
+ if (!in_array($name, ['alias', 'id', 'public'])) {
+ @trigger_error(sprintf('Using the attribute "%s" is deprecated for the service "%s" which is defined as an alias in "%s". Allowed attributes for service aliases are "alias", "id" and "public". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $name, $alias->getAttribute('id'), $file), E_USER_DEPRECATED);
}
}
foreach ($alias->childNodes as $child) {
- if ($child instanceof \DOMElement && self::NS === $child->namespaceURI) {
- @\trigger_error(\sprintf('Using the element "%s" is deprecated for the service "%s" which is defined as an alias in "%s". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported elements.', $child->localName, $alias->getAttribute('id'), $file), \E_USER_DEPRECATED);
+ if ($child instanceof DOMElement && self::NS === $child->namespaceURI) {
+ @trigger_error(sprintf('Using the element "%s" is deprecated for the service "%s" which is defined as an alias in "%s". The XmlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported elements.', $child->localName, $alias->getAttribute('id'), $file), E_USER_DEPRECATED);
}
}
}
@@ -564,32 +609,32 @@ private function validateAlias(\DOMElement $alias, $file)
*
* @throws InvalidArgumentException When no extension is found corresponding to a tag
*/
- private function validateExtensions(\DOMDocument $dom, $file)
+ private function validateExtensions(DOMDocument $dom, $file)
{
foreach ($dom->documentElement->childNodes as $node) {
- if (!$node instanceof \DOMElement || 'http://symfony.com/schema/dic/services' === $node->namespaceURI) {
+ if (!$node instanceof DOMElement || 'http://symfony.com/schema/dic/services' === $node->namespaceURI) {
continue;
}
// can it be handled by an extension?
if (!$this->container->hasExtension($node->namespaceURI)) {
- $extensionNamespaces = \array_filter(\array_map(function ($ext) {
+ $extensionNamespaces = array_filter(array_map(function ($ext) {
return $ext->getNamespace();
}, $this->container->getExtensions()));
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $node->tagName, $file, $node->namespaceURI, $extensionNamespaces ? \sprintf('"%s"', \implode('", "', $extensionNamespaces)) : 'none'));
+ throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $node->tagName, $file, $node->namespaceURI, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none'));
}
}
}
/**
* Loads from an extension.
*/
- private function loadFromExtensions(\DOMDocument $xml)
+ private function loadFromExtensions(DOMDocument $xml)
{
foreach ($xml->documentElement->childNodes as $node) {
- if (!$node instanceof \DOMElement || self::NS === $node->namespaceURI) {
+ if (!$node instanceof DOMElement || self::NS === $node->namespaceURI) {
continue;
}
$values = static::convertDomElementToArray($node);
- if (!\is_array($values)) {
+ if (!is_array($values)) {
$values = [];
}
$this->container->loadFromExtension($node->namespaceURI, $values);
@@ -610,12 +655,12 @@ private function loadFromExtensions(\DOMDocument $xml)
*
* * The nested-tags are converted to keys (bar)
*
- * @param \DOMElement $element A \DOMElement instance
+ * @param DOMElement $element A \DOMElement instance
*
* @return mixed
*/
- public static function convertDomElementToArray(\DOMElement $element)
+ public static function convertDomElementToArray(DOMElement $element)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Util\XmlUtils::convertDomElementToArray($element);
+ return XmlUtils::convertDomElementToArray($element);
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php
index 4a1e5e8f6..4c40b997a 100644
--- a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php
+++ b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php
@@ -27,12 +27,42 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Parser as YamlParser;
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Tag\TaggedValue;
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml;
+use LogicException;
+use function array_filter;
+use function array_key_exists;
+use function array_map;
+use function array_merge;
+use function class_exists;
+use function dirname;
+use function explode;
+use function file_exists;
+use function gettype;
+use function implode;
+use function in_array;
+use function is_array;
+use function is_scalar;
+use function is_string;
+use function pathinfo;
+use function preg_match;
+use function preg_replace;
+use function restore_error_handler;
+use function serialize;
+use function set_error_handler;
+use function sprintf;
+use function stream_is_local;
+use function strpos;
+use function substr;
+use function trigger_error;
+use function unserialize;
+use const E_USER_DEPRECATED;
+use const PATHINFO_EXTENSION;
+
/**
* YamlFileLoader loads YAML files service definitions.
*
* @author Fabien Potencier
*/
-class YamlFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class YamlFileLoader extends FileLoader
{
private static $serviceKeywords = ['alias' => 'alias', 'parent' => 'parent', 'class' => 'class', 'shared' => 'shared', 'synthetic' => 'synthetic', 'lazy' => 'lazy', 'public' => 'public', 'abstract' => 'abstract', 'deprecated' => 'deprecated', 'factory' => 'factory', 'file' => 'file', 'arguments' => 'arguments', 'properties' => 'properties', 'configurator' => 'configurator', 'calls' => 'calls', 'tags' => 'tags', 'decorates' => 'decorates', 'decoration_inner_name' => 'decoration_inner_name', 'decoration_priority' => 'decoration_priority', 'autowire' => 'autowire', 'autowiring_types' => 'autowiring_types', 'autoconfigure' => 'autoconfigure', 'bind' => 'bind'];
private static $prototypeKeywords = ['resource' => 'resource', 'namespace' => 'namespace', 'exclude' => 'exclude', 'parent' => 'parent', 'shared' => 'shared', 'lazy' => 'lazy', 'public' => 'public', 'abstract' => 'abstract', 'deprecated' => 'deprecated', 'factory' => 'factory', 'arguments' => 'arguments', 'properties' => 'properties', 'configurator' => 'configurator', 'calls' => 'calls', 'tags' => 'tags', 'autowire' => 'autowire', 'autoconfigure' => 'autoconfigure', 'bind' => 'bind'];
@@ -57,19 +87,19 @@ public function load($resource, $type = null)
$this->parseImports($content, $path);
// parameters
if (isset($content['parameters'])) {
- if (!\is_array($content['parameters'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The "parameters" key should contain an array in "%s". Check your YAML syntax.', $path));
+ if (!is_array($content['parameters'])) {
+ throw new InvalidArgumentException(sprintf('The "parameters" key should contain an array in "%s". Check your YAML syntax.', $path));
}
foreach ($content['parameters'] as $key => $value) {
- $this->container->setParameter($key, $this->resolveServices($value, $path, \true));
+ $this->container->setParameter($key, $this->resolveServices($value, $path, true));
}
}
// extensions
$this->loadFromExtensions($content);
// services
$this->anonymousServicesCount = 0;
- $this->anonymousServicesSuffix = '~' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::hash($path);
- $this->setCurrentDir(\dirname($path));
+ $this->anonymousServicesSuffix = '~' . ContainerBuilder::hash($path);
+ $this->setCurrentDir(dirname($path));
try {
$this->parseDefinitions($content, $path);
} finally {
@@ -81,13 +111,13 @@ public function load($resource, $type = null)
*/
public function supports($resource, $type = null)
{
- if (!\is_string($resource)) {
- return \false;
+ if (!is_string($resource)) {
+ return false;
}
- if (null === $type && \in_array(\pathinfo($resource, \PATHINFO_EXTENSION), ['yaml', 'yml'], \true)) {
- return \true;
+ if (null === $type && in_array(pathinfo($resource, PATHINFO_EXTENSION), ['yaml', 'yml'], true)) {
+ return true;
}
- return \in_array($type, ['yaml', 'yml'], \true);
+ return in_array($type, ['yaml', 'yml'], true);
}
/**
* Parses all imports.
@@ -99,19 +129,19 @@ private function parseImports(array $content, $file)
if (!isset($content['imports'])) {
return;
}
- if (!\is_array($content['imports'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The "imports" key should contain an array in "%s". Check your YAML syntax.', $file));
+ if (!is_array($content['imports'])) {
+ throw new InvalidArgumentException(sprintf('The "imports" key should contain an array in "%s". Check your YAML syntax.', $file));
}
- $defaultDirectory = \dirname($file);
+ $defaultDirectory = dirname($file);
foreach ($content['imports'] as $import) {
- if (!\is_array($import)) {
+ if (!is_array($import)) {
$import = ['resource' => $import];
}
if (!isset($import['resource'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('An import should provide a resource in "%s". Check your YAML syntax.', $file));
+ throw new InvalidArgumentException(sprintf('An import should provide a resource in "%s". Check your YAML syntax.', $file));
}
$this->setCurrentDir($defaultDirectory);
- $this->import($import['resource'], isset($import['type']) ? $import['type'] : null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : \false, $file);
+ $this->import($import['resource'], isset($import['type']) ? $import['type'] : null, isset($import['ignore_errors']) ? (bool) $import['ignore_errors'] : false, $file);
}
}
/**
@@ -124,28 +154,28 @@ private function parseDefinitions(array $content, $file)
if (!isset($content['services'])) {
return;
}
- if (!\is_array($content['services'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The "services" key should contain an array in "%s". Check your YAML syntax.', $file));
+ if (!is_array($content['services'])) {
+ throw new InvalidArgumentException(sprintf('The "services" key should contain an array in "%s". Check your YAML syntax.', $file));
}
- if (\array_key_exists('_instanceof', $content['services'])) {
+ if (array_key_exists('_instanceof', $content['services'])) {
$instanceof = $content['services']['_instanceof'];
unset($content['services']['_instanceof']);
- if (!\is_array($instanceof)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".', \gettype($instanceof), $file));
+ if (!is_array($instanceof)) {
+ throw new InvalidArgumentException(sprintf('Service "_instanceof" key must be an array, "%s" given in "%s".', gettype($instanceof), $file));
}
$this->instanceof = [];
- $this->isLoadingInstanceof = \true;
+ $this->isLoadingInstanceof = true;
foreach ($instanceof as $id => $service) {
- if (!$service || !\is_array($service)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in "%s". Check your YAML syntax.', $id, $file));
+ if (!$service || !is_array($service)) {
+ throw new InvalidArgumentException(sprintf('Type definition "%s" must be a non-empty array within "_instanceof" in "%s". Check your YAML syntax.', $id, $file));
}
- if (\is_string($service) && 0 === \strpos($service, '@')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Type definition "%s" cannot be an alias within "_instanceof" in "%s". Check your YAML syntax.', $id, $file));
+ if (is_string($service) && 0 === strpos($service, '@')) {
+ throw new InvalidArgumentException(sprintf('Type definition "%s" cannot be an alias within "_instanceof" in "%s". Check your YAML syntax.', $id, $file));
}
$this->parseDefinition($id, $service, $file, []);
}
}
- $this->isLoadingInstanceof = \false;
+ $this->isLoadingInstanceof = false;
$defaults = $this->parseDefaults($content, $file);
foreach ($content['services'] as $id => $service) {
$this->parseDefinition($id, $service, $file, $defaults);
@@ -160,48 +190,48 @@ private function parseDefinitions(array $content, $file)
*/
private function parseDefaults(array &$content, $file)
{
- if (!\array_key_exists('_defaults', $content['services'])) {
+ if (!array_key_exists('_defaults', $content['services'])) {
return [];
}
$defaults = $content['services']['_defaults'];
unset($content['services']['_defaults']);
- if (!\is_array($defaults)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Service "_defaults" key must be an array, "%s" given in "%s".', \gettype($defaults), $file));
+ if (!is_array($defaults)) {
+ throw new InvalidArgumentException(sprintf('Service "_defaults" key must be an array, "%s" given in "%s".', gettype($defaults), $file));
}
foreach ($defaults as $key => $default) {
if (!isset(self::$defaultsKeywords[$key])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The configuration key "%s" cannot be used to define a default value in "%s". Allowed keys are "%s".', $key, $file, \implode('", "', self::$defaultsKeywords)));
+ throw new InvalidArgumentException(sprintf('The configuration key "%s" cannot be used to define a default value in "%s". Allowed keys are "%s".', $key, $file, implode('", "', self::$defaultsKeywords)));
}
}
if (isset($defaults['tags'])) {
- if (!\is_array($tags = $defaults['tags'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "tags" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file));
+ if (!is_array($tags = $defaults['tags'])) {
+ throw new InvalidArgumentException(sprintf('Parameter "tags" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file));
}
foreach ($tags as $tag) {
- if (!\is_array($tag)) {
+ if (!is_array($tag)) {
$tag = ['name' => $tag];
}
if (!isset($tag['name'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A "tags" entry in "_defaults" is missing a "name" key in "%s".', $file));
+ throw new InvalidArgumentException(sprintf('A "tags" entry in "_defaults" is missing a "name" key in "%s".', $file));
}
$name = $tag['name'];
unset($tag['name']);
- if (!\is_string($name) || '' === $name) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The tag name in "_defaults" must be a non-empty string in "%s".', $file));
+ if (!is_string($name) || '' === $name) {
+ throw new InvalidArgumentException(sprintf('The tag name in "_defaults" must be a non-empty string in "%s".', $file));
}
foreach ($tag as $attribute => $value) {
- if (!\is_scalar($value) && null !== $value) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in "%s". Check your YAML syntax.', $name, $attribute, $file));
+ if (!is_scalar($value) && null !== $value) {
+ throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type in "%s". Check your YAML syntax.', $name, $attribute, $file));
}
}
}
}
if (isset($defaults['bind'])) {
- if (!\is_array($defaults['bind'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "bind" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file));
+ if (!is_array($defaults['bind'])) {
+ throw new InvalidArgumentException(sprintf('Parameter "bind" in "_defaults" must be an array in "%s". Check your YAML syntax.', $file));
}
- $defaults['bind'] = \array_map(function ($v) {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument($v);
+ $defaults['bind'] = array_map(function ($v) {
+ return new BoundArgument($v);
}, $this->resolveServices($defaults['bind'], $file));
}
return $defaults;
@@ -212,11 +242,11 @@ private function parseDefaults(array &$content, $file)
private function isUsingShortSyntax(array $service)
{
foreach ($service as $key => $value) {
- if (\is_string($key) && ('' === $key || '$' !== $key[0])) {
- return \false;
+ if (is_string($key) && ('' === $key || '$' !== $key[0])) {
+ return false;
}
}
- return \true;
+ return true;
}
/**
* Parses a definition.
@@ -229,45 +259,45 @@ private function isUsingShortSyntax(array $service)
*/
private function parseDefinition($id, $service, $file, array $defaults)
{
- if (\preg_match('/^_[a-zA-Z0-9_]*$/', $id)) {
- @\trigger_error(\sprintf('Service names that start with an underscore are deprecated since Symfony 3.3 and will be reserved in 4.0. Rename the "%s" service or define it in XML instead.', $id), \E_USER_DEPRECATED);
+ if (preg_match('/^_[a-zA-Z0-9_]*$/', $id)) {
+ @trigger_error(sprintf('Service names that start with an underscore are deprecated since Symfony 3.3 and will be reserved in 4.0. Rename the "%s" service or define it in XML instead.', $id), E_USER_DEPRECATED);
}
- if (\is_string($service) && 0 === \strpos($service, '@')) {
- $this->container->setAlias($id, $alias = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias(\substr($service, 1)));
+ if (is_string($service) && 0 === strpos($service, '@')) {
+ $this->container->setAlias($id, $alias = new Alias(substr($service, 1)));
if (isset($defaults['public'])) {
$alias->setPublic($defaults['public']);
}
return;
}
- if (\is_array($service) && $this->isUsingShortSyntax($service)) {
+ if (is_array($service) && $this->isUsingShortSyntax($service)) {
$service = ['arguments' => $service];
}
if (null === $service) {
$service = [];
}
- if (!\is_array($service)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A service definition must be an array or a string starting with "@" but "%s" found for service "%s" in "%s". Check your YAML syntax.', \gettype($service), $id, $file));
+ if (!is_array($service)) {
+ throw new InvalidArgumentException(sprintf('A service definition must be an array or a string starting with "@" but "%s" found for service "%s" in "%s". Check your YAML syntax.', gettype($service), $id, $file));
}
$this->checkDefinition($id, $service, $file);
if (isset($service['alias'])) {
- $this->container->setAlias($id, $alias = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias($service['alias']));
- if (\array_key_exists('public', $service)) {
+ $this->container->setAlias($id, $alias = new Alias($service['alias']));
+ if (array_key_exists('public', $service)) {
$alias->setPublic($service['public']);
} elseif (isset($defaults['public'])) {
$alias->setPublic($defaults['public']);
}
foreach ($service as $key => $value) {
- if (!\in_array($key, ['alias', 'public'])) {
- @\trigger_error(\sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias" and "public". The YamlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $key, $id, $file), \E_USER_DEPRECATED);
+ if (!in_array($key, ['alias', 'public'])) {
+ @trigger_error(sprintf('The configuration key "%s" is unsupported for the service "%s" which is defined as an alias in "%s". Allowed configuration keys for service aliases are "alias" and "public". The YamlFileLoader will raise an exception in Symfony 4.0, instead of silently ignoring unsupported attributes.', $key, $id, $file), E_USER_DEPRECATED);
}
}
return;
}
if ($this->isLoadingInstanceof) {
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('');
+ $definition = new ChildDefinition('');
} elseif (isset($service['parent'])) {
if (!empty($this->instanceof)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot use the "parent" option in the same file where "_instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $id));
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot use the "parent" option in the same file where "_instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.', $id));
}
foreach ($defaults as $k => $v) {
if ('tags' === $k) {
@@ -276,15 +306,15 @@ private function parseDefinition($id, $service, $file, array $defaults)
continue;
}
if ('bind' === $k) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Attribute "bind" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file.', $id));
+ throw new InvalidArgumentException(sprintf('Attribute "bind" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file.', $id));
}
if (!isset($service[$k])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Attribute "%s" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $id));
+ throw new InvalidArgumentException(sprintf('Attribute "%s" on service "%s" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.', $k, $id));
}
}
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition($service['parent']);
+ $definition = new ChildDefinition($service['parent']);
} else {
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $definition = new Definition();
if (isset($defaults['public'])) {
$definition->setPublic($defaults['public']);
}
@@ -314,8 +344,8 @@ private function parseDefinition($id, $service, $file, array $defaults)
if (isset($service['abstract'])) {
$definition->setAbstract($service['abstract']);
}
- if (\array_key_exists('deprecated', $service)) {
- $definition->setDeprecated(\true, $service['deprecated']);
+ if (array_key_exists('deprecated', $service)) {
+ $definition->setDeprecated(true, $service['deprecated']);
}
if (isset($service['factory'])) {
$definition->setFactory($this->parseCallable($service['factory'], 'factory', $id, $file));
@@ -333,8 +363,8 @@ private function parseDefinition($id, $service, $file, array $defaults)
$definition->setConfigurator($this->parseCallable($service['configurator'], 'configurator', $id, $file));
}
if (isset($service['calls'])) {
- if (!\is_array($service['calls'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "calls" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (!is_array($service['calls'])) {
+ throw new InvalidArgumentException(sprintf('Parameter "calls" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
foreach ($service['calls'] as $call) {
if (isset($call['method'])) {
@@ -344,41 +374,41 @@ private function parseDefinition($id, $service, $file, array $defaults)
$method = $call[0];
$args = isset($call[1]) ? $this->resolveServices($call[1], $file) : [];
}
- if (!\is_array($args)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in "%s". Check your YAML syntax.', $method, $id, $file));
+ if (!is_array($args)) {
+ throw new InvalidArgumentException(sprintf('The second parameter for function call "%s" must be an array of its arguments for service "%s" in "%s". Check your YAML syntax.', $method, $id, $file));
}
$definition->addMethodCall($method, $args);
}
}
$tags = isset($service['tags']) ? $service['tags'] : [];
- if (!\is_array($tags)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "tags" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (!is_array($tags)) {
+ throw new InvalidArgumentException(sprintf('Parameter "tags" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
if (isset($defaults['tags'])) {
- $tags = \array_merge($tags, $defaults['tags']);
+ $tags = array_merge($tags, $defaults['tags']);
}
foreach ($tags as $tag) {
- if (!\is_array($tag)) {
+ if (!is_array($tag)) {
$tag = ['name' => $tag];
}
if (!isset($tag['name'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A "tags" entry is missing a "name" key for service "%s" in "%s".', $id, $file));
+ throw new InvalidArgumentException(sprintf('A "tags" entry is missing a "name" key for service "%s" in "%s".', $id, $file));
}
$name = $tag['name'];
unset($tag['name']);
- if (!\is_string($name) || '' === $name) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', $id, $file));
+ if (!is_string($name) || '' === $name) {
+ throw new InvalidArgumentException(sprintf('The tag name for service "%s" in "%s" must be a non-empty string.', $id, $file));
}
foreach ($tag as $attribute => $value) {
- if (!\is_scalar($value) && null !== $value) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in "%s". Check your YAML syntax.', $id, $name, $attribute, $file));
+ if (!is_scalar($value) && null !== $value) {
+ throw new InvalidArgumentException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s" in "%s". Check your YAML syntax.', $id, $name, $attribute, $file));
}
}
$definition->addTag($name, $tag);
}
if (isset($service['decorates'])) {
if ('' !== $service['decorates'] && '@' === $service['decorates'][0]) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], \substr($service['decorates'], 1)));
+ throw new InvalidArgumentException(sprintf('The value of the "decorates" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $id, $service['decorates'], substr($service['decorates'], 1)));
}
$renameId = isset($service['decoration_inner_name']) ? $service['decoration_inner_name'] : null;
$priority = isset($service['decoration_priority']) ? $service['decoration_priority'] : 0;
@@ -388,15 +418,15 @@ private function parseDefinition($id, $service, $file, array $defaults)
$definition->setAutowired($service['autowire']);
}
if (isset($service['autowiring_types'])) {
- if (\is_string($service['autowiring_types'])) {
+ if (is_string($service['autowiring_types'])) {
$definition->addAutowiringType($service['autowiring_types']);
} else {
- if (!\is_array($service['autowiring_types'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "autowiring_types" must be a string or an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (!is_array($service['autowiring_types'])) {
+ throw new InvalidArgumentException(sprintf('Parameter "autowiring_types" must be a string or an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
foreach ($service['autowiring_types'] as $autowiringType) {
- if (!\is_string($autowiringType)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A "autowiring_types" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (!is_string($autowiringType)) {
+ throw new InvalidArgumentException(sprintf('A "autowiring_types" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
$definition->addAutowiringType($autowiringType);
}
@@ -404,28 +434,28 @@ private function parseDefinition($id, $service, $file, array $defaults)
}
if (isset($defaults['bind']) || isset($service['bind'])) {
// deep clone, to avoid multiple process of the same instance in the passes
- $bindings = isset($defaults['bind']) ? \unserialize(\serialize($defaults['bind'])) : [];
+ $bindings = isset($defaults['bind']) ? unserialize(serialize($defaults['bind'])) : [];
if (isset($service['bind'])) {
- if (!\is_array($service['bind'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "bind" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (!is_array($service['bind'])) {
+ throw new InvalidArgumentException(sprintf('Parameter "bind" must be an array for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
- $bindings = \array_merge($bindings, $this->resolveServices($service['bind'], $file));
+ $bindings = array_merge($bindings, $this->resolveServices($service['bind'], $file));
}
$definition->setBindings($bindings);
}
if (isset($service['autoconfigure'])) {
- if (!$definition instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition) {
+ if (!$definition instanceof ChildDefinition) {
$definition->setAutoconfigured($service['autoconfigure']);
} elseif ($service['autoconfigure']) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting "autoconfigure: false" for the service.', $id));
+ throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try setting "autoconfigure: false" for the service.', $id));
}
}
- if (\array_key_exists('namespace', $service) && !\array_key_exists('resource', $service)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (array_key_exists('namespace', $service) && !array_key_exists('resource', $service)) {
+ throw new InvalidArgumentException(sprintf('A "resource" attribute must be set when the "namespace" attribute is set for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
- if (\array_key_exists('resource', $service)) {
- if (!\is_string($service['resource'])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file));
+ if (array_key_exists('resource', $service)) {
+ if (!is_string($service['resource'])) {
+ throw new InvalidArgumentException(sprintf('A "resource" attribute must be of type string for service "%s" in "%s". Check your YAML syntax.', $id, $file));
}
$exclude = isset($service['exclude']) ? $service['exclude'] : null;
$namespace = isset($service['namespace']) ? $service['namespace'] : $id;
@@ -448,26 +478,26 @@ private function parseDefinition($id, $service, $file, array $defaults)
*/
private function parseCallable($callable, $parameter, $id, $file)
{
- if (\is_string($callable)) {
+ if (is_string($callable)) {
if ('' !== $callable && '@' === $callable[0]) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $parameter, $id, $callable, \substr($callable, 1)));
+ throw new InvalidArgumentException(sprintf('The value of the "%s" option for the "%s" service must be the id of the service without the "@" prefix (replace "%s" with "%s").', $parameter, $id, $callable, substr($callable, 1)));
}
- if (\false !== \strpos($callable, ':') && \false === \strpos($callable, '::')) {
- $parts = \explode(':', $callable);
+ if (false !== strpos($callable, ':') && false === strpos($callable, '::')) {
+ $parts = explode(':', $callable);
return [$this->resolveServices('@' . $parts[0], $file), $parts[1]];
}
return $callable;
}
- if (\is_array($callable)) {
+ if (is_array($callable)) {
if (isset($callable[0]) && isset($callable[1])) {
return [$this->resolveServices($callable[0], $file), $callable[1]];
}
if ('factory' === $parameter && isset($callable[1]) && null === $callable[0]) {
return $callable;
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "%s" must contain an array with two elements for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file));
+ throw new InvalidArgumentException(sprintf('Parameter "%s" must contain an array with two elements for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file));
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Parameter "%s" must be a string or an array for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file));
+ throw new InvalidArgumentException(sprintf('Parameter "%s" must be a string or an array for service "%s" in "%s". Check your YAML syntax.', $parameter, $id, $file));
}
/**
* Loads a YAML file.
@@ -480,28 +510,28 @@ private function parseCallable($callable, $parameter, $id, $file)
*/
protected function loadFile($file)
{
- if (!\class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Yaml\\Parser')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.');
+ if (!class_exists('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Yaml\\Parser')) {
+ throw new RuntimeException('Unable to load YAML config files as the Symfony Yaml Component is not installed.');
}
- if (!\stream_is_local($file)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('This is not a local file "%s".', $file));
+ if (!stream_is_local($file)) {
+ throw new InvalidArgumentException(sprintf('This is not a local file "%s".', $file));
}
- if (!\file_exists($file)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The file "%s" does not exist.', $file));
+ if (!file_exists($file)) {
+ throw new InvalidArgumentException(sprintf('The file "%s" does not exist.', $file));
}
if (null === $this->yamlParser) {
- $this->yamlParser = new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Parser();
+ $this->yamlParser = new YamlParser();
}
- $prevErrorHandler = \set_error_handler(function ($level, $message, $script, $line) use($file, &$prevErrorHandler) {
- $message = \E_USER_DEPRECATED === $level ? \preg_replace('/ on line \\d+/', ' in "' . $file . '"$0', $message) : $message;
- return $prevErrorHandler ? $prevErrorHandler($level, $message, $script, $line) : \false;
+ $prevErrorHandler = set_error_handler(function ($level, $message, $script, $line) use($file, &$prevErrorHandler) {
+ $message = E_USER_DEPRECATED === $level ? preg_replace('/ on line \\d+/', ' in "' . $file . '"$0', $message) : $message;
+ return $prevErrorHandler ? $prevErrorHandler($level, $message, $script, $line) : false;
});
try {
- $configuration = $this->yamlParser->parseFile($file, \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml::PARSE_CONSTANT | \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml::PARSE_CUSTOM_TAGS);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Exception\ParseException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The file "%s" does not contain valid YAML: %s.', $file, $e->getMessage()), 0, $e);
+ $configuration = $this->yamlParser->parseFile($file, Yaml::PARSE_CONSTANT | Yaml::PARSE_CUSTOM_TAGS);
+ } catch (ParseException $e) {
+ throw new InvalidArgumentException(sprintf('The file "%s" does not contain valid YAML: %s.', $file, $e->getMessage()), 0, $e);
} finally {
- \restore_error_handler();
+ restore_error_handler();
}
return $this->validate($configuration, $file);
}
@@ -520,18 +550,18 @@ private function validate($content, $file)
if (null === $content) {
return $content;
}
- if (!\is_array($content)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The service file "%s" is not valid. It should contain an array. Check your YAML syntax.', $file));
+ if (!is_array($content)) {
+ throw new InvalidArgumentException(sprintf('The service file "%s" is not valid. It should contain an array. Check your YAML syntax.', $file));
}
foreach ($content as $namespace => $data) {
- if (\in_array($namespace, ['imports', 'parameters', 'services'])) {
+ if (in_array($namespace, ['imports', 'parameters', 'services'])) {
continue;
}
if (!$this->container->hasExtension($namespace)) {
- $extensionNamespaces = \array_filter(\array_map(function ($ext) {
+ $extensionNamespaces = array_filter(array_map(function ($ext) {
return $ext->getAlias();
}, $this->container->getExtensions()));
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $namespace, $file, $namespace, $extensionNamespaces ? \sprintf('"%s"', \implode('", "', $extensionNamespaces)) : 'none'));
+ throw new InvalidArgumentException(sprintf('There is no extension able to load the configuration for "%s" (in "%s"). Looked for namespace "%s", found "%s".', $namespace, $file, $namespace, $extensionNamespaces ? sprintf('"%s"', implode('", "', $extensionNamespaces)) : 'none'));
}
}
return $content;
@@ -545,76 +575,76 @@ private function validate($content, $file)
*
* @return array|string|Reference|ArgumentInterface
*/
- private function resolveServices($value, $file, $isParameter = \false)
+ private function resolveServices($value, $file, $isParameter = false)
{
- if ($value instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Tag\TaggedValue) {
+ if ($value instanceof TaggedValue) {
$argument = $value->getValue();
if ('iterator' === $value->getTag()) {
- if (!\is_array($argument)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"!iterator" tag only accepts sequences in "%s".', $file));
+ if (!is_array($argument)) {
+ throw new InvalidArgumentException(sprintf('"!iterator" tag only accepts sequences in "%s".', $file));
}
$argument = $this->resolveServices($argument, $file, $isParameter);
try {
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument($argument);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException $e) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"!iterator" tag only accepts arrays of "@service" references in "%s".', $file));
+ return new IteratorArgument($argument);
+ } catch (InvalidArgumentException $e) {
+ throw new InvalidArgumentException(sprintf('"!iterator" tag only accepts arrays of "@service" references in "%s".', $file));
}
}
if ('tagged' === $value->getTag()) {
- if (!\is_string($argument) || !$argument) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('"!tagged" tag only accepts non empty string in "%s".', $file));
+ if (!is_string($argument) || !$argument) {
+ throw new InvalidArgumentException(sprintf('"!tagged" tag only accepts non empty string in "%s".', $file));
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument($argument);
+ return new TaggedIteratorArgument($argument);
}
if ('service' === $value->getTag()) {
if ($isParameter) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Using an anonymous service in a parameter is not allowed in "%s".', $file));
+ throw new InvalidArgumentException(sprintf('Using an anonymous service in a parameter is not allowed in "%s".', $file));
}
$isLoadingInstanceof = $this->isLoadingInstanceof;
- $this->isLoadingInstanceof = \false;
+ $this->isLoadingInstanceof = false;
$instanceof = $this->instanceof;
$this->instanceof = [];
- $id = \sprintf('%d_%s', ++$this->anonymousServicesCount, \preg_replace('/^.*\\\\/', '', isset($argument['class']) ? $argument['class'] : '') . $this->anonymousServicesSuffix);
+ $id = sprintf('%d_%s', ++$this->anonymousServicesCount, preg_replace('/^.*\\\\/', '', isset($argument['class']) ? $argument['class'] : '') . $this->anonymousServicesSuffix);
$this->parseDefinition($id, $argument, $file, []);
if (!$this->container->hasDefinition($id)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Creating an alias using the tag "!service" is not allowed in "%s".', $file));
+ throw new InvalidArgumentException(sprintf('Creating an alias using the tag "!service" is not allowed in "%s".', $file));
}
- $this->container->getDefinition($id)->setPublic(\false);
+ $this->container->getDefinition($id)->setPublic(false);
$this->isLoadingInstanceof = $isLoadingInstanceof;
$this->instanceof = $instanceof;
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($id);
+ return new Reference($id);
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Unsupported tag "!%s".', $value->getTag()));
+ throw new InvalidArgumentException(sprintf('Unsupported tag "!%s".', $value->getTag()));
}
- if (\is_array($value)) {
+ if (is_array($value)) {
foreach ($value as $k => $v) {
$value[$k] = $this->resolveServices($v, $file, $isParameter);
}
- } elseif (\is_string($value) && 0 === \strpos($value, '@=')) {
- if (!\class_exists(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression::class)) {
- throw new \LogicException(\sprintf('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
+ } elseif (is_string($value) && 0 === strpos($value, '@=')) {
+ if (!class_exists(Expression::class)) {
+ throw new LogicException(sprintf('The "@=" expression syntax cannot be used without the ExpressionLanguage component. Try running "composer require symfony/expression-language".'));
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression(\substr($value, 2));
- } elseif (\is_string($value) && 0 === \strpos($value, '@')) {
- if (0 === \strpos($value, '@@')) {
- $value = \substr($value, 1);
+ return new Expression(substr($value, 2));
+ } elseif (is_string($value) && 0 === strpos($value, '@')) {
+ if (0 === strpos($value, '@@')) {
+ $value = substr($value, 1);
$invalidBehavior = null;
- } elseif (0 === \strpos($value, '@!')) {
- $value = \substr($value, 2);
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
- } elseif (0 === \strpos($value, '@?')) {
- $value = \substr($value, 2);
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
+ } elseif (0 === strpos($value, '@!')) {
+ $value = substr($value, 2);
+ $invalidBehavior = ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE;
+ } elseif (0 === strpos($value, '@?')) {
+ $value = substr($value, 2);
+ $invalidBehavior = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
} else {
- $value = \substr($value, 1);
- $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
+ $value = substr($value, 1);
+ $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE;
}
- if ('=' === \substr($value, -1)) {
- @\trigger_error(\sprintf('The "=" suffix that used to disable strict references in Symfony 2.x is deprecated since Symfony 3.3 and will be unsupported in 4.0. Remove it in "%s".', $value), \E_USER_DEPRECATED);
- $value = \substr($value, 0, -1);
+ if ('=' === substr($value, -1)) {
+ @trigger_error(sprintf('The "=" suffix that used to disable strict references in Symfony 2.x is deprecated since Symfony 3.3 and will be unsupported in 4.0. Remove it in "%s".', $value), E_USER_DEPRECATED);
+ $value = substr($value, 0, -1);
}
if (null !== $invalidBehavior) {
- $value = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference($value, $invalidBehavior);
+ $value = new Reference($value, $invalidBehavior);
}
}
return $value;
@@ -625,10 +655,10 @@ private function resolveServices($value, $file, $isParameter = \false)
private function loadFromExtensions(array $content)
{
foreach ($content as $namespace => $values) {
- if (\in_array($namespace, ['imports', 'parameters', 'services'])) {
+ if (in_array($namespace, ['imports', 'parameters', 'services'])) {
continue;
}
- if (!\is_array($values) && null !== $values) {
+ if (!is_array($values) && null !== $values) {
$values = [];
}
$this->container->loadFromExtension($namespace, $values);
@@ -653,9 +683,9 @@ private function checkDefinition($id, array $definition, $file)
foreach ($definition as $key => $value) {
if (!isset($keywords[$key])) {
if ($throw) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, \implode('", "', $keywords)));
+ throw new InvalidArgumentException(sprintf('The configuration key "%s" is unsupported for definition "%s" in "%s". Allowed configuration keys are "%s".', $key, $id, $file, implode('", "', $keywords)));
}
- @\trigger_error(\sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s". The YamlFileLoader object will raise an exception instead in Symfony 4.0 when detecting an unsupported service configuration key.', $key, $id, $file, \implode('", "', $keywords)), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('The configuration key "%s" is unsupported for service definition "%s" in "%s". Allowed configuration keys are "%s". The YamlFileLoader object will raise an exception instead in Symfony 4.0 when detecting an unsupported service configuration key.', $key, $id, $file, implode('", "', $keywords)), E_USER_DEPRECATED);
}
}
}
diff --git a/vendor/symfony/dependency-injection/Loader/index.php b/vendor/symfony/dependency-injection/Loader/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Loader/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Loader/schema/dic/index.php b/vendor/symfony/dependency-injection/Loader/schema/dic/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Loader/schema/dic/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Loader/schema/dic/services/index.php b/vendor/symfony/dependency-injection/Loader/schema/dic/services/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Loader/schema/dic/services/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Loader/schema/index.php b/vendor/symfony/dependency-injection/Loader/schema/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Loader/schema/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php
index 04d9463a3..583abf14b 100644
--- a/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php
+++ b/vendor/symfony/dependency-injection/ParameterBag/EnvPlaceholderParameterBag.php
@@ -12,10 +12,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function gettype;
+use function is_numeric;
+use function is_scalar;
+use function md5;
+use function mt_rand;
+use function preg_match;
+use function sprintf;
+use function str_replace;
+use function strpos;
+use function substr;
+use function uniqid;
+
/**
* @author Nicolas Grekas
*/
-class EnvPlaceholderParameterBag extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag
+class EnvPlaceholderParameterBag extends ParameterBag
{
private $envPlaceholders = [];
private $providedTypes = [];
@@ -24,25 +36,25 @@ class EnvPlaceholderParameterBag extends \_PhpScoper5ea00cc67502b\Symfony\Compon
*/
public function get($name)
{
- if (0 === \strpos($name, 'env(') && ')' === \substr($name, -1) && 'env()' !== $name) {
- $env = \substr($name, 4, -1);
+ if (0 === strpos($name, 'env(') && ')' === substr($name, -1) && 'env()' !== $name) {
+ $env = substr($name, 4, -1);
if (isset($this->envPlaceholders[$env])) {
foreach ($this->envPlaceholders[$env] as $placeholder) {
return $placeholder;
// return first result
}
}
- if (!\preg_match('/^(?:\\w++:)*+\\w++$/', $env)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('Invalid "%s" name: only "word" characters are allowed.', $name));
+ if (!preg_match('/^(?:\\w++:)*+\\w++$/', $env)) {
+ throw new InvalidArgumentException(sprintf('Invalid "%s" name: only "word" characters are allowed.', $name));
}
if ($this->has($name)) {
$defaultValue = parent::get($name);
- if (null !== $defaultValue && !\is_scalar($defaultValue)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The default value of an env() parameter must be scalar or null, but "%s" given to "%s".', \gettype($defaultValue), $name));
+ if (null !== $defaultValue && !is_scalar($defaultValue)) {
+ throw new RuntimeException(sprintf('The default value of an env() parameter must be scalar or null, but "%s" given to "%s".', gettype($defaultValue), $name));
}
}
- $uniqueName = \md5($name . \uniqid(\mt_rand(), \true));
- $placeholder = \sprintf('env_%s_%s', \str_replace(':', '_', $env), $uniqueName);
+ $uniqueName = md5($name . uniqid(mt_rand(), true));
+ $placeholder = sprintf('env_%s_%s', str_replace(':', '_', $env), $uniqueName);
$this->envPlaceholders[$env][$placeholder] = $placeholder;
return $placeholder;
}
@@ -98,10 +110,10 @@ public function resolve()
if (!$this->has($name = "env({$env})")) {
continue;
}
- if (\is_numeric($default = $this->parameters[$name])) {
+ if (is_numeric($default = $this->parameters[$name])) {
$this->parameters[$name] = (string) $default;
- } elseif (null !== $default && !\is_scalar($default)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('The default value of env parameter "%s" must be scalar or null, "%s" given.', $env, \gettype($default)));
+ } elseif (null !== $default && !is_scalar($default)) {
+ throw new RuntimeException(sprintf('The default value of env parameter "%s" must be scalar or null, "%s" given.', $env, gettype($default)));
}
}
}
diff --git a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
index c480d1039..c9351a822 100644
--- a/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
+++ b/vendor/symfony/dependency-injection/ParameterBag/FrozenParameterBag.php
@@ -16,7 +16,7 @@
*
* @author Fabien Potencier
*/
-class FrozenParameterBag extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag
+class FrozenParameterBag extends ParameterBag
{
/**
* For performance reasons, the constructor assumes that
@@ -29,34 +29,34 @@ class FrozenParameterBag extends \_PhpScoper5ea00cc67502b\Symfony\Component\Depe
public function __construct(array $parameters = [])
{
$this->parameters = $parameters;
- $this->resolved = \true;
+ $this->resolved = true;
}
/**
* {@inheritdoc}
*/
public function clear()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call clear() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call clear() on a frozen ParameterBag.');
}
/**
* {@inheritdoc}
*/
public function add(array $parameters)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call add() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call add() on a frozen ParameterBag.');
}
/**
* {@inheritdoc}
*/
public function set($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
/**
* {@inheritdoc}
*/
public function remove($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call remove() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call remove() on a frozen ParameterBag.');
}
}
diff --git a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php b/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php
index ac3862db0..9a4364007 100644
--- a/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php
+++ b/vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php
@@ -13,15 +13,37 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use function array_key_exists;
+use function array_keys;
+use function array_map;
+use function array_pop;
+use function count;
+use function explode;
+use function gettype;
+use function is_array;
+use function is_numeric;
+use function is_string;
+use function levenshtein;
+use function preg_match;
+use function preg_replace_callback;
+use function sprintf;
+use function str_replace;
+use function strlen;
+use function strpos;
+use function strtolower;
+use function substr;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Holds parameters.
*
* @author Fabien Potencier
*/
-class ParameterBag implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface
+class ParameterBag implements ParameterBagInterface
{
protected $parameters = [];
- protected $resolved = \false;
+ protected $resolved = false;
private $normalizedNames = [];
/**
* @param array $parameters An array of parameters
@@ -61,32 +83,32 @@ public function all()
public function get($name)
{
$name = $this->normalizeName($name);
- if (!\array_key_exists($name, $this->parameters)) {
+ if (!array_key_exists($name, $this->parameters)) {
if (!$name) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException($name);
+ throw new ParameterNotFoundException($name);
}
$alternatives = [];
foreach ($this->parameters as $key => $parameterValue) {
- $lev = \levenshtein($name, $key);
- if ($lev <= \strlen($name) / 3 || \false !== \strpos($key, $name)) {
+ $lev = levenshtein($name, $key);
+ if ($lev <= strlen($name) / 3 || false !== strpos($key, $name)) {
$alternatives[] = $key;
}
}
$nonNestedAlternative = null;
- if (!\count($alternatives) && \false !== \strpos($name, '.')) {
- $namePartsLength = \array_map('strlen', \explode('.', $name));
- $key = \substr($name, 0, -1 * (1 + \array_pop($namePartsLength)));
- while (\count($namePartsLength)) {
+ if (!count($alternatives) && false !== strpos($name, '.')) {
+ $namePartsLength = array_map('strlen', explode('.', $name));
+ $key = substr($name, 0, -1 * (1 + array_pop($namePartsLength)));
+ while (count($namePartsLength)) {
if ($this->has($key)) {
- if (\is_array($this->get($key))) {
+ if (is_array($this->get($key))) {
$nonNestedAlternative = $key;
}
break;
}
- $key = \substr($key, 0, -1 * (1 + \array_pop($namePartsLength)));
+ $key = substr($key, 0, -1 * (1 + array_pop($namePartsLength)));
}
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative);
+ throw new ParameterNotFoundException($name, null, null, null, $alternatives, $nonNestedAlternative);
}
return $this->parameters[$name];
}
@@ -105,7 +127,7 @@ public function set($name, $value)
*/
public function has($name)
{
- return \array_key_exists($this->normalizeName($name), $this->parameters);
+ return array_key_exists($this->normalizeName($name), $this->parameters);
}
/**
* Removes a parameter.
@@ -129,13 +151,13 @@ public function resolve()
try {
$value = $this->resolveValue($value);
$parameters[$key] = $this->unescapeValue($value);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
$e->setSourceKey($key);
throw $e;
}
}
$this->parameters = $parameters;
- $this->resolved = \true;
+ $this->resolved = true;
}
/**
* Replaces parameter placeholders (%name%) by their values.
@@ -151,14 +173,14 @@ public function resolve()
*/
public function resolveValue($value, array $resolving = [])
{
- if (\is_array($value)) {
+ if (is_array($value)) {
$args = [];
foreach ($value as $k => $v) {
- $args[\is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving);
+ $args[is_string($k) ? $this->resolveValue($k, $resolving) : $k] = $this->resolveValue($v, $resolving);
}
return $args;
}
- if (!\is_string($value) || 2 > \strlen($value)) {
+ if (!is_string($value) || 2 > strlen($value)) {
return $value;
}
return $this->resolveString($value, $resolving);
@@ -180,33 +202,33 @@ public function resolveString($value, array $resolving = [])
// we do this to deal with non string values (Boolean, integer, ...)
// as the preg_replace_callback throw an exception when trying
// a non-string in a parameter value
- if (\preg_match('/^%([^%\\s]+)%$/', $value, $match)) {
+ if (preg_match('/^%([^%\\s]+)%$/', $value, $match)) {
$key = $match[1];
- $lcKey = \strtolower($key);
+ $lcKey = strtolower($key);
// strtolower() to be removed in 4.0
if (isset($resolving[$lcKey])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException(\array_keys($resolving));
+ throw new ParameterCircularReferenceException(array_keys($resolving));
}
- $resolving[$lcKey] = \true;
+ $resolving[$lcKey] = true;
return $this->resolved ? $this->get($key) : $this->resolveValue($this->get($key), $resolving);
}
- return \preg_replace_callback('/%%|%([^%\\s]+)%/', function ($match) use($resolving, $value) {
+ return preg_replace_callback('/%%|%([^%\\s]+)%/', function ($match) use($resolving, $value) {
// skip %%
if (!isset($match[1])) {
return '%%';
}
$key = $match[1];
- $lcKey = \strtolower($key);
+ $lcKey = strtolower($key);
// strtolower() to be removed in 4.0
if (isset($resolving[$lcKey])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException(\array_keys($resolving));
+ throw new ParameterCircularReferenceException(array_keys($resolving));
}
$resolved = $this->get($key);
- if (!\is_string($resolved) && !\is_numeric($resolved)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException(\sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type "%s" inside string value "%s".', $key, \gettype($resolved), $value));
+ if (!is_string($resolved) && !is_numeric($resolved)) {
+ throw new RuntimeException(sprintf('A string value must be composed of strings and/or numbers, but found parameter "%s" of type "%s" inside string value "%s".', $key, gettype($resolved), $value));
}
$resolved = (string) $resolved;
- $resolving[$lcKey] = \true;
+ $resolving[$lcKey] = true;
return $this->isResolved() ? $resolved : $this->resolveString($resolved, $resolving);
}, $value);
}
@@ -219,10 +241,10 @@ public function isResolved()
*/
public function escapeValue($value)
{
- if (\is_string($value)) {
- return \str_replace('%', '%%', $value);
+ if (is_string($value)) {
+ return str_replace('%', '%%', $value);
}
- if (\is_array($value)) {
+ if (is_array($value)) {
$result = [];
foreach ($value as $k => $v) {
$result[$k] = $this->escapeValue($v);
@@ -236,10 +258,10 @@ public function escapeValue($value)
*/
public function unescapeValue($value)
{
- if (\is_string($value)) {
- return \str_replace('%%', '%', $value);
+ if (is_string($value)) {
+ return str_replace('%%', '%', $value);
}
- if (\is_array($value)) {
+ if (is_array($value)) {
$result = [];
foreach ($value as $k => $v) {
$result[$k] = $this->unescapeValue($v);
@@ -250,10 +272,10 @@ public function unescapeValue($value)
}
private function normalizeName($name)
{
- if (isset($this->normalizedNames[$normalizedName = \strtolower($name)])) {
+ if (isset($this->normalizedNames[$normalizedName = strtolower($name)])) {
$normalizedName = $this->normalizedNames[$normalizedName];
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedNames[$normalizedName] = (string) $name;
diff --git a/vendor/symfony/dependency-injection/ParameterBag/index.php b/vendor/symfony/dependency-injection/ParameterBag/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/ParameterBag/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Reference.php b/vendor/symfony/dependency-injection/Reference.php
index 25772bacb..e3875289e 100644
--- a/vendor/symfony/dependency-injection/Reference.php
+++ b/vendor/symfony/dependency-injection/Reference.php
@@ -25,7 +25,7 @@ class Reference
*
* @see Container
*/
- public function __construct($id, $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
+ public function __construct($id, $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
$this->id = (string) $id;
$this->invalidBehavior = $invalidBehavior;
diff --git a/vendor/symfony/dependency-injection/ResettableContainerInterface.php b/vendor/symfony/dependency-injection/ResettableContainerInterface.php
index f166506cc..a27771f4d 100644
--- a/vendor/symfony/dependency-injection/ResettableContainerInterface.php
+++ b/vendor/symfony/dependency-injection/ResettableContainerInterface.php
@@ -17,7 +17,7 @@
*
* @author Christophe Coevoet
*/
-interface ResettableContainerInterface extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface
+interface ResettableContainerInterface extends ContainerInterface
{
/**
* Resets shared services from the container.
diff --git a/vendor/symfony/dependency-injection/ServiceLocator.php b/vendor/symfony/dependency-injection/ServiceLocator.php
index d95019ea6..b2ad41d11 100644
--- a/vendor/symfony/dependency-injection/ServiceLocator.php
+++ b/vendor/symfony/dependency-injection/ServiceLocator.php
@@ -13,11 +13,27 @@
use _PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface as PsrContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
+use function array_keys;
+use function array_pop;
+use function array_search;
+use function array_slice;
+use function array_values;
+use function count;
+use function debug_backtrace;
+use function end;
+use function get_class;
+use function implode;
+use function is_subclass_of;
+use function preg_replace;
+use function sprintf;
+use const DEBUG_BACKTRACE_IGNORE_ARGS;
+use const DEBUG_BACKTRACE_PROVIDE_OBJECT;
+
/**
* @author Robin Chalas
* @author Nicolas Grekas
*/
-class ServiceLocator implements \_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface
+class ServiceLocator implements PsrContainerInterface
{
private $factories;
private $loading = [];
@@ -43,13 +59,13 @@ public function has($id)
public function get($id)
{
if (!isset($this->factories[$id])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException($id, \end($this->loading) ?: null, null, [], $this->createServiceNotFoundMessage($id));
+ throw new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], $this->createServiceNotFoundMessage($id));
}
if (isset($this->loading[$id])) {
- $ids = \array_values($this->loading);
- $ids = \array_slice($this->loading, \array_search($id, $ids));
+ $ids = array_values($this->loading);
+ $ids = array_slice($this->loading, array_search($id, $ids));
$ids[] = $id;
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException($id, $ids);
+ throw new ServiceCircularReferenceException($id, $ids);
}
$this->loading[$id] = $id;
try {
@@ -65,7 +81,7 @@ public function __invoke($id)
/**
* @internal
*/
- public function withContext($externalId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container $container)
+ public function withContext($externalId, Container $container)
{
$locator = clone $this;
$locator->externalId = $externalId;
@@ -75,13 +91,13 @@ public function withContext($externalId, \_PhpScoper5ea00cc67502b\Symfony\Compon
private function createServiceNotFoundMessage($id)
{
if ($this->loading) {
- return \sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', \end($this->loading), $id, $this->formatAlternatives());
+ return sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $this->formatAlternatives());
}
- $class = \debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, 3);
- $class = isset($class[2]['object']) ? \get_class($class[2]['object']) : null;
+ $class = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT | DEBUG_BACKTRACE_IGNORE_ARGS, 3);
+ $class = isset($class[2]['object']) ? get_class($class[2]['object']) : null;
$externalId = $this->externalId ?: $class;
$msg = [];
- $msg[] = \sprintf('Service "%s" not found:', $id);
+ $msg[] = sprintf('Service "%s" not found:', $id);
if (!$this->container) {
$class = null;
} elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) {
@@ -90,38 +106,38 @@ private function createServiceNotFoundMessage($id)
try {
$this->container->get($id);
$class = null;
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException $e) {
+ } catch (ServiceNotFoundException $e) {
if ($e->getAlternatives()) {
- $msg[] = \sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or'));
+ $msg[] = sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or'));
} else {
$class = null;
}
}
}
if ($externalId) {
- $msg[] = \sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives());
+ $msg[] = sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives());
} else {
- $msg[] = \sprintf('the current service locator %s', $this->formatAlternatives());
+ $msg[] = sprintf('the current service locator %s', $this->formatAlternatives());
}
if (!$class) {
// no-op
- } elseif (\is_subclass_of($class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface::class)) {
- $msg[] = \sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', \preg_replace('/([^\\\\]++\\\\)++/', '', $class));
+ } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) {
+ $msg[] = sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class));
} else {
$msg[] = 'Try using dependency injection instead.';
}
- return \implode(' ', $msg);
+ return implode(' ', $msg);
}
private function formatAlternatives(array $alternatives = null, $separator = 'and')
{
$format = '"%s"%s';
if (null === $alternatives) {
- if (!($alternatives = \array_keys($this->factories))) {
+ if (!($alternatives = array_keys($this->factories))) {
return 'is empty...';
}
- $format = \sprintf('only knows about the %s service%s.', $format, 1 < \count($alternatives) ? 's' : '');
+ $format = sprintf('only knows about the %s service%s.', $format, 1 < count($alternatives) ? 's' : '');
}
- $last = \array_pop($alternatives);
- return \sprintf($format, $alternatives ? \implode('", "', $alternatives) : $last, $alternatives ? \sprintf(' %s "%s"', $separator, $last) : '');
+ $last = array_pop($alternatives);
+ return sprintf($format, $alternatives ? implode('", "', $alternatives) : $last, $alternatives ? sprintf(' %s "%s"', $separator, $last) : '');
}
}
diff --git a/vendor/symfony/dependency-injection/TaggedContainerInterface.php b/vendor/symfony/dependency-injection/TaggedContainerInterface.php
index 4b0543344..13497b9c2 100644
--- a/vendor/symfony/dependency-injection/TaggedContainerInterface.php
+++ b/vendor/symfony/dependency-injection/TaggedContainerInterface.php
@@ -15,7 +15,7 @@
*
* @author Fabien Potencier
*/
-interface TaggedContainerInterface extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface
+interface TaggedContainerInterface extends ContainerInterface
{
/**
* Returns service ids for a given tag.
diff --git a/vendor/symfony/dependency-injection/Tests/Argument/RewindableGeneratorTest.php b/vendor/symfony/dependency-injection/Tests/Argument/RewindableGeneratorTest.php
index 554e00f51..8dd4c75ab 100644
--- a/vendor/symfony/dependency-injection/Tests/Argument/RewindableGeneratorTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Argument/RewindableGeneratorTest.php
@@ -12,17 +12,20 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
-class RewindableGeneratorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Countable;
+use function count;
+
+class RewindableGeneratorTest extends TestCase
{
public function testImplementsCountable()
{
- $this->assertInstanceOf(\Countable::class, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
+ $this->assertInstanceOf(Countable::class, new RewindableGenerator(function () {
(yield 1);
}, 1));
}
public function testCountUsesProvidedValue()
{
- $generator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
+ $generator = new RewindableGenerator(function () {
(yield 1);
}, 3);
$this->assertCount(3, $generator);
@@ -30,7 +33,7 @@ public function testCountUsesProvidedValue()
public function testCountUsesProvidedValueAsCallback()
{
$called = 0;
- $generator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
+ $generator = new RewindableGenerator(function () {
(yield 1);
}, function () use(&$called) {
++$called;
@@ -38,7 +41,7 @@ public function testCountUsesProvidedValueAsCallback()
});
$this->assertSame(0, $called, 'Count callback is called lazily');
$this->assertCount(3, $generator);
- \count($generator);
+ count($generator);
$this->assertSame(1, $called, 'Count callback is called only once');
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Argument/index.php b/vendor/symfony/dependency-injection/Tests/Argument/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Argument/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/ChildDefinitionTest.php b/vendor/symfony/dependency-injection/Tests/ChildDefinitionTest.php
index c6bd482fd..857cf32c7 100644
--- a/vendor/symfony/dependency-injection/Tests/ChildDefinitionTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ChildDefinitionTest.php
@@ -13,11 +13,13 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator;
-class ChildDefinitionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function ucfirst;
+
+class ChildDefinitionTest extends TestCase
{
public function testConstructor()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$this->assertSame('foo', $def->getParent());
$this->assertSame([], $def->getChanges());
}
@@ -26,13 +28,13 @@ public function testConstructor()
*/
public function testSetProperty($property, $changeKey)
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
- $getter = 'get' . \ucfirst($property);
- $setter = 'set' . \ucfirst($property);
+ $def = new ChildDefinition('foo');
+ $getter = 'get' . ucfirst($property);
+ $setter = 'set' . ucfirst($property);
$this->assertNull($def->{$getter}());
$this->assertSame($def, $def->{$setter}('foo'));
$this->assertSame('foo', $def->{$getter}());
- $this->assertSame([$changeKey => \true], $def->getChanges());
+ $this->assertSame([$changeKey => true], $def->getChanges());
}
public function getPropertyTests()
{
@@ -40,31 +42,31 @@ public function getPropertyTests()
}
public function testSetPublic()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$this->assertTrue($def->isPublic());
- $this->assertSame($def, $def->setPublic(\false));
+ $this->assertSame($def, $def->setPublic(false));
$this->assertFalse($def->isPublic());
- $this->assertSame(['public' => \true], $def->getChanges());
+ $this->assertSame(['public' => true], $def->getChanges());
}
public function testSetLazy()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$this->assertFalse($def->isLazy());
- $this->assertSame($def, $def->setLazy(\false));
+ $this->assertSame($def, $def->setLazy(false));
$this->assertFalse($def->isLazy());
- $this->assertSame(['lazy' => \true], $def->getChanges());
+ $this->assertSame(['lazy' => true], $def->getChanges());
}
public function testSetAutowired()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$this->assertFalse($def->isAutowired());
- $this->assertSame($def, $def->setAutowired(\true));
+ $this->assertSame($def, $def->setAutowired(true));
$this->assertTrue($def->isAutowired());
- $this->assertSame(['autowired' => \true], $def->getChanges());
+ $this->assertSame(['autowired' => true], $def->getChanges());
}
public function testSetArgument()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$this->assertSame([], $def->getArguments());
$this->assertSame($def, $def->replaceArgument(0, 'foo'));
$this->assertSame(['index_0' => 'foo'], $def->getArguments());
@@ -72,12 +74,12 @@ public function testSetArgument()
public function testReplaceArgumentShouldRequireIntegerIndex()
{
$this->expectException('InvalidArgumentException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$def->replaceArgument('0', 'foo');
}
public function testReplaceArgument()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$def->setArguments([0 => 'foo', 1 => 'bar']);
$this->assertSame('foo', $def->getArgument(0));
$this->assertSame('bar', $def->getArgument(1));
@@ -92,25 +94,25 @@ public function testReplaceArgument()
public function testGetArgumentShouldCheckBounds()
{
$this->expectException('OutOfBoundsException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
+ $def = new ChildDefinition('foo');
$def->setArguments([0 => 'foo']);
$def->replaceArgument(0, 'foo');
$def->getArgument(1);
}
public function testDefinitionDecoratorAliasExistsForBackwardsCompatibility()
{
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition::class, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo'));
+ $this->assertInstanceOf(ChildDefinition::class, new DefinitionDecorator('foo'));
}
public function testCannotCallSetAutoconfigured()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\BadMethodCallException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
- $def->setAutoconfigured(\true);
+ $def = new ChildDefinition('foo');
+ $def->setAutoconfigured(true);
}
public function testCannotCallSetInstanceofConditionals()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\BadMethodCallException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo');
- $def->setInstanceofConditionals(['Foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('')]);
+ $def = new ChildDefinition('foo');
+ $def->setInstanceofConditionals(['Foo' => new ChildDefinition('')]);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php
index 16f18febb..e0af749ba 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/AnalyzeServiceReferencesPassTest.php
@@ -17,16 +17,16 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class AnalyzeServiceReferencesPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class AnalyzeServiceReferencesPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument($ref1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addMethodCall('setA', [$ref2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]);
- $container->register('c')->addArgument($ref3 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'))->addArgument($ref4 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('d')->setProperty('foo', $ref5 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('e')->setConfigurator([$ref6 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), 'methodName']);
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument($ref1 = new Reference('b'));
+ $container->register('b')->addMethodCall('setA', [$ref2 = new Reference('a')]);
+ $container->register('c')->addArgument($ref3 = new Reference('a'))->addArgument($ref4 = new Reference('b'));
+ $container->register('d')->setProperty('foo', $ref5 = new Reference('b'));
+ $container->register('e')->setConfigurator([$ref6 = new Reference('b'), 'methodName']);
$graph = $this->process($container);
$this->assertCount(4, $edges = $graph->getNode('b')->getInEdges());
$this->assertSame($ref1, $edges[0]->getValue());
@@ -36,9 +36,9 @@ public function testProcess()
}
public function testProcessMarksEdgesLazyWhenReferencedServiceIsLazy()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->setLazy(\true)->addArgument($ref1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addArgument($ref2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'));
+ $container = new ContainerBuilder();
+ $container->register('a')->setLazy(true)->addArgument($ref1 = new Reference('b'));
+ $container->register('b')->addArgument($ref2 = new Reference('a'));
$graph = $this->process($container);
$this->assertCount(1, $graph->getNode('b')->getInEdges());
$this->assertCount(1, $edges = $graph->getNode('a')->getInEdges());
@@ -47,10 +47,10 @@ public function testProcessMarksEdgesLazyWhenReferencedServiceIsLazy()
}
public function testProcessMarksEdgesLazyWhenReferencedFromIteratorArgument()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
$container->register('b');
- $container->register('c')->addArgument($ref1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([$ref2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b')]));
+ $container->register('c')->addArgument($ref1 = new Reference('a'))->addArgument(new IteratorArgument([$ref2 = new Reference('b')]));
$graph = $this->process($container);
$this->assertCount(1, $graph->getNode('a')->getInEdges());
$this->assertCount(1, $graph->getNode('b')->getInEdges());
@@ -62,28 +62,28 @@ public function testProcessMarksEdgesLazyWhenReferencedFromIteratorArgument()
}
public function testProcessDetectsReferencesFromInlinedDefinitions()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(null, [$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]));
+ $container->register('b')->addArgument(new Definition(null, [$ref = new Reference('a')]));
$graph = $this->process($container);
$this->assertCount(1, $refs = $graph->getNode('a')->getInEdges());
$this->assertSame($ref, $refs[0]->getValue());
}
public function testProcessDetectsReferencesFromIteratorArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]));
+ $container->register('b')->addArgument(new IteratorArgument([$ref = new Reference('a')]));
$graph = $this->process($container);
$this->assertCount(1, $refs = $graph->getNode('a')->getInEdges());
$this->assertSame($ref, $refs[0]->getValue());
}
public function testProcessDetectsReferencesFromInlinedFactoryDefinitions()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $factory = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
- $factory->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'), 'a']);
+ $factory = new Definition();
+ $factory->setFactory([new Reference('a'), 'a']);
$container->register('b')->addArgument($factory);
$graph = $this->process($container);
$this->assertTrue($graph->hasNode('a'));
@@ -91,24 +91,24 @@ public function testProcessDetectsReferencesFromInlinedFactoryDefinitions()
}
public function testProcessDoesNotSaveDuplicateReferences()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(null, [$ref1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(null, [$ref2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]));
+ $container->register('b')->addArgument(new Definition(null, [$ref1 = new Reference('a')]))->addArgument(new Definition(null, [$ref2 = new Reference('a')]));
$graph = $this->process($container);
$this->assertCount(2, $graph->getNode('a')->getInEdges());
}
public function testProcessDetectsFactoryReferences()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('foo', 'stdClass')->setFactory(['stdClass', 'getInstance']);
- $container->register('bar', 'stdClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), 'getInstance']);
+ $container->register('bar', 'stdClass')->setFactory([new Reference('foo'), 'getInstance']);
$graph = $this->process($container);
$this->assertTrue($graph->hasNode('foo'));
$this->assertCount(1, $graph->getNode('foo')->getInEdges());
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass()]);
+ $pass = new RepeatedPass([new AnalyzeServiceReferencesPass()]);
$pass->process($container);
return $container->getCompiler()->getServiceReferenceGraph();
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/AutoAliasServicePassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/AutoAliasServicePassTest.php
index 43e7b1369..5175bc3cd 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/AutoAliasServicePassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/AutoAliasServicePassTest.php
@@ -13,41 +13,41 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class AutoAliasServicePassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class AutoAliasServicePassTest extends TestCase
{
public function testProcessWithMissingParameter()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('example')->addTag('auto_alias', ['format' => '%non_existing%.example']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass();
+ $pass = new AutoAliasServicePass();
$pass->process($container);
}
public function testProcessWithMissingFormat()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('example')->addTag('auto_alias', []);
$container->setParameter('existing', 'mysql');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass();
+ $pass = new AutoAliasServicePass();
$pass->process($container);
}
public function testProcessWithNonExistingAlias()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('example', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassDefault')->addTag('auto_alias', ['format' => '%existing%.example']);
$container->setParameter('existing', 'mysql');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass();
+ $pass = new AutoAliasServicePass();
$pass->process($container);
$this->assertEquals('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassDefault', $container->getDefinition('example')->getClass());
}
public function testProcessWithExistingAlias()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('example', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassDefault')->addTag('auto_alias', ['format' => '%existing%.example']);
$container->register('mysql.example', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassMysql');
$container->setParameter('existing', 'mysql');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass();
+ $pass = new AutoAliasServicePass();
$pass->process($container);
$this->assertTrue($container->hasAlias('example'));
$this->assertEquals('mysql.example', $container->getAlias('example'));
@@ -55,13 +55,13 @@ public function testProcessWithExistingAlias()
}
public function testProcessWithManualAlias()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('example', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassDefault')->addTag('auto_alias', ['format' => '%existing%.example']);
$container->register('mysql.example', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassMysql');
$container->register('mariadb.example', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\ServiceClassMariaDb');
$container->setAlias('example', 'mariadb.example');
$container->setParameter('existing', 'mysql');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutoAliasServicePass();
+ $pass = new AutoAliasServicePass();
$pass->process($container);
$this->assertTrue($container->hasAlias('example'));
$this->assertEquals('mariadb.example', $container->getAlias('example'));
@@ -71,9 +71,9 @@ public function testProcessWithManualAlias()
class ServiceClassDefault
{
}
-class ServiceClassMysql extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassDefault
+class ServiceClassMysql extends ServiceClassDefault
{
}
-class ServiceClassMariaDb extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ServiceClassMysql
+class ServiceClassMariaDb extends ServiceClassMysql
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/AutowireExceptionPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/AutowireExceptionPassTest.php
index eca212080..db8ada3e3 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/AutowireExceptionPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/AutowireExceptionPassTest.php
@@ -16,57 +16,59 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException;
+use Exception;
+
/**
* @group legacy
*/
-class AutowireExceptionPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class AutowireExceptionPassTest extends TestCase
{
public function testThrowsException()
{
- $autowirePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::class)->getMock();
- $autowireException = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException('foo_service_id', 'An autowiring exception message');
+ $autowirePass = $this->getMockBuilder(AutowirePass::class)->getMock();
+ $autowireException = new AutowiringFailedException('foo_service_id', 'An autowiring exception message');
$autowirePass->expects($this->any())->method('getAutowiringExceptions')->willReturn([$autowireException]);
- $inlinePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass::class)->getMock();
+ $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)->getMock();
$inlinePass->expects($this->any())->method('getInlinedServiceIds')->willReturn([]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('foo_service_id');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireExceptionPass($autowirePass, $inlinePass);
+ $pass = new AutowireExceptionPass($autowirePass, $inlinePass);
try {
$pass->process($container);
$this->fail('->process() should throw the exception if the service id exists');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertSame($autowireException, $e);
}
}
public function testThrowExceptionIfServiceInlined()
{
- $autowirePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::class)->getMock();
- $autowireException = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException('a_service', 'An autowiring exception message');
+ $autowirePass = $this->getMockBuilder(AutowirePass::class)->getMock();
+ $autowireException = new AutowiringFailedException('a_service', 'An autowiring exception message');
$autowirePass->expects($this->any())->method('getAutowiringExceptions')->willReturn([$autowireException]);
- $inlinePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass::class)->getMock();
+ $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)->getMock();
$inlinePass->expects($this->any())->method('getInlinedServiceIds')->willReturn([
// a_service inlined into b_service
'a_service' => ['b_service'],
// b_service inlined into c_service
'b_service' => ['c_service'],
]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
// ONLY register c_service in the final container
$container->register('c_service', 'stdClass');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireExceptionPass($autowirePass, $inlinePass);
+ $pass = new AutowireExceptionPass($autowirePass, $inlinePass);
try {
$pass->process($container);
$this->fail('->process() should throw the exception if the service id exists');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertSame($autowireException, $e);
}
}
public function testDoNotThrowExceptionIfServiceInlinedButRemoved()
{
- $autowirePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::class)->getMock();
- $autowireException = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException('a_service', 'An autowiring exception message');
+ $autowirePass = $this->getMockBuilder(AutowirePass::class)->getMock();
+ $autowireException = new AutowiringFailedException('a_service', 'An autowiring exception message');
$autowirePass->expects($this->any())->method('getAutowiringExceptions')->willReturn([$autowireException]);
- $inlinePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass::class)->getMock();
+ $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)->getMock();
$inlinePass->expects($this->any())->method('getInlinedServiceIds')->willReturn([
// a_service inlined into b_service
'a_service' => ['b_service'],
@@ -74,23 +76,23 @@ public function testDoNotThrowExceptionIfServiceInlinedButRemoved()
'b_service' => ['c_service'],
]);
// do NOT register c_service in the container
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireExceptionPass($autowirePass, $inlinePass);
+ $container = new ContainerBuilder();
+ $pass = new AutowireExceptionPass($autowirePass, $inlinePass);
$pass->process($container);
// mark the test as passed
- $this->assertTrue(\true);
+ $this->assertTrue(true);
}
public function testNoExceptionIfServiceRemoved()
{
- $autowirePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::class)->getMock();
- $autowireException = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException('non_existent_service');
+ $autowirePass = $this->getMockBuilder(AutowirePass::class)->getMock();
+ $autowireException = new AutowiringFailedException('non_existent_service');
$autowirePass->expects($this->any())->method('getAutowiringExceptions')->willReturn([$autowireException]);
- $inlinePass = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass::class)->getMock();
+ $inlinePass = $this->getMockBuilder(InlineServiceDefinitionsPass::class)->getMock();
$inlinePass->expects($this->any())->method('getInlinedServiceIds')->willReturn([]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireExceptionPass($autowirePass, $inlinePass);
+ $container = new ContainerBuilder();
+ $pass = new AutowireExceptionPass($autowirePass, $inlinePass);
$pass->process($container);
// mark the test as passed
- $this->assertTrue(\true);
+ $this->assertTrue(true);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/AutowirePassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/AutowirePassTest.php
index 149b87dfa..5f76c0d21 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/AutowirePassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/AutowirePassTest.php
@@ -23,36 +23,42 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\FooVariadic;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
+use ReflectionClass;
+use ReflectionObject;
+use SplFileObject;
+use function array_column;
+use function realpath;
+
require_once __DIR__ . '/../Fixtures/includes/autowiring_classes.php';
/**
* @author Kévin Dunglas
*/
-class AutowirePassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class AutowirePassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $barDefinition = $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class);
- $barDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $barDefinition = $container->register('bar', Bar::class);
+ $barDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(1, $container->getDefinition('bar')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, (string) $container->getDefinition('bar')->getArgument(0));
+ $this->assertEquals(Foo::class, (string) $container->getDefinition('bar')->getArgument(0));
}
/**
* @requires PHP 5.6
*/
public function testProcessVariadic()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $definition = $container->register('fooVariadic', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\FooVariadic::class);
- $definition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $definition = $container->register('fooVariadic', FooVariadic::class);
+ $definition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(1, $container->getDefinition('fooVariadic')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, (string) $container->getDefinition('fooVariadic')->getArgument(0));
+ $this->assertEquals(Foo::class, (string) $container->getDefinition('fooVariadic')->getArgument(0));
}
/**
* @group legacy
@@ -62,14 +68,14 @@ public function testProcessVariadic()
*/
public function testProcessAutowireParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $cDefinition = $container->register('c', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\C::class);
- $cDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(B::class);
+ $cDefinition = $container->register('c', C::class);
+ $cDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(1, $container->getDefinition('c')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class, (string) $container->getDefinition('c')->getArgument(0));
+ $this->assertEquals(B::class, (string) $container->getDefinition('c')->getArgument(0));
}
/**
* @group legacy
@@ -79,15 +85,15 @@ public function testProcessAutowireParent()
*/
public function testProcessLegacyAutowireWithAvailableInterface()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\AInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $cDefinition = $container->register('c', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\C::class);
- $cDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->setAlias(AInterface::class, B::class);
+ $container->register(B::class);
+ $cDefinition = $container->register('c', C::class);
+ $cDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(1, $container->getDefinition('c')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class, (string) $container->getDefinition('c')->getArgument(0));
+ $this->assertEquals(B::class, (string) $container->getDefinition('c')->getArgument(0));
}
/**
* @group legacy
@@ -97,55 +103,55 @@ public function testProcessLegacyAutowireWithAvailableInterface()
*/
public function testProcessAutowireInterface()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\F::class);
- $gDefinition = $container->register('g', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\G::class);
- $gDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(F::class);
+ $gDefinition = $container->register('g', G::class);
+ $gDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(3, $container->getDefinition('g')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\F::class, (string) $container->getDefinition('g')->getArgument(0));
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\F::class, (string) $container->getDefinition('g')->getArgument(1));
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\F::class, (string) $container->getDefinition('g')->getArgument(2));
+ $this->assertEquals(F::class, (string) $container->getDefinition('g')->getArgument(0));
+ $this->assertEquals(F::class, (string) $container->getDefinition('g')->getArgument(1));
+ $this->assertEquals(F::class, (string) $container->getDefinition('g')->getArgument(2));
}
public function testCompleteExistingDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('b', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\F::class);
- $hDefinition = $container->register('h', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\H::class)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $hDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('b', B::class);
+ $container->register(DInterface::class, F::class);
+ $hDefinition = $container->register('h', H::class)->addArgument(new Reference('b'));
+ $hDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(2, $container->getDefinition('h')->getArguments());
$this->assertEquals('b', (string) $container->getDefinition('h')->getArgument(0));
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface::class, (string) $container->getDefinition('h')->getArgument(1));
+ $this->assertEquals(DInterface::class, (string) $container->getDefinition('h')->getArgument(1));
}
public function testCompleteExistingDefinitionWithNotDefinedArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\F::class);
- $hDefinition = $container->register('h', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\H::class)->addArgument('')->addArgument('');
- $hDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(B::class);
+ $container->register(DInterface::class, F::class);
+ $hDefinition = $container->register('h', H::class)->addArgument('')->addArgument('');
+ $hDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(2, $container->getDefinition('h')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class, (string) $container->getDefinition('h')->getArgument(0));
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface::class, (string) $container->getDefinition('h')->getArgument(1));
+ $this->assertEquals(B::class, (string) $container->getDefinition('h')->getArgument(0));
+ $this->assertEquals(DInterface::class, (string) $container->getDefinition('h')->getArgument(1));
}
/**
* @group legacy
*/
public function testExceptionsAreStored()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('c1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register('c2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $container->register('c3', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CannotBeAutowired::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass(\false);
+ $container = new ContainerBuilder();
+ $container->register('c1', CollisionA::class);
+ $container->register('c2', CollisionB::class);
+ $container->register('c3', CollisionB::class);
+ $aDefinition = $container->register('a', CannotBeAutowired::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass(false);
$pass->process($container);
$this->assertCount(1, $pass->getAutowiringExceptions());
}
@@ -153,83 +159,83 @@ public function testPrivateConstructorThrowsAutowireException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Invalid service "private_service": constructor of class "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\PrivateConstructor" must be public.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->autowire('private_service', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\PrivateConstructor::class);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass(\true);
+ $container = new ContainerBuilder();
+ $container->autowire('private_service', PrivateConstructor::class);
+ $pass = new AutowirePass(true);
$pass->process($container);
}
public function testTypeCollision()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "a": argument "$collision" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\CannotBeAutowired::__construct()" references interface "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\CollisionInterface" but no such service exists. You should maybe alias this interface to one of these existing services: "c1", "c2", "c3".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('c1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register('c2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $container->register('c3', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CannotBeAutowired::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('c1', CollisionA::class);
+ $container->register('c2', CollisionB::class);
+ $container->register('c3', CollisionB::class);
+ $aDefinition = $container->register('a', CannotBeAutowired::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testTypeNotGuessable()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "a": argument "$k" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\NotGuessableArgument::__construct()" references class "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Foo" but no such service exists. You should maybe alias this class to one of these existing services: "a1", "a2".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register('a2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotGuessableArgument::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('a1', Foo::class);
+ $container->register('a2', Foo::class);
+ $aDefinition = $container->register('a', NotGuessableArgument::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testTypeNotGuessableWithSubclass()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "a": argument "$k" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\NotGuessableArgumentForSubclass::__construct()" references class "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\A" but no such service exists. You should maybe alias this class to one of these existing services: "a1", "a2".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $container->register('a2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B::class);
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotGuessableArgumentForSubclass::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('a1', B::class);
+ $container->register('a2', B::class);
+ $aDefinition = $container->register('a', NotGuessableArgumentForSubclass::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testTypeNotGuessableNoServicesFound()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "a": argument "$collision" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\CannotBeAutowired::__construct()" references interface "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\CollisionInterface" but no such service exists.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CannotBeAutowired::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $aDefinition = $container->register('a', CannotBeAutowired::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testTypeNotGuessableWithTypeSet()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register('a2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotGuessableArgument::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('a1', Foo::class);
+ $container->register('a2', Foo::class);
+ $container->register(Foo::class, Foo::class);
+ $aDefinition = $container->register('a', NotGuessableArgument::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
$this->assertCount(1, $container->getDefinition('a')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, (string) $container->getDefinition('a')->getArgument(0));
+ $this->assertEquals(Foo::class, (string) $container->getDefinition('a')->getArgument(0));
}
public function testWithTypeSet()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('c1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register('c2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $container->setAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface::class, 'c2');
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CannotBeAutowired::class);
- $aDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('c1', CollisionA::class);
+ $container->register('c2', CollisionB::class);
+ $container->setAlias(CollisionInterface::class, 'c2');
+ $aDefinition = $container->register('a', CannotBeAutowired::class);
+ $aDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
$this->assertCount(1, $container->getDefinition('a')->getArguments());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface::class, (string) $container->getDefinition('a')->getArgument(0));
+ $this->assertEquals(CollisionInterface::class, (string) $container->getDefinition('a')->getArgument(0));
}
/**
* @group legacy
@@ -238,76 +244,76 @@ public function testWithTypeSet()
*/
public function testCreateDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $coopTilleulsDefinition = $container->register('coop_tilleuls', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\LesTilleuls::class);
- $coopTilleulsDefinition->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $coopTilleulsDefinition = $container->register('coop_tilleuls', LesTilleuls::class);
+ $coopTilleulsDefinition->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
$this->assertCount(2, $container->getDefinition('coop_tilleuls')->getArguments());
$this->assertEquals('_PhpScoper5ea00cc67502b\\autowired.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Dunglas', $container->getDefinition('coop_tilleuls')->getArgument(0));
$this->assertEquals('_PhpScoper5ea00cc67502b\\autowired.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Dunglas', $container->getDefinition('coop_tilleuls')->getArgument(1));
$dunglasDefinition = $container->getDefinition('_PhpScoper5ea00cc67502b\\autowired.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Dunglas');
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class, $dunglasDefinition->getClass());
+ $this->assertEquals(Dunglas::class, $dunglasDefinition->getClass());
$this->assertFalse($dunglasDefinition->isPublic());
$this->assertCount(1, $dunglasDefinition->getArguments());
$this->assertEquals('_PhpScoper5ea00cc67502b\\autowired.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Lille', $dunglasDefinition->getArgument(0));
$lilleDefinition = $container->getDefinition('_PhpScoper5ea00cc67502b\\autowired.Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\Lille');
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class, $lilleDefinition->getClass());
+ $this->assertEquals(Lille::class, $lilleDefinition->getClass());
}
public function testResolveParameter()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setParameter('class_name', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
+ $container = new ContainerBuilder();
+ $container->setParameter('class_name', Bar::class);
+ $container->register(Foo::class);
$barDefinition = $container->register('bar', '%class_name%');
- $barDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, $container->getDefinition('bar')->getArgument(0));
+ $barDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
+ $this->assertEquals(Foo::class, $container->getDefinition('bar')->getArgument(0));
}
public function testOptionalParameter()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $optDefinition = $container->register('opt', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\OptionalParameter::class);
- $optDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Foo::class);
+ $optDefinition = $container->register('opt', OptionalParameter::class);
+ $optDefinition->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$definition = $container->getDefinition('opt');
$this->assertNull($definition->getArgument(0));
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, $definition->getArgument(1));
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, $definition->getArgument(2));
+ $this->assertEquals(A::class, $definition->getArgument(1));
+ $this->assertEquals(Foo::class, $definition->getArgument(2));
}
public function testDontTriggerAutowiring()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $container->register('bar', Bar::class);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertCount(0, $container->getDefinition('bar')->getArguments());
}
public function testClassNotFoundThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "a": argument "$r" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\BadTypeHintedArgument::__construct()" has type "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\NotARealClass" but this class was not found.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\BadTypeHintedArgument::class);
- $aDefinition->setAutowired(\true);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $aDefinition = $container->register('a', BadTypeHintedArgument::class);
+ $aDefinition->setAutowired(true);
+ $container->register(Dunglas::class, Dunglas::class);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testParentClassNotFoundThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessageRegExp('{^Cannot autowire service "a": argument "\\$r" of method "(Symfony\\\\Component\\\\DependencyInjection\\\\Tests\\\\Compiler\\\\)BadParentTypeHintedArgument::__construct\\(\\)" has type "\\1OptionalServiceClass" but this class is missing a parent class \\(Class "?Symfony\\\\Bug\\\\NotExistClass"? not found}');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $aDefinition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\BadParentTypeHintedArgument::class);
- $aDefinition->setAutowired(\true);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $aDefinition = $container->register('a', BadParentTypeHintedArgument::class);
+ $aDefinition->setAutowired(true);
+ $container->register(Dunglas::class, Dunglas::class);
+ $pass = new AutowirePass();
$pass->process($container);
}
/**
@@ -318,136 +324,136 @@ public function testParentClassNotFoundThrowsException()
*/
public function testDontUseAbstractServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class)->setAbstract(\true);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class)->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class)->setAbstract(true);
+ $container->register('foo', Foo::class);
+ $container->register('bar', Bar::class)->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
}
public function testSomeSpecificArgumentsAreSet()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class);
- $container->register('multiple', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArguments::class)->setAutowired(\true)->setArguments([1 => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), 3 => ['bar']]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', Foo::class);
+ $container->register(A::class);
+ $container->register(Dunglas::class);
+ $container->register('multiple', MultipleArguments::class)->setAutowired(true)->setArguments([1 => new Reference('foo'), 3 => ['bar']]);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$definition = $container->getDefinition('multiple');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArguments::class), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArguments::class), ['bar']], $definition->getArguments());
+ $this->assertEquals([new TypedReference(A::class, A::class, MultipleArguments::class), new Reference('foo'), new TypedReference(Dunglas::class, Dunglas::class, MultipleArguments::class), ['bar']], $definition->getArguments());
}
public function testScalarArgsCannotBeAutowired()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "arg_no_type_hint": argument "$bar" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\MultipleArguments::__construct()" is type-hinted "array", you should configure its value explicitly.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class);
- $container->register('arg_no_type_hint', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArguments::class)->setArguments([1 => 'foo'])->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Dunglas::class);
+ $container->register('arg_no_type_hint', MultipleArguments::class)->setArguments([1 => 'foo'])->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
}
public function testNoTypeArgsCannotBeAutowired()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "arg_no_type_hint": argument "$foo" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\MultipleArguments::__construct()" has no type-hint, you should configure its value explicitly.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas::class);
- $container->register('arg_no_type_hint', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArguments::class)->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Dunglas::class);
+ $container->register('arg_no_type_hint', MultipleArguments::class)->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
}
public function testOptionalScalarNotReallyOptionalUsesDefaultValue()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class);
- $definition = $container->register('not_really_optional_scalar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalarNotReallyOptional::class)->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Lille::class);
+ $definition = $container->register('not_really_optional_scalar', MultipleArgumentsOptionalScalarNotReallyOptional::class)->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$this->assertSame('default_val', $definition->getArgument(1));
}
public function testOptionalScalarArgsDontMessUpOrder()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class);
- $container->register('with_optional_scalar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalar::class)->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Lille::class);
+ $container->register('with_optional_scalar', MultipleArgumentsOptionalScalar::class)->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$definition = $container->getDefinition('with_optional_scalar');
$this->assertEquals([
- new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalar::class),
+ new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalar::class),
// use the default value
'default_val',
- new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class),
+ new TypedReference(Lille::class, Lille::class),
], $definition->getArguments());
}
public function testOptionalScalarArgsNotPassedIfLast()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class);
- $container->register('with_optional_scalar_last', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalarLast::class)->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Lille::class);
+ $container->register('with_optional_scalar_last', MultipleArgumentsOptionalScalarLast::class)->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
$definition = $container->getDefinition('with_optional_scalar_last');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalarLast::class), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalarLast::class)], $definition->getArguments());
+ $this->assertEquals([new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalarLast::class), new TypedReference(Lille::class, Lille::class, MultipleArgumentsOptionalScalarLast::class)], $definition->getArguments());
}
public function testOptionalArgsNoRequiredForCoreClasses()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \SplFileObject::class)->addArgument('foo.txt')->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', SplFileObject::class)->addArgument('foo.txt')->setAutowired(true);
+ (new AutowirePass())->process($container);
$definition = $container->getDefinition('foo');
$this->assertEquals(['foo.txt'], $definition->getArguments());
}
public function testSetterInjection()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $container->register(A::class);
+ $container->register(CollisionA::class);
+ $container->register(CollisionB::class);
// manually configure *one* call, to override autowiring
- $container->register('setter_injection', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjection::class)->setAutowired(\true)->addMethodCall('setWithCallsConfigured', ['manual_arg1', 'manual_arg2']);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container->register('setter_injection', SetterInjection::class)->setAutowired(true)->addMethodCall('setWithCallsConfigured', ['manual_arg1', 'manual_arg2']);
+ (new ResolveClassPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
+ (new AutowirePass())->process($container);
$methodCalls = $container->getDefinition('setter_injection')->getMethodCalls();
- $this->assertEquals(['setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'], \array_column($methodCalls, 0));
+ $this->assertEquals(['setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0));
// test setWithCallsConfigured args
$this->assertEquals(['manual_arg1', 'manual_arg2'], $methodCalls[0][1]);
// test setFoo args
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjection::class)], $methodCalls[1][1]);
+ $this->assertEquals([new TypedReference(Foo::class, Foo::class, SetterInjection::class)], $methodCalls[1][1]);
}
public function testWithNonExistingSetterAndAutowiring()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Invalid service "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CaseSensitiveClass": method "setLogger()" does not exist.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class)->setAutowired(\true);
+ $container = new ContainerBuilder();
+ $definition = $container->register(CaseSensitiveClass::class, CaseSensitiveClass::class)->setAutowired(true);
$definition->addMethodCall('setLogger');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ (new ResolveClassPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
+ (new AutowirePass())->process($container);
}
public function testExplicitMethodInjection()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $container->register('setter_injection', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjection::class)->setAutowired(\true)->addMethodCall('notASetter', []);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $container->register(A::class);
+ $container->register(CollisionA::class);
+ $container->register(CollisionB::class);
+ $container->register('setter_injection', SetterInjection::class)->setAutowired(true)->addMethodCall('notASetter', []);
+ (new ResolveClassPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
+ (new AutowirePass())->process($container);
$methodCalls = $container->getDefinition('setter_injection')->getMethodCalls();
- $this->assertEquals(['notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'], \array_column($methodCalls, 0));
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjection::class)], $methodCalls[0][1]);
+ $this->assertEquals(['notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0));
+ $this->assertEquals([new TypedReference(A::class, A::class, SetterInjection::class)], $methodCalls[0][1]);
}
/**
* @group legacy
@@ -455,11 +461,11 @@ public function testExplicitMethodInjection()
*/
public function testTypedReference()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class)->setProperty('a', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class)]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('bar', Bar::class)->setProperty('a', [new TypedReference(A::class, A::class, Bar::class)]);
+ $pass = new AutowirePass();
$pass->process($container);
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, $container->getDefinition('autowired.' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class)->getClass());
+ $this->assertSame(A::class, $container->getDefinition('autowired.' . A::class)->getClass());
}
/**
* @dataProvider getCreateResourceTests
@@ -467,12 +473,12 @@ public function testTypedReference()
*/
public function testCreateResourceForClass($className, $isEqual)
{
- $startingResource = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ClassForResource::class));
- $newResource = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass(new \ReflectionClass(__NAMESPACE__ . '\\' . $className));
+ $startingResource = AutowirePass::createResourceForClass(new ReflectionClass(ClassForResource::class));
+ $newResource = AutowirePass::createResourceForClass(new ReflectionClass(__NAMESPACE__ . '\\' . $className));
// hack so the objects don't differ by the class name
- $startingReflObject = new \ReflectionObject($startingResource);
+ $startingReflObject = new ReflectionObject($startingResource);
$reflProp = $startingReflObject->getProperty('class');
- $reflProp->setAccessible(\true);
+ $reflProp->setAccessible(true);
$reflProp->setValue($startingResource, __NAMESPACE__ . '\\' . $className);
if ($isEqual) {
$this->assertEquals($startingResource, $newResource);
@@ -482,31 +488,31 @@ public function testCreateResourceForClass($className, $isEqual)
}
public function getCreateResourceTests()
{
- return [['IdenticalClassResource', \true], ['ClassChangedConstructorArgs', \false]];
+ return [['IdenticalClassResource', true], ['ClassChangedConstructorArgs', false]];
}
public function testIgnoreServiceWithClassNotExisting()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('class_not_exist', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\OptionalServiceClass::class);
- $barDefinition = $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class);
- $barDefinition->setAutowired(\true);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('class_not_exist', OptionalServiceClass::class);
+ $barDefinition = $container->register('bar', Bar::class);
+ $barDefinition->setAutowired(true);
+ $container->register(Foo::class, Foo::class);
+ $pass = new AutowirePass();
$pass->process($container);
$this->assertTrue($container->hasDefinition('bar'));
}
public function testSetterInjectionCollisionThrowsException()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('c1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register('c2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $aDefinition = $container->register('setter_injection_collision', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionCollision::class);
- $aDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('c1', CollisionA::class);
+ $container->register('c2', CollisionB::class);
+ $aDefinition = $container->register('setter_injection_collision', SetterInjectionCollision::class);
+ $aDefinition->setAutowired(true);
+ (new AutowireRequiredMethodsPass())->process($container);
+ $pass = new AutowirePass();
try {
$pass->process($container);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\AutowiringFailedException $e) {
+ } catch (AutowiringFailedException $e) {
}
$this->assertNotNull($e);
$this->assertSame('Cannot autowire service "setter_injection_collision": argument "$collision" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\SetterInjectionCollision::setMultipleInstancesForOneArg()" references interface "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\CollisionInterface" but no such service exists. You should maybe alias this interface to one of these existing services: "c1", "c2".', $e->getMessage());
@@ -515,11 +521,11 @@ public function testInterfaceWithNoImplementationSuggestToWriteOne()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "my_service": argument "$i" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\K::__construct()" references interface "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\IInterface" but no such service exists. Did you create a class that implements this interface?');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $aDefinition = $container->register('my_service', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\K::class);
- $aDefinition->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $aDefinition = $container->register('my_service', K::class);
+ $aDefinition->setAutowired(true);
+ (new AutowireRequiredMethodsPass())->process($container);
+ $pass = new AutowirePass();
$pass->process($container);
}
/**
@@ -530,11 +536,11 @@ public function testInterfaceWithNoImplementationSuggestToWriteOne()
*/
public function testProcessDoesNotTriggerDeprecations()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('deprecated', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\DeprecatedClass')->setDeprecated(\true);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class)->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('deprecated', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\DeprecatedClass')->setDeprecated(true);
+ $container->register('foo', Foo::class);
+ $container->register('bar', Bar::class)->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
$this->assertTrue($container->hasDefinition('deprecated'));
$this->assertTrue($container->hasDefinition('foo'));
@@ -542,22 +548,22 @@ public function testProcessDoesNotTriggerDeprecations()
}
public function testEmptyStringIsKept()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalar::class)->setAutowired(\true)->setArguments(['', '']);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\MultipleArgumentsOptionalScalar::class), '', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille::class)], $container->getDefinition('foo')->getArguments());
+ $container = new ContainerBuilder();
+ $container->register(A::class);
+ $container->register(Lille::class);
+ $container->register('foo', MultipleArgumentsOptionalScalar::class)->setAutowired(true)->setArguments(['', '']);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
+ $this->assertEquals([new TypedReference(A::class, A::class, MultipleArgumentsOptionalScalar::class), '', new TypedReference(Lille::class, Lille::class)], $container->getDefinition('foo')->getArguments());
}
public function testWithFactory()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $definition = $container->register('a', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class)->setFactory([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, 'create'])->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class)], $definition->getArguments());
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $definition = $container->register('a', A::class)->setFactory([A::class, 'create'])->setAutowired(true);
+ (new ResolveClassPass())->process($container);
+ (new AutowirePass())->process($container);
+ $this->assertEquals([new TypedReference(Foo::class, Foo::class, A::class)], $definition->getArguments());
}
/**
* @dataProvider provideNotWireableCalls
@@ -565,16 +571,16 @@ public function testWithFactory()
public function testNotWireableCalls($method, $expectedMsg)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $foo = $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotWireable::class)->setAutowired(\true)->addMethodCall('setBar', [])->addMethodCall('setOptionalNotAutowireable', [])->addMethodCall('setOptionalNoTypeHint', [])->addMethodCall('setOptionalArgNoAutowireable', []);
+ $container = new ContainerBuilder();
+ $foo = $container->register('foo', NotWireable::class)->setAutowired(true)->addMethodCall('setBar', [])->addMethodCall('setOptionalNotAutowireable', [])->addMethodCall('setOptionalNoTypeHint', [])->addMethodCall('setOptionalArgNoAutowireable', []);
if ($method) {
$foo->addMethodCall($method, []);
}
- $this->expectException(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException::class);
+ $this->expectException(RuntimeException::class);
$this->expectExceptionMessage($expectedMsg);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass())->process($container);
+ (new ResolveClassPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
+ (new AutowirePass())->process($container);
}
public function provideNotWireableCalls()
{
@@ -588,11 +594,11 @@ public function provideNotWireableCalls()
*/
public function testByIdAlternative()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IInterface::class, 'i');
- $container->register('i', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I::class);
- $container->register('j', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\J::class)->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->setAlias(IInterface::class, 'i');
+ $container->register('i', I::class);
+ $container->register('j', J::class)->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
/**
@@ -601,46 +607,46 @@ public function testByIdAlternative()
*/
public function testTypedReferenceDeprecationNotice()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('aClass', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->setAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\AInterface::class, 'aClass');
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class)->setProperty('a', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar::class)]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container = new ContainerBuilder();
+ $container->register('aClass', A::class);
+ $container->setAlias(AInterface::class, 'aClass');
+ $container->register('bar', Bar::class)->setProperty('a', [new TypedReference(A::class, A::class, Bar::class)]);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testExceptionWhenAliasExists()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "j": argument "$i" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\J::__construct()" references class "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\I" but no such service exists. Try changing the type-hint to "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\IInterface" instead.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
// multiple I services... but there *is* IInterface available
- $container->setAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IInterface::class, 'i');
- $container->register('i', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I::class);
- $container->register('i2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I::class);
+ $container->setAlias(IInterface::class, 'i');
+ $container->register('i', I::class);
+ $container->register('i2', I::class);
// J type-hints against I concretely
- $container->register('j', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\J::class)->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container->register('j', J::class)->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testExceptionWhenAliasDoesNotExist()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\AutowiringFailedException');
$this->expectExceptionMessage('Cannot autowire service "j": argument "$i" of method "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\J::__construct()" references class "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\I" but no such service exists. You should maybe alias this class to one of these existing services: "i", "i2".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
// multiple I instances... but no IInterface alias
- $container->register('i', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I::class);
- $container->register('i2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I::class);
+ $container->register('i', I::class);
+ $container->register('i2', I::class);
// J type-hints against I concretely
- $container->register('j', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\J::class)->setAutowired(\true);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $container->register('j', J::class)->setAutowired(true);
+ $pass = new AutowirePass();
$pass->process($container);
}
public function testInlineServicesAreNotCandidates()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(\realpath(__DIR__ . '/../Fixtures/xml')));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(realpath(__DIR__ . '/../Fixtures/xml')));
$loader->load('services_inline_not_candidate.xml');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass();
+ $pass = new AutowirePass();
$pass->process($container);
$this->assertSame([], $container->getDefinition('autowired')->getArguments());
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/AutowireRequiredMethodsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
index c2cc427c9..11cb3fb42 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
@@ -14,22 +14,24 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use function array_column;
+
require_once __DIR__ . '/../Fixtures/includes/autowiring_classes.php';
-class AutowireRequiredMethodsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class AutowireRequiredMethodsPassTest extends TestCase
{
public function testSetterInjection()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $container->register(A::class);
+ $container->register(CollisionA::class);
+ $container->register(CollisionB::class);
// manually configure *one* call, to override autowiring
- $container->register('setter_injection', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjection::class)->setAutowired(\true)->addMethodCall('setWithCallsConfigured', ['manual_arg1', 'manual_arg2']);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
+ $container->register('setter_injection', SetterInjection::class)->setAutowired(true)->addMethodCall('setWithCallsConfigured', ['manual_arg1', 'manual_arg2']);
+ (new ResolveClassPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
$methodCalls = $container->getDefinition('setter_injection')->getMethodCalls();
- $this->assertEquals(['setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'], \array_column($methodCalls, 0));
+ $this->assertEquals(['setWithCallsConfigured', 'setFoo', 'setDependencies', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0));
// test setWithCallsConfigured args
$this->assertEquals(['manual_arg1', 'manual_arg2'], $methodCalls[0][1]);
// test setFoo args
@@ -37,16 +39,16 @@ public function testSetterInjection()
}
public function testExplicitMethodInjection()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionA::class);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionB::class);
- $container->register('setter_injection', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjection::class)->setAutowired(\true)->addMethodCall('notASetter', []);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register(Foo::class);
+ $container->register(A::class);
+ $container->register(CollisionA::class);
+ $container->register(CollisionB::class);
+ $container->register('setter_injection', SetterInjection::class)->setAutowired(true)->addMethodCall('notASetter', []);
+ (new ResolveClassPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
$methodCalls = $container->getDefinition('setter_injection')->getMethodCalls();
- $this->assertEquals(['notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'], \array_column($methodCalls, 0));
+ $this->assertEquals(['notASetter', 'setFoo', 'setDependencies', 'setWithCallsConfigured', 'setChildMethodWithoutDocBlock'], array_column($methodCalls, 0));
$this->assertEquals([], $methodCalls[0][1]);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/CheckArgumentsValidityPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/CheckArgumentsValidityPassTest.php
index 186afd941..d8fd8623c 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/CheckArgumentsValidityPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/CheckArgumentsValidityPassTest.php
@@ -16,15 +16,15 @@
/**
* @author Kévin Dunglas
*/
-class CheckArgumentsValidityPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class CheckArgumentsValidityPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$definition = $container->register('foo');
$definition->setArguments([null, 1, 'a']);
$definition->setMethodCalls([['bar', ['a', 'b']], ['baz', ['c', 'd']]]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass();
+ $pass = new CheckArgumentsValidityPass();
$pass->process($container);
$this->assertEquals([null, 1, 'a'], $container->getDefinition('foo')->getArguments());
$this->assertEquals([['bar', ['a', 'b']], ['baz', ['c', 'd']]], $container->getDefinition('foo')->getMethodCalls());
@@ -35,11 +35,11 @@ public function testProcess()
public function testException(array $arguments, array $methodCalls)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$definition = $container->register('foo');
$definition->setArguments($arguments);
$definition->setMethodCalls($methodCalls);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass();
+ $pass = new CheckArgumentsValidityPass();
$pass->process($container);
}
public function definitionProvider()
@@ -48,10 +48,10 @@ public function definitionProvider()
}
public function testNoException()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$definition = $container->register('foo');
$definition->setArguments([null, 'a' => 'a']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckArgumentsValidityPass(\false);
+ $pass = new CheckArgumentsValidityPass(false);
$pass->process($container);
$this->assertCount(1, $definition->getErrors());
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/CheckCircularReferencesPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/CheckCircularReferencesPassTest.php
index 2813ba20c..e6a66e0eb 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/CheckCircularReferencesPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/CheckCircularReferencesPassTest.php
@@ -17,21 +17,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class CheckCircularReferencesPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class CheckCircularReferencesPassTest extends TestCase
{
public function testProcess()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
+ $container->register('b')->addArgument(new Reference('a'));
$this->process($container);
}
public function testProcessWithAliases()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
$container->setAlias('b', 'c');
$container->setAlias('c', 'a');
$this->process($container);
@@ -39,69 +39,69 @@ public function testProcessWithAliases()
public function testProcessWithFactory()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a', 'stdClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), 'getInstance']);
- $container->register('b', 'stdClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'), 'getInstance']);
+ $container = new ContainerBuilder();
+ $container->register('a', 'stdClass')->setFactory([new Reference('b'), 'getInstance']);
+ $container->register('b', 'stdClass')->setFactory([new Reference('a'), 'getInstance']);
$this->process($container);
}
public function testProcessDetectsIndirectCircularReference()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'));
- $container->register('c')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
+ $container->register('b')->addArgument(new Reference('c'));
+ $container->register('c')->addArgument(new Reference('a'));
$this->process($container);
}
public function testProcessDetectsIndirectCircularReferenceWithFactory()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b', 'stdClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'), 'getInstance']);
- $container->register('c')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
+ $container->register('b', 'stdClass')->setFactory([new Reference('c'), 'getInstance']);
+ $container->register('c')->addArgument(new Reference('a'));
$this->process($container);
}
public function testDeepCircularReference()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'));
- $container->register('c')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
+ $container->register('b')->addArgument(new Reference('c'));
+ $container->register('c')->addArgument(new Reference('b'));
$this->process($container);
}
public function testProcessIgnoresMethodCalls()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addMethodCall('setA', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]);
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
+ $container->register('b')->addMethodCall('setA', [new Reference('a')]);
$this->process($container);
$this->addToAssertionCount(1);
}
public function testProcessIgnoresLazyServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->setLazy(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'));
+ $container = new ContainerBuilder();
+ $container->register('a')->setLazy(true)->addArgument(new Reference('b'));
+ $container->register('b')->addArgument(new Reference('a'));
$this->process($container);
// just make sure that a lazily loaded service does not trigger a CircularReferenceException
$this->addToAssertionCount(1);
}
public function testProcessIgnoresIteratorArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
+ $container->register('b')->addArgument(new IteratorArgument([new Reference('a')]));
$this->process($container);
// just make sure that an IteratorArgument does not trigger a CircularReferenceException
$this->addToAssertionCount(1);
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $compiler = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\Compiler();
+ $compiler = new Compiler();
$passConfig = $compiler->getPassConfig();
- $passConfig->setOptimizationPasses([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass()]);
+ $passConfig->setOptimizationPasses([new AnalyzeServiceReferencesPass(true), new CheckCircularReferencesPass()]);
$passConfig->setRemovingPasses([]);
$compiler->compile($container);
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/CheckDefinitionValidityPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/CheckDefinitionValidityPassTest.php
index 859a1ee0f..da9472a20 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/CheckDefinitionValidityPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/CheckDefinitionValidityPassTest.php
@@ -13,35 +13,35 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class CheckDefinitionValidityPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class CheckDefinitionValidityPassTest extends TestCase
{
public function testProcessDetectsSyntheticNonPublicDefinitions()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->setSynthetic(\true)->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->register('a')->setSynthetic(true)->setPublic(false);
$this->process($container);
}
public function testProcessDetectsNonSyntheticNonAbstractDefinitionWithoutClass()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->setSynthetic(\false)->setAbstract(\false);
+ $container = new ContainerBuilder();
+ $container->register('a')->setSynthetic(false)->setAbstract(false);
$this->process($container);
}
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a', 'class');
- $container->register('b', 'class')->setSynthetic(\true)->setPublic(\true);
- $container->register('c', 'class')->setAbstract(\true);
- $container->register('d', 'class')->setSynthetic(\true);
+ $container->register('b', 'class')->setSynthetic(true)->setPublic(true);
+ $container->register('c', 'class')->setAbstract(true);
+ $container->register('d', 'class')->setSynthetic(true);
$this->process($container);
$this->addToAssertionCount(1);
}
public function testValidTags()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a', 'class')->addTag('foo', ['bar' => 'baz']);
$container->register('b', 'class')->addTag('foo', ['bar' => null]);
$container->register('c', 'class')->addTag('foo', ['bar' => 1]);
@@ -52,38 +52,38 @@ public function testValidTags()
public function testInvalidTags()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a', 'class')->addTag('foo', ['bar' => ['baz' => 'baz']]);
$this->process($container);
}
public function testDynamicPublicServiceName()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$env = $container->getParameterBag()->get('env(BAR)');
- $container->register("foo.{$env}", 'class')->setPublic(\true);
+ $container->register("foo.{$env}", 'class')->setPublic(true);
$this->process($container);
}
public function testDynamicPublicAliasName()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$env = $container->getParameterBag()->get('env(BAR)');
- $container->setAlias("foo.{$env}", 'class')->setPublic(\true);
+ $container->setAlias("foo.{$env}", 'class')->setPublic(true);
$this->process($container);
}
public function testDynamicPrivateName()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$env = $container->getParameterBag()->get('env(BAR)');
$container->register("foo.{$env}", 'class');
$container->setAlias("bar.{$env}", 'class');
$this->process($container);
$this->addToAssertionCount(1);
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckDefinitionValidityPass();
+ $pass = new CheckDefinitionValidityPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php
index fe6ca3af9..7f29946fc 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php
@@ -16,12 +16,12 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class CheckExceptionOnInvalidReferenceBehaviorPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class CheckExceptionOnInvalidReferenceBehaviorPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
+ $container = new ContainerBuilder();
+ $container->register('a', '\\stdClass')->addArgument(new Reference('b'));
$container->register('b', '\\stdClass');
$this->process($container);
$this->addToAssertionCount(1);
@@ -29,29 +29,29 @@ public function testProcess()
public function testProcessThrowsExceptionOnInvalidReference()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
+ $container = new ContainerBuilder();
+ $container->register('a', '\\stdClass')->addArgument(new Reference('b'));
$this->process($container);
}
public function testProcessThrowsExceptionOnInvalidReferenceFromInlinedDefinition()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
- $def->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
+ $container = new ContainerBuilder();
+ $def = new Definition();
+ $def->addArgument(new Reference('b'));
$container->register('a', '\\stdClass')->addArgument($def);
$this->process($container);
}
public function testProcessDefinitionWithBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('b')->setBindings([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'))]);
+ $container = new ContainerBuilder();
+ $container->register('b')->setBindings([new BoundArgument(new Reference('a'))]);
$this->process($container);
$this->addToAssertionCount(1);
}
- private function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ private function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass();
+ $pass = new CheckExceptionOnInvalidReferenceBehaviorPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/CheckReferenceValidityPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/CheckReferenceValidityPassTest.php
index 98628a8a2..da812cf41 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/CheckReferenceValidityPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/CheckReferenceValidityPassTest.php
@@ -14,27 +14,27 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class CheckReferenceValidityPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class CheckReferenceValidityPassTest extends TestCase
{
public function testProcessDetectsReferenceToAbstractDefinition()
{
$this->expectException('RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->setAbstract(\true);
- $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'));
+ $container = new ContainerBuilder();
+ $container->register('a')->setAbstract(true);
+ $container->register('b')->addArgument(new Reference('a'));
$this->process($container);
}
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
+ $container = new ContainerBuilder();
+ $container->register('a')->addArgument(new Reference('b'));
$container->register('b');
$this->process($container);
$this->addToAssertionCount(1);
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CheckReferenceValidityPass();
+ $pass = new CheckReferenceValidityPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/DecoratorServicePassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/DecoratorServicePassTest.php
index 3255b0510..f95a7e234 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/DecoratorServicePassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/DecoratorServicePassTest.php
@@ -14,15 +14,15 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class DecoratorServicePassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class DecoratorServicePassTest extends TestCase
{
public function testProcessWithoutAlias()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $fooDefinition = $container->register('foo')->setPublic(\false);
- $fooExtendedDefinition = $container->register('foo.extended')->setPublic(\true)->setDecoratedService('foo');
- $barDefinition = $container->register('bar')->setPublic(\true);
- $barExtendedDefinition = $container->register('bar.extended')->setPublic(\true)->setDecoratedService('bar', 'bar.yoo');
+ $container = new ContainerBuilder();
+ $fooDefinition = $container->register('foo')->setPublic(false);
+ $fooExtendedDefinition = $container->register('foo.extended')->setPublic(true)->setDecoratedService('foo');
+ $barDefinition = $container->register('bar')->setPublic(true);
+ $barExtendedDefinition = $container->register('bar.extended')->setPublic(true)->setDecoratedService('bar', 'bar.yoo');
$this->process($container);
$this->assertEquals('foo.extended', $container->getAlias('foo'));
$this->assertFalse($container->getAlias('foo')->isPublic());
@@ -37,10 +37,10 @@ public function testProcessWithoutAlias()
}
public function testProcessWithAlias()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\true);
- $container->setAlias('foo.alias', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('foo', \false));
- $fooExtendedDefinition = $container->register('foo.extended')->setPublic(\true)->setDecoratedService('foo.alias');
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(true);
+ $container->setAlias('foo.alias', new Alias('foo', false));
+ $fooExtendedDefinition = $container->register('foo.extended')->setPublic(true)->setDecoratedService('foo.alias');
$this->process($container);
$this->assertEquals('foo.extended', $container->getAlias('foo.alias'));
$this->assertFalse($container->getAlias('foo.alias')->isPublic());
@@ -50,11 +50,11 @@ public function testProcessWithAlias()
}
public function testProcessWithPriority()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $fooDefinition = $container->register('foo')->setPublic(\false);
- $barDefinition = $container->register('bar')->setPublic(\true)->setDecoratedService('foo');
- $bazDefinition = $container->register('baz')->setPublic(\true)->setDecoratedService('foo', null, 5);
- $quxDefinition = $container->register('qux')->setPublic(\true)->setDecoratedService('foo', null, 3);
+ $container = new ContainerBuilder();
+ $fooDefinition = $container->register('foo')->setPublic(false);
+ $barDefinition = $container->register('bar')->setPublic(true)->setDecoratedService('foo');
+ $bazDefinition = $container->register('baz')->setPublic(true)->setDecoratedService('foo', null, 5);
+ $quxDefinition = $container->register('qux')->setPublic(true)->setDecoratedService('foo', null, 3);
$this->process($container);
$this->assertEquals('bar', $container->getAlias('foo'));
$this->assertFalse($container->getAlias('foo')->isPublic());
@@ -70,7 +70,7 @@ public function testProcessWithPriority()
}
public function testProcessMovesTagsFromDecoratedDefinitionToDecoratingDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('foo')->setTags(['bar' => ['attr' => 'baz']]);
$container->register('baz')->setTags(['foobar' => ['attr' => 'bar']])->setDecoratedService('foo');
$this->process($container);
@@ -82,7 +82,7 @@ public function testProcessMovesTagsFromDecoratedDefinitionToDecoratingDefinitio
*/
public function testProcessMergesAutowiringTypesInDecoratingDefinitionAndRemoveThemFromDecoratedDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addAutowiringType('Bar');
$container->register('child')->setDecoratedService('parent')->addAutowiringType('Foo');
$this->process($container);
@@ -91,17 +91,17 @@ public function testProcessMergesAutowiringTypesInDecoratingDefinitionAndRemoveT
}
public function testProcessMovesTagsFromDecoratedDefinitionToDecoratingDefinitionMultipleTimes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\true)->setTags(['bar' => ['attr' => 'baz']]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(true)->setTags(['bar' => ['attr' => 'baz']]);
$container->register('deco1')->setDecoratedService('foo', null, 50);
$container->register('deco2')->setDecoratedService('foo', null, 2);
$this->process($container);
$this->assertEmpty($container->getDefinition('deco1')->getTags());
$this->assertEquals(['bar' => ['attr' => 'baz']], $container->getDefinition('deco2')->getTags());
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $repeatedPass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DecoratorServicePass();
+ $repeatedPass = new DecoratorServicePass();
$repeatedPass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/DefinitionErrorExceptionPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/DefinitionErrorExceptionPassTest.php
index 127be7a00..ea6df0ed3 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/DefinitionErrorExceptionPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/DefinitionErrorExceptionPassTest.php
@@ -14,26 +14,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-class DefinitionErrorExceptionPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class DefinitionErrorExceptionPassTest extends TestCase
{
public function testThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Things went wrong!');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $container = new ContainerBuilder();
+ $def = new Definition();
$def->addError('Things went wrong!');
$def->addError('Now something else!');
$container->register('foo_service_id')->setArguments([$def]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass();
+ $pass = new DefinitionErrorExceptionPass();
$pass->process($container);
}
public function testNoExceptionThrown()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $container = new ContainerBuilder();
+ $def = new Definition();
$container->register('foo_service_id')->setArguments([$def]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass();
+ $pass = new DefinitionErrorExceptionPass();
$pass->process($container);
$this->assertSame($def, $container->getDefinition('foo_service_id')->getArgument(0));
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ExtensionCompilerPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ExtensionCompilerPassTest.php
index 42dc961c4..b6c31e231 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ExtensionCompilerPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ExtensionCompilerPassTest.php
@@ -18,21 +18,21 @@
/**
* @author Wouter J
*/
-class ExtensionCompilerPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ExtensionCompilerPassTest extends TestCase
{
private $container;
private $pass;
protected function setUp()
{
- $this->container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $this->pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ExtensionCompilerPass();
+ $this->container = new ContainerBuilder();
+ $this->pass = new ExtensionCompilerPass();
}
public function testProcess()
{
- $extension1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CompilerPassExtension('extension1');
- $extension2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DummyExtension('extension2');
- $extension3 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DummyExtension('extension3');
- $extension4 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CompilerPassExtension('extension4');
+ $extension1 = new CompilerPassExtension('extension1');
+ $extension2 = new DummyExtension('extension2');
+ $extension3 = new DummyExtension('extension3');
+ $extension4 = new CompilerPassExtension('extension4');
$this->container->registerExtension($extension1);
$this->container->registerExtension($extension2);
$this->container->registerExtension($extension3);
@@ -44,7 +44,7 @@ public function testProcess()
$this->assertTrue($this->container->hasDefinition('extension4'));
}
}
-class DummyExtension extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension
+class DummyExtension extends Extension
{
private $alias;
public function __construct($alias)
@@ -55,14 +55,14 @@ public function getAlias()
{
return $this->alias;
}
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
}
- public function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function process(ContainerBuilder $container)
{
$container->register($this->alias);
}
}
-class CompilerPassExtension extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DummyExtension implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface
+class CompilerPassExtension extends DummyExtension implements CompilerPassInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/FactoryReturnTypePassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/FactoryReturnTypePassTest.php
index 6c17f5d72..f0f699dba 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/FactoryReturnTypePassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/FactoryReturnTypePassTest.php
@@ -17,28 +17,33 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\factoryFunction;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryParent;
+use ReflectionMethod;
+use stdClass;
+use function defined;
+use function method_exists;
+
/**
* @author Guilhem N.
*
* @group legacy
*/
-class FactoryReturnTypePassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class FactoryReturnTypePassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$factory = $container->register('factory');
- $factory->setFactory([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, 'createFactory']);
+ $factory->setFactory([FactoryDummy::class, 'createFactory']);
$container->setAlias('alias_factory', 'factory');
$foo = $container->register('foo');
- $foo->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('alias_factory'), 'create']);
+ $foo->setFactory([new Reference('alias_factory'), 'create']);
$bar = $container->register('bar', __CLASS__);
- $bar->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('factory'), 'create']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\FactoryReturnTypePass();
+ $bar->setFactory([new Reference('factory'), 'create']);
+ $pass = new FactoryReturnTypePass();
$pass->process($container);
- if (\method_exists(\ReflectionMethod::class, 'getReturnType')) {
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, $factory->getClass());
- $this->assertEquals(\stdClass::class, $foo->getClass());
+ if (method_exists(ReflectionMethod::class, 'getReturnType')) {
+ $this->assertEquals(FactoryDummy::class, $factory->getClass());
+ $this->assertEquals(stdClass::class, $foo->getClass());
} else {
$this->assertNull($factory->getClass());
$this->assertNull($foo->getClass());
@@ -48,17 +53,17 @@ public function testProcess()
/**
* @dataProvider returnTypesProvider
*/
- public function testReturnTypes($factory, $returnType, $hhvmSupport = \true)
+ public function testReturnTypes($factory, $returnType, $hhvmSupport = true)
{
- if (!$hhvmSupport && \defined('HHVM_VERSION')) {
+ if (!$hhvmSupport && defined('HHVM_VERSION')) {
$this->markTestSkipped('Scalar typehints not supported by hhvm.');
}
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$service = $container->register('service');
$service->setFactory($factory);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\FactoryReturnTypePass();
+ $pass = new FactoryReturnTypePass();
$pass->process($container);
- if (\method_exists(\ReflectionMethod::class, 'getReturnType')) {
+ if (method_exists(ReflectionMethod::class, 'getReturnType')) {
$this->assertEquals($returnType, $service->getClass());
} else {
$this->assertNull($service->getClass());
@@ -68,20 +73,20 @@ public function returnTypesProvider()
{
return [
// must be loaded before the function as they are in the same file
- [[\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, 'createBuiltin'], null, \false],
- [[\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, 'createParent'], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryParent::class],
- [[\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, 'createSelf'], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class],
- [\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\factoryFunction::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class],
+ [[FactoryDummy::class, 'createBuiltin'], null, false],
+ [[FactoryDummy::class, 'createParent'], FactoryParent::class],
+ [[FactoryDummy::class, 'createSelf'], FactoryDummy::class],
+ [factoryFunction::class, FactoryDummy::class],
];
}
public function testCircularReference()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$factory = $container->register('factory');
- $factory->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('factory2'), 'createSelf']);
+ $factory->setFactory([new Reference('factory2'), 'createSelf']);
$factory2 = $container->register('factory2');
- $factory2->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('factory'), 'create']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\FactoryReturnTypePass();
+ $factory2->setFactory([new Reference('factory'), 'create']);
+ $pass = new FactoryReturnTypePass();
$pass->process($container);
$this->assertNull($factory->getClass());
$this->assertNull($factory2->getClass());
@@ -92,10 +97,10 @@ public function testCircularReference()
*/
public function testCompile()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$factory = $container->register('factory');
- $factory->setFactory([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, 'createFactory']);
+ $factory->setFactory([FactoryDummy::class, 'createFactory']);
$container->compile();
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy::class, $container->getDefinition('factory')->getClass());
+ $this->assertEquals(FactoryDummy::class, $container->getDefinition('factory')->getClass());
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php
index ff8ee059d..a00e1312f 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/InlineServiceDefinitionsPassTest.php
@@ -19,13 +19,13 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class InlineServiceDefinitionsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class InlineServiceDefinitionsPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('inlinable.service')->setPublic(\false);
- $container->register('service')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('inlinable.service')]);
+ $container = new ContainerBuilder();
+ $container->register('inlinable.service')->setPublic(false);
+ $container->register('service')->setArguments([new Reference('inlinable.service')]);
$this->process($container);
$arguments = $container->getDefinition('service')->getArguments();
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', $arguments[0]);
@@ -33,21 +33,21 @@ public function testProcess()
}
public function testProcessDoesNotInlinesWhenAliasedServiceIsShared()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(false);
$container->setAlias('moo', 'foo');
- $container->register('service')->setArguments([$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
+ $container->register('service')->setArguments([$ref = new Reference('foo')]);
$this->process($container);
$arguments = $container->getDefinition('service')->getArguments();
$this->assertSame($ref, $arguments[0]);
}
public function testProcessDoesInlineNonSharedService()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setShared(\false);
- $container->register('bar')->setPublic(\false)->setShared(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setShared(false);
+ $container->register('bar')->setPublic(false)->setShared(false);
$container->setAlias('moo', 'bar');
- $container->register('service')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), $ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('moo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]);
+ $container->register('service')->setArguments([new Reference('foo'), $ref = new Reference('moo'), new Reference('bar')]);
$this->process($container);
$arguments = $container->getDefinition('service')->getArguments();
$this->assertEquals($container->getDefinition('foo'), $arguments[0]);
@@ -58,28 +58,28 @@ public function testProcessDoesInlineNonSharedService()
}
public function testProcessDoesNotInlineMixedServicesLoop()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'))->setShared(\false);
- $container->register('bar')->setPublic(\false)->addMethodCall('setFoo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->addArgument(new Reference('bar'))->setShared(false);
+ $container->register('bar')->setPublic(false)->addMethodCall('setFoo', [new Reference('foo')]);
$this->process($container);
- $this->assertEquals(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), $container->getDefinition('foo')->getArgument(0));
+ $this->assertEquals(new Reference('bar'), $container->getDefinition('foo')->getArgument(0));
}
public function testProcessThrowsOnNonSharedLoops()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
$this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> foo -> bar".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'))->setShared(\false);
- $container->register('bar')->setShared(\false)->addMethodCall('setFoo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->addArgument(new Reference('bar'))->setShared(false);
+ $container->register('bar')->setShared(false)->addMethodCall('setFoo', [new Reference('foo')]);
$this->process($container);
}
public function testProcessNestedNonSharedServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar1'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar2'));
- $container->register('bar1')->setShared(\false)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'));
- $container->register('bar2')->setShared(\false)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'));
- $container->register('baz')->setShared(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo')->addArgument(new Reference('bar1'))->addArgument(new Reference('bar2'));
+ $container->register('bar1')->setShared(false)->addArgument(new Reference('baz'));
+ $container->register('bar2')->setShared(false)->addArgument(new Reference('baz'));
+ $container->register('baz')->setShared(false);
$this->process($container);
$baz1 = $container->getDefinition('foo')->getArgument(0)->getArgument(0);
$baz2 = $container->getDefinition('foo')->getArgument(1)->getArgument(0);
@@ -89,9 +89,9 @@ public function testProcessNestedNonSharedServices()
}
public function testProcessInlinesIfMultipleReferencesButAllFromTheSameDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $a = $container->register('a')->setPublic(\false);
- $b = $container->register('b')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(null, [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]));
+ $container = new ContainerBuilder();
+ $a = $container->register('a')->setPublic(false);
+ $b = $container->register('b')->addArgument(new Reference('a'))->addArgument(new Definition(null, [new Reference('a')]));
$this->process($container);
$arguments = $b->getArguments();
$this->assertSame($a, $arguments[0]);
@@ -100,20 +100,20 @@ public function testProcessInlinesIfMultipleReferencesButAllFromTheSameDefinitio
}
public function testProcessInlinesPrivateFactoryReference()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('a')->setPublic(\false);
- $b = $container->register('b')->setPublic(\false)->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'), 'a']);
- $container->register('foo')->setArguments([$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b')]);
+ $container = new ContainerBuilder();
+ $container->register('a')->setPublic(false);
+ $b = $container->register('b')->setPublic(false)->setFactory([new Reference('a'), 'a']);
+ $container->register('foo')->setArguments([$ref = new Reference('b')]);
$this->process($container);
$inlinedArguments = $container->getDefinition('foo')->getArguments();
$this->assertSame($b, $inlinedArguments[0]);
}
public function testProcessDoesNotInlinePrivateFactoryIfReferencedMultipleTimesWithinTheSameDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $container->register('b')->setPublic(\false)->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'), 'a']);
- $container->register('foo')->setArguments([$ref1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), $ref2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b')]);
+ $container->register('b')->setPublic(false)->setFactory([new Reference('a'), 'a']);
+ $container->register('foo')->setArguments([$ref1 = new Reference('b'), $ref2 = new Reference('b')]);
$this->process($container);
$args = $container->getDefinition('foo')->getArguments();
$this->assertSame($ref1, $args[0]);
@@ -121,46 +121,46 @@ public function testProcessDoesNotInlinePrivateFactoryIfReferencedMultipleTimesW
}
public function testProcessDoesNotInlineReferenceWhenUsedByInlineFactory()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $container->register('b')->setPublic(\false)->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a'), 'a']);
- $inlineFactory = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
- $inlineFactory->setPublic(\false);
- $inlineFactory->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), 'b']);
- $container->register('foo')->setArguments([$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), $inlineFactory]);
+ $container->register('b')->setPublic(false)->setFactory([new Reference('a'), 'a']);
+ $inlineFactory = new Definition();
+ $inlineFactory->setPublic(false);
+ $inlineFactory->setFactory([new Reference('b'), 'b']);
+ $container->register('foo')->setArguments([$ref = new Reference('b'), $inlineFactory]);
$this->process($container);
$args = $container->getDefinition('foo')->getArguments();
$this->assertSame($ref, $args[0]);
}
public function testProcessDoesNotInlineWhenServiceIsPrivateButLazy()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\false)->setLazy(\true);
- $container->register('service')->setArguments([$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(false)->setLazy(true);
+ $container->register('service')->setArguments([$ref = new Reference('foo')]);
$this->process($container);
$arguments = $container->getDefinition('service')->getArguments();
$this->assertSame($ref, $arguments[0]);
}
public function testProcessDoesNotInlineWhenServiceReferencesItself()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\false)->addMethodCall('foo', [$ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(false)->addMethodCall('foo', [$ref = new Reference('foo')]);
$this->process($container);
$calls = $container->getDefinition('foo')->getMethodCalls();
$this->assertSame($ref, $calls[0][1][0]);
}
public function testProcessDoesNotSetLazyArgumentValuesAfterInlining()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('inline')->setShared(\false);
- $container->register('service-closure')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('inline'))]);
- $container->register('iterator')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('inline')])]);
+ $container = new ContainerBuilder();
+ $container->register('inline')->setShared(false);
+ $container->register('service-closure')->setArguments([new ServiceClosureArgument(new Reference('inline'))]);
+ $container->register('iterator')->setArguments([new IteratorArgument([new Reference('inline')])]);
$this->process($container);
$values = $container->getDefinition('service-closure')->getArgument(0)->getValues();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $values[0]);
+ $this->assertInstanceOf(Reference::class, $values[0]);
$this->assertSame('inline', (string) $values[0]);
$values = $container->getDefinition('iterator')->getArgument(0)->getValues();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $values[0]);
+ $this->assertInstanceOf(Reference::class, $values[0]);
$this->assertSame('inline', (string) $values[0]);
}
/**
@@ -168,18 +168,18 @@ public function testProcessDoesNotSetLazyArgumentValuesAfterInlining()
*/
public function testGetInlinedServiceIdData()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('inlinable.service')->setPublic(\false);
- $container->register('non_inlinable.service')->setPublic(\true);
- $container->register('other_service')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('inlinable.service')]);
- $inlinePass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass();
- $repeatedPass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(), $inlinePass]);
+ $container = new ContainerBuilder();
+ $container->register('inlinable.service')->setPublic(false);
+ $container->register('non_inlinable.service')->setPublic(true);
+ $container->register('other_service')->setArguments([new Reference('inlinable.service')]);
+ $inlinePass = new InlineServiceDefinitionsPass();
+ $repeatedPass = new RepeatedPass([new AnalyzeServiceReferencesPass(), $inlinePass]);
$repeatedPass->process($container);
$this->assertEquals(['inlinable.service' => ['other_service']], $inlinePass->getInlinedServiceIds());
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $repeatedPass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\InlineServiceDefinitionsPass()]);
+ $repeatedPass = new RepeatedPass([new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass()]);
$repeatedPass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php
index c6d5ad79e..633bca361 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php
@@ -20,7 +20,7 @@
/**
* This class tests the integration of the different compiler passes.
*/
-class IntegrationTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class IntegrationTest extends TestCase
{
/**
* This tests that dependencies are correctly processed.
@@ -33,11 +33,11 @@ class IntegrationTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCas
*/
public function testProcessRemovesAndInlinesRecursively()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $a = $container->register('a', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'));
- $container->register('b', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'))->setPublic(\false);
- $c = $container->register('c', '\\stdClass')->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $a = $container->register('a', '\\stdClass')->addArgument(new Reference('c'));
+ $container->register('b', '\\stdClass')->addArgument(new Reference('c'))->setPublic(false);
+ $c = $container->register('c', '\\stdClass')->setPublic(false);
$container->compile();
$this->assertTrue($container->hasDefinition('a'));
$arguments = $a->getArguments();
@@ -47,11 +47,11 @@ public function testProcessRemovesAndInlinesRecursively()
}
public function testProcessInlinesReferencesToAliases()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $a = $container->register('a', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'));
- $container->setAlias('b', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('c', \false));
- $c = $container->register('c', '\\stdClass')->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $a = $container->register('a', '\\stdClass')->addArgument(new Reference('b'));
+ $container->setAlias('b', new Alias('c', false));
+ $c = $container->register('c', '\\stdClass')->setPublic(false);
$container->compile();
$this->assertTrue($container->hasDefinition('a'));
$arguments = $a->getArguments();
@@ -61,11 +61,11 @@ public function testProcessInlinesReferencesToAliases()
}
public function testProcessInlinesWhenThereAreMultipleReferencesButFromTheSameDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $container->register('a', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'))->addMethodCall('setC', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c')]);
- $container->register('b', '\\stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'))->setPublic(\false);
- $container->register('c', '\\stdClass')->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $container->register('a', '\\stdClass')->addArgument(new Reference('b'))->addMethodCall('setC', [new Reference('c')]);
+ $container->register('b', '\\stdClass')->addArgument(new Reference('c'))->setPublic(false);
+ $container->register('c', '\\stdClass')->setPublic(false);
$container->compile();
$this->assertTrue($container->hasDefinition('a'));
$this->assertFalse($container->hasDefinition('b'));
@@ -73,28 +73,28 @@ public function testProcessInlinesWhenThereAreMultipleReferencesButFromTheSameDe
}
public function testCanDecorateServiceSubscriber()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ServiceSubscriberStub::class)->addTag('container.service_subscriber')->setPublic(\true);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DecoratedServiceSubscriber::class)->setDecoratedService(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ServiceSubscriberStub::class);
+ $container = new ContainerBuilder();
+ $container->register(ServiceSubscriberStub::class)->addTag('container.service_subscriber')->setPublic(true);
+ $container->register(DecoratedServiceSubscriber::class)->setDecoratedService(ServiceSubscriberStub::class);
$container->compile();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DecoratedServiceSubscriber::class, $container->get(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ServiceSubscriberStub::class));
+ $this->assertInstanceOf(DecoratedServiceSubscriber::class, $container->get(ServiceSubscriberStub::class));
}
/**
* @dataProvider getYamlCompileTests
*/
- public function testYamlContainerCompiles($directory, $actualServiceId, $expectedServiceId, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $mainContainer = null)
+ public function testYamlContainerCompiles($directory, $actualServiceId, $expectedServiceId, ContainerBuilder $mainContainer = null)
{
// allow a container to be passed in, which might have autoconfigure settings
- $container = $mainContainer ?: new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(__DIR__ . '/../Fixtures/yaml/integration/' . $directory));
+ $container = $mainContainer ?: new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Fixtures/yaml/integration/' . $directory));
$loader->load('main.yml');
$container->compile();
$actualService = $container->getDefinition($actualServiceId);
// create a fresh ContainerBuilder, to avoid autoconfigure stuff
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(__DIR__ . '/../Fixtures/yaml/integration/' . $directory));
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Fixtures/yaml/integration/' . $directory));
$loader->load('expected.yml');
$container->compile();
$expectedService = $container->getDefinition($expectedServiceId);
@@ -105,14 +105,14 @@ public function testYamlContainerCompiles($directory, $actualServiceId, $expecte
}
public function getYamlCompileTests()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerForAutoconfiguration(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IntegrationTestStub::class);
+ $container = new ContainerBuilder();
+ $container->registerForAutoconfiguration(IntegrationTestStub::class);
(yield ['autoconfigure_child_not_applied', 'child_service', 'child_service_expected', $container]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerForAutoconfiguration(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IntegrationTestStub::class);
+ $container = new ContainerBuilder();
+ $container->registerForAutoconfiguration(IntegrationTestStub::class);
(yield ['autoconfigure_parent_child', 'child_service', 'child_service_expected', $container]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerForAutoconfiguration(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IntegrationTestStub::class)->addTag('from_autoconfigure');
+ $container = new ContainerBuilder();
+ $container->registerForAutoconfiguration(IntegrationTestStub::class)->addTag('from_autoconfigure');
(yield ['autoconfigure_parent_child_tags', 'child_service', 'child_service_expected', $container]);
(yield ['child_parent', 'child_service', 'child_service_expected']);
(yield ['defaults_child_tags', 'child_service', 'child_service_expected']);
@@ -121,7 +121,7 @@ public function getYamlCompileTests()
(yield ['instanceof_parent_child', 'child_service', 'child_service_expected']);
}
}
-class ServiceSubscriberStub implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface
+class ServiceSubscriberStub implements ServiceSubscriberInterface
{
public static function getSubscribedServices()
{
@@ -131,7 +131,7 @@ public static function getSubscribedServices()
class DecoratedServiceSubscriber
{
}
-class IntegrationTestStub extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IntegrationTestStubParent
+class IntegrationTestStub extends IntegrationTestStubParent
{
}
class IntegrationTestStubParent
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/MergeExtensionConfigurationPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
index 0a48710dc..86ad5896f 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/MergeExtensionConfigurationPassTest.php
@@ -19,103 +19,106 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-class MergeExtensionConfigurationPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use function array_keys;
+
+class MergeExtensionConfigurationPassTest extends TestCase
{
public function testExpressionLanguageProviderForwarding()
{
$tmpProviders = [];
$extension = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
- $extension->expects($this->any())->method('getXsdValidationBasePath')->willReturn(\false);
+ $extension->expects($this->any())->method('getXsdValidationBasePath')->willReturn(false);
$extension->expects($this->any())->method('getNamespace')->willReturn('http://example.org/schema/dic/foo');
$extension->expects($this->any())->method('getAlias')->willReturn('foo');
- $extension->expects($this->once())->method('load')->willReturnCallback(function (array $config, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container) use(&$tmpProviders) {
+ $extension->expects($this->once())->method('load')->willReturnCallback(function (array $config, ContainerBuilder $container) use(&$tmpProviders) {
$tmpProviders = $container->getExpressionLanguageProviders();
});
$provider = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ExpressionFunctionProviderInterface')->getMock();
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag());
+ $container = new ContainerBuilder(new ParameterBag());
$container->registerExtension($extension);
- $container->prependExtensionConfig('foo', ['bar' => \true]);
+ $container->prependExtensionConfig('foo', ['bar' => true]);
$container->addExpressionLanguageProvider($provider);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass();
+ $pass = new MergeExtensionConfigurationPass();
$pass->process($container);
$this->assertEquals([$provider], $tmpProviders);
}
public function testExtensionLoadGetAMergeExtensionConfigurationContainerBuilderInstance()
{
- $extension = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\FooExtension::class)->setMethods(['load'])->getMock();
- $extension->expects($this->once())->method('load')->with($this->isType('array'), $this->isInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder::class));
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag());
+ $extension = $this->getMockBuilder(FooExtension::class)->setMethods(['load'])->getMock();
+ $extension->expects($this->once())->method('load')->with($this->isType('array'), $this->isInstanceOf(MergeExtensionConfigurationContainerBuilder::class));
+ $container = new ContainerBuilder(new ParameterBag());
$container->registerExtension($extension);
$container->prependExtensionConfig('foo', []);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass();
+ $pass = new MergeExtensionConfigurationPass();
$pass->process($container);
}
public function testExtensionConfigurationIsTrackedByDefault()
{
- $extension = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\FooExtension::class)->setMethods(['getConfiguration'])->getMock();
- $extension->expects($this->exactly(2))->method('getConfiguration')->willReturn(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\FooConfiguration());
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag());
+ $extension = $this->getMockBuilder(FooExtension::class)->setMethods(['getConfiguration'])->getMock();
+ $extension->expects($this->exactly(2))->method('getConfiguration')->willReturn(new FooConfiguration());
+ $container = new ContainerBuilder(new ParameterBag());
$container->registerExtension($extension);
- $container->prependExtensionConfig('foo', ['bar' => \true]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass();
+ $container->prependExtensionConfig('foo', ['bar' => true]);
+ $pass = new MergeExtensionConfigurationPass();
$pass->process($container);
- $this->assertContainsEquals(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__FILE__), $container->getResources());
+ $this->assertContainsEquals(new FileResource(__FILE__), $container->getResources());
}
public function testOverriddenEnvsAreMerged()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\FooExtension());
+ $container = new ContainerBuilder();
+ $container->registerExtension(new FooExtension());
$container->prependExtensionConfig('foo', ['bar' => '%env(FOO)%']);
$container->prependExtensionConfig('foo', ['bar' => '%env(BAR)%', 'baz' => '%env(BAZ)%']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass();
+ $pass = new MergeExtensionConfigurationPass();
$pass->process($container);
- $this->assertSame(['BAZ', 'FOO'], \array_keys($container->getParameterBag()->getEnvPlaceholders()));
+ $this->assertSame(['BAZ', 'FOO'], array_keys($container->getParameterBag()->getEnvPlaceholders()));
$this->assertSame(['BAZ' => 1, 'FOO' => 0], $container->getEnvCounters());
}
public function testProcessedEnvsAreIncompatibleWithResolve()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Using a cast in "env(int:FOO)" is incompatible with resolution at compile time in "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\BarExtension". The logic in the extension should be moved to a compiler pass, or an env parameter with no cast should be used instead.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\BarExtension());
+ $container = new ContainerBuilder();
+ $container->registerExtension(new BarExtension());
$container->prependExtensionConfig('bar', []);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass())->process($container);
+ (new MergeExtensionConfigurationPass())->process($container);
}
public function testThrowingExtensionsGetMergedBag()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ThrowingExtension());
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ThrowingExtension());
$container->prependExtensionConfig('throwing', ['bar' => '%env(FOO)%']);
try {
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass();
+ $pass = new MergeExtensionConfigurationPass();
$pass->process($container);
$this->fail('An exception should have been thrown.');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
}
- $this->assertSame(['FOO'], \array_keys($container->getParameterBag()->getEnvPlaceholders()));
+ $this->assertSame(['FOO'], array_keys($container->getParameterBag()->getEnvPlaceholders()));
}
}
-class FooConfiguration implements \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\ConfigurationInterface
+class FooConfiguration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
- $treeBuilder = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Definition\Builder\TreeBuilder();
+ $treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('foo');
$rootNode->children()->scalarNode('bar')->end()->scalarNode('baz')->end()->end();
return $treeBuilder;
}
}
-class FooExtension extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension
+class FooExtension extends Extension
{
public function getAlias()
{
return 'foo';
}
- public function getConfiguration(array $config, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function getConfiguration(array $config, ContainerBuilder $container)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\FooConfiguration();
+ return new FooConfiguration();
}
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfiguration($configuration, $configs);
@@ -125,25 +128,25 @@ public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\
}
}
}
-class BarExtension extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension
+class BarExtension extends Extension
{
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
- $container->resolveEnvPlaceholders('%env(int:FOO)%', \true);
+ $container->resolveEnvPlaceholders('%env(int:FOO)%', true);
}
}
-class ThrowingExtension extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension
+class ThrowingExtension extends Extension
{
public function getAlias()
{
return 'throwing';
}
- public function getConfiguration(array $config, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function getConfiguration(array $config, ContainerBuilder $container)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\FooConfiguration();
+ return new FooConfiguration();
}
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
- throw new \Exception();
+ throw new Exception();
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/OptionalServiceClass.php b/vendor/symfony/dependency-injection/Tests/Compiler/OptionalServiceClass.php
index 147af1e25..7359d35a1 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/OptionalServiceClass.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/OptionalServiceClass.php
@@ -11,6 +11,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler;
use _PhpScoper5ea00cc67502b\Symfony\Bug\NotExistClass;
-class OptionalServiceClass extends \_PhpScoper5ea00cc67502b\Symfony\Bug\NotExistClass
+class OptionalServiceClass extends NotExistClass
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/PassConfigTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/PassConfigTest.php
index 103262b1e..57a91e915 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/PassConfigTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/PassConfigTest.php
@@ -16,16 +16,16 @@
/**
* @author Guilhem N
*/
-class PassConfigTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class PassConfigTest extends TestCase
{
public function testPassOrdering()
{
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig();
+ $config = new PassConfig();
$config->setBeforeOptimizationPasses([]);
- $pass1 = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::class)->getMock();
- $config->addPass($pass1, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
- $pass2 = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface::class)->getMock();
- $config->addPass($pass2, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 30);
+ $pass1 = $this->getMockBuilder(CompilerPassInterface::class)->getMock();
+ $config->addPass($pass1, PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
+ $pass2 = $this->getMockBuilder(CompilerPassInterface::class)->getMock();
+ $config->addPass($pass2, PassConfig::TYPE_BEFORE_OPTIMIZATION, 30);
$passes = $config->getBeforeOptimizationPasses();
$this->assertSame($pass2, $passes[0]);
$this->assertSame($pass1, $passes[1]);
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/PriorityTaggedServiceTraitTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/PriorityTaggedServiceTraitTest.php
index 339becfb1..da07ef4bc 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/PriorityTaggedServiceTraitTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/PriorityTaggedServiceTraitTest.php
@@ -14,27 +14,27 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class PriorityTaggedServiceTraitTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class PriorityTaggedServiceTraitTest extends TestCase
{
public function testThatCacheWarmersAreProcessedInPriorityOrder()
{
$services = ['my_service1' => ['my_custom_tag' => ['priority' => 100]], 'my_service2' => ['my_custom_tag' => ['priority' => 200]], 'my_service3' => ['my_custom_tag' => ['priority' => -501]], 'my_service4' => ['my_custom_tag' => []], 'my_service5' => ['my_custom_tag' => ['priority' => -1]], 'my_service6' => ['my_custom_tag' => ['priority' => -500]], 'my_service7' => ['my_custom_tag' => ['priority' => -499]], 'my_service8' => ['my_custom_tag' => ['priority' => 1]], 'my_service9' => ['my_custom_tag' => ['priority' => -2]], 'my_service10' => ['my_custom_tag' => ['priority' => -1000]], 'my_service11' => ['my_custom_tag' => ['priority' => -1001]], 'my_service12' => ['my_custom_tag' => ['priority' => -1002]], 'my_service13' => ['my_custom_tag' => ['priority' => -1003]], 'my_service14' => ['my_custom_tag' => ['priority' => -1000]], 'my_service15' => ['my_custom_tag' => ['priority' => 1]], 'my_service16' => ['my_custom_tag' => ['priority' => -1]], 'my_service17' => ['my_custom_tag' => ['priority' => 200]], 'my_service18' => ['my_custom_tag' => ['priority' => 100]], 'my_service19' => ['my_custom_tag' => []]];
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
foreach ($services as $id => $tags) {
$definition = $container->register($id);
foreach ($tags as $name => $attributes) {
$definition->addTag($name, $attributes);
}
}
- $expected = [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service2'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service17'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service1'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service18'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service8'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service15'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service4'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service19'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service5'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service16'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service9'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service7'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service6'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service3'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service10'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service14'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service11'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service12'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('my_service13')];
- $priorityTaggedServiceTraitImplementation = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\PriorityTaggedServiceTraitImplementation();
+ $expected = [new Reference('my_service2'), new Reference('my_service17'), new Reference('my_service1'), new Reference('my_service18'), new Reference('my_service8'), new Reference('my_service15'), new Reference('my_service4'), new Reference('my_service19'), new Reference('my_service5'), new Reference('my_service16'), new Reference('my_service9'), new Reference('my_service7'), new Reference('my_service6'), new Reference('my_service3'), new Reference('my_service10'), new Reference('my_service14'), new Reference('my_service11'), new Reference('my_service12'), new Reference('my_service13')];
+ $priorityTaggedServiceTraitImplementation = new PriorityTaggedServiceTraitImplementation();
$this->assertEquals($expected, $priorityTaggedServiceTraitImplementation->test('my_custom_tag', $container));
}
}
class PriorityTaggedServiceTraitImplementation
{
use PriorityTaggedServiceTrait;
- public function test($tagName, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function test($tagName, ContainerBuilder $container)
{
return $this->findAndSortTaggedServices($tagName, $container);
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php
index 838dae2d4..237570cea 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/RegisterEnvVarProcessorsPassTest.php
@@ -14,36 +14,38 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterEnvVarProcessorsPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
-class RegisterEnvVarProcessorsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Closure;
+
+class RegisterEnvVarProcessorsPassTest extends TestCase
{
public function testSimpleProcessor()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SimpleProcessor::class)->addTag('container.env_var_processor');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterEnvVarProcessorsPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', SimpleProcessor::class)->addTag('container.env_var_processor');
+ (new RegisterEnvVarProcessorsPass())->process($container);
$this->assertTrue($container->has('container.env_var_processors_locator'));
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SimpleProcessor::class, $container->get('container.env_var_processors_locator')->get('foo'));
+ $this->assertInstanceOf(SimpleProcessor::class, $container->get('container.env_var_processors_locator')->get('foo'));
$expected = ['foo' => ['string'], 'base64' => ['string'], 'bool' => ['bool'], 'const' => ['bool', 'int', 'float', 'string', 'array'], 'file' => ['string'], 'float' => ['float'], 'int' => ['int'], 'json' => ['array'], 'resolve' => ['string'], 'string' => ['string']];
$this->assertSame($expected, $container->getParameterBag()->getProvidedTypes());
}
public function testNoProcessor()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterEnvVarProcessorsPass())->process($container);
+ $container = new ContainerBuilder();
+ (new RegisterEnvVarProcessorsPass())->process($container);
$this->assertFalse($container->has('container.env_var_processors_locator'));
}
public function testBadProcessor()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Invalid type "foo" returned by "Symfony\\Component\\DependencyInjection\\Tests\\Compiler\\BadProcessor::getProvidedTypes()", expected one of "array", "bool", "float", "int", "string".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\BadProcessor::class)->addTag('container.env_var_processor');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterEnvVarProcessorsPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', BadProcessor::class)->addTag('container.env_var_processor');
+ (new RegisterEnvVarProcessorsPass())->process($container);
}
}
-class SimpleProcessor implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessorInterface
+class SimpleProcessor implements EnvVarProcessorInterface
{
- public function getEnv($prefix, $name, \Closure $getEnv)
+ public function getEnv($prefix, $name, Closure $getEnv)
{
return $getEnv($name);
}
@@ -52,7 +54,7 @@ public static function getProvidedTypes()
return ['foo' => 'string'];
}
}
-class BadProcessor extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SimpleProcessor
+class BadProcessor extends SimpleProcessor
{
public static function getProvidedTypes()
{
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/RegisterServiceSubscribersPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/RegisterServiceSubscribersPassTest.php
index 5193da027..f368ea628 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/RegisterServiceSubscribersPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/RegisterServiceSubscribersPassTest.php
@@ -23,59 +23,59 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
require_once __DIR__ . '/../Fixtures/includes/classes.php';
-class RegisterServiceSubscribersPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class RegisterServiceSubscribersPassTest extends TestCase
{
public function testInvalidClass()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Service "foo" must implement interface "Symfony\\Component\\DependencyInjection\\ServiceSubscriberInterface".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class)->addTag('container.service_subscriber');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveServiceSubscribersPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', CustomDefinition::class)->addTag('container.service_subscriber');
+ (new RegisterServiceSubscribersPass())->process($container);
+ (new ResolveServiceSubscribersPass())->process($container);
}
public function testInvalidAttributes()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The "container.service_subscriber" tag accepts only the "key" and "id" attributes, "bar" given for service "foo".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)->addTag('container.service_subscriber', ['bar' => '123']);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveServiceSubscribersPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', TestServiceSubscriber::class)->addTag('container.service_subscriber', ['bar' => '123']);
+ (new RegisterServiceSubscribersPass())->process($container);
+ (new ResolveServiceSubscribersPass())->process($container);
}
public function testNoAttributes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class))->addTag('container.service_subscriber');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveServiceSubscribersPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', TestServiceSubscriber::class)->addArgument(new Reference(PsrContainerInterface::class))->addTag('container.service_subscriber');
+ (new RegisterServiceSubscribersPass())->process($container);
+ (new ResolveServiceSubscribersPass())->process($container);
$foo = $container->getDefinition('foo');
$locator = $container->getDefinition((string) $foo->getArgument(0));
$this->assertFalse($locator->isPublic());
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class, $locator->getClass());
- $expected = [\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), 'bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)), 'baz' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE))];
+ $this->assertSame(ServiceLocator::class, $locator->getClass());
+ $expected = [TestServiceSubscriber::class => new ServiceClosureArgument(new TypedReference(TestServiceSubscriber::class, TestServiceSubscriber::class, TestServiceSubscriber::class)), CustomDefinition::class => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), 'bar' => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class)), 'baz' => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE))];
$this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0));
}
public function testWithAttributes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)->setAutowired(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class))->addTag('container.service_subscriber', ['key' => 'bar', 'id' => 'bar'])->addTag('container.service_subscriber', ['key' => 'bar', 'id' => 'baz']);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RegisterServiceSubscribersPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveServiceSubscribersPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', TestServiceSubscriber::class)->setAutowired(true)->addArgument(new Reference(PsrContainerInterface::class))->addTag('container.service_subscriber', ['key' => 'bar', 'id' => 'bar'])->addTag('container.service_subscriber', ['key' => 'bar', 'id' => 'baz']);
+ (new RegisterServiceSubscribersPass())->process($container);
+ (new ResolveServiceSubscribersPass())->process($container);
$foo = $container->getDefinition('foo');
$locator = $container->getDefinition((string) $foo->getArgument(0));
$this->assertFalse($locator->isPublic());
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class, $locator->getClass());
- $expected = [\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), 'bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)), 'baz' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE))];
+ $this->assertSame(ServiceLocator::class, $locator->getClass());
+ $expected = [TestServiceSubscriber::class => new ServiceClosureArgument(new TypedReference(TestServiceSubscriber::class, TestServiceSubscriber::class, TestServiceSubscriber::class)), CustomDefinition::class => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE)), 'bar' => new ServiceClosureArgument(new TypedReference('bar', CustomDefinition::class, TestServiceSubscriber::class)), 'baz' => new ServiceClosureArgument(new TypedReference(CustomDefinition::class, CustomDefinition::class, TestServiceSubscriber::class, ContainerInterface::IGNORE_ON_INVALID_REFERENCE))];
$this->assertEquals($expected, $container->getDefinition((string) $locator->getFactory()[0])->getArgument(0));
}
public function testExtraServiceSubscriber()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Service key "test" does not exist in the map returned by "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber::getSubscribedServices()" for service "foo_service".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo_service', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)->setAutowired(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class))->addTag('container.service_subscriber', ['key' => 'test', 'id' => \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class]);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class);
+ $container = new ContainerBuilder();
+ $container->register('foo_service', TestServiceSubscriber::class)->setAutowired(true)->addArgument(new Reference(PsrContainerInterface::class))->addTag('container.service_subscriber', ['key' => 'test', 'id' => TestServiceSubscriber::class]);
+ $container->register(TestServiceSubscriber::class, TestServiceSubscriber::class);
$container->compile();
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php
index d79ad1b11..38084e5d6 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/RemoveUnusedDefinitionsPassTest.php
@@ -18,14 +18,14 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class RemoveUnusedDefinitionsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class RemoveUnusedDefinitionsPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\false);
- $container->register('bar')->setPublic(\false);
- $container->register('moo')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(false);
+ $container->register('bar')->setPublic(false);
+ $container->register('moo')->setArguments([new Reference('bar')]);
$this->process($container);
$this->assertFalse($container->hasDefinition('foo'));
$this->assertTrue($container->hasDefinition('bar'));
@@ -33,28 +33,28 @@ public function testProcess()
}
public function testProcessRemovesUnusedDefinitionsRecursively()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\false);
- $container->register('bar')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')])->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(false);
+ $container->register('bar')->setArguments([new Reference('foo')])->setPublic(false);
$this->process($container);
$this->assertFalse($container->hasDefinition('foo'));
$this->assertFalse($container->hasDefinition('bar'));
}
public function testProcessWorksWithInlinedDefinitions()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->setPublic(\false);
- $container->register('bar')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(null, [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')])]);
+ $container = new ContainerBuilder();
+ $container->register('foo')->setPublic(false);
+ $container->register('bar')->setArguments([new Definition(null, [new Reference('foo')])]);
$this->process($container);
$this->assertTrue($container->hasDefinition('foo'));
$this->assertTrue($container->hasDefinition('bar'));
}
public function testProcessWontRemovePrivateFactory()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setFactory(['stdClass', 'getInstance'])->setPublic(\false);
- $container->register('bar', 'stdClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), 'getInstance'])->setPublic(\false);
- $container->register('foobar')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setFactory(['stdClass', 'getInstance'])->setPublic(false);
+ $container->register('bar', 'stdClass')->setFactory([new Reference('foo'), 'getInstance'])->setPublic(false);
+ $container->register('foobar')->addArgument(new Reference('bar'));
$this->process($container);
$this->assertTrue($container->hasDefinition('foo'));
$this->assertTrue($container->hasDefinition('bar'));
@@ -62,10 +62,10 @@ public function testProcessWontRemovePrivateFactory()
}
public function testProcessConsiderEnvVariablesAsUsedEvenInPrivateServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('env(FOOBAR)', 'test');
- $container->register('foo')->setArguments(['%env(FOOBAR)%'])->setPublic(\false);
- $resolvePass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass();
+ $container->register('foo')->setArguments(['%env(FOOBAR)%'])->setPublic(false);
+ $resolvePass = new ResolveParameterPlaceHoldersPass();
$resolvePass->process($container);
$this->process($container);
$this->assertFalse($container->hasDefinition('foo'));
@@ -73,9 +73,9 @@ public function testProcessConsiderEnvVariablesAsUsedEvenInPrivateServices()
$this->assertArrayHasKey('FOOBAR', $envCounters);
$this->assertSame(1, $envCounters['FOOBAR']);
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $repeatedPass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RepeatedPass([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass(), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\RemoveUnusedDefinitionsPass()]);
+ $repeatedPass = new RepeatedPass([new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass()]);
$repeatedPass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
index 8e5d35eeb..b45653443 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
@@ -16,15 +16,15 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
require_once __DIR__ . '/../Fixtures/includes/foo.php';
-class ReplaceAliasByActualDefinitionPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ReplaceAliasByActualDefinitionPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$aDefinition = $container->register('a', '\\stdClass');
- $aDefinition->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), 'createA']);
- $bDefinition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('\\stdClass');
- $bDefinition->setPublic(\false);
+ $aDefinition->setFactory([new Reference('b'), 'createA']);
+ $bDefinition = new Definition('\\stdClass');
+ $bDefinition->setPublic(false);
$container->setDefinition('b', $bDefinition);
$container->setAlias('a_alias', 'a');
$container->setAlias('b_alias', 'b');
@@ -41,13 +41,13 @@ public function testProcess()
public function testProcessWithInvalidAlias()
{
$this->expectException('InvalidArgumentException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setAlias('a_alias', 'a');
$this->process($container);
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass();
+ $pass = new ReplaceAliasByActualDefinitionPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php
index be86ac262..4663ff8e9 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php
@@ -23,88 +23,88 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
require_once __DIR__ . '/../Fixtures/includes/autowiring_classes.php';
-class ResolveBindingsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveBindingsPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $bindings = [\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))];
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
+ $container = new ContainerBuilder();
+ $bindings = [CaseSensitiveClass::class => new BoundArgument(new Reference('foo'))];
+ $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class);
$definition->setArguments([1 => '123']);
$definition->addMethodCall('setSensitiveClass');
$definition->setBindings($bindings);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class)->setBindings($bindings);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass();
+ $container->register('foo', CaseSensitiveClass::class)->setBindings($bindings);
+ $pass = new ResolveBindingsPass();
$pass->process($container);
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), '123'], $definition->getArguments());
- $this->assertEquals([['setSensitiveClass', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]]], $definition->getMethodCalls());
+ $this->assertEquals([new Reference('foo'), '123'], $definition->getArguments());
+ $this->assertEquals([['setSensitiveClass', [new Reference('foo')]]], $definition->getMethodCalls());
}
public function testUnusedBinding()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Unused binding "$quz" in service "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\NamedArgumentsDummy".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
+ $container = new ContainerBuilder();
+ $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class);
$definition->setBindings(['$quz' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass();
+ $pass = new ResolveBindingsPass();
$pass->process($container);
}
public function testMissingParent()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Unused binding "\\$quz" in service [\\s\\S]+/');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists::class);
+ $container = new ContainerBuilder();
+ $definition = $container->register(ParentNotExists::class, ParentNotExists::class);
$definition->setBindings(['$quz' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass();
+ $pass = new ResolveBindingsPass();
$pass->process($container);
}
public function testTypedReferenceSupport()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $bindings = [\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))];
+ $container = new ContainerBuilder();
+ $bindings = [CaseSensitiveClass::class => new BoundArgument(new Reference('foo'))];
// Explicit service id
- $definition1 = $container->register('def1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
- $definition1->addArgument($typedRef = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class));
+ $definition1 = $container->register('def1', NamedArgumentsDummy::class);
+ $definition1->addArgument($typedRef = new TypedReference('bar', CaseSensitiveClass::class));
$definition1->setBindings($bindings);
- $definition2 = $container->register('def2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
- $definition2->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class));
+ $definition2 = $container->register('def2', NamedArgumentsDummy::class);
+ $definition2->addArgument(new TypedReference(CaseSensitiveClass::class, CaseSensitiveClass::class));
$definition2->setBindings($bindings);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass();
+ $pass = new ResolveBindingsPass();
$pass->process($container);
$this->assertEquals([$typedRef], $container->getDefinition('def1')->getArguments());
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')], $container->getDefinition('def2')->getArguments());
+ $this->assertEquals([new Reference('foo')], $container->getDefinition('def2')->getArguments());
}
public function testScalarSetter()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->autowire('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ScalarSetter::class);
+ $container = new ContainerBuilder();
+ $definition = $container->autowire('foo', ScalarSetter::class);
$definition->setBindings(['$defaultLocale' => 'fr']);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowireRequiredMethodsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass())->process($container);
+ (new AutowireRequiredMethodsPass())->process($container);
+ (new ResolveBindingsPass())->process($container);
$this->assertEquals([['setDefaultLocale', ['fr']]], $definition->getMethodCalls());
}
public function testWithNonExistingSetterAndBinding()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Invalid service "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\NamedArgumentsDummy": method "setLogger()" does not exist.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $bindings = ['$c' => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('logger'))->setFactory('logger')];
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
+ $container = new ContainerBuilder();
+ $bindings = ['$c' => (new Definition('logger'))->setFactory('logger')];
+ $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class);
$definition->addMethodCall('setLogger');
$definition->setBindings($bindings);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass();
+ $pass = new ResolveBindingsPass();
$pass->process($container);
}
public function testSyntheticServiceWithBind()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $argument = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument('bar');
- $container->register('foo', 'stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('synthetic.service'));
- $container->register('synthetic.service')->setSynthetic(\true)->setBindings(['$apiKey' => $argument]);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->setBindings(['$apiKey' => $argument]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass())->process($container);
- $this->assertSame([1 => 'bar'], $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->getArguments());
+ $container = new ContainerBuilder();
+ $argument = new BoundArgument('bar');
+ $container->register('foo', 'stdClass')->addArgument(new Reference('synthetic.service'));
+ $container->register('synthetic.service')->setSynthetic(true)->setBindings(['$apiKey' => $argument]);
+ $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class)->setBindings(['$apiKey' => $argument]);
+ (new ResolveBindingsPass())->process($container);
+ (new DefinitionErrorExceptionPass())->process($container);
+ $this->assertSame([1 => 'bar'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments());
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
index b1cf53cc2..2da99135f 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
@@ -15,80 +15,82 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class ResolveChildDefinitionsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function get_class;
+
+class ResolveChildDefinitionsPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'foo')->setArguments(['moo', 'b'])->setProperty('foo', 'moo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->replaceArgument(0, 'a')->setProperty('foo', 'bar')->setClass('bar');
+ $container->setDefinition('child', new ChildDefinition('parent'))->replaceArgument(0, 'a')->setProperty('foo', 'bar')->setClass('bar');
$this->process($container);
$def = $container->getDefinition('child');
- $this->assertNotInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition::class, $def);
+ $this->assertNotInstanceOf(ChildDefinition::class, $def);
$this->assertEquals('bar', $def->getClass());
$this->assertEquals(['a', 'b'], $def->getArguments());
$this->assertEquals(['foo' => 'bar'], $def->getProperties());
}
public function testProcessAppendsMethodCallsAlways()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addMethodCall('foo', ['bar']);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->addMethodCall('bar', ['foo']);
+ $container->setDefinition('child', new ChildDefinition('parent'))->addMethodCall('bar', ['foo']);
$this->process($container);
$def = $container->getDefinition('child');
$this->assertEquals([['foo', ['bar']], ['bar', ['foo']]], $def->getMethodCalls());
}
public function testProcessDoesNotCopyAbstract()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent')->setAbstract(\true);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent')->setAbstract(true);
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertFalse($def->isAbstract());
}
public function testProcessDoesNotCopyShared()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent')->setShared(\false);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent')->setShared(false);
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertTrue($def->isShared());
}
public function testProcessDoesNotCopyTags()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addTag('foo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertEquals([], $def->getTags());
}
public function testProcessDoesNotCopyDecoratedService()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->setDecoratedService('foo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertNull($def->getDecoratedService());
}
public function testProcessDoesNotDropShared()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setShared(\false);
+ $container->setDefinition('child', new ChildDefinition('parent'))->setShared(false);
$this->process($container);
$def = $container->getDefinition('child');
$this->assertFalse($def->isShared());
}
public function testProcessHandlesMultipleInheritance()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'foo')->setArguments(['foo', 'bar', 'c']);
- $container->setDefinition('child2', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('child1'))->replaceArgument(1, 'b');
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->replaceArgument(0, 'a');
+ $container->setDefinition('child2', new ChildDefinition('child1'))->replaceArgument(1, 'b');
+ $container->setDefinition('child1', new ChildDefinition('parent'))->replaceArgument(0, 'a');
$this->process($container);
$def = $container->getDefinition('child2');
$this->assertEquals(['a', 'b', 'c'], $def->getArguments());
@@ -96,79 +98,79 @@ public function testProcessHandlesMultipleInheritance()
}
public function testSetLazyOnServiceHasParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'stdClass');
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setLazy(\true);
+ $container->setDefinition('child1', new ChildDefinition('parent'))->setLazy(true);
$this->process($container);
$this->assertTrue($container->getDefinition('child1')->isLazy());
}
public function testSetLazyOnServiceIsParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setLazy(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setLazy(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'));
$this->process($container);
$this->assertTrue($container->getDefinition('child1')->isLazy());
}
public function testSetAutowiredOnServiceHasParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setAutowired(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setAutowired(\false);
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setAutowired(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'))->setAutowired(false);
$this->process($container);
$this->assertFalse($container->getDefinition('child1')->isAutowired());
}
public function testSetAutowiredOnServiceIsParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setAutowired(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setAutowired(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'));
$this->process($container);
$this->assertTrue($container->getDefinition('child1')->isAutowired());
}
public function testDeepDefinitionsResolving()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'parentClass');
- $container->register('sibling', 'siblingClass')->setConfigurator(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'), 'foo')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'), 'foo'])->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setProperty('prop', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->addMethodCall('meth', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent')]);
+ $container->register('sibling', 'siblingClass')->setConfigurator(new ChildDefinition('parent'), 'foo')->setFactory([new ChildDefinition('parent'), 'foo'])->addArgument(new ChildDefinition('parent'))->setProperty('prop', new ChildDefinition('parent'))->addMethodCall('meth', [new ChildDefinition('parent')]);
$this->process($container);
$configurator = $container->getDefinition('sibling')->getConfigurator();
- $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', \get_class($configurator));
+ $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', get_class($configurator));
$this->assertSame('parentClass', $configurator->getClass());
$factory = $container->getDefinition('sibling')->getFactory();
- $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', \get_class($factory[0]));
+ $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', get_class($factory[0]));
$this->assertSame('parentClass', $factory[0]->getClass());
$argument = $container->getDefinition('sibling')->getArgument(0);
- $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', \get_class($argument));
+ $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', get_class($argument));
$this->assertSame('parentClass', $argument->getClass());
$properties = $container->getDefinition('sibling')->getProperties();
- $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', \get_class($properties['prop']));
+ $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', get_class($properties['prop']));
$this->assertSame('parentClass', $properties['prop']->getClass());
$methodCalls = $container->getDefinition('sibling')->getMethodCalls();
- $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', \get_class($methodCalls[0][1][0]));
+ $this->assertSame('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', get_class($methodCalls[0][1][0]));
$this->assertSame('parentClass', $methodCalls[0][1][0]->getClass());
}
public function testSetDecoratedServiceOnServiceHasParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'stdClass');
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setDecoratedService('foo', 'foo_inner', 5);
+ $container->setDefinition('child1', new ChildDefinition('parent'))->setDecoratedService('foo', 'foo_inner', 5);
$this->process($container);
$this->assertEquals(['foo', 'foo_inner', 5], $container->getDefinition('child1')->getDecoratedService());
}
public function testDecoratedServiceCopiesDeprecatedStatusFromParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('deprecated_parent')->setDeprecated(\true);
- $container->setDefinition('decorated_deprecated_parent', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('deprecated_parent'));
+ $container = new ContainerBuilder();
+ $container->register('deprecated_parent')->setDeprecated(true);
+ $container->setDefinition('decorated_deprecated_parent', new ChildDefinition('deprecated_parent'));
$this->process($container);
$this->assertTrue($container->getDefinition('decorated_deprecated_parent')->isDeprecated());
}
public function testDecoratedServiceCanOverwriteDeprecatedParentStatus()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('deprecated_parent')->setDeprecated(\true);
- $container->setDefinition('decorated_deprecated_parent', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('deprecated_parent'))->setDeprecated(\false);
+ $container = new ContainerBuilder();
+ $container->register('deprecated_parent')->setDeprecated(true);
+ $container->setDefinition('decorated_deprecated_parent', new ChildDefinition('deprecated_parent'))->setDeprecated(false);
$this->process($container);
$this->assertFalse($container->getDefinition('decorated_deprecated_parent')->isDeprecated());
}
@@ -177,9 +179,9 @@ public function testDecoratedServiceCanOverwriteDeprecatedParentStatus()
*/
public function testProcessMergeAutowiringTypes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addAutowiringType('Foo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->addAutowiringType('Bar');
+ $container->setDefinition('child', new ChildDefinition('parent'))->addAutowiringType('Bar');
$this->process($container);
$childDef = $container->getDefinition('child');
$this->assertEquals(['Foo', 'Bar'], $childDef->getAutowiringTypes());
@@ -188,28 +190,28 @@ public function testProcessMergeAutowiringTypes()
}
public function testProcessResolvesAliases()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'ParentClass');
$container->setAlias('parent_alias', 'parent');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent_alias'));
+ $container->setDefinition('child', new ChildDefinition('parent_alias'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertSame('ParentClass', $def->getClass());
}
public function testProcessSetsArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'ParentClass')->setArguments([0]);
- $container->setDefinition('child', (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setArguments([1, 'index_0' => 2, 'foo' => 3]));
+ $container->setDefinition('child', (new ChildDefinition('parent'))->setArguments([1, 'index_0' => 2, 'foo' => 3]));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertSame([2, 1, 'foo' => 3], $def->getArguments());
}
public function testBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'stdClass')->setBindings(['a' => '1', 'b' => '2']);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setBindings(['b' => 'B', 'c' => 'C']);
+ $container->setDefinition('child', new ChildDefinition('parent'))->setBindings(['b' => 'B', 'c' => 'C']);
$this->process($container);
$bindings = [];
foreach ($container->getDefinition('child')->getBindings() as $k => $v) {
@@ -219,9 +221,9 @@ public function testBindings()
}
public function testSetAutoconfiguredOnServiceIsParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setAutoconfigured(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setAutoconfigured(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'));
$this->process($container);
$this->assertFalse($container->getDefinition('child1')->isAutoconfigured());
}
@@ -230,22 +232,22 @@ public function testSetAutoconfiguredOnServiceIsParent()
*/
public function testAliasExistsForBackwardsCompatibility()
{
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass::class, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass());
+ $this->assertInstanceOf(ResolveChildDefinitionsPass::class, new ResolveDefinitionTemplatesPass());
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass();
+ $pass = new ResolveChildDefinitionsPass();
$pass->process($container);
}
public function testProcessDetectsChildDefinitionIndirectCircularReference()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
$this->expectExceptionMessageRegExp('/^Circular reference detected for service "c", path: "c -> b -> a -> c"./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a');
- $container->setDefinition('b', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('a'));
- $container->setDefinition('c', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('b'));
- $container->setDefinition('a', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('c'));
+ $container->setDefinition('b', new ChildDefinition('a'));
+ $container->setDefinition('c', new ChildDefinition('b'));
+ $container->setDefinition('a', new ChildDefinition('c'));
$this->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveClassPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveClassPassTest.php
index 9105bfd54..fee262207 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveClassPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveClassPassTest.php
@@ -15,54 +15,56 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
-class ResolveClassPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use stdClass;
+
+class ResolveClassPassTest extends TestCase
{
/**
* @dataProvider provideValidClassId
*/
public function testResolveClassFromId($serviceId)
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register($serviceId);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
+ (new ResolveClassPass())->process($container);
$this->assertSame($serviceId, $def->getClass());
}
public function provideValidClassId()
{
(yield ['_PhpScoper5ea00cc67502b\\Acme\\UnknownClass']);
- (yield [\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class]);
+ (yield [CaseSensitiveClass::class]);
}
/**
* @dataProvider provideInvalidClassId
*/
public function testWontResolveClassFromId($serviceId)
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register($serviceId);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
+ (new ResolveClassPass())->process($container);
$this->assertNull($def->getClass());
}
public function provideInvalidClassId()
{
- (yield [\stdClass::class]);
+ (yield [stdClass::class]);
(yield ['bar']);
(yield ['\\DateTime']);
}
public function testNonFqcnChildDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$parent = $container->register('_PhpScoper5ea00cc67502b\\App\\Foo', null);
- $child = $container->setDefinition('App\\Foo.child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('_PhpScoper5ea00cc67502b\\App\\Foo'));
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
+ $child = $container->setDefinition('App\\Foo.child', new ChildDefinition('_PhpScoper5ea00cc67502b\\App\\Foo'));
+ (new ResolveClassPass())->process($container);
$this->assertSame('_PhpScoper5ea00cc67502b\\App\\Foo', $parent->getClass());
$this->assertNull($child->getClass());
}
public function testClassFoundChildDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$parent = $container->register('_PhpScoper5ea00cc67502b\\App\\Foo', null);
- $child = $container->setDefinition(self::class, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('_PhpScoper5ea00cc67502b\\App\\Foo'));
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
+ $child = $container->setDefinition(self::class, new ChildDefinition('_PhpScoper5ea00cc67502b\\App\\Foo'));
+ (new ResolveClassPass())->process($container);
$this->assertSame('_PhpScoper5ea00cc67502b\\App\\Foo', $parent->getClass());
$this->assertSame(self::class, $child->getClass());
}
@@ -70,9 +72,9 @@ public function testAmbiguousChildDefinition()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Service definition "App\\Foo\\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('_PhpScoper5ea00cc67502b\\App\\Foo', null);
- $container->setDefinition('_PhpScoper5ea00cc67502b\\App\\Foo\\Child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('_PhpScoper5ea00cc67502b\\App\\Foo'));
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveClassPass())->process($container);
+ $container->setDefinition('_PhpScoper5ea00cc67502b\\App\\Foo\\Child', new ChildDefinition('_PhpScoper5ea00cc67502b\\App\\Foo'));
+ (new ResolveClassPass())->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php
index f97e8b110..2f1824984 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveDefinitionTemplatesPassTest.php
@@ -17,80 +17,80 @@
/**
* @group legacy
*/
-class ResolveDefinitionTemplatesPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveDefinitionTemplatesPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'foo')->setArguments(['moo', 'b'])->setProperty('foo', 'moo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->replaceArgument(0, 'a')->setProperty('foo', 'bar')->setClass('bar');
+ $container->setDefinition('child', new ChildDefinition('parent'))->replaceArgument(0, 'a')->setProperty('foo', 'bar')->setClass('bar');
$this->process($container);
$def = $container->getDefinition('child');
- $this->assertNotInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition::class, $def);
+ $this->assertNotInstanceOf(ChildDefinition::class, $def);
$this->assertEquals('bar', $def->getClass());
$this->assertEquals(['a', 'b'], $def->getArguments());
$this->assertEquals(['foo' => 'bar'], $def->getProperties());
}
public function testProcessAppendsMethodCallsAlways()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addMethodCall('foo', ['bar']);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->addMethodCall('bar', ['foo']);
+ $container->setDefinition('child', new ChildDefinition('parent'))->addMethodCall('bar', ['foo']);
$this->process($container);
$def = $container->getDefinition('child');
$this->assertEquals([['foo', ['bar']], ['bar', ['foo']]], $def->getMethodCalls());
}
public function testProcessDoesNotCopyAbstract()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent')->setAbstract(\true);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent')->setAbstract(true);
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertFalse($def->isAbstract());
}
public function testProcessDoesNotCopyShared()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent')->setShared(\false);
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent')->setShared(false);
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertTrue($def->isShared());
}
public function testProcessDoesNotCopyTags()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addTag('foo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertEquals([], $def->getTags());
}
public function testProcessDoesNotCopyDecoratedService()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->setDecoratedService('foo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container->setDefinition('child', new ChildDefinition('parent'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertNull($def->getDecoratedService());
}
public function testProcessDoesNotDropShared()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setShared(\false);
+ $container->setDefinition('child', new ChildDefinition('parent'))->setShared(false);
$this->process($container);
$def = $container->getDefinition('child');
$this->assertFalse($def->isShared());
}
public function testProcessHandlesMultipleInheritance()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'foo')->setArguments(['foo', 'bar', 'c']);
- $container->setDefinition('child2', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('child1'))->replaceArgument(1, 'b');
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->replaceArgument(0, 'a');
+ $container->setDefinition('child2', new ChildDefinition('child1'))->replaceArgument(1, 'b');
+ $container->setDefinition('child1', new ChildDefinition('parent'))->replaceArgument(0, 'a');
$this->process($container);
$def = $container->getDefinition('child2');
$this->assertEquals(['a', 'b', 'c'], $def->getArguments());
@@ -98,41 +98,41 @@ public function testProcessHandlesMultipleInheritance()
}
public function testSetLazyOnServiceHasParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'stdClass');
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setLazy(\true);
+ $container->setDefinition('child1', new ChildDefinition('parent'))->setLazy(true);
$this->process($container);
$this->assertTrue($container->getDefinition('child1')->isLazy());
}
public function testSetLazyOnServiceIsParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setLazy(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setLazy(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'));
$this->process($container);
$this->assertTrue($container->getDefinition('child1')->isLazy());
}
public function testSetAutowiredOnServiceHasParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setAutowired(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setAutowired(\false);
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setAutowired(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'))->setAutowired(false);
$this->process($container);
$this->assertFalse($container->getDefinition('child1')->isAutowired());
}
public function testSetAutowiredOnServiceIsParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setAutowired(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setAutowired(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'));
$this->process($container);
$this->assertTrue($container->getDefinition('child1')->isAutowired());
}
public function testDeepDefinitionsResolving()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'parentClass');
- $container->register('sibling', 'siblingClass')->setConfigurator(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'), 'foo')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'), 'foo'])->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setProperty('prop', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->addMethodCall('meth', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent')]);
+ $container->register('sibling', 'siblingClass')->setConfigurator(new ChildDefinition('parent'), 'foo')->setFactory([new ChildDefinition('parent'), 'foo'])->addArgument(new ChildDefinition('parent'))->setProperty('prop', new ChildDefinition('parent'))->addMethodCall('meth', [new ChildDefinition('parent')]);
$this->process($container);
$configurator = $container->getDefinition('sibling')->getConfigurator();
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', $configurator);
@@ -152,25 +152,25 @@ public function testDeepDefinitionsResolving()
}
public function testSetDecoratedServiceOnServiceHasParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'stdClass');
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setDecoratedService('foo', 'foo_inner', 5);
+ $container->setDefinition('child1', new ChildDefinition('parent'))->setDecoratedService('foo', 'foo_inner', 5);
$this->process($container);
$this->assertEquals(['foo', 'foo_inner', 5], $container->getDefinition('child1')->getDecoratedService());
}
public function testDecoratedServiceCopiesDeprecatedStatusFromParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('deprecated_parent')->setDeprecated(\true);
- $container->setDefinition('decorated_deprecated_parent', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('deprecated_parent'));
+ $container = new ContainerBuilder();
+ $container->register('deprecated_parent')->setDeprecated(true);
+ $container->setDefinition('decorated_deprecated_parent', new ChildDefinition('deprecated_parent'));
$this->process($container);
$this->assertTrue($container->getDefinition('decorated_deprecated_parent')->isDeprecated());
}
public function testDecoratedServiceCanOverwriteDeprecatedParentStatus()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('deprecated_parent')->setDeprecated(\true);
- $container->setDefinition('decorated_deprecated_parent', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('deprecated_parent'))->setDeprecated(\false);
+ $container = new ContainerBuilder();
+ $container->register('deprecated_parent')->setDeprecated(true);
+ $container->setDefinition('decorated_deprecated_parent', new ChildDefinition('deprecated_parent'))->setDeprecated(false);
$this->process($container);
$this->assertFalse($container->getDefinition('decorated_deprecated_parent')->isDeprecated());
}
@@ -179,9 +179,9 @@ public function testDecoratedServiceCanOverwriteDeprecatedParentStatus()
*/
public function testProcessMergeAutowiringTypes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent')->addAutowiringType('Foo');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->addAutowiringType('Bar');
+ $container->setDefinition('child', new ChildDefinition('parent'))->addAutowiringType('Bar');
$this->process($container);
$childDef = $container->getDefinition('child');
$this->assertEquals(['Foo', 'Bar'], $childDef->getAutowiringTypes());
@@ -190,34 +190,34 @@ public function testProcessMergeAutowiringTypes()
}
public function testProcessResolvesAliases()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'ParentClass');
$container->setAlias('parent_alias', 'parent');
- $container->setDefinition('child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent_alias'));
+ $container->setDefinition('child', new ChildDefinition('parent_alias'));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertSame('ParentClass', $def->getClass());
}
public function testProcessSetsArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('parent', 'ParentClass')->setArguments([0]);
- $container->setDefinition('child', (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setArguments([1, 'index_0' => 2, 'foo' => 3]));
+ $container->setDefinition('child', (new ChildDefinition('parent'))->setArguments([1, 'index_0' => 2, 'foo' => 3]));
$this->process($container);
$def = $container->getDefinition('child');
$this->assertSame([2, 1, 'foo' => 3], $def->getArguments());
}
public function testSetAutoconfiguredOnServiceIsParent()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('parent', 'stdClass')->setAutoconfigured(\true);
- $container->setDefinition('child1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $container = new ContainerBuilder();
+ $container->register('parent', 'stdClass')->setAutoconfigured(true);
+ $container->setDefinition('child1', new ChildDefinition('parent'));
$this->process($container);
$this->assertFalse($container->getDefinition('child1')->isAutoconfigured());
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass();
+ $pass = new ResolveDefinitionTemplatesPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveFactoryClassPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveFactoryClassPassTest.php
index c6f211f9f..18caaa942 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveFactoryClassPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveFactoryClassPassTest.php
@@ -15,40 +15,40 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class ResolveFactoryClassPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveFactoryClassPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$factory = $container->register('factory', '_PhpScoper5ea00cc67502b\\Foo\\Bar');
$factory->setFactory([null, 'create']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass();
+ $pass = new ResolveFactoryClassPass();
$pass->process($container);
$this->assertSame(['_PhpScoper5ea00cc67502b\\Foo\\Bar', 'create'], $factory->getFactory());
}
public function testInlinedDefinitionFactoryIsProcessed()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$factory = $container->register('factory');
- $factory->setFactory([(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\Baz\\Qux'))->setFactory([null, 'getInstance']), 'create']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass();
+ $factory->setFactory([(new Definition('_PhpScoper5ea00cc67502b\\Baz\\Qux'))->setFactory([null, 'getInstance']), 'create']);
+ $pass = new ResolveFactoryClassPass();
$pass->process($container);
$this->assertSame(['_PhpScoper5ea00cc67502b\\Baz\\Qux', 'getInstance'], $factory->getFactory()[0]->getFactory());
}
public function provideFulfilledFactories()
{
- return [[['_PhpScoper5ea00cc67502b\\Foo\\Bar', 'create']], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), 'create']], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Baz'), 'create']]];
+ return [[['_PhpScoper5ea00cc67502b\\Foo\\Bar', 'create']], [[new Reference('foo'), 'create']], [[new Definition('Baz'), 'create']]];
}
/**
* @dataProvider provideFulfilledFactories
*/
public function testIgnoresFulfilledFactories($factory)
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $container = new ContainerBuilder();
+ $definition = new Definition();
$definition->setFactory($factory);
$container->setDefinition('factory', $definition);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass();
+ $pass = new ResolveFactoryClassPass();
$pass->process($container);
$this->assertSame($factory, $container->getDefinition('factory')->getFactory());
}
@@ -56,10 +56,10 @@ public function testNotAnyClassThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The "factory" service is defined to be created by a factory, but is missing the factory class. Did you forget to define the factory or service class?');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$factory = $container->register('factory');
$factory->setFactory([null, 'create']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveFactoryClassPass();
+ $pass = new ResolveFactoryClassPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveHotPathPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveHotPathPassTest.php
index 5571728ca..22dfa46f3 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveHotPathPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveHotPathPassTest.php
@@ -16,19 +16,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class ResolveHotPathPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveHotPathPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo')->addTag('container.hot_path')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('lazy')]))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('missing'));
+ $container = new ContainerBuilder();
+ $container->register('foo')->addTag('container.hot_path')->addArgument(new IteratorArgument([new Reference('lazy')]))->addArgument(new Reference('service_container'))->addArgument(new Definition('', [new Reference('bar')]))->addArgument(new Reference('baz', ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE))->addArgument(new Reference('missing'));
$container->register('lazy');
- $container->register('bar')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('buz'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('deprec_ref_notag'));
- $container->register('baz')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('lazy'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('lazy'));
+ $container->register('bar')->addArgument(new Reference('buz'))->addArgument(new Reference('deprec_ref_notag'));
+ $container->register('baz')->addArgument(new Reference('lazy'))->addArgument(new Reference('lazy'));
$container->register('buz');
$container->register('deprec_with_tag')->setDeprecated()->addTag('container.hot_path');
$container->register('deprec_ref_notag')->setDeprecated();
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveHotPathPass())->process($container);
+ (new ResolveHotPathPass())->process($container);
$this->assertFalse($container->getDefinition('lazy')->hasTag('container.hot_path'));
$this->assertTrue($container->getDefinition('bar')->hasTag('container.hot_path'));
$this->assertTrue($container->getDefinition('buz')->hasTag('container.hot_path'));
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php
index 20e0631d7..3134aa791 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInstanceofConditionalsPassTest.php
@@ -16,18 +16,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class ResolveInstanceofConditionalsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function array_keys;
+
+class ResolveInstanceofConditionalsPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = $container->register('foo', self::class)->addTag('tag')->setAutowired(\true)->setChanges([]);
- $def->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->setProperty('foo', 'bar')->addTag('baz', ['attr' => 123])]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ $container = new ContainerBuilder();
+ $def = $container->register('foo', self::class)->addTag('tag')->setAutowired(true)->setChanges([]);
+ $def->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->setProperty('foo', 'bar')->addTag('baz', ['attr' => 123])]);
+ (new ResolveInstanceofConditionalsPass())->process($container);
$parent = 'instanceof.' . parent::class . '.0.foo';
$def = $container->getDefinition('foo');
$this->assertEmpty($def->getInstanceofConditionals());
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition::class, $def);
+ $this->assertInstanceOf(ChildDefinition::class, $def);
$this->assertTrue($def->isAutowired());
$this->assertSame($parent, $def->getParent());
$this->assertSame(['tag' => [[]], 'baz' => [['attr' => 123]]], $def->getTags());
@@ -37,33 +39,33 @@ public function testProcess()
}
public function testProcessInheritance()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('parent', parent::class)->addMethodCall('foo', ['foo']);
- $def->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->addMethodCall('foo', ['bar'])]);
- $def = (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'))->setClass(self::class);
+ $def->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->addMethodCall('foo', ['bar'])]);
+ $def = (new ChildDefinition('parent'))->setClass(self::class);
$container->setDefinition('child', $def);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass())->process($container);
+ (new ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveChildDefinitionsPass())->process($container);
$expected = [['foo', ['bar']], ['foo', ['foo']]];
$this->assertSame($expected, $container->getDefinition('parent')->getMethodCalls());
$this->assertSame($expected, $container->getDefinition('child')->getMethodCalls());
}
public function testProcessDoesReplaceShared()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('foo', 'stdClass');
- $def->setInstanceofConditionals(['stdClass' => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->setShared(\false)]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ $def->setInstanceofConditionals(['stdClass' => (new ChildDefinition(''))->setShared(false)]);
+ (new ResolveInstanceofConditionalsPass())->process($container);
$def = $container->getDefinition('foo');
$this->assertFalse($def->isShared());
}
public function testProcessHandlesMultipleInheritance()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = $container->register('foo', self::class)->setShared(\true);
- $def->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->setLazy(\true)->setShared(\false), self::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->setAutowired(\true)]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass())->process($container);
+ $container = new ContainerBuilder();
+ $def = $container->register('foo', self::class)->setShared(true);
+ $def->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->setLazy(true)->setShared(false), self::class => (new ChildDefinition(''))->setAutowired(true)]);
+ (new ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveChildDefinitionsPass())->process($container);
$def = $container->getDefinition('foo');
$this->assertTrue($def->isAutowired());
$this->assertTrue($def->isLazy());
@@ -71,13 +73,13 @@ public function testProcessHandlesMultipleInheritance()
}
public function testProcessUsesAutoconfiguredInstanceof()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('normal_service', self::class);
- $def->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->addTag('local_instanceof_tag')->setFactory('locally_set_factory')]);
- $def->setAutoconfigured(\true);
- $container->registerForAutoconfiguration(parent::class)->addTag('autoconfigured_tag')->setAutowired(\true)->setFactory('autoconfigured_factory');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass())->process($container);
+ $def->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->addTag('local_instanceof_tag')->setFactory('locally_set_factory')]);
+ $def->setAutoconfigured(true);
+ $container->registerForAutoconfiguration(parent::class)->addTag('autoconfigured_tag')->setAutowired(true)->setFactory('autoconfigured_factory');
+ (new ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveChildDefinitionsPass())->process($container);
$def = $container->getDefinition('normal_service');
// autowired thanks to the autoconfigured instanceof
$this->assertTrue($def->isAutowired());
@@ -88,25 +90,25 @@ public function testProcessUsesAutoconfiguredInstanceof()
}
public function testAutoconfigureInstanceofDoesNotDuplicateTags()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('normal_service', self::class);
$def->addTag('duplicated_tag')->addTag('duplicated_tag', ['and_attributes' => 1]);
- $def->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->addTag('duplicated_tag')]);
- $def->setAutoconfigured(\true);
+ $def->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->addTag('duplicated_tag')]);
+ $def->setAutoconfigured(true);
$container->registerForAutoconfiguration(parent::class)->addTag('duplicated_tag', ['and_attributes' => 1]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass())->process($container);
+ (new ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveChildDefinitionsPass())->process($container);
$def = $container->getDefinition('normal_service');
$this->assertSame(['duplicated_tag' => [[], ['and_attributes' => 1]]], $def->getTags());
}
public function testProcessDoesNotUseAutoconfiguredInstanceofIfNotEnabled()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('normal_service', self::class);
- $def->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->addTag('foo_tag')]);
- $container->registerForAutoconfiguration(parent::class)->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveChildDefinitionsPass())->process($container);
+ $def->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->addTag('foo_tag')]);
+ $container->registerForAutoconfiguration(parent::class)->setAutowired(true);
+ (new ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveChildDefinitionsPass())->process($container);
$def = $container->getDefinition('normal_service');
$this->assertFalse($def->isAutowired());
}
@@ -114,40 +116,40 @@ public function testBadInterfaceThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('"App\\FakeInterface" is set as an "instanceof" conditional, but it does not exist.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('normal_service', self::class);
- $def->setInstanceofConditionals(['_PhpScoper5ea00cc67502b\\App\\FakeInterface' => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->addTag('foo_tag')]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ $def->setInstanceofConditionals(['_PhpScoper5ea00cc67502b\\App\\FakeInterface' => (new ChildDefinition(''))->addTag('foo_tag')]);
+ (new ResolveInstanceofConditionalsPass())->process($container);
}
public function testBadInterfaceForAutomaticInstanceofIsOk()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('normal_service', self::class)->setAutoconfigured(\true);
- $container->registerForAutoconfiguration('_PhpScoper5ea00cc67502b\\App\\FakeInterface')->setAutowired(\true);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('normal_service', self::class)->setAutoconfigured(true);
+ $container->registerForAutoconfiguration('_PhpScoper5ea00cc67502b\\App\\FakeInterface')->setAutowired(true);
+ (new ResolveInstanceofConditionalsPass())->process($container);
$this->assertTrue($container->hasDefinition('normal_service'));
}
public function testProcessThrowsExceptionForAutoconfiguredCalls()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Autoconfigured instanceof for type "PHPUnit[\\\\_]Framework[\\\\_]TestCase" defines method calls but these are not supported and should be removed\\./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->registerForAutoconfiguration(parent::class)->addMethodCall('setFoo');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveInstanceofConditionalsPass())->process($container);
}
public function testProcessThrowsExceptionForArguments()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Autoconfigured instanceof for type "PHPUnit[\\\\_]Framework[\\\\_]TestCase" defines arguments but these are not supported and should be removed\\./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->registerForAutoconfiguration(parent::class)->addArgument('bar');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ (new ResolveInstanceofConditionalsPass())->process($container);
}
public function testMergeReset()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('bar', self::class)->addArgument('a')->addMethodCall('setB')->setDecoratedService('foo')->addTag('t')->setInstanceofConditionals([parent::class => (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition(''))->addTag('bar')]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('bar', self::class)->addArgument('a')->addMethodCall('setB')->setDecoratedService('foo')->addTag('t')->setInstanceofConditionals([parent::class => (new ChildDefinition(''))->addTag('bar')]);
+ (new ResolveInstanceofConditionalsPass())->process($container);
$abstract = $container->getDefinition('abstract.instanceof.bar');
$this->assertEmpty($abstract->getArguments());
$this->assertEmpty($abstract->getMethodCalls());
@@ -157,13 +159,13 @@ public function testMergeReset()
}
public function testBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$def = $container->register('foo', self::class)->setBindings(['$toto' => 123]);
- $def->setInstanceofConditionals([parent::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('')]);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInstanceofConditionalsPass())->process($container);
+ $def->setInstanceofConditionals([parent::class => new ChildDefinition('')]);
+ (new ResolveInstanceofConditionalsPass())->process($container);
$bindings = $container->getDefinition('foo')->getBindings();
- $this->assertSame(['$toto'], \array_keys($bindings));
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument::class, $bindings['$toto']);
+ $this->assertSame(['$toto'], array_keys($bindings));
+ $this->assertInstanceOf(BoundArgument::class, $bindings['$toto']);
$this->assertSame(123, $bindings['$toto']->getValues()[0]);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php
index f93f4cf72..6dad8ef65 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveInvalidReferencesPassTest.php
@@ -16,12 +16,12 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class ResolveInvalidReferencesPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveInvalidReferencesPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = $container->register('foo')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])->addMethodCall('foo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('moo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
+ $container = new ContainerBuilder();
+ $def = $container->register('foo')->setArguments([new Reference('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE), new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])->addMethodCall('foo', [new Reference('moo', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
$this->process($container);
$arguments = $def->getArguments();
$this->assertSame([null, null], $arguments);
@@ -29,18 +29,18 @@ public function testProcess()
}
public function testProcessIgnoreInvalidArgumentInCollectionArgument()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('baz');
- $def = $container->register('foo')->setArguments([[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE), $baz = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('moo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE)]]);
+ $def = $container->register('foo')->setArguments([[new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), $baz = new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new Reference('moo', ContainerInterface::NULL_ON_INVALID_REFERENCE)]]);
$this->process($container);
$arguments = $def->getArguments();
$this->assertSame([$baz, null], $arguments[0]);
}
public function testProcessKeepMethodCallOnInvalidArgumentInCollectionArgument()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('baz');
- $def = $container->register('foo')->addMethodCall('foo', [[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE), $baz = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('moo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE)]]);
+ $def = $container->register('foo')->addMethodCall('foo', [[new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), $baz = new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new Reference('moo', ContainerInterface::NULL_ON_INVALID_REFERENCE)]]);
$this->process($container);
$calls = $def->getMethodCalls();
$this->assertCount(1, $def->getMethodCalls());
@@ -48,29 +48,29 @@ public function testProcessKeepMethodCallOnInvalidArgumentInCollectionArgument()
}
public function testProcessIgnoreNonExistentServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = $container->register('foo')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]);
+ $container = new ContainerBuilder();
+ $def = $container->register('foo')->setArguments([new Reference('bar')]);
$this->process($container);
$arguments = $def->getArguments();
$this->assertEquals('bar', (string) $arguments[0]);
}
public function testProcessRemovesPropertiesOnInvalid()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = $container->register('foo')->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE));
+ $container = new ContainerBuilder();
+ $def = $container->register('foo')->setProperty('foo', new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE));
$this->process($container);
$this->assertEquals([], $def->getProperties());
}
public function testProcessRemovesArgumentsOnInvalid()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = $container->register('foo')->addArgument([[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE))]]);
+ $container = new ContainerBuilder();
+ $def = $container->register('foo')->addArgument([[new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE), new ServiceClosureArgument(new Reference('baz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE))]]);
$this->process($container);
$this->assertSame([[[]]], $def->getArguments());
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveInvalidReferencesPass();
+ $pass = new ResolveInvalidReferencesPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php
index f74700a3e..01b95de8f 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php
@@ -22,103 +22,103 @@
/**
* @author Kévin Dunglas
*/
-class ResolveNamedArgumentsPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveNamedArgumentsPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
- $definition->setArguments([2 => 'http://api.example.com', '$apiKey' => '123', 0 => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
+ $container = new ContainerBuilder();
+ $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class);
+ $definition->setArguments([2 => 'http://api.example.com', '$apiKey' => '123', 0 => new Reference('foo')]);
$definition->addMethodCall('setApiKey', ['$apiKey' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
- $this->assertEquals([0 => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), 1 => '123', 2 => 'http://api.example.com'], $definition->getArguments());
+ $this->assertEquals([0 => new Reference('foo'), 1 => '123', 2 => 'http://api.example.com'], $definition->getArguments());
$this->assertEquals([['setApiKey', ['123']]], $definition->getMethodCalls());
}
public function testWithFactory()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('factory', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NoConstructor::class);
- $definition = $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NoConstructor::class)->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('factory'), 'create'])->setArguments(['$apiKey' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $container = new ContainerBuilder();
+ $container->register('factory', NoConstructor::class);
+ $definition = $container->register('foo', NoConstructor::class)->setFactory([new Reference('factory'), 'create'])->setArguments(['$apiKey' => '123']);
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
$this->assertSame([0 => '123'], $definition->getArguments());
}
public function testClassNull()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
+ $container = new ContainerBuilder();
+ $definition = $container->register(NamedArgumentsDummy::class);
$definition->setArguments(['$apiKey' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
}
public function testClassNotExist()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotExist::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotExist::class);
+ $container = new ContainerBuilder();
+ $definition = $container->register(NotExist::class, NotExist::class);
$definition->setArguments(['$apiKey' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
}
public function testClassNoConstructor()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NoConstructor::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NoConstructor::class);
+ $container = new ContainerBuilder();
+ $definition = $container->register(NoConstructor::class, NoConstructor::class);
$definition->setArguments(['$apiKey' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
}
public function testArgumentNotFound()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Invalid service "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\NamedArgumentsDummy": method "__construct()" has no argument named "$notFound". Check your service definition.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
+ $container = new ContainerBuilder();
+ $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class);
$definition->setArguments(['$notFound' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
}
public function testCorrectMethodReportedInException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Invalid service "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestDefinition1": method "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\FactoryDummyWithoutReturnTypes::createTestDefinition1()" has no argument named "$notFound". Check your service definition.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes::class);
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1::class);
- $definition->setFactory([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes::class, 'createTestDefinition1']);
+ $container = new ContainerBuilder();
+ $container->register(FactoryDummyWithoutReturnTypes::class, FactoryDummyWithoutReturnTypes::class);
+ $definition = $container->register(TestDefinition1::class, TestDefinition1::class);
+ $definition->setFactory([FactoryDummyWithoutReturnTypes::class, 'createTestDefinition1']);
$definition->setArguments(['$notFound' => '123']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
}
public function testTypedArgument()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class);
- $definition->setArguments(['$apiKey' => '123', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $container = new ContainerBuilder();
+ $definition = $container->register(NamedArgumentsDummy::class, NamedArgumentsDummy::class);
+ $definition->setArguments(['$apiKey' => '123', CaseSensitiveClass::class => new Reference('foo')]);
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), '123'], $definition->getArguments());
+ $this->assertEquals([new Reference('foo'), '123'], $definition->getArguments());
}
public function testResolvesMultipleArgumentsOfTheSameType()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy::class);
- $definition->setArguments([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), '$token' => 'qwerty']);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $container = new ContainerBuilder();
+ $definition = $container->register(SimilarArgumentsDummy::class, SimilarArgumentsDummy::class);
+ $definition->setArguments([CaseSensitiveClass::class => new Reference('foo'), '$token' => 'qwerty']);
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), 'qwerty', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')], $definition->getArguments());
+ $this->assertEquals([new Reference('foo'), 'qwerty', new Reference('foo')], $definition->getArguments());
}
public function testResolvePrioritizeNamedOverType()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy::class);
- $definition->setArguments([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), '$token' => 'qwerty', '$class1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]);
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass();
+ $container = new ContainerBuilder();
+ $definition = $container->register(SimilarArgumentsDummy::class, SimilarArgumentsDummy::class);
+ $definition->setArguments([CaseSensitiveClass::class => new Reference('foo'), '$token' => 'qwerty', '$class1' => new Reference('bar')]);
+ $pass = new ResolveNamedArgumentsPass();
$pass->process($container);
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), 'qwerty', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')], $definition->getArguments());
+ $this->assertEquals([new Reference('bar'), 'qwerty', new Reference('foo')], $definition->getArguments());
}
}
class NoConstructor
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php
index 7b5b1908a..3cb5877d4 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveParameterPlaceHoldersPassTest.php
@@ -14,14 +14,14 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
-class ResolveParameterPlaceHoldersPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveParameterPlaceHoldersPassTest extends TestCase
{
private $compilerPass;
private $container;
private $fooDefinition;
protected function setUp()
{
- $this->compilerPass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass();
+ $this->compilerPass = new ResolveParameterPlaceHoldersPass();
$this->container = $this->createContainerBuilder();
$this->compilerPass->process($this->container);
$this->fooDefinition = $this->container->getDefinition('foo');
@@ -56,31 +56,31 @@ public function testAliasParametersShouldBeResolved()
}
public function testBindingsShouldBeResolved()
{
- list($boundValue) = $this->container->getDefinition('foo')->getBindings()['$baz']->getValues();
+ [$boundValue] = $this->container->getDefinition('foo')->getBindings()['$baz']->getValues();
$this->assertSame($this->container->getParameterBag()->resolveValue('%env(BAZ)%'), $boundValue);
}
public function testParameterNotFoundExceptionsIsThrown()
{
- $this->expectException(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException::class);
+ $this->expectException(ParameterNotFoundException::class);
$this->expectExceptionMessage('The service "baz_service_id" has a dependency on a non-existent parameter "non_existent_param".');
- $containerBuilder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $containerBuilder = new ContainerBuilder();
$definition = $containerBuilder->register('baz_service_id');
$definition->setArgument(0, '%non_existent_param%');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass();
+ $pass = new ResolveParameterPlaceHoldersPass();
$pass->process($containerBuilder);
}
public function testParameterNotFoundExceptionsIsNotThrown()
{
- $containerBuilder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $containerBuilder = new ContainerBuilder();
$definition = $containerBuilder->register('baz_service_id');
$definition->setArgument(0, '%non_existent_param%');
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveParameterPlaceHoldersPass(\true, \false);
+ $pass = new ResolveParameterPlaceHoldersPass(true, false);
$pass->process($containerBuilder);
$this->assertCount(1, $definition->getErrors());
}
private function createContainerBuilder()
{
- $containerBuilder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $containerBuilder = new ContainerBuilder();
$containerBuilder->setParameter('foo.class', 'Foo');
$containerBuilder->setParameter('foo.factory.class', 'FooFactory');
$containerBuilder->setParameter('foo.arg1', 'bar');
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolvePrivatesPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolvePrivatesPassTest.php
index 4cf292128..460198e96 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolvePrivatesPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolvePrivatesPassTest.php
@@ -13,14 +13,14 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolvePrivatesPass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class ResolvePrivatesPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolvePrivatesPassTest extends TestCase
{
public function testPrivateHasHigherPrecedenceThanPublic()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\true)->setPrivate(\true);
- $container->setAlias('bar', 'foo')->setPublic(\false)->setPrivate(\false);
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolvePrivatesPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(true)->setPrivate(true);
+ $container->setAlias('bar', 'foo')->setPublic(false)->setPrivate(false);
+ (new ResolvePrivatesPass())->process($container);
$this->assertFalse($container->getDefinition('foo')->isPublic());
$this->assertFalse($container->getAlias('bar')->isPublic());
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
index c12bcbf90..5d5588a7e 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveReferencesToAliasesPassTest.php
@@ -16,23 +16,23 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class ResolveReferencesToAliasesPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveReferencesToAliasesPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setAlias('bar', 'foo');
- $def = $container->register('moo')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]);
+ $def = $container->register('moo')->setArguments([new Reference('bar')]);
$this->process($container);
$arguments = $def->getArguments();
$this->assertEquals('foo', (string) $arguments[0]);
}
public function testProcessRecursively()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setAlias('bar', 'foo');
$container->setAlias('moo', 'bar');
- $def = $container->register('foobar')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('moo')]);
+ $def = $container->register('foobar')->setArguments([new Reference('moo')]);
$this->process($container);
$arguments = $def->getArguments();
$this->assertEquals('foo', (string) $arguments[0]);
@@ -40,20 +40,20 @@ public function testProcessRecursively()
public function testAliasCircularReference()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setAlias('bar', 'foo');
$container->setAlias('foo', 'bar');
$this->process($container);
}
public function testResolveFactory()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('factory', 'Factory');
- $container->setAlias('factory_alias', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('factory'));
- $foo = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
- $foo->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('factory_alias'), 'createFoo']);
+ $container->setAlias('factory_alias', new Alias('factory'));
+ $foo = new Definition();
+ $foo->setFactory([new Reference('factory_alias'), 'createFoo']);
$container->setDefinition('foo', $foo);
- $bar = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $bar = new Definition();
$bar->setFactory(['Factory', 'createFoo']);
$container->setDefinition('bar', $bar);
$this->process($container);
@@ -62,9 +62,9 @@ public function testResolveFactory()
$this->assertSame('factory', (string) $resolvedFooFactory[0]);
$this->assertSame('Factory', (string) $resolvedBarFactory[0]);
}
- protected function process(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ protected function process(ContainerBuilder $container)
{
- $pass = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveReferencesToAliasesPass();
+ $pass = new ResolveReferencesToAliasesPass();
$pass->process($container);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php
index fe05cc653..29c24f9fc 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveTaggedIteratorArgumentPassTest.php
@@ -18,19 +18,19 @@
/**
* @author Roland Franssen
*/
-class ResolveTaggedIteratorArgumentPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ResolveTaggedIteratorArgumentPassTest extends TestCase
{
public function testProcess()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('a', 'stdClass')->addTag('foo');
$container->register('b', 'stdClass')->addTag('foo', ['priority' => 20]);
$container->register('c', 'stdClass')->addTag('foo', ['priority' => 10]);
- $container->register('d', 'stdClass')->setProperty('foos', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument('foo'));
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveTaggedIteratorArgumentPass())->process($container);
+ $container->register('d', 'stdClass')->setProperty('foos', new TaggedIteratorArgument('foo'));
+ (new ResolveTaggedIteratorArgumentPass())->process($container);
$properties = $container->getDefinition('d')->getProperties();
- $expected = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument('foo');
- $expected->setValues([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('b'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('c'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('a')]);
+ $expected = new TaggedIteratorArgument('foo');
+ $expected->setValues([new Reference('b'), new Reference('c'), new Reference('a')]);
$this->assertEquals($expected, $properties['foos']);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ServiceLocatorTagPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ServiceLocatorTagPassTest.php
index f33154e13..cea69ca2c 100644
--- a/vendor/symfony/dependency-injection/Tests/Compiler/ServiceLocatorTagPassTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/ServiceLocatorTagPassTest.php
@@ -19,69 +19,72 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition2;
+use function array_keys;
+use function get_class;
+
require_once __DIR__ . '/../Fixtures/includes/classes.php';
-class ServiceLocatorTagPassTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ServiceLocatorTagPassTest extends TestCase
{
public function testNoServices()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Invalid definition for service "foo": an array of references is expected as first argument when the "container.service_locator" tag is set.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->addTag('container.service_locator');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', ServiceLocator::class)->addTag('container.service_locator');
+ (new ServiceLocatorTagPass())->process($container);
}
public function testInvalidServices()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Invalid definition for service "foo": an array of references is expected as first argument when the "container.service_locator" tag is set, "string" found for key "0".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setArguments([['dummy']])->addTag('container.service_locator');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', ServiceLocator::class)->setArguments([['dummy']])->addTag('container.service_locator');
+ (new ServiceLocatorTagPass())->process($container);
}
public function testProcessValue()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class);
- $container->register('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setArguments([[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'some.service' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]])->addTag('container.service_locator');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('bar', CustomDefinition::class);
+ $container->register('baz', CustomDefinition::class);
+ $container->register('foo', ServiceLocator::class)->setArguments([[new Reference('bar'), new Reference('baz'), 'some.service' => new Reference('bar')]])->addTag('container.service_locator');
+ (new ServiceLocatorTagPass())->process($container);
/** @var ServiceLocator $locator */
$locator = $container->get('foo');
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \get_class($locator('bar')));
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \get_class($locator('baz')));
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \get_class($locator('some.service')));
+ $this->assertSame(CustomDefinition::class, get_class($locator('bar')));
+ $this->assertSame(CustomDefinition::class, get_class($locator('baz')));
+ $this->assertSame(CustomDefinition::class, get_class($locator('some.service')));
}
public function testServiceWithKeyOverwritesPreviousInheritedKey()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1::class);
- $container->register('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition2::class);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setArguments([[new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), 'bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz')]])->addTag('container.service_locator');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('bar', TestDefinition1::class);
+ $container->register('baz', TestDefinition2::class);
+ $container->register('foo', ServiceLocator::class)->setArguments([[new Reference('bar'), 'bar' => new Reference('baz')]])->addTag('container.service_locator');
+ (new ServiceLocatorTagPass())->process($container);
/** @var ServiceLocator $locator */
$locator = $container->get('foo');
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition2::class, \get_class($locator('bar')));
+ $this->assertSame(TestDefinition2::class, get_class($locator('bar')));
}
public function testInheritedKeyOverwritesPreviousServiceWithKey()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1::class);
- $container->register('baz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition2::class);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setArguments([['bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), 16 => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz')]])->addTag('container.service_locator');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass())->process($container);
+ $container = new ContainerBuilder();
+ $container->register('bar', TestDefinition1::class);
+ $container->register('baz', TestDefinition2::class);
+ $container->register('foo', ServiceLocator::class)->setArguments([['bar' => new Reference('baz'), new Reference('bar'), 16 => new Reference('baz')]])->addTag('container.service_locator');
+ (new ServiceLocatorTagPass())->process($container);
/** @var ServiceLocator $locator */
$locator = $container->get('foo');
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1::class, \get_class($locator('bar')));
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition2::class, \get_class($locator(16)));
+ $this->assertSame(TestDefinition1::class, get_class($locator('bar')));
+ $this->assertSame(TestDefinition2::class, get_class($locator(16)));
}
public function testBindingsAreCopied()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('foo')->setBindings(['foo' => 'foo']);
- $locator = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass::register($container, ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')], 'foo');
+ $locator = ServiceLocatorTagPass::register($container, ['foo' => new Reference('foo')], 'foo');
$locator = $container->getDefinition($locator);
$locator = $container->getDefinition($locator->getFactory()[0]);
- $this->assertSame(['foo'], \array_keys($locator->getBindings()));
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\BoundArgument::class, $locator->getBindings()['foo']);
+ $this->assertSame(['foo'], array_keys($locator->getBindings()));
+ $this->assertInstanceOf(BoundArgument::class, $locator->getBindings()['foo']);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/index.php b/vendor/symfony/dependency-injection/Tests/Compiler/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Compiler/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Config/AutowireServiceResourceTest.php b/vendor/symfony/dependency-injection/Tests/Config/AutowireServiceResourceTest.php
index b6bce722b..4ae2ad0dd 100644
--- a/vendor/symfony/dependency-injection/Tests/Config/AutowireServiceResourceTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Config/AutowireServiceResourceTest.php
@@ -13,10 +13,20 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\AutowireServiceResource;
+use ReflectionClass;
+use function file_exists;
+use function realpath;
+use function serialize;
+use function sys_get_temp_dir;
+use function time;
+use function touch;
+use function unlink;
+use function unserialize;
+
/**
* @group legacy
*/
-class AutowireServiceResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class AutowireServiceResourceTest extends TestCase
{
/**
* @var AutowireServiceResource
@@ -27,11 +37,11 @@ class AutowireServiceResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Frame
private $time;
protected function setUp()
{
- $this->file = \realpath(\sys_get_temp_dir()) . '/tmp.php';
- $this->time = \time();
- \touch($this->file, $this->time);
- $this->class = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Config\Foo::class;
- $this->resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\AutowireServiceResource($this->class, $this->file, []);
+ $this->file = realpath(sys_get_temp_dir()) . '/tmp.php';
+ $this->time = time();
+ touch($this->file, $this->time);
+ $this->class = Foo::class;
+ $this->resource = new AutowireServiceResource($this->class, $this->file, []);
}
public function testToString()
{
@@ -39,7 +49,7 @@ public function testToString()
}
public function testSerializeUnserialize()
{
- $unserialized = \unserialize(\serialize($this->resource));
+ $unserialized = unserialize(serialize($this->resource));
$this->assertEquals($this->resource, $unserialized);
}
public function testIsFresh()
@@ -50,32 +60,32 @@ public function testIsFresh()
}
public function testIsFreshForDeletedResources()
{
- \unlink($this->file);
+ unlink($this->file);
$this->assertFalse($this->resource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the resource does not exist');
}
public function testIsNotFreshChangedResource()
{
- $oldResource = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\AutowireServiceResource($this->class, $this->file, ['will_be_different']);
+ $oldResource = new AutowireServiceResource($this->class, $this->file, ['will_be_different']);
// test with a stale file *and* a resource that *will* be different than the actual
$this->assertFalse($oldResource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the constructor arguments have changed');
}
public function testIsFreshSameConstructorArgs()
{
- $oldResource = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\AutowirePass::createResourceForClass(new \ReflectionClass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Config\Foo::class));
+ $oldResource = AutowirePass::createResourceForClass(new ReflectionClass(Foo::class));
// test with a stale file *but* the resource will not be changed
$this->assertTrue($oldResource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the constructor arguments have changed');
}
public function testNotFreshIfClassNotFound()
{
- $resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\AutowireServiceResource('_PhpScoper5ea00cc67502b\\Some\\Non\\Existent\\Class', $this->file, []);
+ $resource = new AutowireServiceResource('_PhpScoper5ea00cc67502b\\Some\\Non\\Existent\\Class', $this->file, []);
$this->assertFalse($resource->isFresh($this->getStaleFileTime()), '->isFresh() returns false if the class no longer exists');
}
protected function tearDown()
{
- if (!\file_exists($this->file)) {
+ if (!file_exists($this->file)) {
return;
}
- \unlink($this->file);
+ unlink($this->file);
}
private function getStaleFileTime()
{
diff --git a/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceCheckerTest.php b/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceCheckerTest.php
index 9059d401f..bbdce1144 100644
--- a/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceCheckerTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceCheckerTest.php
@@ -16,7 +16,9 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
-class ContainerParametersResourceCheckerTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function time;
+
+class ContainerParametersResourceCheckerTest extends TestCase
{
/** @var ContainerParametersResource */
private $resource;
@@ -26,9 +28,9 @@ class ContainerParametersResourceCheckerTest extends \_PhpScoper5ea00cc67502b\PH
private $container;
protected function setUp()
{
- $this->resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']);
- $this->container = $this->getMockBuilder(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class)->getMock();
- $this->resourceChecker = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResourceChecker($this->container);
+ $this->resource = new ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']);
+ $this->container = $this->getMockBuilder(ContainerInterface::class)->getMock();
+ $this->resourceChecker = new ContainerParametersResourceChecker($this->container);
}
public function testSupports()
{
@@ -40,19 +42,19 @@ public function testSupports()
public function testIsFresh(callable $mockContainer, $expected)
{
$mockContainer($this->container);
- $this->assertSame($expected, $this->resourceChecker->isFresh($this->resource, \time()));
+ $this->assertSame($expected, $this->resourceChecker->isFresh($this->resource, time()));
}
public function isFreshProvider()
{
- (yield 'not fresh on missing parameter' => [function (\_PhpScoper5ea00cc67502b\PHPUnit\Framework\MockObject\MockObject $container) {
- $container->method('hasParameter')->with('locales')->willReturn(\false);
- }, \false]);
- (yield 'not fresh on different value' => [function (\_PhpScoper5ea00cc67502b\PHPUnit\Framework\MockObject\MockObject $container) {
+ (yield 'not fresh on missing parameter' => [function (MockObject $container) {
+ $container->method('hasParameter')->with('locales')->willReturn(false);
+ }, false]);
+ (yield 'not fresh on different value' => [function (MockObject $container) {
$container->method('getParameter')->with('locales')->willReturn(['nl', 'es']);
- }, \false]);
- (yield 'fresh on every identical parameters' => [function (\_PhpScoper5ea00cc67502b\PHPUnit\Framework\MockObject\MockObject $container) {
- $container->expects($this->exactly(2))->method('hasParameter')->willReturn(\true);
+ }, false]);
+ (yield 'fresh on every identical parameters' => [function (MockObject $container) {
+ $container->expects($this->exactly(2))->method('hasParameter')->willReturn(true);
$container->expects($this->exactly(2))->method('getParameter')->withConsecutive([$this->equalTo('locales')], [$this->equalTo('default_locale')])->willReturnMap([['locales', ['fr', 'en']], ['default_locale', 'fr']]);
- }, \true]);
+ }, true]);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceTest.php b/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceTest.php
index a9dfa24aa..3a10e978a 100644
--- a/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Config/ContainerParametersResourceTest.php
@@ -12,13 +12,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResource;
-class ContainerParametersResourceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function serialize;
+use function unserialize;
+
+class ContainerParametersResourceTest extends TestCase
{
/** @var ContainerParametersResource */
private $resource;
protected function setUp()
{
- $this->resource = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Config\ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']);
+ $this->resource = new ContainerParametersResource(['locales' => ['fr', 'en'], 'default_locale' => 'fr']);
}
public function testToString()
{
@@ -26,7 +29,7 @@ public function testToString()
}
public function testSerializeUnserialize()
{
- $unserialized = \unserialize(\serialize($this->resource));
+ $unserialized = unserialize(serialize($this->resource));
$this->assertEquals($this->resource, $unserialized);
}
public function testGetParameters()
diff --git a/vendor/symfony/dependency-injection/Tests/Config/index.php b/vendor/symfony/dependency-injection/Tests/Config/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Config/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php b/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php
index 0ae4b8c1f..6d620ae6b 100644
--- a/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php
@@ -12,7 +12,11 @@
require_once __DIR__ . '/Fixtures/includes/classes.php';
require_once __DIR__ . '/Fixtures/includes/ProjectExtension.php';
+
+use _PhpScoper5ea00cc67502b\BarClass;
+use _PhpScoper5ea00cc67502b\BazClass;
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
+use _PhpScoper5ea00cc67502b\ProjectExtension;
use _PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface as PsrContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ComposerResource;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource;
@@ -40,37 +44,55 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
-class ContainerBuilderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use DateTime;
+use InvalidArgumentException;
+use ReflectionClass;
+use ReflectionProperty;
+use stdClass;
+use function array_filter;
+use function array_keys;
+use function array_merge;
+use function array_search;
+use function count;
+use function dirname;
+use function end;
+use function get_class;
+use function iterator_to_array;
+use function putenv;
+use function realpath;
+use function strpos;
+
+class ContainerBuilderTest extends TestCase
{
public function testDefaultRegisteredDefinitions()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$this->assertCount(1, $builder->getDefinitions());
$this->assertTrue($builder->hasDefinition('service_container'));
$definition = $builder->getDefinition('service_container');
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition::class, $definition);
+ $this->assertInstanceOf(Definition::class, $definition);
$this->assertTrue($definition->isSynthetic());
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class, $definition->getClass());
- $this->assertTrue($builder->hasAlias(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class));
- $this->assertTrue($builder->hasAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class));
+ $this->assertSame(ContainerInterface::class, $definition->getClass());
+ $this->assertTrue($builder->hasAlias(PsrContainerInterface::class));
+ $this->assertTrue($builder->hasAlias(ContainerInterface::class));
}
public function testDefinitions()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definitions = ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass'), 'bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BarClass')];
+ $builder = new ContainerBuilder();
+ $definitions = ['foo' => new Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass'), 'bar' => new Definition('BarClass')];
$builder->setDefinitions($definitions);
$this->assertEquals($definitions, $builder->getDefinitions(), '->setDefinitions() sets the service definitions');
$this->assertTrue($builder->hasDefinition('foo'), '->hasDefinition() returns true if a service definition exists');
$this->assertFalse($builder->hasDefinition('foobar'), '->hasDefinition() returns false if a service definition does not exist');
- $builder->setDefinition('foobar', $foo = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('FooBarClass'));
+ $builder->setDefinition('foobar', $foo = new Definition('FooBarClass'));
$this->assertEquals($foo, $builder->getDefinition('foobar'), '->getDefinition() returns a service definition if defined');
- $this->assertSame($builder->setDefinition('foobar', $foo = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('FooBarClass')), $foo, '->setDefinition() implements a fluid interface by returning the service reference');
- $builder->addDefinitions($defs = ['foobar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('FooBarClass')]);
- $this->assertEquals(\array_merge($definitions, $defs), $builder->getDefinitions(), '->addDefinitions() adds the service definitions');
+ $this->assertSame($builder->setDefinition('foobar', $foo = new Definition('FooBarClass')), $foo, '->setDefinition() implements a fluid interface by returning the service reference');
+ $builder->addDefinitions($defs = ['foobar' => new Definition('FooBarClass')]);
+ $this->assertEquals(array_merge($definitions, $defs), $builder->getDefinitions(), '->addDefinitions() adds the service definitions');
try {
$builder->getDefinition('baz');
$this->fail('->getDefinition() throws a ServiceNotFoundException if the service definition does not exist');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException $e) {
+ } catch (ServiceNotFoundException $e) {
$this->assertEquals('You have requested a non-existent service "baz".', $e->getMessage(), '->getDefinition() throws a ServiceNotFoundException if the service definition does not exist');
}
}
@@ -80,83 +102,83 @@ public function testDefinitions()
*/
public function testCreateDeprecatedService()
{
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
- $definition->setDeprecated(\true);
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $definition = new Definition('stdClass');
+ $definition->setDeprecated(true);
+ $builder = new ContainerBuilder();
$builder->setDefinition('deprecated_foo', $definition);
$builder->get('deprecated_foo');
}
public function testRegister()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass');
$this->assertTrue($builder->hasDefinition('foo'), '->register() registers a new service definition');
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', $builder->getDefinition('foo'), '->register() returns the newly created Definition instance');
}
public function testAutowire()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->autowire('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass');
$this->assertTrue($builder->hasDefinition('foo'), '->autowire() registers a new service definition');
$this->assertTrue($builder->getDefinition('foo')->isAutowired(), '->autowire() creates autowired definitions');
}
public function testHas()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$this->assertFalse($builder->has('foo'), '->has() returns false if the service does not exist');
$builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass');
$this->assertTrue($builder->has('foo'), '->has() returns true if a service definition exists');
- $builder->set('bar', new \stdClass());
+ $builder->set('bar', new stdClass());
$this->assertTrue($builder->has('bar'), '->has() returns true if a service exists');
}
public function testGetThrowsExceptionIfServiceDoesNotExist()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException');
$this->expectExceptionMessage('You have requested a non-existent service "foo".');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->get('foo');
}
public function testGetReturnsNullIfServiceDoesNotExistAndInvalidReferenceIsUsed()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $this->assertNull($builder->get('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service does not exist and NULL_ON_INVALID_REFERENCE is passed as a second argument');
+ $builder = new ContainerBuilder();
+ $this->assertNull($builder->get('foo', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service does not exist and NULL_ON_INVALID_REFERENCE is passed as a second argument');
}
public function testGetThrowsCircularReferenceExceptionIfServiceHasReferenceToItself()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->register('baz', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz')]);
+ $builder = new ContainerBuilder();
+ $builder->register('baz', 'stdClass')->setArguments([new Reference('baz')]);
$builder->get('baz');
}
public function testGetReturnsSameInstanceWhenServiceIsShared()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('bar', 'stdClass');
$this->assertTrue($builder->get('bar') === $builder->get('bar'), '->get() always returns the same instance if the service is shared');
}
public function testGetCreatesServiceBasedOnDefinition()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', 'stdClass');
$this->assertIsObject($builder->get('foo'), '->get() returns the service definition associated with the id');
}
public function testGetReturnsRegisteredService()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->set('bar', $bar = new \stdClass());
+ $builder = new ContainerBuilder();
+ $builder->set('bar', $bar = new stdClass());
$this->assertSame($bar, $builder->get('bar'), '->get() returns the service associated with the id');
}
public function testRegisterDoesNotOverrideExistingService()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->set('bar', $bar = new \stdClass());
+ $builder = new ContainerBuilder();
+ $builder->set('bar', $bar = new stdClass());
$builder->register('bar', 'stdClass');
$this->assertSame($bar, $builder->get('bar'), '->get() returns the service associated with the id even if a definition has been defined');
}
public function testNonSharedServicesReturnsDifferentInstances()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->register('bar', 'stdClass')->setShared(\false);
+ $builder = new ContainerBuilder();
+ $builder->register('bar', 'stdClass')->setShared(false);
$this->assertNotSame($builder->get('bar'), $builder->get('bar'));
}
/**
@@ -165,7 +187,7 @@ public function testNonSharedServicesReturnsDifferentInstances()
public function testBadAliasId($id)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->setAlias($id, 'foo');
}
/**
@@ -174,8 +196,8 @@ public function testBadAliasId($id)
public function testBadDefinitionId($id)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->setDefinition($id, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Foo'));
+ $builder = new ContainerBuilder();
+ $builder->setDefinition($id, new Definition('Foo'));
}
public function provideBadId()
{
@@ -185,27 +207,27 @@ public function testGetUnsetLoadingServiceWhenCreateServiceThrowsAnException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('You have requested a synthetic service ("foo"). The DIC does not know how to construct this service.');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->register('foo', 'stdClass')->setSynthetic(\true);
+ $builder = new ContainerBuilder();
+ $builder->register('foo', 'stdClass')->setSynthetic(true);
// we expect a RuntimeException here as foo is synthetic
try {
$builder->get('foo');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
+ } catch (RuntimeException $e) {
}
// we must also have the same RuntimeException here
$builder->get('foo');
}
public function testGetServiceIds()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', 'stdClass');
- $builder->bar = $bar = new \stdClass();
+ $builder->bar = $bar = new stdClass();
$builder->register('bar', 'stdClass');
$this->assertEquals(['service_container', 'foo', 'bar', '_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface'], $builder->getServiceIds(), '->getServiceIds() returns all defined service ids');
}
public function testAliases()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', 'stdClass');
$builder->setAlias('bar', 'foo');
$this->assertTrue($builder->hasAlias('bar'), '->hasAlias() returns true if the alias exists');
@@ -216,22 +238,22 @@ public function testAliases()
try {
$builder->setAlias('foobar', 'foobar');
$this->fail('->setAlias() throws an InvalidArgumentException if the alias references itself');
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertEquals('An alias can not reference itself, got a circular reference on "foobar".', $e->getMessage(), '->setAlias() throws an InvalidArgumentException if the alias references itself');
}
try {
$builder->getAlias('foobar');
$this->fail('->getAlias() throws an InvalidArgumentException if the alias does not exist');
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertEquals('The service alias "foobar" does not exist.', $e->getMessage(), '->getAlias() throws an InvalidArgumentException if the alias does not exist');
}
}
public function testGetAliases()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->setAlias('bar', 'foo');
$builder->setAlias('foobar', 'foo');
- $builder->setAlias('moo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('foo', \false));
+ $builder->setAlias('moo', new Alias('foo', false));
$aliases = $builder->getAliases();
$this->assertEquals('foo', (string) $aliases['bar']);
$this->assertTrue($aliases['bar']->isPublic());
@@ -246,7 +268,7 @@ public function testGetAliases()
}
public function testSetAliases()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->setAliases(['bar' => 'foo', 'foobar' => 'foo']);
$aliases = $builder->getAliases();
$this->assertArrayHasKey('bar', $aliases);
@@ -254,7 +276,7 @@ public function testSetAliases()
}
public function testAddAliases()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->setAliases(['bar' => 'foo']);
$builder->addAliases(['foobar' => 'foo']);
$aliases = $builder->getAliases();
@@ -263,36 +285,36 @@ public function testAddAliases()
}
public function testSetReplacesAlias()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->setAlias('alias', 'aliased');
- $builder->set('aliased', new \stdClass());
- $builder->set('alias', $foo = new \stdClass());
+ $builder->set('aliased', new stdClass());
+ $builder->set('alias', $foo = new stdClass());
$this->assertSame($foo, $builder->get('alias'), '->set() replaces an existing alias');
}
public function testAliasesKeepInvalidBehavior()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $aliased = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
- $aliased->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
+ $builder = new ContainerBuilder();
+ $aliased = new Definition('stdClass');
+ $aliased->addMethodCall('setBar', [new Reference('bar', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
$builder->setDefinition('aliased', $aliased);
$builder->setAlias('alias', 'aliased');
- $this->assertEquals(new \stdClass(), $builder->get('alias'));
+ $this->assertEquals(new stdClass(), $builder->get('alias'));
}
public function testAddGetCompilerPass()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->setResourceTracking(\false);
+ $builder = new ContainerBuilder();
+ $builder->setResourceTracking(false);
$defaultPasses = $builder->getCompiler()->getPassConfig()->getPasses();
- $builder->addCompilerPass($pass1 = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface')->getMock(), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, -5);
- $builder->addCompilerPass($pass2 = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface')->getMock(), \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
+ $builder->addCompilerPass($pass1 = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface')->getMock(), PassConfig::TYPE_BEFORE_OPTIMIZATION, -5);
+ $builder->addCompilerPass($pass2 = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface')->getMock(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 10);
$passes = $builder->getCompiler()->getPassConfig()->getPasses();
- $this->assertCount(\count($passes) - 2, $defaultPasses);
+ $this->assertCount(count($passes) - 2, $defaultPasses);
// Pass 1 is executed later
- $this->assertTrue(\array_search($pass1, $passes, \true) > \array_search($pass2, $passes, \true));
+ $this->assertTrue(array_search($pass1, $passes, true) > array_search($pass2, $passes, true));
}
public function testCreateService()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFile(__DIR__ . '/Fixtures/includes/foo.php');
$builder->register('foo2', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFile(__DIR__ . '/Fixtures/includes/%file%.php');
$builder->setParameter('file', 'foo');
@@ -301,35 +323,35 @@ public function testCreateService()
}
public function testCreateProxyWithRealServiceInstantiator()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFile(__DIR__ . '/Fixtures/includes/foo.php');
- $builder->getDefinition('foo1')->setLazy(\true);
+ $builder->getDefinition('foo1')->setLazy(true);
$foo1 = $builder->get('foo1');
$this->assertSame($foo1, $builder->get('foo1'), 'The same proxy is retrieved on multiple subsequent calls');
- $this->assertSame('_PhpScoper5ea00cc67502b\\Bar\\FooClass', \get_class($foo1));
+ $this->assertSame('_PhpScoper5ea00cc67502b\\Bar\\FooClass', get_class($foo1));
}
public function testCreateServiceClass()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo1', '%class%');
$builder->setParameter('class', 'stdClass');
$this->assertInstanceOf('\\stdClass', $builder->get('foo1'), '->createService() replaces parameters in the class provided by the service definition');
}
public function testCreateServiceArguments()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('bar', 'stdClass');
- $builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addArgument(['foo' => '%value%', '%value%' => 'foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), '%%unescape_it%%']);
+ $builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addArgument(['foo' => '%value%', '%value%' => 'foo', new Reference('bar'), '%%unescape_it%%']);
$builder->setParameter('value', 'bar');
$this->assertEquals(['foo' => 'bar', 'bar' => 'foo', $builder->get('bar'), '%unescape_it%'], $builder->get('foo1')->arguments, '->createService() replaces parameters and service references in the arguments provided by the service definition');
}
public function testCreateServiceFactory()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory('Bar\\FooClass::getInstance');
$builder->register('qux', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory(['_PhpScoper5ea00cc67502b\\Bar\\FooClass', 'getInstance']);
- $builder->register('bar', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass'), 'getInstance']);
- $builder->register('baz', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), 'getInstance']);
+ $builder->register('bar', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory([new Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass'), 'getInstance']);
+ $builder->register('baz', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory([new Reference('bar'), 'getInstance']);
$this->assertTrue($builder->get('foo')->called, '->createService() calls the factory method to create the service instance');
$this->assertTrue($builder->get('qux')->called, '->createService() calls the factory method to create the service instance');
$this->assertTrue($builder->get('bar')->called, '->createService() uses anonymous service as factory');
@@ -337,15 +359,15 @@ public function testCreateServiceFactory()
}
public function testCreateServiceMethodCalls()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('bar', 'stdClass');
- $builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addMethodCall('setBar', [['%value%', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]]);
+ $builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addMethodCall('setBar', [['%value%', new Reference('bar')]]);
$builder->setParameter('value', 'bar');
$this->assertEquals(['bar', $builder->get('bar')], $builder->get('foo1')->bar, '->createService() replaces the values in the method calls arguments');
}
public function testCreateServiceMethodCallsWithEscapedParam()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('bar', 'stdClass');
$builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addMethodCall('setBar', [['%%unescape_it%%']]);
$builder->setParameter('value', 'bar');
@@ -353,20 +375,20 @@ public function testCreateServiceMethodCallsWithEscapedParam()
}
public function testCreateServiceProperties()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('bar', 'stdClass');
- $builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setProperty('bar', ['%value%', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), '%%unescape_it%%']);
+ $builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setProperty('bar', ['%value%', new Reference('bar'), '%%unescape_it%%']);
$builder->setParameter('value', 'bar');
$this->assertEquals(['bar', $builder->get('bar'), '%unescape_it%'], $builder->get('foo1')->bar, '->createService() replaces the values in the properties');
}
public function testCreateServiceConfigurator()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setConfigurator('sc_configure');
$builder->register('foo2', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setConfigurator(['%class%', 'configureStatic']);
$builder->setParameter('class', 'BazClass');
$builder->register('baz', 'BazClass');
- $builder->register('foo3', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setConfigurator([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'configure']);
+ $builder->register('foo3', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setConfigurator([new Reference('baz'), 'configure']);
$builder->register('foo4', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setConfigurator([$builder->getDefinition('baz'), 'configure']);
$builder->register('foo5', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setConfigurator('foo');
$this->assertTrue($builder->get('foo1')->configured, '->createService() calls the configurator');
@@ -376,18 +398,18 @@ public function testCreateServiceConfigurator()
try {
$builder->get('foo5');
$this->fail('->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
- } catch (\InvalidArgumentException $e) {
+ } catch (InvalidArgumentException $e) {
$this->assertEquals('The configure callable for class "Bar\\FooClass" is not a callable.', $e->getMessage(), '->createService() throws an InvalidArgumentException if the configure callable is not a valid callable');
}
}
public function testCreateServiceWithIteratorArgument()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('bar', 'stdClass');
- $builder->register('lazy_context', 'LazyContext')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(['k1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('invalid', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([])]);
+ $builder->register('lazy_context', 'LazyContext')->setArguments([new IteratorArgument(['k1' => new Reference('bar'), new Reference('invalid', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]), new IteratorArgument([])]);
$lazyContext = $builder->get('lazy_context');
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator::class, $lazyContext->lazyValues);
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator::class, $lazyContext->lazyEmptyValues);
+ $this->assertInstanceOf(RewindableGenerator::class, $lazyContext->lazyValues);
+ $this->assertInstanceOf(RewindableGenerator::class, $lazyContext->lazyEmptyValues);
$this->assertCount(1, $lazyContext->lazyValues);
$this->assertCount(0, $lazyContext->lazyEmptyValues);
$i = 0;
@@ -407,88 +429,88 @@ public function testCreateServiceWithIteratorArgument()
public function testCreateSyntheticService()
{
$this->expectException('RuntimeException');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setSynthetic(\true);
+ $builder = new ContainerBuilder();
+ $builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setSynthetic(true);
$builder->get('foo');
}
public function testCreateServiceWithExpression()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->setParameter('bar', 'bar');
$builder->register('bar', 'BarClass');
- $builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addArgument(['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("bar").foo ~ parameter("bar")')]);
+ $builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addArgument(['foo' => new Expression('service("bar").foo ~ parameter("bar")')]);
$this->assertEquals('foobar', $builder->get('foo')->arguments['foo']);
}
public function testResolveServices()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass');
- $this->assertEquals($builder->get('foo'), $builder->resolveServices(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')), '->resolveServices() resolves service references to service instances');
- $this->assertEquals(['foo' => ['foo', $builder->get('foo')]], $builder->resolveServices(['foo' => ['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]]), '->resolveServices() resolves service references to service instances in nested arrays');
- $this->assertEquals($builder->get('foo'), $builder->resolveServices(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("foo")')), '->resolveServices() resolves expressions');
+ $this->assertEquals($builder->get('foo'), $builder->resolveServices(new Reference('foo')), '->resolveServices() resolves service references to service instances');
+ $this->assertEquals(['foo' => ['foo', $builder->get('foo')]], $builder->resolveServices(['foo' => ['foo', new Reference('foo')]]), '->resolveServices() resolves service references to service instances in nested arrays');
+ $this->assertEquals($builder->get('foo'), $builder->resolveServices(new Expression('service("foo")')), '->resolveServices() resolves expressions');
}
public function testResolveServicesWithDecoratedDefinition()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Constructing service "foo" from a parent definition is not supported at build time.');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->setDefinition('grandpa', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass'));
- $builder->setDefinition('parent', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('grandpa'));
- $builder->setDefinition('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('parent'));
+ $builder = new ContainerBuilder();
+ $builder->setDefinition('grandpa', new Definition('stdClass'));
+ $builder->setDefinition('parent', new ChildDefinition('grandpa'));
+ $builder->setDefinition('foo', new ChildDefinition('parent'));
$builder->get('foo');
}
public function testResolveServicesWithCustomDefinitionClass()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->setDefinition('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition('stdClass'));
+ $builder = new ContainerBuilder();
+ $builder->setDefinition('foo', new CustomDefinition('stdClass'));
$this->assertInstanceOf('stdClass', $builder->get('foo'));
}
public function testMerge()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['bar' => 'foo']));
- $container->setResourceTracking(\false);
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $container = new ContainerBuilder(new ParameterBag(['bar' => 'foo']));
+ $container->setResourceTracking(false);
+ $config = new ContainerBuilder(new ParameterBag(['foo' => 'bar']));
$container->merge($config);
$this->assertEquals(['bar' => 'foo', 'foo' => 'bar'], $container->getParameterBag()->all(), '->merge() merges current parameters with the loaded ones');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['bar' => 'foo']));
- $container->setResourceTracking(\false);
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => '%bar%']));
+ $container = new ContainerBuilder(new ParameterBag(['bar' => 'foo']));
+ $container->setResourceTracking(false);
+ $config = new ContainerBuilder(new ParameterBag(['foo' => '%bar%']));
$container->merge($config);
$container->compile();
$this->assertEquals(['bar' => 'foo', 'foo' => 'foo'], $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['bar' => 'foo']));
- $container->setResourceTracking(\false);
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => '%bar%', 'baz' => '%foo%']));
+ $container = new ContainerBuilder(new ParameterBag(['bar' => 'foo']));
+ $container->setResourceTracking(false);
+ $config = new ContainerBuilder(new ParameterBag(['foo' => '%bar%', 'baz' => '%foo%']));
$container->merge($config);
$container->compile();
$this->assertEquals(['bar' => 'foo', 'foo' => 'foo', 'baz' => 'foo'], $container->getParameterBag()->all(), '->merge() evaluates the values of the parameters towards already defined ones');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass');
$container->register('bar', 'BarClass');
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $config->setDefinition('baz', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BazClass'));
+ $config = new ContainerBuilder();
+ $config->setDefinition('baz', new Definition('BazClass'));
$config->setAlias('alias_for_foo', 'foo');
$container->merge($config);
- $this->assertEquals(['service_container', 'foo', 'bar', 'baz'], \array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones');
+ $this->assertEquals(['service_container', 'foo', 'bar', 'baz'], array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones');
$aliases = $container->getAliases();
$this->assertArrayHasKey('alias_for_foo', $aliases);
$this->assertEquals('foo', (string) $aliases['alias_for_foo']);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass');
- $config->setDefinition('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BazClass'));
+ $config->setDefinition('foo', new Definition('BazClass'));
$container->merge($config);
$this->assertEquals('BazClass', $container->getDefinition('foo')->getClass(), '->merge() overrides already defined services');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $container = new ContainerBuilder();
+ $bag = new EnvPlaceholderParameterBag();
$bag->get('env(Foo)');
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder($bag);
+ $config = new ContainerBuilder($bag);
$this->assertSame(['%env(Bar)%'], $config->resolveEnvPlaceholders([$bag->get('env(Bar)')]));
$container->merge($config);
$this->assertEquals(['Foo' => 0, 'Bar' => 1], $container->getEnvCounters());
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
+ $config = new ContainerBuilder();
$childDefA = $container->registerForAutoconfiguration('AInterface');
$childDefB = $config->registerForAutoconfiguration('BInterface');
$container->merge($config);
@@ -498,8 +520,8 @@ public function testMergeThrowsExceptionForDuplicateAutomaticInstanceofDefinitio
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('"AInterface" has already been autoconfigured and merge() does not support merging autoconfiguration for the same class/interface.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $config = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
+ $config = new ContainerBuilder();
$container->registerForAutoconfiguration('AInterface');
$config->registerForAutoconfiguration('AInterface');
$container->merge($config);
@@ -509,210 +531,210 @@ public function testResolveEnvValues()
$_ENV['DUMMY_ENV_VAR'] = 'du%%y';
$_SERVER['DUMMY_SERVER_VAR'] = 'ABC';
$_SERVER['HTTP_DUMMY_VAR'] = 'DEF';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('bar', '%% %env(DUMMY_ENV_VAR)% %env(DUMMY_SERVER_VAR)% %env(HTTP_DUMMY_VAR)%');
$container->setParameter('env(HTTP_DUMMY_VAR)', '123');
- $this->assertSame('%% du%%%%y ABC 123', $container->resolveEnvPlaceholders('%bar%', \true));
+ $this->assertSame('%% du%%%%y ABC 123', $container->resolveEnvPlaceholders('%bar%', true));
unset($_ENV['DUMMY_ENV_VAR'], $_SERVER['DUMMY_SERVER_VAR'], $_SERVER['HTTP_DUMMY_VAR']);
}
public function testResolveEnvValuesWithArray()
{
$_ENV['ANOTHER_DUMMY_ENV_VAR'] = 'dummy';
$dummyArray = ['1' => 'one', '2' => 'two'];
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('dummy', '%env(ANOTHER_DUMMY_ENV_VAR)%');
$container->setParameter('dummy2', $dummyArray);
- $container->resolveEnvPlaceholders('%dummy%', \true);
- $container->resolveEnvPlaceholders('%dummy2%', \true);
- $this->assertIsArray($container->resolveEnvPlaceholders('%dummy2%', \true));
+ $container->resolveEnvPlaceholders('%dummy%', true);
+ $container->resolveEnvPlaceholders('%dummy2%', true);
+ $this->assertIsArray($container->resolveEnvPlaceholders('%dummy2%', true));
foreach ($dummyArray as $key => $value) {
- $this->assertArrayHasKey($key, $container->resolveEnvPlaceholders('%dummy2%', \true));
+ $this->assertArrayHasKey($key, $container->resolveEnvPlaceholders('%dummy2%', true));
}
unset($_ENV['ANOTHER_DUMMY_ENV_VAR']);
}
public function testCompileWithResolveEnv()
{
- \putenv('DUMMY_ENV_VAR=du%%y');
+ putenv('DUMMY_ENV_VAR=du%%y');
$_SERVER['DUMMY_SERVER_VAR'] = 'ABC';
$_SERVER['HTTP_DUMMY_VAR'] = 'DEF';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('env(FOO)', 'Foo');
$container->setParameter('env(DUMMY_ENV_VAR)', 'GHI');
$container->setParameter('bar', '%% %env(DUMMY_ENV_VAR)% %env(DUMMY_SERVER_VAR)% %env(HTTP_DUMMY_VAR)%');
$container->setParameter('foo', '%env(FOO)%');
$container->setParameter('baz', '%foo%');
$container->setParameter('env(HTTP_DUMMY_VAR)', '123');
- $container->register('teatime', 'stdClass')->setProperty('foo', '%env(DUMMY_ENV_VAR)%')->setPublic(\true);
- $container->compile(\true);
+ $container->register('teatime', 'stdClass')->setProperty('foo', '%env(DUMMY_ENV_VAR)%')->setPublic(true);
+ $container->compile(true);
$this->assertSame('% du%%y ABC 123', $container->getParameter('bar'));
$this->assertSame('Foo', $container->getParameter('baz'));
$this->assertSame('du%%y', $container->get('teatime')->foo);
unset($_SERVER['DUMMY_SERVER_VAR'], $_SERVER['HTTP_DUMMY_VAR']);
- \putenv('DUMMY_ENV_VAR');
+ putenv('DUMMY_ENV_VAR');
}
public function testCompileWithArrayResolveEnv()
{
- \putenv('ARRAY={"foo":"bar"}');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ putenv('ARRAY={"foo":"bar"}');
+ $container = new ContainerBuilder();
$container->setParameter('foo', '%env(json:ARRAY)%');
- $container->compile(\true);
+ $container->compile(true);
$this->assertSame(['foo' => 'bar'], $container->getParameter('foo'));
- \putenv('ARRAY');
+ putenv('ARRAY');
}
public function testCompileWithArrayAndAnotherResolveEnv()
{
- \putenv('DUMMY_ENV_VAR=abc');
- \putenv('ARRAY={"foo":"bar"}');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ putenv('DUMMY_ENV_VAR=abc');
+ putenv('ARRAY={"foo":"bar"}');
+ $container = new ContainerBuilder();
$container->setParameter('foo', '%env(json:ARRAY)%');
$container->setParameter('bar', '%env(DUMMY_ENV_VAR)%');
- $container->compile(\true);
+ $container->compile(true);
$this->assertSame(['foo' => 'bar'], $container->getParameter('foo'));
$this->assertSame('abc', $container->getParameter('bar'));
- \putenv('DUMMY_ENV_VAR');
- \putenv('ARRAY');
+ putenv('DUMMY_ENV_VAR');
+ putenv('ARRAY');
}
public function testCompileWithArrayInStringResolveEnv()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('A string value must be composed of strings and/or numbers, but found parameter "env(json:ARRAY)" of type "array" inside string value "ABC %env(json:ARRAY)%".');
- \putenv('ARRAY={"foo":"bar"}');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ putenv('ARRAY={"foo":"bar"}');
+ $container = new ContainerBuilder();
$container->setParameter('foo', 'ABC %env(json:ARRAY)%');
- $container->compile(\true);
- \putenv('ARRAY');
+ $container->compile(true);
+ putenv('ARRAY');
}
public function testCompileWithResolveMissingEnv()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\EnvNotFoundException');
$this->expectExceptionMessage('Environment variable not found: "FOO".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('foo', '%env(FOO)%');
- $container->compile(\true);
+ $container->compile(true);
}
public function testDynamicEnv()
{
- \putenv('DUMMY_FOO=some%foo%');
- \putenv('DUMMY_BAR=%bar%');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ putenv('DUMMY_FOO=some%foo%');
+ putenv('DUMMY_BAR=%bar%');
+ $container = new ContainerBuilder();
$container->setParameter('foo', 'Foo%env(resolve:DUMMY_BAR)%');
$container->setParameter('bar', 'Bar');
$container->setParameter('baz', '%env(resolve:DUMMY_FOO)%');
- $container->compile(\true);
- \putenv('DUMMY_FOO');
- \putenv('DUMMY_BAR');
+ $container->compile(true);
+ putenv('DUMMY_FOO');
+ putenv('DUMMY_BAR');
$this->assertSame('someFooBar', $container->getParameter('baz'));
}
public function testCastEnv()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('env(FAKE)', '123');
- $container->register('foo', 'stdClass')->setPublic(\true)->setProperties(['fake' => '%env(int:FAKE)%']);
- $container->compile(\true);
+ $container->register('foo', 'stdClass')->setPublic(true)->setProperties(['fake' => '%env(int:FAKE)%']);
+ $container->compile(true);
$this->assertSame(123, $container->get('foo')->fake);
}
public function testEnvAreNullable()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('env(FAKE)', null);
- $container->register('foo', 'stdClass')->setPublic(\true)->setProperties(['fake' => '%env(int:FAKE)%']);
- $container->compile(\true);
+ $container->register('foo', 'stdClass')->setPublic(true)->setProperties(['fake' => '%env(int:FAKE)%']);
+ $container->compile(true);
$this->assertNull($container->get('foo')->fake);
}
public function testEnvInId()
{
$container = (include __DIR__ . '/Fixtures/containers/container_env_in_id.php');
- $container->compile(\true);
+ $container->compile(true);
$expected = ['service_container', 'foo', 'bar', 'bar_%env(BAR)%'];
- $this->assertSame($expected, \array_keys($container->getDefinitions()));
- $expected = [\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class => \true, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class => \true, 'baz_%env(BAR)%' => \true, 'bar_%env(BAR)%' => \true];
+ $this->assertSame($expected, array_keys($container->getDefinitions()));
+ $expected = [PsrContainerInterface::class => true, ContainerInterface::class => true, 'baz_%env(BAR)%' => true, 'bar_%env(BAR)%' => true];
$this->assertSame($expected, $container->getRemovedIds());
- $this->assertSame(['baz_bar'], \array_keys($container->getDefinition('foo')->getArgument(1)));
+ $this->assertSame(['baz_bar'], array_keys($container->getDefinition('foo')->getArgument(1)));
}
public function testCircularDynamicEnv()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ParameterCircularReferenceException');
$this->expectExceptionMessage('Circular reference detected for parameter "env(resolve:DUMMY_ENV_VAR)" ("env(resolve:DUMMY_ENV_VAR)" > "env(resolve:DUMMY_ENV_VAR)").');
- \putenv('DUMMY_ENV_VAR=some%foo%');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ putenv('DUMMY_ENV_VAR=some%foo%');
+ $container = new ContainerBuilder();
$container->setParameter('foo', '%bar%');
$container->setParameter('bar', '%env(resolve:DUMMY_ENV_VAR)%');
try {
- $container->compile(\true);
+ $container->compile(true);
} finally {
- \putenv('DUMMY_ENV_VAR');
+ putenv('DUMMY_ENV_VAR');
}
}
public function testMergeLogicException()
{
$this->expectException('LogicException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->compile();
- $container->merge(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
+ $container->merge(new ContainerBuilder());
}
public function testfindTaggedServiceIds()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addTag('foo', ['foo' => 'foo'])->addTag('bar', ['bar' => 'bar'])->addTag('foo', ['foofoo' => 'foofoo']);
$this->assertEquals($builder->findTaggedServiceIds('foo'), ['foo' => [['foo' => 'foo'], ['foofoo' => 'foofoo']]], '->findTaggedServiceIds() returns an array of service ids and its tag attributes');
$this->assertEquals([], $builder->findTaggedServiceIds('foobar'), '->findTaggedServiceIds() returns an empty array if there is annotated services');
}
public function testFindUnusedTags()
{
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $builder = new ContainerBuilder();
$builder->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addTag('kernel.event_listener', ['foo' => 'foo'])->addTag('kenrel.event_listener', ['bar' => 'bar']);
$builder->findTaggedServiceIds('kernel.event_listener');
$this->assertEquals(['kenrel.event_listener'], $builder->findUnusedTags(), '->findUnusedTags() returns an array with unused tags');
}
public function testFindDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setDefinition('foo', $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass'));
+ $container = new ContainerBuilder();
+ $container->setDefinition('foo', $definition = new Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass'));
$container->setAlias('bar', 'foo');
$container->setAlias('foobar', 'bar');
$this->assertEquals($definition, $container->findDefinition('foobar'), '->findDefinition() returns a Definition');
}
public function testAddObjectResource()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $container->addObjectResource(new \_PhpScoper5ea00cc67502b\BarClass());
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $container->addObjectResource(new BarClass());
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
- $container->setResourceTracking(\true);
- $container->addObjectResource(new \_PhpScoper5ea00cc67502b\BarClass());
+ $container->setResourceTracking(true);
+ $container->addObjectResource(new BarClass());
$resources = $container->getResources();
$this->assertCount(2, $resources, '2 resources were registered');
/* @var $resource \Symfony\Component\Config\Resource\FileResource */
- $resource = \end($resources);
+ $resource = end($resources);
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Resource\\FileResource', $resource);
- $this->assertSame(\realpath(__DIR__ . '/Fixtures/includes/classes.php'), \realpath($resource->getResource()));
+ $this->assertSame(realpath(__DIR__ . '/Fixtures/includes/classes.php'), realpath($resource->getResource()));
}
/**
* @group legacy
*/
public function testAddClassResource()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $container->addClassResource(new \ReflectionClass('BarClass'));
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $container->addClassResource(new ReflectionClass('BarClass'));
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
- $container->setResourceTracking(\true);
- $container->addClassResource(new \ReflectionClass('BarClass'));
+ $container->setResourceTracking(true);
+ $container->addClassResource(new ReflectionClass('BarClass'));
$resources = $container->getResources();
$this->assertCount(2, $resources, '2 resources were registered');
/* @var $resource \Symfony\Component\Config\Resource\FileResource */
- $resource = \end($resources);
+ $resource = end($resources);
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Config\\Resource\\FileResource', $resource);
- $this->assertSame(\realpath(__DIR__ . '/Fixtures/includes/classes.php'), \realpath($resource->getResource()));
+ $this->assertSame(realpath(__DIR__ . '/Fixtures/includes/classes.php'), realpath($resource->getResource()));
}
public function testGetReflectionClass()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$r1 = $container->getReflectionClass('BarClass');
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
- $container->setResourceTracking(\true);
+ $container->setResourceTracking(true);
$r2 = $container->getReflectionClass('BarClass');
$r3 = $container->getReflectionClass('BarClass');
$this->assertNull($container->getReflectionClass('BarMissingClass'));
@@ -721,11 +743,11 @@ public function testGetReflectionClass()
$resources = $container->getResources();
$this->assertCount(3, $resources, '3 resources were registered');
$this->assertSame('reflection.BarClass', (string) $resources[1]);
- $this->assertSame('BarMissingClass', (string) \end($resources));
+ $this->assertSame('BarMissingClass', (string) end($resources));
}
public function testGetReflectionClassOnInternalTypes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$this->assertNull($container->getReflectionClass('int'));
$this->assertNull($container->getReflectionClass('float'));
$this->assertNull($container->getReflectionClass('string'));
@@ -740,24 +762,24 @@ public function testGetReflectionClassOnInternalTypes()
}
public function testCompilesClassDefinitionsOfLazyServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$this->assertEmpty($container->getResources(), 'No resources get registered without resource tracking');
- $container->register('foo', 'BarClass')->setPublic(\true);
- $container->getDefinition('foo')->setLazy(\true);
+ $container->register('foo', 'BarClass')->setPublic(true);
+ $container->getDefinition('foo')->setLazy(true);
$container->compile();
- $matchingResources = \array_filter($container->getResources(), function (\_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ResourceInterface $resource) {
+ $matchingResources = array_filter($container->getResources(), function (ResourceInterface $resource) {
return 'reflection.BarClass' === (string) $resource;
});
$this->assertNotEmpty($matchingResources);
}
public function testResources()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->addResource($a = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__DIR__ . '/Fixtures/xml/services1.xml'));
- $container->addResource($b = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__DIR__ . '/Fixtures/xml/services2.xml'));
+ $container = new ContainerBuilder();
+ $container->addResource($a = new FileResource(__DIR__ . '/Fixtures/xml/services1.xml'));
+ $container->addResource($b = new FileResource(__DIR__ . '/Fixtures/xml/services2.xml'));
$resources = [];
foreach ($container->getResources() as $resource) {
- if (\false === \strpos($resource, '.php')) {
+ if (false === strpos($resource, '.php')) {
$resources[] = $resource;
}
}
@@ -767,15 +789,15 @@ public function testResources()
}
public function testFileExists()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $A = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\ComposerResource();
- $a = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__DIR__ . '/Fixtures/xml/services1.xml');
- $b = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource(__DIR__ . '/Fixtures/xml/services2.xml');
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\DirectoryResource($dir = \dirname($b));
+ $container = new ContainerBuilder();
+ $A = new ComposerResource();
+ $a = new FileResource(__DIR__ . '/Fixtures/xml/services1.xml');
+ $b = new FileResource(__DIR__ . '/Fixtures/xml/services2.xml');
+ $c = new DirectoryResource($dir = dirname($b));
$this->assertTrue($container->fileExists((string) $a) && $container->fileExists((string) $b) && $container->fileExists($dir));
$resources = [];
foreach ($container->getResources() as $resource) {
- if (\false === \strpos($resource, '.php')) {
+ if (false === strpos($resource, '.php')) {
$resources[] = $resource;
}
}
@@ -783,9 +805,9 @@ public function testFileExists()
}
public function testExtension()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $container->registerExtension($extension = new \_PhpScoper5ea00cc67502b\ProjectExtension());
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $container->registerExtension($extension = new ProjectExtension());
$this->assertSame($container->getExtension('project'), $extension, '->registerExtension() registers an extension');
$this->expectException('LogicException');
$container->getExtension('no_registered');
@@ -795,8 +817,8 @@ public function testRegisteredButNotLoadedExtension()
$extension = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
$extension->expects($this->once())->method('getAlias')->willReturn('project');
$extension->expects($this->never())->method('load');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->registerExtension($extension);
$container->compile();
}
@@ -805,60 +827,60 @@ public function testRegisteredAndLoadedExtension()
$extension = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Extension\\ExtensionInterface')->getMock();
$extension->expects($this->exactly(2))->method('getAlias')->willReturn('project');
$extension->expects($this->once())->method('load')->with([['foo' => 'bar']]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->registerExtension($extension);
$container->loadFromExtension('project', ['foo' => 'bar']);
$container->compile();
}
public function testPrivateServiceUser()
{
- $fooDefinition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BarClass');
- $fooUserDefinition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BarUserClass', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')]);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $fooDefinition->setPublic(\false);
- $container->addDefinitions(['bar' => $fooDefinition, 'bar_user' => $fooUserDefinition->setPublic(\true)]);
+ $fooDefinition = new Definition('BarClass');
+ $fooUserDefinition = new Definition('BarUserClass', [new Reference('bar')]);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $fooDefinition->setPublic(false);
+ $container->addDefinitions(['bar' => $fooDefinition, 'bar_user' => $fooUserDefinition->setPublic(true)]);
$container->compile();
$this->assertInstanceOf('BarClass', $container->get('bar_user')->bar);
}
public function testThrowsExceptionWhenSetServiceOnACompiledContainer()
{
$this->expectException('BadMethodCallException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
- $container->register('a', 'stdClass')->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
+ $container->register('a', 'stdClass')->setPublic(true);
$container->compile();
- $container->set('a', new \stdClass());
+ $container->set('a', new stdClass());
}
public function testNoExceptionWhenAddServiceOnACompiledContainer()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $container->set('a', $foo = new \stdClass());
+ $container->set('a', $foo = new stdClass());
$this->assertSame($foo, $container->get('a'));
}
public function testNoExceptionWhenSetSyntheticServiceOnACompiledContainer()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
- $def->setSynthetic(\true)->setPublic(\true);
+ $container = new ContainerBuilder();
+ $def = new Definition('stdClass');
+ $def->setSynthetic(true)->setPublic(true);
$container->setDefinition('a', $def);
$container->compile();
- $container->set('a', $a = new \stdClass());
+ $container->set('a', $a = new stdClass());
$this->assertEquals($a, $container->get('a'));
}
public function testThrowsExceptionWhenSetDefinitionOnACompiledContainer()
{
$this->expectException('BadMethodCallException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->compile();
- $container->setDefinition('a', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition());
+ $container->setDefinition('a', new Definition());
}
public function testExtensionConfig()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$configs = $container->getExtensionConfig('foo');
$this->assertEmpty($configs);
$first = ['foo' => 'bar'];
@@ -872,33 +894,33 @@ public function testExtensionConfig()
}
public function testAbstractAlias()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $abstract = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('AbstractClass');
- $abstract->setAbstract(\true)->setPublic(\true);
+ $container = new ContainerBuilder();
+ $abstract = new Definition('AbstractClass');
+ $abstract->setAbstract(true)->setPublic(true);
$container->setDefinition('abstract_service', $abstract);
- $container->setAlias('abstract_alias', 'abstract_service')->setPublic(\true);
+ $container->setAlias('abstract_alias', 'abstract_service')->setPublic(true);
$container->compile();
$this->assertSame('abstract_service', (string) $container->getAlias('abstract_alias'));
}
public function testLazyLoadedService()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\ClosureLoader($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
- $loader->load(function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container) {
- $container->set('a', new \_PhpScoper5ea00cc67502b\BazClass());
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BazClass');
- $definition->setLazy(\true);
- $definition->setPublic(\true);
+ $loader = new ClosureLoader($container = new ContainerBuilder());
+ $loader->load(function (ContainerBuilder $container) {
+ $container->set('a', new BazClass());
+ $definition = new Definition('BazClass');
+ $definition->setLazy(true);
+ $definition->setPublic(true);
$container->setDefinition('a', $definition);
});
- $container->setResourceTracking(\true);
+ $container->setResourceTracking(true);
$container->compile();
- $r = new \ReflectionProperty($container, 'resources');
- $r->setAccessible(\true);
+ $r = new ReflectionProperty($container, 'resources');
+ $r->setAccessible(true);
$resources = $r->getValue($container);
- $classInList = \false;
+ $classInList = false;
foreach ($resources as $resource) {
if ('reflection.BazClass' === (string) $resource) {
- $classInList = \true;
+ $classInList = true;
break;
}
}
@@ -906,8 +928,8 @@ public function testLazyLoadedService()
}
public function testInlinedDefinitions()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BarClass');
+ $container = new ContainerBuilder();
+ $definition = new Definition('BarClass');
$container->register('bar_user', 'BarUserClass')->addArgument($definition)->setProperty('foo', $definition);
$container->register('bar', 'BarClass')->setProperty('foo', $definition)->addMethodCall('setBaz', [$definition]);
$barUser = $container->get('bar_user');
@@ -920,66 +942,66 @@ public function testThrowsCircularExceptionForCircularAliases()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
$this->expectExceptionMessage('Circular reference detected for service "app.test_class", path: "app.test_class -> App\\TestClass -> app.test_class".');
- $builder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $builder->setAliases(['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('app.test_class'), 'app.test_class' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('_PhpScoper5ea00cc67502b\\App\\TestClass'), '_PhpScoper5ea00cc67502b\\App\\TestClass' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Alias('app.test_class')]);
+ $builder = new ContainerBuilder();
+ $builder->setAliases(['foo' => new Alias('app.test_class'), 'app.test_class' => new Alias('_PhpScoper5ea00cc67502b\\App\\TestClass'), '_PhpScoper5ea00cc67502b\\App\\TestClass' => new Alias('app.test_class')]);
$builder->findDefinition('foo');
}
public function testInitializePropertiesBeforeMethodCalls()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('foo', 'stdClass');
- $container->register('bar', 'MethodCallClass')->setPublic(\true)->setProperty('simple', 'bar')->setProperty('complex', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))->addMethodCall('callMe');
+ $container->register('bar', 'MethodCallClass')->setPublic(true)->setProperty('simple', 'bar')->setProperty('complex', new Reference('foo'))->addMethodCall('callMe');
$container->compile();
$this->assertTrue($container->get('bar')->callPassed(), '->compile() initializes properties before method calls');
}
public function testAutowiring()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\A::class)->setPublic(\true);
- $bDefinition = $container->register('b', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\B::class);
- $bDefinition->setAutowired(\true);
- $bDefinition->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register(A::class)->setPublic(true);
+ $bDefinition = $container->register('b', B::class);
+ $bDefinition->setAutowired(true);
+ $bDefinition->setPublic(true);
$container->compile();
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\A::class, (string) $container->getDefinition('b')->getArgument(0));
+ $this->assertEquals(A::class, (string) $container->getDefinition('b')->getArgument(0));
}
public function testClassFromId()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$unknown = $container->register('_PhpScoper5ea00cc67502b\\Acme\\UnknownClass');
- $autoloadClass = $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class);
+ $autoloadClass = $container->register(CaseSensitiveClass::class);
$container->compile();
$this->assertSame('_PhpScoper5ea00cc67502b\\Acme\\UnknownClass', $unknown->getClass());
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class, $autoloadClass->getClass());
+ $this->assertEquals(CaseSensitiveClass::class, $autoloadClass->getClass());
}
public function testNoClassFromGlobalNamespaceClassId()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The definition for "DateTime" has no class attribute, and appears to reference a class or interface in the global namespace.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register(\DateTime::class);
+ $container = new ContainerBuilder();
+ $container->register(DateTime::class);
$container->compile();
}
public function testNoClassFromGlobalNamespaceClassIdWithLeadingSlash()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The definition for "\\DateTime" has no class attribute, and appears to reference a class or interface in the global namespace.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('\\' . \DateTime::class);
+ $container = new ContainerBuilder();
+ $container->register('\\' . DateTime::class);
$container->compile();
}
public function testNoClassFromNamespaceClassIdWithLeadingSlash()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The definition for "\\Symfony\\Component\\DependencyInjection\\Tests\\FooClass" has no class attribute, and appears to reference a class or interface. Please specify the class attribute explicitly or remove the leading backslash by renaming the service to "Symfony\\Component\\DependencyInjection\\Tests\\FooClass" to get rid of this error.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('\\' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\FooClass::class);
+ $container = new ContainerBuilder();
+ $container->register('\\' . FooClass::class);
$container->compile();
}
public function testNoClassFromNonClassId()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The definition for "123_abc" has no class.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('123_abc');
$container->compile();
}
@@ -987,18 +1009,18 @@ public function testNoClassFromNsSeparatorId()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The definition for "\\foo" has no class.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->register('\\foo');
$container->compile();
}
public function testServiceLocator()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo_service', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\true)->addArgument(['bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar_service')), 'baz' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference('baz_service', 'stdClass'))]);
- $container->register('bar_service', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz_service')])->setPublic(\true);
- $container->register('baz_service', 'stdClass')->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo_service', ServiceLocator::class)->setPublic(true)->addArgument(['bar' => new ServiceClosureArgument(new Reference('bar_service')), 'baz' => new ServiceClosureArgument(new TypedReference('baz_service', 'stdClass'))]);
+ $container->register('bar_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true);
+ $container->register('baz_service', 'stdClass')->setPublic(false);
$container->compile();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class, $foo = $container->get('foo_service'));
+ $this->assertInstanceOf(ServiceLocator::class, $foo = $container->get('foo_service'));
$this->assertSame($container->get('bar_service'), $foo->get('bar'));
}
public function testUninitializedReference()
@@ -1012,19 +1034,19 @@ public function testUninitializedReference()
$this->assertNull($bar->closures[0]());
$this->assertNull($bar->closures[1]());
$this->assertNull($bar->closures[2]());
- $this->assertSame([], \iterator_to_array($bar->iter));
+ $this->assertSame([], iterator_to_array($bar->iter));
$container = (include __DIR__ . '/Fixtures/containers/container_uninitialized_ref.php');
$container->compile();
$container->get('foo1');
$container->get('baz');
$bar = $container->get('bar');
- $this->assertEquals(new \stdClass(), $bar->foo1);
+ $this->assertEquals(new stdClass(), $bar->foo1);
$this->assertNull($bar->foo2);
- $this->assertEquals(new \stdClass(), $bar->foo3);
- $this->assertEquals(new \stdClass(), $bar->closures[0]());
+ $this->assertEquals(new stdClass(), $bar->foo3);
+ $this->assertEquals(new stdClass(), $bar->closures[0]());
$this->assertNull($bar->closures[1]());
- $this->assertEquals(new \stdClass(), $bar->closures[2]());
- $this->assertEquals(['foo1' => new \stdClass(), 'foo3' => new \stdClass()], \iterator_to_array($bar->iter));
+ $this->assertEquals(new stdClass(), $bar->closures[2]());
+ $this->assertEquals(['foo1' => new stdClass(), 'foo3' => new stdClass()], iterator_to_array($bar->iter));
}
/**
* @dataProvider provideAlmostCircular
@@ -1040,12 +1062,12 @@ public function testAlmostCircular($visibility)
$foo5 = $container->get('foo5');
$this->assertSame($foo5, $foo5->bar->foo);
$manager = $container->get('manager');
- $this->assertEquals(new \stdClass(), $manager);
+ $this->assertEquals(new stdClass(), $manager);
$manager = $container->get('manager2');
- $this->assertEquals(new \stdClass(), $manager);
+ $this->assertEquals(new stdClass(), $manager);
$foo6 = $container->get('foo6');
$this->assertEquals((object) ['bar6' => (object) []], $foo6);
- $this->assertInstanceOf(\stdClass::class, $container->get('root'));
+ $this->assertInstanceOf(stdClass::class, $container->get('root'));
$manager3 = $container->get('manager3');
$listener3 = $container->get('listener3');
$this->assertSame($manager3, $listener3->manager, 'Both should identically be the manager3 service');
@@ -1059,7 +1081,7 @@ public function provideAlmostCircular()
}
public function testRegisterForAutoconfiguration()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$childDefA = $container->registerForAutoconfiguration('AInterface');
$childDefB = $container->registerForAutoconfiguration('BInterface');
$this->assertSame(['AInterface' => $childDefA, 'BInterface' => $childDefB], $container->getAutoconfiguredInstanceof());
@@ -1074,9 +1096,9 @@ public function testRegisterForAutoconfiguration()
*/
public function testPrivateServiceTriggersDeprecation()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\false)->setDeprecated(\true);
- $container->register('bar', 'stdClass')->setPublic(\true)->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(false)->setDeprecated(true);
+ $container->register('bar', 'stdClass')->setPublic(true)->setProperty('foo', new Reference('foo'));
$container->compile();
$container->get('bar');
}
@@ -1086,17 +1108,17 @@ public function testPrivateServiceTriggersDeprecation()
*/
public function testParameterWithMixedCase()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
- $container->register('foo', 'stdClass')->setPublic(\true)->setProperty('foo', '%FOO%');
+ $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar']));
+ $container->register('foo', 'stdClass')->setPublic(true)->setProperty('foo', '%FOO%');
$container->compile();
$this->assertSame('bar', $container->get('foo')->foo);
}
public function testArgumentsHaveHigherPriorityThanBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('class.via.bindings', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class)->setArguments(['via-bindings']);
- $container->register('class.via.argument', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class)->setArguments(['via-argument']);
- $container->register('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy::class)->setPublic(\true)->setBindings([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('class.via.bindings'), '$token' => '1234'])->setArguments(['$class1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('class.via.argument')]);
+ $container = new ContainerBuilder();
+ $container->register('class.via.bindings', CaseSensitiveClass::class)->setArguments(['via-bindings']);
+ $container->register('class.via.argument', CaseSensitiveClass::class)->setArguments(['via-argument']);
+ $container->register('foo', SimilarArgumentsDummy::class)->setPublic(true)->setBindings([CaseSensitiveClass::class => new Reference('class.via.bindings'), '$token' => '1234'])->setArguments(['$class1' => new Reference('class.via.argument')]);
$this->assertSame(['service_container', 'class.via.bindings', 'class.via.argument', 'foo', '_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface'], $container->getServiceIds());
$container->compile();
$this->assertSame('via-argument', $container->get('foo')->class1->identifier);
@@ -1104,9 +1126,9 @@ public function testArgumentsHaveHigherPriorityThanBindings()
}
public function testUninitializedSyntheticReference()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\true)->setSynthetic(\true);
- $container->register('bar', 'stdClass')->setPublic(\true)->setShared(\false)->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(true)->setSynthetic(true);
+ $container->register('bar', 'stdClass')->setPublic(true)->setShared(false)->setProperty('foo', new Reference('foo', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE));
$container->compile();
$this->assertEquals((object) ['foo' => null], $container->get('bar'));
$container->set('foo', (object) [123]);
@@ -1114,16 +1136,16 @@ public function testUninitializedSyntheticReference()
}
public function testDecoratedSelfReferenceInvolvingPrivateServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\false)->setProperty('bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'));
- $container->register('baz', 'stdClass')->setPublic(\false)->setProperty('inner', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz.inner'))->setDecoratedService('foo');
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(false)->setProperty('bar', new Reference('foo'));
+ $container->register('baz', 'stdClass')->setPublic(false)->setProperty('inner', new Reference('baz.inner'))->setDecoratedService('foo');
$container->compile();
- $this->assertSame(['service_container'], \array_keys($container->getDefinitions()));
+ $this->assertSame(['service_container'], array_keys($container->getDefinitions()));
}
public function testScalarService()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $c->register('foo', 'string')->setPublic(\true)->setFactory([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory::class, 'getSomeValue']);
+ $c = new ContainerBuilder();
+ $c->register('foo', 'string')->setPublic(true)->setFactory([ScalarFactory::class, 'getSomeValue']);
$c->compile();
$this->assertTrue($c->has('foo'));
$this->assertSame('some value', $c->get('foo'));
@@ -1137,7 +1159,7 @@ class A
}
class B
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\A $a)
+ public function __construct(A $a)
{
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/ContainerTest.php b/vendor/symfony/dependency-injection/Tests/ContainerTest.php
index b0a551e2b..1296b4cdb 100644
--- a/vendor/symfony/dependency-injection/Tests/ContainerTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ContainerTest.php
@@ -15,13 +15,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-class ContainerTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use ReflectionClass;
+use ReflectionProperty;
+use stdClass;
+use function sprintf;
+
+class ContainerTest extends TestCase
{
public function testConstructor()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
+ $sc = new Container();
$this->assertSame($sc, $sc->get('service_container'), '__construct() automatically registers itself as a service');
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $sc = new Container(new ParameterBag(['foo' => 'bar']));
$this->assertEquals(['foo' => 'bar'], $sc->getParameterBag()->all(), '__construct() takes an array of parameters as its first argument');
}
/**
@@ -29,7 +35,7 @@ public function testConstructor()
*/
public function testCamelize($id, $expected)
{
- $this->assertEquals($expected, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::camelize($id), \sprintf('Container::camelize("%s")', $id));
+ $this->assertEquals($expected, Container::camelize($id), sprintf('Container::camelize("%s")', $id));
}
public function dataForTestCamelize()
{
@@ -40,7 +46,7 @@ public function dataForTestCamelize()
*/
public function testUnderscore($id, $expected)
{
- $this->assertEquals($expected, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container::underscore($id), \sprintf('Container::underscore("%s")', $id));
+ $this->assertEquals($expected, Container::underscore($id), sprintf('Container::underscore("%s")', $id));
}
public function dataForTestUnderscore()
{
@@ -48,7 +54,7 @@ public function dataForTestUnderscore()
}
public function testCompile()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $sc = new Container(new ParameterBag(['foo' => 'bar']));
$this->assertFalse($sc->getParameterBag()->isResolved(), '->compile() resolves the parameter bag');
$sc->compile();
$this->assertTrue($sc->getParameterBag()->isResolved(), '->compile() resolves the parameter bag');
@@ -62,31 +68,31 @@ public function testCompile()
*/
public function testIsFrozen()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $sc = new Container(new ParameterBag(['foo' => 'bar']));
$this->assertFalse($sc->isFrozen(), '->isFrozen() returns false if the parameters are not frozen');
$sc->compile();
$this->assertTrue($sc->isFrozen(), '->isFrozen() returns true if the parameters are frozen');
}
public function testIsCompiled()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $sc = new Container(new ParameterBag(['foo' => 'bar']));
$this->assertFalse($sc->isCompiled(), '->isCompiled() returns false if the container is not compiled');
$sc->compile();
$this->assertTrue($sc->isCompiled(), '->isCompiled() returns true if the container is compiled');
}
public function testIsCompiledWithFrozenParameters()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag(['foo' => 'bar']));
+ $sc = new Container(new FrozenParameterBag(['foo' => 'bar']));
$this->assertFalse($sc->isCompiled(), '->isCompiled() returns false if the container is not compiled but the parameter bag is already frozen');
}
public function testGetParameterBag()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
+ $sc = new Container();
$this->assertEquals([], $sc->getParameterBag()->all(), '->getParameterBag() returns an empty array if no parameter has been defined');
}
public function testGetSetParameter()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $sc = new Container(new ParameterBag(['foo' => 'bar']));
$sc->setParameter('bar', 'foo');
$this->assertEquals('foo', $sc->getParameter('bar'), '->setParameter() sets the value of a new parameter');
$sc->setParameter('foo', 'baz');
@@ -94,7 +100,7 @@ public function testGetSetParameter()
try {
$sc->getParameter('baba');
$this->fail('->getParameter() thrown an \\InvalidArgumentException if the key does not exist');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('\\InvalidArgumentException', $e, '->getParameter() thrown an \\InvalidArgumentException if the key does not exist');
$this->assertEquals('You have requested a non-existent parameter "baba".', $e->getMessage(), '->getParameter() thrown an \\InvalidArgumentException if the key does not exist');
}
@@ -106,19 +112,19 @@ public function testGetSetParameter()
*/
public function testGetSetParameterWithMixedCase()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $sc = new Container(new ParameterBag(['foo' => 'bar']));
$sc->setParameter('Foo', 'baz1');
$this->assertEquals('baz1', $sc->getParameter('foo'), '->setParameter() converts the key to lowercase');
$this->assertEquals('baz1', $sc->getParameter('FOO'), '->getParameter() converts the key to lowercase');
}
public function testGetServiceIds()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $sc->set('foo', $obj = new \stdClass());
- $sc->set('bar', $obj = new \stdClass());
+ $sc = new Container();
+ $sc->set('foo', $obj = new stdClass());
+ $sc->set('bar', $obj = new stdClass());
$this->assertEquals(['service_container', 'foo', 'bar'], $sc->getServiceIds(), '->getServiceIds() returns all defined service ids');
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->set('foo', $obj = new \stdClass());
+ $sc = new ProjectServiceContainer();
+ $sc->set('foo', $obj = new stdClass());
$this->assertEquals(['service_container', 'internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'internal_dependency', 'alias', 'foo'], $sc->getServiceIds(), '->getServiceIds() returns defined service ids by factory methods in the method map, followed by service ids defined by set()');
}
/**
@@ -127,26 +133,26 @@ public function testGetServiceIds()
*/
public function testGetLegacyServiceIds()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\LegacyProjectServiceContainer();
- $sc->set('foo', $obj = new \stdClass());
+ $sc = new LegacyProjectServiceContainer();
+ $sc->set('foo', $obj = new stdClass());
$this->assertEquals(['internal', 'bar', 'foo_bar', 'foo.baz', 'circular', 'throw_exception', 'throws_exception_on_service_configuration', 'service_container', 'alias', 'foo'], $sc->getServiceIds(), '->getServiceIds() returns defined service ids by getXXXService() methods, followed by service ids defined by set()');
}
public function testSet()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $sc->set('._. \\o/', $foo = new \stdClass());
+ $sc = new Container();
+ $sc->set('._. \\o/', $foo = new stdClass());
$this->assertSame($foo, $sc->get('._. \\o/'), '->set() sets a service');
}
public function testSetWithNullResetTheService()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
+ $sc = new Container();
$sc->set('foo', null);
$this->assertFalse($sc->has('foo'), '->set() with null service resets the service');
}
public function testSetReplacesAlias()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $c->set('alias', $foo = new \stdClass());
+ $c = new ProjectServiceContainer();
+ $c->set('alias', $foo = new stdClass());
$this->assertSame($foo, $c->get('alias'), '->set() replaces an existing alias');
}
/**
@@ -155,30 +161,30 @@ public function testSetReplacesAlias()
*/
public function testSetWithNullOnInitializedPredefinedService()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $sc->set('foo', new \stdClass());
+ $sc = new Container();
+ $sc->set('foo', new stdClass());
$sc->set('foo', null);
$this->assertFalse($sc->has('foo'), '->set() with null service resets the service');
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $sc = new ProjectServiceContainer();
$sc->get('bar');
$sc->set('bar', null);
$this->assertTrue($sc->has('bar'), '->set() with null service resets the pre-defined service');
}
public function testSetWithNullOnUninitializedPredefinedService()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $sc->set('foo', new \stdClass());
+ $sc = new Container();
+ $sc->set('foo', new stdClass());
$sc->get('foo', null);
$sc->set('foo', null);
$this->assertFalse($sc->has('foo'), '->set() with null service resets the service');
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $sc = new ProjectServiceContainer();
$sc->set('bar', null);
$this->assertTrue($sc->has('bar'), '->set() with null service resets the pre-defined service');
}
public function testGet()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->set('foo', $foo = new \stdClass());
+ $sc = new ProjectServiceContainer();
+ $sc->set('foo', $foo = new stdClass());
$this->assertSame($foo, $sc->get('foo'), '->get() returns the service for the given id');
$this->assertSame($sc->__bar, $sc->get('bar'), '->get() returns the service for the given id');
$this->assertSame($sc->__foo_bar, $sc->get('foo_bar'), '->get() returns the service if a get*Method() is defined');
@@ -186,10 +192,10 @@ public function testGet()
try {
$sc->get('');
$this->fail('->get() throws a \\InvalidArgumentException exception if the service is empty');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException', $e, '->get() throws a ServiceNotFoundException exception if the service is empty');
}
- $this->assertNull($sc->get('', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service is empty');
+ $this->assertNull($sc->get('', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service is empty');
}
/**
* @group legacy
@@ -197,8 +203,8 @@ public function testGet()
*/
public function testGetInsensitivity()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->set('foo', $foo = new \stdClass());
+ $sc = new ProjectServiceContainer();
+ $sc->set('foo', $foo = new stdClass());
$this->assertSame($foo, $sc->get('Foo'), '->get() returns the service for the given id, and converts id to lowercase');
}
/**
@@ -207,8 +213,8 @@ public function testGetInsensitivity()
*/
public function testNormalizeIdKeepsCase()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->normalizeId('Foo', \true);
+ $sc = new ProjectServiceContainer();
+ $sc->normalizeId('Foo', true);
$this->assertSame('Foo', $sc->normalizeId('foo'));
}
/**
@@ -221,51 +227,51 @@ public function testNormalizeIdKeepsCase()
*/
public function testLegacyGet()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\LegacyProjectServiceContainer();
- $sc->set('foo', $foo = new \stdClass());
+ $sc = new LegacyProjectServiceContainer();
+ $sc->set('foo', $foo = new stdClass());
$this->assertSame($foo, $sc->get('foo'), '->get() returns the service for the given id');
$this->assertSame($foo, $sc->get('Foo'), '->get() returns the service for the given id, and converts id to lowercase');
$this->assertSame($sc->__bar, $sc->get('bar'), '->get() returns the service for the given id');
$this->assertSame($sc->__foo_bar, $sc->get('foo_bar'), '->get() returns the service if a get*Method() is defined');
$this->assertSame($sc->__foo_baz, $sc->get('foo.baz'), '->get() returns the service if a get*Method() is defined');
$this->assertSame($sc->__foo_baz, $sc->get('_PhpScoper5ea00cc67502b\\foo\\baz'), '->get() returns the service if a get*Method() is defined');
- $sc->set('bar', $bar = new \stdClass());
+ $sc->set('bar', $bar = new stdClass());
$this->assertSame($bar, $sc->get('bar'), '->get() prefers to return a service defined with set() than one defined with a getXXXMethod()');
try {
$sc->get('');
$this->fail('->get() throws a \\InvalidArgumentException exception if the service is empty');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException', $e, '->get() throws a ServiceNotFoundException exception if the service is empty');
}
- $this->assertNull($sc->get('', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service is empty');
+ $this->assertNull($sc->get('', ContainerInterface::NULL_ON_INVALID_REFERENCE), '->get() returns null if the service is empty');
}
public function testGetThrowServiceNotFoundException()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->set('foo', $foo = new \stdClass());
- $sc->set('baz', $foo = new \stdClass());
+ $sc = new ProjectServiceContainer();
+ $sc->set('foo', $foo = new stdClass());
+ $sc->set('baz', $foo = new stdClass());
try {
$sc->get('foo1');
$this->fail('->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException if the key does not exist');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException', $e, '->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent service "foo1". Did you mean this: "foo"?', $e->getMessage(), '->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException with some advices');
}
try {
$sc->get('bag');
$this->fail('->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException if the key does not exist');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException', $e, '->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent service "bag". Did you mean one of these: "bar", "baz"?', $e->getMessage(), '->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException with some advices');
}
}
public function testGetCircularReference()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $sc = new ProjectServiceContainer();
try {
$sc->get('circular');
$this->fail('->get() throws a ServiceCircularReferenceException if it contains circular reference');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException', $e, '->get() throws a ServiceCircularReferenceException if it contains circular reference');
$this->assertStringStartsWith('Circular reference detected for service "circular"', $e->getMessage(), '->get() throws a \\LogicException if it contains circular reference');
}
@@ -288,8 +294,8 @@ public function testGetRemovedServiceThrows()
}
public function testHas()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->set('foo', new \stdClass());
+ $sc = new ProjectServiceContainer();
+ $sc->set('foo', new stdClass());
$this->assertFalse($sc->has('foo1'), '->has() returns false if the service does not exist');
$this->assertTrue($sc->has('foo'), '->has() returns true if the service exists');
$this->assertTrue($sc->has('bar'), '->has() returns true if a get*Method() is defined');
@@ -305,8 +311,8 @@ public function testHas()
*/
public function testLegacyHas()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\LegacyProjectServiceContainer();
- $sc->set('foo', new \stdClass());
+ $sc = new LegacyProjectServiceContainer();
+ $sc->set('foo', new stdClass());
$this->assertFalse($sc->has('foo1'), '->has() returns false if the service does not exist');
$this->assertTrue($sc->has('foo'), '->has() returns true if the service exists');
$this->assertTrue($sc->has('bar'), '->has() returns true if a get*Method() is defined');
@@ -316,15 +322,15 @@ public function testLegacyHas()
}
public function testScalarService()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
+ $c = new Container();
$c->set('foo', 'some value');
$this->assertTrue($c->has('foo'));
$this->assertSame('some value', $c->get('foo'));
}
public function testInitialized()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $sc->set('foo', new \stdClass());
+ $sc = new ProjectServiceContainer();
+ $sc->set('foo', new stdClass());
$this->assertTrue($sc->initialized('foo'), '->initialized() returns true if service is loaded');
$this->assertFalse($sc->initialized('foo1'), '->initialized() returns false if service is not loaded');
$this->assertFalse($sc->initialized('bar'), '->initialized() returns false if a service is defined, but not currently loaded');
@@ -338,25 +344,25 @@ public function testInitialized()
*/
public function testInitializedWithPrivateService()
{
- $sc = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $sc = new ProjectServiceContainer();
$sc->get('internal_dependency');
$this->assertTrue($sc->initialized('internal'));
}
public function testReset()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $c->set('bar', new \stdClass());
+ $c = new Container();
+ $c->set('bar', new stdClass());
$c->reset();
- $this->assertNull($c->get('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE));
+ $this->assertNull($c->get('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE));
}
public function testGetThrowsException()
{
$this->expectException('Exception');
$this->expectExceptionMessage('Something went terribly wrong!');
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $c = new ProjectServiceContainer();
try {
$c->get('throw_exception');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
// Do nothing.
}
// Retry, to make sure that get*Service() will be called.
@@ -364,36 +370,36 @@ public function testGetThrowsException()
}
public function testGetThrowsExceptionOnServiceConfiguration()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $c = new ProjectServiceContainer();
try {
$c->get('throws_exception_on_service_configuration');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
// Do nothing.
}
$this->assertFalse($c->initialized('throws_exception_on_service_configuration'));
// Retry, to make sure that get*Service() will be called.
try {
$c->get('throws_exception_on_service_configuration');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
// Do nothing.
}
$this->assertFalse($c->initialized('throws_exception_on_service_configuration'));
}
protected function getField($obj, $field)
{
- $reflection = new \ReflectionProperty($obj, $field);
- $reflection->setAccessible(\true);
+ $reflection = new ReflectionProperty($obj, $field);
+ $reflection->setAccessible(true);
return $reflection->getValue($obj);
}
public function testAlias()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $c = new ProjectServiceContainer();
$this->assertTrue($c->has('alias'));
$this->assertSame($c->get('alias'), $c->get('bar'));
}
public function testThatCloningIsNotSupported()
{
- $class = new \ReflectionClass('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Container');
+ $class = new ReflectionClass('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Container');
$clone = $class->getMethod('__clone');
$this->assertFalse($class->isCloneable());
$this->assertTrue($clone->isPrivate());
@@ -404,7 +410,7 @@ public function testThatCloningIsNotSupported()
*/
public function testUnsetInternalPrivateServiceIsDeprecated()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $c = new ProjectServiceContainer();
$c->set('internal', null);
}
/**
@@ -413,8 +419,8 @@ public function testUnsetInternalPrivateServiceIsDeprecated()
*/
public function testChangeInternalPrivateServiceIsDeprecated()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $c->set('internal', $internal = new \stdClass());
+ $c = new ProjectServiceContainer();
+ $c->set('internal', $internal = new stdClass());
$this->assertSame($c->get('internal'), $internal);
}
/**
@@ -423,7 +429,7 @@ public function testChangeInternalPrivateServiceIsDeprecated()
*/
public function testCheckExistenceOfAnInternalPrivateServiceIsDeprecated()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $c = new ProjectServiceContainer();
$c->get('internal_dependency');
$this->assertTrue($c->has('internal'));
}
@@ -433,7 +439,7 @@ public function testCheckExistenceOfAnInternalPrivateServiceIsDeprecated()
*/
public function testRequestAnInternalSharedPrivateServiceIsDeprecated()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
+ $c = new ProjectServiceContainer();
$c->get('internal_dependency');
$c->get('internal');
}
@@ -443,9 +449,9 @@ public function testRequestAnInternalSharedPrivateServiceIsDeprecated()
*/
public function testReplacingAPreDefinedServiceIsDeprecated()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $c->set('bar', new \stdClass());
- $c->set('bar', $bar = new \stdClass());
+ $c = new ProjectServiceContainer();
+ $c->set('bar', new stdClass());
+ $c->set('bar', $bar = new stdClass());
$this->assertSame($bar, $c->get('bar'), '->set() replaces a pre-defined service');
}
/**
@@ -454,11 +460,11 @@ public function testReplacingAPreDefinedServiceIsDeprecated()
*/
public function testSetWithPrivateSyntheticServiceThrowsDeprecation()
{
- $c = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\ProjectServiceContainer();
- $c->set('synthetic', new \stdClass());
+ $c = new ProjectServiceContainer();
+ $c->set('synthetic', new stdClass());
}
}
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
public $__bar;
public $__foo_bar;
@@ -469,13 +475,13 @@ class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component
public function __construct()
{
parent::__construct();
- $this->__bar = new \stdClass();
- $this->__foo_bar = new \stdClass();
- $this->__foo_baz = new \stdClass();
- $this->__internal = new \stdClass();
- $this->privates = ['internal' => \true, 'synthetic' => \true];
+ $this->__bar = new stdClass();
+ $this->__foo_bar = new stdClass();
+ $this->__foo_baz = new stdClass();
+ $this->__internal = new stdClass();
+ $this->privates = ['internal' => true, 'synthetic' => true];
$this->aliases = ['alias' => 'bar'];
- $this->syntheticIds['synthetic'] = \true;
+ $this->syntheticIds['synthetic'] = true;
}
protected function getInternalService()
{
@@ -499,21 +505,21 @@ protected function getCircularService()
}
protected function getThrowExceptionService()
{
- throw new \Exception('Something went terribly wrong!');
+ throw new Exception('Something went terribly wrong!');
}
protected function getThrowsExceptionOnServiceConfigurationService()
{
- $this->services['throws_exception_on_service_configuration'] = $instance = new \stdClass();
- throw new \Exception('Something was terribly wrong while trying to configure the service!');
+ $this->services['throws_exception_on_service_configuration'] = $instance = new stdClass();
+ throw new Exception('Something was terribly wrong while trying to configure the service!');
}
protected function getInternalDependencyService()
{
- $this->services['internal_dependency'] = $instance = new \stdClass();
+ $this->services['internal_dependency'] = $instance = new stdClass();
$instance->internal = isset($this->services['internal']) ? $this->services['internal'] : $this->getInternalService();
return $instance;
}
}
-class LegacyProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class LegacyProjectServiceContainer extends Container
{
public $__bar;
public $__foo_bar;
@@ -522,11 +528,11 @@ class LegacyProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Com
public function __construct()
{
parent::__construct();
- $this->__bar = new \stdClass();
- $this->__foo_bar = new \stdClass();
- $this->__foo_baz = new \stdClass();
- $this->__internal = new \stdClass();
- $this->privates = ['internal' => \true];
+ $this->__bar = new stdClass();
+ $this->__foo_bar = new stdClass();
+ $this->__foo_baz = new stdClass();
+ $this->__internal = new stdClass();
+ $this->privates = ['internal' => true];
$this->aliases = ['alias' => 'bar'];
}
protected function getInternalService()
@@ -551,11 +557,11 @@ protected function getCircularService()
}
protected function getThrowExceptionService()
{
- throw new \Exception('Something went terribly wrong!');
+ throw new Exception('Something went terribly wrong!');
}
protected function getThrowsExceptionOnServiceConfigurationService()
{
- $this->services['throws_exception_on_service_configuration'] = $instance = new \stdClass();
- throw new \Exception('Something was terribly wrong while trying to configure the service!');
+ $this->services['throws_exception_on_service_configuration'] = $instance = new stdClass();
+ throw new Exception('Something was terribly wrong while trying to configure the service!');
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/CrossCheckTest.php b/vendor/symfony/dependency-injection/Tests/CrossCheckTest.php
index f8458911c..1286837cb 100644
--- a/vendor/symfony/dependency-injection/Tests/CrossCheckTest.php
+++ b/vendor/symfony/dependency-injection/Tests/CrossCheckTest.php
@@ -13,7 +13,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-class CrossCheckTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use ReflectionProperty;
+use function copy;
+use function file_put_contents;
+use function serialize;
+use function sys_get_temp_dir;
+use function tempnam;
+use function ucfirst;
+use function unlink;
+
+class CrossCheckTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
@@ -27,34 +36,34 @@ public static function setUpBeforeClass()
*/
public function testCrossCheck($fixture, $type)
{
- $loaderClass = 'Symfony\\Component\\DependencyInjection\\Loader\\' . \ucfirst($type) . 'FileLoader';
- $dumperClass = 'Symfony\\Component\\DependencyInjection\\Dumper\\' . \ucfirst($type) . 'Dumper';
- $tmp = \tempnam(\sys_get_temp_dir(), 'sf');
- \copy(self::$fixturesPath . '/' . $type . '/' . $fixture, $tmp);
- $container1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader1 = new $loaderClass($container1, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loaderClass = 'Symfony\\Component\\DependencyInjection\\Loader\\' . ucfirst($type) . 'FileLoader';
+ $dumperClass = 'Symfony\\Component\\DependencyInjection\\Dumper\\' . ucfirst($type) . 'Dumper';
+ $tmp = tempnam(sys_get_temp_dir(), 'sf');
+ copy(self::$fixturesPath . '/' . $type . '/' . $fixture, $tmp);
+ $container1 = new ContainerBuilder();
+ $loader1 = new $loaderClass($container1, new FileLocator());
$loader1->load($tmp);
$dumper = new $dumperClass($container1);
- \file_put_contents($tmp, $dumper->dump());
- $container2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader2 = new $loaderClass($container2, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ file_put_contents($tmp, $dumper->dump());
+ $container2 = new ContainerBuilder();
+ $loader2 = new $loaderClass($container2, new FileLocator());
$loader2->load($tmp);
- \unlink($tmp);
+ unlink($tmp);
$this->assertEquals($container2->getAliases(), $container1->getAliases(), 'loading a dump from a previously loaded container returns the same container');
$this->assertEquals($container2->getDefinitions(), $container1->getDefinitions(), 'loading a dump from a previously loaded container returns the same container');
$this->assertEquals($container2->getParameterBag()->all(), $container1->getParameterBag()->all(), '->getParameterBag() returns the same value for both containers');
- $r = new \ReflectionProperty(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::class, 'normalizedIds');
- $r->setAccessible(\true);
+ $r = new ReflectionProperty(ContainerBuilder::class, 'normalizedIds');
+ $r->setAccessible(true);
$r->setValue($container2, []);
$r->setValue($container1, []);
- $this->assertEquals(\serialize($container2), \serialize($container1), 'loading a dump from a previously loaded container returns the same container');
+ $this->assertEquals(serialize($container2), serialize($container1), 'loading a dump from a previously loaded container returns the same container');
$services1 = [];
foreach ($container1 as $id => $service) {
- $services1[$id] = \serialize($service);
+ $services1[$id] = serialize($service);
}
$services2 = [];
foreach ($container2 as $id => $service) {
- $services2[$id] = \serialize($service);
+ $services2[$id] = serialize($service);
}
unset($services1['service_container'], $services2['service_container']);
$this->assertEquals($services2, $services1, 'Iterator on the containers returns the same services');
diff --git a/vendor/symfony/dependency-injection/Tests/DefinitionDecoratorTest.php b/vendor/symfony/dependency-injection/Tests/DefinitionDecoratorTest.php
index dd90b625e..45e44c803 100644
--- a/vendor/symfony/dependency-injection/Tests/DefinitionDecoratorTest.php
+++ b/vendor/symfony/dependency-injection/Tests/DefinitionDecoratorTest.php
@@ -12,14 +12,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator;
+use function ucfirst;
+
/**
* @group legacy
*/
-class DefinitionDecoratorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class DefinitionDecoratorTest extends TestCase
{
public function testConstructor()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$this->assertEquals('foo', $def->getParent());
$this->assertEquals([], $def->getChanges());
}
@@ -28,13 +30,13 @@ public function testConstructor()
*/
public function testSetProperty($property, $changeKey)
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
- $getter = 'get' . \ucfirst($property);
- $setter = 'set' . \ucfirst($property);
+ $def = new DefinitionDecorator('foo');
+ $getter = 'get' . ucfirst($property);
+ $setter = 'set' . ucfirst($property);
$this->assertNull($def->{$getter}());
$this->assertSame($def, $def->{$setter}('foo'));
$this->assertEquals('foo', $def->{$getter}());
- $this->assertEquals([$changeKey => \true], $def->getChanges());
+ $this->assertEquals([$changeKey => true], $def->getChanges());
}
public function getPropertyTests()
{
@@ -42,31 +44,31 @@ public function getPropertyTests()
}
public function testSetPublic()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$this->assertTrue($def->isPublic());
- $this->assertSame($def, $def->setPublic(\false));
+ $this->assertSame($def, $def->setPublic(false));
$this->assertFalse($def->isPublic());
- $this->assertEquals(['public' => \true], $def->getChanges());
+ $this->assertEquals(['public' => true], $def->getChanges());
}
public function testSetLazy()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$this->assertFalse($def->isLazy());
- $this->assertSame($def, $def->setLazy(\false));
+ $this->assertSame($def, $def->setLazy(false));
$this->assertFalse($def->isLazy());
- $this->assertEquals(['lazy' => \true], $def->getChanges());
+ $this->assertEquals(['lazy' => true], $def->getChanges());
}
public function testSetAutowired()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$this->assertFalse($def->isAutowired());
- $this->assertSame($def, $def->setAutowired(\true));
+ $this->assertSame($def, $def->setAutowired(true));
$this->assertTrue($def->isAutowired());
- $this->assertSame(['autowired' => \true], $def->getChanges());
+ $this->assertSame(['autowired' => true], $def->getChanges());
}
public function testSetArgument()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$this->assertEquals([], $def->getArguments());
$this->assertSame($def, $def->replaceArgument(0, 'foo'));
$this->assertEquals(['index_0' => 'foo'], $def->getArguments());
@@ -74,12 +76,12 @@ public function testSetArgument()
public function testReplaceArgumentShouldRequireIntegerIndex()
{
$this->expectException('InvalidArgumentException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$def->replaceArgument('0', 'foo');
}
public function testReplaceArgument()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$def->setArguments([0 => 'foo', 1 => 'bar']);
$this->assertEquals('foo', $def->getArgument(0));
$this->assertEquals('bar', $def->getArgument(1));
@@ -91,7 +93,7 @@ public function testReplaceArgument()
public function testGetArgumentShouldCheckBounds()
{
$this->expectException('OutOfBoundsException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\DefinitionDecorator('foo');
+ $def = new DefinitionDecorator('foo');
$def->setArguments([0 => 'foo']);
$def->replaceArgument(0, 'foo');
$def->getArgument(1);
diff --git a/vendor/symfony/dependency-injection/Tests/DefinitionTest.php b/vendor/symfony/dependency-injection/Tests/DefinitionTest.php
index 49825bd66..8b40d48eb 100644
--- a/vendor/symfony/dependency-injection/Tests/DefinitionTest.php
+++ b/vendor/symfony/dependency-injection/Tests/DefinitionTest.php
@@ -12,58 +12,58 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-class DefinitionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class DefinitionTest extends TestCase
{
public function testConstructor()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertEquals('stdClass', $def->getClass(), '__construct() takes the class name as its first argument');
- $this->assertSame(['class' => \true], $def->getChanges());
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass', ['foo']);
+ $this->assertSame(['class' => true], $def->getChanges());
+ $def = new Definition('stdClass', ['foo']);
$this->assertEquals(['foo'], $def->getArguments(), '__construct() takes an optional array of arguments as its second argument');
}
public function testSetGetFactory()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $def = new Definition();
$this->assertSame($def, $def->setFactory('foo'), '->setFactory() implements a fluent interface');
$this->assertEquals('foo', $def->getFactory(), '->getFactory() returns the factory');
$def->setFactory('Foo::bar');
$this->assertEquals(['Foo', 'bar'], $def->getFactory(), '->setFactory() converts string static method call to the array');
- $this->assertSame(['factory' => \true], $def->getChanges());
+ $this->assertSame(['factory' => true], $def->getChanges());
}
public function testSetGetClass()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->setClass('foo'), '->setClass() implements a fluent interface');
$this->assertEquals('foo', $def->getClass(), '->getClass() returns the class name');
}
public function testSetGetDecoratedService()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertNull($def->getDecoratedService());
$def->setDecoratedService('foo', 'foo.renamed', 5);
$this->assertEquals(['foo', 'foo.renamed', 5], $def->getDecoratedService());
$def->setDecoratedService(null);
$this->assertNull($def->getDecoratedService());
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertNull($def->getDecoratedService());
$def->setDecoratedService('foo', 'foo.renamed');
$this->assertEquals(['foo', 'foo.renamed', 0], $def->getDecoratedService());
$def->setDecoratedService(null);
$this->assertNull($def->getDecoratedService());
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$def->setDecoratedService('foo');
$this->assertEquals(['foo', null, 0], $def->getDecoratedService());
$def->setDecoratedService(null);
$this->assertNull($def->getDecoratedService());
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('The decorated service inner name for "foo" must be different than the service name itself.');
$def->setDecoratedService('foo', 'foo');
}
public function testArguments()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->setArguments(['foo']), '->setArguments() implements a fluent interface');
$this->assertEquals(['foo'], $def->getArguments(), '->getArguments() returns the arguments');
$this->assertSame($def, $def->addArgument('bar'), '->addArgument() implements a fluent interface');
@@ -71,7 +71,7 @@ public function testArguments()
}
public function testMethodCalls()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->setMethodCalls([['foo', ['foo']]]), '->setMethodCalls() implements a fluent interface');
$this->assertEquals([['foo', ['foo']]], $def->getMethodCalls(), '->getMethodCalls() returns the methods to call');
$this->assertSame($def, $def->addMethodCall('bar', ['bar']), '->addMethodCall() implements a fluent interface');
@@ -85,55 +85,55 @@ public function testExceptionOnEmptyMethodCall()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Method name cannot be empty.');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$def->addMethodCall('');
}
public function testSetGetFile()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->setFile('foo'), '->setFile() implements a fluent interface');
$this->assertEquals('foo', $def->getFile(), '->getFile() returns the file to include');
}
public function testSetIsShared()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertTrue($def->isShared(), '->isShared() returns true by default');
- $this->assertSame($def, $def->setShared(\false), '->setShared() implements a fluent interface');
+ $this->assertSame($def, $def->setShared(false), '->setShared() implements a fluent interface');
$this->assertFalse($def->isShared(), '->isShared() returns false if the instance must not be shared');
}
public function testSetIsPublic()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertTrue($def->isPublic(), '->isPublic() returns true by default');
- $this->assertSame($def, $def->setPublic(\false), '->setPublic() implements a fluent interface');
+ $this->assertSame($def, $def->setPublic(false), '->setPublic() implements a fluent interface');
$this->assertFalse($def->isPublic(), '->isPublic() returns false if the instance must not be public.');
}
public function testSetIsSynthetic()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertFalse($def->isSynthetic(), '->isSynthetic() returns false by default');
- $this->assertSame($def, $def->setSynthetic(\true), '->setSynthetic() implements a fluent interface');
+ $this->assertSame($def, $def->setSynthetic(true), '->setSynthetic() implements a fluent interface');
$this->assertTrue($def->isSynthetic(), '->isSynthetic() returns true if the service is synthetic.');
}
public function testSetIsLazy()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertFalse($def->isLazy(), '->isLazy() returns false by default');
- $this->assertSame($def, $def->setLazy(\true), '->setLazy() implements a fluent interface');
+ $this->assertSame($def, $def->setLazy(true), '->setLazy() implements a fluent interface');
$this->assertTrue($def->isLazy(), '->isLazy() returns true if the service is lazy.');
}
public function testSetIsAbstract()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertFalse($def->isAbstract(), '->isAbstract() returns false by default');
- $this->assertSame($def, $def->setAbstract(\true), '->setAbstract() implements a fluent interface');
+ $this->assertSame($def, $def->setAbstract(true), '->setAbstract() implements a fluent interface');
$this->assertTrue($def->isAbstract(), '->isAbstract() returns true if the instance must not be public.');
}
public function testSetIsDeprecated()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertFalse($def->isDeprecated(), '->isDeprecated() returns false by default');
- $this->assertSame($def, $def->setDeprecated(\true), '->setDeprecated() implements a fluent interface');
+ $this->assertSame($def, $def->setDeprecated(true), '->setDeprecated() implements a fluent interface');
$this->assertTrue($def->isDeprecated(), '->isDeprecated() returns true if the instance should not be used anymore.');
$this->assertSame('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', $def->getDeprecationMessage('deprecated_service'), '->getDeprecationMessage() should return a formatted message template');
}
@@ -143,8 +143,8 @@ public function testSetIsDeprecated()
public function testSetDeprecatedWithInvalidDeprecationTemplate($message)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
- $def->setDeprecated(\false, $message);
+ $def = new Definition('stdClass');
+ $def->setDeprecated(false, $message);
}
public function invalidDeprecationMessageProvider()
{
@@ -152,13 +152,13 @@ public function invalidDeprecationMessageProvider()
}
public function testSetGetConfigurator()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->setConfigurator('foo'), '->setConfigurator() implements a fluent interface');
$this->assertEquals('foo', $def->getConfigurator(), '->getConfigurator() returns the configurator');
}
public function testClearTags()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->clearTags(), '->clearTags() implements a fluent interface');
$def->addTag('foo', ['foo' => 'bar']);
$def->clearTags();
@@ -166,7 +166,7 @@ public function testClearTags()
}
public function testClearTag()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertSame($def, $def->clearTags(), '->clearTags() implements a fluent interface');
$def->addTag('1foo1', ['foo1' => 'bar1']);
$def->addTag('2foo2', ['foo2' => 'bar2']);
@@ -181,7 +181,7 @@ public function testClearTag()
}
public function testTags()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertEquals([], $def->getTag('foo'), '->getTag() returns an empty array if the tag is not defined');
$this->assertFalse($def->hasTag('foo'));
$this->assertSame($def, $def->addTag('foo'), '->addTag() implements a fluent interface');
@@ -194,7 +194,7 @@ public function testTags()
}
public function testSetArgument()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$def->addArgument('foo');
$this->assertSame(['foo'], $def->getArguments());
$this->assertSame($def, $def->replaceArgument(0, 'moo'));
@@ -206,7 +206,7 @@ public function testSetArgument()
public function testGetArgumentShouldCheckBounds()
{
$this->expectException('OutOfBoundsException');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$def->addArgument('foo');
$def->getArgument(1);
}
@@ -214,7 +214,7 @@ public function testReplaceArgumentShouldCheckBounds()
{
$this->expectException('OutOfBoundsException');
$this->expectExceptionMessage('The index "1" is not in the range [0, 0].');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$def->addArgument('foo');
$def->replaceArgument(1, 'bar');
}
@@ -222,58 +222,58 @@ public function testReplaceArgumentWithoutExistingArgumentsShouldCheckBounds()
{
$this->expectException('OutOfBoundsException');
$this->expectExceptionMessage('Cannot replace arguments if none have been configured yet.');
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$def->replaceArgument(0, 'bar');
}
public function testSetGetProperties()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertEquals([], $def->getProperties());
$this->assertSame($def, $def->setProperties(['foo' => 'bar']));
$this->assertEquals(['foo' => 'bar'], $def->getProperties());
}
public function testSetProperty()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertEquals([], $def->getProperties());
$this->assertSame($def, $def->setProperty('foo', 'bar'));
$this->assertEquals(['foo' => 'bar'], $def->getProperties());
}
public function testAutowired()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertFalse($def->isAutowired());
- $def->setAutowired(\true);
+ $def->setAutowired(true);
$this->assertTrue($def->isAutowired());
- $def->setAutowired(\false);
+ $def->setAutowired(false);
$this->assertFalse($def->isAutowired());
}
public function testChangesNoChanges()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $def = new Definition();
$this->assertSame([], $def->getChanges());
}
public function testGetChangesWithChanges()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass', ['fooarg']);
- $def->setAbstract(\true);
- $def->setAutowired(\true);
+ $def = new Definition('stdClass', ['fooarg']);
+ $def->setAbstract(true);
+ $def->setAutowired(true);
$def->setConfigurator('configuration_func');
$def->setDecoratedService(null);
- $def->setDeprecated(\true);
+ $def->setDeprecated(true);
$def->setFactory('factory_func');
$def->setFile('foo.php');
- $def->setLazy(\true);
- $def->setPublic(\true);
- $def->setShared(\true);
- $def->setSynthetic(\true);
+ $def->setLazy(true);
+ $def->setPublic(true);
+ $def->setShared(true);
+ $def->setSynthetic(true);
// changes aren't tracked for these, class or arguments
$def->setInstanceofConditionals([]);
$def->addTag('foo_tag');
$def->addMethodCall('methodCall');
- $def->setProperty('fooprop', \true);
- $def->setAutoconfigured(\true);
- $this->assertSame(['class' => \true, 'autowired' => \true, 'configurator' => \true, 'decorated_service' => \true, 'deprecated' => \true, 'factory' => \true, 'file' => \true, 'lazy' => \true, 'public' => \true, 'shared' => \true, 'autoconfigured' => \true], $def->getChanges());
+ $def->setProperty('fooprop', true);
+ $def->setAutoconfigured(true);
+ $this->assertSame(['class' => true, 'autowired' => true, 'configurator' => true, 'decorated_service' => true, 'deprecated' => true, 'factory' => true, 'file' => true, 'lazy' => true, 'public' => true, 'shared' => true, 'autoconfigured' => true], $def->getChanges());
$def->setChanges([]);
$this->assertSame([], $def->getChanges());
}
@@ -282,7 +282,7 @@ public function testGetChangesWithChanges()
*/
public function testTypes()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertEquals([], $def->getAutowiringTypes());
$this->assertSame($def, $def->setAutowiringTypes(['Foo']));
$this->assertEquals(['Foo'], $def->getAutowiringTypes());
@@ -293,14 +293,14 @@ public function testTypes()
}
public function testShouldAutoconfigure()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertFalse($def->isAutoconfigured());
- $def->setAutoconfigured(\true);
+ $def->setAutoconfigured(true);
$this->assertTrue($def->isAutoconfigured());
}
public function testAddError()
{
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $def = new Definition('stdClass');
$this->assertEmpty($def->getErrors());
$def->addError('First error');
$def->addError('Second error');
diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php b/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php
index f1191094d..7cb03656b 100644
--- a/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php
@@ -15,7 +15,9 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class GraphvizDumperTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function file_get_contents;
+
+class GraphvizDumperTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
@@ -24,42 +26,42 @@ public static function setUpBeforeClass()
}
public function testDump()
{
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
+ $dumper = new GraphvizDumper($container = new ContainerBuilder());
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services1.dot', $dumper->dump(), '->dump() dumps an empty container as an empty dot file');
$container = (include self::$fixturesPath . '/containers/container9.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
+ $dumper = new GraphvizDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services9.dot', $dumper->dump(), '->dump() dumps services');
$container = (include self::$fixturesPath . '/containers/container10.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
+ $dumper = new GraphvizDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services10.dot', $dumper->dump(), '->dump() dumps services');
$container = (include self::$fixturesPath . '/containers/container10.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
- $this->assertEquals($dumper->dump(['graph' => ['ratio' => 'normal'], 'node' => ['fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'], 'edge' => ['fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1], 'node.instance' => ['fillcolor' => 'green', 'style' => 'empty'], 'node.definition' => ['fillcolor' => 'grey'], 'node.missing' => ['fillcolor' => 'red', 'style' => 'empty']]), \file_get_contents(self::$fixturesPath . '/graphviz/services10-1.dot'), '->dump() dumps services');
+ $dumper = new GraphvizDumper($container);
+ $this->assertEquals($dumper->dump(['graph' => ['ratio' => 'normal'], 'node' => ['fontsize' => 13, 'fontname' => 'Verdana', 'shape' => 'square'], 'edge' => ['fontsize' => 12, 'fontname' => 'Verdana', 'color' => 'white', 'arrowhead' => 'closed', 'arrowsize' => 1], 'node.instance' => ['fillcolor' => 'green', 'style' => 'empty'], 'node.definition' => ['fillcolor' => 'grey'], 'node.missing' => ['fillcolor' => 'red', 'style' => 'empty']]), file_get_contents(self::$fixturesPath . '/graphviz/services10-1.dot'), '->dump() dumps services');
}
public function testDumpWithFrozenContainer()
{
$container = (include self::$fixturesPath . '/containers/container13.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
+ $dumper = new GraphvizDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services13.dot', $dumper->dump(), '->dump() dumps services');
}
public function testDumpWithFrozenCustomClassContainer()
{
$container = (include self::$fixturesPath . '/containers/container14.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
+ $dumper = new GraphvizDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services14.dot', $dumper->dump(), '->dump() dumps services');
}
public function testDumpWithUnresolvedParameter()
{
$container = (include self::$fixturesPath . '/containers/container17.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
+ $dumper = new GraphvizDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services17.dot', $dumper->dump(), '->dump() dumps services');
}
public function testDumpWithInlineDefinition()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->addArgument((new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->addArgument((new Definition('stdClass'))->addArgument(new Reference('bar')));
$container->register('bar', 'stdClass');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\GraphvizDumper($container);
+ $dumper = new GraphvizDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/graphviz/services_inline.dot', $dumper->dump(), '->dump() dumps nested references');
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php b/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php
index 8810a6dee..a13f32691 100644
--- a/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php
@@ -10,7 +10,9 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper;
+use _PhpScoper5ea00cc67502b\DummyProxyDumper;
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
+use _PhpScoper5ea00cc67502b\ProjectServiceContainer;
use _PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument;
@@ -35,80 +37,116 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_AliasesCanBeFoundInTheDumpedContainer;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Aliases;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Base64Parameters;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Deep_Graph;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_EnvParameters;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Frozen_No_Aliases;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Legacy_Privates;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Object_Class_Name;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Rot13Parameters;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Scalar_Service;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Uninitialized_Reference;
+use _PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_UninitializedSyntheticReference;
+use Closure;
+use Exception;
+use stdClass;
+use function base64_encode;
+use function dirname;
+use function iterator_to_array;
+use function method_exists;
+use function mt_rand;
+use function print_r;
+use function putenv;
+use function realpath;
+use function str_replace;
+use function str_rot13;
+use function ucfirst;
+use const DIRECTORY_SEPARATOR;
+
require_once __DIR__ . '/../Fixtures/includes/classes.php';
-class PhpDumperTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class PhpDumperTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
}
public function testDump()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services1.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class');
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services1-1.php', $dumper->dump(['class' => 'Container', 'base_class' => 'AbstractContainer', 'namespace' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Dump']), '->dump() takes a class and a base_class options');
}
public function testDumpOptimizationString()
{
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $definition = new Definition();
$definition->setClass('stdClass');
$definition->addArgument(['only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1%some_string%string2', 'optimize concatenation with empty string' => 'string1%empty_value%string2', 'optimize concatenation from the start' => '%empty_value%start', 'optimize concatenation at the end' => 'end%empty_value%', 'new line' => "string with \nnew line"]);
- $definition->setPublic(\true);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setResourceTracking(\false);
+ $definition->setPublic(true);
+ $container = new ContainerBuilder();
+ $container->setResourceTracking(false);
$container->setDefinition('test', $definition);
$container->setParameter('empty_value', '');
$container->setParameter('some_string', '-');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services10.php', $dumper->dump(), '->dump() dumps an empty container as an empty PHP class');
}
public function testDumpRelativeDir()
{
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
+ $definition = new Definition();
$definition->setClass('stdClass');
$definition->addArgument('%foo%');
$definition->addArgument(['%foo%' => '%buz%/']);
- $definition->setPublic(\true);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $definition->setPublic(true);
+ $container = new ContainerBuilder();
$container->setDefinition('test', $definition);
- $container->setParameter('foo', 'wiz' . \dirname(__DIR__));
+ $container->setParameter('foo', 'wiz' . dirname(__DIR__));
$container->setParameter('bar', __DIR__);
$container->setParameter('baz', '%bar%/PhpDumperTest.php');
- $container->setParameter('buz', \dirname(\dirname(__DIR__)));
+ $container->setParameter('buz', dirname(dirname(__DIR__)));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services12.php', $dumper->dump(['file' => __FILE__]), '->dump() dumps __DIR__ relative strings');
}
public function testDumpCustomContainerClassWithoutConstructor()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/custom_container_class_without_constructor.php', $dumper->dump(['base_class' => 'NoConstructorContainer', 'namespace' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Container']));
}
public function testDumpCustomContainerClassConstructorWithoutArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/custom_container_class_constructor_without_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithoutArgumentsContainer', 'namespace' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Container']));
}
public function testDumpCustomContainerClassWithOptionalArgumentLessConstructor()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/custom_container_class_with_optional_constructor_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithOptionalArgumentsContainer', 'namespace' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Container']));
}
public function testDumpCustomContainerClassWithMandatoryArgumentLessConstructor()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/custom_container_class_with_mandatory_constructor_arguments.php', $dumper->dump(['base_class' => 'ConstructorWithMandatoryArgumentsContainer', 'namespace' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Container']));
}
/**
@@ -117,20 +155,20 @@ public function testDumpCustomContainerClassWithMandatoryArgumentLessConstructor
public function testExportParameters($parameters)
{
$this->expectException('InvalidArgumentException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($parameters));
+ $container = new ContainerBuilder(new ParameterBag($parameters));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dumper->dump();
}
public function provideInvalidParameters()
{
- return [[['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass')]], [['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]], [['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]], [['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Variable('foo')]]];
+ return [[['foo' => new Definition('stdClass')]], [['foo' => new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]], [['foo' => new Reference('foo')]], [['foo' => new Variable('foo')]]];
}
public function testAddParameters()
{
$container = (include self::$fixturesPath . '/containers/container8.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services8.php', $dumper->dump(), '->dump() dumps parameters');
}
/**
@@ -140,23 +178,23 @@ public function testAddParameters()
public function testAddServiceWithoutCompilation()
{
$container = (include self::$fixturesPath . '/containers/container9.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $this->assertStringEqualsFile(self::$fixturesPath . '/php/services9.php', \str_replace(\str_replace('\\', '\\\\', self::$fixturesPath . \DIRECTORY_SEPARATOR . 'includes' . \DIRECTORY_SEPARATOR), '%path%', $dumper->dump()), '->dump() dumps services');
+ $dumper = new PhpDumper($container);
+ $this->assertStringEqualsFile(self::$fixturesPath . '/php/services9.php', str_replace(str_replace('\\', '\\\\', self::$fixturesPath . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR), '%path%', $dumper->dump()), '->dump() dumps services');
}
public function testAddService()
{
$container = (include self::$fixturesPath . '/containers/container9.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $this->assertStringEqualsFile(self::$fixturesPath . '/php/services9_compiled.php', \str_replace(\str_replace('\\', '\\\\', self::$fixturesPath . \DIRECTORY_SEPARATOR . 'includes' . \DIRECTORY_SEPARATOR), '%path%', $dumper->dump()), '->dump() dumps services');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'FooClass')->addArgument(new \stdClass())->setPublic(\true);
+ $dumper = new PhpDumper($container);
+ $this->assertStringEqualsFile(self::$fixturesPath . '/php/services9_compiled.php', str_replace(str_replace('\\', '\\\\', self::$fixturesPath . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR), '%path%', $dumper->dump()), '->dump() dumps services');
+ $container = new ContainerBuilder();
+ $container->register('foo', 'FooClass')->addArgument(new stdClass())->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
try {
$dumper->dump();
$this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
$this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
}
@@ -166,10 +204,10 @@ public function testDumpAsFiles()
$container = (include self::$fixturesPath . '/containers/container9.php');
$container->getDefinition('bar')->addTag('hot');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $dump = \print_r($dumper->dump(['as_files' => \true, 'file' => __DIR__, 'hot_path_tag' => 'hot']), \true);
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $dump = \str_replace('\\\\Fixtures\\\\includes\\\\foo.php', '/Fixtures/includes/foo.php', $dump);
+ $dumper = new PhpDumper($container);
+ $dump = print_r($dumper->dump(['as_files' => true, 'file' => __DIR__, 'hot_path_tag' => 'hot']), true);
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $dump = str_replace('\\\\Fixtures\\\\includes\\\\foo.php', '/Fixtures/includes/foo.php', $dump);
}
$this->assertStringMatchesFormatFile(self::$fixturesPath . '/php/services9_as_files.txt', $dump);
}
@@ -177,48 +215,48 @@ public function testServicesWithAnonymousFactories()
{
$container = (include self::$fixturesPath . '/containers/container19.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services19.php', $dumper->dump(), '->dump() dumps services with anonymous factories');
}
public function testAddServiceIdWithUnsupportedCharacters()
{
$class = 'Symfony_DI_PhpDumper_Test_Unsupported_Characters';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter("'", 'oh-no');
- $container->register('foo*/oh-no', 'FooClass')->setPublic(\true);
- $container->register('bar$', 'FooClass')->setPublic(\true);
- $container->register('bar$!', 'FooClass')->setPublic(\true);
+ $container->register('foo*/oh-no', 'FooClass')->setPublic(true);
+ $container->register('bar$', 'FooClass')->setPublic(true);
+ $container->register('bar$!', 'FooClass')->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_unsupported_characters.php', $dumper->dump(['class' => $class]));
require_once self::$fixturesPath . '/php/services_unsupported_characters.php';
- $this->assertTrue(\method_exists($class, 'getFooOhNoService'));
- $this->assertTrue(\method_exists($class, 'getBarService'));
- $this->assertTrue(\method_exists($class, 'getBar2Service'));
+ $this->assertTrue(method_exists($class, 'getFooOhNoService'));
+ $this->assertTrue(method_exists($class, 'getBarService'));
+ $this->assertTrue(method_exists($class, 'getBar2Service'));
}
public function testConflictingServiceIds()
{
$class = 'Symfony_DI_PhpDumper_Test_Conflicting_Service_Ids';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo_bar', 'FooClass')->setPublic(\true);
- $container->register('foobar', 'FooClass')->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('foo_bar', 'FooClass')->setPublic(true);
+ $container->register('foobar', 'FooClass')->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => $class]));
- $this->assertTrue(\method_exists($class, 'getFooBarService'));
- $this->assertTrue(\method_exists($class, 'getFoobar2Service'));
+ $this->assertTrue(method_exists($class, 'getFooBarService'));
+ $this->assertTrue(method_exists($class, 'getFoobar2Service'));
}
public function testConflictingMethodsWithParent()
{
$class = 'Symfony_DI_PhpDumper_Test_Conflicting_Method_With_Parent';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('bar', 'FooClass')->setPublic(\true);
- $container->register('foo_bar', 'FooClass')->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('bar', 'FooClass')->setPublic(true);
+ $container->register('foo_bar', 'FooClass')->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => $class, 'base_class' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\containers\\CustomContainer']));
- $this->assertTrue(\method_exists($class, 'getBar2Service'));
- $this->assertTrue(\method_exists($class, 'getFoobar2Service'));
+ $this->assertTrue(method_exists($class, 'getBar2Service'));
+ $this->assertTrue(method_exists($class, 'getFoobar2Service'));
}
/**
* @dataProvider provideInvalidFactories
@@ -227,13 +265,13 @@ public function testInvalidFactories($factory)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Cannot dump definition');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $def = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
- $def->setPublic(\true);
+ $container = new ContainerBuilder();
+ $def = new Definition('stdClass');
+ $def->setPublic(true);
$def->setFactory($factory);
$container->setDefinition('bar', $def);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dumper->dump();
}
public function provideInvalidFactories()
@@ -245,20 +283,20 @@ public function testAliases()
$container = (include self::$fixturesPath . '/containers/container9.php');
$container->setParameter('foo_bar', 'foo_bar');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Aliases']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Aliases();
+ $container = new Symfony_DI_PhpDumper_Test_Aliases();
$foo = $container->get('foo');
$this->assertSame($foo, $container->get('alias_for_foo'));
$this->assertSame($foo, $container->get('alias_for_alias'));
}
public function testFrozenContainerWithoutAliases()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Frozen_No_Aliases']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Frozen_No_Aliases();
+ $container = new Symfony_DI_PhpDumper_Test_Frozen_No_Aliases();
$this->assertFalse($container->has('foo'));
}
/**
@@ -268,186 +306,186 @@ public function testFrozenContainerWithoutAliases()
public function testOverrideServiceWhenUsingADumpedContainer()
{
require_once self::$fixturesPath . '/php/services9_compiled.php';
- $container = new \_PhpScoper5ea00cc67502b\ProjectServiceContainer();
+ $container = new ProjectServiceContainer();
$container->get('decorator_service');
- $container->set('decorator_service', $decorator = new \stdClass());
+ $container->set('decorator_service', $decorator = new stdClass());
$this->assertSame($decorator, $container->get('decorator_service'), '->set() overrides an already defined service');
}
public function testDumpAutowireData()
{
$container = (include self::$fixturesPath . '/containers/container24.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services24.php', $dumper->dump());
}
public function testEnvInId()
{
$container = (include self::$fixturesPath . '/containers/container_env_in_id.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_env_in_id.php', $dumper->dump());
}
public function testEnvParameter()
{
- $rand = \mt_rand();
- \putenv('Baz=' . $rand);
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $rand = mt_rand();
+ putenv('Baz=' . $rand);
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services26.yml');
$container->setParameter('env(json_file)', self::$fixturesPath . '/array.json');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services26.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_EnvParameters', 'file' => self::$fixturesPath . '/php/services26.php']));
require self::$fixturesPath . '/php/services26.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_EnvParameters();
+ $container = new Symfony_DI_PhpDumper_Test_EnvParameters();
$this->assertSame($rand, $container->getParameter('baz'));
$this->assertSame([123, 'abc'], $container->getParameter('json'));
$this->assertSame('sqlite:///foo/bar/var/data.db', $container->getParameter('db_dsn'));
- \putenv('Baz');
+ putenv('Baz');
}
public function testResolvedBase64EnvParameters()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setParameter('env(foo)', \base64_encode('world'));
+ $container = new ContainerBuilder();
+ $container->setParameter('env(foo)', base64_encode('world'));
$container->setParameter('hello', '%env(base64:foo)%');
- $container->compile(\true);
+ $container->compile(true);
$expected = ['env(foo)' => 'd29ybGQ=', 'hello' => 'world'];
$this->assertSame($expected, $container->getParameterBag()->all());
}
public function testDumpedBase64EnvParameters()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setParameter('env(foo)', \base64_encode('world'));
+ $container = new ContainerBuilder();
+ $container->setParameter('env(foo)', base64_encode('world'));
$container->setParameter('hello', '%env(base64:foo)%');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dumper->dump();
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_base64_env.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Base64Parameters']));
require self::$fixturesPath . '/php/services_base64_env.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Base64Parameters();
+ $container = new Symfony_DI_PhpDumper_Test_Base64Parameters();
$this->assertSame('world', $container->getParameter('hello'));
}
public function testCustomEnvParameters()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->setParameter('env(foo)', \str_rot13('world'));
+ $container = new ContainerBuilder();
+ $container->setParameter('env(foo)', str_rot13('world'));
$container->setParameter('hello', '%env(rot13:foo)%');
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor::class)->addTag('container.env_var_processor')->setPublic(\true);
+ $container->register(Rot13EnvVarProcessor::class)->addTag('container.env_var_processor')->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dumper->dump();
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_rot13_env.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Rot13Parameters']));
require self::$fixturesPath . '/php/services_rot13_env.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Rot13Parameters();
+ $container = new Symfony_DI_PhpDumper_Test_Rot13Parameters();
$this->assertSame('world', $container->getParameter('hello'));
}
public function testFileEnvProcessor()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('env(foo)', __FILE__);
$container->setParameter('random', '%env(file:foo)%');
- $container->compile(\true);
+ $container->compile(true);
$this->assertStringEqualsFile(__FILE__, $container->getParameter('random'));
}
public function testUnusedEnvParameter()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\EnvParameterException');
$this->expectExceptionMessage('Environment variables "FOO" are never used. Please, check your container\'s configuration.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->getParameter('env(FOO)');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dumper->dump();
}
public function testCircularDynamicEnv()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ParameterCircularReferenceException');
$this->expectExceptionMessage('Circular reference detected for parameter "env(resolve:DUMMY_ENV_VAR)" ("env(resolve:DUMMY_ENV_VAR)" > "env(resolve:DUMMY_ENV_VAR)").');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('foo', '%bar%');
$container->setParameter('bar', '%env(resolve:DUMMY_ENV_VAR)%');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dump = $dumper->dump(['class' => $class = __FUNCTION__]);
eval('?>' . $dump);
$container = new $class();
- \putenv('DUMMY_ENV_VAR=%foo%');
+ putenv('DUMMY_ENV_VAR=%foo%');
try {
$container->getParameter('bar');
} finally {
- \putenv('DUMMY_ENV_VAR');
+ putenv('DUMMY_ENV_VAR');
}
}
public function testInlinedDefinitionReferencingServiceContainer()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->addMethodCall('add', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container')])->setPublic(\false);
- $container->register('bar', 'stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->addMethodCall('add', [new Reference('service_container')])->setPublic(false);
+ $container->register('bar', 'stdClass')->addArgument(new Reference('foo'))->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services13.php', $dumper->dump(), '->dump() dumps inline definitions which reference service_container');
}
public function testNonSharedLazyDefinitionReferences()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setShared(\false)->setLazy(\true);
- $container->register('bar', 'stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, \false));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setShared(false)->setLazy(true);
+ $container->register('bar', 'stdClass')->addArgument(new Reference('foo', ContainerBuilder::EXCEPTION_ON_INVALID_REFERENCE, false));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $dumper->setProxyDumper(new \_PhpScoper5ea00cc67502b\DummyProxyDumper());
+ $dumper = new PhpDumper($container);
+ $dumper->setProxyDumper(new DummyProxyDumper());
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_non_shared_lazy.php', $dumper->dump());
}
public function testInitializePropertiesBeforeMethodCalls()
{
require_once self::$fixturesPath . '/includes/classes.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\true);
- $container->register('bar', 'MethodCallClass')->setPublic(\true)->setProperty('simple', 'bar')->setProperty('complex', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))->addMethodCall('callMe');
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(true);
+ $container->register('bar', 'MethodCallClass')->setPublic(true)->setProperty('simple', 'bar')->setProperty('complex', new Reference('foo'))->addMethodCall('callMe');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls();
+ $container = new Symfony_DI_PhpDumper_Test_Properties_Before_Method_Calls();
$this->assertTrue($container->get('bar')->callPassed(), '->dump() initializes properties before method calls');
}
public function testCircularReferenceAllowanceForLazyServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'))->setPublic(\true);
- $container->register('bar', 'stdClass')->setLazy(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->addArgument(new Reference('bar'))->setPublic(true);
+ $container->register('bar', 'stdClass')->setLazy(true)->addArgument(new Reference('foo'))->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $dumper->setProxyDumper(new \_PhpScoper5ea00cc67502b\DummyProxyDumper());
+ $dumper = new PhpDumper($container);
+ $dumper->setProxyDumper(new DummyProxyDumper());
$dumper->dump();
$this->addToAssertionCount(1);
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$message = 'Circular reference detected for service "foo", path: "foo -> bar -> foo". Try running "composer require symfony/proxy-manager-bridge".';
- $this->expectException(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException::class);
+ $this->expectException(ServiceCircularReferenceException::class);
$this->expectExceptionMessage($message);
$dumper->dump();
}
public function testDedupLazyProxy()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setLazy(\true)->setPublic(\true);
- $container->register('bar', 'stdClass')->setLazy(\true)->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setLazy(true)->setPublic(true);
+ $container->register('bar', 'stdClass')->setLazy(true)->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $dumper->setProxyDumper(new \_PhpScoper5ea00cc67502b\DummyProxyDumper());
+ $dumper = new PhpDumper($container);
+ $dumper->setProxyDumper(new DummyProxyDumper());
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_dedup_lazy_proxy.php', $dumper->dump());
}
public function testLazyArgumentProvideGenerator()
{
require_once self::$fixturesPath . '/includes/classes.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('lazy_referenced', 'stdClass')->setPublic(\true);
- $container->register('lazy_context', 'LazyContext')->setPublic(\true)->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(['k1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('lazy_referenced'), 'k2' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container')]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([])]);
+ $container = new ContainerBuilder();
+ $container->register('lazy_referenced', 'stdClass')->setPublic(true);
+ $container->register('lazy_context', 'LazyContext')->setPublic(true)->setArguments([new IteratorArgument(['k1' => new Reference('lazy_referenced'), 'k2' => new Reference('service_container')]), new IteratorArgument([])]);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator();
+ $container = new Symfony_DI_PhpDumper_Test_Lazy_Argument_Provide_Generator();
$lazyContext = $container->get('lazy_context');
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator::class, $lazyContext->lazyValues);
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator::class, $lazyContext->lazyEmptyValues);
+ $this->assertInstanceOf(RewindableGenerator::class, $lazyContext->lazyValues);
+ $this->assertInstanceOf(RewindableGenerator::class, $lazyContext->lazyEmptyValues);
$this->assertCount(2, $lazyContext->lazyValues);
$this->assertCount(0, $lazyContext->lazyEmptyValues);
$i = -1;
@@ -463,98 +501,98 @@ public function testLazyArgumentProvideGenerator()
break;
}
}
- $this->assertEmpty(\iterator_to_array($lazyContext->lazyEmptyValues));
+ $this->assertEmpty(iterator_to_array($lazyContext->lazyEmptyValues));
}
public function testNormalizedId()
{
$container = (include self::$fixturesPath . '/containers/container33.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services33.php', $dumper->dump());
}
public function testDumpContainerBuilderWithFrozenConstructorIncludingPrivateServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo_service', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz_service')])->setPublic(\true);
- $container->register('bar_service', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz_service')])->setPublic(\true);
- $container->register('baz_service', 'stdClass')->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true);
+ $container->register('bar_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true);
+ $container->register('baz_service', 'stdClass')->setPublic(false);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_private_frozen.php', $dumper->dump());
}
public function testServiceLocator()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo_service', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\true)->addArgument(['bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar_service')), 'baz' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\TypedReference('baz_service', 'stdClass')), 'nil' => $nil = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('nil'))]);
+ $container = new ContainerBuilder();
+ $container->register('foo_service', ServiceLocator::class)->setPublic(true)->addArgument(['bar' => new ServiceClosureArgument(new Reference('bar_service')), 'baz' => new ServiceClosureArgument(new TypedReference('baz_service', 'stdClass')), 'nil' => $nil = new ServiceClosureArgument(new Reference('nil'))]);
// no method calls
- $container->register('translator.loader_1', 'stdClass')->setPublic(\true);
- $container->register('translator.loader_1_locator', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\false)->addArgument(['translator.loader_1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_1'))]);
- $container->register('translator_1', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator::class)->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_1_locator'));
+ $container->register('translator.loader_1', 'stdClass')->setPublic(true);
+ $container->register('translator.loader_1_locator', ServiceLocator::class)->setPublic(false)->addArgument(['translator.loader_1' => new ServiceClosureArgument(new Reference('translator.loader_1'))]);
+ $container->register('translator_1', StubbedTranslator::class)->setPublic(true)->addArgument(new Reference('translator.loader_1_locator'));
// one method calls
- $container->register('translator.loader_2', 'stdClass')->setPublic(\true);
- $container->register('translator.loader_2_locator', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\false)->addArgument(['translator.loader_2' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_2'))]);
- $container->register('translator_2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator::class)->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_2_locator'))->addMethodCall('addResource', ['db', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_2'), 'nl']);
+ $container->register('translator.loader_2', 'stdClass')->setPublic(true);
+ $container->register('translator.loader_2_locator', ServiceLocator::class)->setPublic(false)->addArgument(['translator.loader_2' => new ServiceClosureArgument(new Reference('translator.loader_2'))]);
+ $container->register('translator_2', StubbedTranslator::class)->setPublic(true)->addArgument(new Reference('translator.loader_2_locator'))->addMethodCall('addResource', ['db', new Reference('translator.loader_2'), 'nl']);
// two method calls
- $container->register('translator.loader_3', 'stdClass')->setPublic(\true);
- $container->register('translator.loader_3_locator', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator::class)->setPublic(\false)->addArgument(['translator.loader_3' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_3'))]);
- $container->register('translator_3', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator::class)->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_3_locator'))->addMethodCall('addResource', ['db', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_3'), 'nl'])->addMethodCall('addResource', ['db', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('translator.loader_3'), 'en']);
+ $container->register('translator.loader_3', 'stdClass')->setPublic(true);
+ $container->register('translator.loader_3_locator', ServiceLocator::class)->setPublic(false)->addArgument(['translator.loader_3' => new ServiceClosureArgument(new Reference('translator.loader_3'))]);
+ $container->register('translator_3', StubbedTranslator::class)->setPublic(true)->addArgument(new Reference('translator.loader_3_locator'))->addMethodCall('addResource', ['db', new Reference('translator.loader_3'), 'nl'])->addMethodCall('addResource', ['db', new Reference('translator.loader_3'), 'en']);
$nil->setValues([null]);
- $container->register('bar_service', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz_service')])->setPublic(\true);
- $container->register('baz_service', 'stdClass')->setPublic(\false);
+ $container->register('bar_service', 'stdClass')->setArguments([new Reference('baz_service')])->setPublic(true);
+ $container->register('baz_service', 'stdClass')->setPublic(false);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_locator.php', $dumper->dump());
}
public function testServiceSubscriber()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo_service', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)->setPublic(\true)->setAutowired(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class))->addTag('container.service_subscriber', ['key' => 'bar', 'id' => \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class]);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber::class)->setPublic(\true);
- $container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class)->setPublic(\false);
+ $container = new ContainerBuilder();
+ $container->register('foo_service', TestServiceSubscriber::class)->setPublic(true)->setAutowired(true)->addArgument(new Reference(ContainerInterface::class))->addTag('container.service_subscriber', ['key' => 'bar', 'id' => TestServiceSubscriber::class]);
+ $container->register(TestServiceSubscriber::class, TestServiceSubscriber::class)->setPublic(true);
+ $container->register(CustomDefinition::class, CustomDefinition::class)->setPublic(false);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_subscriber.php', $dumper->dump());
}
public function testPrivateWithIgnoreOnInvalidReference()
{
require_once self::$fixturesPath . '/includes/classes.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('not_invalid', 'BazClass')->setPublic(\false);
- $container->register('bar', 'BarClass')->setPublic(\true)->addMethodCall('setBaz', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('not_invalid', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
+ $container = new ContainerBuilder();
+ $container->register('not_invalid', 'BazClass')->setPublic(false);
+ $container->register('bar', 'BarClass')->setPublic(true)->addMethodCall('setBaz', [new Reference('not_invalid', SymfonyContainerInterface::IGNORE_ON_INVALID_REFERENCE)]);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference();
+ $container = new Symfony_DI_PhpDumper_Test_Private_With_Ignore_On_Invalid_Reference();
$this->assertInstanceOf('BazClass', $container->get('bar')->getBaz());
}
public function testArrayParameters()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('array_1', [123]);
$container->setParameter('array_2', [__DIR__]);
- $container->register('bar', 'BarClass')->setPublic(\true)->addMethodCall('setBaz', ['%array_1%', '%array_2%', '%%array_1%%', [123]]);
+ $container->register('bar', 'BarClass')->setPublic(true)->addMethodCall('setBaz', ['%array_1%', '%array_2%', '%%array_1%%', [123]]);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $this->assertStringEqualsFile(self::$fixturesPath . '/php/services_array_params.php', \str_replace('\\\\Dumper', '/Dumper', $dumper->dump(['file' => self::$fixturesPath . '/php/services_array_params.php'])));
+ $dumper = new PhpDumper($container);
+ $this->assertStringEqualsFile(self::$fixturesPath . '/php/services_array_params.php', str_replace('\\\\Dumper', '/Dumper', $dumper->dump(['file' => self::$fixturesPath . '/php/services_array_params.php'])));
}
public function testExpressionReferencingPrivateService()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('private_bar', 'stdClass')->setPublic(\false);
- $container->register('private_foo', 'stdClass')->setPublic(\false);
- $container->register('public_foo', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("private_foo").bar'));
+ $container = new ContainerBuilder();
+ $container->register('private_bar', 'stdClass')->setPublic(false);
+ $container->register('private_foo', 'stdClass')->setPublic(false);
+ $container->register('public_foo', 'stdClass')->setPublic(true)->addArgument(new Expression('service("private_foo").bar'));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_private_in_expression.php', $dumper->dump());
}
public function testUninitializedReference()
{
$container = (include self::$fixturesPath . '/containers/container_uninitialized_ref.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_uninitialized_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Uninitialized_Reference']));
require self::$fixturesPath . '/php/services_uninitialized_ref.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Uninitialized_Reference();
+ $container = new Symfony_DI_PhpDumper_Test_Uninitialized_Reference();
$bar = $container->get('bar');
$this->assertNull($bar->foo1);
$this->assertNull($bar->foo2);
@@ -562,18 +600,18 @@ public function testUninitializedReference()
$this->assertNull($bar->closures[0]());
$this->assertNull($bar->closures[1]());
$this->assertNull($bar->closures[2]());
- $this->assertSame([], \iterator_to_array($bar->iter));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Uninitialized_Reference();
+ $this->assertSame([], iterator_to_array($bar->iter));
+ $container = new Symfony_DI_PhpDumper_Test_Uninitialized_Reference();
$container->get('foo1');
$container->get('baz');
$bar = $container->get('bar');
- $this->assertEquals(new \stdClass(), $bar->foo1);
+ $this->assertEquals(new stdClass(), $bar->foo1);
$this->assertNull($bar->foo2);
- $this->assertEquals(new \stdClass(), $bar->foo3);
- $this->assertEquals(new \stdClass(), $bar->closures[0]());
+ $this->assertEquals(new stdClass(), $bar->foo3);
+ $this->assertEquals(new stdClass(), $bar->closures[0]());
$this->assertNull($bar->closures[1]());
- $this->assertEquals(new \stdClass(), $bar->closures[2]());
- $this->assertEquals(['foo1' => new \stdClass(), 'foo3' => new \stdClass()], \iterator_to_array($bar->iter));
+ $this->assertEquals(new stdClass(), $bar->closures[2]());
+ $this->assertEquals(['foo1' => new stdClass(), 'foo3' => new stdClass()], iterator_to_array($bar->iter));
}
/**
* @dataProvider provideAlmostCircular
@@ -582,8 +620,8 @@ public function testAlmostCircular($visibility)
{
$container = (include self::$fixturesPath . '/containers/container_almost_circular.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $container = 'Symfony_DI_PhpDumper_Test_Almost_Circular_' . \ucfirst($visibility);
+ $dumper = new PhpDumper($container);
+ $container = 'Symfony_DI_PhpDumper_Test_Almost_Circular_' . ucfirst($visibility);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_almost_circular_' . $visibility . '.php', $dumper->dump(['class' => $container]));
require self::$fixturesPath . '/php/services_almost_circular_' . $visibility . '.php';
$container = new $container();
@@ -595,12 +633,12 @@ public function testAlmostCircular($visibility)
$foo5 = $container->get('foo5');
$this->assertSame($foo5, $foo5->bar->foo);
$manager = $container->get('manager');
- $this->assertEquals(new \stdClass(), $manager);
+ $this->assertEquals(new stdClass(), $manager);
$manager = $container->get('manager2');
- $this->assertEquals(new \stdClass(), $manager);
+ $this->assertEquals(new stdClass(), $manager);
$foo6 = $container->get('foo6');
$this->assertEquals((object) ['bar6' => (object) []], $foo6);
- $this->assertInstanceOf(\stdClass::class, $container->get('root'));
+ $this->assertInstanceOf(stdClass::class, $container->get('root'));
$manager3 = $container->get('manager3');
$listener3 = $container->get('listener3');
$this->assertSame($manager3, $listener3->manager);
@@ -614,83 +652,83 @@ public function provideAlmostCircular()
}
public function testDeepServiceGraph()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_deep_graph.yml');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dumper->dump();
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_deep_graph.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Deep_Graph']));
require self::$fixturesPath . '/php/services_deep_graph.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Deep_Graph();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\FooForDeepGraph::class, $container->get('foo'));
+ $container = new Symfony_DI_PhpDumper_Test_Deep_Graph();
+ $this->assertInstanceOf(FooForDeepGraph::class, $container->get('foo'));
$this->assertEquals((object) ['p2' => (object) ['p3' => (object) []]], $container->get('foo')->bClone);
}
public function testInlineSelfRef()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $bar = (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\App\\Bar'))->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('_PhpScoper5ea00cc67502b\\App\\Foo'));
- $baz = (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\App\\Baz'))->setProperty('bar', $bar)->addArgument($bar);
- $container->register('_PhpScoper5ea00cc67502b\\App\\Foo')->setPublic(\true)->addArgument($baz);
+ $container = new ContainerBuilder();
+ $bar = (new Definition('_PhpScoper5ea00cc67502b\\App\\Bar'))->setProperty('foo', new Reference('_PhpScoper5ea00cc67502b\\App\\Foo'));
+ $baz = (new Definition('_PhpScoper5ea00cc67502b\\App\\Baz'))->setProperty('bar', $bar)->addArgument($bar);
+ $container->register('_PhpScoper5ea00cc67502b\\App\\Foo')->setPublic(true)->addArgument($baz);
$container->getCompiler()->getPassConfig();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref']));
}
public function testHotPathOptimizations()
{
$container = (include self::$fixturesPath . '/containers/container_inline_requires.php');
- $container->setParameter('inline_requires', \true);
+ $container->setParameter('inline_requires', true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dump = $dumper->dump(['hot_path_tag' => 'container.hot_path', 'inline_class_loader_parameter' => 'inline_requires', 'file' => self::$fixturesPath . '/php/services_inline_requires.php']);
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $dump = \str_replace("'\\\\includes\\\\HotPath\\\\", "'/includes/HotPath/", $dump);
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $dump = str_replace("'\\\\includes\\\\HotPath\\\\", "'/includes/HotPath/", $dump);
}
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_inline_requires.php', $dump);
}
public function testDumpHandlesLiteralClassWithRootNamespace()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', '\\stdClass')->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('foo', '\\stdClass')->setPublic(true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace();
+ $container = new Symfony_DI_PhpDumper_Test_Literal_Class_With_Root_Namespace();
$this->assertInstanceOf('stdClass', $container->get('foo'));
}
public function testDumpHandlesObjectClassNames()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['class' => 'stdClass']));
- $container->setDefinition('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter('class')));
- $container->setDefinition('bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')]))->setPublic(\true);
- $container->setParameter('inline_requires', \true);
+ $container = new ContainerBuilder(new ParameterBag(['class' => 'stdClass']));
+ $container->setDefinition('foo', new Definition(new Parameter('class')));
+ $container->setDefinition('bar', new Definition('stdClass', [new Reference('foo')]))->setPublic(true);
+ $container->setParameter('inline_requires', true);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Object_Class_Name', 'inline_class_loader_parameter' => 'inline_requires']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Object_Class_Name();
+ $container = new Symfony_DI_PhpDumper_Test_Object_Class_Name();
$this->assertInstanceOf('stdClass', $container->get('bar'));
}
public function testUninitializedSyntheticReference()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\true)->setSynthetic(\true);
- $container->register('bar', 'stdClass')->setPublic(\true)->setShared(\false)->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(true)->setSynthetic(true);
+ $container->register('bar', 'stdClass')->setPublic(true)->setShared(false)->setProperty('foo', new Reference('foo', ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_UninitializedSyntheticReference', 'inline_class_loader_parameter' => 'inline_requires']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_UninitializedSyntheticReference();
+ $container = new Symfony_DI_PhpDumper_Test_UninitializedSyntheticReference();
$this->assertEquals((object) ['foo' => null], $container->get('bar'));
$container->set('foo', (object) [123]);
$this->assertEquals((object) ['foo' => (object) [123]], $container->get('bar'));
}
public function testAdawsonContainer()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_adawson.yml');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_adawson.php', $dumper->dump());
}
/**
@@ -706,23 +744,23 @@ public function testAdawsonContainer()
*/
public function testLegacyPrivateServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_legacy_privates.yml');
- $container->setDefinition('private_child', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('foo'));
- $container->setDefinition('private_parent', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ChildDefinition('private'));
- $container->getDefinition('private')->setPrivate(\true);
- $container->getDefinition('private_not_inlined')->setPrivate(\true);
- $container->getDefinition('private_not_removed')->setPrivate(\true);
- $container->getDefinition('decorated_private')->setPrivate(\true);
- $container->getDefinition('private_child')->setPrivate(\true);
- $container->getAlias('decorated_private_alias')->setPrivate(\true);
- $container->getAlias('private_alias')->setPrivate(\true);
- $container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $container->setDefinition('private_child', new ChildDefinition('foo'));
+ $container->setDefinition('private_parent', new ChildDefinition('private'));
+ $container->getDefinition('private')->setPrivate(true);
+ $container->getDefinition('private_not_inlined')->setPrivate(true);
+ $container->getDefinition('private_not_removed')->setPrivate(true);
+ $container->getDefinition('decorated_private')->setPrivate(true);
+ $container->getDefinition('private_child')->setPrivate(true);
+ $container->getAlias('decorated_private_alias')->setPrivate(true);
+ $container->getAlias('private_alias')->setPrivate(true);
+ $container->compile();
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_legacy_privates.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Legacy_Privates', 'file' => self::$fixturesPath . '/php/services_legacy_privates.php']));
require self::$fixturesPath . '/php/services_legacy_privates.php';
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Legacy_Privates();
+ $container = new Symfony_DI_PhpDumper_Test_Legacy_Privates();
$container->get('private');
$container->get('private_alias');
$container->get('alias_to_private');
@@ -742,13 +780,13 @@ public function testLegacyPrivateServices()
*/
public function testPrivateServiceTriggersDeprecation()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\false)->setDeprecated(\true);
- $container->register('bar', 'stdClass')->setPublic(\true)->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'));
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(false)->setDeprecated(true);
+ $container->register('bar', 'stdClass')->setPublic(true)->setProperty('foo', new Reference('foo'));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation();
+ $container = new Symfony_DI_PhpDumper_Test_Private_Service_Triggers_Deprecation();
$container->get('bar');
}
/**
@@ -759,11 +797,11 @@ public function testPrivateServiceTriggersDeprecation()
*/
public function testParameterWithMixedCase()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['Foo' => 'bar', 'BAR' => 'foo']));
+ $container = new ContainerBuilder(new ParameterBag(['Foo' => 'bar', 'BAR' => 'foo']));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case();
+ $container = new Symfony_DI_PhpDumper_Test_Parameter_With_Mixed_Case();
$this->assertSame('bar', $container->getParameter('foo'));
$this->assertSame('bar', $container->getParameter('FOO'));
$this->assertSame('foo', $container->getParameter('bar'));
@@ -775,11 +813,11 @@ public function testParameterWithMixedCase()
*/
public function testParameterWithLowerCase()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']));
+ $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar']));
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case();
+ $container = new Symfony_DI_PhpDumper_Test_Parameter_With_Lower_Case();
$this->assertSame('bar', $container->getParameter('FOO'));
}
/**
@@ -789,49 +827,49 @@ public function testParameterWithLowerCase()
*/
public function testReferenceWithLowerCaseId()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('Bar', 'stdClass')->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'))->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('Bar', 'stdClass')->setProperty('foo', new Reference('foo'))->setPublic(true);
$container->register('Foo', 'stdClass')->setDeprecated();
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id();
+ $container = new Symfony_DI_PhpDumper_Test_Reference_With_Lower_Case_Id();
$this->assertEquals((object) ['foo' => (object) []], $container->get('Bar'));
}
public function testScalarService()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'string')->setPublic(\true)->setFactory([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ScalarFactory::class, 'getSomeValue']);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'string')->setPublic(true)->setFactory([ScalarFactory::class, 'getSomeValue']);
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
eval('?>' . $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Scalar_Service']));
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_Test_Scalar_Service();
+ $container = new Symfony_DI_PhpDumper_Test_Scalar_Service();
$this->assertTrue($container->has('foo'));
$this->assertSame('some value', $container->get('foo'));
}
public function testAliasCanBeFoundInTheDumpedContainerWhenBothTheAliasAndTheServiceArePublic()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'stdClass')->setPublic(\true);
- $container->setAlias('bar', 'foo')->setPublic(\true);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'stdClass')->setPublic(true);
+ $container->setAlias('bar', 'foo')->setPublic(true);
$container->compile();
// Bar is found in the compiled container
$service_ids = $container->getServiceIds();
$this->assertContains('bar', $service_ids);
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$dump = $dumper->dump(['class' => 'Symfony_DI_PhpDumper_AliasesCanBeFoundInTheDumpedContainer']);
eval('?>' . $dump);
- $container = new \_PhpScoper5ea00cc67502b\Symfony_DI_PhpDumper_AliasesCanBeFoundInTheDumpedContainer();
+ $container = new Symfony_DI_PhpDumper_AliasesCanBeFoundInTheDumpedContainer();
// Bar should still be found in the compiled container
$service_ids = $container->getServiceIds();
$this->assertContains('bar', $service_ids);
}
}
-class Rot13EnvVarProcessor implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessorInterface
+class Rot13EnvVarProcessor implements EnvVarProcessorInterface
{
- public function getEnv($prefix, $name, \Closure $getEnv)
+ public function getEnv($prefix, $name, Closure $getEnv)
{
- return \str_rot13($getEnv($name));
+ return str_rot13($getEnv($name));
}
public static function getProvidedTypes()
{
@@ -841,7 +879,7 @@ public static function getProvidedTypes()
class FooForDeepGraph
{
public $bClone;
- public function __construct(\stdClass $a, \stdClass $b)
+ public function __construct(stdClass $a, stdClass $b)
{
// clone to verify that $b has been fully initialized before
$this->bClone = clone $b;
diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/XmlDumperTest.php b/vendor/symfony/dependency-injection/Tests/Dumper/XmlDumperTest.php
index 5e00d2525..60d103b47 100644
--- a/vendor/symfony/dependency-injection/Tests/Dumper/XmlDumperTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Dumper/XmlDumperTest.php
@@ -17,41 +17,48 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class XmlDumperTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use stdClass;
+use function file_get_contents;
+use function realpath;
+use function str_replace;
+use const DIRECTORY_SEPARATOR;
+
+class XmlDumperTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
}
public function testDump()
{
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
+ $dumper = new XmlDumper(new ContainerBuilder());
$this->assertXmlStringEqualsXmlFile(self::$fixturesPath . '/xml/services1.xml', $dumper->dump(), '->dump() dumps an empty container as an empty XML file');
}
public function testExportParameters()
{
$container = (include self::$fixturesPath . '//containers/container8.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $dumper = new XmlDumper($container);
$this->assertXmlStringEqualsXmlFile(self::$fixturesPath . '/xml/services8.xml', $dumper->dump(), '->dump() dumps parameters');
}
public function testAddParameters()
{
$container = (include self::$fixturesPath . '//containers/container8.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $dumper = new XmlDumper($container);
$this->assertXmlStringEqualsXmlFile(self::$fixturesPath . '/xml/services8.xml', $dumper->dump(), '->dump() dumps parameters');
}
public function testAddService()
{
$container = (include self::$fixturesPath . '/containers/container9.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
- $this->assertEquals(\str_replace('%path%', self::$fixturesPath . \DIRECTORY_SEPARATOR . 'includes' . \DIRECTORY_SEPARATOR, \file_get_contents(self::$fixturesPath . '/xml/services9.xml')), $dumper->dump(), '->dump() dumps services');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
- $container->register('foo', 'FooClass')->addArgument(new \stdClass())->setPublic(\true);
+ $dumper = new XmlDumper($container);
+ $this->assertEquals(str_replace('%path%', self::$fixturesPath . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR, file_get_contents(self::$fixturesPath . '/xml/services9.xml')), $dumper->dump(), '->dump() dumps services');
+ $dumper = new XmlDumper($container = new ContainerBuilder());
+ $container->register('foo', 'FooClass')->addArgument(new stdClass())->setPublic(true);
try {
$dumper->dump();
$this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('\\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
$this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
}
@@ -59,7 +66,7 @@ public function testAddService()
public function testDumpAnonymousServices()
{
$container = (include self::$fixturesPath . '/containers/container11.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $dumper = new XmlDumper($container);
$this->assertEquals('
@@ -82,7 +89,7 @@ public function testDumpAnonymousServices()
public function testDumpEntities()
{
$container = (include self::$fixturesPath . '/containers/container12.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $dumper = new XmlDumper($container);
$this->assertEquals("\n\n \n \n \n \n foo<>&bar\n \n \n \n \n\n", $dumper->dump());
}
/**
@@ -90,12 +97,12 @@ public function testDumpEntities()
*/
public function testDumpDecoratedServices($expectedXmlDump, $container)
{
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $dumper = new XmlDumper($container);
$this->assertEquals($expectedXmlDump, $dumper->dump());
}
public function provideDecoratedServicesData()
{
- $fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ $fixturesPath = realpath(__DIR__ . '/../Fixtures/');
return [["\n\n \n \n \n \n \n \n\n", include $fixturesPath . '/containers/container15.php'], ["\n\n \n \n \n \n \n \n\n", include $fixturesPath . '/containers/container16.php']];
}
/**
@@ -106,7 +113,7 @@ public function testCompiledContainerCanBeDumped($containerFile)
$fixturesPath = __DIR__ . '/../Fixtures';
$container = (require $fixturesPath . '/containers/' . $containerFile . '.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $dumper = new XmlDumper($container);
$dumper->dump();
$this->addToAssertionCount(1);
}
@@ -117,28 +124,28 @@ public function provideCompiledContainerData()
public function testDumpInlinedServices()
{
$container = (include self::$fixturesPath . '/containers/container21.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
- $this->assertEquals(\file_get_contents(self::$fixturesPath . '/xml/services21.xml'), $dumper->dump());
+ $dumper = new XmlDumper($container);
+ $this->assertEquals(file_get_contents(self::$fixturesPath . '/xml/services21.xml'), $dumper->dump());
}
public function testDumpAutowireData()
{
$container = (include self::$fixturesPath . '/containers/container24.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
- $this->assertEquals(\file_get_contents(self::$fixturesPath . '/xml/services24.xml'), $dumper->dump());
+ $dumper = new XmlDumper($container);
+ $this->assertEquals(file_get_contents(self::$fixturesPath . '/xml/services24.xml'), $dumper->dump());
}
public function testDumpLoad()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_dump_load.xml');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)], $container->getDefinition('foo')->getArguments());
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
+ $this->assertEquals([new Reference('bar', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)], $container->getDefinition('foo')->getArguments());
+ $dumper = new XmlDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/xml/services_dump_load.xml', $dumper->dump());
}
public function testDumpAbstractServices()
{
$container = (include self::$fixturesPath . '/containers/container_abstract.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\XmlDumper($container);
- $this->assertEquals(\file_get_contents(self::$fixturesPath . '/xml/services_abstract.xml'), $dumper->dump());
+ $dumper = new XmlDumper($container);
+ $this->assertEquals(file_get_contents(self::$fixturesPath . '/xml/services_abstract.xml'), $dumper->dump());
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/YamlDumperTest.php b/vendor/symfony/dependency-injection/Tests/Dumper/YamlDumperTest.php
index a4ecc317e..ba5d7f186 100644
--- a/vendor/symfony/dependency-injection/Tests/Dumper/YamlDumperTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Dumper/YamlDumperTest.php
@@ -20,35 +20,42 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Parser;
use _PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml;
-class YamlDumperTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use stdClass;
+use function file_get_contents;
+use function realpath;
+use function str_replace;
+use const DIRECTORY_SEPARATOR;
+
+class YamlDumperTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
}
public function testDump()
{
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
- $this->assertEqualYamlStructure(\file_get_contents(self::$fixturesPath . '/yaml/services1.yml'), $dumper->dump(), '->dump() dumps an empty container as an empty YAML file');
+ $dumper = new YamlDumper($container = new ContainerBuilder());
+ $this->assertEqualYamlStructure(file_get_contents(self::$fixturesPath . '/yaml/services1.yml'), $dumper->dump(), '->dump() dumps an empty container as an empty YAML file');
}
public function testAddParameters()
{
$container = (include self::$fixturesPath . '/containers/container8.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container);
- $this->assertEqualYamlStructure(\file_get_contents(self::$fixturesPath . '/yaml/services8.yml'), $dumper->dump(), '->dump() dumps parameters');
+ $dumper = new YamlDumper($container);
+ $this->assertEqualYamlStructure(file_get_contents(self::$fixturesPath . '/yaml/services8.yml'), $dumper->dump(), '->dump() dumps parameters');
}
public function testAddService()
{
$container = (include self::$fixturesPath . '/containers/container9.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container);
- $this->assertEqualYamlStructure(\str_replace('%path%', self::$fixturesPath . \DIRECTORY_SEPARATOR . 'includes' . \DIRECTORY_SEPARATOR, \file_get_contents(self::$fixturesPath . '/yaml/services9.yml')), $dumper->dump(), '->dump() dumps services');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
- $container->register('foo', 'FooClass')->addArgument(new \stdClass())->setPublic(\true);
+ $dumper = new YamlDumper($container);
+ $this->assertEqualYamlStructure(str_replace('%path%', self::$fixturesPath . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR, file_get_contents(self::$fixturesPath . '/yaml/services9.yml')), $dumper->dump(), '->dump() dumps services');
+ $dumper = new YamlDumper($container = new ContainerBuilder());
+ $container->register('foo', 'FooClass')->addArgument(new stdClass())->setPublic(true);
try {
$dumper->dump();
$this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('\\RuntimeException', $e, '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
$this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
}
@@ -56,28 +63,28 @@ public function testAddService()
public function testDumpAutowireData()
{
$container = (include self::$fixturesPath . '/containers/container24.php');
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container);
+ $dumper = new YamlDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/yaml/services24.yml', $dumper->dump());
}
public function testDumpLoad()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_dump_load.yml');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)], $container->getDefinition('foo')->getArguments());
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container);
+ $this->assertEquals([new Reference('bar', ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)], $container->getDefinition('foo')->getArguments());
+ $dumper = new YamlDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/yaml/services_dump_load.yml', $dumper->dump());
}
public function testInlineServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->register('foo', 'Class1')->setPublic(\true)->addArgument((new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Class2'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Class2')));
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container);
+ $container = new ContainerBuilder();
+ $container->register('foo', 'Class1')->setPublic(true)->addArgument((new Definition('Class2'))->addArgument(new Definition('Class2')));
+ $dumper = new YamlDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/yaml/services_inline.yml', $dumper->dump());
}
private function assertEqualYamlStructure($expected, $yaml, $message = '')
{
- $parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Parser();
- $this->assertEquals($parser->parse($expected, \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml::PARSE_CUSTOM_TAGS), $parser->parse($yaml, \_PhpScoper5ea00cc67502b\Symfony\Component\Yaml\Yaml::PARSE_CUSTOM_TAGS), $message);
+ $parser = new Parser();
+ $this->assertEquals($parser->parse($expected, Yaml::PARSE_CUSTOM_TAGS), $parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS), $message);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/index.php b/vendor/symfony/dependency-injection/Tests/Dumper/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Dumper/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/EnvVarProcessorTest.php b/vendor/symfony/dependency-injection/Tests/EnvVarProcessorTest.php
index 3b1bc2597..745b08f79 100644
--- a/vendor/symfony/dependency-injection/Tests/EnvVarProcessorTest.php
+++ b/vendor/symfony/dependency-injection/Tests/EnvVarProcessorTest.php
@@ -6,7 +6,11 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor;
-class EnvVarProcessorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function base64_encode;
+use function json_encode;
+use const E_ERROR;
+
+class EnvVarProcessorTest extends TestCase
{
const TEST_CONST = 'test';
/**
@@ -14,10 +18,10 @@ class EnvVarProcessorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\Tes
*/
public function testGetEnvString($value, $processed)
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('env(foo)', $value);
$container->compile();
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor($container);
+ $processor = new EnvVarProcessor($container);
$result = $processor->getEnv('string', 'foo', function () {
$this->fail('Should not be called');
});
@@ -32,7 +36,7 @@ public function validStrings()
*/
public function testGetEnvBool($value, $processed)
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$result = $processor->getEnv('bool', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -41,14 +45,14 @@ public function testGetEnvBool($value, $processed)
}
public function validBools()
{
- return [['true', \true], ['false', \false], ['null', \false], ['1', \true], ['0', \false], ['1.1', \true], ['1e1', \true]];
+ return [['true', true], ['false', false], ['null', false], ['1', true], ['0', false], ['1.1', true], ['1e1', true]];
}
/**
* @dataProvider validInts
*/
public function testGetEnvInt($value, $processed)
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$result = $processor->getEnv('int', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -66,7 +70,7 @@ public function testGetEnvIntInvalid($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Non-numeric env var');
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$processor->getEnv('int', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -81,7 +85,7 @@ public function invalidInts()
*/
public function testGetEnvFloat($value, $processed)
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$result = $processor->getEnv('float', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -99,7 +103,7 @@ public function testGetEnvFloatInvalid($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Non-numeric env var');
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$processor->getEnv('float', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -114,7 +118,7 @@ public function invalidFloats()
*/
public function testGetEnvConst($value, $processed)
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$result = $processor->getEnv('const', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -123,7 +127,7 @@ public function testGetEnvConst($value, $processed)
}
public function validConsts()
{
- return [['Symfony\\Component\\DependencyInjection\\Tests\\EnvVarProcessorTest::TEST_CONST', self::TEST_CONST], ['E_ERROR', \E_ERROR]];
+ return [['Symfony\\Component\\DependencyInjection\\Tests\\EnvVarProcessorTest::TEST_CONST', self::TEST_CONST], ['E_ERROR', E_ERROR]];
}
/**
* @dataProvider invalidConsts
@@ -132,7 +136,7 @@ public function testGetEnvConstInvalid($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('undefined constant');
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$processor->getEnv('const', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
return $value;
@@ -144,19 +148,19 @@ public function invalidConsts()
}
public function testGetEnvBase64()
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$result = $processor->getEnv('base64', 'foo', function ($name) {
$this->assertSame('foo', $name);
- return \base64_encode('hello');
+ return base64_encode('hello');
});
$this->assertSame('hello', $result);
}
public function testGetEnvJson()
{
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$result = $processor->getEnv('json', 'foo', function ($name) {
$this->assertSame('foo', $name);
- return \json_encode([1]);
+ return json_encode([1]);
});
$this->assertSame([1], $result);
}
@@ -164,7 +168,7 @@ public function testGetEnvInvalidJson()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Syntax error');
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$processor->getEnv('json', 'foo', function ($name) {
$this->assertSame('foo', $name);
return 'invalid_json';
@@ -177,21 +181,21 @@ public function testGetEnvJsonOther($value)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Invalid JSON env var');
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$processor->getEnv('json', 'foo', function ($name) use($value) {
$this->assertSame('foo', $name);
- return \json_encode($value);
+ return json_encode($value);
});
}
public function otherJsonValues()
{
- return [[1], [1.1], [\true], [\false]];
+ return [[1], [1.1], [true], [false]];
}
public function testGetEnvUnknown()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('Unsupported env var prefix');
- $processor = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\EnvVarProcessor(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container());
+ $processor = new EnvVarProcessor(new Container());
$processor->getEnv('unknown', 'foo', function ($name) {
$this->assertSame('foo', $name);
return 'foo';
diff --git a/vendor/symfony/dependency-injection/Tests/Extension/ExtensionTest.php b/vendor/symfony/dependency-injection/Tests/Extension/ExtensionTest.php
index 32349b4bc..5736dd68c 100644
--- a/vendor/symfony/dependency-injection/Tests/Extension/ExtensionTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Extension/ExtensionTest.php
@@ -13,34 +13,34 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension;
-class ExtensionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ExtensionTest extends TestCase
{
/**
* @dataProvider getResolvedEnabledFixtures
*/
public function testIsConfigEnabledReturnsTheResolvedValue($enabled)
{
- $extension = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Extension\EnableableExtension();
- $this->assertSame($enabled, $extension->isConfigEnabled(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), ['enabled' => $enabled]));
+ $extension = new EnableableExtension();
+ $this->assertSame($enabled, $extension->isConfigEnabled(new ContainerBuilder(), ['enabled' => $enabled]));
}
public function getResolvedEnabledFixtures()
{
- return [[\true], [\false]];
+ return [[true], [false]];
}
public function testIsConfigEnabledOnNonEnableableConfig()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The config array has no \'enabled\' key.');
- $extension = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Extension\EnableableExtension();
- $extension->isConfigEnabled(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), []);
+ $extension = new EnableableExtension();
+ $extension->isConfigEnabled(new ContainerBuilder(), []);
}
}
-class EnableableExtension extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\Extension
+class EnableableExtension extends Extension
{
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
}
- public function isConfigEnabled(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container, array $config)
+ public function isConfigEnabled(ContainerBuilder $container, array $config)
{
return parent::isConfigEnabled($container, $config);
}
diff --git a/vendor/symfony/dependency-injection/Tests/Extension/index.php b/vendor/symfony/dependency-injection/Tests/Extension/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Extension/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Bar.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Bar.php
index 65861af98..6553a13ad 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/Bar.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Bar.php
@@ -10,14 +10,16 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
-class Bar implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface
+use _PhpScoper5ea00cc67502b\NonExistent;
+
+class Bar implements BarInterface
{
public $quz;
- public function __construct($quz = null, \_PhpScoper5ea00cc67502b\NonExistent $nonExistent = null, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface $decorated = null, array $foo = [])
+ public function __construct($quz = null, NonExistent $nonExistent = null, BarInterface $decorated = null, array $foo = [])
{
$this->quz = $quz;
}
- public static function create(\_PhpScoper5ea00cc67502b\NonExistent $nonExistent = null, $factory = null)
+ public static function create(NonExistent $nonExistent = null, $factory = null)
{
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Container/NoConstructorContainer.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Container/NoConstructorContainer.php
index 9b69a47ee..2c35c7034 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/Container/NoConstructorContainer.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Container/NoConstructorContainer.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Container;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
-class NoConstructorContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class NoConstructorContainer extends Container
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Container/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Container/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Container/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/CustomDefinition.php b/vendor/symfony/dependency-injection/Tests/Fixtures/CustomDefinition.php
index 3fdf8892d..d46526bc3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/CustomDefinition.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/CustomDefinition.php
@@ -11,6 +11,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-class CustomDefinition extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition
+class CustomDefinition extends Definition
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/DeprecatedClass.php b/vendor/symfony/dependency-injection/Tests/Fixtures/DeprecatedClass.php
index 524ca801c..a656e9b7d 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/DeprecatedClass.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/DeprecatedClass.php
@@ -10,7 +10,10 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
-@\trigger_error('deprecated', \E_USER_DEPRECATED);
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
+@trigger_error('deprecated', E_USER_DEPRECATED);
class DeprecatedClass
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummy.php b/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummy.php
index 89ebd4d63..139c3cce4 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummy.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummy.php
@@ -10,12 +10,14 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
-class FactoryDummy extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryParent
+use stdClass;
+
+class FactoryDummy extends FactoryParent
{
- public static function createFactory() : \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy
+ public static function createFactory() : FactoryDummy
{
}
- public function create() : \stdClass
+ public function create() : stdClass
{
}
// Not supported by hhvm
@@ -32,6 +34,6 @@ public static function createParent() : \_PhpScoper5ea00cc67502b\parent
class FactoryParent
{
}
-function factoryFunction() : \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummy
+function factoryFunction() : FactoryDummy
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php b/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php
index 51e3ebb7f..84536daa5 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php
@@ -10,9 +10,11 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
+use stdClass;
+
class FooForCircularWithAddCalls
{
- public function call(\stdClass $argument)
+ public function call(stdClass $argument)
{
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/NamedArgumentsDummy.php b/vendor/symfony/dependency-injection/Tests/Fixtures/NamedArgumentsDummy.php
index 281a688dc..a0186cc3e 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/NamedArgumentsDummy.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/NamedArgumentsDummy.php
@@ -7,13 +7,13 @@
*/
class NamedArgumentsDummy
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass $c, $apiKey, $hostName)
+ public function __construct(CaseSensitiveClass $c, $apiKey, $hostName)
{
}
public function setApiKey($apiKey)
{
}
- public function setSensitiveClass(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass $c)
+ public function setSensitiveClass(CaseSensitiveClass $c)
{
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/ParentNotExists.php b/vendor/symfony/dependency-injection/Tests/Fixtures/ParentNotExists.php
index 356610961..df7098f78 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/ParentNotExists.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/ParentNotExists.php
@@ -2,6 +2,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
-class ParentNotExists extends \_PhpScoper5ea00cc67502b\NotExists
+use _PhpScoper5ea00cc67502b\NotExists;
+
+class ParentNotExists extends NotExists
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php
index d7265a2cb..2ac7b55b7 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/MissingParent.php
@@ -2,6 +2,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses;
-class MissingParent extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingClass
+class MissingParent extends MissingClass
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/BadClasses/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Foo.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Foo.php
index 318831c01..2fbb1fceb 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Foo.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Foo.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype;
-class Foo implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\FooInterface, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\BarInterface
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\BarInterface;
+
+class Foo implements FooInterface, BarInterface
{
public function __construct($bar = null)
{
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/AnotherSub/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/AnotherSub/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/AnotherSub/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir1/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir1/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir1/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir2/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir2/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/Dir2/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component1/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir1/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir1/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir1/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir2/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir2/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/Dir2/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/Component2/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/OtherDir/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/Bar.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/Bar.php
index cdfd5293d..864c6a987 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/Bar.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/Bar.php
@@ -2,6 +2,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub;
-class Bar implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\BarInterface
+class Bar implements BarInterface
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/Sub/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/Prototype/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/SimilarArgumentsDummy.php b/vendor/symfony/dependency-injection/Tests/Fixtures/SimilarArgumentsDummy.php
index 1d029a763..e4516d850 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/SimilarArgumentsDummy.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/SimilarArgumentsDummy.php
@@ -14,7 +14,7 @@ class SimilarArgumentsDummy
{
public $class1;
public $class2;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass $class1, $token, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass $class2)
+ public function __construct(CaseSensitiveClass $class1, $token, CaseSensitiveClass $class2)
{
$this->class1 = $class1;
$this->class2 = $class2;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/StubbedTranslator.php b/vendor/symfony/dependency-injection/Tests/Fixtures/StubbedTranslator.php
index 9b11185e6..6a9f1eb0f 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/StubbedTranslator.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/StubbedTranslator.php
@@ -16,7 +16,7 @@
*/
class StubbedTranslator
{
- public function __construct(\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface $container)
+ public function __construct(ContainerInterface $container)
{
}
public function addResource($format, $resource, $locale, $domain = null)
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php b/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php
index c9bb56dd6..8875d9283 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php
@@ -11,6 +11,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-class TestDefinition1 extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition
+class TestDefinition1 extends Definition
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition2.php b/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition2.php
index cbcf5deb7..c411b6cda 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition2.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition2.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-class TestDefinition2 extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition
+class TestDefinition2 extends Definition
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/TestServiceSubscriber.php b/vendor/symfony/dependency-injection/Tests/Fixtures/TestServiceSubscriber.php
index 136cc9a3b..f5cdc2dcf 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/TestServiceSubscriber.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/TestServiceSubscriber.php
@@ -3,13 +3,13 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
-class TestServiceSubscriber implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface
+class TestServiceSubscriber implements ServiceSubscriberInterface
{
public function __construct($container)
{
}
public static function getSubscribedServices()
{
- return [__CLASS__, '?' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, 'bar' => \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class, 'baz' => '?' . \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition::class];
+ return [__CLASS__, '?' . CustomDefinition::class, 'bar' => CustomDefinition::class, 'baz' => '?' . CustomDefinition::class];
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/basic.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/basic.php
index 252eec68c..7427bb0cb 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/basic.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/basic.php
@@ -3,7 +3,7 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
use _PhpScoper5ea00cc67502b\App\BarService;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
+return function (ContainerConfigurator $c) {
$s = $c->services();
- $s->set(\_PhpScoper5ea00cc67502b\App\BarService::class)->args([inline('FooClass')]);
+ $s->set(BarService::class)->args([inline('FooClass')]);
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/child.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/child.php
index a7fa866cb..4c3897fce 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/child.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/child.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
use _PhpScoper5ea00cc67502b\App\BarService;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
- $c->services()->set('bar', 'Class1')->set(\_PhpScoper5ea00cc67502b\App\BarService::class)->abstract(\true)->lazy()->set('foo')->parent(\_PhpScoper5ea00cc67502b\App\BarService::class)->decorate('bar', 'b', 1)->args([ref('b')])->class('Class2')->file('file.php')->parent('bar')->parent(\_PhpScoper5ea00cc67502b\App\BarService::class);
+return function (ContainerConfigurator $c) {
+ $c->services()->set('bar', 'Class1')->set(BarService::class)->abstract(true)->lazy()->set('foo')->parent(BarService::class)->decorate('bar', 'b', 1)->args([ref('b')])->class('Class2')->file('file.php')->parent('bar')->parent(BarService::class);
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/defaults.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/defaults.php
index 77f0965d9..040eb00e6 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/defaults.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/defaults.php
@@ -3,9 +3,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
+return function (ContainerConfigurator $c) {
$c->import('basic.php');
- $s = $c->services()->defaults()->public()->private()->autoconfigure()->autowire()->tag('t', ['a' => 'b'])->bind(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class, ref('bar'))->private();
- $s->set(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class)->args([ref('bar')])->public();
- $s->set('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class)->call('setFoo')->autoconfigure(\false);
+ $s = $c->services()->defaults()->public()->private()->autoconfigure()->autowire()->tag('t', ['a' => 'b'])->bind(Foo::class, ref('bar'))->private();
+ $s->set(Foo::class)->args([ref('bar')])->public();
+ $s->set('bar', Foo::class)->call('setFoo')->autoconfigure(false);
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/factory_short_notation.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/factory_short_notation.php
index 27ec3bb8a..045cb0a48 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/factory_short_notation.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/factory_short_notation.php
@@ -2,6 +2,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
- $c->services()->set('service', \stdClass::class)->factory('factory:method');
+use stdClass;
+
+return function (ContainerConfigurator $c) {
+ $c->services()->set('service', stdClass::class)->factory('factory:method');
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.php
index 605548b66..61b32cf27 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.php
@@ -4,9 +4,11 @@
use _PhpScoper5ea00cc67502b\App\FooService;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
+
+return function (ContainerConfigurator $c) {
$s = $c->services();
- $s->instanceof(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class)->property('p', 0)->call('setFoo', [ref('foo')])->tag('tag', ['k' => 'v'])->share(\false)->lazy()->configurator('c')->property('p', 1);
- $s->load(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype::class . '\\', '../Prototype')->exclude('../Prototype/*/*');
- $s->set('foo', \_PhpScoper5ea00cc67502b\App\FooService::class);
+ $s->instanceof(Foo::class)->property('p', 0)->call('setFoo', [ref('foo')])->tag('tag', ['k' => 'v'])->share(false)->lazy()->configurator('c')->property('p', 1);
+ $s->load(Prototype::class . '\\', '../Prototype')->exclude('../Prototype/*/*');
+ $s->set('foo', FooService::class);
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/php7.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/php7.php
index 54291fa5b..af3c2df41 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/php7.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/php7.php
@@ -3,7 +3,7 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
+return function (ContainerConfigurator $c) {
$c->parameters()('foo', 'Foo')('bar', 'Bar');
- $c->services()(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class)->arg('$bar', ref('bar'))->public()('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class)->call('setFoo');
+ $c->services()(Foo::class)->arg('$bar', ref('bar'))->public()('bar', Foo::class)->call('setFoo');
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.php
index fe228e7b7..cdb5c20ef 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.php
@@ -3,9 +3,11 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
+
+return function (ContainerConfigurator $c) {
$di = $c->services()->defaults()->tag('baz');
- $di->load(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype::class . '\\', '../Prototype')->autoconfigure()->exclude('../Prototype/{OtherDir,BadClasses}')->factory('f')->deprecate('%service_id%')->args([0])->args([1])->autoconfigure(\false)->tag('foo')->parent('foo');
+ $di->load(Prototype::class . '\\', '../Prototype')->autoconfigure()->exclude('../Prototype/{OtherDir,BadClasses}')->factory('f')->deprecate('%service_id%')->args([0])->args([1])->autoconfigure(false)->tag('foo')->parent('foo');
$di->set('foo')->lazy()->abstract();
- $di->get(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class)->lazy(\false);
+ $di->get(Foo::class)->lazy(false);
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/services9.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/services9.php
index 1729a3efb..c1a7b2422 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/services9.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/services9.php
@@ -4,18 +4,20 @@
use _PhpScoper5ea00cc67502b\Bar\FooClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter;
+use function realpath;
+
require_once __DIR__ . '/../includes/classes.php';
require_once __DIR__ . '/../includes/foo.php';
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
+return function (ContainerConfigurator $c) {
$p = $c->parameters();
$p->set('baz_class', 'BazClass');
- $p->set('foo_class', \_PhpScoper5ea00cc67502b\Bar\FooClass::class)->set('foo', 'bar');
+ $p->set('foo_class', FooClass::class)->set('foo', 'bar');
$s = $c->services();
- $s->set('foo')->args(['foo', ref('foo.baz'), ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'], \true, ref('service_container')])->class(\_PhpScoper5ea00cc67502b\Bar\FooClass::class)->tag('foo', ['foo' => 'foo'])->tag('foo', ['bar' => 'bar', 'baz' => 'baz'])->factory([\_PhpScoper5ea00cc67502b\Bar\FooClass::class, 'getInstance'])->property('foo', 'bar')->property('moo', ref('foo.baz'))->property('qux', ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'])->call('setBar', [ref('bar')])->call('initialize')->configurator('sc_configure');
+ $s->set('foo')->args(['foo', ref('foo.baz'), ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'], true, ref('service_container')])->class(FooClass::class)->tag('foo', ['foo' => 'foo'])->tag('foo', ['bar' => 'bar', 'baz' => 'baz'])->factory([FooClass::class, 'getInstance'])->property('foo', 'bar')->property('moo', ref('foo.baz'))->property('qux', ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'])->call('setBar', [ref('bar')])->call('initialize')->configurator('sc_configure');
$s->set('foo.baz', '%baz_class%')->factory(['%baz_class%', 'getInstance'])->configurator(['%baz_class%', 'configureStatic1']);
- $s->set('bar', \_PhpScoper5ea00cc67502b\Bar\FooClass::class)->args(['foo', ref('foo.baz'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter('foo_bar')])->configurator([ref('foo.baz'), 'configure']);
- $s->set('foo_bar', '%foo_class%')->args([ref('deprecated_service')])->share(\false);
- $s->set('method_call1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->file(\realpath(__DIR__ . '/../includes/foo.php'))->call('setBar', [ref('foo')])->call('setBar', [ref('foo2')->nullOnInvalid()])->call('setBar', [ref('foo3')->ignoreOnInvalid()])->call('setBar', [ref('foobaz')->ignoreOnInvalid()])->call('setBar', [expr('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]);
+ $s->set('bar', FooClass::class)->args(['foo', ref('foo.baz'), new Parameter('foo_bar')])->configurator([ref('foo.baz'), 'configure']);
+ $s->set('foo_bar', '%foo_class%')->args([ref('deprecated_service')])->share(false);
+ $s->set('method_call1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->file(realpath(__DIR__ . '/../includes/foo.php'))->call('setBar', [ref('foo')])->call('setBar', [ref('foo2')->nullOnInvalid()])->call('setBar', [ref('foo3')->ignoreOnInvalid()])->call('setBar', [ref('foobaz')->ignoreOnInvalid()])->call('setBar', [expr('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]);
$s->set('foo_with_inline', 'Foo')->call('setBar', [ref('inlined')]);
$s->set('inlined', 'Bar')->property('pub', 'pub')->call('setBaz', [ref('baz')])->private();
$s->set('baz', 'Baz')->call('setFoo', [ref('foo_with_inline')]);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/services_autoconfigure_with_parent.php b/vendor/symfony/dependency-injection/Tests/Fixtures/config/services_autoconfigure_with_parent.php
index 8119eadf2..51fb7eaa3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/services_autoconfigure_with_parent.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/services_autoconfigure_with_parent.php
@@ -2,6 +2,8 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator;
-return function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $c) {
- $c->services()->set('parent_service', \stdClass::class)->set('child_service')->parent('parent_service')->autoconfigure(\true);
+use stdClass;
+
+return function (ContainerConfigurator $c) {
+ $c->services()->set('parent_service', stdClass::class)->set('child_service')->parent('parent_service')->autoconfigure(true);
};
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/CustomContainer.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/CustomContainer.php
index 5ee7f3c4d..9e41e09f3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/CustomContainer.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/CustomContainer.php
@@ -4,7 +4,7 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-class CustomContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class CustomContainer extends Container
{
public function getBarService()
{
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container10.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container10.php
index 7aebb34e3..b090bf154 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container10.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container10.php
@@ -5,6 +5,6 @@
require_once __DIR__ . '/../includes/classes.php';
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', 'FooClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'))->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', 'FooClass')->addArgument(new Reference('bar'))->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container11.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container11.php
index c66adf959..b4828a29d 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container11.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container11.php
@@ -4,6 +4,6 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', 'FooClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BarClass', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('BazClass')]))->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', 'FooClass')->addArgument(new Definition('BarClass', [new Definition('BazClass')]))->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container12.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container12.php
index 849ea332e..479db0023 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container12.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container12.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', '_PhpScoper5ea00cc67502b\\FooClass\\Foo')->addArgument('foo<>&bar')->addTag('_PhpScoper5ea00cc67502b\\foo"bar\\bar', ['foo' => 'foo"barřž€'])->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', '_PhpScoper5ea00cc67502b\\FooClass\\Foo')->addArgument('foo<>&bar')->addTag('_PhpScoper5ea00cc67502b\\foo"bar\\bar', ['foo' => 'foo"barřž€'])->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container13.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container13.php
index 5b7fa14c5..88aabc082 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container13.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container13.php
@@ -4,8 +4,8 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', 'FooClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'))->setPublic(\true);
-$container->register('bar', 'BarClass')->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', 'FooClass')->addArgument(new Reference('bar'))->setPublic(true);
+$container->register('bar', 'BarClass')->setPublic(true);
$container->compile();
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container14.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container14.php
index 6e31168dc..f351c632b 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container14.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container14.php
@@ -3,13 +3,15 @@
namespace _PhpScoper5ea00cc67502b\Container14;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
+use function class_exists;
+
/*
* This file is included in Tests\Dumper\GraphvizDumperTest::testDumpWithFrozenCustomClassContainer
* and Tests\Dumper\XmlDumperTest::testCompiledContainerCanBeDumped.
*/
-if (!\class_exists('_PhpScoper5ea00cc67502b\\Container14\\ProjectServiceContainer')) {
- class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder
+if (!class_exists('_PhpScoper5ea00cc67502b\\Container14\\ProjectServiceContainer')) {
+ class ProjectServiceContainer extends ContainerBuilder
{
}
}
-return new \_PhpScoper5ea00cc67502b\Container14\ProjectServiceContainer();
+return new ProjectServiceContainer();
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container15.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container15.php
index f83df887b..a18c355b1 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container15.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container15.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', '_PhpScoper5ea00cc67502b\\FooClass\\Foo')->setDecoratedService('bar', 'bar.woozy')->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', '_PhpScoper5ea00cc67502b\\FooClass\\Foo')->setDecoratedService('bar', 'bar.woozy')->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container16.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container16.php
index 74b2f61d4..ee3c53d8c 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container16.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container16.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', '_PhpScoper5ea00cc67502b\\FooClass\\Foo')->setDecoratedService('bar')->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', '_PhpScoper5ea00cc67502b\\FooClass\\Foo')->setDecoratedService('bar')->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container17.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container17.php
index eaf2d4ee9..c75741c77 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container17.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container17.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', '%foo.class%')->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', '%foo.class%')->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container19.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container19.php
index 590c6aab2..97e2e32ef 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container19.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container19.php
@@ -5,11 +5,11 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
require_once __DIR__ . '/../includes/classes.php';
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+$container = new ContainerBuilder();
$container->setParameter('env(FOO)', '_PhpScoper5ea00cc67502b\\Bar\\FaooClass');
$container->setParameter('foo', '%env(FOO)%');
-$container->register('service_from_anonymous_factory', '%foo%')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('%foo%'), 'getInstance'])->setPublic(\true);
-$anonymousServiceWithFactory = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass');
+$container->register('service_from_anonymous_factory', '%foo%')->setFactory([new Definition('%foo%'), 'getInstance'])->setPublic(true);
+$anonymousServiceWithFactory = new Definition('_PhpScoper5ea00cc67502b\\Bar\\FooClass');
$anonymousServiceWithFactory->setFactory('Bar\\FooClass::getInstance');
-$container->register('service_with_method_call_and_factory', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addMethodCall('setBar', [$anonymousServiceWithFactory])->setPublic(\true);
+$container->register('service_with_method_call_and_factory', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addMethodCall('setBar', [$anonymousServiceWithFactory])->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container21.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container21.php
index 974814b91..ffe5e6496 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container21.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container21.php
@@ -4,10 +4,10 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$bar = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Bar');
-$bar->setConfigurator([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Baz'), 'configureBar']);
-$fooFactory = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('FooFactory');
-$fooFactory->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('Foobar'), 'createFooFactory']);
-$container->register('foo', 'Foo')->setFactory([$fooFactory, 'createFoo'])->setConfigurator([$bar, 'configureFoo'])->setPublic(\true);
+$container = new ContainerBuilder();
+$bar = new Definition('Bar');
+$bar->setConfigurator([new Definition('Baz'), 'configureBar']);
+$fooFactory = new Definition('FooFactory');
+$fooFactory->setFactory([new Definition('Foobar'), 'createFooFactory']);
+$container->register('foo', 'Foo')->setFactory([$fooFactory, 'createFoo'])->setConfigurator([$bar, 'configureFoo'])->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container24.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container24.php
index d07ba70d6..5d23b8002 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container24.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container24.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', 'Foo')->setAutowired(\true)->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', 'Foo')->setAutowired(true)->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container33.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container33.php
index 8f155c3e1..1bc207d0c 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container33.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container33.php
@@ -2,8 +2,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Container33;
+use _PhpScoper5ea00cc67502b\Bar\Foo;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register(\_PhpScoper5ea00cc67502b\Foo\Foo::class)->setPublic(\true);
-$container->register(\_PhpScoper5ea00cc67502b\Bar\Foo::class)->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register(\_PhpScoper5ea00cc67502b\Foo\Foo::class)->setPublic(true);
+$container->register(Foo::class)->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container8.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container8.php
index edb43c928..7f952a0b7 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container8.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container8.php
@@ -4,5 +4,5 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => '%baz%', 'baz' => 'bar', 'bar' => 'foo is %%foo bar', 'escape' => '@escapeme', 'values' => [\true, \false, null, 0, 1000.3, 'true', 'false', 'null'], 'null string' => 'null', 'string of digits' => '123', 'string of digits prefixed with minus character' => '-123', 'true string' => 'true', 'false string' => 'false', 'binary number string' => '0b0110', 'numeric string' => '-1.2E2', 'hexadecimal number string' => '0xFF', 'float string' => '10100.1', 'positive float string' => '+10100.1', 'negative float string' => '-10100.1']));
+$container = new ContainerBuilder(new ParameterBag(['foo' => '%baz%', 'baz' => 'bar', 'bar' => 'foo is %%foo bar', 'escape' => '@escapeme', 'values' => [true, false, null, 0, 1000.3, 'true', 'false', 'null'], 'null string' => 'null', 'string of digits' => '123', 'string of digits prefixed with minus character' => '-123', 'true string' => 'true', 'false string' => 'false', 'binary number string' => '0b0110', 'numeric string' => '-1.2E2', 'hexadecimal number string' => '0xFF', 'float string' => '10100.1', 'positive float string' => '+10100.1', 'negative float string' => '-10100.1']));
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container9.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container9.php
index 4cedc76d2..2f4195118 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container9.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container9.php
@@ -11,36 +11,38 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addTag('foo', ['foo' => 'foo'])->addTag('foo', ['bar' => 'bar', 'baz' => 'baz'])->setFactory(['_PhpScoper5ea00cc67502b\\Bar\\FooClass', 'getInstance'])->setArguments(['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'], \true, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container')])->setProperties(['foo' => 'bar', 'moo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), 'qux' => ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%']])->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar')])->addMethodCall('initialize')->setConfigurator('sc_configure')->setPublic(\true);
-$container->register('foo.baz', '%baz_class%')->setFactory(['%baz_class%', 'getInstance'])->setConfigurator(['%baz_class%', 'configureStatic1'])->setPublic(\true);
-$container->register('bar', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setArguments(['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter('foo_bar')])->setConfigurator([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), 'configure'])->setPublic(\true);
-$container->register('foo_bar', '%foo_class%')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('deprecated_service'))->setShared(\false)->setPublic(\true);
+use function realpath;
+
+$container = new ContainerBuilder();
+$container->register('foo', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->addTag('foo', ['foo' => 'foo'])->addTag('foo', ['bar' => 'bar', 'baz' => 'baz'])->setFactory(['_PhpScoper5ea00cc67502b\\Bar\\FooClass', 'getInstance'])->setArguments(['foo', new Reference('foo.baz'), ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%'], true, new Reference('service_container')])->setProperties(['foo' => 'bar', 'moo' => new Reference('foo.baz'), 'qux' => ['%foo%' => 'foo is %foo%', 'foobar' => '%foo%']])->addMethodCall('setBar', [new Reference('bar')])->addMethodCall('initialize')->setConfigurator('sc_configure')->setPublic(true);
+$container->register('foo.baz', '%baz_class%')->setFactory(['%baz_class%', 'getInstance'])->setConfigurator(['%baz_class%', 'configureStatic1'])->setPublic(true);
+$container->register('bar', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setArguments(['foo', new Reference('foo.baz'), new Parameter('foo_bar')])->setConfigurator([new Reference('foo.baz'), 'configure'])->setPublic(true);
+$container->register('foo_bar', '%foo_class%')->addArgument(new Reference('deprecated_service'))->setShared(false)->setPublic(true);
$container->getParameterBag()->clear();
$container->getParameterBag()->add(['baz_class' => 'BazClass', 'foo_class' => '_PhpScoper5ea00cc67502b\\Bar\\FooClass', 'foo' => 'bar']);
-$container->register('method_call1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFile(\realpath(__DIR__ . '/../includes/foo.php'))->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo')])->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::NULL_ON_INVALID_REFERENCE)])->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo3', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foobaz', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')])->setPublic(\true);
-$container->register('foo_with_inline', 'Foo')->addMethodCall('setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('inlined')])->setPublic(\true);
-$container->register('inlined', 'Bar')->setProperty('pub', 'pub')->addMethodCall('setBaz', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz')])->setPublic(\false);
-$container->register('baz', 'Baz')->addMethodCall('setFoo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo_with_inline')])->setPublic(\true);
-$container->register('request', 'Request')->setSynthetic(\true)->setPublic(\true);
-$container->register('configurator_service', 'ConfClass')->setPublic(\false)->addMethodCall('setFoo', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz')]);
-$container->register('configured_service', 'stdClass')->setConfigurator([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('configurator_service'), 'configureStdClass'])->setPublic(\true);
-$container->register('configurator_service_simple', 'ConfClass')->addArgument('bar')->setPublic(\false);
-$container->register('configured_service_simple', 'stdClass')->setConfigurator([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('configurator_service_simple'), 'configureStdClass'])->setPublic(\true);
-$container->register('decorated', 'stdClass')->setPublic(\true);
-$container->register('decorator_service', 'stdClass')->setDecoratedService('decorated')->setPublic(\true);
-$container->register('decorator_service_with_name', 'stdClass')->setDecoratedService('decorated', 'decorated.pif-pouf')->setPublic(\true);
-$container->register('deprecated_service', 'stdClass')->setDeprecated(\true)->setPublic(\true);
-$container->register('new_factory', 'FactoryClass')->setProperty('foo', 'bar')->setPublic(\false);
-$container->register('factory_service', 'Bar')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), 'getInstance'])->setPublic(\true);
-$container->register('new_factory_service', 'FooBarBaz')->setProperty('foo', 'bar')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('new_factory'), 'getInstance'])->setPublic(\true);
-$container->register('service_from_static_method', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory(['_PhpScoper5ea00cc67502b\\Bar\\FooClass', 'getInstance'])->setPublic(\true);
-$container->register('factory_simple', 'SimpleFactoryClass')->addArgument('foo')->setDeprecated(\true)->setPublic(\false);
-$container->register('factory_service_simple', 'Bar')->setFactory([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('factory_simple'), 'getInstance'])->setPublic(\true);
-$container->register('lazy_context', 'LazyContext')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(['k1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), 'k2' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container')]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([])])->setPublic(\true);
-$container->register('lazy_context_ignore_invalid_ref', 'LazyContext')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('invalid', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([])])->setPublic(\true);
-$container->register('tagged_iterator_foo', 'Bar')->addTag('foo')->setPublic(\false);
-$container->register('tagged_iterator', 'Bar')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument('foo'))->setPublic(\true);
-$container->setAlias('alias_for_foo', 'foo')->setPublic(\true);
-$container->setAlias('alias_for_alias', 'alias_for_foo')->setPublic(\true);
+$container->register('method_call1', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFile(realpath(__DIR__ . '/../includes/foo.php'))->addMethodCall('setBar', [new Reference('foo')])->addMethodCall('setBar', [new Reference('foo2', ContainerInterface::NULL_ON_INVALID_REFERENCE)])->addMethodCall('setBar', [new Reference('foo3', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])->addMethodCall('setBar', [new Reference('foobaz', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)])->addMethodCall('setBar', [new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')])->setPublic(true);
+$container->register('foo_with_inline', 'Foo')->addMethodCall('setBar', [new Reference('inlined')])->setPublic(true);
+$container->register('inlined', 'Bar')->setProperty('pub', 'pub')->addMethodCall('setBaz', [new Reference('baz')])->setPublic(false);
+$container->register('baz', 'Baz')->addMethodCall('setFoo', [new Reference('foo_with_inline')])->setPublic(true);
+$container->register('request', 'Request')->setSynthetic(true)->setPublic(true);
+$container->register('configurator_service', 'ConfClass')->setPublic(false)->addMethodCall('setFoo', [new Reference('baz')]);
+$container->register('configured_service', 'stdClass')->setConfigurator([new Reference('configurator_service'), 'configureStdClass'])->setPublic(true);
+$container->register('configurator_service_simple', 'ConfClass')->addArgument('bar')->setPublic(false);
+$container->register('configured_service_simple', 'stdClass')->setConfigurator([new Reference('configurator_service_simple'), 'configureStdClass'])->setPublic(true);
+$container->register('decorated', 'stdClass')->setPublic(true);
+$container->register('decorator_service', 'stdClass')->setDecoratedService('decorated')->setPublic(true);
+$container->register('decorator_service_with_name', 'stdClass')->setDecoratedService('decorated', 'decorated.pif-pouf')->setPublic(true);
+$container->register('deprecated_service', 'stdClass')->setDeprecated(true)->setPublic(true);
+$container->register('new_factory', 'FactoryClass')->setProperty('foo', 'bar')->setPublic(false);
+$container->register('factory_service', 'Bar')->setFactory([new Reference('foo.baz'), 'getInstance'])->setPublic(true);
+$container->register('new_factory_service', 'FooBarBaz')->setProperty('foo', 'bar')->setFactory([new Reference('new_factory'), 'getInstance'])->setPublic(true);
+$container->register('service_from_static_method', '_PhpScoper5ea00cc67502b\\Bar\\FooClass')->setFactory(['_PhpScoper5ea00cc67502b\\Bar\\FooClass', 'getInstance'])->setPublic(true);
+$container->register('factory_simple', 'SimpleFactoryClass')->addArgument('foo')->setDeprecated(true)->setPublic(false);
+$container->register('factory_service_simple', 'Bar')->setFactory([new Reference('factory_simple'), 'getInstance'])->setPublic(true);
+$container->register('lazy_context', 'LazyContext')->setArguments([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])])->setPublic(true);
+$container->register('lazy_context_ignore_invalid_ref', 'LazyContext')->setArguments([new IteratorArgument([new Reference('foo.baz'), new Reference('invalid', ContainerInterface::IGNORE_ON_INVALID_REFERENCE)]), new IteratorArgument([])])->setPublic(true);
+$container->register('tagged_iterator_foo', 'Bar')->addTag('foo')->setPublic(false);
+$container->register('tagged_iterator', 'Bar')->addArgument(new TaggedIteratorArgument('foo'))->setPublic(true);
+$container->setAlias('alias_for_foo', 'foo')->setPublic(true);
+$container->setAlias('alias_for_alias', 'alias_for_foo')->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_abstract.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_abstract.php
index 850e52984..d43388278 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_abstract.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_abstract.php
@@ -3,6 +3,6 @@
namespace _PhpScoper5ea00cc67502b;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo', 'Foo')->setAbstract(\true)->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo', 'Foo')->setAbstract(true)->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php
index bbf4c736c..f057ca3f7 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php
@@ -7,56 +7,56 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls;
$public = 'public' === $visibility;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+$container = new ContainerBuilder();
// same visibility for deps
-$container->register('foo', \_PhpScoper5ea00cc67502b\FooCircular::class)->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar'));
-$container->register('bar', \_PhpScoper5ea00cc67502b\BarCircular::class)->setPublic($public)->addMethodCall('addFoobar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foobar')]);
-$container->register('foobar', \_PhpScoper5ea00cc67502b\FoobarCircular::class)->setPublic($public)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'));
+$container->register('foo', FooCircular::class)->setPublic(true)->addArgument(new Reference('bar'));
+$container->register('bar', BarCircular::class)->setPublic($public)->addMethodCall('addFoobar', [new Reference('foobar')]);
+$container->register('foobar', FoobarCircular::class)->setPublic($public)->addArgument(new Reference('foo'));
// mixed visibility for deps
-$container->register('foo2', \_PhpScoper5ea00cc67502b\FooCircular::class)->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar2'));
-$container->register('bar2', \_PhpScoper5ea00cc67502b\BarCircular::class)->setPublic(!$public)->addMethodCall('addFoobar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foobar2')]);
-$container->register('foobar2', \_PhpScoper5ea00cc67502b\FoobarCircular::class)->setPublic($public)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo2'));
+$container->register('foo2', FooCircular::class)->setPublic(true)->addArgument(new Reference('bar2'));
+$container->register('bar2', BarCircular::class)->setPublic(!$public)->addMethodCall('addFoobar', [new Reference('foobar2')]);
+$container->register('foobar2', FoobarCircular::class)->setPublic($public)->addArgument(new Reference('foo2'));
// simple inline setter with internal reference
-$container->register('bar3', \_PhpScoper5ea00cc67502b\BarCircular::class)->setPublic(\true)->addMethodCall('addFoobar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foobar3'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foobar3')]);
-$container->register('foobar3', \_PhpScoper5ea00cc67502b\FoobarCircular::class)->setPublic($public);
+$container->register('bar3', BarCircular::class)->setPublic(true)->addMethodCall('addFoobar', [new Reference('foobar3'), new Reference('foobar3')]);
+$container->register('foobar3', FoobarCircular::class)->setPublic($public);
// loop with non-shared dep
-$container->register('foo4', 'stdClass')->setPublic($public)->setShared(\false)->setProperty('foobar', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foobar4'));
-$container->register('foobar4', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo4'));
+$container->register('foo4', 'stdClass')->setPublic($public)->setShared(false)->setProperty('foobar', new Reference('foobar4'));
+$container->register('foobar4', 'stdClass')->setPublic(true)->addArgument(new Reference('foo4'));
// loop on the constructor of a setter-injected dep with property
-$container->register('foo5', 'stdClass')->setPublic(\true)->setProperty('bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar5'));
-$container->register('bar5', 'stdClass')->setPublic($public)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo5'))->setProperty('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo5'));
+$container->register('foo5', 'stdClass')->setPublic(true)->setProperty('bar', new Reference('bar5'));
+$container->register('bar5', 'stdClass')->setPublic($public)->addArgument(new Reference('foo5'))->setProperty('foo', new Reference('foo5'));
// doctrine-like event system + some extra
-$container->register('manager', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('connection'));
-$container->register('logger', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('connection'))->setProperty('handler', (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('manager')));
-$container->register('connection', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('dispatcher'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('config'));
-$container->register('config', 'stdClass')->setPublic(\false)->setProperty('logger', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('logger'));
-$container->register('dispatcher', 'stdClass')->setPublic($public)->setLazy($public)->setProperty('subscriber', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('subscriber'));
-$container->register('subscriber', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('manager'));
+$container->register('manager', 'stdClass')->setPublic(true)->addArgument(new Reference('connection'));
+$container->register('logger', 'stdClass')->setPublic(true)->addArgument(new Reference('connection'))->setProperty('handler', (new Definition('stdClass'))->addArgument(new Reference('manager')));
+$container->register('connection', 'stdClass')->setPublic(true)->addArgument(new Reference('dispatcher'))->addArgument(new Reference('config'));
+$container->register('config', 'stdClass')->setPublic(false)->setProperty('logger', new Reference('logger'));
+$container->register('dispatcher', 'stdClass')->setPublic($public)->setLazy($public)->setProperty('subscriber', new Reference('subscriber'));
+$container->register('subscriber', 'stdClass')->setPublic(true)->addArgument(new Reference('manager'));
// doctrine-like event system + some extra (bis)
-$container->register('manager2', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('connection2'));
-$container->register('logger2', 'stdClass')->setPublic(\false)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('connection2'))->setProperty('handler2', (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('manager2')));
-$container->register('connection2', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('dispatcher2'))->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('config2'));
-$container->register('config2', 'stdClass')->setPublic(\false)->setProperty('logger2', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('logger2'));
-$container->register('dispatcher2', 'stdClass')->setPublic($public)->setLazy($public)->setProperty('subscriber2', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('subscriber2'));
-$container->register('subscriber2', 'stdClass')->setPublic(\false)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('manager2'));
+$container->register('manager2', 'stdClass')->setPublic(true)->addArgument(new Reference('connection2'));
+$container->register('logger2', 'stdClass')->setPublic(false)->addArgument(new Reference('connection2'))->setProperty('handler2', (new Definition('stdClass'))->addArgument(new Reference('manager2')));
+$container->register('connection2', 'stdClass')->setPublic(true)->addArgument(new Reference('dispatcher2'))->addArgument(new Reference('config2'));
+$container->register('config2', 'stdClass')->setPublic(false)->setProperty('logger2', new Reference('logger2'));
+$container->register('dispatcher2', 'stdClass')->setPublic($public)->setLazy($public)->setProperty('subscriber2', new Reference('subscriber2'));
+$container->register('subscriber2', 'stdClass')->setPublic(false)->addArgument(new Reference('manager2'));
// doctrine-like event system with listener
-$container->register('manager3', 'stdClass')->setLazy(\true)->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('connection3'));
-$container->register('connection3', 'stdClass')->setPublic($public)->setProperty('listener', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('listener3')]);
-$container->register('listener3', 'stdClass')->setPublic(\true)->setProperty('manager', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('manager3'));
+$container->register('manager3', 'stdClass')->setLazy(true)->setPublic(true)->addArgument(new Reference('connection3'));
+$container->register('connection3', 'stdClass')->setPublic($public)->setProperty('listener', [new Reference('listener3')]);
+$container->register('listener3', 'stdClass')->setPublic(true)->setProperty('manager', new Reference('manager3'));
// doctrine-like event system with small differences
-$container->register('manager4', 'stdClass')->setLazy(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('connection4'));
-$container->register('connection4', 'stdClass')->setPublic($public)->setProperty('listener', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('listener4')]);
-$container->register('listener4', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('manager4'));
+$container->register('manager4', 'stdClass')->setLazy(true)->addArgument(new Reference('connection4'));
+$container->register('connection4', 'stdClass')->setPublic($public)->setProperty('listener', [new Reference('listener4')]);
+$container->register('listener4', 'stdClass')->setPublic(true)->addArgument(new Reference('manager4'));
// private service involved in a loop
-$container->register('foo6', 'stdClass')->setPublic(\true)->setProperty('bar6', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar6'));
-$container->register('bar6', 'stdClass')->setPublic(\false)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo6'));
-$container->register('baz6', 'stdClass')->setPublic(\true)->setProperty('bar6', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar6'));
+$container->register('foo6', 'stdClass')->setPublic(true)->setProperty('bar6', new Reference('bar6'));
+$container->register('bar6', 'stdClass')->setPublic(false)->addArgument(new Reference('foo6'));
+$container->register('baz6', 'stdClass')->setPublic(true)->setProperty('bar6', new Reference('bar6'));
// provided by Christian Schiffler
-$container->register('root', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('level2'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('multiuse1')])->setPublic(\true);
-$container->register('level2', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls::class)->addMethodCall('call', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('level3')]);
+$container->register('root', 'stdClass')->setArguments([new Reference('level2'), new Reference('multiuse1')])->setPublic(true);
+$container->register('level2', FooForCircularWithAddCalls::class)->addMethodCall('call', [new Reference('level3')]);
$container->register('multiuse1', 'stdClass');
-$container->register('level3', 'stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('level4'));
-$container->register('level4', 'stdClass')->setArguments([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('multiuse1'), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('level5')]);
-$container->register('level5', 'stdClass')->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('level6'));
-$container->register('level6', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls::class)->addMethodCall('call', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('level5')]);
+$container->register('level3', 'stdClass')->addArgument(new Reference('level4'));
+$container->register('level4', 'stdClass')->setArguments([new Reference('multiuse1'), new Reference('level5')]);
+$container->register('level5', 'stdClass')->addArgument(new Reference('level6'));
+$container->register('level6', FooForCircularWithAddCalls::class)->addMethodCall('call', [new Reference('level5')]);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php
index d591a0a80..d994c06ca 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_env_in_id.php
@@ -6,10 +6,10 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+$container = new ContainerBuilder();
$container->setParameter('env(BAR)', 'bar');
-$container->register('foo', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar_%env(BAR)%'))->addArgument(['baz_%env(BAR)%' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz_%env(BAR)%')]);
-$container->register('bar', 'stdClass')->setPublic(\true)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('bar_%env(BAR)%'));
-$container->register('bar_%env(BAR)%', 'stdClass')->setPublic(\false);
-$container->register('baz_%env(BAR)%', 'stdClass')->setPublic(\false);
+$container->register('foo', 'stdClass')->setPublic(true)->addArgument(new Reference('bar_%env(BAR)%'))->addArgument(['baz_%env(BAR)%' => new Reference('baz_%env(BAR)%')]);
+$container->register('bar', 'stdClass')->setPublic(true)->addArgument(new Reference('bar_%env(BAR)%'));
+$container->register('bar_%env(BAR)%', 'stdClass')->setPublic(false);
+$container->register('baz_%env(BAR)%', 'stdClass')->setPublic(false);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_inline_requires.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_inline_requires.php
index 1c7b6838f..4885eb2fa 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_inline_requires.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_inline_requires.php
@@ -7,10 +7,13 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1::class)->addTag('container.hot_path')->setPublic(\true);
-$container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2::class)->addArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3::class))->setPublic(\true);
-$container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3::class);
-$container->register(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists::class)->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register(C1::class)->addTag('container.hot_path')->setPublic(true);
+$container->register(C2::class)->addArgument(new Reference(C3::class))->setPublic(true);
+$container->register(C3::class);
+$container->register(ParentNotExists::class)->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_uninitialized_ref.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_uninitialized_ref.php
index 1dea17f6c..183e6f538 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_uninitialized_ref.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_uninitialized_ref.php
@@ -6,10 +6,10 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-$container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
-$container->register('foo1', 'stdClass')->setPublic(\true);
-$container->register('foo2', 'stdClass')->setPublic(\false);
-$container->register('foo3', 'stdClass')->setPublic(\false);
-$container->register('baz', 'stdClass')->setProperty('foo3', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo3'))->setPublic(\true);
-$container->register('bar', 'stdClass')->setProperty('foo1', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))->setProperty('foo2', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))->setProperty('foo3', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))->setProperty('closures', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))])->setProperty('iter', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(['foo1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), 'foo2' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), 'foo3' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)]))->setPublic(\true);
+$container = new ContainerBuilder();
+$container->register('foo1', 'stdClass')->setPublic(true);
+$container->register('foo2', 'stdClass')->setPublic(false);
+$container->register('foo3', 'stdClass')->setPublic(false);
+$container->register('baz', 'stdClass')->setProperty('foo3', new Reference('foo3'))->setPublic(true);
+$container->register('bar', 'stdClass')->setProperty('foo1', new Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))->setProperty('foo2', new Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))->setProperty('foo3', new Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))->setProperty('closures', [new ServiceClosureArgument(new Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), new ServiceClosureArgument(new Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)), new ServiceClosureArgument(new Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE))])->setProperty('iter', new IteratorArgument(['foo1' => new Reference('foo1', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), 'foo2' => new Reference('foo2', $container::IGNORE_ON_UNINITIALIZED_REFERENCE), 'foo3' => new Reference('foo3', $container::IGNORE_ON_UNINITIALIZED_REFERENCE)]))->setPublic(true);
return $container;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/directory/import/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/directory/import/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/directory/import/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/directory/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/directory/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/directory/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/directory/recurse/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/directory/recurse/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/directory/recurse/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/FooVariadic.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/FooVariadic.php
index fcd851aa1..ff91ef2d4 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/FooVariadic.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/FooVariadic.php
@@ -5,7 +5,7 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo;
class FooVariadic
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $foo)
+ public function __construct(Foo $foo)
{
}
public function bar(...$arguments)
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C1.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C1.php
index 1e958017a..bae5745a0 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C1.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/C1.php
@@ -2,7 +2,7 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath;
-class C1 extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\P1
+class C1 extends P1
{
use T1;
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/P1.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/P1.php
index 98709c1db..3fafa16c3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/P1.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/P1.php
@@ -2,6 +2,6 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath;
-class P1 implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\I1
+class P1 implements I1
{
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/HotPath/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectExtension.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectExtension.php
index d1ef2707c..fc82285a9 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectExtension.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectExtension.php
@@ -5,26 +5,30 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
-class ProjectExtension implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Extension\ExtensionInterface
+use function array_filter;
+use function call_user_func_array;
+use function class_alias;
+
+class ProjectExtension implements ExtensionInterface
{
- public function load(array $configs, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $configuration)
+ public function load(array $configs, ContainerBuilder $configuration)
{
$configuration->setParameter('project.configs', $configs);
- $configs = \array_filter($configs);
+ $configs = array_filter($configs);
if ($configs) {
- $config = \call_user_func_array('array_merge', $configs);
+ $config = call_user_func_array('array_merge', $configs);
} else {
$config = [];
}
- $configuration->setDefinition('project.service.bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('FooClass'));
+ $configuration->setDefinition('project.service.bar', new Definition('FooClass'));
$configuration->setParameter('project.parameter.bar', isset($config['foo']) ? $config['foo'] : 'foobar');
- $configuration->setDefinition('project.service.foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('FooClass'));
+ $configuration->setDefinition('project.service.foo', new Definition('FooClass'));
$configuration->setParameter('project.parameter.foo', isset($config['foo']) ? $config['foo'] : 'foobar');
return $configuration;
}
public function getXsdValidationBasePath()
{
- return \false;
+ return false;
}
public function getNamespace()
{
@@ -34,8 +38,8 @@ public function getAlias()
{
return 'project';
}
- public function getConfiguration(array $config, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder $container)
+ public function getConfiguration(array $config, ContainerBuilder $container)
{
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectExtension', 'ProjectExtension', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectExtension', 'ProjectExtension', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtension.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtension.php
index 034ec9c4f..336794cc3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtension.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/ProjectWithXsdExtension.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
-class ProjectWithXsdExtension extends \_PhpScoper5ea00cc67502b\ProjectExtension
+use function class_alias;
+
+class ProjectWithXsdExtension extends ProjectExtension
{
public function getXsdValidationBasePath()
{
@@ -17,4 +19,4 @@ public function getAlias()
return 'projectwithxsd';
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectWithXsdExtension', 'ProjectWithXsdExtension', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectWithXsdExtension', 'ProjectWithXsdExtension', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/autowiring_classes.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/autowiring_classes.php
index 585fb1ff4..021cad19d 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/autowiring_classes.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/autowiring_classes.php
@@ -2,96 +2,98 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler;
+use stdClass;
+
class Foo
{
}
class Bar
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $foo)
+ public function __construct(Foo $foo)
{
}
}
interface AInterface
{
}
-class A implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\AInterface
+class A implements AInterface
{
- public static function create(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $foo)
+ public static function create(Foo $foo)
{
}
}
-class B extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A
+class B extends A
{
}
class C
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function __construct(A $a)
{
}
}
interface DInterface
{
}
-interface EInterface extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface
+interface EInterface extends DInterface
{
}
interface IInterface
{
}
-class I implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IInterface
+class I implements IInterface
{
}
-class F extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\EInterface
+class F extends I implements EInterface
{
}
class G
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface $d, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\EInterface $e, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IInterface $i)
+ public function __construct(DInterface $d, EInterface $e, IInterface $i)
{
}
}
class H
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\B $b, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface $d)
+ public function __construct(B $b, DInterface $d)
{
}
}
class D
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\DInterface $d)
+ public function __construct(A $a, DInterface $d)
{
}
}
class E
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\D $d = null)
+ public function __construct(D $d = null)
{
}
}
class J
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\I $i)
+ public function __construct(I $i)
{
}
}
class K
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\IInterface $i)
+ public function __construct(IInterface $i)
{
}
}
interface CollisionInterface
{
}
-class CollisionA implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface
+class CollisionA implements CollisionInterface
{
}
-class CollisionB implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface
+class CollisionB implements CollisionInterface
{
}
class CannotBeAutowired
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface $collision)
+ public function __construct(CollisionInterface $collision)
{
}
}
@@ -100,67 +102,67 @@ class Lille
}
class Dunglas
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille $l)
+ public function __construct(Lille $l)
{
}
}
class LesTilleuls
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas $j, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas $k)
+ public function __construct(Dunglas $j, Dunglas $k)
{
}
}
class OptionalParameter
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface $c = null, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $f = null)
+ public function __construct(CollisionInterface $c = null, A $a, Foo $f = null)
{
}
}
class BadTypeHintedArgument
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas $k, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass $r)
+ public function __construct(Dunglas $k, NotARealClass $r)
{
}
}
class BadParentTypeHintedArgument
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas $k, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\OptionalServiceClass $r)
+ public function __construct(Dunglas $k, OptionalServiceClass $r)
{
}
}
class NotGuessableArgument
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $k)
+ public function __construct(Foo $k)
{
}
}
class NotGuessableArgumentForSubclass
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $k)
+ public function __construct(A $k)
{
}
}
class MultipleArguments
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $k, $foo, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Dunglas $dunglas, array $bar)
+ public function __construct(A $k, $foo, Dunglas $dunglas, array $bar)
{
}
}
class MultipleArgumentsOptionalScalar
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a, $foo = 'default_val', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille $lille = null)
+ public function __construct(A $a, $foo = 'default_val', Lille $lille = null)
{
}
}
class MultipleArgumentsOptionalScalarLast
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille $lille, $foo = 'some_val')
+ public function __construct(A $a, Lille $lille, $foo = 'some_val')
{
}
}
class MultipleArgumentsOptionalScalarNotReallyOptional
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a, $foo = 'default_val', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Lille $lille)
+ public function __construct(A $a, $foo = 'default_val', Lille $lille)
{
}
}
@@ -169,19 +171,19 @@ public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\Dependenc
*/
class ClassForResource
{
- public function __construct($foo, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar $bar = null)
+ public function __construct($foo, Bar $bar = null)
{
}
- public function setBar(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar $bar)
+ public function setBar(Bar $bar)
{
}
}
-class IdenticalClassResource extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ClassForResource
+class IdenticalClassResource extends ClassForResource
{
}
-class ClassChangedConstructorArgs extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\ClassForResource
+class ClassChangedConstructorArgs extends ClassForResource
{
- public function __construct($foo, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Bar $bar, $baz)
+ public function __construct($foo, Bar $bar, $baz)
{
}
}
@@ -190,74 +192,74 @@ class SetterInjectionCollision
/**
* @required
*/
- public function setMultipleInstancesForOneArg(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\CollisionInterface $collision)
+ public function setMultipleInstancesForOneArg(CollisionInterface $collision)
{
// The CollisionInterface cannot be autowired - there are multiple
// should throw an exception
}
}
-class SetterInjection extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\SetterInjectionParent
+class SetterInjection extends SetterInjectionParent
{
/**
* @required
*/
- public function setFoo(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $foo)
+ public function setFoo(Foo $foo)
{
// should be called
}
/** @inheritdoc*/
// <- brackets are missing on purpose
- public function setDependencies(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $foo, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function setDependencies(Foo $foo, A $a)
{
// should be called
}
/** {@inheritdoc} */
- public function setWithCallsConfigured(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function setWithCallsConfigured(A $a)
{
// this method has a calls configured on it
}
- public function notASetter(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function notASetter(A $a)
{
// should be called only when explicitly specified
}
/**
* @required*/
- public function setChildMethodWithoutDocBlock(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function setChildMethodWithoutDocBlock(A $a)
{
}
}
class SetterInjectionParent
{
/** @required*/
- public function setDependencies(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\Foo $foo, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function setDependencies(Foo $foo, A $a)
{
// should be called
}
- public function notASetter(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function notASetter(A $a)
{
// @required should be ignored when the child does not add @inheritdoc
}
/** @required prefix is on purpose */
- public function setWithCallsConfigured(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function setWithCallsConfigured(A $a)
{
}
/** @required */
- public function setChildMethodWithoutDocBlock(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ public function setChildMethodWithoutDocBlock(A $a)
{
}
}
class NotWireable
{
- public function setNotAutowireable(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass $n)
+ public function setNotAutowireable(NotARealClass $n)
{
}
public function setBar()
{
}
- public function setOptionalNotAutowireable(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\NotARealClass $n = null)
+ public function setOptionalNotAutowireable(NotARealClass $n = null)
{
}
- public function setDifferentNamespace(\stdClass $n)
+ public function setDifferentNamespace(stdClass $n)
{
}
public function setOptionalNoTypeHint($foo = null)
@@ -267,7 +269,7 @@ public function setOptionalArgNoAutowireable($other = 'default_val')
{
}
/** @required */
- protected function setProtectedMethod(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Compiler\A $a)
+ protected function setProtectedMethod(A $a)
{
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/classes.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/classes.php
index e200e71ea..244b37498 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/classes.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/classes.php
@@ -5,15 +5,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface as ProxyDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
+use function class_alias;
+use function is_object;
+use function is_scalar;
+
function sc_configure($instance)
{
$instance->configure();
}
-class BarClass extends \_PhpScoper5ea00cc67502b\BazClass
+class BarClass extends BazClass
{
protected $baz;
public $foo = 'foo';
- public function setBaz(\_PhpScoper5ea00cc67502b\BazClass $baz)
+ public function setBaz(BazClass $baz)
{
$this->baz = $baz;
}
@@ -22,11 +26,11 @@ public function getBaz()
return $this->baz;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\BarClass', 'BarClass', \false);
+class_alias('_PhpScoper5ea00cc67502b\\BarClass', 'BarClass', false);
class BazClass
{
protected $foo;
- public function setFoo(\_PhpScoper5ea00cc67502b\Foo $foo)
+ public function setFoo(Foo $foo)
{
$this->foo = $foo;
}
@@ -46,47 +50,47 @@ public static function configureStatic1()
{
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\BazClass', 'BazClass', \false);
+class_alias('_PhpScoper5ea00cc67502b\\BazClass', 'BazClass', false);
class BarUserClass
{
public $bar;
- public function __construct(\_PhpScoper5ea00cc67502b\BarClass $bar)
+ public function __construct(BarClass $bar)
{
$this->bar = $bar;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\BarUserClass', 'BarUserClass', \false);
+class_alias('_PhpScoper5ea00cc67502b\\BarUserClass', 'BarUserClass', false);
class MethodCallClass
{
public $simple;
public $complex;
- private $callPassed = \false;
+ private $callPassed = false;
public function callMe()
{
- $this->callPassed = \is_scalar($this->simple) && \is_object($this->complex);
+ $this->callPassed = is_scalar($this->simple) && is_object($this->complex);
}
public function callPassed()
{
return $this->callPassed;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\MethodCallClass', 'MethodCallClass', \false);
-class DummyProxyDumper implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface
+class_alias('_PhpScoper5ea00cc67502b\\MethodCallClass', 'MethodCallClass', false);
+class DummyProxyDumper implements ProxyDumper
{
- public function isProxyCandidate(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ public function isProxyCandidate(Definition $definition)
{
return $definition->isLazy();
}
- public function getProxyFactoryCode(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition, $id, $factoryCall = null)
+ public function getProxyFactoryCode(Definition $definition, $id, $factoryCall = null)
{
return " // lazy factory for {$definition->getClass()}\n\n";
}
- public function getProxyCode(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition $definition)
+ public function getProxyCode(Definition $definition)
{
return "// proxy code for {$definition->getClass()}\n";
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\DummyProxyDumper', 'DummyProxyDumper', \false);
+class_alias('_PhpScoper5ea00cc67502b\\DummyProxyDumper', 'DummyProxyDumper', false);
class LazyContext
{
public $lazyValues;
@@ -97,28 +101,28 @@ public function __construct($lazyValues, $lazyEmptyValues)
$this->lazyEmptyValues = $lazyEmptyValues;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\LazyContext', 'LazyContext', \false);
+class_alias('_PhpScoper5ea00cc67502b\\LazyContext', 'LazyContext', false);
class FoobarCircular
{
- public function __construct(\_PhpScoper5ea00cc67502b\FooCircular $foo)
+ public function __construct(FooCircular $foo)
{
$this->foo = $foo;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\FoobarCircular', 'FoobarCircular', \false);
+class_alias('_PhpScoper5ea00cc67502b\\FoobarCircular', 'FoobarCircular', false);
class FooCircular
{
- public function __construct(\_PhpScoper5ea00cc67502b\BarCircular $bar)
+ public function __construct(BarCircular $bar)
{
$this->bar = $bar;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\FooCircular', 'FooCircular', \false);
+class_alias('_PhpScoper5ea00cc67502b\\FooCircular', 'FooCircular', false);
class BarCircular
{
- public function addFoobar(\_PhpScoper5ea00cc67502b\FoobarCircular $foobar)
+ public function addFoobar(FoobarCircular $foobar)
{
$this->foobar = $foobar;
}
}
-\class_alias('_PhpScoper5ea00cc67502b\\BarCircular', 'BarCircular', \false);
+class_alias('_PhpScoper5ea00cc67502b\\BarCircular', 'BarCircular', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/createphar.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/createphar.php
index e3ef91697..23f43d379 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/createphar.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/createphar.php
@@ -2,11 +2,15 @@
namespace _PhpScoper5ea00cc67502b;
+use Phar;
+use function is_file;
+use function unlink;
+
$file = __DIR__ . '/ProjectWithXsdExtensionInPhar.phar';
-if (\is_file($file)) {
- @\unlink($file);
+if (is_file($file)) {
+ @unlink($file);
}
-$phar = new \Phar($file, 0, 'ProjectWithXsdExtensionInPhar.phar');
+$phar = new Phar($file, 0, 'ProjectWithXsdExtensionInPhar.phar');
$phar->addFromString('ProjectWithXsdExtensionInPhar.php', <<<'EOT'
called = \true;
+ $obj->called = true;
return $obj;
}
public function initialize()
{
- $this->initialized = \true;
+ $this->initialized = true;
}
public function configure()
{
- $this->configured = \true;
+ $this->configured = true;
}
public function setBar($value = null)
{
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/includes/schema/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/schema/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/includes/schema/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/ini/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/ini/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/ini/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php
index e7542d193..44ef0c0fb 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php
@@ -9,13 +9,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithoutArgumentsContainer
+class ProjectServiceContainer extends ConstructorWithoutArgumentsContainer
{
private $parameters = [];
private $targetDirs = [];
@@ -28,19 +32,19 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php
index 4cf10ca4b..92e48c5a3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php
@@ -9,13 +9,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithMandatoryArgumentsContainer
+class ProjectServiceContainer extends ConstructorWithMandatoryArgumentsContainer
{
private $parameters = [];
private $targetDirs = [];
@@ -26,19 +30,19 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php
index 6cea63e2a..a68f12f52 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php
@@ -9,13 +9,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Container\ConstructorWithOptionalArgumentsContainer
+class ProjectServiceContainer extends ConstructorWithOptionalArgumentsContainer
{
private $parameters = [];
private $targetDirs = [];
@@ -28,19 +32,19 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_without_constructor.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_without_constructor.php
index f35a26bcb..bffdbdb56 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_without_constructor.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/custom_container_class_without_constructor.php
@@ -9,13 +9,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Container\NoConstructorContainer
+class ProjectServiceContainer extends NoConstructorContainer
{
private $parameters = [];
private $targetDirs = [];
@@ -26,19 +30,19 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php
index fb37efbcb..7c3e262d8 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1-1.php
@@ -9,13 +9,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Container extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dump\AbstractContainer
+class Container extends AbstractContainer
{
private $parameters = [];
private $targetDirs = [];
@@ -26,19 +30,19 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1.php
index f19b6e642..b4d9de6f5 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services1.php
@@ -9,13 +9,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -26,20 +31,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
}
/**
@@ -48,4 +53,4 @@ public function isFrozen()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php
index 435d8901c..f6a9e9ec5 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php
@@ -9,13 +9,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -28,37 +36,37 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'test' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getTestService()
{
- return $this->services['test'] = new \stdClass(['only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1-string2', 'optimize concatenation with empty string' => 'string1string2', 'optimize concatenation from the start' => 'start', 'optimize concatenation at the end' => 'end', 'new line' => 'string with ' . "\n" . 'new line']);
+ return $this->services['test'] = new stdClass(['only dot' => '.', 'concatenation as value' => '.\'\'.', 'concatenation from the start value' => '\'\'.', '.' => 'dot as a key', '.\'\'.' => 'concatenation as a key', '\'\'.' => 'concatenation from the start key', 'optimize concatenation' => 'string1-string2', 'optimize concatenation with empty string' => 'string1string2', 'optimize concatenation from the start' => 'start', 'optimize concatenation at the end' => 'end', 'new line' => 'string with ' . "\n" . 'new line']);
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -70,11 +78,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -83,7 +91,7 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
@@ -100,15 +108,15 @@ public function getParameterBag()
*/
private function getDynamicParameter($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -131,4 +139,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php
index a0957bfc9..2f4432979 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php
@@ -9,13 +9,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function array_key_exists;
+use function class_alias;
+use function dirname;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,7 +32,7 @@ public function __construct()
{
$dir = __DIR__;
for ($i = 1; $i <= 5; ++$i) {
- $this->targetDirs[$i] = $dir = \dirname($dir);
+ $this->targetDirs[$i] = $dir = dirname($dir);
}
$this->parameters = $this->getDefaultParameters();
$this->services = [];
@@ -32,37 +41,37 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'test' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getTestService()
{
- return $this->services['test'] = new \stdClass('wiz' . $this->targetDirs[1], ['wiz' . $this->targetDirs[1] => $this->targetDirs[2] . '/']);
+ return $this->services['test'] = new stdClass('wiz' . $this->targetDirs[1], ['wiz' . $this->targetDirs[1] => $this->targetDirs[2] . '/']);
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -74,11 +83,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -87,11 +96,11 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
- private $loadedDynamicParameters = ['foo' => \false, 'buz' => \false];
+ private $loadedDynamicParameters = ['foo' => false, 'buz' => false];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
@@ -112,18 +121,18 @@ private function getDynamicParameter($name)
$value = $this->targetDirs[2];
break;
default:
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
- $this->loadedDynamicParameters[$name] = \true;
+ $this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -146,4 +155,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services13.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services13.php
index 0cf165455..28c3cfe50 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services13.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services13.php
@@ -9,13 +9,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -27,31 +33,31 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'foo' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'foo' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarService()
{
- $a = new \stdClass();
+ $a = new stdClass();
$a->add($this);
- return $this->services['bar'] = new \stdClass($a);
+ return $this->services['bar'] = new stdClass($a);
}
}
/**
@@ -60,4 +66,4 @@ protected function getBarService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php
index eb672192c..091651ab4 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php
@@ -2,6 +2,7 @@
namespace _PhpScoper5ea00cc67502b;
+use _PhpScoper5ea00cc67502b\Bar\FooClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
@@ -9,13 +10,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -28,20 +36,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'service_from_anonymous_factory' shared service.
@@ -50,7 +58,7 @@ public function isFrozen()
*/
protected function getServiceFromAnonymousFactoryService()
{
- return $this->services['service_from_anonymous_factory'] = (new ${($_ = $this->getEnv('FOO')) && \false ?: "_"}())->getInstance();
+ return $this->services['service_from_anonymous_factory'] = (new ${($_ = $this->getEnv('FOO')) && false ?: "_"}())->getInstance();
}
/**
* Gets the public 'service_with_method_call_and_factory' shared service.
@@ -59,17 +67,17 @@ protected function getServiceFromAnonymousFactoryService()
*/
protected function getServiceWithMethodCallAndFactoryService()
{
- $this->services['service_with_method_call_and_factory'] = $instance = new \_PhpScoper5ea00cc67502b\Bar\FooClass();
- $instance->setBar(\_PhpScoper5ea00cc67502b\Bar\FooClass::getInstance());
+ $this->services['service_with_method_call_and_factory'] = $instance = new FooClass();
+ $instance->setBar(FooClass::getInstance());
return $instance;
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -81,11 +89,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -94,11 +102,11 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
- private $loadedDynamicParameters = ['foo' => \false];
+ private $loadedDynamicParameters = ['foo' => false];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
@@ -116,18 +124,18 @@ private function getDynamicParameter($name)
$value = $this->getEnv('FOO');
break;
default:
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
- $this->loadedDynamicParameters[$name] = \true;
+ $this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
}
private $normalizedParameterNames = ['env(foo)' => 'env(FOO)'];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -150,4 +158,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services24.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services24.php
index 6d545b587..31fb58232 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services24.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services24.php
@@ -9,13 +9,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use Foo;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -27,29 +33,29 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'foo' shared autowired service.
*
- * @return \Foo
+ * @return Foo
*/
protected function getFooService()
{
- return $this->services['foo'] = new \_PhpScoper5ea00cc67502b\Foo();
+ return $this->services['foo'] = new Foo();
}
}
/**
@@ -58,4 +64,4 @@ protected function getFooService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php
index 8c6293e55..f800b26bf 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php
@@ -9,13 +9,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar;
+use function array_key_exists;
+use function class_alias;
+use function dirname;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_EnvParameters extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_EnvParameters extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,7 +32,7 @@ public function __construct()
{
$dir = __DIR__;
for ($i = 1; $i <= 5; ++$i) {
- $this->targetDirs[$i] = $dir = \dirname($dir);
+ $this->targetDirs[$i] = $dir = dirname($dir);
}
$this->parameters = $this->getDefaultParameters();
$this->services = [];
@@ -32,20 +41,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
@@ -54,7 +63,7 @@ public function isFrozen()
*/
protected function getBarService()
{
- return $this->services['bar'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar($this->getEnv('QUZ'));
+ return $this->services['bar'] = new Bar($this->getEnv('QUZ'));
}
/**
* Gets the public 'test' shared service.
@@ -69,10 +78,10 @@ protected function getTestService()
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -84,11 +93,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -97,11 +106,11 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
- private $loadedDynamicParameters = ['bar' => \false, 'baz' => \false, 'json' => \false, 'db_dsn' => \false, 'env(json_file)' => \false];
+ private $loadedDynamicParameters = ['bar' => false, 'baz' => false, 'json' => false, 'db_dsn' => false, 'env(json_file)' => false];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
@@ -131,18 +140,18 @@ private function getDynamicParameter($name)
$value = $this->targetDirs[1] . '/array.json';
break;
default:
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
- $this->loadedDynamicParameters[$name] = \true;
+ $this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
}
private $normalizedParameterNames = ['env(foo)' => 'env(FOO)', 'env(db)' => 'env(DB)'];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -165,4 +174,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_EnvParameters', 'Symfony_DI_PhpDumper_Test_EnvParameters', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_EnvParameters', 'Symfony_DI_PhpDumper_Test_EnvParameters', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services33.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services33.php
index 5d87dacd2..69bb1daf4 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services33.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services33.php
@@ -2,6 +2,7 @@
namespace _PhpScoper5ea00cc67502b;
+use _PhpScoper5ea00cc67502b\Foo\Foo;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
@@ -9,13 +10,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -28,20 +34,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'Bar\Foo' shared service.
@@ -59,7 +65,7 @@ protected function getFooService()
*/
protected function getFoo2Service()
{
- return $this->services['Foo\\Foo'] = new \_PhpScoper5ea00cc67502b\Foo\Foo();
+ return $this->services['Foo\\Foo'] = new Foo();
}
}
/**
@@ -68,4 +74,4 @@ protected function getFoo2Service()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php
index 08efddd67..4d7266f86 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -27,28 +34,28 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -60,11 +67,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -73,7 +80,7 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
@@ -90,15 +97,15 @@ public function getParameterBag()
*/
private function getDynamicParameter($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -112,7 +119,7 @@ private function normalizeParameterName($name)
*/
protected function getDefaultParameters()
{
- return ['foo' => 'bar', 'baz' => 'bar', 'bar' => 'foo is %foo bar', 'escape' => '@escapeme', 'values' => [0 => \true, 1 => \false, 2 => \NULL, 3 => 0, 4 => 1000.3, 5 => 'true', 6 => 'false', 7 => 'null'], 'null string' => 'null', 'string of digits' => '123', 'string of digits prefixed with minus character' => '-123', 'true string' => 'true', 'false string' => 'false', 'binary number string' => '0b0110', 'numeric string' => '-1.2E2', 'hexadecimal number string' => '0xFF', 'float string' => '10100.1', 'positive float string' => '+10100.1', 'negative float string' => '-10100.1'];
+ return ['foo' => 'bar', 'baz' => 'bar', 'bar' => 'foo is %foo bar', 'escape' => '@escapeme', 'values' => [0 => true, 1 => false, 2 => NULL, 3 => 0, 4 => 1000.3, 5 => 'true', 6 => 'false', 7 => 'null'], 'null string' => 'null', 'string of digits' => '123', 'string of digits prefixed with minus character' => '-123', 'true string' => 'true', 'false string' => 'false', 'binary number string' => '0b0110', 'numeric string' => '-1.2E2', 'hexadecimal number string' => '0xFF', 'float string' => '10100.1', 'positive float string' => '+10100.1', 'negative float string' => '-10100.1'];
}
}
/**
@@ -121,4 +128,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php
index 14bfa0ce4..904150533 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php
@@ -2,6 +2,7 @@
namespace _PhpScoper5ea00cc67502b;
+use _PhpScoper5ea00cc67502b\Bar\FooClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
@@ -9,23 +10,37 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
+use Bar;
+use Baz;
+use ConfClass;
+use EmptyIterator;
+use FactoryClass;
+use Foo;
+use FooBarBaz;
+use SimpleFactoryClass;
+use stdClass;
+use function call_user_func;
+use function class_alias;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
public function __construct()
{
- parent::__construct(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($this->getDefaultParameters()));
+ parent::__construct(new ParameterBag($this->getDefaultParameters()));
$this->normalizedIds = ['_PhpScoper5ea00cc67502b\\psr\\container\\containerinterface' => '_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface', '_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\containerinterface' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface'];
- $this->syntheticIds = ['request' => \true];
+ $this->syntheticIds = ['request' => true];
$this->methodMap = ['bar' => 'getBarService', 'baz' => 'getBazService', 'configurator_service' => 'getConfiguratorServiceService', 'configurator_service_simple' => 'getConfiguratorServiceSimpleService', 'configured_service' => 'getConfiguredServiceService', 'configured_service_simple' => 'getConfiguredServiceSimpleService', 'decorated' => 'getDecoratedService', 'decorator_service' => 'getDecoratorServiceService', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', 'deprecated_service' => 'getDeprecatedServiceService', 'factory_service' => 'getFactoryServiceService', 'factory_service_simple' => 'getFactoryServiceSimpleService', 'factory_simple' => 'getFactorySimpleService', 'foo' => 'getFooService', 'foo.baz' => 'getFoo_BazService', 'foo_bar' => 'getFooBarService', 'foo_with_inline' => 'getFooWithInlineService', 'inlined' => 'getInlinedService', 'lazy_context' => 'getLazyContextService', 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService', 'method_call1' => 'getMethodCall1Service', 'new_factory' => 'getNewFactoryService', 'new_factory_service' => 'getNewFactoryServiceService', 'service_from_static_method' => 'getServiceFromStaticMethodService', 'tagged_iterator' => 'getTaggedIteratorService', 'tagged_iterator_foo' => 'getTaggedIteratorFooService'];
- $this->privates = ['configurator_service' => \true, 'configurator_service_simple' => \true, 'factory_simple' => \true, 'inlined' => \true, 'new_factory' => \true, 'tagged_iterator_foo' => \true];
+ $this->privates = ['configurator_service' => true, 'configurator_service_simple' => true, 'factory_simple' => true, 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true];
$this->aliases = ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => 'service_container', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => 'service_container', 'alias_for_alias' => 'foo', 'alias_for_foo' => 'foo'];
}
/**
@@ -35,100 +50,100 @@ public function __construct()
*/
protected function getBarService()
{
- $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'};
- $this->services['bar'] = $instance = new \_PhpScoper5ea00cc67502b\Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
+ $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
+ $this->services['bar'] = $instance = new FooClass('foo', $a, $this->getParameter('foo_bar'));
$a->configure($instance);
return $instance;
}
/**
* Gets the public 'baz' shared service.
*
- * @return \Baz
+ * @return Baz
*/
protected function getBazService()
{
- $this->services['baz'] = $instance = new \_PhpScoper5ea00cc67502b\Baz();
- $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && \false ?: '_'});
+ $this->services['baz'] = $instance = new Baz();
+ $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && false ?: '_'});
return $instance;
}
/**
* Gets the public 'configured_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConfiguredServiceService()
{
- $this->services['configured_service'] = $instance = new \stdClass();
- ${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && \false ?: '_'}->configureStdClass($instance);
+ $this->services['configured_service'] = $instance = new stdClass();
+ ${($_ = isset($this->services['configurator_service']) ? $this->services['configurator_service'] : $this->getConfiguratorServiceService()) && false ?: '_'}->configureStdClass($instance);
return $instance;
}
/**
* Gets the public 'configured_service_simple' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConfiguredServiceSimpleService()
{
- $this->services['configured_service_simple'] = $instance = new \stdClass();
- ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : ($this->services['configurator_service_simple'] = new \_PhpScoper5ea00cc67502b\ConfClass('bar'))) && \false ?: '_'}->configureStdClass($instance);
+ $this->services['configured_service_simple'] = $instance = new stdClass();
+ ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : ($this->services['configurator_service_simple'] = new ConfClass('bar'))) && false ?: '_'}->configureStdClass($instance);
return $instance;
}
/**
* Gets the public 'decorated' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getDecoratedService()
{
- return $this->services['decorated'] = new \stdClass();
+ return $this->services['decorated'] = new stdClass();
}
/**
* Gets the public 'decorator_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getDecoratorServiceService()
{
- return $this->services['decorator_service'] = new \stdClass();
+ return $this->services['decorator_service'] = new stdClass();
}
/**
* Gets the public 'decorator_service_with_name' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getDecoratorServiceWithNameService()
{
- return $this->services['decorator_service_with_name'] = new \stdClass();
+ return $this->services['decorator_service_with_name'] = new stdClass();
}
/**
* Gets the public 'deprecated_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*
* @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
*/
protected function getDeprecatedServiceService()
{
- @\trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', \E_USER_DEPRECATED);
- return $this->services['deprecated_service'] = new \stdClass();
+ @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
+ return $this->services['deprecated_service'] = new stdClass();
}
/**
* Gets the public 'factory_service' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getFactoryServiceService()
{
- return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'}->getInstance();
+ return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}->getInstance();
}
/**
* Gets the public 'factory_service_simple' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getFactoryServiceSimpleService()
{
- return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && \false ?: '_'}->getInstance();
+ return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
}
/**
* Gets the public 'foo' shared service.
@@ -137,14 +152,14 @@ protected function getFactoryServiceSimpleService()
*/
protected function getFooService()
{
- $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'};
- $this->services['foo'] = $instance = \_PhpScoper5ea00cc67502b\Bar\FooClass::getInstance('foo', $a, [$this->getParameter('foo') => 'foo is ' . $this->getParameter('foo') . '', 'foobar' => $this->getParameter('foo')], \true, $this);
+ $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
+ $this->services['foo'] = $instance = FooClass::getInstance('foo', $a, [$this->getParameter('foo') => 'foo is ' . $this->getParameter('foo') . '', 'foobar' => $this->getParameter('foo')], true, $this);
$instance->foo = 'bar';
$instance->moo = $a;
$instance->qux = [$this->getParameter('foo') => 'foo is ' . $this->getParameter('foo') . '', 'foobar' => $this->getParameter('foo')];
- $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && \false ?: '_'});
+ $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
$instance->initialize();
- \_PhpScoper5ea00cc67502b\sc_configure($instance);
+ sc_configure($instance);
return $instance;
}
/**
@@ -154,8 +169,8 @@ protected function getFooService()
*/
protected function getFoo_BazService()
{
- $this->services['foo.baz'] = $instance = \call_user_func([$this->getParameter('baz_class'), 'getInstance']);
- \call_user_func([$this->getParameter('baz_class'), 'configureStatic1'], $instance);
+ $this->services['foo.baz'] = $instance = call_user_func([$this->getParameter('baz_class'), 'getInstance']);
+ call_user_func([$this->getParameter('baz_class'), 'configureStatic1'], $instance);
return $instance;
}
/**
@@ -166,17 +181,17 @@ protected function getFoo_BazService()
protected function getFooBarService()
{
$class = $this->getParameter('foo_class');
- return new $class(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && \false ?: '_'});
+ return new $class(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && false ?: '_'});
}
/**
* Gets the public 'foo_with_inline' shared service.
*
- * @return \Foo
+ * @return Foo
*/
protected function getFooWithInlineService()
{
- $this->services['foo_with_inline'] = $instance = new \_PhpScoper5ea00cc67502b\Foo();
- $instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && \false ?: '_'});
+ $this->services['foo_with_inline'] = $instance = new Foo();
+ $instance->setBar(${($_ = isset($this->services['inlined']) ? $this->services['inlined'] : $this->getInlinedService()) && false ?: '_'});
return $instance;
}
/**
@@ -186,11 +201,11 @@ protected function getFooWithInlineService()
*/
protected function getLazyContextService()
{
- return $this->services['lazy_context'] = new \_PhpScoper5ea00cc67502b\LazyContext(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- (yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'});
+ return $this->services['lazy_context'] = new LazyContext(new RewindableGenerator(function () {
+ (yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'});
(yield 'k2' => $this);
- }, 2), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- return new \EmptyIterator();
+ }, 2), new RewindableGenerator(function () {
+ return new EmptyIterator();
}, 0));
}
/**
@@ -200,19 +215,19 @@ protected function getLazyContextService()
*/
protected function getLazyContextIgnoreInvalidRefService()
{
- return $this->services['lazy_context_ignore_invalid_ref'] = new \_PhpScoper5ea00cc67502b\LazyContext(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- (yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'});
+ return $this->services['lazy_context_ignore_invalid_ref'] = new LazyContext(new RewindableGenerator(function () {
+ (yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'});
if ($this->has('invalid')) {
(yield 1 => ${($_ = isset($this->services['invalid']) ? $this->services['invalid'] : $this->get(
'invalid',
/* ContainerInterface::NULL_ON_INVALID_REFERENCE */
2
- )) && \false ?: '_'});
+ )) && false ?: '_'});
}
}, function () {
return 1 + (int) $this->has('invalid');
- }), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- return new \EmptyIterator();
+ }), new RewindableGenerator(function () {
+ return new EmptyIterator();
}, 0));
}
/**
@@ -223,38 +238,38 @@ protected function getLazyContextIgnoreInvalidRefService()
protected function getMethodCall1Service()
{
include_once '%path%foo.php';
- $this->services['method_call1'] = $instance = new \_PhpScoper5ea00cc67502b\Bar\FooClass();
- $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'});
+ $this->services['method_call1'] = $instance = new FooClass();
+ $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
$instance->setBar(${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->get(
'foo2',
/* ContainerInterface::NULL_ON_INVALID_REFERENCE */
2
- )) && \false ?: '_'});
+ )) && false ?: '_'});
if ($this->has('foo3')) {
$instance->setBar(${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->get(
'foo3',
/* ContainerInterface::NULL_ON_INVALID_REFERENCE */
2
- )) && \false ?: '_'});
+ )) && false ?: '_'});
}
if ($this->has('foobaz')) {
$instance->setBar(${($_ = isset($this->services['foobaz']) ? $this->services['foobaz'] : $this->get(
'foobaz',
/* ContainerInterface::NULL_ON_INVALID_REFERENCE */
2
- )) && \false ?: '_'});
+ )) && false ?: '_'});
}
- $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'}->foo() . ($this->hasParameter("foo") ? $this->getParameter("foo") : "default"));
+ $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}->foo() . ($this->hasParameter("foo") ? $this->getParameter("foo") : "default"));
return $instance;
}
/**
* Gets the public 'new_factory_service' shared service.
*
- * @return \FooBarBaz
+ * @return FooBarBaz
*/
protected function getNewFactoryServiceService()
{
- $this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && \false ?: '_'}->getInstance();
+ $this->services['new_factory_service'] = $instance = ${($_ = isset($this->services['new_factory']) ? $this->services['new_factory'] : $this->getNewFactoryService()) && false ?: '_'}->getInstance();
$instance->foo = 'bar';
return $instance;
}
@@ -265,82 +280,82 @@ protected function getNewFactoryServiceService()
*/
protected function getServiceFromStaticMethodService()
{
- return $this->services['service_from_static_method'] = \_PhpScoper5ea00cc67502b\Bar\FooClass::getInstance();
+ return $this->services['service_from_static_method'] = FooClass::getInstance();
}
/**
* Gets the public 'tagged_iterator' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getTaggedIteratorService()
{
- return $this->services['tagged_iterator'] = new \_PhpScoper5ea00cc67502b\Bar(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- return new \EmptyIterator();
+ return $this->services['tagged_iterator'] = new Bar(new RewindableGenerator(function () {
+ return new EmptyIterator();
}, 0));
}
/**
* Gets the private 'configurator_service' shared service.
*
- * @return \ConfClass
+ * @return ConfClass
*/
protected function getConfiguratorServiceService()
{
- $this->services['configurator_service'] = $instance = new \_PhpScoper5ea00cc67502b\ConfClass();
- $instance->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && \false ?: '_'});
+ $this->services['configurator_service'] = $instance = new ConfClass();
+ $instance->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
return $instance;
}
/**
* Gets the private 'configurator_service_simple' shared service.
*
- * @return \ConfClass
+ * @return ConfClass
*/
protected function getConfiguratorServiceSimpleService()
{
- return $this->services['configurator_service_simple'] = new \_PhpScoper5ea00cc67502b\ConfClass('bar');
+ return $this->services['configurator_service_simple'] = new ConfClass('bar');
}
/**
* Gets the private 'factory_simple' shared service.
*
- * @return \SimpleFactoryClass
+ * @return SimpleFactoryClass
*
* @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
*/
protected function getFactorySimpleService()
{
- @\trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', \E_USER_DEPRECATED);
- return $this->services['factory_simple'] = new \_PhpScoper5ea00cc67502b\SimpleFactoryClass('foo');
+ @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
+ return $this->services['factory_simple'] = new SimpleFactoryClass('foo');
}
/**
* Gets the private 'inlined' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getInlinedService()
{
- $this->services['inlined'] = $instance = new \_PhpScoper5ea00cc67502b\Bar();
+ $this->services['inlined'] = $instance = new Bar();
$instance->pub = 'pub';
- $instance->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && \false ?: '_'});
+ $instance->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
return $instance;
}
/**
* Gets the private 'new_factory' shared service.
*
- * @return \FactoryClass
+ * @return FactoryClass
*/
protected function getNewFactoryService()
{
- $this->services['new_factory'] = $instance = new \_PhpScoper5ea00cc67502b\FactoryClass();
+ $this->services['new_factory'] = $instance = new FactoryClass();
$instance->foo = 'bar';
return $instance;
}
/**
* Gets the private 'tagged_iterator_foo' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getTaggedIteratorFooService()
{
- return $this->services['tagged_iterator_foo'] = new \_PhpScoper5ea00cc67502b\Bar();
+ return $this->services['tagged_iterator_foo'] = new Bar();
}
/**
* Gets the default parameters.
@@ -358,4 +373,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php
index 28b9aa24a..6eb2985ea 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_compiled.php
@@ -2,6 +2,7 @@
namespace _PhpScoper5ea00cc67502b;
+use _PhpScoper5ea00cc67502b\Bar\FooClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
@@ -9,13 +10,27 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use Bar;
+use Baz;
+use EmptyIterator;
+use Foo;
+use FooBarBaz;
+use SimpleFactoryClass;
+use stdClass;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,27 +38,27 @@ public function __construct()
{
$this->parameters = $this->getDefaultParameters();
$this->services = [];
- $this->syntheticIds = ['request' => \true];
+ $this->syntheticIds = ['request' => true];
$this->methodMap = ['bar' => 'getBarService', 'baz' => 'getBazService', 'configured_service' => 'getConfiguredServiceService', 'configured_service_simple' => 'getConfiguredServiceSimpleService', 'decorator_service' => 'getDecoratorServiceService', 'decorator_service_with_name' => 'getDecoratorServiceWithNameService', 'deprecated_service' => 'getDeprecatedServiceService', 'factory_service' => 'getFactoryServiceService', 'factory_service_simple' => 'getFactoryServiceSimpleService', 'factory_simple' => 'getFactorySimpleService', 'foo' => 'getFooService', 'foo.baz' => 'getFoo_BazService', 'foo_bar' => 'getFooBarService', 'foo_with_inline' => 'getFooWithInlineService', 'lazy_context' => 'getLazyContextService', 'lazy_context_ignore_invalid_ref' => 'getLazyContextIgnoreInvalidRefService', 'method_call1' => 'getMethodCall1Service', 'new_factory_service' => 'getNewFactoryServiceService', 'service_from_static_method' => 'getServiceFromStaticMethodService', 'tagged_iterator' => 'getTaggedIteratorService', 'tagged_iterator_foo' => 'getTaggedIteratorFooService'];
- $this->privates = ['factory_simple' => \true, 'tagged_iterator_foo' => \true];
+ $this->privates = ['factory_simple' => true, 'tagged_iterator_foo' => true];
$this->aliases = ['alias_for_alias' => 'foo', 'alias_for_foo' => 'foo', 'decorated' => 'decorator_service_with_name'];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'configurator_service' => \true, 'configurator_service_simple' => \true, 'decorated.pif-pouf' => \true, 'decorator_service.inner' => \true, 'factory_simple' => \true, 'inlined' => \true, 'new_factory' => \true, 'tagged_iterator_foo' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'configurator_service' => true, 'configurator_service_simple' => true, 'decorated.pif-pouf' => true, 'decorator_service.inner' => true, 'factory_simple' => true, 'inlined' => true, 'new_factory' => true, 'tagged_iterator_foo' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
@@ -52,93 +67,93 @@ public function isFrozen()
*/
protected function getBarService()
{
- $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'};
- $this->services['bar'] = $instance = new \_PhpScoper5ea00cc67502b\Bar\FooClass('foo', $a, $this->getParameter('foo_bar'));
+ $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
+ $this->services['bar'] = $instance = new FooClass('foo', $a, $this->getParameter('foo_bar'));
$a->configure($instance);
return $instance;
}
/**
* Gets the public 'baz' shared service.
*
- * @return \Baz
+ * @return Baz
*/
protected function getBazService()
{
- $this->services['baz'] = $instance = new \_PhpScoper5ea00cc67502b\Baz();
- $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && \false ?: '_'});
+ $this->services['baz'] = $instance = new Baz();
+ $instance->setFoo(${($_ = isset($this->services['foo_with_inline']) ? $this->services['foo_with_inline'] : $this->getFooWithInlineService()) && false ?: '_'});
return $instance;
}
/**
* Gets the public 'configured_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConfiguredServiceService()
{
- $this->services['configured_service'] = $instance = new \stdClass();
- $a = new \_PhpScoper5ea00cc67502b\ConfClass();
- $a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && \false ?: '_'});
+ $this->services['configured_service'] = $instance = new stdClass();
+ $a = new ConfClass();
+ $a->setFoo(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
$a->configureStdClass($instance);
return $instance;
}
/**
* Gets the public 'configured_service_simple' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConfiguredServiceSimpleService()
{
- $this->services['configured_service_simple'] = $instance = new \stdClass();
- (new \_PhpScoper5ea00cc67502b\ConfClass('bar'))->configureStdClass($instance);
+ $this->services['configured_service_simple'] = $instance = new stdClass();
+ (new ConfClass('bar'))->configureStdClass($instance);
return $instance;
}
/**
* Gets the public 'decorator_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getDecoratorServiceService()
{
- return $this->services['decorator_service'] = new \stdClass();
+ return $this->services['decorator_service'] = new stdClass();
}
/**
* Gets the public 'decorator_service_with_name' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getDecoratorServiceWithNameService()
{
- return $this->services['decorator_service_with_name'] = new \stdClass();
+ return $this->services['decorator_service_with_name'] = new stdClass();
}
/**
* Gets the public 'deprecated_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*
* @deprecated The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.
*/
protected function getDeprecatedServiceService()
{
- @\trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', \E_USER_DEPRECATED);
- return $this->services['deprecated_service'] = new \stdClass();
+ @trigger_error('The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
+ return $this->services['deprecated_service'] = new stdClass();
}
/**
* Gets the public 'factory_service' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getFactoryServiceService()
{
- return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'}->getInstance();
+ return $this->services['factory_service'] = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'}->getInstance();
}
/**
* Gets the public 'factory_service_simple' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getFactoryServiceSimpleService()
{
- return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && \false ?: '_'}->getInstance();
+ return $this->services['factory_service_simple'] = ${($_ = isset($this->services['factory_simple']) ? $this->services['factory_simple'] : $this->getFactorySimpleService()) && false ?: '_'}->getInstance();
}
/**
* Gets the public 'foo' shared service.
@@ -147,14 +162,14 @@ protected function getFactoryServiceSimpleService()
*/
protected function getFooService()
{
- $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'};
- $this->services['foo'] = $instance = \_PhpScoper5ea00cc67502b\Bar\FooClass::getInstance('foo', $a, ['bar' => 'foo is bar', 'foobar' => 'bar'], \true, $this);
+ $a = ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'};
+ $this->services['foo'] = $instance = FooClass::getInstance('foo', $a, ['bar' => 'foo is bar', 'foobar' => 'bar'], true, $this);
$instance->foo = 'bar';
$instance->moo = $a;
$instance->qux = ['bar' => 'foo is bar', 'foobar' => 'bar'];
- $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && \false ?: '_'});
+ $instance->setBar(${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'});
$instance->initialize();
- \_PhpScoper5ea00cc67502b\sc_configure($instance);
+ sc_configure($instance);
return $instance;
}
/**
@@ -164,8 +179,8 @@ protected function getFooService()
*/
protected function getFoo_BazService()
{
- $this->services['foo.baz'] = $instance = \_PhpScoper5ea00cc67502b\BazClass::getInstance();
- \_PhpScoper5ea00cc67502b\BazClass::configureStatic1($instance);
+ $this->services['foo.baz'] = $instance = BazClass::getInstance();
+ BazClass::configureStatic1($instance);
return $instance;
}
/**
@@ -175,19 +190,19 @@ protected function getFoo_BazService()
*/
protected function getFooBarService()
{
- return new \_PhpScoper5ea00cc67502b\Bar\FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && \false ?: '_'});
+ return new FooClass(${($_ = isset($this->services['deprecated_service']) ? $this->services['deprecated_service'] : $this->getDeprecatedServiceService()) && false ?: '_'});
}
/**
* Gets the public 'foo_with_inline' shared service.
*
- * @return \Foo
+ * @return Foo
*/
protected function getFooWithInlineService()
{
- $this->services['foo_with_inline'] = $instance = new \_PhpScoper5ea00cc67502b\Foo();
- $a = new \_PhpScoper5ea00cc67502b\Bar();
+ $this->services['foo_with_inline'] = $instance = new Foo();
+ $a = new Bar();
$a->pub = 'pub';
- $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && \false ?: '_'});
+ $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'});
$instance->setBar($a);
return $instance;
}
@@ -198,11 +213,11 @@ protected function getFooWithInlineService()
*/
protected function getLazyContextService()
{
- return $this->services['lazy_context'] = new \_PhpScoper5ea00cc67502b\LazyContext(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- (yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'});
+ return $this->services['lazy_context'] = new LazyContext(new RewindableGenerator(function () {
+ (yield 'k1' => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'});
(yield 'k2' => $this);
- }, 2), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- return new \EmptyIterator();
+ }, 2), new RewindableGenerator(function () {
+ return new EmptyIterator();
}, 0));
}
/**
@@ -212,10 +227,10 @@ protected function getLazyContextService()
*/
protected function getLazyContextIgnoreInvalidRefService()
{
- return $this->services['lazy_context_ignore_invalid_ref'] = new \_PhpScoper5ea00cc67502b\LazyContext(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- (yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && \false ?: '_'});
- }, 1), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- return new \EmptyIterator();
+ return $this->services['lazy_context_ignore_invalid_ref'] = new LazyContext(new RewindableGenerator(function () {
+ (yield 0 => ${($_ = isset($this->services['foo.baz']) ? $this->services['foo.baz'] : $this->getFoo_BazService()) && false ?: '_'});
+ }, 1), new RewindableGenerator(function () {
+ return new EmptyIterator();
}, 0));
}
/**
@@ -226,20 +241,20 @@ protected function getLazyContextIgnoreInvalidRefService()
protected function getMethodCall1Service()
{
include_once '%path%foo.php';
- $this->services['method_call1'] = $instance = new \_PhpScoper5ea00cc67502b\Bar\FooClass();
- $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'});
- $instance->setBar(\NULL);
- $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'}->foo() . ($this->hasParameter("foo") ? $this->getParameter("foo") : "default"));
+ $this->services['method_call1'] = $instance = new FooClass();
+ $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
+ $instance->setBar(NULL);
+ $instance->setBar(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}->foo() . ($this->hasParameter("foo") ? $this->getParameter("foo") : "default"));
return $instance;
}
/**
* Gets the public 'new_factory_service' shared service.
*
- * @return \FooBarBaz
+ * @return FooBarBaz
*/
protected function getNewFactoryServiceService()
{
- $a = new \_PhpScoper5ea00cc67502b\FactoryClass();
+ $a = new FactoryClass();
$a->foo = 'bar';
$this->services['new_factory_service'] = $instance = $a->getInstance();
$instance->foo = 'bar';
@@ -252,48 +267,48 @@ protected function getNewFactoryServiceService()
*/
protected function getServiceFromStaticMethodService()
{
- return $this->services['service_from_static_method'] = \_PhpScoper5ea00cc67502b\Bar\FooClass::getInstance();
+ return $this->services['service_from_static_method'] = FooClass::getInstance();
}
/**
* Gets the public 'tagged_iterator' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getTaggedIteratorService()
{
- return $this->services['tagged_iterator'] = new \_PhpScoper5ea00cc67502b\Bar(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
- (yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'});
- (yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : ($this->services['tagged_iterator_foo'] = new \_PhpScoper5ea00cc67502b\Bar())) && \false ?: '_'});
+ return $this->services['tagged_iterator'] = new Bar(new RewindableGenerator(function () {
+ (yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
+ (yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : ($this->services['tagged_iterator_foo'] = new Bar())) && false ?: '_'});
}, 2));
}
/**
* Gets the private 'factory_simple' shared service.
*
- * @return \SimpleFactoryClass
+ * @return SimpleFactoryClass
*
* @deprecated The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.
*/
protected function getFactorySimpleService()
{
- @\trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', \E_USER_DEPRECATED);
- return $this->services['factory_simple'] = new \_PhpScoper5ea00cc67502b\SimpleFactoryClass('foo');
+ @trigger_error('The "factory_simple" service is deprecated. You should stop using it, as it will soon be removed.', E_USER_DEPRECATED);
+ return $this->services['factory_simple'] = new SimpleFactoryClass('foo');
}
/**
* Gets the private 'tagged_iterator_foo' shared service.
*
- * @return \Bar
+ * @return Bar
*/
protected function getTaggedIteratorFooService()
{
- return $this->services['tagged_iterator_foo'] = new \_PhpScoper5ea00cc67502b\Bar();
+ return $this->services['tagged_iterator_foo'] = new Bar();
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -305,11 +320,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -318,7 +333,7 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
@@ -335,15 +350,15 @@ public function getParameterBag()
*/
private function getDynamicParameter($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -366,4 +381,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php
index 0f839c9c7..4dc072b11 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php
@@ -2,6 +2,13 @@
namespace _PhpScoper5ea00cc67502b;
+use _PhpScoper5ea00cc67502b\App\Bus;
+use _PhpScoper5ea00cc67502b\App\Db;
+use _PhpScoper5ea00cc67502b\App\Handler1;
+use _PhpScoper5ea00cc67502b\App\Handler2;
+use _PhpScoper5ea00cc67502b\App\Processor;
+use _PhpScoper5ea00cc67502b\App\Registry;
+use _PhpScoper5ea00cc67502b\App\Schema;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
@@ -9,13 +16,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -24,25 +36,25 @@ public function __construct()
$this->services = [];
$this->normalizedIds = ['_PhpScoper5ea00cc67502b\\app\\bus' => '_PhpScoper5ea00cc67502b\\App\\Bus', '_PhpScoper5ea00cc67502b\\app\\db' => '_PhpScoper5ea00cc67502b\\App\\Db', '_PhpScoper5ea00cc67502b\\app\\handler1' => '_PhpScoper5ea00cc67502b\\App\\Handler1', '_PhpScoper5ea00cc67502b\\app\\handler2' => '_PhpScoper5ea00cc67502b\\App\\Handler2', '_PhpScoper5ea00cc67502b\\app\\processor' => '_PhpScoper5ea00cc67502b\\App\\Processor', '_PhpScoper5ea00cc67502b\\app\\registry' => '_PhpScoper5ea00cc67502b\\App\\Registry', '_PhpScoper5ea00cc67502b\\app\\schema' => '_PhpScoper5ea00cc67502b\\App\\Schema'];
$this->methodMap = ['_PhpScoper5ea00cc67502b\\App\\Bus' => 'getBusService', '_PhpScoper5ea00cc67502b\\App\\Db' => 'getDbService', '_PhpScoper5ea00cc67502b\\App\\Handler1' => 'getHandler1Service', '_PhpScoper5ea00cc67502b\\App\\Handler2' => 'getHandler2Service', '_PhpScoper5ea00cc67502b\\App\\Processor' => 'getProcessorService', '_PhpScoper5ea00cc67502b\\App\\Registry' => 'getRegistryService', '_PhpScoper5ea00cc67502b\\App\\Schema' => 'getSchemaService'];
- $this->privates = ['_PhpScoper5ea00cc67502b\\App\\Handler1' => \true, '_PhpScoper5ea00cc67502b\\App\\Handler2' => \true, '_PhpScoper5ea00cc67502b\\App\\Processor' => \true, '_PhpScoper5ea00cc67502b\\App\\Registry' => \true, '_PhpScoper5ea00cc67502b\\App\\Schema' => \true];
+ $this->privates = ['_PhpScoper5ea00cc67502b\\App\\Handler1' => true, '_PhpScoper5ea00cc67502b\\App\\Handler2' => true, '_PhpScoper5ea00cc67502b\\App\\Processor' => true, '_PhpScoper5ea00cc67502b\\App\\Registry' => true, '_PhpScoper5ea00cc67502b\\App\\Schema' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\App\\Handler1' => \true, '_PhpScoper5ea00cc67502b\\App\\Handler2' => \true, '_PhpScoper5ea00cc67502b\\App\\Processor' => \true, '_PhpScoper5ea00cc67502b\\App\\Registry' => \true, '_PhpScoper5ea00cc67502b\\App\\Schema' => \true, '_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\App\\Handler1' => true, '_PhpScoper5ea00cc67502b\\App\\Handler2' => true, '_PhpScoper5ea00cc67502b\\App\\Processor' => true, '_PhpScoper5ea00cc67502b\\App\\Registry' => true, '_PhpScoper5ea00cc67502b\\App\\Schema' => true, '_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'App\Bus' shared service.
@@ -51,9 +63,9 @@ public function isFrozen()
*/
protected function getBusService()
{
- $this->services['App\\Bus'] = $instance = new \_PhpScoper5ea00cc67502b\App\Bus(${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && \false ?: '_'});
- $instance->handler1 = ${($_ = isset($this->services['App\\Handler1']) ? $this->services['App\\Handler1'] : $this->getHandler1Service()) && \false ?: '_'};
- $instance->handler2 = ${($_ = isset($this->services['App\\Handler2']) ? $this->services['App\\Handler2'] : $this->getHandler2Service()) && \false ?: '_'};
+ $this->services['App\\Bus'] = $instance = new Bus(${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && false ?: '_'});
+ $instance->handler1 = ${($_ = isset($this->services['App\\Handler1']) ? $this->services['App\\Handler1'] : $this->getHandler1Service()) && false ?: '_'};
+ $instance->handler2 = ${($_ = isset($this->services['App\\Handler2']) ? $this->services['App\\Handler2'] : $this->getHandler2Service()) && false ?: '_'};
return $instance;
}
/**
@@ -63,8 +75,8 @@ protected function getBusService()
*/
protected function getDbService()
{
- $this->services['App\\Db'] = $instance = new \_PhpScoper5ea00cc67502b\App\Db();
- $instance->schema = ${($_ = isset($this->services['App\\Schema']) ? $this->services['App\\Schema'] : $this->getSchemaService()) && \false ?: '_'};
+ $this->services['App\\Db'] = $instance = new Db();
+ $instance->schema = ${($_ = isset($this->services['App\\Schema']) ? $this->services['App\\Schema'] : $this->getSchemaService()) && false ?: '_'};
return $instance;
}
/**
@@ -74,11 +86,11 @@ protected function getDbService()
*/
protected function getHandler1Service()
{
- $a = ${($_ = isset($this->services['App\\Processor']) ? $this->services['App\\Processor'] : $this->getProcessorService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['App\\Processor']) ? $this->services['App\\Processor'] : $this->getProcessorService()) && false ?: '_'};
if (isset($this->services['App\\Handler1'])) {
return $this->services['App\\Handler1'];
}
- return $this->services['App\\Handler1'] = new \_PhpScoper5ea00cc67502b\App\Handler1(${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && \false ?: '_'}, ${($_ = isset($this->services['App\\Schema']) ? $this->services['App\\Schema'] : $this->getSchemaService()) && \false ?: '_'}, $a);
+ return $this->services['App\\Handler1'] = new Handler1(${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && false ?: '_'}, ${($_ = isset($this->services['App\\Schema']) ? $this->services['App\\Schema'] : $this->getSchemaService()) && false ?: '_'}, $a);
}
/**
* Gets the private 'App\Handler2' shared service.
@@ -87,11 +99,11 @@ protected function getHandler1Service()
*/
protected function getHandler2Service()
{
- $a = ${($_ = isset($this->services['App\\Processor']) ? $this->services['App\\Processor'] : $this->getProcessorService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['App\\Processor']) ? $this->services['App\\Processor'] : $this->getProcessorService()) && false ?: '_'};
if (isset($this->services['App\\Handler2'])) {
return $this->services['App\\Handler2'];
}
- return $this->services['App\\Handler2'] = new \_PhpScoper5ea00cc67502b\App\Handler2(${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && \false ?: '_'}, ${($_ = isset($this->services['App\\Schema']) ? $this->services['App\\Schema'] : $this->getSchemaService()) && \false ?: '_'}, $a);
+ return $this->services['App\\Handler2'] = new Handler2(${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && false ?: '_'}, ${($_ = isset($this->services['App\\Schema']) ? $this->services['App\\Schema'] : $this->getSchemaService()) && false ?: '_'}, $a);
}
/**
* Gets the private 'App\Processor' shared service.
@@ -100,11 +112,11 @@ protected function getHandler2Service()
*/
protected function getProcessorService()
{
- $a = ${($_ = isset($this->services['App\\Registry']) ? $this->services['App\\Registry'] : $this->getRegistryService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['App\\Registry']) ? $this->services['App\\Registry'] : $this->getRegistryService()) && false ?: '_'};
if (isset($this->services['App\\Processor'])) {
return $this->services['App\\Processor'];
}
- return $this->services['App\\Processor'] = new \_PhpScoper5ea00cc67502b\App\Processor($a, ${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && \false ?: '_'});
+ return $this->services['App\\Processor'] = new Processor($a, ${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && false ?: '_'});
}
/**
* Gets the private 'App\Registry' shared service.
@@ -113,8 +125,8 @@ protected function getProcessorService()
*/
protected function getRegistryService()
{
- $this->services['App\\Registry'] = $instance = new \_PhpScoper5ea00cc67502b\App\Registry();
- $instance->processor = [0 => ${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && \false ?: '_'}, 1 => ${($_ = isset($this->services['App\\Bus']) ? $this->services['App\\Bus'] : $this->getBusService()) && \false ?: '_'}];
+ $this->services['App\\Registry'] = $instance = new Registry();
+ $instance->processor = [0 => ${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && false ?: '_'}, 1 => ${($_ = isset($this->services['App\\Bus']) ? $this->services['App\\Bus'] : $this->getBusService()) && false ?: '_'}];
return $instance;
}
/**
@@ -124,11 +136,11 @@ protected function getRegistryService()
*/
protected function getSchemaService()
{
- $a = ${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['App\\Db']) ? $this->services['App\\Db'] : $this->getDbService()) && false ?: '_'};
if (isset($this->services['App\\Schema'])) {
return $this->services['App\\Schema'];
}
- return $this->services['App\\Schema'] = new \_PhpScoper5ea00cc67502b\App\Schema($a);
+ return $this->services['App\\Schema'] = new Schema($a);
}
}
/**
@@ -137,4 +149,4 @@ protected function getSchemaService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php
index 344947f06..9e07b888f 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,25 +30,25 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['bar2' => 'getBar2Service', 'bar3' => 'getBar3Service', 'bar6' => 'getBar6Service', 'baz6' => 'getBaz6Service', 'connection' => 'getConnectionService', 'connection2' => 'getConnection2Service', 'foo' => 'getFooService', 'foo2' => 'getFoo2Service', 'foo5' => 'getFoo5Service', 'foo6' => 'getFoo6Service', 'foobar4' => 'getFoobar4Service', 'level2' => 'getLevel2Service', 'level3' => 'getLevel3Service', 'level4' => 'getLevel4Service', 'level5' => 'getLevel5Service', 'level6' => 'getLevel6Service', 'listener3' => 'getListener3Service', 'listener4' => 'getListener4Service', 'logger' => 'getLoggerService', 'manager' => 'getManagerService', 'manager2' => 'getManager2Service', 'manager3' => 'getManager3Service', 'manager4' => 'getManager4Service', 'multiuse1' => 'getMultiuse1Service', 'root' => 'getRootService', 'subscriber' => 'getSubscriberService'];
- $this->privates = ['bar6' => \true, 'level2' => \true, 'level3' => \true, 'level4' => \true, 'level5' => \true, 'level6' => \true, 'manager4' => \true, 'multiuse1' => \true];
+ $this->privates = ['bar6' => true, 'level2' => true, 'level3' => true, 'level4' => true, 'level5' => true, 'level6' => true, 'manager4' => true, 'multiuse1' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'bar' => \true, 'bar5' => \true, 'bar6' => \true, 'config' => \true, 'config2' => \true, 'connection3' => \true, 'connection4' => \true, 'dispatcher' => \true, 'dispatcher2' => \true, 'foo4' => \true, 'foobar' => \true, 'foobar2' => \true, 'foobar3' => \true, 'level2' => \true, 'level3' => \true, 'level4' => \true, 'level5' => \true, 'level6' => \true, 'logger2' => \true, 'manager4' => \true, 'multiuse1' => \true, 'subscriber2' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar' => true, 'bar5' => true, 'bar6' => true, 'config' => true, 'config2' => true, 'connection3' => true, 'connection4' => true, 'dispatcher' => true, 'dispatcher2' => true, 'foo4' => true, 'foobar' => true, 'foobar2' => true, 'foobar3' => true, 'level2' => true, 'level3' => true, 'level4' => true, 'level5' => true, 'level6' => true, 'logger2' => true, 'manager4' => true, 'multiuse1' => true, 'subscriber2' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar2' shared service.
@@ -50,8 +57,8 @@ public function isFrozen()
*/
protected function getBar2Service()
{
- $this->services['bar2'] = $instance = new \_PhpScoper5ea00cc67502b\BarCircular();
- $instance->addFoobar(new \_PhpScoper5ea00cc67502b\FoobarCircular(${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && \false ?: '_'}));
+ $this->services['bar2'] = $instance = new BarCircular();
+ $instance->addFoobar(new FoobarCircular(${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && false ?: '_'}));
return $instance;
}
/**
@@ -61,51 +68,51 @@ protected function getBar2Service()
*/
protected function getBar3Service()
{
- $this->services['bar3'] = $instance = new \_PhpScoper5ea00cc67502b\BarCircular();
- $a = new \_PhpScoper5ea00cc67502b\FoobarCircular();
+ $this->services['bar3'] = $instance = new BarCircular();
+ $a = new FoobarCircular();
$instance->addFoobar($a, $a);
return $instance;
}
/**
* Gets the public 'baz6' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBaz6Service()
{
- $this->services['baz6'] = $instance = new \stdClass();
- $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && \false ?: '_'};
+ $this->services['baz6'] = $instance = new stdClass();
+ $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'connection' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConnectionService()
{
- $a = new \stdClass();
- $b = new \stdClass();
- $this->services['connection'] = $instance = new \stdClass($a, $b);
- $b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && \false ?: '_'};
- $a->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && \false ?: '_'};
+ $a = new stdClass();
+ $b = new stdClass();
+ $this->services['connection'] = $instance = new stdClass($a, $b);
+ $b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'};
+ $a->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'connection2' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConnection2Service()
{
- $a = new \stdClass();
- $b = new \stdClass();
- $this->services['connection2'] = $instance = new \stdClass($a, $b);
- $c = new \stdClass($instance);
- $d = ${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && \false ?: '_'};
- $c->handler2 = new \stdClass($d);
+ $a = new stdClass();
+ $b = new stdClass();
+ $this->services['connection2'] = $instance = new stdClass($a, $b);
+ $c = new stdClass($instance);
+ $d = ${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'};
+ $c->handler2 = new stdClass($d);
$b->logger2 = $c;
- $a->subscriber2 = new \stdClass($d);
+ $a->subscriber2 = new stdClass($d);
return $instance;
}
/**
@@ -115,9 +122,9 @@ protected function getConnection2Service()
*/
protected function getFooService()
{
- $a = new \_PhpScoper5ea00cc67502b\BarCircular();
- $this->services['foo'] = $instance = new \_PhpScoper5ea00cc67502b\FooCircular($a);
- $a->addFoobar(new \_PhpScoper5ea00cc67502b\FoobarCircular($instance));
+ $a = new BarCircular();
+ $this->services['foo'] = $instance = new FooCircular($a);
+ $a->addFoobar(new FoobarCircular($instance));
return $instance;
}
/**
@@ -127,21 +134,21 @@ protected function getFooService()
*/
protected function getFoo2Service()
{
- $a = ${($_ = isset($this->services['bar2']) ? $this->services['bar2'] : $this->getBar2Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['bar2']) ? $this->services['bar2'] : $this->getBar2Service()) && false ?: '_'};
if (isset($this->services['foo2'])) {
return $this->services['foo2'];
}
- return $this->services['foo2'] = new \_PhpScoper5ea00cc67502b\FooCircular($a);
+ return $this->services['foo2'] = new FooCircular($a);
}
/**
* Gets the public 'foo5' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo5Service()
{
- $this->services['foo5'] = $instance = new \stdClass();
- $a = new \stdClass($instance);
+ $this->services['foo5'] = $instance = new stdClass();
+ $a = new stdClass($instance);
$a->foo = $instance;
$instance->bar = $a;
return $instance;
@@ -149,140 +156,140 @@ protected function getFoo5Service()
/**
* Gets the public 'foo6' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo6Service()
{
- $this->services['foo6'] = $instance = new \stdClass();
- $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && \false ?: '_'};
+ $this->services['foo6'] = $instance = new stdClass();
+ $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'foobar4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoobar4Service()
{
- $a = new \stdClass();
- $this->services['foobar4'] = $instance = new \stdClass($a);
+ $a = new stdClass();
+ $this->services['foobar4'] = $instance = new stdClass($a);
$a->foobar = $instance;
return $instance;
}
/**
* Gets the public 'listener3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getListener3Service()
{
- $this->services['listener3'] = $instance = new \stdClass();
- $instance->manager = ${($_ = isset($this->services['manager3']) ? $this->services['manager3'] : $this->getManager3Service()) && \false ?: '_'};
+ $this->services['listener3'] = $instance = new stdClass();
+ $instance->manager = ${($_ = isset($this->services['manager3']) ? $this->services['manager3'] : $this->getManager3Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'listener4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getListener4Service()
{
- $a = ${($_ = isset($this->services['manager4']) ? $this->services['manager4'] : $this->getManager4Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['manager4']) ? $this->services['manager4'] : $this->getManager4Service()) && false ?: '_'};
if (isset($this->services['listener4'])) {
return $this->services['listener4'];
}
- return $this->services['listener4'] = new \stdClass($a);
+ return $this->services['listener4'] = new stdClass($a);
}
/**
* Gets the public 'logger' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLoggerService()
{
- $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
if (isset($this->services['logger'])) {
return $this->services['logger'];
}
- $this->services['logger'] = $instance = new \stdClass($a);
- $instance->handler = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && \false ?: '_'});
+ $this->services['logger'] = $instance = new stdClass($a);
+ $instance->handler = new stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'});
return $instance;
}
/**
* Gets the public 'manager' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getManagerService()
{
- $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
if (isset($this->services['manager'])) {
return $this->services['manager'];
}
- return $this->services['manager'] = new \stdClass($a);
+ return $this->services['manager'] = new stdClass($a);
}
/**
* Gets the public 'manager2' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getManager2Service()
{
- $a = ${($_ = isset($this->services['connection2']) ? $this->services['connection2'] : $this->getConnection2Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection2']) ? $this->services['connection2'] : $this->getConnection2Service()) && false ?: '_'};
if (isset($this->services['manager2'])) {
return $this->services['manager2'];
}
- return $this->services['manager2'] = new \stdClass($a);
+ return $this->services['manager2'] = new stdClass($a);
}
/**
* Gets the public 'manager3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getManager3Service($lazyLoad = \true)
+ protected function getManager3Service($lazyLoad = true)
{
- $a = ${($_ = isset($this->services['listener3']) ? $this->services['listener3'] : $this->getListener3Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['listener3']) ? $this->services['listener3'] : $this->getListener3Service()) && false ?: '_'};
if (isset($this->services['manager3'])) {
return $this->services['manager3'];
}
- $b = new \stdClass();
+ $b = new stdClass();
$b->listener = [0 => $a];
- return $this->services['manager3'] = new \stdClass($b);
+ return $this->services['manager3'] = new stdClass($b);
}
/**
* Gets the public 'root' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getRootService()
{
- return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && \false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['root'] = new stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the public 'subscriber' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getSubscriberService()
{
- $a = ${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'};
if (isset($this->services['subscriber'])) {
return $this->services['subscriber'];
}
- return $this->services['subscriber'] = new \stdClass($a);
+ return $this->services['subscriber'] = new stdClass($a);
}
/**
* Gets the private 'bar6' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBar6Service()
{
- $a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && false ?: '_'};
if (isset($this->services['bar6'])) {
return $this->services['bar6'];
}
- return $this->services['bar6'] = new \stdClass($a);
+ return $this->services['bar6'] = new stdClass($a);
}
/**
* Gets the private 'level2' shared service.
@@ -291,40 +298,40 @@ protected function getBar6Service()
*/
protected function getLevel2Service()
{
- $this->services['level2'] = $instance = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls();
- $instance->call(${($_ = isset($this->services['level3']) ? $this->services['level3'] : $this->getLevel3Service()) && \false ?: '_'});
+ $this->services['level2'] = $instance = new FooForCircularWithAddCalls();
+ $instance->call(${($_ = isset($this->services['level3']) ? $this->services['level3'] : $this->getLevel3Service()) && false ?: '_'});
return $instance;
}
/**
* Gets the private 'level3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLevel3Service()
{
- return $this->services['level3'] = new \stdClass(${($_ = isset($this->services['level4']) ? $this->services['level4'] : $this->getLevel4Service()) && \false ?: '_'});
+ return $this->services['level3'] = new stdClass(${($_ = isset($this->services['level4']) ? $this->services['level4'] : $this->getLevel4Service()) && false ?: '_'});
}
/**
* Gets the private 'level4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLevel4Service()
{
- return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && \false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && \false ?: '_'});
+ return $this->services['level4'] = new stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new stdClass())) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'});
}
/**
* Gets the private 'level5' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLevel5Service()
{
- $a = ${($_ = isset($this->services['level6']) ? $this->services['level6'] : $this->getLevel6Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['level6']) ? $this->services['level6'] : $this->getLevel6Service()) && false ?: '_'};
if (isset($this->services['level5'])) {
return $this->services['level5'];
}
- return $this->services['level5'] = new \stdClass($a);
+ return $this->services['level5'] = new stdClass($a);
}
/**
* Gets the private 'level6' shared service.
@@ -333,30 +340,30 @@ protected function getLevel5Service()
*/
protected function getLevel6Service()
{
- $this->services['level6'] = $instance = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls();
- $instance->call(${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && \false ?: '_'});
+ $this->services['level6'] = $instance = new FooForCircularWithAddCalls();
+ $instance->call(${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'});
return $instance;
}
/**
* Gets the private 'manager4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getManager4Service($lazyLoad = \true)
+ protected function getManager4Service($lazyLoad = true)
{
- $a = new \stdClass();
- $this->services['manager4'] = $instance = new \stdClass($a);
- $a->listener = [0 => ${($_ = isset($this->services['listener4']) ? $this->services['listener4'] : $this->getListener4Service()) && \false ?: '_'}];
+ $a = new stdClass();
+ $this->services['manager4'] = $instance = new stdClass($a);
+ $a->listener = [0 => ${($_ = isset($this->services['listener4']) ? $this->services['listener4'] : $this->getListener4Service()) && false ?: '_'}];
return $instance;
}
/**
* Gets the private 'multiuse1' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getMultiuse1Service()
{
- return $this->services['multiuse1'] = new \stdClass();
+ return $this->services['multiuse1'] = new stdClass();
}
}
/**
@@ -365,4 +372,4 @@ protected function getMultiuse1Service()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Almost_Circular_Private', 'Symfony_DI_PhpDumper_Test_Almost_Circular_Private', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Almost_Circular_Private', 'Symfony_DI_PhpDumper_Test_Almost_Circular_Private', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php
index 2b6867779..9b92dc98d 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,25 +30,25 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['bar' => 'getBarService', 'bar3' => 'getBar3Service', 'bar5' => 'getBar5Service', 'bar6' => 'getBar6Service', 'baz6' => 'getBaz6Service', 'connection' => 'getConnectionService', 'connection2' => 'getConnection2Service', 'connection3' => 'getConnection3Service', 'connection4' => 'getConnection4Service', 'dispatcher' => 'getDispatcherService', 'dispatcher2' => 'getDispatcher2Service', 'foo' => 'getFooService', 'foo2' => 'getFoo2Service', 'foo4' => 'getFoo4Service', 'foo5' => 'getFoo5Service', 'foo6' => 'getFoo6Service', 'foobar' => 'getFoobarService', 'foobar2' => 'getFoobar2Service', 'foobar3' => 'getFoobar3Service', 'foobar4' => 'getFoobar4Service', 'level2' => 'getLevel2Service', 'level3' => 'getLevel3Service', 'level4' => 'getLevel4Service', 'level5' => 'getLevel5Service', 'level6' => 'getLevel6Service', 'listener3' => 'getListener3Service', 'listener4' => 'getListener4Service', 'logger' => 'getLoggerService', 'manager' => 'getManagerService', 'manager2' => 'getManager2Service', 'manager3' => 'getManager3Service', 'manager4' => 'getManager4Service', 'multiuse1' => 'getMultiuse1Service', 'root' => 'getRootService', 'subscriber' => 'getSubscriberService'];
- $this->privates = ['bar6' => \true, 'level2' => \true, 'level3' => \true, 'level4' => \true, 'level5' => \true, 'level6' => \true, 'manager4' => \true, 'multiuse1' => \true];
+ $this->privates = ['bar6' => true, 'level2' => true, 'level3' => true, 'level4' => true, 'level5' => true, 'level6' => true, 'manager4' => true, 'multiuse1' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'bar2' => \true, 'bar6' => \true, 'config' => \true, 'config2' => \true, 'level2' => \true, 'level3' => \true, 'level4' => \true, 'level5' => \true, 'level6' => \true, 'logger2' => \true, 'manager4' => \true, 'multiuse1' => \true, 'subscriber2' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar2' => true, 'bar6' => true, 'config' => true, 'config2' => true, 'level2' => true, 'level3' => true, 'level4' => true, 'level5' => true, 'level6' => true, 'logger2' => true, 'manager4' => true, 'multiuse1' => true, 'subscriber2' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
@@ -50,8 +57,8 @@ public function isFrozen()
*/
protected function getBarService()
{
- $this->services['bar'] = $instance = new \_PhpScoper5ea00cc67502b\BarCircular();
- $instance->addFoobar(${($_ = isset($this->services['foobar']) ? $this->services['foobar'] : $this->getFoobarService()) && \false ?: '_'});
+ $this->services['bar'] = $instance = new BarCircular();
+ $instance->addFoobar(${($_ = isset($this->services['foobar']) ? $this->services['foobar'] : $this->getFoobarService()) && false ?: '_'});
return $instance;
}
/**
@@ -61,113 +68,113 @@ protected function getBarService()
*/
protected function getBar3Service()
{
- $this->services['bar3'] = $instance = new \_PhpScoper5ea00cc67502b\BarCircular();
- $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : ($this->services['foobar3'] = new \_PhpScoper5ea00cc67502b\FoobarCircular())) && \false ?: '_'};
+ $this->services['bar3'] = $instance = new BarCircular();
+ $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : ($this->services['foobar3'] = new FoobarCircular())) && false ?: '_'};
$instance->addFoobar($a, $a);
return $instance;
}
/**
* Gets the public 'bar5' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBar5Service()
{
- $a = ${($_ = isset($this->services['foo5']) ? $this->services['foo5'] : $this->getFoo5Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['foo5']) ? $this->services['foo5'] : $this->getFoo5Service()) && false ?: '_'};
if (isset($this->services['bar5'])) {
return $this->services['bar5'];
}
- $this->services['bar5'] = $instance = new \stdClass($a);
+ $this->services['bar5'] = $instance = new stdClass($a);
$instance->foo = $a;
return $instance;
}
/**
* Gets the public 'baz6' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBaz6Service()
{
- $this->services['baz6'] = $instance = new \stdClass();
- $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && \false ?: '_'};
+ $this->services['baz6'] = $instance = new stdClass();
+ $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'connection' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConnectionService()
{
- $a = ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'};
if (isset($this->services['connection'])) {
return $this->services['connection'];
}
- $b = new \stdClass();
- $this->services['connection'] = $instance = new \stdClass($a, $b);
- $b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && \false ?: '_'};
+ $b = new stdClass();
+ $this->services['connection'] = $instance = new stdClass($a, $b);
+ $b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'connection2' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConnection2Service()
{
- $a = ${($_ = isset($this->services['dispatcher2']) ? $this->services['dispatcher2'] : $this->getDispatcher2Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['dispatcher2']) ? $this->services['dispatcher2'] : $this->getDispatcher2Service()) && false ?: '_'};
if (isset($this->services['connection2'])) {
return $this->services['connection2'];
}
- $b = new \stdClass();
- $this->services['connection2'] = $instance = new \stdClass($a, $b);
- $c = new \stdClass($instance);
- $c->handler2 = new \stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && \false ?: '_'});
+ $b = new stdClass();
+ $this->services['connection2'] = $instance = new stdClass($a, $b);
+ $c = new stdClass($instance);
+ $c->handler2 = new stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'});
$b->logger2 = $c;
return $instance;
}
/**
* Gets the public 'connection3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConnection3Service()
{
- $this->services['connection3'] = $instance = new \stdClass();
- $instance->listener = [0 => ${($_ = isset($this->services['listener3']) ? $this->services['listener3'] : $this->getListener3Service()) && \false ?: '_'}];
+ $this->services['connection3'] = $instance = new stdClass();
+ $instance->listener = [0 => ${($_ = isset($this->services['listener3']) ? $this->services['listener3'] : $this->getListener3Service()) && false ?: '_'}];
return $instance;
}
/**
* Gets the public 'connection4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getConnection4Service()
{
- $this->services['connection4'] = $instance = new \stdClass();
- $instance->listener = [0 => ${($_ = isset($this->services['listener4']) ? $this->services['listener4'] : $this->getListener4Service()) && \false ?: '_'}];
+ $this->services['connection4'] = $instance = new stdClass();
+ $instance->listener = [0 => ${($_ = isset($this->services['listener4']) ? $this->services['listener4'] : $this->getListener4Service()) && false ?: '_'}];
return $instance;
}
/**
* Gets the public 'dispatcher' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getDispatcherService($lazyLoad = \true)
+ protected function getDispatcherService($lazyLoad = true)
{
- $this->services['dispatcher'] = $instance = new \stdClass();
- $instance->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && \false ?: '_'};
+ $this->services['dispatcher'] = $instance = new stdClass();
+ $instance->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'dispatcher2' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getDispatcher2Service($lazyLoad = \true)
+ protected function getDispatcher2Service($lazyLoad = true)
{
- $this->services['dispatcher2'] = $instance = new \stdClass();
- $instance->subscriber2 = new \stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && \false ?: '_'});
+ $this->services['dispatcher2'] = $instance = new stdClass();
+ $instance->subscriber2 = new stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'});
return $instance;
}
/**
@@ -177,11 +184,11 @@ protected function getDispatcher2Service($lazyLoad = \true)
*/
protected function getFooService()
{
- $a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'};
if (isset($this->services['foo'])) {
return $this->services['foo'];
}
- return $this->services['foo'] = new \_PhpScoper5ea00cc67502b\FooCircular($a);
+ return $this->services['foo'] = new FooCircular($a);
}
/**
* Gets the public 'foo2' shared service.
@@ -190,42 +197,42 @@ protected function getFooService()
*/
protected function getFoo2Service()
{
- $a = new \_PhpScoper5ea00cc67502b\BarCircular();
- $this->services['foo2'] = $instance = new \_PhpScoper5ea00cc67502b\FooCircular($a);
- $a->addFoobar(${($_ = isset($this->services['foobar2']) ? $this->services['foobar2'] : $this->getFoobar2Service()) && \false ?: '_'});
+ $a = new BarCircular();
+ $this->services['foo2'] = $instance = new FooCircular($a);
+ $a->addFoobar(${($_ = isset($this->services['foobar2']) ? $this->services['foobar2'] : $this->getFoobar2Service()) && false ?: '_'});
return $instance;
}
/**
* Gets the public 'foo4' service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo4Service()
{
- $instance = new \stdClass();
- $instance->foobar = ${($_ = isset($this->services['foobar4']) ? $this->services['foobar4'] : $this->getFoobar4Service()) && \false ?: '_'};
+ $instance = new stdClass();
+ $instance->foobar = ${($_ = isset($this->services['foobar4']) ? $this->services['foobar4'] : $this->getFoobar4Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'foo5' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo5Service()
{
- $this->services['foo5'] = $instance = new \stdClass();
- $instance->bar = ${($_ = isset($this->services['bar5']) ? $this->services['bar5'] : $this->getBar5Service()) && \false ?: '_'};
+ $this->services['foo5'] = $instance = new stdClass();
+ $instance->bar = ${($_ = isset($this->services['bar5']) ? $this->services['bar5'] : $this->getBar5Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'foo6' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo6Service()
{
- $this->services['foo6'] = $instance = new \stdClass();
- $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && \false ?: '_'};
+ $this->services['foo6'] = $instance = new stdClass();
+ $instance->bar6 = ${($_ = isset($this->services['bar6']) ? $this->services['bar6'] : $this->getBar6Service()) && false ?: '_'};
return $instance;
}
/**
@@ -235,11 +242,11 @@ protected function getFoo6Service()
*/
protected function getFoobarService()
{
- $a = ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'};
if (isset($this->services['foobar'])) {
return $this->services['foobar'];
}
- return $this->services['foobar'] = new \_PhpScoper5ea00cc67502b\FoobarCircular($a);
+ return $this->services['foobar'] = new FoobarCircular($a);
}
/**
* Gets the public 'foobar2' shared service.
@@ -248,11 +255,11 @@ protected function getFoobarService()
*/
protected function getFoobar2Service()
{
- $a = ${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['foo2']) ? $this->services['foo2'] : $this->getFoo2Service()) && false ?: '_'};
if (isset($this->services['foobar2'])) {
return $this->services['foobar2'];
}
- return $this->services['foobar2'] = new \_PhpScoper5ea00cc67502b\FoobarCircular($a);
+ return $this->services['foobar2'] = new FoobarCircular($a);
}
/**
* Gets the public 'foobar3' shared service.
@@ -261,132 +268,132 @@ protected function getFoobar2Service()
*/
protected function getFoobar3Service()
{
- return $this->services['foobar3'] = new \_PhpScoper5ea00cc67502b\FoobarCircular();
+ return $this->services['foobar3'] = new FoobarCircular();
}
/**
* Gets the public 'foobar4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoobar4Service()
{
- $a = new \stdClass();
- $this->services['foobar4'] = $instance = new \stdClass($a);
+ $a = new stdClass();
+ $this->services['foobar4'] = $instance = new stdClass($a);
$a->foobar = $instance;
return $instance;
}
/**
* Gets the public 'listener3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getListener3Service()
{
- $this->services['listener3'] = $instance = new \stdClass();
- $instance->manager = ${($_ = isset($this->services['manager3']) ? $this->services['manager3'] : $this->getManager3Service()) && \false ?: '_'};
+ $this->services['listener3'] = $instance = new stdClass();
+ $instance->manager = ${($_ = isset($this->services['manager3']) ? $this->services['manager3'] : $this->getManager3Service()) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'listener4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getListener4Service()
{
- $a = ${($_ = isset($this->services['manager4']) ? $this->services['manager4'] : $this->getManager4Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['manager4']) ? $this->services['manager4'] : $this->getManager4Service()) && false ?: '_'};
if (isset($this->services['listener4'])) {
return $this->services['listener4'];
}
- return $this->services['listener4'] = new \stdClass($a);
+ return $this->services['listener4'] = new stdClass($a);
}
/**
* Gets the public 'logger' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLoggerService()
{
- $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
if (isset($this->services['logger'])) {
return $this->services['logger'];
}
- $this->services['logger'] = $instance = new \stdClass($a);
- $instance->handler = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && \false ?: '_'});
+ $this->services['logger'] = $instance = new stdClass($a);
+ $instance->handler = new stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'});
return $instance;
}
/**
* Gets the public 'manager' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getManagerService()
{
- $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection']) ? $this->services['connection'] : $this->getConnectionService()) && false ?: '_'};
if (isset($this->services['manager'])) {
return $this->services['manager'];
}
- return $this->services['manager'] = new \stdClass($a);
+ return $this->services['manager'] = new stdClass($a);
}
/**
* Gets the public 'manager2' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getManager2Service()
{
- $a = ${($_ = isset($this->services['connection2']) ? $this->services['connection2'] : $this->getConnection2Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection2']) ? $this->services['connection2'] : $this->getConnection2Service()) && false ?: '_'};
if (isset($this->services['manager2'])) {
return $this->services['manager2'];
}
- return $this->services['manager2'] = new \stdClass($a);
+ return $this->services['manager2'] = new stdClass($a);
}
/**
* Gets the public 'manager3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getManager3Service($lazyLoad = \true)
+ protected function getManager3Service($lazyLoad = true)
{
- $a = ${($_ = isset($this->services['connection3']) ? $this->services['connection3'] : $this->getConnection3Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection3']) ? $this->services['connection3'] : $this->getConnection3Service()) && false ?: '_'};
if (isset($this->services['manager3'])) {
return $this->services['manager3'];
}
- return $this->services['manager3'] = new \stdClass($a);
+ return $this->services['manager3'] = new stdClass($a);
}
/**
* Gets the public 'root' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getRootService()
{
- return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && \false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['root'] = new stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the public 'subscriber' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getSubscriberService()
{
- $a = ${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'};
if (isset($this->services['subscriber'])) {
return $this->services['subscriber'];
}
- return $this->services['subscriber'] = new \stdClass($a);
+ return $this->services['subscriber'] = new stdClass($a);
}
/**
* Gets the private 'bar6' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBar6Service()
{
- $a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['foo6']) ? $this->services['foo6'] : $this->getFoo6Service()) && false ?: '_'};
if (isset($this->services['bar6'])) {
return $this->services['bar6'];
}
- return $this->services['bar6'] = new \stdClass($a);
+ return $this->services['bar6'] = new stdClass($a);
}
/**
* Gets the private 'level2' shared service.
@@ -395,40 +402,40 @@ protected function getBar6Service()
*/
protected function getLevel2Service()
{
- $this->services['level2'] = $instance = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls();
- $instance->call(${($_ = isset($this->services['level3']) ? $this->services['level3'] : $this->getLevel3Service()) && \false ?: '_'});
+ $this->services['level2'] = $instance = new FooForCircularWithAddCalls();
+ $instance->call(${($_ = isset($this->services['level3']) ? $this->services['level3'] : $this->getLevel3Service()) && false ?: '_'});
return $instance;
}
/**
* Gets the private 'level3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLevel3Service()
{
- return $this->services['level3'] = new \stdClass(${($_ = isset($this->services['level4']) ? $this->services['level4'] : $this->getLevel4Service()) && \false ?: '_'});
+ return $this->services['level3'] = new stdClass(${($_ = isset($this->services['level4']) ? $this->services['level4'] : $this->getLevel4Service()) && false ?: '_'});
}
/**
* Gets the private 'level4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLevel4Service()
{
- return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && \false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && \false ?: '_'});
+ return $this->services['level4'] = new stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new stdClass())) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'});
}
/**
* Gets the private 'level5' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getLevel5Service()
{
- $a = ${($_ = isset($this->services['level6']) ? $this->services['level6'] : $this->getLevel6Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['level6']) ? $this->services['level6'] : $this->getLevel6Service()) && false ?: '_'};
if (isset($this->services['level5'])) {
return $this->services['level5'];
}
- return $this->services['level5'] = new \stdClass($a);
+ return $this->services['level5'] = new stdClass($a);
}
/**
* Gets the private 'level6' shared service.
@@ -437,31 +444,31 @@ protected function getLevel5Service()
*/
protected function getLevel6Service()
{
- $this->services['level6'] = $instance = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls();
- $instance->call(${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && \false ?: '_'});
+ $this->services['level6'] = $instance = new FooForCircularWithAddCalls();
+ $instance->call(${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'});
return $instance;
}
/**
* Gets the private 'manager4' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getManager4Service($lazyLoad = \true)
+ protected function getManager4Service($lazyLoad = true)
{
- $a = ${($_ = isset($this->services['connection4']) ? $this->services['connection4'] : $this->getConnection4Service()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['connection4']) ? $this->services['connection4'] : $this->getConnection4Service()) && false ?: '_'};
if (isset($this->services['manager4'])) {
return $this->services['manager4'];
}
- return $this->services['manager4'] = new \stdClass($a);
+ return $this->services['manager4'] = new stdClass($a);
}
/**
* Gets the private 'multiuse1' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getMultiuse1Service()
{
- return $this->services['multiuse1'] = new \stdClass();
+ return $this->services['multiuse1'] = new stdClass();
}
}
/**
@@ -470,4 +477,4 @@ protected function getMultiuse1Service()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Almost_Circular_Public', 'Symfony_DI_PhpDumper_Test_Almost_Circular_Public', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Almost_Circular_Public', 'Symfony_DI_PhpDumper_Test_Almost_Circular_Public', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php
index dec8f6c42..a88361c76 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php
@@ -9,13 +9,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function array_key_exists;
+use function class_alias;
+use function dirname;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,7 +31,7 @@ public function __construct()
{
$dir = __DIR__;
for ($i = 1; $i <= 5; ++$i) {
- $this->targetDirs[$i] = $dir = \dirname($dir);
+ $this->targetDirs[$i] = $dir = dirname($dir);
}
$this->parameters = $this->getDefaultParameters();
$this->services = [];
@@ -32,20 +40,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
@@ -54,17 +62,17 @@ public function isFrozen()
*/
protected function getBarService()
{
- $this->services['bar'] = $instance = new \_PhpScoper5ea00cc67502b\BarClass();
+ $this->services['bar'] = $instance = new BarClass();
$instance->setBaz($this->parameters['array_1'], $this->getParameter('array_2'), '%array_1%', $this->parameters['array_1']);
return $instance;
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -76,11 +84,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -89,11 +97,11 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
- private $loadedDynamicParameters = ['array_2' => \false];
+ private $loadedDynamicParameters = ['array_2' => false];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
@@ -111,18 +119,18 @@ private function getDynamicParameter($name)
$value = [0 => $this->targetDirs[2] . '/Dumper'];
break;
default:
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
- $this->loadedDynamicParameters[$name] = \true;
+ $this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -145,4 +153,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php
index 3b4e7540d..4cf238334 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Base64Parameters extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -27,28 +34,28 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -60,11 +67,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -73,11 +80,11 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
- private $loadedDynamicParameters = ['hello' => \false];
+ private $loadedDynamicParameters = ['hello' => false];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
@@ -95,18 +102,18 @@ private function getDynamicParameter($name)
$value = $this->getEnv('base64:foo');
break;
default:
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
- $this->loadedDynamicParameters[$name] = \true;
+ $this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -129,4 +136,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Base64Parameters', 'Symfony_DI_PhpDumper_Test_Base64Parameters', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Base64Parameters', 'Symfony_DI_PhpDumper_Test_Base64Parameters', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
index e8e2dbfa5..e8c2104aa 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_dedup_lazy_proxy.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use Closure;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -27,44 +34,44 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
- protected function createProxy($class, \Closure $factory)
+ protected function createProxy($class, Closure $factory)
{
return $factory();
}
/**
* Gets the public 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getBarService($lazyLoad = \true)
+ protected function getBarService($lazyLoad = true)
{
// lazy factory for stdClass
- return new \stdClass();
+ return new stdClass();
}
/**
* Gets the public 'foo' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getFooService($lazyLoad = \true)
+ protected function getFooService($lazyLoad = true)
{
// lazy factory for stdClass
- return new \stdClass();
+ return new stdClass();
}
}
/**
@@ -73,5 +80,5 @@ protected function getFooService($lazyLoad = \true)
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
// proxy code for stdClass
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php
index cb0ab3e56..8053a9029 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\FooForDeepGraph;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Deep_Graph extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Deep_Graph extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -27,30 +34,30 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarService()
{
- $this->services['bar'] = $instance = new \stdClass();
- $instance->p5 = new \stdClass(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'});
+ $this->services['bar'] = $instance = new stdClass();
+ $instance->p5 = new stdClass(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
return $instance;
}
/**
@@ -60,15 +67,15 @@ protected function getBarService()
*/
protected function getFooService()
{
- $a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['bar']) ? $this->services['bar'] : $this->getBarService()) && false ?: '_'};
if (isset($this->services['foo'])) {
return $this->services['foo'];
}
- $b = new \stdClass();
- $c = new \stdClass();
- $c->p3 = new \stdClass();
+ $b = new stdClass();
+ $c = new stdClass();
+ $c->p3 = new stdClass();
$b->p2 = $c;
- return $this->services['foo'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\FooForDeepGraph($a, $b);
+ return $this->services['foo'] = new FooForDeepGraph($a, $b);
}
}
/**
@@ -77,4 +84,4 @@ protected function getFooService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Deep_Graph', 'Symfony_DI_PhpDumper_Test_Deep_Graph', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Deep_Graph', 'Symfony_DI_PhpDumper_Test_Deep_Graph', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php
index 2d213ba24..4e157a53b 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php
@@ -9,13 +9,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -25,60 +33,60 @@ public function __construct()
$this->services = [];
$this->normalizedIds = ['bar_%env(bar)%' => 'bar_%env(BAR)%'];
$this->methodMap = ['bar' => 'getBarService', 'bar_%env(BAR)%' => 'getBarenvBARService', 'foo' => 'getFooService'];
- $this->privates = ['bar_%env(BAR)%' => \true];
+ $this->privates = ['bar_%env(BAR)%' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'bar_%env(BAR)%' => \true, 'baz_%env(BAR)%' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar_%env(BAR)%' => true, 'baz_%env(BAR)%' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarService()
{
- return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['bar'] = new stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the public 'foo' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFooService()
{
- return $this->services['foo'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new \stdClass())) && \false ?: '_'}, ['baz_' . $this->getEnv('string:BAR') => new \stdClass()]);
+ return $this->services['foo'] = new stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new stdClass())) && false ?: '_'}, ['baz_' . $this->getEnv('string:BAR') => new stdClass()]);
}
/**
* Gets the private 'bar_%env(BAR)%' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarenvBARService()
{
- return $this->services['bar_%env(BAR)%'] = new \stdClass();
+ return $this->services['bar_%env(BAR)%'] = new stdClass();
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -90,11 +98,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -103,7 +111,7 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
@@ -120,15 +128,15 @@ public function getParameterBag()
*/
private function getDynamicParameter($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
private $normalizedParameterNames = ['env(bar)' => 'env(BAR)'];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -151,4 +159,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php
index fba1411ad..28938a5fa 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php
@@ -9,13 +9,25 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists;
+use function array_key_exists;
+use function class_alias;
+use function dirname;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,13 +35,13 @@ public function __construct()
{
$dir = __DIR__;
for ($i = 1; $i <= 5; ++$i) {
- $this->targetDirs[$i] = $dir = \dirname($dir);
+ $this->targetDirs[$i] = $dir = dirname($dir);
}
$this->parameters = $this->getDefaultParameters();
$this->services = [];
$this->normalizedIds = ['_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c1' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1', '_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c2' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2', '_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\tests\\fixtures\\includes\\hotpath\\c3' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3', '_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\tests\\fixtures\\parentnotexists' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists'];
$this->methodMap = ['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists' => 'getParentNotExistsService', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1' => 'getC1Service', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2' => 'getC2Service', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => 'getC3Service'];
- $this->privates = ['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => \true];
+ $this->privates = ['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true];
$this->aliases = [];
$this->privates['service_container'] = function () {
include_once $this->targetDirs[1] . '/includes/HotPath/I1.php';
@@ -40,20 +52,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists' shared service.
@@ -62,7 +74,7 @@ public function isFrozen()
*/
protected function getParentNotExistsService()
{
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists();
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\ParentNotExists'] = new ParentNotExists();
}
/**
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1' shared service.
@@ -71,7 +83,7 @@ protected function getParentNotExistsService()
*/
protected function getC1Service()
{
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C1();
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C1'] = new C1();
}
/**
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2' shared service.
@@ -82,7 +94,7 @@ protected function getC2Service()
{
include_once $this->targetDirs[1] . '/includes/HotPath/C2.php';
include_once $this->targetDirs[1] . '/includes/HotPath/C3.php';
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3())) && \false ?: '_'});
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C2'] = new C2(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3'] = new C3())) && false ?: '_'});
}
/**
* Gets the private 'Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3' shared service.
@@ -92,15 +104,15 @@ protected function getC2Service()
protected function getC3Service()
{
include_once $this->targetDirs[1] . '/includes/HotPath/C3.php';
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3();
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\includes\\HotPath\\C3'] = new C3();
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -112,11 +124,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -125,7 +137,7 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
@@ -142,15 +154,15 @@ public function getParameterBag()
*/
private function getDynamicParameter($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -164,7 +176,7 @@ private function normalizeParameterName($name)
*/
protected function getDefaultParameters()
{
- return ['inline_requires' => \true];
+ return ['inline_requires' => true];
}
}
/**
@@ -173,4 +185,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php
index 43617c670..ce65f651e 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php
@@ -2,6 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
+use _PhpScoper5ea00cc67502b\App\Bar;
+use _PhpScoper5ea00cc67502b\App\Baz;
+use _PhpScoper5ea00cc67502b\App\Foo;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
@@ -9,13 +12,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -28,20 +36,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'App\Foo' shared service.
@@ -50,10 +58,10 @@ public function isFrozen()
*/
protected function getFooService()
{
- $a = new \_PhpScoper5ea00cc67502b\App\Bar();
- $b = new \_PhpScoper5ea00cc67502b\App\Baz($a);
+ $a = new Bar();
+ $b = new Baz($a);
$b->bar = $a;
- $this->services['App\\Foo'] = $instance = new \_PhpScoper5ea00cc67502b\App\Foo($b);
+ $this->services['App\\Foo'] = $instance = new Foo($b);
$a->foo = $instance;
return $instance;
}
@@ -64,4 +72,4 @@ protected function getFooService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Inline_Self_Ref', 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Inline_Self_Ref', 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php
index feaac7043..735087592 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function class_alias;
+use function dirname;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Legacy_Privates extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,119 +30,119 @@ public function __construct()
{
$dir = __DIR__;
for ($i = 1; $i <= 5; ++$i) {
- $this->targetDirs[$i] = $dir = \dirname($dir);
+ $this->targetDirs[$i] = $dir = dirname($dir);
}
$this->services = [];
$this->methodMap = ['bar' => 'getBarService', 'private' => 'getPrivateService', 'private_alias' => 'getPrivateAliasService', 'private_alias_decorator' => 'getPrivateAliasDecoratorService', 'private_child' => 'getPrivateChildService', 'private_decorator' => 'getPrivateDecoratorService', 'private_not_inlined' => 'getPrivateNotInlinedService', 'private_not_removed' => 'getPrivateNotRemovedService', 'private_parent' => 'getPrivateParentService', 'public_child' => 'getPublicChildService'];
- $this->privates = ['decorated_private' => \true, 'decorated_private_alias' => \true, 'private' => \true, 'private_alias' => \true, 'private_child' => \true, 'private_not_inlined' => \true, 'private_not_removed' => \true, 'private_parent' => \true];
+ $this->privates = ['decorated_private' => true, 'decorated_private_alias' => true, 'private' => true, 'private_alias' => true, 'private_child' => true, 'private_not_inlined' => true, 'private_not_removed' => true, 'private_parent' => true];
$this->aliases = ['alias_to_private' => 'private', 'decorated_private' => 'private_decorator', 'decorated_private_alias' => 'private_alias_decorator'];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'decorated_private' => \true, 'decorated_private_alias' => \true, 'foo' => \true, 'private' => \true, 'private_alias' => \true, 'private_alias_decorator.inner' => \true, 'private_child' => \true, 'private_decorator.inner' => \true, 'private_not_inlined' => \true, 'private_not_removed' => \true, 'private_parent' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'decorated_private' => true, 'decorated_private_alias' => true, 'foo' => true, 'private' => true, 'private_alias' => true, 'private_alias_decorator.inner' => true, 'private_child' => true, 'private_decorator.inner' => true, 'private_not_inlined' => true, 'private_not_removed' => true, 'private_parent' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarService()
{
- return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : ($this->services['private_not_inlined'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['bar'] = new stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : ($this->services['private_not_inlined'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the public 'private_alias_decorator' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateAliasDecoratorService()
{
- return $this->services['private_alias_decorator'] = new \stdClass();
+ return $this->services['private_alias_decorator'] = new stdClass();
}
/**
* Gets the public 'private_decorator' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateDecoratorService()
{
- return $this->services['private_decorator'] = new \stdClass();
+ return $this->services['private_decorator'] = new stdClass();
}
/**
* Gets the public 'public_child' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPublicChildService()
{
- return $this->services['public_child'] = new \stdClass();
+ return $this->services['public_child'] = new stdClass();
}
/**
* Gets the private 'private' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateService()
{
- return $this->services['private'] = new \stdClass();
+ return $this->services['private'] = new stdClass();
}
/**
* Gets the private 'private_alias' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateAliasService()
{
- return $this->services['private_alias'] = new \stdClass();
+ return $this->services['private_alias'] = new stdClass();
}
/**
* Gets the private 'private_child' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateChildService()
{
- return $this->services['private_child'] = new \stdClass();
+ return $this->services['private_child'] = new stdClass();
}
/**
* Gets the private 'private_not_inlined' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateNotInlinedService()
{
- return $this->services['private_not_inlined'] = new \stdClass();
+ return $this->services['private_not_inlined'] = new stdClass();
}
/**
* Gets the private 'private_not_removed' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateNotRemovedService()
{
- return $this->services['private_not_removed'] = new \stdClass();
+ return $this->services['private_not_removed'] = new stdClass();
}
/**
* Gets the private 'private_parent' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateParentService()
{
- return $this->services['private_parent'] = new \stdClass();
+ return $this->services['private_parent'] = new stdClass();
}
}
/**
@@ -144,4 +151,4 @@ protected function getPrivateParentService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Legacy_Privates', 'Symfony_DI_PhpDumper_Test_Legacy_Privates', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Legacy_Privates', 'Symfony_DI_PhpDumper_Test_Legacy_Privates', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php
index fa8ffa558..ae4513514 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php
@@ -9,13 +9,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,34 +31,34 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['bar_service' => 'getBarServiceService', 'baz_service' => 'getBazServiceService', 'foo_service' => 'getFooServiceService', 'translator.loader_1' => 'getTranslator_Loader1Service', 'translator.loader_2' => 'getTranslator_Loader2Service', 'translator.loader_3' => 'getTranslator_Loader3Service', 'translator_1' => 'getTranslator1Service', 'translator_2' => 'getTranslator2Service', 'translator_3' => 'getTranslator3Service'];
- $this->privates = ['baz_service' => \true];
+ $this->privates = ['baz_service' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'baz_service' => \true, 'translator.loader_1_locator' => \true, 'translator.loader_2_locator' => \true, 'translator.loader_3_locator' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'baz_service' => true, 'translator.loader_1_locator' => true, 'translator.loader_2_locator' => true, 'translator.loader_3_locator' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarServiceService()
{
- return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['bar_service'] = new stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the public 'foo_service' shared service.
@@ -59,43 +67,43 @@ protected function getBarServiceService()
*/
protected function getFooServiceService()
{
- return $this->services['foo_service'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['bar' => function () {
- return ${($_ = isset($this->services['bar_service']) ? $this->services['bar_service'] : $this->getBarServiceService()) && \false ?: '_'};
+ return $this->services['foo_service'] = new ServiceLocator(['bar' => function () {
+ return ${($_ = isset($this->services['bar_service']) ? $this->services['bar_service'] : $this->getBarServiceService()) && false ?: '_'};
}, 'baz' => function () {
- $f = function (\stdClass $v) {
+ $f = function (stdClass $v) {
return $v;
};
- return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && \false ?: '_'});
+ return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new stdClass())) && false ?: '_'});
}, 'nil' => function () {
- return \NULL;
+ return NULL;
}]);
}
/**
* Gets the public 'translator.loader_1' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getTranslator_Loader1Service()
{
- return $this->services['translator.loader_1'] = new \stdClass();
+ return $this->services['translator.loader_1'] = new stdClass();
}
/**
* Gets the public 'translator.loader_2' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getTranslator_Loader2Service()
{
- return $this->services['translator.loader_2'] = new \stdClass();
+ return $this->services['translator.loader_2'] = new stdClass();
}
/**
* Gets the public 'translator.loader_3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getTranslator_Loader3Service()
{
- return $this->services['translator.loader_3'] = new \stdClass();
+ return $this->services['translator.loader_3'] = new stdClass();
}
/**
* Gets the public 'translator_1' shared service.
@@ -104,8 +112,8 @@ protected function getTranslator_Loader3Service()
*/
protected function getTranslator1Service()
{
- return $this->services['translator_1'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['translator.loader_1' => function () {
- return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : ($this->services['translator.loader_1'] = new \stdClass())) && \false ?: '_'};
+ return $this->services['translator_1'] = new StubbedTranslator(new ServiceLocator(['translator.loader_1' => function () {
+ return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : ($this->services['translator.loader_1'] = new stdClass())) && false ?: '_'};
}]));
}
/**
@@ -115,10 +123,10 @@ protected function getTranslator1Service()
*/
protected function getTranslator2Service()
{
- $this->services['translator_2'] = $instance = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['translator.loader_2' => function () {
- return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new \stdClass())) && \false ?: '_'};
+ $this->services['translator_2'] = $instance = new StubbedTranslator(new ServiceLocator(['translator.loader_2' => function () {
+ return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new stdClass())) && false ?: '_'};
}]));
- $instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new \stdClass())) && \false ?: '_'}, 'nl');
+ $instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new stdClass())) && false ?: '_'}, 'nl');
return $instance;
}
/**
@@ -128,10 +136,10 @@ protected function getTranslator2Service()
*/
protected function getTranslator3Service()
{
- $this->services['translator_3'] = $instance = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['translator.loader_3' => function () {
- return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new \stdClass())) && \false ?: '_'};
+ $this->services['translator_3'] = $instance = new StubbedTranslator(new ServiceLocator(['translator.loader_3' => function () {
+ return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new stdClass())) && false ?: '_'};
}]));
- $a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new \stdClass())) && \false ?: '_'};
+ $a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new stdClass())) && false ?: '_'};
$instance->addResource('db', $a, 'nl');
$instance->addResource('db', $a, 'en');
return $instance;
@@ -139,11 +147,11 @@ protected function getTranslator3Service()
/**
* Gets the private 'baz_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBazServiceService()
{
- return $this->services['baz_service'] = new \stdClass();
+ return $this->services['baz_service'] = new stdClass();
}
}
/**
@@ -152,4 +160,4 @@ protected function getBazServiceService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php
index 631760f65..7a53af148 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_non_shared_lazy.php
@@ -9,13 +9,20 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use Closure;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,48 +30,48 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['bar' => 'getBarService', 'foo' => 'getFooService'];
- $this->privates = ['bar' => \true, 'foo' => \true];
+ $this->privates = ['bar' => true, 'foo' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'bar' => \true, 'foo' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'bar' => true, 'foo' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
- protected function createProxy($class, \Closure $factory)
+ protected function createProxy($class, Closure $factory)
{
return $factory();
}
/**
* Gets the private 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarService()
{
- return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && \false ?: '_'});
+ return $this->services['bar'] = new stdClass(${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'});
}
/**
* Gets the private 'foo' service.
*
- * @return \stdClass
+ * @return stdClass
*/
- protected function getFooService($lazyLoad = \true)
+ protected function getFooService($lazyLoad = true)
{
// lazy factory for stdClass
- return new \stdClass();
+ return new stdClass();
}
}
/**
@@ -73,5 +80,5 @@ protected function getFooService($lazyLoad = \true)
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
// proxy code for stdClass
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php
index e89d8927c..6665560fd 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php
@@ -9,13 +9,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,52 +29,52 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['bar_service' => 'getBarServiceService', 'baz_service' => 'getBazServiceService', 'foo_service' => 'getFooServiceService'];
- $this->privates = ['baz_service' => \true];
+ $this->privates = ['baz_service' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'baz_service' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'baz_service' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarServiceService()
{
- return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['bar_service'] = new stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the public 'foo_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFooServiceService()
{
- return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && \false ?: '_'});
+ return $this->services['foo_service'] = new stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new stdClass())) && false ?: '_'});
}
/**
* Gets the private 'baz_service' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBazServiceService()
{
- return $this->services['baz_service'] = new \stdClass();
+ return $this->services['baz_service'] = new stdClass();
}
}
/**
@@ -77,4 +83,4 @@ protected function getBazServiceService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php
index c315ec5f7..3e5602dc3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php
@@ -9,13 +9,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,43 +29,43 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['private_foo' => 'getPrivateFooService', 'public_foo' => 'getPublicFooService'];
- $this->privates = ['private_foo' => \true];
+ $this->privates = ['private_foo' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'private_bar' => \true, 'private_foo' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'private_bar' => true, 'private_foo' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'public_foo' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPublicFooService()
{
- return $this->services['public_foo'] = new \stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : ($this->services['private_foo'] = new \stdClass())) && \false ?: '_'}->bar);
+ return $this->services['public_foo'] = new stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : ($this->services['private_foo'] = new stdClass())) && false ?: '_'}->bar);
}
/**
* Gets the private 'private_foo' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getPrivateFooService()
{
- return $this->services['private_foo'] = new \stdClass();
+ return $this->services['private_foo'] = new stdClass();
}
}
/**
@@ -68,4 +74,4 @@ protected function getPrivateFooService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php
index 6787993f6..45e9dc9a3 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php
@@ -9,13 +9,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Rot13Parameters extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -29,20 +38,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor' shared service.
@@ -51,7 +60,7 @@ public function isFrozen()
*/
protected function getRot13EnvVarProcessorService()
{
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor();
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor'] = new Rot13EnvVarProcessor();
}
/**
* Gets the public 'container.env_var_processors_locator' shared service.
@@ -60,17 +69,17 @@ protected function getRot13EnvVarProcessorService()
*/
protected function getContainer_EnvVarProcessorsLocatorService()
{
- return $this->services['container.env_var_processors_locator'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['rot13' => function () {
- return ${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor())) && \false ?: '_'};
+ return $this->services['container.env_var_processors_locator'] = new ServiceLocator(['rot13' => function () {
+ return ${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Dumper\\Rot13EnvVarProcessor'] = new Rot13EnvVarProcessor())) && false ?: '_'};
}]);
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -82,11 +91,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -95,11 +104,11 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
- private $loadedDynamicParameters = ['hello' => \false];
+ private $loadedDynamicParameters = ['hello' => false];
private $dynamicParameters = [];
/**
* Computes a dynamic parameter.
@@ -117,18 +126,18 @@ private function getDynamicParameter($name)
$value = $this->getEnv('rot13:foo');
break;
default:
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
- $this->loadedDynamicParameters[$name] = \true;
+ $this->loadedDynamicParameters[$name] = true;
return $this->dynamicParameters[$name] = $value;
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -151,4 +160,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Rot13Parameters', 'Symfony_DI_PhpDumper_Test_Rot13Parameters', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Rot13Parameters', 'Symfony_DI_PhpDumper_Test_Rot13Parameters', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php
index 9034ef6e8..3062903f0 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php
@@ -9,13 +9,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -24,25 +32,25 @@ public function __construct()
$this->services = [];
$this->normalizedIds = ['_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\tests\\fixtures\\customdefinition' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition', '_PhpScoper5ea00cc67502b\\symfony\\component\\dependencyinjection\\tests\\fixtures\\testservicesubscriber' => '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'];
$this->methodMap = ['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => 'getCustomDefinitionService', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => 'getTestServiceSubscriberService', 'foo_service' => 'getFooServiceService'];
- $this->privates = ['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => \true];
+ $this->privates = ['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => \true, 'service_locator.jmktfsv' => \true, 'service_locator.jmktfsv.foo_service' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => true, 'service_locator.jmktfsv' => true, 'service_locator.jmktfsv.foo_service' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber' shared service.
@@ -51,7 +59,7 @@ public function isFrozen()
*/
protected function getTestServiceSubscriberService()
{
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber();
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] = new TestServiceSubscriber();
}
/**
* Gets the public 'foo_service' shared autowired service.
@@ -60,26 +68,26 @@ protected function getTestServiceSubscriberService()
*/
protected function getFooServiceService()
{
- return $this->services['foo_service'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber((new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function () {
- $f = function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) {
+ return $this->services['foo_service'] = new TestServiceSubscriber((new ServiceLocator(['_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function () {
+ $f = function (CustomDefinition $v = null) {
return $v;
};
- return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition())) && \false ?: '_'});
+ return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] = new CustomDefinition())) && false ?: '_'});
}, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => function () {
- $f = function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) {
+ $f = function (TestServiceSubscriber $v) {
return $v;
};
- return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber())) && \false ?: '_'});
+ return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] = new TestServiceSubscriber())) && false ?: '_'});
}, 'bar' => function () {
- $f = function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v) {
+ $f = function (CustomDefinition $v) {
return $v;
};
- return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber())) && \false ?: '_'});
+ return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber'] = new TestServiceSubscriber())) && false ?: '_'});
}, 'baz' => function () {
- $f = function (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) {
+ $f = function (CustomDefinition $v = null) {
return $v;
};
- return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition())) && \false ?: '_'});
+ return $f(${($_ = isset($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition']) ? $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] : ($this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] = new CustomDefinition())) && false ?: '_'});
}]))->withContext('foo_service', $this));
}
/**
@@ -89,7 +97,7 @@ protected function getFooServiceService()
*/
protected function getCustomDefinitionService()
{
- return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition();
+ return $this->services['Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition'] = new CustomDefinition();
}
}
/**
@@ -98,4 +106,4 @@ protected function getCustomDefinitionService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php
index ed4350bc4..d25489da0 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php
@@ -9,13 +9,28 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use _PhpScoper5ea00cc67502b\Symfony\Component\Stopwatch\Stopwatch;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\Encoder\JsonEncoder;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\EventDispatcher\EventDispatcher;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\EventEmitterSerializer;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\Normalizer\CollectionNormalizer;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\Normalizer\JsonNormalizer;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\Normalizer\ObjectNormalizer;
+use _PhpScoper5ea00cc67502b\TSantos\Serializer\NormalizerRegistry;
+use _PhpScoper5ea00cc67502b\TSantos\SerializerBundle\EventListener\StopwatchListener;
+use _PhpScoper5ea00cc67502b\TSantos\SerializerBundle\Serializer\CircularReferenceHandler;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class ProjectServiceContainer extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class ProjectServiceContainer extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -28,20 +43,20 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'tsantos_serializer' shared service.
@@ -50,15 +65,15 @@ public function isFrozen()
*/
protected function getTsantosSerializerService()
{
- $a = new \_PhpScoper5ea00cc67502b\TSantos\Serializer\NormalizerRegistry();
- $b = new \_PhpScoper5ea00cc67502b\TSantos\Serializer\Normalizer\CollectionNormalizer();
- $c = new \_PhpScoper5ea00cc67502b\TSantos\Serializer\EventDispatcher\EventDispatcher();
- $c->addSubscriber(new \_PhpScoper5ea00cc67502b\TSantos\SerializerBundle\EventListener\StopwatchListener(new \_PhpScoper5ea00cc67502b\Symfony\Component\Stopwatch\Stopwatch(\true)));
- $this->services['tsantos_serializer'] = $instance = new \_PhpScoper5ea00cc67502b\TSantos\Serializer\EventEmitterSerializer(new \_PhpScoper5ea00cc67502b\TSantos\Serializer\Encoder\JsonEncoder(), $a, $c);
+ $a = new NormalizerRegistry();
+ $b = new CollectionNormalizer();
+ $c = new EventDispatcher();
+ $c->addSubscriber(new StopwatchListener(new Stopwatch(true)));
+ $this->services['tsantos_serializer'] = $instance = new EventEmitterSerializer(new JsonEncoder(), $a, $c);
$b->setSerializer($instance);
- $d = new \_PhpScoper5ea00cc67502b\TSantos\Serializer\Normalizer\JsonNormalizer();
+ $d = new JsonNormalizer();
$d->setSerializer($instance);
- $a->add(new \_PhpScoper5ea00cc67502b\TSantos\Serializer\Normalizer\ObjectNormalizer(new \_PhpScoper5ea00cc67502b\TSantos\SerializerBundle\Serializer\CircularReferenceHandler()));
+ $a->add(new ObjectNormalizer(new CircularReferenceHandler()));
$a->add($b);
$a->add($d);
return $instance;
@@ -70,4 +85,4 @@ protected function getTsantosSerializerService()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ProjectServiceContainer', 'ProjectServiceContainer', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php
index 19e8d6f61..97918b74a 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php
@@ -9,13 +9,19 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use stdClass;
+use function class_alias;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -23,87 +29,87 @@ public function __construct()
{
$this->services = [];
$this->methodMap = ['bar' => 'getBarService', 'baz' => 'getBazService', 'foo1' => 'getFoo1Service', 'foo3' => 'getFoo3Service'];
- $this->privates = ['foo3' => \true];
+ $this->privates = ['foo3' => true];
$this->aliases = [];
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true, 'foo2' => \true, 'foo3' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, 'foo2' => true, 'foo3' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBarService()
{
- $this->services['bar'] = $instance = new \stdClass();
- $instance->foo1 = ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && \false ?: '_'};
+ $this->services['bar'] = $instance = new stdClass();
+ $instance->foo1 = ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
$instance->foo2 = null;
- $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && \false ?: '_'};
+ $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
$instance->closures = [0 => function () {
- return ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && \false ?: '_'};
+ return ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'};
}, 1 => function () {
return null;
}, 2 => function () {
- return ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && \false ?: '_'};
+ return ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'};
}];
- $instance->iter = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\RewindableGenerator(function () {
+ $instance->iter = new RewindableGenerator(function () {
if (isset($this->services['foo1'])) {
- (yield 'foo1' => ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && \false ?: '_'});
+ (yield 'foo1' => ${($_ = isset($this->services['foo1']) ? $this->services['foo1'] : null) && false ?: '_'});
}
- if (\false) {
+ if (false) {
(yield 'foo2' => null);
}
if (isset($this->services['foo3'])) {
- (yield 'foo3' => ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && \false ?: '_'});
+ (yield 'foo3' => ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : null) && false ?: '_'});
}
}, function () {
- return 0 + (int) isset($this->services['foo1']) + (int) \false + (int) isset($this->services['foo3']);
+ return 0 + (int) isset($this->services['foo1']) + (int)false + (int) isset($this->services['foo3']);
});
return $instance;
}
/**
* Gets the public 'baz' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getBazService()
{
- $this->services['baz'] = $instance = new \stdClass();
- $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : ($this->services['foo3'] = new \stdClass())) && \false ?: '_'};
+ $this->services['baz'] = $instance = new stdClass();
+ $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : ($this->services['foo3'] = new stdClass())) && false ?: '_'};
return $instance;
}
/**
* Gets the public 'foo1' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo1Service()
{
- return $this->services['foo1'] = new \stdClass();
+ return $this->services['foo1'] = new stdClass();
}
/**
* Gets the private 'foo3' shared service.
*
- * @return \stdClass
+ * @return stdClass
*/
protected function getFoo3Service()
{
- return $this->services['foo3'] = new \stdClass();
+ return $this->services['foo3'] = new stdClass();
}
}
/**
@@ -112,4 +118,4 @@ protected function getFoo3Service()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Uninitialized_Reference', 'Symfony_DI_PhpDumper_Test_Uninitialized_Reference', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Uninitialized_Reference', 'Symfony_DI_PhpDumper_Test_Uninitialized_Reference', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_unsupported_characters.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_unsupported_characters.php
index c8eef1298..695c2a979 100644
--- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_unsupported_characters.php
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_unsupported_characters.php
@@ -9,13 +9,21 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use FooClass;
+use function array_key_exists;
+use function class_alias;
+use function sprintf;
+use function strtolower;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*
* @final since Symfony 3.3
*/
-class Symfony_DI_PhpDumper_Test_Unsupported_Characters extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container
+class Symfony_DI_PhpDumper_Test_Unsupported_Characters extends Container
{
private $parameters = [];
private $targetDirs = [];
@@ -28,55 +36,55 @@ public function __construct()
}
public function getRemovedIds()
{
- return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => \true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => \true];
+ return ['_PhpScoper5ea00cc67502b\\Psr\\Container\\ContainerInterface' => true, '_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface' => true];
}
public function compile()
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('You cannot compile a dumped container that was already compiled.');
+ throw new LogicException('You cannot compile a dumped container that was already compiled.');
}
public function isCompiled()
{
- return \true;
+ return true;
}
public function isFrozen()
{
- @\trigger_error(\sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), \E_USER_DEPRECATED);
- return \true;
+ @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
+ return true;
}
/**
* Gets the public 'bar$' shared service.
*
- * @return \FooClass
+ * @return FooClass
*/
protected function getBarService()
{
- return $this->services['bar$'] = new \_PhpScoper5ea00cc67502b\FooClass();
+ return $this->services['bar$'] = new FooClass();
}
/**
* Gets the public 'bar$!' shared service.
*
- * @return \FooClass
+ * @return FooClass
*/
protected function getBar2Service()
{
- return $this->services['bar$!'] = new \_PhpScoper5ea00cc67502b\FooClass();
+ return $this->services['bar$!'] = new FooClass();
}
/**
* Gets the public 'foo oh-no' shared service.
*
- * @return \FooClass
+ * @return FooClass
*/
protected function getFooohnoService()
{
- return $this->services['foo*/oh-no'] = new \_PhpScoper5ea00cc67502b\FooClass();
+ return $this->services['foo*/oh-no'] = new FooClass();
}
public function getParameter($name)
{
$name = (string) $name;
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
$name = $this->normalizeParameterName($name);
- if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The parameter "%s" must be defined.', $name));
+ if (!(isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters))) {
+ throw new InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
}
}
if (isset($this->loadedDynamicParameters[$name])) {
@@ -88,11 +96,11 @@ public function hasParameter($name)
{
$name = (string) $name;
$name = $this->normalizeParameterName($name);
- return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || \array_key_exists($name, $this->parameters);
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
}
public function setParameter($name, $value)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\LogicException('Impossible to call set() on a frozen ParameterBag.');
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
}
public function getParameterBag()
{
@@ -101,7 +109,7 @@ public function getParameterBag()
foreach ($this->loadedDynamicParameters as $name => $loaded) {
$parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
}
- $this->parameterBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $this->parameterBag = new FrozenParameterBag($parameters);
}
return $this->parameterBag;
}
@@ -118,15 +126,15 @@ public function getParameterBag()
*/
private function getDynamicParameter($name)
{
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException(\sprintf('The dynamic parameter "%s" must be defined.', $name));
+ throw new InvalidArgumentException(sprintf('The dynamic parameter "%s" must be defined.', $name));
}
private $normalizedParameterNames = [];
private function normalizeParameterName($name)
{
- if (isset($this->normalizedParameterNames[$normalizedName = \strtolower($name)]) || isset($this->parameters[$normalizedName]) || \array_key_exists($normalizedName, $this->parameters)) {
+ if (isset($this->normalizedParameterNames[$normalizedName = strtolower($name)]) || isset($this->parameters[$normalizedName]) || array_key_exists($normalizedName, $this->parameters)) {
$normalizedName = isset($this->normalizedParameterNames[$normalizedName]) ? $this->normalizedParameterNames[$normalizedName] : $normalizedName;
if ((string) $name !== $normalizedName) {
- @\trigger_error(\sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Parameter names will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.4.', $name, $normalizedName), E_USER_DEPRECATED);
}
} else {
$normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
@@ -149,4 +157,4 @@ protected function getDefaultParameters()
*
* @final since Symfony 3.3
*/
-\class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Unsupported_Characters', 'Symfony_DI_PhpDumper_Test_Unsupported_Characters', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Symfony_DI_PhpDumper_Test_Unsupported_Characters', 'Symfony_DI_PhpDumper_Test_Unsupported_Characters', false);
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extension1/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extension1/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extension1/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extension2/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extension2/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extension2/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extensions/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extensions/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/extensions/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/xml/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/xml/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/bar/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/bar/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/bar/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/foo/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/foo/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/foo/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_child_not_applied/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_child_not_applied/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_child_not_applied/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child_tags/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child_tags/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/autoconfigure_parent_child_tags/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/child_parent/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/child_parent/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/child_parent/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_child_tags/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_child_tags/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_child_tags/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_instanceof_importance/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_parent_child/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_parent_child/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/defaults_parent_child/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/instanceof_parent_child/index.php b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/instanceof_parent_child/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Fixtures/yaml/integration/instanceof_parent_child/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php b/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php
index 89823c242..1d92cb995 100644
--- a/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php
+++ b/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/RealServiceInstantiatorTest.php
@@ -13,21 +13,23 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator;
+use stdClass;
+
/**
* Tests for {@see \Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator}.
*
* @author Marco Pivetta
*/
-class RealServiceInstantiatorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class RealServiceInstantiatorTest extends TestCase
{
public function testInstantiateProxy()
{
- $instantiator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator();
- $instance = new \stdClass();
+ $instantiator = new RealServiceInstantiator();
+ $instance = new stdClass();
$container = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\ContainerInterface')->getMock();
$callback = function () use($instance) {
return $instance;
};
- $this->assertSame($instance, $instantiator->instantiateProxy($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(), 'foo', $callback));
+ $this->assertSame($instance, $instantiator->instantiateProxy($container, new Definition(), 'foo', $callback));
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/index.php b/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/LazyProxy/Instantiator/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/NullDumperTest.php b/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/NullDumperTest.php
index debb1a85f..709dd2104 100644
--- a/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/NullDumperTest.php
+++ b/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/NullDumperTest.php
@@ -18,12 +18,12 @@
*
* @author Marco Pivetta
*/
-class NullDumperTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class NullDumperTest extends TestCase
{
public function testNullDumper()
{
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper();
- $definition = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition('stdClass');
+ $dumper = new NullDumper();
+ $definition = new Definition('stdClass');
$this->assertFalse($dumper->isProxyCandidate($definition));
$this->assertSame('', $dumper->getProxyFactoryCode($definition, 'foo', '(false)'));
$this->assertSame('', $dumper->getProxyCode($definition));
diff --git a/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/index.php b/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/LazyProxy/PhpDumper/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/LazyProxy/index.php b/vendor/symfony/dependency-injection/Tests/LazyProxy/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/LazyProxy/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php
index 6e3924c14..9f05a6727 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/ClosureLoaderTest.php
@@ -13,18 +13,18 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\ClosureLoader;
-class ClosureLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ClosureLoaderTest extends TestCase
{
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\ClosureLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
+ $loader = new ClosureLoader(new ContainerBuilder());
$this->assertTrue($loader->supports(function ($container) {
}), '->supports() returns true if the resource is loadable');
$this->assertFalse($loader->supports('foo.foo'), '->supports() returns true if the resource is loadable');
}
public function testLoad()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\ClosureLoader($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder());
+ $loader = new ClosureLoader($container = new ContainerBuilder());
$loader->load(function ($container) {
$container->setParameter('foo', 'foo');
});
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/DirectoryLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/DirectoryLoaderTest.php
index f04da7e4f..9361907f9 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/DirectoryLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/DirectoryLoaderTest.php
@@ -18,21 +18,23 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
-class DirectoryLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function realpath;
+
+class DirectoryLoaderTest extends TestCase
{
private static $fixturesPath;
private $container;
private $loader;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
}
protected function setUp()
{
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath);
- $this->container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $this->loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\DirectoryLoader($this->container, $locator);
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($this->container, $locator), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader($this->container, $locator), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($this->container, $locator), $this->loader]);
+ $locator = new FileLocator(self::$fixturesPath);
+ $this->container = new ContainerBuilder();
+ $this->loader = new DirectoryLoader($this->container, $locator);
+ $resolver = new LoaderResolver([new PhpFileLoader($this->container, $locator), new IniFileLoader($this->container, $locator), new YamlFileLoader($this->container, $locator), $this->loader]);
$this->loader->setResolver($resolver);
}
public function testDirectoryCanBeLoadedRecursively()
@@ -53,7 +55,7 @@ public function testExceptionIsRaisedWhenDirectoryDoesNotExist()
}
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\DirectoryLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new DirectoryLoader(new ContainerBuilder(), new FileLocator());
$this->assertTrue($loader->supports('directory/'), '->supports("directory/") returns true');
$this->assertTrue($loader->supports('directory/', 'directory'), '->supports("directory/", "directory") returns true');
$this->assertFalse($loader->supports('directory'), '->supports("directory") returns false');
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/FileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/FileLoaderTest.php
index d853abc5e..9eb81d60f 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/FileLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/FileLoaderTest.php
@@ -31,106 +31,111 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Baz;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\BarInterface;
-class FileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function array_keys;
+use function realpath;
+use function sprintf;
+use const PHP_EOL;
+
+class FileLoaderTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../');
+ self::$fixturesPath = realpath(__DIR__ . '/../');
}
public function testImportWithGlobPattern()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath));
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/php')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'))]);
+ $container = new ContainerBuilder();
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath));
+ $resolver = new LoaderResolver([new IniFileLoader($container, new FileLocator(self::$fixturesPath . '/ini')), new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml')), new PhpFileLoader($container, new FileLocator(self::$fixturesPath . '/php')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'))]);
$loader->setResolver($resolver);
$loader->import('{F}ixtures/{xml,yaml}/services2.{yml,xml}');
$actual = $container->getParameterBag()->all();
- $expected = ['a string', 'foo' => 'bar', 'values' => [0, 'integer' => 4, 100 => null, 'true', \true, \false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', ['foo', 'bar']], 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => \PHP_EOL, 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo_bar')];
- $this->assertEquals(\array_keys($expected), \array_keys($actual), '->load() imports and merges imported files');
+ $expected = ['a string', 'foo' => 'bar', 'values' => [0, 'integer' => 4, 100 => null, 'true', true, false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', ['foo', 'bar']], 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => PHP_EOL, 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar')];
+ $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files');
}
public function testRegisterClasses()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('sub_dir', 'Sub');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/Fixtures'));
- $loader->registerClasses(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\Sub\\', 'Prototype/%sub_dir%/*');
- $this->assertEquals(['service_container', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar::class], \array_keys($container->getDefinitions()));
- $this->assertEquals([\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\BarInterface::class], \array_keys($container->getAliases()));
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath . '/Fixtures'));
+ $loader->registerClasses(new Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\Sub\\', 'Prototype/%sub_dir%/*');
+ $this->assertEquals(['service_container', Bar::class], array_keys($container->getDefinitions()));
+ $this->assertEquals([PsrContainerInterface::class, ContainerInterface::class, BarInterface::class], array_keys($container->getAliases()));
}
public function testRegisterClassesWithExclude()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('other_dir', 'OtherDir');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/Fixtures'));
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath . '/Fixtures'));
$loader->registerClasses(
- new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(),
+ new Definition(),
'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\',
'Prototype/*',
// load everything, except OtherDir/AnotherSub & Foo.php
'Prototype/{%other_dir%/AnotherSub,Foo.php}'
);
- $this->assertTrue($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar::class));
- $this->assertTrue($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Baz::class));
- $this->assertFalse($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class));
- $this->assertFalse($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\AnotherSub\DeeperBaz::class));
- $this->assertEquals([\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\BarInterface::class], \array_keys($container->getAliases()));
- $loader->registerClasses(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', 'Prototype/*', 'Prototype/NotExistingDir');
+ $this->assertTrue($container->has(Bar::class));
+ $this->assertTrue($container->has(Baz::class));
+ $this->assertFalse($container->has(Foo::class));
+ $this->assertFalse($container->has(DeeperBaz::class));
+ $this->assertEquals([PsrContainerInterface::class, ContainerInterface::class, BarInterface::class], array_keys($container->getAliases()));
+ $loader->registerClasses(new Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', 'Prototype/*', 'Prototype/NotExistingDir');
}
public function testNestedRegisterClasses()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/Fixtures'));
- $prototype = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition();
- $prototype->setPublic(\true)->setPrivate(\true);
+ $container = new ContainerBuilder();
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath . '/Fixtures'));
+ $prototype = new Definition();
+ $prototype->setPublic(true)->setPrivate(true);
$loader->registerClasses($prototype, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', 'Prototype/*');
- $this->assertTrue($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar::class));
- $this->assertTrue($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Baz::class));
- $this->assertTrue($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class));
- $this->assertEquals([\_PhpScoper5ea00cc67502b\Psr\Container\ContainerInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\FooInterface::class], \array_keys($container->getAliases()));
- $alias = $container->getAlias(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\FooInterface::class);
- $this->assertSame(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class, (string) $alias);
+ $this->assertTrue($container->has(Bar::class));
+ $this->assertTrue($container->has(Baz::class));
+ $this->assertTrue($container->has(Foo::class));
+ $this->assertEquals([PsrContainerInterface::class, ContainerInterface::class, FooInterface::class], array_keys($container->getAliases()));
+ $alias = $container->getAlias(FooInterface::class);
+ $this->assertSame(Foo::class, (string) $alias);
$this->assertFalse($alias->isPublic());
$this->assertFalse($alias->isPrivate());
}
public function testMissingParentClass()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
+ $container = new ContainerBuilder();
$container->setParameter('bad_classes_dir', 'BadClasses');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/Fixtures'));
- $loader->registerClasses((new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition())->setPublic(\false), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\BadClasses\\', 'Prototype/%bad_classes_dir%/*');
- $this->assertTrue($container->has(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingParent::class));
- $this->assertRegExp('{Class "?Symfony\\\\Component\\\\DependencyInjection\\\\Tests\\\\Fixtures\\\\Prototype\\\\BadClasses\\\\MissingClass"? not found}', $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\BadClasses\MissingParent::class)->getErrors()[0]);
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath . '/Fixtures'));
+ $loader->registerClasses((new Definition())->setPublic(false), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\BadClasses\\', 'Prototype/%bad_classes_dir%/*');
+ $this->assertTrue($container->has(MissingParent::class));
+ $this->assertRegExp('{Class "?Symfony\\\\Component\\\\DependencyInjection\\\\Tests\\\\Fixtures\\\\Prototype\\\\BadClasses\\\\MissingClass"? not found}', $container->getDefinition(MissingParent::class)->getErrors()[0]);
}
public function testRegisterClassesWithBadPrefix()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Expected to find class "Symfony\\\\Component\\\\DependencyInjection\\\\Tests\\\\Fixtures\\\\Prototype\\\\Bar" in file ".+" while importing services from resource "Prototype\\/Sub\\/\\*", but it was not found\\! Check the namespace prefix used with the resource/');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/Fixtures'));
+ $container = new ContainerBuilder();
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath . '/Fixtures'));
// the Sub is missing from namespace prefix
- $loader->registerClasses(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', 'Prototype/Sub/*');
+ $loader->registerClasses(new Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', 'Prototype/Sub/*');
}
/**
* @dataProvider getIncompatibleExcludeTests
*/
public function testRegisterClassesWithIncompatibleExclude($resourcePattern, $excludePattern)
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\TestFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/Fixtures'));
+ $container = new ContainerBuilder();
+ $loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath . '/Fixtures'));
try {
- $loader->registerClasses(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', $resourcePattern, $excludePattern);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException $e) {
- $this->assertEquals(\sprintf('Invalid "exclude" pattern when importing classes for "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s).', $excludePattern, $resourcePattern), $e->getMessage());
+ $loader->registerClasses(new Definition(), 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\', $resourcePattern, $excludePattern);
+ } catch (InvalidArgumentException $e) {
+ $this->assertEquals(sprintf('Invalid "exclude" pattern when importing classes for "Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\": make sure your "exclude" pattern (%s) is a subset of the "resource" pattern (%s).', $excludePattern, $resourcePattern), $e->getMessage());
}
}
public function getIncompatibleExcludeTests()
{
- (yield ['Prototype/*', 'yaml/*', \false]);
- (yield ['Prototype/OtherDir/*', 'Prototype/*', \false]);
+ (yield ['Prototype/*', 'yaml/*', false]);
+ (yield ['Prototype/OtherDir/*', 'Prototype/*', false]);
}
}
-class TestFileLoader extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\FileLoader
+class TestFileLoader extends FileLoader
{
public function load($resource, $type = null)
{
@@ -138,6 +143,6 @@ public function load($resource, $type = null)
}
public function supports($resource, $type = null)
{
- return \false;
+ return false;
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/GlobFileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/GlobFileLoaderTest.php
index 4651e4007..dc6326aba 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/GlobFileLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/GlobFileLoaderTest.php
@@ -15,24 +15,24 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\GlobFileLoader;
-class GlobFileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class GlobFileLoaderTest extends TestCase
{
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\GlobFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new GlobFileLoader(new ContainerBuilder(), new FileLocator());
$this->assertTrue($loader->supports('any-path', 'glob'), '->supports() returns true if the resource has the glob type');
$this->assertFalse($loader->supports('any-path'), '->supports() returns false if the resource is not of glob type');
}
public function testLoadAddsTheGlobResourceToTheContainer()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader\GlobFileLoaderWithoutImport($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new GlobFileLoaderWithoutImport($container = new ContainerBuilder(), new FileLocator());
$loader->load(__DIR__ . '/../Fixtures/config/*');
- $this->assertEquals(new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource(__DIR__ . '/../Fixtures/config', '/*', \false), $container->getResources()[1]);
+ $this->assertEquals(new GlobResource(__DIR__ . '/../Fixtures/config', '/*', false), $container->getResources()[1]);
}
}
-class GlobFileLoaderWithoutImport extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\GlobFileLoader
+class GlobFileLoaderWithoutImport extends GlobFileLoader
{
- public function import($resource, $type = null, $ignoreErrors = \false, $sourceResource = null)
+ public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null)
{
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php
index c5627b4f1..5498ea904 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php
@@ -14,14 +14,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader;
-class IniFileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function bindec;
+use function defined;
+use function parse_ini_file;
+use function realpath;
+use function sprintf;
+use const INI_SCANNER_TYPED;
+use const PHP_VERSION;
+
+class IniFileLoaderTest extends TestCase
{
protected $container;
protected $loader;
protected function setUp()
{
- $this->container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $this->loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader($this->container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(\realpath(__DIR__ . '/../Fixtures/') . '/ini'));
+ $this->container = new ContainerBuilder();
+ $this->loader = new IniFileLoader($this->container, new FileLocator(realpath(__DIR__ . '/../Fixtures/') . '/ini'));
}
public function testIniFileCanBeLoaded()
{
@@ -44,53 +52,53 @@ public function testTypeConversions($key, $value, $supported)
*/
public function testTypeConversionsWithNativePhp($key, $value, $supported)
{
- if (\defined('HHVM_VERSION_ID')) {
+ if (defined('HHVM_VERSION_ID')) {
$this->markTestSkipped();
}
if (!$supported) {
- $this->markTestSkipped(\sprintf('Converting the value "%s" to "%s" is not supported by the IniFileLoader.', $key, $value));
+ $this->markTestSkipped(sprintf('Converting the value "%s" to "%s" is not supported by the IniFileLoader.', $key, $value));
}
- $expected = \parse_ini_file(__DIR__ . '/../Fixtures/ini/types.ini', \true, \INI_SCANNER_TYPED);
+ $expected = parse_ini_file(__DIR__ . '/../Fixtures/ini/types.ini', true, INI_SCANNER_TYPED);
$this->assertSame($value, $expected['parameters'][$key], '->load() converts values to PHP types');
}
public function getTypeConversions()
{
return [
- ['true_comment', \true, \true],
- ['true', \true, \true],
- ['false', \false, \true],
- ['on', \true, \true],
- ['off', \false, \true],
- ['yes', \true, \true],
- ['no', \false, \true],
- ['none', \false, \true],
- ['null', null, \true],
- ['constant', \PHP_VERSION, \true],
- ['12', 12, \true],
- ['12_string', '12', \true],
- ['12_quoted_number', 12, \false],
+ ['true_comment', true, true],
+ ['true', true, true],
+ ['false', false, true],
+ ['on', true, true],
+ ['off', false, true],
+ ['yes', true, true],
+ ['no', false, true],
+ ['none', false, true],
+ ['null', null, true],
+ ['constant', PHP_VERSION, true],
+ ['12', 12, true],
+ ['12_string', '12', true],
+ ['12_quoted_number', 12, false],
// INI_SCANNER_RAW removes the double quotes
- ['12_comment', 12, \true],
- ['12_string_comment', '12', \true],
- ['12_quoted_number_comment', 12, \false],
+ ['12_comment', 12, true],
+ ['12_string_comment', '12', true],
+ ['12_quoted_number_comment', 12, false],
// INI_SCANNER_RAW removes the double quotes
- ['-12', -12, \true],
- ['1', 1, \true],
- ['0', 0, \true],
- ['0b0110', \bindec('0b0110'), \false],
+ ['-12', -12, true],
+ ['1', 1, true],
+ ['0', 0, true],
+ ['0b0110', bindec('0b0110'), false],
// not supported by INI_SCANNER_TYPED
- ['11112222333344445555', '1111,2222,3333,4444,5555', \true],
- ['0777', 0777, \false],
+ ['11112222333344445555', '1111,2222,3333,4444,5555', true],
+ ['0777', 0777, false],
// not supported by INI_SCANNER_TYPED
- ['255', 0xff, \false],
+ ['255', 0xff, false],
// not supported by INI_SCANNER_TYPED
- ['100.0', 100.0, \false],
+ ['100.0', 100.0, false],
// not supported by INI_SCANNER_TYPED
- ['-120.0', -120.0, \false],
+ ['-120.0', -120.0, false],
// not supported by INI_SCANNER_TYPED
- ['-10100.1', -10100.1, \false],
+ ['-10100.1', -10100.1, false],
// not supported by INI_SCANNER_TYPED
- ['-10,100.1', '-10,100.1', \true],
+ ['-10,100.1', '-10,100.1', true],
];
}
public function testExceptionIsRaisedWhenIniFileDoesNotExist()
@@ -113,7 +121,7 @@ public function testExceptionIsRaisedWhenIniFileIsAlmostValid()
}
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new IniFileLoader(new ContainerBuilder(), new FileLocator());
$this->assertTrue($loader->supports('foo.ini'), '->supports() returns true if the resource is loadable');
$this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable');
$this->assertTrue($loader->supports('with_wrong_ext.yml', 'ini'), '->supports() returns true if the resource with forced type is loadable');
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/LoaderResolverTest.php b/vendor/symfony/dependency-injection/Tests/Loader/LoaderResolverTest.php
index bf97677e0..63db392e2 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/LoaderResolverTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/LoaderResolverTest.php
@@ -19,20 +19,22 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
-class LoaderResolverTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function realpath;
+
+class LoaderResolverTest extends TestCase
{
private static $fixturesPath;
/** @var LoaderResolver */
private $resolver;
protected function setUp()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $this->resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/php')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\ClosureLoader($container)]);
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
+ $container = new ContainerBuilder();
+ $this->resolver = new LoaderResolver([new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml')), new IniFileLoader($container, new FileLocator(self::$fixturesPath . '/ini')), new PhpFileLoader($container, new FileLocator(self::$fixturesPath . '/php')), new ClosureLoader($container)]);
}
public function provideResourcesToLoad()
{
- return [['ini_with_wrong_ext.xml', 'ini', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader::class], ['xml_with_wrong_ext.php', 'xml', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::class], ['php_with_wrong_ext.yml', 'php', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader::class], ['yaml_with_wrong_ext.ini', 'yaml', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader::class]];
+ return [['ini_with_wrong_ext.xml', 'ini', IniFileLoader::class], ['xml_with_wrong_ext.php', 'xml', XmlFileLoader::class], ['php_with_wrong_ext.yml', 'php', PhpFileLoader::class], ['yaml_with_wrong_ext.ini', 'yaml', YamlFileLoader::class]];
}
/**
* @dataProvider provideResourcesToLoad
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/PhpFileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/PhpFileLoaderTest.php
index 23e73983e..e92ef5e89 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/PhpFileLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/PhpFileLoaderTest.php
@@ -16,40 +16,45 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
-class PhpFileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function realpath;
+use function str_replace;
+use const DIRECTORY_SEPARATOR;
+use const PHP_VERSION_ID;
+
+class PhpFileLoaderTest extends TestCase
{
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new PhpFileLoader(new ContainerBuilder(), new FileLocator());
$this->assertTrue($loader->supports('foo.php'), '->supports() returns true if the resource is loadable');
$this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable');
$this->assertTrue($loader->supports('with_wrong_ext.yml', 'php'), '->supports() returns true if the resource with forced type is loadable');
}
public function testLoad()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new PhpFileLoader($container = new ContainerBuilder(), new FileLocator());
$loader->load(__DIR__ . '/../Fixtures/php/simple.php');
$this->assertEquals('foo', $container->getParameter('foo'), '->load() loads a PHP file resource');
}
public function testConfigServices()
{
- $fixtures = \realpath(__DIR__ . '/../Fixtures');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $fixtures = realpath(__DIR__ . '/../Fixtures');
+ $loader = new PhpFileLoader($container = new ContainerBuilder(), new FileLocator());
$loader->load($fixtures . '/config/services9.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
- $this->assertStringEqualsFile($fixtures . '/php/services9_compiled.php', \str_replace(\str_replace('\\', '\\\\', $fixtures . \DIRECTORY_SEPARATOR . 'includes' . \DIRECTORY_SEPARATOR), '%path%', $dumper->dump()));
+ $dumper = new PhpDumper($container);
+ $this->assertStringEqualsFile($fixtures . '/php/services9_compiled.php', str_replace(str_replace('\\', '\\\\', $fixtures . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR), '%path%', $dumper->dump()));
}
/**
* @dataProvider provideConfig
*/
public function testConfig($file)
{
- $fixtures = \realpath(__DIR__ . '/../Fixtures');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $fixtures = realpath(__DIR__ . '/../Fixtures');
+ $loader = new PhpFileLoader($container = new ContainerBuilder(), new FileLocator());
$loader->load($fixtures . '/config/' . $file . '.php');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\YamlDumper($container);
+ $dumper = new YamlDumper($container);
$this->assertStringEqualsFile($fixtures . '/config/' . $file . '.expected.yml', $dumper->dump());
}
public function provideConfig()
@@ -59,7 +64,7 @@ public function provideConfig()
(yield ['instanceof']);
(yield ['prototype']);
(yield ['child']);
- if (\PHP_VERSION_ID >= 70000) {
+ if (PHP_VERSION_ID >= 70000) {
(yield ['php7']);
}
}
@@ -67,9 +72,9 @@ public function testAutoConfigureAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The service "child_service" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.');
- $fixtures = \realpath(__DIR__ . '/../Fixtures');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $fixtures = realpath(__DIR__ . '/../Fixtures');
+ $container = new ContainerBuilder();
+ $loader = new PhpFileLoader($container, new FileLocator());
$loader->load($fixtures . '/config/services_autoconfigure_with_parent.php');
$container->compile();
}
@@ -77,9 +82,9 @@ public function testFactoryShortNotationNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Invalid factory "factory:method": the `service:method` notation is not available when using PHP-based DI configuration. Use "[ref(\'factory\'), \'method\']" instead.');
- $fixtures = \realpath(__DIR__ . '/../Fixtures');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $fixtures = realpath(__DIR__ . '/../Fixtures');
+ $container = new ContainerBuilder();
+ $loader = new PhpFileLoader($container, new FileLocator());
$loader->load($fixtures . '/config/factory_short_notation.php');
$container->compile();
}
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php
index 3a6aae5a9..a258205d8 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/XmlFileLoaderTest.php
@@ -11,6 +11,9 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader;
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
+use _PhpScoper5ea00cc67502b\ProjectExtension;
+use _PhpScoper5ea00cc67502b\ProjectWithXsdExtension;
+use _PhpScoper5ea00cc67502b\ProjectWithXsdExtensionInPhar;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource;
@@ -28,51 +31,72 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
-class XmlFileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use DOMDocument;
+use Exception;
+use ReflectionObject;
+use function array_keys;
+use function array_map;
+use function array_shift;
+use function current;
+use function defined;
+use function dirname;
+use function extension_loaded;
+use function ini_get;
+use function key;
+use function libxml_disable_entity_loader;
+use function realpath;
+use function sort;
+use function sprintf;
+use function strpos;
+use const DIRECTORY_SEPARATOR;
+use const PHP_EOL;
+
+class XmlFileLoaderTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
require_once self::$fixturesPath . '/includes/foo.php';
require_once self::$fixturesPath . '/includes/ProjectExtension.php';
require_once self::$fixturesPath . '/includes/ProjectWithXsdExtension.php';
}
public function testLoad()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini'));
+ $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/ini'));
try {
$loader->load('foo.xml');
$this->fail('->load() throws an InvalidArgumentException if the loaded file does not exist');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the loaded file does not exist');
$this->assertStringStartsWith('The file "foo.xml" does not exist (in:', $e->getMessage(), '->load() throws an InvalidArgumentException if the loaded file does not exist');
}
}
public function testParseFile()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini'));
- $r = new \ReflectionObject($loader);
+ $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/ini'));
+ $r = new ReflectionObject($loader);
$m = $r->getMethod('parseFileToDOM');
- $m->setAccessible(\true);
+ $m->setAccessible(true);
try {
$m->invoke($loader, self::$fixturesPath . '/ini/parameters.ini');
$this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
- $this->assertRegExp(\sprintf('#^Unable to parse file ".+%s": .+.$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
+ $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'parameters.ini'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
$e = $e->getPrevious();
$this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
$this->assertStringStartsWith('[ERROR 4] Start tag expected, \'<\' not found (in', $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
}
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/xml'));
try {
$m->invoke($loader, self::$fixturesPath . '/xml/nonvalid.xml');
$this->fail('->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
- $this->assertRegExp(\sprintf('#^Unable to parse file ".+%s": .+.$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
+ $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'nonvalid.xml'), $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file is not a valid XML file');
$e = $e->getPrevious();
$this->assertInstanceOf('InvalidArgumentException', $e, '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
$this->assertStringStartsWith('[ERROR 1845] Element \'nonvalid\': No matching global declaration available for the validation root. (in', $e->getMessage(), '->parseFileToDOM() throws an InvalidArgumentException if the loaded file does not validate the XSD');
@@ -82,39 +106,39 @@ public function testParseFile()
}
public function testLoadWithExternalEntitiesDisabled()
{
- $disableEntities = \libxml_disable_entity_loader(\true);
- $containerBuilder = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($containerBuilder, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $disableEntities = libxml_disable_entity_loader(true);
+ $containerBuilder = new ContainerBuilder();
+ $loader = new XmlFileLoader($containerBuilder, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services2.xml');
- \libxml_disable_entity_loader($disableEntities);
+ libxml_disable_entity_loader($disableEntities);
$this->assertGreaterThan(0, $containerBuilder->getParameterBag()->all(), 'Parameters can be read from the config file.');
}
public function testLoadParameters()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services2.xml');
$actual = $container->getParameterBag()->all();
- $expected = ['a string', 'foo' => 'bar', 'values' => [0, 'integer' => 4, 100 => null, 'true', \true, \false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', ['foo', 'bar']], 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => \PHP_EOL];
+ $expected = ['a string', 'foo' => 'bar', 'values' => [0, 'integer' => 4, 100 => null, 'true', true, false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', ['foo', 'bar']], 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => PHP_EOL];
$this->assertEquals($expected, $actual, '->load() converts XML values to PHP ones');
}
public function testLoadImports()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yml')), $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'))]);
+ $container = new ContainerBuilder();
+ $resolver = new LoaderResolver([new IniFileLoader($container, new FileLocator(self::$fixturesPath . '/ini')), new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yml')), $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'))]);
$loader->setResolver($resolver);
$loader->load('services4.xml');
$actual = $container->getParameterBag()->all();
- $expected = ['a string', 'foo' => 'bar', 'values' => [0, 'integer' => 4, 100 => null, 'true', \true, \false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', ['foo', 'bar']], 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => \PHP_EOL, 'bar' => '%foo%', 'imported_from_ini' => \true, 'imported_from_yaml' => \true, 'with_wrong_ext' => 'from yaml'];
- $this->assertEquals(\array_keys($expected), \array_keys($actual), '->load() imports and merges imported files');
+ $expected = ['a string', 'foo' => 'bar', 'values' => [0, 'integer' => 4, 100 => null, 'true', true, false, 'on', 'off', 'float' => 1.3, 1000.3, 'a string', ['foo', 'bar']], 'mixedcase' => ['MixedCaseKey' => 'value'], 'constant' => PHP_EOL, 'bar' => '%foo%', 'imported_from_ini' => true, 'imported_from_yaml' => true, 'with_wrong_ext' => 'from yaml'];
+ $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files');
$this->assertTrue($actual['imported_from_ini']);
// Bad import throws no exception due to ignore_errors value.
$loader->load('services4_bad_import.xml');
}
public function testLoadAnonymousServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services5.xml');
$services = $container->getDefinitions();
$this->assertCount(7, $services, '->load() attributes unique ids to anonymous services');
@@ -163,23 +187,23 @@ public function testLoadAnonymousServices()
*/
public function testLoadAnonymousServicesWithoutId()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_without_id.xml');
}
public function testLoadAnonymousNestedServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('nested_service_without_id.xml');
$this->assertTrue($container->hasDefinition('FooClass'));
$arguments = $container->getDefinition('FooClass')->getArguments();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, \array_shift($arguments));
+ $this->assertInstanceOf(Reference::class, array_shift($arguments));
}
public function testLoadServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services6.xml');
$services = $container->getDefinitions();
$this->assertArrayHasKey('foo', $services, '->load() parses elements');
@@ -187,14 +211,14 @@ public function testLoadServices()
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', $services['foo'], '->load() converts element to Definition instances');
$this->assertEquals('FooClass', $services['foo']->getClass(), '->load() parses the class attribute');
$this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag');
- $this->assertEquals(['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), [\true, \false]], $services['arguments']->getArguments(), '->load() parses the argument tags');
+ $this->assertEquals(['foo', new Reference('foo'), [true, false]], $services['arguments']->getArguments(), '->load() parses the argument tags');
$this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'configure'], $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
+ $this->assertEquals([new Reference('baz'), 'configure'], $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
$this->assertEquals(['BazClass', 'configureStatic'], $services['configurator3']->getConfigurator(), '->load() parses the configurator tag');
- $this->assertEquals([['setBar', []], ['setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]]], $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
- $this->assertEquals([['setBar', ['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), [\true, \false]]]], $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
+ $this->assertEquals([['setBar', []], ['setBar', [new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]]], $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
+ $this->assertEquals([['setBar', ['foo', new Reference('foo'), [true, false]]]], $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
$this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'getClass'], $services['new_factory2']->getFactory(), '->load() parses the factory tag');
+ $this->assertEquals([new Reference('baz'), 'getClass'], $services['new_factory2']->getFactory(), '->load() parses the factory tag');
$this->assertEquals(['BazClass', 'getInstance'], $services['new_factory3']->getFactory(), '->load() parses the factory tag');
$this->assertSame([null, 'getInstance'], $services['new_factory4']->getFactory(), '->load() accepts factory tag without class');
$aliases = $container->getAliases();
@@ -210,16 +234,16 @@ public function testLoadServices()
}
public function testParsesIteratorArgument()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services9.xml');
$lazyDefinition = $container->getDefinition('lazy_context');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(['k1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), 'k2' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container')]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments');
+ $this->assertEquals([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments');
}
public function testParsesTags()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services10.xml');
$services = $container->findTaggedServiceIds('foo_tag');
$this->assertCount(1, $services);
@@ -237,22 +261,22 @@ public function testParsesTags()
public function testParseTagsWithoutNameThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('tag_without_name.xml');
}
public function testParseTagWithEmptyNameThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The tag name for service ".+" in .* must be a non-empty string/');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('tag_with_empty_name.xml');
}
public function testDeprecated()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_deprecated.xml');
$this->assertTrue($container->getDefinition('foo')->isDeprecated());
$message = 'The "foo" service is deprecated. You should stop using it, as it will soon be removed.';
@@ -263,34 +287,34 @@ public function testDeprecated()
}
public function testConvertDomElementToArray()
{
- $doc = new \DOMDocument('1.0');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('bar');
- $this->assertEquals('bar', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
- $doc = new \DOMDocument('1.0');
+ $this->assertEquals('bar', XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('');
- $this->assertEquals(['foo' => 'bar'], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
- $doc = new \DOMDocument('1.0');
+ $this->assertEquals(['foo' => 'bar'], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('bar');
- $this->assertEquals(['foo' => 'bar'], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
- $doc = new \DOMDocument('1.0');
+ $this->assertEquals(['foo' => 'bar'], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('barbar');
- $this->assertEquals(['foo' => ['value' => 'bar', 'foo' => 'bar']], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
- $doc = new \DOMDocument('1.0');
+ $this->assertEquals(['foo' => ['value' => 'bar', 'foo' => 'bar']], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('');
- $this->assertEquals(['foo' => null], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
- $doc = new \DOMDocument('1.0');
+ $this->assertEquals(['foo' => null], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('');
- $this->assertEquals(['foo' => null], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
- $doc = new \DOMDocument('1.0');
+ $this->assertEquals(['foo' => null], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $doc = new DOMDocument('1.0');
$doc->loadXML('');
- $this->assertEquals(['foo' => [['foo' => 'bar'], ['foo' => 'bar']]], \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
+ $this->assertEquals(['foo' => [['foo' => 'bar'], ['foo' => 'bar']]], XmlFileLoader::convertDomElementToArray($doc->documentElement), '::convertDomElementToArray() converts a \\DomElement to an array');
}
public function testExtensions()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectExtension());
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectWithXsdExtension());
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ProjectExtension());
+ $container->registerExtension(new ProjectWithXsdExtension());
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
// extension without an XSD
$loader->load('extensions/services1.xml');
$container->compile();
@@ -301,10 +325,10 @@ public function testExtensions()
$this->assertEquals('BAR', $services['project.service.foo']->getClass(), '->load() parses extension elements');
$this->assertEquals('BAR', $parameters['project.parameter.foo'], '->load() parses extension elements');
// extension with an XSD
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectExtension());
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectWithXsdExtension());
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ProjectExtension());
+ $container->registerExtension(new ProjectWithXsdExtension());
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('extensions/services2.xml');
$container->compile();
$services = $container->getDefinitions();
@@ -313,17 +337,17 @@ public function testExtensions()
$this->assertArrayHasKey('project.parameter.bar', $parameters, '->load() parses extension elements');
$this->assertEquals('BAR', $services['project.service.foo']->getClass(), '->load() parses extension elements');
$this->assertEquals('BAR', $parameters['project.parameter.foo'], '->load() parses extension elements');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectExtension());
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectWithXsdExtension());
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ProjectExtension());
+ $container->registerExtension(new ProjectWithXsdExtension());
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
// extension with an XSD (does not validate)
try {
$loader->load('extensions/services3.xml');
$this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
- $this->assertRegExp(\sprintf('#^Unable to parse file ".+%s": .+.$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
+ $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'services3.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
$e = $e->getPrevious();
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
$this->assertStringContainsString('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
@@ -332,32 +356,32 @@ public function testExtensions()
try {
$loader->load('extensions/services4.xml');
$this->fail('->load() throws an InvalidArgumentException if the tag is not valid');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid');
$this->assertStringStartsWith('There is no extension able to load the configuration for "project:bar" (in', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag is not valid');
}
}
public function testExtensionInPhar()
{
- if (\extension_loaded('suhosin') && \false === \strpos(\ini_get('suhosin.executor.include.whitelist'), 'phar')) {
+ if (extension_loaded('suhosin') && false === strpos(ini_get('suhosin.executor.include.whitelist'), 'phar')) {
$this->markTestSkipped('To run this test, add "phar" to the "suhosin.executor.include.whitelist" settings in your php.ini file.');
}
- if (\defined('HHVM_VERSION')) {
+ if (defined('HHVM_VERSION')) {
$this->markTestSkipped('HHVM makes this test conflict with those run in separate processes.');
}
require_once self::$fixturesPath . '/includes/ProjectWithXsdExtensionInPhar.phar';
// extension with an XSD in PHAR archive
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectWithXsdExtensionInPhar());
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ProjectWithXsdExtensionInPhar());
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('extensions/services6.xml');
// extension with an XSD in PHAR archive (does not validate)
try {
$loader->load('extensions/services7.xml');
$this->fail('->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
- $this->assertRegExp(\sprintf('#^Unable to parse file ".+%s": .+.$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
+ $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'services7.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
$e = $e->getPrevious();
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
$this->assertStringContainsString('The attribute \'bar\' is not allowed', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration does not validate the XSD');
@@ -365,19 +389,19 @@ public function testExtensionInPhar()
}
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new XmlFileLoader(new ContainerBuilder(), new FileLocator());
$this->assertTrue($loader->supports('foo.xml'), '->supports() returns true if the resource is loadable');
$this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable');
$this->assertTrue($loader->supports('with_wrong_ext.yml', 'xml'), '->supports() returns true if the resource with forced type is loadable');
}
public function testNoNamingConflictsForAnonymousServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml/extension1'));
+ $container = new ContainerBuilder();
+ $loader1 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml/extension1'));
$loader1->load('services.xml');
$services = $container->getDefinitions();
$this->assertCount(3, $services, '->load() attributes unique ids to anonymous services');
- $loader2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml/extension2'));
+ $loader2 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml/extension2'));
$loader2->load('services.xml');
$services = $container->getDefinitions();
$this->assertCount(5, $services, '->load() attributes unique ids to anonymous services');
@@ -391,15 +415,15 @@ public function testNoNamingConflictsForAnonymousServices()
}
public function testDocTypeIsNotAllowed()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
// document types are not allowed.
try {
$loader->load('withdoctype.xml');
$this->fail('->load() throws an InvalidArgumentException if the configuration contains a document type');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type');
- $this->assertRegExp(\sprintf('#^Unable to parse file ".+%s": .+.$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type');
+ $this->assertRegExp(sprintf('#^Unable to parse file ".+%s": .+.$#', 'withdoctype.xml'), $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type');
$e = $e->getPrevious();
$this->assertInstanceOf('InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the configuration contains a document type');
$this->assertSame('Document types are not allowed.', $e->getMessage(), '->load() throws an InvalidArgumentException if the configuration contains a document type');
@@ -407,8 +431,8 @@ public function testDocTypeIsNotAllowed()
}
public function testXmlNamespaces()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('namespaces.xml');
$services = $container->getDefinitions();
$this->assertArrayHasKey('foo', $services, '->load() parses elements');
@@ -417,36 +441,36 @@ public function testXmlNamespaces()
}
public function testLoadIndexedArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services14.xml');
$this->assertEquals(['index_0' => 'app'], $container->findDefinition('logger')->getArguments());
}
public function testLoadInlinedServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services21.xml');
$foo = $container->getDefinition('foo');
$fooFactory = $foo->getFactory();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $fooFactory[0]);
+ $this->assertInstanceOf(Reference::class, $fooFactory[0]);
$this->assertTrue($container->has((string) $fooFactory[0]));
$fooFactoryDefinition = $container->getDefinition((string) $fooFactory[0]);
$this->assertSame('FooFactory', $fooFactoryDefinition->getClass());
$this->assertSame('createFoo', $fooFactory[1]);
$fooFactoryFactory = $fooFactoryDefinition->getFactory();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $fooFactoryFactory[0]);
+ $this->assertInstanceOf(Reference::class, $fooFactoryFactory[0]);
$this->assertTrue($container->has((string) $fooFactoryFactory[0]));
$this->assertSame('Foobar', $container->getDefinition((string) $fooFactoryFactory[0])->getClass());
$this->assertSame('createFooFactory', $fooFactoryFactory[1]);
$fooConfigurator = $foo->getConfigurator();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $fooConfigurator[0]);
+ $this->assertInstanceOf(Reference::class, $fooConfigurator[0]);
$this->assertTrue($container->has((string) $fooConfigurator[0]));
$fooConfiguratorDefinition = $container->getDefinition((string) $fooConfigurator[0]);
$this->assertSame('Bar', $fooConfiguratorDefinition->getClass());
$this->assertSame('configureFoo', $fooConfigurator[1]);
$barConfigurator = $fooConfiguratorDefinition->getConfigurator();
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $barConfigurator[0]);
+ $this->assertInstanceOf(Reference::class, $barConfigurator[0]);
$this->assertSame('Baz', $container->getDefinition((string) $barConfigurator[0])->getClass());
$this->assertSame('configureBar', $barConfigurator[1]);
}
@@ -455,39 +479,39 @@ public function testLoadInlinedServices()
*/
public function testType()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services22.xml');
$this->assertEquals(['Bar', 'Baz'], $container->getDefinition('foo')->getAutowiringTypes());
}
public function testAutowire()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services23.xml');
$this->assertTrue($container->getDefinition('bar')->isAutowired());
}
public function testClassFromId()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('class_from_id.xml');
$container->compile();
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class, $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class)->getClass());
+ $this->assertEquals(CaseSensitiveClass::class, $container->getDefinition(CaseSensitiveClass::class)->getClass());
}
public function testPrototype()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_prototype.xml');
- $ids = \array_keys($container->getDefinitions());
- \sort($ids);
- $this->assertSame([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar::class, 'service_container'], $ids);
+ $ids = array_keys($container->getDefinitions());
+ sort($ids);
+ $this->assertSame([Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
$resources = $container->getResources();
- $fixturesDir = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixtures' . \DIRECTORY_SEPARATOR;
- $resources = \array_map('strval', $resources);
- $this->assertContains((string) new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource($fixturesDir . 'xml' . \DIRECTORY_SEPARATOR . 'services_prototype.xml'), $resources);
- $this->assertContains((string) new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($fixturesDir . 'Prototype', '/*', \true), $resources);
+ $fixturesDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR;
+ $resources = array_map('strval', $resources);
+ $this->assertContains((string) new FileResource($fixturesDir . 'xml' . DIRECTORY_SEPARATOR . 'services_prototype.xml'), $resources);
+ $this->assertContains((string) new GlobResource($fixturesDir . 'Prototype', '/*', true), $resources);
$this->assertContains('_PhpScoper5ea00cc67502b\\reflection.Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\Foo', $resources);
$this->assertContains('_PhpScoper5ea00cc67502b\\reflection.Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\Sub\\Bar', $resources);
}
@@ -499,22 +523,22 @@ public function testPrototype()
*/
public function testAliasDefinitionContainsUnsupportedElements()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('legacy_invalid_alias_definition.xml');
$this->assertTrue($container->has('bar'));
}
public function testArgumentWithKeyOutsideCollection()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('with_key_outside_collection.xml');
$this->assertSame(['type' => 'foo', 'bar'], $container->getDefinition('foo')->getArguments());
}
public function testDefaults()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services28.xml');
$this->assertFalse($container->getDefinition('with_defaults')->isPublic());
$this->assertSame(['foo' => [[]]], $container->getDefinition('with_defaults')->getTags());
@@ -529,31 +553,31 @@ public function testDefaults()
$this->assertSame(['foo' => [[]]], $container->getDefinition('child_def')->getTags());
$this->assertFalse($container->getDefinition('child_def')->isAutowired());
$definitions = $container->getDefinitions();
- $this->assertSame('service_container', \key($definitions));
- \array_shift($definitions);
- $anonymous = \current($definitions);
- $this->assertSame('bar', \key($definitions));
+ $this->assertSame('service_container', key($definitions));
+ array_shift($definitions);
+ $anonymous = current($definitions);
+ $this->assertSame('bar', key($definitions));
$this->assertTrue($anonymous->isPublic());
$this->assertTrue($anonymous->isAutowired());
$this->assertSame(['foo' => [[]]], $anonymous->getTags());
}
public function testNamedArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_named_args.xml');
- $this->assertEquals(['$apiKey' => 'ABCD', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => null], $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->getArguments());
+ $this->assertEquals(['$apiKey' => 'ABCD', CaseSensitiveClass::class => null], $container->getDefinition(NamedArgumentsDummy::class)->getArguments());
$container->compile();
- $this->assertEquals([null, 'ABCD'], $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->getArguments());
- $this->assertEquals([['setApiKey', ['123']]], $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->getMethodCalls());
+ $this->assertEquals([null, 'ABCD'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments());
+ $this->assertEquals([['setApiKey', ['123']]], $container->getDefinition(NamedArgumentsDummy::class)->getMethodCalls());
}
public function testInstanceof()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_instanceof.xml');
$container->compile();
- $definition = $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class);
+ $definition = $container->getDefinition(Bar::class);
$this->assertTrue($definition->isAutowired());
$this->assertTrue($definition->isLazy());
$this->assertSame(['foo' => [[]], 'bar' => [[]]], $definition->getTags());
@@ -562,8 +586,8 @@ public function testInstanceOfAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The service "child_service" cannot use the "parent" option in the same file where "instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_instanceof_with_parent.xml');
$container->compile();
}
@@ -571,8 +595,8 @@ public function testAutoConfigureAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The service "child_service" cannot have a "parent" and also have "autoconfigure". Try setting autoconfigure="false" for the service.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_autoconfigure_with_parent.xml');
$container->compile();
}
@@ -580,43 +604,43 @@ public function testDefaultsAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Attribute "autowire" on service "child_service" cannot be inherited from "defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_defaults_with_parent.xml');
$container->compile();
}
public function testAutoConfigureInstanceof()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_autoconfigure.xml');
$this->assertTrue($container->getDefinition('use_defaults_settings')->isAutoconfigured());
$this->assertFalse($container->getDefinition('override_defaults_settings_to_false')->isAutoconfigured());
}
public function testBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_bindings.xml');
$container->compile();
$definition = $container->getDefinition('bar');
- $this->assertEquals(['NonExistent' => null, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class), '$foo' => [null], '$quz' => 'quz', '$factory' => 'factory'], \array_map(function ($v) {
+ $this->assertEquals(['NonExistent' => null, BarInterface::class => new Reference(Bar::class), '$foo' => [null], '$quz' => 'quz', '$factory' => 'factory'], array_map(function ($v) {
return $v->getValues()[0];
}, $definition->getBindings()));
- $this->assertEquals(['quz', null, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class), [null]], $definition->getArguments());
- $definition = $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class);
+ $this->assertEquals(['quz', null, new Reference(Bar::class), [null]], $definition->getArguments());
+ $definition = $container->getDefinition(Bar::class);
$this->assertEquals([null, 'factory'], $definition->getArguments());
- $this->assertEquals(['NonExistent' => null, '$quz' => 'quz', '$factory' => 'factory'], \array_map(function ($v) {
+ $this->assertEquals(['NonExistent' => null, '$quz' => 'quz', '$factory' => 'factory'], array_map(function ($v) {
return $v->getValues()[0];
}, $definition->getBindings()));
}
public function testTsantosContainer()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('services_tsantos.xml');
$container->compile();
- $dumper = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Dumper\PhpDumper($container);
+ $dumper = new PhpDumper($container);
$this->assertStringEqualsFile(self::$fixturesPath . '/php/services_tsantos.php', $dumper->dump());
}
/**
@@ -624,11 +648,11 @@ public function testTsantosContainer()
*/
public function testOverriddenDefaultsBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml'));
+ $container = new ContainerBuilder();
+ $loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml'));
$loader->load('defaults_bindings.xml');
$loader->load('defaults_bindings2.xml');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass())->process($container);
+ (new ResolveBindingsPass())->process($container);
$this->assertSame('overridden', $container->get('bar')->quz);
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php
index 705604e5d..7e98d0d46 100644
--- a/vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php
+++ b/vendor/symfony/dependency-injection/Tests/Loader/YamlFileLoaderTest.php
@@ -11,6 +11,7 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Loader;
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
+use _PhpScoper5ea00cc67502b\ProjectExtension;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver;
use _PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource;
@@ -28,13 +29,28 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir1\Service1;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir2\Service2;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir1\Service4;
+use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir2\Service5;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
-class YamlFileLoaderTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use ReflectionObject;
+use function array_keys;
+use function array_map;
+use function dirname;
+use function realpath;
+use function sort;
+use const DIRECTORY_SEPARATOR;
+use const PHP_INT_MAX;
+
+class YamlFileLoaderTest extends TestCase
{
protected static $fixturesPath;
public static function setUpBeforeClass()
{
- self::$fixturesPath = \realpath(__DIR__ . '/../Fixtures/');
+ self::$fixturesPath = realpath(__DIR__ . '/../Fixtures/');
require_once self::$fixturesPath . '/includes/foo.php';
require_once self::$fixturesPath . '/includes/ProjectExtension.php';
}
@@ -42,10 +58,10 @@ public function testLoadUnExistFile()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The file ".+" does not exist./');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini'));
- $r = new \ReflectionObject($loader);
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/ini'));
+ $r = new ReflectionObject($loader);
$m = $r->getMethod('loadFile');
- $m->setAccessible(\true);
+ $m->setAccessible(true);
$m->invoke($loader, 'foo.yml');
}
public function testLoadInvalidYamlFile()
@@ -53,10 +69,10 @@ public function testLoadInvalidYamlFile()
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The file ".+" does not contain valid YAML./');
$path = self::$fixturesPath . '/ini';
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator($path));
- $r = new \ReflectionObject($loader);
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator($path));
+ $r = new ReflectionObject($loader);
$m = $r->getMethod('loadFile');
- $m->setAccessible(\true);
+ $m->setAccessible(true);
$m->invoke($loader, $path . '/parameters.ini');
}
/**
@@ -65,7 +81,7 @@ public function testLoadInvalidYamlFile()
public function testLoadInvalidFile($file)
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load($file . '.yml');
}
public function provideInvalidFiles()
@@ -74,28 +90,28 @@ public function provideInvalidFiles()
}
public function testLoadParameters()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services2.yml');
- $this->assertEquals(['foo' => 'bar', 'mixedcase' => ['MixedCaseKey' => 'value'], 'values' => [\true, \false, 0, 1000.3, \PHP_INT_MAX], 'bar' => 'foo', 'escape' => '@escapeme', 'foo_bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo_bar')], $container->getParameterBag()->all(), '->load() converts YAML keys to lowercase');
+ $this->assertEquals(['foo' => 'bar', 'mixedcase' => ['MixedCaseKey' => 'value'], 'values' => [true, false, 0, 1000.3, PHP_INT_MAX], 'bar' => 'foo', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar')], $container->getParameterBag()->all(), '->load() converts YAML keys to lowercase');
}
public function testLoadImports()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $resolver = new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Loader\LoaderResolver([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\IniFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/ini')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\XmlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/xml')), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\PhpFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/php')), $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'))]);
+ $container = new ContainerBuilder();
+ $resolver = new LoaderResolver([new IniFileLoader($container, new FileLocator(self::$fixturesPath . '/ini')), new XmlFileLoader($container, new FileLocator(self::$fixturesPath . '/xml')), new PhpFileLoader($container, new FileLocator(self::$fixturesPath . '/php')), $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'))]);
$loader->setResolver($resolver);
$loader->load('services4.yml');
$actual = $container->getParameterBag()->all();
- $expected = ['foo' => 'bar', 'values' => [\true, \false, \PHP_INT_MAX], 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo_bar'), 'mixedcase' => ['MixedCaseKey' => 'value'], 'imported_from_ini' => \true, 'imported_from_xml' => \true, 'with_wrong_ext' => 'from yaml'];
- $this->assertEquals(\array_keys($expected), \array_keys($actual), '->load() imports and merges imported files');
+ $expected = ['foo' => 'bar', 'values' => [true, false, PHP_INT_MAX], 'bar' => '%foo%', 'escape' => '@escapeme', 'foo_bar' => new Reference('foo_bar'), 'mixedcase' => ['MixedCaseKey' => 'value'], 'imported_from_ini' => true, 'imported_from_xml' => true, 'with_wrong_ext' => 'from yaml'];
+ $this->assertEquals(array_keys($expected), array_keys($actual), '->load() imports and merges imported files');
$this->assertTrue($actual['imported_from_ini']);
// Bad import throws no exception due to ignore_errors value.
$loader->load('services4_bad_import.yml');
}
public function testLoadServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services6.yml');
$services = $container->getDefinitions();
$this->assertArrayHasKey('foo', $services, '->load() parses service elements');
@@ -103,17 +119,17 @@ public function testLoadServices()
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Definition', $services['foo'], '->load() converts service element to Definition instances');
$this->assertEquals('FooClass', $services['foo']->getClass(), '->load() parses the class attribute');
$this->assertEquals('%path%/foo.php', $services['file']->getFile(), '->load() parses the file tag');
- $this->assertEquals(['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), [\true, \false]], $services['arguments']->getArguments(), '->load() parses the argument tags');
+ $this->assertEquals(['foo', new Reference('foo'), [true, false]], $services['arguments']->getArguments(), '->load() parses the argument tags');
$this->assertEquals('sc_configure', $services['configurator1']->getConfigurator(), '->load() parses the configurator tag');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'configure'], $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
+ $this->assertEquals([new Reference('baz'), 'configure'], $services['configurator2']->getConfigurator(), '->load() parses the configurator tag');
$this->assertEquals(['BazClass', 'configureStatic'], $services['configurator3']->getConfigurator(), '->load() parses the configurator tag');
- $this->assertEquals([['setBar', []], ['setBar', []], ['setBar', [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]]], $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
- $this->assertEquals([['setBar', ['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo'), [\true, \false]]]], $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
+ $this->assertEquals([['setBar', []], ['setBar', []], ['setBar', [new Expression('service("foo").foo() ~ (container.hasParameter("foo") ? parameter("foo") : "default")')]]], $services['method_call1']->getMethodCalls(), '->load() parses the method_call tag');
+ $this->assertEquals([['setBar', ['foo', new Reference('foo'), [true, false]]]], $services['method_call2']->getMethodCalls(), '->load() parses the method_call tag');
$this->assertEquals('factory', $services['new_factory1']->getFactory(), '->load() parses the factory tag');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'getClass'], $services['new_factory2']->getFactory(), '->load() parses the factory tag');
+ $this->assertEquals([new Reference('baz'), 'getClass'], $services['new_factory2']->getFactory(), '->load() parses the factory tag');
$this->assertEquals(['BazClass', 'getInstance'], $services['new_factory3']->getFactory(), '->load() parses the factory tag');
$this->assertSame([null, 'getInstance'], $services['new_factory4']->getFactory(), '->load() accepts factory tag without class');
- $this->assertEquals(['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz')], $services['Acme\\WithShortCutArgs']->getArguments(), '->load() parses short service definition');
+ $this->assertEquals(['foo', new Reference('baz')], $services['Acme\\WithShortCutArgs']->getArguments(), '->load() parses short service definition');
$aliases = $container->getAliases();
$this->assertArrayHasKey('alias_for_foo', $aliases, '->load() parses aliases');
$this->assertEquals('foo', (string) $aliases['alias_for_foo'], '->load() parses aliases');
@@ -130,27 +146,27 @@ public function testLoadServices()
}
public function testLoadFactoryShortSyntax()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services14.yml');
$services = $container->getDefinitions();
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('baz'), 'getClass'], $services['factory']->getFactory(), '->load() parses the factory tag with service:method');
+ $this->assertEquals([new Reference('baz'), 'getClass'], $services['factory']->getFactory(), '->load() parses the factory tag with service:method');
$this->assertEquals(['FooBacFactory', 'createFooBar'], $services['factory_with_static_call']->getFactory(), '->load() parses the factory tag with Class::method');
}
public function testLoadConfiguratorShortSyntax()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_configurator_short_syntax.yml');
$services = $container->getDefinitions();
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo_bar_configurator'), 'configure'], $services['foo_bar']->getConfigurator(), '->load() parses the configurator tag with service:method');
+ $this->assertEquals([new Reference('foo_bar_configurator'), 'configure'], $services['foo_bar']->getConfigurator(), '->load() parses the configurator tag with service:method');
$this->assertEquals(['FooBarConfigurator', 'configureFooBar'], $services['foo_bar_with_static_call']->getConfigurator(), '->load() parses the configurator tag with Class::method');
}
public function testExtensions()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectExtension());
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ProjectExtension());
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services10.yml');
$container->compile();
$services = $container->getDefinitions();
@@ -162,23 +178,23 @@ public function testExtensions()
try {
$loader->load('services11.yml');
$this->fail('->load() throws an InvalidArgumentException if the tag is not valid');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tag is not valid');
$this->assertStringStartsWith('There is no extension able to load the configuration for "foobarfoobar" (in', $e->getMessage(), '->load() throws an InvalidArgumentException if the tag is not valid');
}
}
public function testExtensionWithNullConfig()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $container->registerExtension(new \_PhpScoper5ea00cc67502b\ProjectExtension());
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $container->registerExtension(new ProjectExtension());
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('null_config.yml');
$container->compile();
$this->assertSame([null], $container->getParameter('project.configs'));
}
public function testSupports()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator());
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator());
$this->assertTrue($loader->supports('foo.yml'), '->supports() returns true if the resource is loadable');
$this->assertTrue($loader->supports('foo.yaml'), '->supports() returns true if the resource is loadable');
$this->assertFalse($loader->supports('foo.foo'), '->supports() returns false if the resource is not loadable');
@@ -187,78 +203,78 @@ public function testSupports()
}
public function testNonArrayTagsThrowsException()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
try {
$loader->load('badtag1.yml');
$this->fail('->load() should throw an exception when the tags key of a service is not an array');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if the tags key is not an array');
$this->assertStringStartsWith('Parameter "tags" must be an array for service', $e->getMessage(), '->load() throws an InvalidArgumentException if the tags key is not an array');
}
}
public function testTagWithoutNameThrowsException()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
try {
$loader->load('badtag2.yml');
$this->fail('->load() should throw an exception when a tag is missing the name key');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag is missing the name key');
$this->assertStringStartsWith('A "tags" entry is missing a "name" key for service ', $e->getMessage(), '->load() throws an InvalidArgumentException if a tag is missing the name key');
}
}
public function testNameOnlyTagsAreAllowedAsString()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('tag_name_only.yml');
$this->assertCount(1, $container->getDefinition('foo_service')->getTag('foo'));
}
public function testTagWithAttributeArrayThrowsException()
{
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
try {
$loader->load('badtag3.yml');
$this->fail('->load() should throw an exception when a tag-attribute is not a scalar');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException', $e, '->load() throws an InvalidArgumentException if a tag-attribute is not a scalar');
$this->assertStringStartsWith('A "tags" attribute must be of a scalar-type for service "foo_service", tag "foo", attribute "bar"', $e->getMessage(), '->load() throws an InvalidArgumentException if a tag-attribute is not a scalar');
}
}
public function testLoadYamlOnlyWithKeys()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services21.yml');
$definition = $container->getDefinition('manager');
- $this->assertEquals([['setLogger', [new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('logger')]], ['setClass', ['User']]], $definition->getMethodCalls());
- $this->assertEquals([\true], $definition->getArguments());
+ $this->assertEquals([['setLogger', [new Reference('logger')]], ['setClass', ['User']]], $definition->getMethodCalls());
+ $this->assertEquals([true], $definition->getArguments());
$this->assertEquals(['manager' => [['alias' => 'user']]], $definition->getTags());
}
public function testTagWithEmptyNameThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The tag name for service ".+" in .+ must be a non-empty string/');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('tag_name_empty_string.yml');
}
public function testTagWithNonStringNameThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/The tag name for service ".+" in .+ must be a non-empty string/');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('tag_name_no_string.yml');
}
public function testTypesNotArray()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('bad_types1.yml');
}
public function testTypeNotString()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('bad_types2.yml');
}
/**
@@ -266,82 +282,82 @@ public function testTypeNotString()
*/
public function testTypes()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services22.yml');
$this->assertEquals(['Foo', 'Bar'], $container->getDefinition('foo_service')->getAutowiringTypes());
$this->assertEquals(['Foo'], $container->getDefinition('baz_service')->getAutowiringTypes());
}
public function testParsesIteratorArgument()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services9.yml');
$lazyDefinition = $container->getDefinition('lazy_context');
- $this->assertEquals([new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument(['k1' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo.baz'), 'k2' => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('service_container')]), new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Argument\IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments');
+ $this->assertEquals([new IteratorArgument(['k1' => new Reference('foo.baz'), 'k2' => new Reference('service_container')]), new IteratorArgument([])], $lazyDefinition->getArguments(), '->load() parses lazy arguments');
$message = 'The "deprecated_service" service is deprecated. You should stop using it, as it will soon be removed.';
$this->assertSame($message, $container->getDefinition('deprecated_service')->getDeprecationMessage('deprecated_service'));
}
public function testAutowire()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services23.yml');
$this->assertTrue($container->getDefinition('bar_service')->isAutowired());
}
public function testClassFromId()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('class_from_id.yml');
$container->compile();
- $this->assertEquals(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class, $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class)->getClass());
+ $this->assertEquals(CaseSensitiveClass::class, $container->getDefinition(CaseSensitiveClass::class)->getClass());
}
public function testPrototype()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_prototype.yml');
- $ids = \array_keys($container->getDefinitions());
- \sort($ids);
- $this->assertSame([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar::class, 'service_container'], $ids);
+ $ids = array_keys($container->getDefinitions());
+ sort($ids);
+ $this->assertSame([Foo::class, Prototype\Sub\Bar::class, 'service_container'], $ids);
$resources = $container->getResources();
- $fixturesDir = \dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'Fixtures' . \DIRECTORY_SEPARATOR;
- $resources = \array_map('strval', $resources);
- $this->assertContains((string) new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\FileResource($fixturesDir . 'yaml' . \DIRECTORY_SEPARATOR . 'services_prototype.yml'), $resources);
- $this->assertContains((string) new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\Resource\GlobResource($fixturesDir . 'Prototype', '', \true), $resources);
+ $fixturesDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR;
+ $resources = array_map('strval', $resources);
+ $this->assertContains((string) new FileResource($fixturesDir . 'yaml' . DIRECTORY_SEPARATOR . 'services_prototype.yml'), $resources);
+ $this->assertContains((string) new GlobResource($fixturesDir . 'Prototype', '', true), $resources);
$this->assertContains('_PhpScoper5ea00cc67502b\\reflection.Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\Foo', $resources);
$this->assertContains('_PhpScoper5ea00cc67502b\\reflection.Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\Prototype\\Sub\\Bar', $resources);
}
public function testPrototypeWithNamespace()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_prototype_namespace.yml');
- $ids = \array_keys($container->getDefinitions());
- \sort($ids);
- $this->assertSame([\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir1\Service1::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir2\Service2::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir1\Service4::class, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir2\Service5::class, 'service_container'], $ids);
- $this->assertTrue($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir1\Service1::class)->hasTag('foo'));
- $this->assertTrue($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir1\Service4::class)->hasTag('foo'));
- $this->assertFalse($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir1\Service1::class)->hasTag('bar'));
- $this->assertFalse($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir1\Service4::class)->hasTag('bar'));
- $this->assertTrue($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir2\Service2::class)->hasTag('bar'));
- $this->assertTrue($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir2\Service5::class)->hasTag('bar'));
- $this->assertFalse($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component1\Dir2\Service2::class)->hasTag('foo'));
- $this->assertFalse($container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\OtherDir\Component2\Dir2\Service5::class)->hasTag('foo'));
+ $ids = array_keys($container->getDefinitions());
+ sort($ids);
+ $this->assertSame([Service1::class, Service2::class, Service4::class, Service5::class, 'service_container'], $ids);
+ $this->assertTrue($container->getDefinition(Service1::class)->hasTag('foo'));
+ $this->assertTrue($container->getDefinition(Service4::class)->hasTag('foo'));
+ $this->assertFalse($container->getDefinition(Service1::class)->hasTag('bar'));
+ $this->assertFalse($container->getDefinition(Service4::class)->hasTag('bar'));
+ $this->assertTrue($container->getDefinition(Service2::class)->hasTag('bar'));
+ $this->assertTrue($container->getDefinition(Service5::class)->hasTag('bar'));
+ $this->assertFalse($container->getDefinition(Service2::class)->hasTag('foo'));
+ $this->assertFalse($container->getDefinition(Service5::class)->hasTag('foo'));
}
public function testPrototypeWithNamespaceAndNoResource()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/A "resource" attribute must be set when the "namespace" attribute is set for service ".+" in .+/');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_prototype_namespace_without_resource.yml');
}
public function testDefaults()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services28.yml');
$this->assertFalse($container->getDefinition('with_defaults')->isPublic());
$this->assertSame(['foo' => [[]]], $container->getDefinition('with_defaults')->getTags());
@@ -367,23 +383,23 @@ public function testDefaults()
}
public function testNamedArguments()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_named_args.yml');
- $this->assertEquals([null, '$apiKey' => 'ABCD'], $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->getArguments());
- $this->assertEquals(['$apiKey' => 'ABCD', \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass::class => null], $container->getDefinition('another_one')->getArguments());
+ $this->assertEquals([null, '$apiKey' => 'ABCD'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments());
+ $this->assertEquals(['$apiKey' => 'ABCD', CaseSensitiveClass::class => null], $container->getDefinition('another_one')->getArguments());
$container->compile();
- $this->assertEquals([null, 'ABCD'], $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy::class)->getArguments());
+ $this->assertEquals([null, 'ABCD'], $container->getDefinition(NamedArgumentsDummy::class)->getArguments());
$this->assertEquals([null, 'ABCD'], $container->getDefinition('another_one')->getArguments());
$this->assertEquals([['setApiKey', ['123']]], $container->getDefinition('another_one')->getMethodCalls());
}
public function testInstanceof()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_instanceof.yml');
$container->compile();
- $definition = $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class);
+ $definition = $container->getDefinition(Bar::class);
$this->assertTrue($definition->isAutowired());
$this->assertTrue($definition->isLazy());
$this->assertSame(['foo' => [[]], 'bar' => [[]]], $definition->getTags());
@@ -392,8 +408,8 @@ public function testInstanceOfAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The service "child_service" cannot use the "parent" option in the same file where "_instanceof" configuration is defined as using both is not supported. Move your child definitions to a separate file.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_instanceof_with_parent.yml');
$container->compile();
}
@@ -401,8 +417,8 @@ public function testAutoConfigureAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The service "child_service" cannot have a "parent" and also have "autoconfigure". Try setting "autoconfigure: false" for the service.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_autoconfigure_with_parent.yml');
$container->compile();
}
@@ -410,8 +426,8 @@ public function testDefaultsAndChildDefinitionNotAllowed()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('Attribute "autowire" on service "child_service" cannot be inherited from "_defaults" when a "parent" is set. Move your child definitions to a separate file or define this attribute explicitly.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_defaults_with_parent.yml');
$container->compile();
}
@@ -419,14 +435,14 @@ public function testDecoratedServicesWithWrongSyntaxThrowsException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessage('The value of the "decorates" option for the "bar" service must be the id of the service without the "@" prefix (replace "@foo" with "foo").');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('bad_decorates.yml');
}
public function testInvalidTagsWithDefaults()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Parameter "tags" must be an array for service "Foo\\\\Bar" in ".+services31_invalid_tags\\.yml"\\. Check your YAML syntax./');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader(new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder(), new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $loader = new YamlFileLoader(new ContainerBuilder(), new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services31_invalid_tags.yml');
}
/**
@@ -435,21 +451,21 @@ public function testInvalidTagsWithDefaults()
*/
public function testUnderscoreServiceId()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_underscore.yml');
}
public function testAnonymousServices()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('anonymous_services.yml');
$definition = $container->getDefinition('Foo');
$this->assertTrue($definition->isAutowired());
// Anonymous service in an argument
$args = $definition->getArguments();
$this->assertCount(1, $args);
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $args[0]);
+ $this->assertInstanceOf(Reference::class, $args[0]);
$this->assertTrue($container->has((string) $args[0]));
$this->assertRegExp('/^\\d+_Bar~[._A-Za-z0-9]{7}$/', (string) $args[0]);
$anonymous = $container->getDefinition((string) $args[0]);
@@ -459,7 +475,7 @@ public function testAnonymousServices()
// Anonymous service in a callable
$factory = $definition->getFactory();
$this->assertIsArray($factory);
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $factory[0]);
+ $this->assertInstanceOf(Reference::class, $factory[0]);
$this->assertTrue($container->has((string) $factory[0]));
$this->assertRegExp('/^\\d+_Quz~[._A-Za-z0-9]{7}$/', (string) $factory[0]);
$this->assertEquals('constructFoo', $factory[1]);
@@ -470,17 +486,17 @@ public function testAnonymousServices()
}
public function testAnonymousServicesInDifferentFilesWithSameNameDoNotConflict()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml/foo'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml/foo'));
$loader->load('services.yml');
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml/bar'));
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml/bar'));
$loader->load('services.yml');
$this->assertCount(5, $container->getDefinitions());
}
public function testAnonymousServicesInInstanceof()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('anonymous_services_in_instanceof.yml');
$definition = $container->getDefinition('Dummy');
$instanceof = $definition->getInstanceofConditionals();
@@ -488,7 +504,7 @@ public function testAnonymousServicesInInstanceof()
$this->assertArrayHasKey('DummyInterface', $instanceof);
$args = $instanceof['DummyInterface']->getProperties();
$this->assertCount(1, $args);
- $this->assertInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference::class, $args['foo']);
+ $this->assertInstanceOf(Reference::class, $args['foo']);
$this->assertTrue($container->has((string) $args['foo']));
$anonymous = $container->getDefinition((string) $args['foo']);
$this->assertEquals('Anonymous', $anonymous->getClass());
@@ -500,22 +516,22 @@ public function testAnonymousServicesWithAliases()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Creating an alias using the tag "!service" is not allowed in ".+anonymous_services_alias\\.yml"\\./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('anonymous_services_alias.yml');
}
public function testAnonymousServicesInParameters()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Using an anonymous service in a parameter is not allowed in ".+anonymous_services_in_parameters\\.yml"\\./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('anonymous_services_in_parameters.yml');
}
public function testAutoConfigureInstanceof()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_autoconfigure.yml');
$this->assertTrue($container->getDefinition('use_defaults_settings')->isAutoconfigured());
$this->assertFalse($container->getDefinition('override_defaults_settings_to_false')->isAutoconfigured());
@@ -524,32 +540,32 @@ public function testEmptyDefaultsThrowsClearException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Service "_defaults" key must be an array, "NULL" given in ".+bad_empty_defaults\\.yml"\\./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('bad_empty_defaults.yml');
}
public function testEmptyInstanceofThrowsClearException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
$this->expectExceptionMessageRegExp('/Service "_instanceof" key must be an array, "NULL" given in ".+bad_empty_instanceof\\.yml"\\./');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('bad_empty_instanceof.yml');
}
public function testBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('services_bindings.yml');
$container->compile();
$definition = $container->getDefinition('bar');
- $this->assertEquals(['NonExistent' => null, \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\BarInterface::class => new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class), '$foo' => [null], '$quz' => 'quz', '$factory' => 'factory'], \array_map(function ($v) {
+ $this->assertEquals(['NonExistent' => null, BarInterface::class => new Reference(Bar::class), '$foo' => [null], '$quz' => 'quz', '$factory' => 'factory'], array_map(function ($v) {
return $v->getValues()[0];
}, $definition->getBindings()));
- $this->assertEquals(['quz', null, new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class), [null]], $definition->getArguments());
- $definition = $container->getDefinition(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\Fixtures\Bar::class);
+ $this->assertEquals(['quz', null, new Reference(Bar::class), [null]], $definition->getArguments());
+ $definition = $container->getDefinition(Bar::class);
$this->assertEquals([null, 'factory'], $definition->getArguments());
- $this->assertEquals(['NonExistent' => null, '$quz' => 'quz', '$factory' => 'factory'], \array_map(function ($v) {
+ $this->assertEquals(['NonExistent' => null, '$quz' => 'quz', '$factory' => 'factory'], array_map(function ($v) {
return $v->getValues()[0];
}, $definition->getBindings()));
}
@@ -558,11 +574,11 @@ public function testBindings()
*/
public function testOverriddenDefaultsBindings()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('defaults_bindings.yml');
$loader->load('defaults_bindings2.yml');
- (new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Compiler\ResolveBindingsPass())->process($container);
+ (new ResolveBindingsPass())->process($container);
$this->assertSame('overridden', $container->get('bar')->quz);
}
/**
@@ -572,8 +588,8 @@ public function testOverriddenDefaultsBindings()
*/
public function testAliasDefinitionContainsUnsupportedElements()
{
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerBuilder();
- $loader = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Loader\YamlFileLoader($container, new \_PhpScoper5ea00cc67502b\Symfony\Component\Config\FileLocator(self::$fixturesPath . '/yaml'));
+ $container = new ContainerBuilder();
+ $loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath . '/yaml'));
$loader->load('legacy_invalid_alias_definition.yml');
$this->assertTrue($container->has('foo'));
}
diff --git a/vendor/symfony/dependency-injection/Tests/Loader/index.php b/vendor/symfony/dependency-injection/Tests/Loader/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/Loader/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php b/vendor/symfony/dependency-injection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php
index bcc311931..e5f27dd29 100644
--- a/vendor/symfony/dependency-injection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ParameterBag/EnvPlaceholderParameterBagTest.php
@@ -12,26 +12,29 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
-class EnvPlaceholderParameterBagTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function array_values;
+use function sprintf;
+
+class EnvPlaceholderParameterBagTest extends TestCase
{
public function testGetThrowsInvalidArgumentExceptionIfEnvNameContainsNonWordCharacters()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $bag = new EnvPlaceholderParameterBag();
$bag->get('env(%foo%)');
}
public function testMergeWillNotDuplicateIdenticalParameters()
{
$envVariableName = 'DB_HOST';
- $parameter = \sprintf('env(%s)', $envVariableName);
- $firstBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $parameter = sprintf('env(%s)', $envVariableName);
+ $firstBag = new EnvPlaceholderParameterBag();
// initialize placeholders
$firstBag->get($parameter);
$secondBag = clone $firstBag;
$firstBag->mergeEnvPlaceholders($secondBag);
$mergedPlaceholders = $firstBag->getEnvPlaceholders();
$placeholderForVariable = $mergedPlaceholders[$envVariableName];
- $placeholder = \array_values($placeholderForVariable)[0];
+ $placeholder = array_values($placeholderForVariable)[0];
$this->assertCount(1, $placeholderForVariable);
$this->assertIsString($placeholder);
$this->assertStringContainsString($envVariableName, $placeholder);
@@ -39,16 +42,16 @@ public function testMergeWillNotDuplicateIdenticalParameters()
public function testMergeWhereFirstBagIsEmptyWillWork()
{
$envVariableName = 'DB_HOST';
- $parameter = \sprintf('env(%s)', $envVariableName);
- $firstBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
- $secondBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $parameter = sprintf('env(%s)', $envVariableName);
+ $firstBag = new EnvPlaceholderParameterBag();
+ $secondBag = new EnvPlaceholderParameterBag();
// initialize placeholder only in second bag
$secondBag->get($parameter);
$this->assertEmpty($firstBag->getEnvPlaceholders());
$firstBag->mergeEnvPlaceholders($secondBag);
$mergedPlaceholders = $firstBag->getEnvPlaceholders();
$placeholderForVariable = $mergedPlaceholders[$envVariableName];
- $placeholder = \array_values($placeholderForVariable)[0];
+ $placeholder = array_values($placeholderForVariable)[0];
$this->assertCount(1, $placeholderForVariable);
$this->assertIsString($placeholder);
$this->assertStringContainsString($envVariableName, $placeholder);
@@ -57,9 +60,9 @@ public function testMergeWherePlaceholderOnlyExistsInSecond()
{
$uniqueEnvName = 'DB_HOST';
$commonEnvName = 'DB_USER';
- $uniqueParamName = \sprintf('env(%s)', $uniqueEnvName);
- $commonParamName = \sprintf('env(%s)', $commonEnvName);
- $firstBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $uniqueParamName = sprintf('env(%s)', $uniqueEnvName);
+ $commonParamName = sprintf('env(%s)', $commonEnvName);
+ $firstBag = new EnvPlaceholderParameterBag();
// initialize common placeholder
$firstBag->get($commonParamName);
$secondBag = clone $firstBag;
@@ -74,9 +77,9 @@ public function testMergeWherePlaceholderOnlyExistsInSecond()
public function testMergeWithDifferentIdentifiersForPlaceholders()
{
$envName = 'DB_USER';
- $paramName = \sprintf('env(%s)', $envName);
- $firstBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
- $secondBag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $paramName = sprintf('env(%s)', $envName);
+ $firstBag = new EnvPlaceholderParameterBag();
+ $secondBag = new EnvPlaceholderParameterBag();
// initialize placeholders
$firstPlaceholder = $firstBag->get($paramName);
$secondPlaceholder = $secondBag->get($paramName);
@@ -87,7 +90,7 @@ public function testMergeWithDifferentIdentifiersForPlaceholders()
}
public function testResolveEnvCastsIntToString()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $bag = new EnvPlaceholderParameterBag();
$bag->get('env(INT_VAR)');
$bag->set('env(INT_VAR)', 2);
$bag->resolve();
@@ -95,7 +98,7 @@ public function testResolveEnvCastsIntToString()
}
public function testResolveEnvAllowsNull()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $bag = new EnvPlaceholderParameterBag();
$bag->get('env(NULL_VAR)');
$bag->set('env(NULL_VAR)', null);
$bag->resolve();
@@ -105,14 +108,14 @@ public function testResolveThrowsOnBadDefaultValue()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The default value of env parameter "ARRAY_VAR" must be scalar or null, "array" given.');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $bag = new EnvPlaceholderParameterBag();
$bag->get('env(ARRAY_VAR)');
$bag->set('env(ARRAY_VAR)', []);
$bag->resolve();
}
public function testGetEnvAllowsNull()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $bag = new EnvPlaceholderParameterBag();
$bag->set('env(NULL_VAR)', null);
$bag->get('env(NULL_VAR)');
$bag->resolve();
@@ -122,7 +125,7 @@ public function testGetThrowsOnBadDefaultValue()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\RuntimeException');
$this->expectExceptionMessage('The default value of an env() parameter must be scalar or null, but "array" given to "env(ARRAY_VAR)".');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag();
+ $bag = new EnvPlaceholderParameterBag();
$bag->set('env(ARRAY_VAR)', []);
$bag->get('env(ARRAY_VAR)');
$bag->resolve();
diff --git a/vendor/symfony/dependency-injection/Tests/ParameterBag/FrozenParameterBagTest.php b/vendor/symfony/dependency-injection/Tests/ParameterBag/FrozenParameterBagTest.php
index 7b034c985..a89413c4b 100644
--- a/vendor/symfony/dependency-injection/Tests/ParameterBag/FrozenParameterBagTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ParameterBag/FrozenParameterBagTest.php
@@ -12,36 +12,36 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
-class FrozenParameterBagTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class FrozenParameterBagTest extends TestCase
{
public function testConstructor()
{
$parameters = ['foo' => 'foo', 'bar' => 'bar'];
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag($parameters);
+ $bag = new FrozenParameterBag($parameters);
$this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument');
}
public function testClear()
{
$this->expectException('LogicException');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag([]);
+ $bag = new FrozenParameterBag([]);
$bag->clear();
}
public function testSet()
{
$this->expectException('LogicException');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag([]);
+ $bag = new FrozenParameterBag([]);
$bag->set('foo', 'bar');
}
public function testAdd()
{
$this->expectException('LogicException');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag([]);
+ $bag = new FrozenParameterBag([]);
$bag->add([]);
}
public function testRemove()
{
$this->expectException('LogicException');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag(['foo' => 'bar']);
+ $bag = new FrozenParameterBag(['foo' => 'bar']);
$bag->remove('foo');
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php b/vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php
index fee97f6ee..f01e495e5 100644
--- a/vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ParameterBag/ParameterBagTest.php
@@ -15,28 +15,31 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
-class ParameterBagTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use Exception;
+use function sprintf;
+
+class ParameterBagTest extends TestCase
{
public function testConstructor()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($parameters = ['foo' => 'foo', 'bar' => 'bar']);
+ $bag = new ParameterBag($parameters = ['foo' => 'foo', 'bar' => 'bar']);
$this->assertEquals($parameters, $bag->all(), '__construct() takes an array of parameters as its first argument');
}
public function testClear()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag($parameters = ['foo' => 'foo', 'bar' => 'bar']);
+ $bag = new ParameterBag($parameters = ['foo' => 'foo', 'bar' => 'bar']);
$bag->clear();
$this->assertEquals([], $bag->all(), '->clear() removes all parameters');
}
public function testRemove()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'foo', 'bar' => 'bar']);
+ $bag = new ParameterBag(['foo' => 'foo', 'bar' => 'bar']);
$bag->remove('foo');
$this->assertEquals(['bar' => 'bar'], $bag->all(), '->remove() removes a parameter');
}
public function testGetSet()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']);
+ $bag = new ParameterBag(['foo' => 'bar']);
$bag->set('bar', 'foo');
$this->assertEquals('foo', $bag->get('bar'), '->set() sets the value of a new parameter');
$bag->set('foo', 'baz');
@@ -44,7 +47,7 @@ public function testGetSet()
try {
$bag->get('baba');
$this->fail('->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException if the key does not exist');
- } catch (\Exception $e) {
+ } catch (Exception $e) {
$this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException', $e, '->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException if the key does not exist');
$this->assertEquals('You have requested a non-existent parameter "baba".', $e->getMessage(), '->get() throws an Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException if the key does not exist');
}
@@ -54,8 +57,8 @@ public function testGetSet()
*/
public function testGetThrowParameterNotFoundException($parameterKey, $exceptionMessage)
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', 'fiz' => ['bar' => ['boo' => 12]]]);
- $this->expectException(\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException::class);
+ $bag = new ParameterBag(['foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz', 'fiz' => ['bar' => ['boo' => 12]]]);
+ $this->expectException(ParameterNotFoundException::class);
$this->expectExceptionMessage($exceptionMessage);
$bag->get($parameterKey);
}
@@ -65,7 +68,7 @@ public function provideGetThrowParameterNotFoundExceptionData()
}
public function testHas()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']);
+ $bag = new ParameterBag(['foo' => 'bar']);
$this->assertTrue($bag->has('foo'), '->has() returns true if a parameter is defined');
$this->assertFalse($bag->has('bar'), '->has() returns false if a parameter is not defined');
}
@@ -78,7 +81,7 @@ public function testHas()
*/
public function testMixedCase()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'foo', 'bar' => 'bar']);
+ $bag = new ParameterBag(['foo' => 'foo', 'bar' => 'bar']);
$bag->remove('BAR');
$this->assertEquals(['foo' => 'foo'], $bag->all(), '->remove() converts key to lowercase before removing');
$bag->set('Foo', 'baz1');
@@ -88,85 +91,85 @@ public function testMixedCase()
}
public function testResolveValue()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag([]);
+ $bag = new ParameterBag([]);
$this->assertEquals('foo', $bag->resolveValue('foo'), '->resolveValue() returns its argument unmodified if no placeholders are found');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']);
+ $bag = new ParameterBag(['foo' => 'bar']);
$this->assertEquals('I\'m a bar', $bag->resolveValue('I\'m a %foo%'), '->resolveValue() replaces placeholders by their values');
$this->assertEquals(['bar' => 'bar'], $bag->resolveValue(['%foo%' => '%foo%']), '->resolveValue() replaces placeholders in keys and values of arrays');
$this->assertEquals(['bar' => ['bar' => ['bar' => 'bar']]], $bag->resolveValue(['%foo%' => ['%foo%' => ['%foo%' => '%foo%']]]), '->resolveValue() replaces placeholders in nested arrays');
$this->assertEquals('I\'m a %%foo%%', $bag->resolveValue('I\'m a %%foo%%'), '->resolveValue() supports % escaping by doubling it');
$this->assertEquals('I\'m a bar %%foo bar', $bag->resolveValue('I\'m a %foo% %%foo %foo%'), '->resolveValue() supports % escaping by doubling it');
$this->assertEquals(['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']]], $bag->resolveValue(['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']]]), '->resolveValue() supports % escaping by doubling it');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => \true]);
+ $bag = new ParameterBag(['foo' => true]);
$this->assertTrue($bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => null]);
+ $bag = new ParameterBag(['foo' => null]);
$this->assertNull($bag->resolveValue('%foo%'), '->resolveValue() replaces arguments that are just a placeholder by their value without casting them to strings');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar', 'baz' => '%%%foo% %foo%%% %%foo%% %%%foo%%%']);
+ $bag = new ParameterBag(['foo' => 'bar', 'baz' => '%%%foo% %foo%%% %%foo%% %%%foo%%%']);
$this->assertEquals('%%bar bar%% %%foo%% %%bar%%', $bag->resolveValue('%baz%'), '->resolveValue() replaces params placed besides escaped %');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['baz' => '%%s?%%s']);
+ $bag = new ParameterBag(['baz' => '%%s?%%s']);
$this->assertEquals('%%s?%%s', $bag->resolveValue('%baz%'), '->resolveValue() is not replacing greedily');
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag([]);
+ $bag = new ParameterBag([]);
try {
$bag->resolveValue('%foobar%');
$this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
$this->assertEquals('You have requested a non-existent parameter "foobar".', $e->getMessage(), '->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter');
}
try {
$bag->resolveValue('foo %foobar% bar');
$this->fail('->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
$this->assertEquals('You have requested a non-existent parameter "foobar".', $e->getMessage(), '->resolveValue() throws a ParameterNotFoundException if a placeholder references a non-existent parameter');
}
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'a %bar%', 'bar' => []]);
+ $bag = new ParameterBag(['foo' => 'a %bar%', 'bar' => []]);
try {
$bag->resolveValue('%foo%');
$this->fail('->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\RuntimeException $e) {
+ } catch (RuntimeException $e) {
$this->assertEquals('A string value must be composed of strings and/or numbers, but found parameter "bar" of type "array" inside string value "a %bar%".', $e->getMessage(), '->resolveValue() throws a RuntimeException when a parameter embeds another non-string parameter');
}
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => '%bar%', 'bar' => '%foobar%', 'foobar' => '%foo%']);
+ $bag = new ParameterBag(['foo' => '%bar%', 'bar' => '%foobar%', 'foobar' => '%foo%']);
try {
$bag->resolveValue('%foo%');
$this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException $e) {
+ } catch (ParameterCircularReferenceException $e) {
$this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").', $e->getMessage(), '->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
}
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'a %bar%', 'bar' => 'a %foobar%', 'foobar' => 'a %foo%']);
+ $bag = new ParameterBag(['foo' => 'a %bar%', 'bar' => 'a %foobar%', 'foobar' => 'a %foo%']);
try {
$bag->resolveValue('%foo%');
$this->fail('->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException $e) {
+ } catch (ParameterCircularReferenceException $e) {
$this->assertEquals('Circular reference detected for parameter "foo" ("foo" > "bar" > "foobar" > "foo").', $e->getMessage(), '->resolveValue() throws a ParameterCircularReferenceException when a parameter has a circular reference');
}
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['host' => 'foo.bar', 'port' => 1337]);
+ $bag = new ParameterBag(['host' => 'foo.bar', 'port' => 1337]);
$this->assertEquals('foo.bar:1337', $bag->resolveValue('%host%:%port%'));
}
public function testResolveIndicatesWhyAParameterIsNeeded()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => '%bar%']);
+ $bag = new ParameterBag(['foo' => '%bar%']);
try {
$bag->resolve();
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
$this->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e->getMessage());
}
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => '%bar%']);
+ $bag = new ParameterBag(['foo' => '%bar%']);
try {
$bag->resolve();
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
+ } catch (ParameterNotFoundException $e) {
$this->assertEquals('The parameter "foo" has a dependency on a non-existent parameter "bar".', $e->getMessage());
}
}
public function testResolveUnescapesValue()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']], 'bar' => 'I\'m a %%foo%%']);
+ $bag = new ParameterBag(['foo' => ['bar' => ['ding' => 'I\'m a bar %%foo %%bar']], 'bar' => 'I\'m a %%foo%%']);
$bag->resolve();
$this->assertEquals('I\'m a %foo%', $bag->get('bar'), '->resolveValue() supports % escaping by doubling it');
$this->assertEquals(['bar' => ['ding' => 'I\'m a bar %foo %bar']], $bag->get('foo'), '->resolveValue() supports % escaping by doubling it');
}
public function testEscapeValue()
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag();
+ $bag = new ParameterBag();
$bag->add(['foo' => $bag->escapeValue(['bar' => ['ding' => 'I\'m a bar %foo %bar', 'zero' => null]]), 'bar' => $bag->escapeValue('I\'m a %foo%')]);
$this->assertEquals('I\'m a %%foo%%', $bag->get('bar'), '->escapeValue() escapes % by doubling it');
$this->assertEquals(['bar' => ['ding' => 'I\'m a bar %%foo %%bar', 'zero' => null]], $bag->get('foo'), '->escapeValue() escapes % by doubling it');
@@ -176,11 +179,11 @@ public function testEscapeValue()
*/
public function testResolveStringWithSpacesReturnsString($expected, $test, $description)
{
- $bag = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ParameterBag\ParameterBag(['foo' => 'bar']);
+ $bag = new ParameterBag(['foo' => 'bar']);
try {
$this->assertEquals($expected, $bag->resolveString($test), $description);
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
- $this->fail(\sprintf('%s - "%s"', $description, $expected));
+ } catch (ParameterNotFoundException $e) {
+ $this->fail(sprintf('%s - "%s"', $description, $expected));
}
}
public function stringsWithSpacesProvider()
diff --git a/vendor/symfony/dependency-injection/Tests/ParameterBag/index.php b/vendor/symfony/dependency-injection/Tests/ParameterBag/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/ParameterBag/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/Tests/ParameterTest.php b/vendor/symfony/dependency-injection/Tests/ParameterTest.php
index 669e9bae9..f1c0de5c3 100644
--- a/vendor/symfony/dependency-injection/Tests/ParameterTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ParameterTest.php
@@ -12,11 +12,11 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter;
-class ParameterTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ParameterTest extends TestCase
{
public function testConstructor()
{
- $ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Parameter('foo');
+ $ref = new Parameter('foo');
$this->assertEquals('foo', (string) $ref, '__construct() sets the id of the parameter, which is used for the __toString() method');
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/ReferenceTest.php b/vendor/symfony/dependency-injection/Tests/ReferenceTest.php
index 94ebd0108..de4336313 100644
--- a/vendor/symfony/dependency-injection/Tests/ReferenceTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ReferenceTest.php
@@ -12,11 +12,11 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference;
-class ReferenceTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ReferenceTest extends TestCase
{
public function testConstructor()
{
- $ref = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference('foo');
+ $ref = new Reference('foo');
$this->assertEquals('foo', (string) $ref, '__construct() sets the id of the reference, which is used for the __toString() method');
}
}
diff --git a/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php b/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php
index 45abab8bc..b061067ba 100644
--- a/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php
+++ b/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php
@@ -14,11 +14,13 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator;
use _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
-class ServiceLocatorTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use stdClass;
+
+class ServiceLocatorTest extends TestCase
{
public function testHas()
{
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () {
+ $locator = new ServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
@@ -31,7 +33,7 @@ public function testHas()
}
public function testGet()
{
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () {
+ $locator = new ServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
@@ -42,7 +44,7 @@ public function testGet()
public function testGetDoesNotMemoize()
{
$i = 0;
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () use(&$i) {
+ $locator = new ServiceLocator(['foo' => function () use(&$i) {
++$i;
return 'bar';
}]);
@@ -54,7 +56,7 @@ public function testGetThrowsOnUndefinedService()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Psr\\Container\\NotFoundExceptionInterface');
$this->expectExceptionMessage('Service "dummy" not found: the container inside "Symfony\\Component\\DependencyInjection\\Tests\\ServiceLocatorTest" is a smaller service locator that only knows about the "foo" and "bar" services.');
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () {
+ $locator = new ServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
@@ -65,7 +67,7 @@ public function testThrowsOnUndefinedInternalService()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Psr\\Container\\NotFoundExceptionInterface');
$this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () use(&$locator) {
+ $locator = new ServiceLocator(['foo' => function () use(&$locator) {
return $locator->get('bar');
}]);
$locator->get('foo');
@@ -74,7 +76,7 @@ public function testThrowsOnCircularReference()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceCircularReferenceException');
$this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () use(&$locator) {
+ $locator = new ServiceLocator(['foo' => function () use(&$locator) {
return $locator->get('bar');
}, 'bar' => function () use(&$locator) {
return $locator->get('baz');
@@ -87,10 +89,10 @@ public function testThrowsInServiceSubscriber()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Psr\\Container\\NotFoundExceptionInterface');
$this->expectExceptionMessage('Service "foo" not found: even though it exists in the app\'s container, the container inside "caller" is a smaller service locator that only knows about the "bar" service. Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "SomeServiceSubscriber::getSubscribedServices()".');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $container->set('foo', new \stdClass());
- $subscriber = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Tests\SomeServiceSubscriber();
- $subscriber->container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['bar' => function () {
+ $container = new Container();
+ $container->set('foo', new stdClass());
+ $subscriber = new SomeServiceSubscriber();
+ $subscriber->container = new ServiceLocator(['bar' => function () {
}]);
$subscriber->container = $subscriber->container->withContext('caller', $container);
$subscriber->getFoo();
@@ -99,15 +101,15 @@ public function testGetThrowsServiceNotFoundException()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException');
$this->expectExceptionMessage('Service "foo" not found: even though it exists in the app\'s container, the container inside "foo" is a smaller service locator that is empty... Try using dependency injection instead.');
- $container = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Container();
- $container->set('foo', new \stdClass());
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator([]);
+ $container = new Container();
+ $container->set('foo', new stdClass());
+ $locator = new ServiceLocator([]);
$locator = $locator->withContext('foo', $container);
$locator->get('foo');
}
public function testInvoke()
{
- $locator = new \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceLocator(['foo' => function () {
+ $locator = new ServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
@@ -117,7 +119,7 @@ public function testInvoke()
$this->assertNull($locator('dummy'), '->__invoke() should return null on invalid service');
}
}
-class SomeServiceSubscriber implements \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ServiceSubscriberInterface
+class SomeServiceSubscriber implements ServiceSubscriberInterface
{
public $container;
public function getFoo()
diff --git a/vendor/symfony/dependency-injection/Tests/index.php b/vendor/symfony/dependency-injection/Tests/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/Tests/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/dependency-injection/TypedReference.php b/vendor/symfony/dependency-injection/TypedReference.php
index ca4a288ad..8c075f6cb 100644
--- a/vendor/symfony/dependency-injection/TypedReference.php
+++ b/vendor/symfony/dependency-injection/TypedReference.php
@@ -10,12 +10,15 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection;
+use function strncasecmp;
+use function strpos;
+
/**
* Represents a PHP type-hinted service reference.
*
* @author Nicolas Grekas
*/
-class TypedReference extends \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\Reference
+class TypedReference extends Reference
{
private $type;
private $requiringClass;
@@ -25,7 +28,7 @@ class TypedReference extends \_PhpScoper5ea00cc67502b\Symfony\Component\Dependen
* @param string $requiringClass The class of the service that requires the referenced type
* @param int $invalidBehavior The behavior when the service does not exist
*/
- public function __construct($id, $type, $requiringClass = '', $invalidBehavior = \_PhpScoper5ea00cc67502b\Symfony\Component\DependencyInjection\ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
+ public function __construct($id, $type, $requiringClass = '', $invalidBehavior = ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE)
{
parent::__construct($id, $invalidBehavior);
$this->type = $type;
@@ -41,6 +44,6 @@ public function getRequiringClass()
}
public function canBeAutoregistered()
{
- return $this->requiringClass && \false !== ($i = \strpos($this->type, '\\')) && 0 === \strncasecmp($this->type, $this->requiringClass, 1 + $i);
+ return $this->requiringClass && false !== ($i = strpos($this->type, '\\')) && 0 === strncasecmp($this->type, $this->requiringClass, 1 + $i);
}
}
diff --git a/vendor/symfony/dependency-injection/index.php b/vendor/symfony/dependency-injection/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/dependency-injection/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Compiler.php b/vendor/symfony/expression-language/Compiler.php
index 42150ec2a..0e2ef1ed9 100644
--- a/vendor/symfony/expression-language/Compiler.php
+++ b/vendor/symfony/expression-language/Compiler.php
@@ -10,6 +10,16 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node;
+use function addcslashes;
+use function is_array;
+use function is_bool;
+use function is_float;
+use function is_int;
+use function setlocale;
+use function sprintf;
+use const LC_NUMERIC;
+
/**
* Compiles a node to PHP code.
*
@@ -46,12 +56,12 @@ public function reset()
*
* @return $this
*/
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $node)
+ public function compile(Node $node)
{
$node->compile($this);
return $this;
}
- public function subcompile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $node)
+ public function subcompile(Node $node)
{
$current = $this->source;
$this->source = '';
@@ -81,7 +91,7 @@ public function raw($string)
*/
public function string($value)
{
- $this->source .= \sprintf('"%s"', \addcslashes($value, "\0\t\"\$\\"));
+ $this->source .= sprintf('"%s"', addcslashes($value, "\0\t\"\$\\"));
return $this;
}
/**
@@ -93,26 +103,26 @@ public function string($value)
*/
public function repr($value)
{
- if (\is_int($value) || \is_float($value)) {
- if (\false !== ($locale = \setlocale(\LC_NUMERIC, 0))) {
- \setlocale(\LC_NUMERIC, 'C');
+ if (is_int($value) || is_float($value)) {
+ if (false !== ($locale = setlocale(LC_NUMERIC, 0))) {
+ setlocale(LC_NUMERIC, 'C');
}
$this->raw($value);
- if (\false !== $locale) {
- \setlocale(\LC_NUMERIC, $locale);
+ if (false !== $locale) {
+ setlocale(LC_NUMERIC, $locale);
}
} elseif (null === $value) {
$this->raw('null');
- } elseif (\is_bool($value)) {
+ } elseif (is_bool($value)) {
$this->raw($value ? 'true' : 'false');
- } elseif (\is_array($value)) {
+ } elseif (is_array($value)) {
$this->raw('[');
- $first = \true;
+ $first = true;
foreach ($value as $key => $value) {
if (!$first) {
$this->raw(', ');
}
- $first = \false;
+ $first = false;
$this->repr($key);
$this->raw(' => ');
$this->repr($value);
diff --git a/vendor/symfony/expression-language/ExpressionFunction.php b/vendor/symfony/expression-language/ExpressionFunction.php
index 774cee130..3c0463987 100644
--- a/vendor/symfony/expression-language/ExpressionFunction.php
+++ b/vendor/symfony/expression-language/ExpressionFunction.php
@@ -10,6 +10,18 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use InvalidArgumentException;
+use function array_splice;
+use function call_user_func_array;
+use function count;
+use function end;
+use function explode;
+use function func_get_args;
+use function function_exists;
+use function implode;
+use function ltrim;
+use function sprintf;
+
/**
* Represents a function that can be used in an expression.
*
@@ -63,27 +75,27 @@ public function getEvaluator()
*
* @return self
*
- * @throws \InvalidArgumentException if given PHP function name does not exist
- * @throws \InvalidArgumentException if given PHP function name is in namespace
+ * @throws InvalidArgumentException if given PHP function name does not exist
+ * @throws InvalidArgumentException if given PHP function name is in namespace
* and expression function name is not defined
*/
public static function fromPhp($phpFunctionName, $expressionFunctionName = null)
{
- $phpFunctionName = \ltrim($phpFunctionName, '\\');
- if (!\function_exists($phpFunctionName)) {
- throw new \InvalidArgumentException(\sprintf('PHP function "%s" does not exist.', $phpFunctionName));
+ $phpFunctionName = ltrim($phpFunctionName, '\\');
+ if (!function_exists($phpFunctionName)) {
+ throw new InvalidArgumentException(sprintf('PHP function "%s" does not exist.', $phpFunctionName));
}
- $parts = \explode('\\', $phpFunctionName);
- if (!$expressionFunctionName && \count($parts) > 1) {
- throw new \InvalidArgumentException(\sprintf('An expression function name must be defined when PHP function "%s" is namespaced.', $phpFunctionName));
+ $parts = explode('\\', $phpFunctionName);
+ if (!$expressionFunctionName && count($parts) > 1) {
+ throw new InvalidArgumentException(sprintf('An expression function name must be defined when PHP function "%s" is namespaced.', $phpFunctionName));
}
$compiler = function () use($phpFunctionName) {
- return \sprintf('\\%s(%s)', $phpFunctionName, \implode(', ', \func_get_args()));
+ return sprintf('\\%s(%s)', $phpFunctionName, implode(', ', func_get_args()));
};
$evaluator = function () use($phpFunctionName) {
- $args = \func_get_args();
- return \call_user_func_array($phpFunctionName, \array_splice($args, 1));
+ $args = func_get_args();
+ return call_user_func_array($phpFunctionName, array_splice($args, 1));
};
- return new self($expressionFunctionName ?: \end($parts), $compiler, $evaluator);
+ return new self($expressionFunctionName ?: end($parts), $compiler, $evaluator);
}
}
diff --git a/vendor/symfony/expression-language/ExpressionLanguage.php b/vendor/symfony/expression-language/ExpressionLanguage.php
index 5365c7450..630879c66 100644
--- a/vendor/symfony/expression-language/ExpressionLanguage.php
+++ b/vendor/symfony/expression-language/ExpressionLanguage.php
@@ -14,6 +14,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Cache\Adapter\ArrayAdapter;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface;
+use InvalidArgumentException;
+use LogicException;
+use function array_keys;
+use function asort;
+use function implode;
+use function is_int;
+use function rawurlencode;
+use function sprintf;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* Allows to compile and evaluate expressions written in your own DSL.
*
@@ -33,14 +44,14 @@ class ExpressionLanguage
public function __construct($cache = null, array $providers = [])
{
if (null !== $cache) {
- if ($cache instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface) {
- @\trigger_error(\sprintf('Passing an instance of %s as constructor argument for %s is deprecated as of 3.2 and will be removed in 4.0. Pass an instance of %s instead.', \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface::class, self::class, \_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemPoolInterface::class), \E_USER_DEPRECATED);
- $cache = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($cache);
- } elseif (!$cache instanceof \_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemPoolInterface) {
- throw new \InvalidArgumentException(\sprintf('Cache argument has to implement "%s".', \_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemPoolInterface::class));
+ if ($cache instanceof ParserCacheInterface) {
+ @trigger_error(sprintf('Passing an instance of %s as constructor argument for %s is deprecated as of 3.2 and will be removed in 4.0. Pass an instance of %s instead.', ParserCacheInterface::class, self::class, CacheItemPoolInterface::class), E_USER_DEPRECATED);
+ $cache = new ParserCacheAdapter($cache);
+ } elseif (!$cache instanceof CacheItemPoolInterface) {
+ throw new InvalidArgumentException(sprintf('Cache argument has to implement "%s".', CacheItemPoolInterface::class));
}
}
- $this->cache = $cache ?: new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\Adapter\ArrayAdapter();
+ $this->cache = $cache ?: new ArrayAdapter();
$this->registerFunctions();
foreach ($providers as $provider) {
$this->registerProvider($provider);
@@ -68,7 +79,7 @@ public function compile($expression, $names = [])
*/
public function evaluate($expression, $values = [])
{
- return $this->parse($expression, \array_keys($values))->getNodes()->evaluate($this->functions, $values);
+ return $this->parse($expression, array_keys($values))->getNodes()->evaluate($this->functions, $values);
}
/**
* Parses an expression.
@@ -80,18 +91,18 @@ public function evaluate($expression, $values = [])
*/
public function parse($expression, $names)
{
- if ($expression instanceof \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression) {
+ if ($expression instanceof ParsedExpression) {
return $expression;
}
- \asort($names);
+ asort($names);
$cacheKeyItems = [];
foreach ($names as $nameKey => $name) {
- $cacheKeyItems[] = \is_int($nameKey) ? $name : $nameKey . ':' . $name;
+ $cacheKeyItems[] = is_int($nameKey) ? $name : $nameKey . ':' . $name;
}
- $cacheItem = $this->cache->getItem(\rawurlencode($expression . '//' . \implode('|', $cacheKeyItems)));
+ $cacheItem = $this->cache->getItem(rawurlencode($expression . '//' . implode('|', $cacheKeyItems)));
if (null === ($parsedExpression = $cacheItem->get())) {
$nodes = $this->getParser()->parse($this->getLexer()->tokenize((string) $expression), $names);
- $parsedExpression = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression((string) $expression, $nodes);
+ $parsedExpression = new ParsedExpression((string) $expression, $nodes);
$cacheItem->set($parsedExpression);
$this->cache->save($cacheItem);
}
@@ -104,22 +115,22 @@ public function parse($expression, $names)
* @param callable $compiler A callable able to compile the function
* @param callable $evaluator A callable able to evaluate the function
*
- * @throws \LogicException when registering a function after calling evaluate(), compile() or parse()
+ * @throws LogicException when registering a function after calling evaluate(), compile() or parse()
*
* @see ExpressionFunction
*/
public function register($name, callable $compiler, callable $evaluator)
{
if (null !== $this->parser) {
- throw new \LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.');
+ throw new LogicException('Registering functions after calling evaluate(), compile() or parse() is not supported.');
}
$this->functions[$name] = ['compiler' => $compiler, 'evaluator' => $evaluator];
}
- public function addFunction(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction $function)
+ public function addFunction(ExpressionFunction $function)
{
$this->register($function->getName(), $function->getCompiler(), $function->getEvaluator());
}
- public function registerProvider(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface $provider)
+ public function registerProvider(ExpressionFunctionProviderInterface $provider)
{
foreach ($provider->getFunctions() as $function) {
$this->addFunction($function);
@@ -127,26 +138,26 @@ public function registerProvider(\_PhpScoper5ea00cc67502b\Symfony\Component\Expr
}
protected function registerFunctions()
{
- $this->addFunction(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction::fromPhp('constant'));
+ $this->addFunction(ExpressionFunction::fromPhp('constant'));
}
private function getLexer()
{
if (null === $this->lexer) {
- $this->lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
+ $this->lexer = new Lexer();
}
return $this->lexer;
}
private function getParser()
{
if (null === $this->parser) {
- $this->parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser($this->functions);
+ $this->parser = new Parser($this->functions);
}
return $this->parser;
}
private function getCompiler()
{
if (null === $this->compiler) {
- $this->compiler = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler($this->functions);
+ $this->compiler = new Compiler($this->functions);
}
return $this->compiler->reset();
}
diff --git a/vendor/symfony/expression-language/Lexer.php b/vendor/symfony/expression-language/Lexer.php
index 1e9937a75..27f4b4dca 100644
--- a/vendor/symfony/expression-language/Lexer.php
+++ b/vendor/symfony/expression-language/Lexer.php
@@ -10,6 +10,17 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use function array_pop;
+use function preg_match;
+use function sprintf;
+use function str_replace;
+use function stripcslashes;
+use function strlen;
+use function strpos;
+use function strtr;
+use function substr;
+use const PHP_INT_MAX;
+
/**
* Lexes an expression.
*
@@ -28,68 +39,68 @@ class Lexer
*/
public function tokenize($expression)
{
- $expression = \str_replace(["\r", "\n", "\t", "\v", "\f"], ' ', $expression);
+ $expression = str_replace(["\r", "\n", "\t", "\v", "\f"], ' ', $expression);
$cursor = 0;
$tokens = [];
$brackets = [];
- $end = \strlen($expression);
+ $end = strlen($expression);
while ($cursor < $end) {
if (' ' == $expression[$cursor]) {
++$cursor;
continue;
}
- if (\preg_match('/[0-9]+(?:\\.[0-9]+)?/A', $expression, $match, 0, $cursor)) {
+ if (preg_match('/[0-9]+(?:\\.[0-9]+)?/A', $expression, $match, 0, $cursor)) {
// numbers
$number = (float) $match[0];
// floats
- if (\preg_match('/^[0-9]+$/', $match[0]) && $number <= \PHP_INT_MAX) {
+ if (preg_match('/^[0-9]+$/', $match[0]) && $number <= PHP_INT_MAX) {
$number = (int) $match[0];
// integers lower than the maximum
}
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NUMBER_TYPE, $number, $cursor + 1);
- $cursor += \strlen($match[0]);
- } elseif (\false !== \strpos('([{', $expression[$cursor])) {
+ $tokens[] = new Token(Token::NUMBER_TYPE, $number, $cursor + 1);
+ $cursor += strlen($match[0]);
+ } elseif (false !== strpos('([{', $expression[$cursor])) {
// opening bracket
$brackets[] = [$expression[$cursor], $cursor];
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
+ $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
++$cursor;
- } elseif (\false !== \strpos(')]}', $expression[$cursor])) {
+ } elseif (false !== strpos(')]}', $expression[$cursor])) {
// closing bracket
if (empty($brackets)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Unexpected "%s".', $expression[$cursor]), $cursor, $expression);
+ throw new SyntaxError(sprintf('Unexpected "%s".', $expression[$cursor]), $cursor, $expression);
}
- list($expect, $cur) = \array_pop($brackets);
- if ($expression[$cursor] != \strtr($expect, '([{', ')]}')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Unclosed "%s".', $expect), $cur, $expression);
+ [$expect, $cur] = array_pop($brackets);
+ if ($expression[$cursor] != strtr($expect, '([{', ')]}')) {
+ throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $cur, $expression);
}
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
+ $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
++$cursor;
- } elseif (\preg_match('/"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As', $expression, $match, 0, $cursor)) {
+ } elseif (preg_match('/"([^"\\\\]*(?:\\\\.[^"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As', $expression, $match, 0, $cursor)) {
// strings
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::STRING_TYPE, \stripcslashes(\substr($match[0], 1, -1)), $cursor + 1);
- $cursor += \strlen($match[0]);
- } elseif (\preg_match('/(?<=^|[\\s(])not in(?=[\\s(])|\\!\\=\\=|(?<=^|[\\s(])not(?=[\\s(])|(?<=^|[\\s(])and(?=[\\s(])|\\=\\=\\=|\\>\\=|(?<=^|[\\s(])or(?=[\\s(])|\\<\\=|\\*\\*|\\.\\.|(?<=^|[\\s(])in(?=[\\s(])|&&|\\|\\||(?<=^|[\\s(])matches|\\=\\=|\\!\\=|\\*|~|%|\\/|\\>|\\||\\!|\\^|&|\\+|\\<|\\-/A', $expression, $match, 0, $cursor)) {
+ $tokens[] = new Token(Token::STRING_TYPE, stripcslashes(substr($match[0], 1, -1)), $cursor + 1);
+ $cursor += strlen($match[0]);
+ } elseif (preg_match('/(?<=^|[\\s(])not in(?=[\\s(])|\\!\\=\\=|(?<=^|[\\s(])not(?=[\\s(])|(?<=^|[\\s(])and(?=[\\s(])|\\=\\=\\=|\\>\\=|(?<=^|[\\s(])or(?=[\\s(])|\\<\\=|\\*\\*|\\.\\.|(?<=^|[\\s(])in(?=[\\s(])|&&|\\|\\||(?<=^|[\\s(])matches|\\=\\=|\\!\\=|\\*|~|%|\\/|\\>|\\||\\!|\\^|&|\\+|\\<|\\-/A', $expression, $match, 0, $cursor)) {
// operators
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::OPERATOR_TYPE, $match[0], $cursor + 1);
- $cursor += \strlen($match[0]);
- } elseif (\false !== \strpos('.,?:', $expression[$cursor])) {
+ $tokens[] = new Token(Token::OPERATOR_TYPE, $match[0], $cursor + 1);
+ $cursor += strlen($match[0]);
+ } elseif (false !== strpos('.,?:', $expression[$cursor])) {
// punctuation
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
+ $tokens[] = new Token(Token::PUNCTUATION_TYPE, $expression[$cursor], $cursor + 1);
++$cursor;
- } elseif (\preg_match('/[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/A', $expression, $match, 0, $cursor)) {
+ } elseif (preg_match('/[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/A', $expression, $match, 0, $cursor)) {
// names
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NAME_TYPE, $match[0], $cursor + 1);
- $cursor += \strlen($match[0]);
+ $tokens[] = new Token(Token::NAME_TYPE, $match[0], $cursor + 1);
+ $cursor += strlen($match[0]);
} else {
// unlexable
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Unexpected character "%s".', $expression[$cursor]), $cursor, $expression);
+ throw new SyntaxError(sprintf('Unexpected character "%s".', $expression[$cursor]), $cursor, $expression);
}
}
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::EOF_TYPE, null, $cursor + 1);
+ $tokens[] = new Token(Token::EOF_TYPE, null, $cursor + 1);
if (!empty($brackets)) {
- list($expect, $cur) = \array_pop($brackets);
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Unclosed "%s".', $expect), $cur, $expression);
+ [$expect, $cur] = array_pop($brackets);
+ throw new SyntaxError(sprintf('Unclosed "%s".', $expect), $cur, $expression);
}
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\TokenStream($tokens, $expression);
+ return new TokenStream($tokens, $expression);
}
}
diff --git a/vendor/symfony/expression-language/Node/ArgumentsNode.php b/vendor/symfony/expression-language/Node/ArgumentsNode.php
index a19b00333..3d40ed060 100644
--- a/vendor/symfony/expression-language/Node/ArgumentsNode.php
+++ b/vendor/symfony/expression-language/Node/ArgumentsNode.php
@@ -11,16 +11,18 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use function array_pop;
+
/**
* @author Fabien Potencier
*
* @internal
*/
-class ArgumentsNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode
+class ArgumentsNode extends ArrayNode
{
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
- $this->compileArguments($compiler, \false);
+ $this->compileArguments($compiler, false);
}
public function toArray()
{
@@ -29,7 +31,7 @@ public function toArray()
$array[] = $pair['value'];
$array[] = ', ';
}
- \array_pop($array);
+ array_pop($array);
return $array;
}
}
diff --git a/vendor/symfony/expression-language/Node/ArrayNode.php b/vendor/symfony/expression-language/Node/ArrayNode.php
index 1241a0b6f..90a1249c4 100644
--- a/vendor/symfony/expression-language/Node/ArrayNode.php
+++ b/vendor/symfony/expression-language/Node/ArrayNode.php
@@ -11,29 +11,32 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use function array_chunk;
+use function array_push;
+
/**
* @author Fabien Potencier
*
* @internal
*/
-class ArrayNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class ArrayNode extends Node
{
protected $index;
public function __construct()
{
$this->index = -1;
}
- public function addElement(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $value, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $key = null)
+ public function addElement(Node $value, Node $key = null)
{
if (null === $key) {
- $key = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(++$this->index);
+ $key = new ConstantNode(++$this->index);
}
- \array_push($this->nodes, $key, $value);
+ array_push($this->nodes, $key, $value);
}
/**
* Compiles the node to PHP.
*/
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$compiler->raw('[');
$this->compileArguments($compiler);
@@ -57,7 +60,7 @@ public function toArray()
if ($this->isHash($value)) {
foreach ($value as $k => $v) {
$array[] = ', ';
- $array[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode($k);
+ $array[] = new ConstantNode($k);
$array[] = ': ';
$array[] = $v;
}
@@ -76,19 +79,19 @@ public function toArray()
protected function getKeyValuePairs()
{
$pairs = [];
- foreach (\array_chunk($this->nodes, 2) as $pair) {
+ foreach (array_chunk($this->nodes, 2) as $pair) {
$pairs[] = ['key' => $pair[0], 'value' => $pair[1]];
}
return $pairs;
}
- protected function compileArguments(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler, $withKeys = \true)
+ protected function compileArguments(Compiler $compiler, $withKeys = true)
{
- $first = \true;
+ $first = true;
foreach ($this->getKeyValuePairs() as $pair) {
if (!$first) {
$compiler->raw(', ');
}
- $first = \false;
+ $first = false;
if ($withKeys) {
$compiler->compile($pair['key'])->raw(' => ');
}
diff --git a/vendor/symfony/expression-language/Node/BinaryNode.php b/vendor/symfony/expression-language/Node/BinaryNode.php
index 3148b308c..9af8160ea 100644
--- a/vendor/symfony/expression-language/Node/BinaryNode.php
+++ b/vendor/symfony/expression-language/Node/BinaryNode.php
@@ -11,20 +11,25 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use DivisionByZeroError;
+use function in_array;
+use function preg_match;
+use function sprintf;
+
/**
* @author Fabien Potencier
*
* @internal
*/
-class BinaryNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class BinaryNode extends Node
{
private static $operators = ['~' => '.', 'and' => '&&', 'or' => '||'];
private static $functions = ['**' => 'pow', '..' => 'range', 'in' => 'in_array', 'not in' => '!in_array'];
- public function __construct($operator, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $left, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $right)
+ public function __construct($operator, Node $left, Node $right)
{
parent::__construct(['left' => $left, 'right' => $right], ['operator' => $operator]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$operator = $this->attributes['operator'];
if ('matches' == $operator) {
@@ -32,7 +37,7 @@ public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLan
return;
}
if (isset(self::$functions[$operator])) {
- $compiler->raw(\sprintf('%s(', self::$functions[$operator]))->compile($this->nodes['left'])->raw(', ')->compile($this->nodes['right'])->raw(')');
+ $compiler->raw(sprintf('%s(', self::$functions[$operator]))->compile($this->nodes['left'])->raw(', ')->compile($this->nodes['right'])->raw(')');
return;
}
if (isset(self::$operators[$operator])) {
@@ -47,7 +52,7 @@ public function evaluate($functions, $values)
if (isset(self::$functions[$operator])) {
$right = $this->nodes['right']->evaluate($functions, $values);
if ('not in' === $operator) {
- return !\in_array($left, $right);
+ return !in_array($left, $right);
}
$f = self::$functions[$operator];
return $f($left, $right);
@@ -85,9 +90,9 @@ public function evaluate($functions, $values)
case '<=':
return $left <= $right;
case 'not in':
- return !\in_array($left, $right);
+ return !in_array($left, $right);
case 'in':
- return \in_array($left, $right);
+ return in_array($left, $right);
case '+':
return $left + $right;
case '-':
@@ -98,16 +103,16 @@ public function evaluate($functions, $values)
return $left * $right;
case '/':
if (0 == $right) {
- throw new \DivisionByZeroError('Division by zero.');
+ throw new DivisionByZeroError('Division by zero.');
}
return $left / $right;
case '%':
if (0 == $right) {
- throw new \DivisionByZeroError('Modulo by zero.');
+ throw new DivisionByZeroError('Modulo by zero.');
}
return $left % $right;
case 'matches':
- return \preg_match($right, $left);
+ return preg_match($right, $left);
}
}
public function toArray()
diff --git a/vendor/symfony/expression-language/Node/ConditionalNode.php b/vendor/symfony/expression-language/Node/ConditionalNode.php
index 029f15673..19fe49c72 100644
--- a/vendor/symfony/expression-language/Node/ConditionalNode.php
+++ b/vendor/symfony/expression-language/Node/ConditionalNode.php
@@ -16,13 +16,13 @@
*
* @internal
*/
-class ConditionalNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class ConditionalNode extends Node
{
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $expr1, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $expr2, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $expr3)
+ public function __construct(Node $expr1, Node $expr2, Node $expr3)
{
parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$compiler->raw('((')->compile($this->nodes['expr1'])->raw(') ? (')->compile($this->nodes['expr2'])->raw(') : (')->compile($this->nodes['expr3'])->raw('))');
}
diff --git a/vendor/symfony/expression-language/Node/ConstantNode.php b/vendor/symfony/expression-language/Node/ConstantNode.php
index ba1f87653..907dcd494 100644
--- a/vendor/symfony/expression-language/Node/ConstantNode.php
+++ b/vendor/symfony/expression-language/Node/ConstantNode.php
@@ -11,20 +11,23 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use function is_array;
+use function is_numeric;
+
/**
* @author Fabien Potencier
*
* @internal
*/
-class ConstantNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class ConstantNode extends Node
{
private $isIdentifier;
- public function __construct($value, $isIdentifier = \false)
+ public function __construct($value, $isIdentifier = false)
{
$this->isIdentifier = $isIdentifier;
parent::__construct([], ['value' => $value]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$compiler->repr($this->attributes['value']);
}
@@ -38,15 +41,15 @@ public function toArray()
$value = $this->attributes['value'];
if ($this->isIdentifier) {
$array[] = $value;
- } elseif (\true === $value) {
+ } elseif (true === $value) {
$array[] = 'true';
- } elseif (\false === $value) {
+ } elseif (false === $value) {
$array[] = 'false';
} elseif (null === $value) {
$array[] = 'null';
- } elseif (\is_numeric($value)) {
+ } elseif (is_numeric($value)) {
$array[] = $value;
- } elseif (!\is_array($value)) {
+ } elseif (!is_array($value)) {
$array[] = $this->dumpString($value);
} elseif ($this->isHash($value)) {
foreach ($value as $k => $v) {
diff --git a/vendor/symfony/expression-language/Node/FunctionNode.php b/vendor/symfony/expression-language/Node/FunctionNode.php
index 40c4fc39d..a8e68651a 100644
--- a/vendor/symfony/expression-language/Node/FunctionNode.php
+++ b/vendor/symfony/expression-language/Node/FunctionNode.php
@@ -11,25 +11,27 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use function call_user_func_array;
+
/**
* @author Fabien Potencier
*
* @internal
*/
-class FunctionNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class FunctionNode extends Node
{
- public function __construct($name, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $arguments)
+ public function __construct($name, Node $arguments)
{
parent::__construct(['arguments' => $arguments], ['name' => $name]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$arguments = [];
foreach ($this->nodes['arguments']->nodes as $node) {
$arguments[] = $compiler->subcompile($node);
}
$function = $compiler->getFunction($this->attributes['name']);
- $compiler->raw(\call_user_func_array($function['compiler'], $arguments));
+ $compiler->raw(call_user_func_array($function['compiler'], $arguments));
}
public function evaluate($functions, $values)
{
@@ -37,7 +39,7 @@ public function evaluate($functions, $values)
foreach ($this->nodes['arguments']->nodes as $node) {
$arguments[] = $node->evaluate($functions, $values);
}
- return \call_user_func_array($functions[$this->attributes['name']]['evaluator'], $arguments);
+ return call_user_func_array($functions[$this->attributes['name']]['evaluator'], $arguments);
}
public function toArray()
{
diff --git a/vendor/symfony/expression-language/Node/GetAttrNode.php b/vendor/symfony/expression-language/Node/GetAttrNode.php
index 60a34e36d..da1ad0994 100644
--- a/vendor/symfony/expression-language/Node/GetAttrNode.php
+++ b/vendor/symfony/expression-language/Node/GetAttrNode.php
@@ -11,21 +11,30 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use ArrayAccess;
+use RuntimeException;
+use function call_user_func_array;
+use function get_class;
+use function is_array;
+use function is_callable;
+use function is_object;
+use function sprintf;
+
/**
* @author Fabien Potencier
*
* @internal
*/
-class GetAttrNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class GetAttrNode extends Node
{
const PROPERTY_CALL = 1;
const METHOD_CALL = 2;
const ARRAY_CALL = 3;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $node, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $attribute, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode $arguments, $type)
+ public function __construct(Node $node, Node $attribute, ArrayNode $arguments, $type)
{
parent::__construct(['node' => $node, 'attribute' => $attribute, 'arguments' => $arguments], ['type' => $type]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
switch ($this->attributes['type']) {
case self::PROPERTY_CALL:
@@ -44,24 +53,24 @@ public function evaluate($functions, $values)
switch ($this->attributes['type']) {
case self::PROPERTY_CALL:
$obj = $this->nodes['node']->evaluate($functions, $values);
- if (!\is_object($obj)) {
- throw new \RuntimeException('Unable to get a property on a non-object.');
+ if (!is_object($obj)) {
+ throw new RuntimeException('Unable to get a property on a non-object.');
}
$property = $this->nodes['attribute']->attributes['value'];
return $obj->{$property};
case self::METHOD_CALL:
$obj = $this->nodes['node']->evaluate($functions, $values);
- if (!\is_object($obj)) {
- throw new \RuntimeException('Unable to get a property on a non-object.');
+ if (!is_object($obj)) {
+ throw new RuntimeException('Unable to get a property on a non-object.');
}
- if (!\is_callable($toCall = [$obj, $this->nodes['attribute']->attributes['value']])) {
- throw new \RuntimeException(\sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj)));
+ if (!is_callable($toCall = [$obj, $this->nodes['attribute']->attributes['value']])) {
+ throw new RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], get_class($obj)));
}
- return \call_user_func_array($toCall, $this->nodes['arguments']->evaluate($functions, $values));
+ return call_user_func_array($toCall, $this->nodes['arguments']->evaluate($functions, $values));
case self::ARRAY_CALL:
$array = $this->nodes['node']->evaluate($functions, $values);
- if (!\is_array($array) && !$array instanceof \ArrayAccess) {
- throw new \RuntimeException('Unable to get an item on a non-array.');
+ if (!is_array($array) && !$array instanceof ArrayAccess) {
+ throw new RuntimeException('Unable to get an item on a non-array.');
}
return $array[$this->nodes['attribute']->evaluate($functions, $values)];
}
diff --git a/vendor/symfony/expression-language/Node/NameNode.php b/vendor/symfony/expression-language/Node/NameNode.php
index 2a5ec927b..a93be6ac6 100644
--- a/vendor/symfony/expression-language/Node/NameNode.php
+++ b/vendor/symfony/expression-language/Node/NameNode.php
@@ -16,13 +16,13 @@
*
* @internal
*/
-class NameNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class NameNode extends Node
{
public function __construct($name)
{
parent::__construct([], ['name' => $name]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$compiler->raw('$' . $this->attributes['name']);
}
diff --git a/vendor/symfony/expression-language/Node/Node.php b/vendor/symfony/expression-language/Node/Node.php
index ae2c90c34..3dea04c56 100644
--- a/vendor/symfony/expression-language/Node/Node.php
+++ b/vendor/symfony/expression-language/Node/Node.php
@@ -11,6 +11,16 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
+use BadMethodCallException;
+use function addcslashes;
+use function count;
+use function explode;
+use function implode;
+use function is_scalar;
+use function sprintf;
+use function str_replace;
+use function var_export;
+
/**
* Represents a node in the AST.
*
@@ -33,12 +43,12 @@ public function __toString()
{
$attributes = [];
foreach ($this->attributes as $name => $value) {
- $attributes[] = \sprintf('%s: %s', $name, \str_replace("\n", '', \var_export($value, \true)));
+ $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true)));
}
- $repr = [\str_replace('Symfony\\Component\\ExpressionLanguage\\Node\\', '', static::class) . '(' . \implode(', ', $attributes)];
- if (\count($this->nodes)) {
+ $repr = [str_replace('Symfony\\Component\\ExpressionLanguage\\Node\\', '', static::class) . '(' . implode(', ', $attributes)];
+ if (count($this->nodes)) {
foreach ($this->nodes as $node) {
- foreach (\explode("\n", (string) $node) as $line) {
+ foreach (explode("\n", (string) $node) as $line) {
$repr[] = ' ' . $line;
}
}
@@ -46,9 +56,9 @@ public function __toString()
} else {
$repr[0] .= ')';
}
- return \implode("\n", $repr);
+ return implode("\n", $repr);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
foreach ($this->nodes as $node) {
$node->compile($compiler);
@@ -64,28 +74,28 @@ public function evaluate($functions, $values)
}
public function toArray()
{
- throw new \BadMethodCallException(\sprintf('Dumping a "%s" instance is not supported yet.', static::class));
+ throw new BadMethodCallException(sprintf('Dumping a "%s" instance is not supported yet.', static::class));
}
public function dump()
{
$dump = '';
foreach ($this->toArray() as $v) {
- $dump .= \is_scalar($v) ? $v : $v->dump();
+ $dump .= is_scalar($v) ? $v : $v->dump();
}
return $dump;
}
protected function dumpString($value)
{
- return \sprintf('"%s"', \addcslashes($value, "\0\t\"\\"));
+ return sprintf('"%s"', addcslashes($value, "\0\t\"\\"));
}
protected function isHash(array $value)
{
$expectedKey = 0;
foreach ($value as $key => $val) {
if ($key !== $expectedKey++) {
- return \true;
+ return true;
}
}
- return \false;
+ return false;
}
}
diff --git a/vendor/symfony/expression-language/Node/UnaryNode.php b/vendor/symfony/expression-language/Node/UnaryNode.php
index 8d66eba28..6f72c2bc9 100644
--- a/vendor/symfony/expression-language/Node/UnaryNode.php
+++ b/vendor/symfony/expression-language/Node/UnaryNode.php
@@ -16,14 +16,14 @@
*
* @internal
*/
-class UnaryNode extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node
+class UnaryNode extends Node
{
private static $operators = ['!' => '!', 'not' => '!', '+' => '+', '-' => '-'];
- public function __construct($operator, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $node)
+ public function __construct($operator, Node $node)
{
parent::__construct(['node' => $node], ['operator' => $operator]);
}
- public function compile(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler $compiler)
+ public function compile(Compiler $compiler)
{
$compiler->raw('(')->raw(self::$operators[$this->attributes['operator']])->compile($this->nodes['node'])->raw(')');
}
diff --git a/vendor/symfony/expression-language/Node/index.php b/vendor/symfony/expression-language/Node/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Node/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/ParsedExpression.php b/vendor/symfony/expression-language/ParsedExpression.php
index 70fb11f9c..b4e1496b6 100644
--- a/vendor/symfony/expression-language/ParsedExpression.php
+++ b/vendor/symfony/expression-language/ParsedExpression.php
@@ -16,14 +16,14 @@
*
* @author Fabien Potencier
*/
-class ParsedExpression extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression
+class ParsedExpression extends Expression
{
private $nodes;
/**
* @param string $expression An expression
* @param Node $nodes A Node representing the expression
*/
- public function __construct($expression, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node $nodes)
+ public function __construct($expression, Node $nodes)
{
parent::__construct($expression);
$this->nodes = $nodes;
diff --git a/vendor/symfony/expression-language/Parser.php b/vendor/symfony/expression-language/Parser.php
index 082c93715..08babb95b 100644
--- a/vendor/symfony/expression-language/Parser.php
+++ b/vendor/symfony/expression-language/Parser.php
@@ -10,6 +10,23 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\FunctionNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode;
+use function array_keys;
+use function array_search;
+use function in_array;
+use function is_int;
+use function preg_match;
+use function sprintf;
+
/**
* Parsers a token stream.
*
@@ -55,13 +72,13 @@ public function __construct(array $functions)
*
* @throws SyntaxError
*/
- public function parse(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\TokenStream $stream, $names = [])
+ public function parse(TokenStream $stream, $names = [])
{
$this->stream = $stream;
$this->names = $names;
$node = $this->parseExpression();
if (!$stream->isEOF()) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Unexpected token "%s" of value "%s".', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
+ throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', $stream->current->type, $stream->current->value), $stream->current->cursor, $stream->getExpression());
}
return $node;
}
@@ -69,11 +86,11 @@ public function parseExpression($precedence = 0)
{
$expr = $this->getPrimary();
$token = $this->stream->current;
- while ($token->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->value]) && $this->binaryOperators[$token->value]['precedence'] >= $precedence) {
+ while ($token->test(Token::OPERATOR_TYPE) && isset($this->binaryOperators[$token->value]) && $this->binaryOperators[$token->value]['precedence'] >= $precedence) {
$op = $this->binaryOperators[$token->value];
$this->stream->next();
$expr1 = $this->parseExpression(self::OPERATOR_LEFT === $op['associativity'] ? $op['precedence'] + 1 : $op['precedence']);
- $expr = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode($token->value, $expr, $expr1);
+ $expr = new BinaryNode($token->value, $expr, $expr1);
$token = $this->stream->current;
}
if (0 === $precedence) {
@@ -84,38 +101,38 @@ public function parseExpression($precedence = 0)
protected function getPrimary()
{
$token = $this->stream->current;
- if ($token->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->value])) {
+ if ($token->test(Token::OPERATOR_TYPE) && isset($this->unaryOperators[$token->value])) {
$operator = $this->unaryOperators[$token->value];
$this->stream->next();
$expr = $this->parseExpression($operator['precedence']);
- return $this->parsePostfixExpression(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode($token->value, $expr));
+ return $this->parsePostfixExpression(new UnaryNode($token->value, $expr));
}
- if ($token->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '(')) {
+ if ($token->test(Token::PUNCTUATION_TYPE, '(')) {
$this->stream->next();
$expr = $this->parseExpression();
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ')', 'An opened parenthesis is not properly closed');
return $this->parsePostfixExpression($expr);
}
return $this->parsePrimaryExpression();
}
protected function parseConditionalExpression($expr)
{
- while ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '?')) {
+ while ($this->stream->current->test(Token::PUNCTUATION_TYPE, '?')) {
$this->stream->next();
- if (!$this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ':')) {
+ if (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ':')) {
$expr2 = $this->parseExpression();
- if ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ':')) {
+ if ($this->stream->current->test(Token::PUNCTUATION_TYPE, ':')) {
$this->stream->next();
$expr3 = $this->parseExpression();
} else {
- $expr3 = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(null);
+ $expr3 = new ConstantNode(null);
}
} else {
$this->stream->next();
$expr2 = $expr;
$expr3 = $this->parseExpression();
}
- $expr = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode($expr, $expr2, $expr3);
+ $expr = new ConditionalNode($expr, $expr2, $expr3);
}
return $expr;
}
@@ -123,134 +140,134 @@ public function parsePrimaryExpression()
{
$token = $this->stream->current;
switch ($token->type) {
- case \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NAME_TYPE:
+ case Token::NAME_TYPE:
$this->stream->next();
switch ($token->value) {
case 'true':
case 'TRUE':
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true);
+ return new ConstantNode(true);
case 'false':
case 'FALSE':
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false);
+ return new ConstantNode(false);
case 'null':
case 'NULL':
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(null);
+ return new ConstantNode(null);
default:
if ('(' === $this->stream->current->value) {
- if (\false === isset($this->functions[$token->value])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('The function "%s" does not exist.', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, \array_keys($this->functions));
+ if (false === isset($this->functions[$token->value])) {
+ throw new SyntaxError(sprintf('The function "%s" does not exist.', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, array_keys($this->functions));
}
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\FunctionNode($token->value, $this->parseArguments());
+ $node = new FunctionNode($token->value, $this->parseArguments());
} else {
- if (!\in_array($token->value, $this->names, \true)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Variable "%s" is not valid.', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, $this->names);
+ if (!in_array($token->value, $this->names, true)) {
+ throw new SyntaxError(sprintf('Variable "%s" is not valid.', $token->value), $token->cursor, $this->stream->getExpression(), $token->value, $this->names);
}
// is the name used in the compiled code different
// from the name used in the expression?
- if (\is_int($name = \array_search($token->value, $this->names))) {
+ if (is_int($name = array_search($token->value, $this->names))) {
$name = $token->value;
}
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode($name);
+ $node = new NameNode($name);
}
}
break;
- case \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NUMBER_TYPE:
- case \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::STRING_TYPE:
+ case Token::NUMBER_TYPE:
+ case Token::STRING_TYPE:
$this->stream->next();
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode($token->value);
+ return new ConstantNode($token->value);
default:
- if ($token->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '[')) {
+ if ($token->test(Token::PUNCTUATION_TYPE, '[')) {
$node = $this->parseArrayExpression();
- } elseif ($token->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '{')) {
+ } elseif ($token->test(Token::PUNCTUATION_TYPE, '{')) {
$node = $this->parseHashExpression();
} else {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('Unexpected token "%s" of value "%s".', $token->type, $token->value), $token->cursor, $this->stream->getExpression());
+ throw new SyntaxError(sprintf('Unexpected token "%s" of value "%s".', $token->type, $token->value), $token->cursor, $this->stream->getExpression());
}
}
return $this->parsePostfixExpression($node);
}
public function parseArrayExpression()
{
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '[', 'An array element was expected');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $first = \true;
- while (!$this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ']')) {
+ $this->stream->expect(Token::PUNCTUATION_TYPE, '[', 'An array element was expected');
+ $node = new ArrayNode();
+ $first = true;
+ while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ']')) {
if (!$first) {
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'An array element must be followed by a comma');
// trailing ,?
- if ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ']')) {
+ if ($this->stream->current->test(Token::PUNCTUATION_TYPE, ']')) {
break;
}
}
- $first = \false;
+ $first = false;
$node->addElement($this->parseExpression());
}
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ']', 'An opened array is not properly closed');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ']', 'An opened array is not properly closed');
return $node;
}
public function parseHashExpression()
{
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '{', 'A hash element was expected');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $first = \true;
- while (!$this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '}')) {
+ $this->stream->expect(Token::PUNCTUATION_TYPE, '{', 'A hash element was expected');
+ $node = new ArrayNode();
+ $first = true;
+ while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, '}')) {
if (!$first) {
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'A hash value must be followed by a comma');
// trailing ,?
- if ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '}')) {
+ if ($this->stream->current->test(Token::PUNCTUATION_TYPE, '}')) {
break;
}
}
- $first = \false;
+ $first = false;
// a hash key can be:
//
// * a number -- 12
// * a string -- 'a'
// * a name, which is equivalent to a string -- a
// * an expression, which must be enclosed in parentheses -- (1 + 2)
- if ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::STRING_TYPE) || $this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NAME_TYPE) || $this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NUMBER_TYPE)) {
- $key = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode($this->stream->current->value);
+ if ($this->stream->current->test(Token::STRING_TYPE) || $this->stream->current->test(Token::NAME_TYPE) || $this->stream->current->test(Token::NUMBER_TYPE)) {
+ $key = new ConstantNode($this->stream->current->value);
$this->stream->next();
- } elseif ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '(')) {
+ } elseif ($this->stream->current->test(Token::PUNCTUATION_TYPE, '(')) {
$key = $this->parseExpression();
} else {
$current = $this->stream->current;
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', $current->type, $current->value), $current->cursor, $this->stream->getExpression());
+ throw new SyntaxError(sprintf('A hash key must be a quoted string, a number, a name, or an expression enclosed in parentheses (unexpected token "%s" of value "%s".', $current->type, $current->value), $current->cursor, $this->stream->getExpression());
}
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ':', 'A hash key must be followed by a colon (:)');
$value = $this->parseExpression();
$node->addElement($value, $key);
}
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '}', 'An opened hash is not properly closed');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, '}', 'An opened hash is not properly closed');
return $node;
}
public function parsePostfixExpression($node)
{
$token = $this->stream->current;
- while (\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE == $token->type) {
+ while (Token::PUNCTUATION_TYPE == $token->type) {
if ('.' === $token->value) {
$this->stream->next();
$token = $this->stream->current;
$this->stream->next();
- if (\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::NAME_TYPE !== $token->type && (\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::OPERATOR_TYPE !== $token->type || !\preg_match('/[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/A', $token->value))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError('Expected name.', $token->cursor, $this->stream->getExpression());
+ if (Token::NAME_TYPE !== $token->type && (Token::OPERATOR_TYPE !== $token->type || !preg_match('/[a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*/A', $token->value))) {
+ throw new SyntaxError('Expected name.', $token->cursor, $this->stream->getExpression());
}
- $arg = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode($token->value, \true);
- $arguments = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode();
- if ($this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '(')) {
- $type = \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL;
+ $arg = new ConstantNode($token->value, true);
+ $arguments = new ArgumentsNode();
+ if ($this->stream->current->test(Token::PUNCTUATION_TYPE, '(')) {
+ $type = GetAttrNode::METHOD_CALL;
foreach ($this->parseArguments()->nodes as $n) {
$arguments->addElement($n);
}
} else {
- $type = \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL;
+ $type = GetAttrNode::PROPERTY_CALL;
}
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode($node, $arg, $arguments, $type);
+ $node = new GetAttrNode($node, $arg, $arguments, $type);
} elseif ('[' === $token->value) {
$this->stream->next();
$arg = $this->parseExpression();
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ']');
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode($node, $arg, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL);
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ']');
+ $node = new GetAttrNode($node, $arg, new ArgumentsNode(), GetAttrNode::ARRAY_CALL);
} else {
break;
}
@@ -264,14 +281,14 @@ public function parsePostfixExpression($node)
public function parseArguments()
{
$args = [];
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis');
- while (!$this->stream->current->test(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ')')) {
+ $this->stream->expect(Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis');
+ while (!$this->stream->current->test(Token::PUNCTUATION_TYPE, ')')) {
if (!empty($args)) {
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma');
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ',', 'Arguments must be separated by a comma');
}
$args[] = $this->parseExpression();
}
- $this->stream->expect(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis');
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node($args);
+ $this->stream->expect(Token::PUNCTUATION_TYPE, ')', 'A list of arguments must be closed by a parenthesis');
+ return new Node($args);
}
}
diff --git a/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php b/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php
index e73c1beda..5da8fd3aa 100644
--- a/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php
+++ b/vendor/symfony/expression-language/ParserCache/ArrayParserCache.php
@@ -10,14 +10,17 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache;
-@\trigger_error('The ' . __NAMESPACE__ . '\\ArrayParserCache class is deprecated since Symfony 3.2 and will be removed in 4.0. Use the Symfony\\Component\\Cache\\Adapter\\ArrayAdapter class instead.', \E_USER_DEPRECATED);
+@trigger_error('The ' . __NAMESPACE__ . '\\ArrayParserCache class is deprecated since Symfony 3.2 and will be removed in 4.0. Use the Symfony\\Component\\Cache\\Adapter\\ArrayAdapter class instead.', E_USER_DEPRECATED);
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* @author Adrien Brault
*
* @deprecated ArrayParserCache class is deprecated since version 3.2 and will be removed in 4.0. Use the Symfony\Component\Cache\Adapter\ArrayAdapter class instead.
*/
-class ArrayParserCache implements \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface
+class ArrayParserCache implements ParserCacheInterface
{
private $cache = [];
/**
@@ -30,7 +33,7 @@ public function fetch($key)
/**
* {@inheritdoc}
*/
- public function save($key, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression $expression)
+ public function save($key, ParsedExpression $expression)
{
$this->cache[$key] = $expression;
}
diff --git a/vendor/symfony/expression-language/ParserCache/ParserCacheAdapter.php b/vendor/symfony/expression-language/ParserCache/ParserCacheAdapter.php
index ec638982e..55776da31 100644
--- a/vendor/symfony/expression-language/ParserCache/ParserCacheAdapter.php
+++ b/vendor/symfony/expression-language/ParserCache/ParserCacheAdapter.php
@@ -13,25 +13,28 @@
use _PhpScoper5ea00cc67502b\Psr\Cache\CacheItemInterface;
use _PhpScoper5ea00cc67502b\Psr\Cache\CacheItemPoolInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\Cache\CacheItem;
+use BadMethodCallException;
+use Closure;
+
/**
* @author Alexandre GESLIN
*
* @internal and will be removed in Symfony 4.0.
*/
-class ParserCacheAdapter implements \_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemPoolInterface
+class ParserCacheAdapter implements CacheItemPoolInterface
{
private $pool;
private $createCacheItem;
- public function __construct(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheInterface $pool)
+ public function __construct(ParserCacheInterface $pool)
{
$this->pool = $pool;
- $this->createCacheItem = \Closure::bind(static function ($key, $value, $isHit) {
- $item = new \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\CacheItem();
+ $this->createCacheItem = Closure::bind(static function ($key, $value, $isHit) {
+ $item = new CacheItem();
$item->key = $key;
$item->value = $value;
$item->isHit = $isHit;
return $item;
- }, null, \_PhpScoper5ea00cc67502b\Symfony\Component\Cache\CacheItem::class);
+ }, null, CacheItem::class);
}
/**
* {@inheritdoc}
@@ -45,7 +48,7 @@ public function getItem($key)
/**
* {@inheritdoc}
*/
- public function save(\_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemInterface $item)
+ public function save(CacheItemInterface $item)
{
$this->pool->save($item->getKey(), $item->get());
}
@@ -54,48 +57,48 @@ public function save(\_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemInterface $item
*/
public function getItems(array $keys = [])
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
/**
* {@inheritdoc}
*/
public function hasItem($key)
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
/**
* {@inheritdoc}
*/
public function clear()
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
/**
* {@inheritdoc}
*/
public function deleteItem($key)
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
/**
* {@inheritdoc}
*/
public function deleteItems(array $keys)
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
/**
* {@inheritdoc}
*/
- public function saveDeferred(\_PhpScoper5ea00cc67502b\Psr\Cache\CacheItemInterface $item)
+ public function saveDeferred(CacheItemInterface $item)
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
/**
* {@inheritdoc}
*/
public function commit()
{
- throw new \BadMethodCallException('Not implemented.');
+ throw new BadMethodCallException('Not implemented.');
}
}
diff --git a/vendor/symfony/expression-language/ParserCache/ParserCacheInterface.php b/vendor/symfony/expression-language/ParserCache/ParserCacheInterface.php
index 2e72ba023..b0e8c6838 100644
--- a/vendor/symfony/expression-language/ParserCache/ParserCacheInterface.php
+++ b/vendor/symfony/expression-language/ParserCache/ParserCacheInterface.php
@@ -10,8 +10,11 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache;
-@\trigger_error('The ' . __NAMESPACE__ . '\\ParserCacheInterface interface is deprecated since Symfony 3.2 and will be removed in 4.0. Use Psr\\Cache\\CacheItemPoolInterface instead.', \E_USER_DEPRECATED);
+@trigger_error('The ' . __NAMESPACE__ . '\\ParserCacheInterface interface is deprecated since Symfony 3.2 and will be removed in 4.0. Use Psr\\Cache\\CacheItemPoolInterface instead.', E_USER_DEPRECATED);
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+
/**
* @author Adrien Brault
*
@@ -25,7 +28,7 @@ interface ParserCacheInterface
* @param string $key The cache key
* @param ParsedExpression $expression A ParsedExpression instance to store in the cache
*/
- public function save($key, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression $expression);
+ public function save($key, ParsedExpression $expression);
/**
* Fetches an expression from the cache.
*
diff --git a/vendor/symfony/expression-language/ParserCache/index.php b/vendor/symfony/expression-language/ParserCache/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/ParserCache/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Resources/bin/generate_operator_regex.php b/vendor/symfony/expression-language/Resources/bin/generate_operator_regex.php
index 280451388..d949f390d 100644
--- a/vendor/symfony/expression-language/Resources/bin/generate_operator_regex.php
+++ b/vendor/symfony/expression-language/Resources/bin/generate_operator_regex.php
@@ -10,14 +10,21 @@
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
+
+use function array_combine;
+use function array_map;
+use function arsort;
+use function implode;
+use function preg_quote;
+
$operators = ['not', '!', 'or', '||', '&&', 'and', '|', '^', '&', '==', '===', '!=', '!==', '<', '>', '>=', '<=', 'not in', 'in', '..', '+', '-', '~', '*', '/', '%', 'matches', '**'];
-$operators = \array_combine($operators, \array_map('strlen', $operators));
-\arsort($operators);
+$operators = array_combine($operators, array_map('strlen', $operators));
+arsort($operators);
$regex = [];
foreach ($operators as $operator => $length) {
// Collisions of character operators:
// - an operator that begins with a character must have a space or a parenthesis before or starting at the beginning of a string
// - an operator that ends with a character must be followed by a whitespace or a parenthesis
- $regex[] = (\ctype_alpha($operator[0]) ? '(?<=^|[\\s(])' : '') . \preg_quote($operator, '/') . (\ctype_alpha($operator[$length - 1]) ? '(?=[\\s(])' : '');
+ $regex[] = (\ctype_alpha($operator[0]) ? '(?<=^|[\\s(])' : '') . preg_quote($operator, '/') . (\ctype_alpha($operator[$length - 1]) ? '(?=[\\s(])' : '');
}
-echo '/' . \implode('|', $regex) . '/A';
+echo '/' . implode('|', $regex) . '/A';
diff --git a/vendor/symfony/expression-language/Resources/bin/index.php b/vendor/symfony/expression-language/Resources/bin/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Resources/bin/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Resources/index.php b/vendor/symfony/expression-language/Resources/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Resources/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/SerializedParsedExpression.php b/vendor/symfony/expression-language/SerializedParsedExpression.php
index 15930dd24..1e7166079 100644
--- a/vendor/symfony/expression-language/SerializedParsedExpression.php
+++ b/vendor/symfony/expression-language/SerializedParsedExpression.php
@@ -10,12 +10,14 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use function unserialize;
+
/**
* Represents an already parsed expression.
*
* @author Fabien Potencier
*/
-class SerializedParsedExpression extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression
+class SerializedParsedExpression extends ParsedExpression
{
private $nodes;
/**
@@ -29,6 +31,6 @@ public function __construct($expression, $nodes)
}
public function getNodes()
{
- return \unserialize($this->nodes);
+ return unserialize($this->nodes);
}
}
diff --git a/vendor/symfony/expression-language/SyntaxError.php b/vendor/symfony/expression-language/SyntaxError.php
index 8c2cf73f7..141fdb653 100644
--- a/vendor/symfony/expression-language/SyntaxError.php
+++ b/vendor/symfony/expression-language/SyntaxError.php
@@ -10,26 +10,32 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
-class SyntaxError extends \LogicException
+use LogicException;
+use function levenshtein;
+use function rtrim;
+use function sprintf;
+use const INF;
+
+class SyntaxError extends LogicException
{
public function __construct($message, $cursor = 0, $expression = '', $subject = null, array $proposals = null)
{
- $message = \sprintf('%s around position %d', \rtrim($message, '.'), $cursor);
+ $message = sprintf('%s around position %d', rtrim($message, '.'), $cursor);
if ($expression) {
- $message = \sprintf('%s for expression `%s`', $message, $expression);
+ $message = sprintf('%s for expression `%s`', $message, $expression);
}
$message .= '.';
if (null !== $subject && null !== $proposals) {
- $minScore = \INF;
+ $minScore = INF;
foreach ($proposals as $proposal) {
- $distance = \levenshtein($subject, $proposal);
+ $distance = levenshtein($subject, $proposal);
if ($distance < $minScore) {
$guess = $proposal;
$minScore = $distance;
}
}
if (isset($guess) && $minScore < 3) {
- $message .= \sprintf(' Did you mean "%s"?', $guess);
+ $message .= sprintf(' Did you mean "%s"?', $guess);
}
}
parent::__construct($message);
diff --git a/vendor/symfony/expression-language/Tests/ExpressionFunctionTest.php b/vendor/symfony/expression-language/Tests/ExpressionFunctionTest.php
index d806a27e3..f693ef954 100644
--- a/vendor/symfony/expression-language/Tests/ExpressionFunctionTest.php
+++ b/vendor/symfony/expression-language/Tests/ExpressionFunctionTest.php
@@ -17,19 +17,19 @@
*
* @author Dany Maillard
*/
-class ExpressionFunctionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ExpressionFunctionTest extends TestCase
{
public function testFunctionDoesNotExist()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('PHP function "fn_does_not_exist" does not exist.');
- \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction::fromPhp('fn_does_not_exist');
+ ExpressionFunction::fromPhp('fn_does_not_exist');
}
public function testFunctionNamespaced()
{
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('An expression function name must be defined when PHP function "Symfony\\Component\\ExpressionLanguage\\Tests\\fn_namespaced" is namespaced.');
- \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction::fromPhp('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\Tests\\fn_namespaced');
+ ExpressionFunction::fromPhp('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\Tests\\fn_namespaced');
}
}
function fn_namespaced()
diff --git a/vendor/symfony/expression-language/Tests/ExpressionLanguageTest.php b/vendor/symfony/expression-language/Tests/ExpressionLanguageTest.php
index 09185b93c..1c6ec040e 100644
--- a/vendor/symfony/expression-language/Tests/ExpressionLanguageTest.php
+++ b/vendor/symfony/expression-language/Tests/ExpressionLanguageTest.php
@@ -15,19 +15,23 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Fixtures\TestProvider;
-class ExpressionLanguageTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use stdClass;
+use function sprintf;
+use const PHP_VERSION;
+
+class ExpressionLanguageTest extends TestCase
{
public function testCachedParse()
{
$cacheMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemPoolInterface')->getMock();
$cacheItemMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemInterface')->getMock();
$savedParsedExpression = null;
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage($cacheMock);
+ $expressionLanguage = new ExpressionLanguage($cacheMock);
$cacheMock->expects($this->exactly(2))->method('getItem')->with('1%20%2B%201%2F%2F')->willReturn($cacheItemMock);
$cacheItemMock->expects($this->exactly(2))->method('get')->willReturnCallback(function () use(&$savedParsedExpression) {
return $savedParsedExpression;
});
- $cacheItemMock->expects($this->exactly(1))->method('set')->with($this->isInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression::class))->willReturnCallback(function ($parsedExpression) use(&$savedParsedExpression) {
+ $cacheItemMock->expects($this->exactly(1))->method('set')->with($this->isInstanceOf(ParsedExpression::class))->willReturnCallback(function ($parsedExpression) use(&$savedParsedExpression) {
$savedParsedExpression = $parsedExpression;
});
$cacheMock->expects($this->exactly(1))->method('save')->with($cacheItemMock);
@@ -43,9 +47,9 @@ public function testCachedParseWithDeprecatedParserCacheInterface()
{
$cacheMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
$savedParsedExpression = null;
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage($cacheMock);
+ $expressionLanguage = new ExpressionLanguage($cacheMock);
$cacheMock->expects($this->exactly(1))->method('fetch')->with('1%20%2B%201%2F%2F')->willReturn($savedParsedExpression);
- $cacheMock->expects($this->exactly(1))->method('save')->with('1%20%2B%201%2F%2F', $this->isInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression::class))->willReturnCallback(function ($key, $expression) use(&$savedParsedExpression) {
+ $cacheMock->expects($this->exactly(1))->method('save')->with('1%20%2B%201%2F%2F', $this->isInstanceOf(ParsedExpression::class))->willReturnCallback(function ($key, $expression) use(&$savedParsedExpression) {
$savedParsedExpression = $expression;
});
$parsedExpression = $expressionLanguage->parse('1 + 1', []);
@@ -56,18 +60,18 @@ public function testWrongCacheImplementation()
$this->expectException('InvalidArgumentException');
$this->expectExceptionMessage('Cache argument has to implement "Psr\\Cache\\CacheItemPoolInterface".');
$cacheMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemSpoolInterface')->getMock();
- new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage($cacheMock);
+ new ExpressionLanguage($cacheMock);
}
public function testConstantFunction()
{
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
- $this->assertEquals(\PHP_VERSION, $expressionLanguage->evaluate('constant("PHP_VERSION")'));
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $expressionLanguage = new ExpressionLanguage();
+ $this->assertEquals(PHP_VERSION, $expressionLanguage->evaluate('constant("PHP_VERSION")'));
+ $expressionLanguage = new ExpressionLanguage();
$this->assertEquals('\\constant("PHP_VERSION")', $expressionLanguage->compile('constant("PHP_VERSION")'));
}
public function testProviders()
{
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage(null, [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Fixtures\TestProvider()]);
+ $expressionLanguage = new ExpressionLanguage(null, [new TestProvider()]);
$this->assertEquals('foo', $expressionLanguage->evaluate('identity("foo")'));
$this->assertEquals('"foo"', $expressionLanguage->compile('identity("foo")'));
$this->assertEquals('FOO', $expressionLanguage->evaluate('strtoupper("foo")'));
@@ -82,7 +86,7 @@ public function testProviders()
*/
public function testShortCircuitOperatorsEvaluate($expression, array $values, $expected)
{
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $expressionLanguage = new ExpressionLanguage();
$this->assertEquals($expected, $expressionLanguage->evaluate($expression, $values));
}
/**
@@ -91,30 +95,30 @@ public function testShortCircuitOperatorsEvaluate($expression, array $values, $e
public function testShortCircuitOperatorsCompile($expression, array $names, $expected)
{
$result = null;
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
- eval(\sprintf('$result = %s;', $expressionLanguage->compile($expression, $names)));
+ $expressionLanguage = new ExpressionLanguage();
+ eval(sprintf('$result = %s;', $expressionLanguage->compile($expression, $names)));
$this->assertSame($expected, $result);
}
public function testParseThrowsInsteadOfNotice()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\SyntaxError');
$this->expectExceptionMessage('Unexpected end of expression around position 6 for expression `node.`.');
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $expressionLanguage = new ExpressionLanguage();
$expressionLanguage->parse('node.', ['node']);
}
public function shortCircuitProviderEvaluate()
{
$object = $this->getMockBuilder('stdClass')->setMethods(['foo'])->getMock();
$object->expects($this->never())->method('foo');
- return [['false and object.foo()', ['object' => $object], \false], ['false && object.foo()', ['object' => $object], \false], ['true || object.foo()', ['object' => $object], \true], ['true or object.foo()', ['object' => $object], \true]];
+ return [['false and object.foo()', ['object' => $object], false], ['false && object.foo()', ['object' => $object], false], ['true || object.foo()', ['object' => $object], true], ['true or object.foo()', ['object' => $object], true]];
}
public function shortCircuitProviderCompile()
{
- return [['false and foo', ['foo' => 'foo'], \false], ['false && foo', ['foo' => 'foo'], \false], ['true || foo', ['foo' => 'foo'], \true], ['true or foo', ['foo' => 'foo'], \true]];
+ return [['false and foo', ['foo' => 'foo'], false], ['false && foo', ['foo' => 'foo'], false], ['true || foo', ['foo' => 'foo'], true], ['true or foo', ['foo' => 'foo'], true]];
}
public function testCachingForOverriddenVariableNames()
{
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $expressionLanguage = new ExpressionLanguage();
$expression = 'a + b';
$expressionLanguage->evaluate($expression, ['a' => 1, 'b' => 1]);
$result = $expressionLanguage->compile($expression, ['a', 'B' => 'b']);
@@ -122,7 +126,7 @@ public function testCachingForOverriddenVariableNames()
}
public function testStrictEquality()
{
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $expressionLanguage = new ExpressionLanguage();
$expression = '123 === a';
$result = $expressionLanguage->compile($expression, ['a']);
$this->assertSame('(123 === $a)', $result);
@@ -131,13 +135,13 @@ public function testCachingWithDifferentNamesOrder()
{
$cacheMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemPoolInterface')->getMock();
$cacheItemMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemInterface')->getMock();
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage($cacheMock);
+ $expressionLanguage = new ExpressionLanguage($cacheMock);
$savedParsedExpression = null;
$cacheMock->expects($this->exactly(2))->method('getItem')->with('a%20%2B%20b%2F%2Fa%7CB%3Ab')->willReturn($cacheItemMock);
$cacheItemMock->expects($this->exactly(2))->method('get')->willReturnCallback(function () use(&$savedParsedExpression) {
return $savedParsedExpression;
});
- $cacheItemMock->expects($this->exactly(1))->method('set')->with($this->isInstanceOf(\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression::class))->willReturnCallback(function ($parsedExpression) use(&$savedParsedExpression) {
+ $cacheItemMock->expects($this->exactly(1))->method('set')->with($this->isInstanceOf(ParsedExpression::class))->willReturnCallback(function ($parsedExpression) use(&$savedParsedExpression) {
$savedParsedExpression = $parsedExpression;
});
$cacheMock->expects($this->exactly(1))->method('save')->with($cacheItemMock);
@@ -147,7 +151,7 @@ public function testCachingWithDifferentNamesOrder()
}
public function testOperatorCollisions()
{
- $expressionLanguage = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $expressionLanguage = new ExpressionLanguage();
$expression = 'foo.not in [bar]';
$compiled = $expressionLanguage->compile($expression, ['foo', 'bar']);
$this->assertSame('in_array($foo->not, [0 => $bar])', $compiled);
@@ -160,7 +164,7 @@ public function testOperatorCollisions()
public function testRegisterAfterParse($registerCallback)
{
$this->expectException('LogicException');
- $el = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $el = new ExpressionLanguage();
$el->parse('1 + 1', []);
$registerCallback($el);
}
@@ -170,7 +174,7 @@ public function testRegisterAfterParse($registerCallback)
public function testRegisterAfterEval($registerCallback)
{
$this->expectException('LogicException');
- $el = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $el = new ExpressionLanguage();
$el->evaluate('1 + 1');
$registerCallback($el);
}
@@ -178,8 +182,8 @@ public function testCallBadCallable()
{
$this->expectException('RuntimeException');
$this->expectExceptionMessageRegExp('/Unable to call method "\\w+" of object "\\w+"./');
- $el = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
- $el->evaluate('foo.myfunction()', ['foo' => new \stdClass()]);
+ $el = new ExpressionLanguage();
+ $el->evaluate('foo.myfunction()', ['foo' => new stdClass()]);
}
/**
* @dataProvider getRegisterCallbacks
@@ -187,22 +191,22 @@ public function testCallBadCallable()
public function testRegisterAfterCompile($registerCallback)
{
$this->expectException('LogicException');
- $el = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage();
+ $el = new ExpressionLanguage();
$el->compile('1 + 1');
$registerCallback($el);
}
public function getRegisterCallbacks()
{
- return [[function (\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage $el) {
+ return [[function (ExpressionLanguage $el) {
$el->register('fn', function () {
}, function () {
});
- }], [function (\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage $el) {
- $el->addFunction(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction('fn', function () {
+ }], [function (ExpressionLanguage $el) {
+ $el->addFunction(new ExpressionFunction('fn', function () {
}, function () {
}));
- }], [function (\_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionLanguage $el) {
- $el->registerProvider(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Fixtures\TestProvider());
+ }], [function (ExpressionLanguage $el) {
+ $el->registerProvider(new TestProvider());
}]];
}
}
diff --git a/vendor/symfony/expression-language/Tests/ExpressionTest.php b/vendor/symfony/expression-language/Tests/ExpressionTest.php
index 6a5642e9e..ff776995d 100644
--- a/vendor/symfony/expression-language/Tests/ExpressionTest.php
+++ b/vendor/symfony/expression-language/Tests/ExpressionTest.php
@@ -12,13 +12,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression;
-class ExpressionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function serialize;
+use function unserialize;
+
+class ExpressionTest extends TestCase
{
public function testSerialization()
{
- $expression = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Expression('kernel.boot()');
- $serializedExpression = \serialize($expression);
- $unserializedExpression = \unserialize($serializedExpression);
+ $expression = new Expression('kernel.boot()');
+ $serializedExpression = serialize($expression);
+ $unserializedExpression = unserialize($serializedExpression);
$this->assertEquals($expression, $unserializedExpression);
}
}
diff --git a/vendor/symfony/expression-language/Tests/Fixtures/TestProvider.php b/vendor/symfony/expression-language/Tests/Fixtures/TestProvider.php
index dccc86a51..588406d29 100644
--- a/vendor/symfony/expression-language/Tests/Fixtures/TestProvider.php
+++ b/vendor/symfony/expression-language/Tests/Fixtures/TestProvider.php
@@ -13,18 +13,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionPhpFunction;
-class TestProvider implements \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface
+class TestProvider implements ExpressionFunctionProviderInterface
{
public function getFunctions()
{
- return [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction('identity', function ($input) {
+ return [new ExpressionFunction('identity', function ($input) {
return $input;
}, function (array $values, $input) {
return $input;
- }), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction::fromPhp('strtoupper'), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction::fromPhp('\\strtolower'), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ExpressionFunction::fromPhp('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\Tests\\Fixtures\\fn_namespaced', 'fn_namespaced')];
+ }), ExpressionFunction::fromPhp('strtoupper'), ExpressionFunction::fromPhp('\\strtolower'), ExpressionFunction::fromPhp('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\Tests\\Fixtures\\fn_namespaced', 'fn_namespaced')];
}
}
function fn_namespaced()
{
- return \true;
+ return true;
}
diff --git a/vendor/symfony/expression-language/Tests/Fixtures/index.php b/vendor/symfony/expression-language/Tests/Fixtures/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Tests/Fixtures/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Tests/LexerTest.php b/vendor/symfony/expression-language/Tests/LexerTest.php
index 7e0092910..1a06802d8 100644
--- a/vendor/symfony/expression-language/Tests/LexerTest.php
+++ b/vendor/symfony/expression-language/Tests/LexerTest.php
@@ -14,7 +14,9 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\TokenStream;
-class LexerTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function strlen;
+
+class LexerTest extends TestCase
{
/**
* @var Lexer
@@ -22,15 +24,15 @@ class LexerTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
private $lexer;
protected function setUp()
{
- $this->lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
+ $this->lexer = new Lexer();
}
/**
* @dataProvider getTokenizeData
*/
public function testTokenize($tokens, $expression)
{
- $tokens[] = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('end of expression', null, \strlen($expression) + 1);
- $this->assertEquals(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\TokenStream($tokens, $expression), $this->lexer->tokenize($expression));
+ $tokens[] = new Token('end of expression', null, strlen($expression) + 1);
+ $this->assertEquals(new TokenStream($tokens, $expression), $this->lexer->tokenize($expression));
}
public function testTokenizeThrowsErrorWithMessage()
{
@@ -48,6 +50,6 @@ public function testTokenizeThrowsErrorOnUnclosedBrace()
}
public function getTokenizeData()
{
- return [[[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'a', 3)], ' a '], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'a', 1)], 'a'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('string', 'foo', 1)], '"foo"'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('number', '3', 1)], '3'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('operator', '+', 1)], '+'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '.', 1)], '.'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '(', 1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('number', '3', 2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('operator', '+', 4), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('number', '5', 6), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', ')', 7), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('operator', '~', 9), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'foo', 11), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '(', 14), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('string', 'bar', 15), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', ')', 20), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '.', 21), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'baz', 22), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '[', 25), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('number', '4', 26), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', ']', 27)], '(3 + 5) ~ foo("bar").baz[4]'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('operator', '..', 1)], '..'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('string', '#foo', 1)], "'#foo'"], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('string', '#foo', 1)], '"#foo"'], [[new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'foo', 1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '.', 4), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'not', 5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('operator', 'in', 9), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', '[', 12), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('name', 'bar', 13), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token('punctuation', ']', 16)], 'foo.not in [bar]']];
+ return [[[new Token('name', 'a', 3)], ' a '], [[new Token('name', 'a', 1)], 'a'], [[new Token('string', 'foo', 1)], '"foo"'], [[new Token('number', '3', 1)], '3'], [[new Token('operator', '+', 1)], '+'], [[new Token('punctuation', '.', 1)], '.'], [[new Token('punctuation', '(', 1), new Token('number', '3', 2), new Token('operator', '+', 4), new Token('number', '5', 6), new Token('punctuation', ')', 7), new Token('operator', '~', 9), new Token('name', 'foo', 11), new Token('punctuation', '(', 14), new Token('string', 'bar', 15), new Token('punctuation', ')', 20), new Token('punctuation', '.', 21), new Token('name', 'baz', 22), new Token('punctuation', '[', 25), new Token('number', '4', 26), new Token('punctuation', ']', 27)], '(3 + 5) ~ foo("bar").baz[4]'], [[new Token('operator', '..', 1)], '..'], [[new Token('string', '#foo', 1)], "'#foo'"], [[new Token('string', '#foo', 1)], '"#foo"'], [[new Token('name', 'foo', 1), new Token('punctuation', '.', 4), new Token('name', 'not', 5), new Token('operator', 'in', 9), new Token('punctuation', '[', 12), new Token('name', 'bar', 13), new Token('punctuation', ']', 16)], 'foo.not in [bar]']];
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/AbstractNodeTest.php b/vendor/symfony/expression-language/Tests/Node/AbstractNodeTest.php
index a27a191ea..1f89b8f67 100644
--- a/vendor/symfony/expression-language/Tests/Node/AbstractNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/AbstractNodeTest.php
@@ -12,7 +12,7 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler;
-abstract class AbstractNodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+abstract class AbstractNodeTest extends TestCase
{
/**
* @dataProvider getEvaluateData
@@ -27,7 +27,7 @@ public abstract function getEvaluateData();
*/
public function testCompile($expected, $node, $functions = [])
{
- $compiler = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Compiler($functions);
+ $compiler = new Compiler($functions);
$node->compile($compiler);
$this->assertSame($expected, $compiler->getSource());
}
diff --git a/vendor/symfony/expression-language/Tests/Node/ArgumentsNodeTest.php b/vendor/symfony/expression-language/Tests/Node/ArgumentsNodeTest.php
index f320bcfa1..339c0cdc8 100644
--- a/vendor/symfony/expression-language/Tests/Node/ArgumentsNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/ArgumentsNodeTest.php
@@ -11,7 +11,7 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode;
-class ArgumentsNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\ArrayNodeTest
+class ArgumentsNodeTest extends ArrayNodeTest
{
public function getCompileData()
{
@@ -23,6 +23,6 @@ public function getDumpData()
}
protected function createArrayNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode();
+ return new ArgumentsNode();
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/ArrayNodeTest.php b/vendor/symfony/expression-language/Tests/Node/ArrayNodeTest.php
index 859d5ba0b..01e155dd9 100644
--- a/vendor/symfony/expression-language/Tests/Node/ArrayNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/ArrayNodeTest.php
@@ -12,14 +12,17 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
-class ArrayNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+use function serialize;
+use function unserialize;
+
+class ArrayNodeTest extends AbstractNodeTest
{
public function testSerialization()
{
$node = $this->createArrayNode();
- $node->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo'));
- $serializedNode = \serialize($node);
- $unserializedNode = \unserialize($serializedNode);
+ $node->addElement(new ConstantNode('foo'));
+ $serializedNode = serialize($node);
+ $unserializedNode = unserialize($serializedNode);
$this->assertEquals($node, $unserializedNode);
$this->assertNotEquals($this->createArrayNode(), $unserializedNode);
}
@@ -35,23 +38,23 @@ public function getDumpData()
{
(yield ['{"b": "a", 0: "b"}', $this->getArrayNode()]);
$array = $this->createArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a"b'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('d'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('_PhpScoper5ea00cc67502b\\a\\b'));
+ $array->addElement(new ConstantNode('c'), new ConstantNode('a"b'));
+ $array->addElement(new ConstantNode('d'), new ConstantNode('_PhpScoper5ea00cc67502b\\a\\b'));
(yield ['{"a\\"b": "c", "a\\\\b": "d"}', $array]);
$array = $this->createArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('d'));
+ $array->addElement(new ConstantNode('c'));
+ $array->addElement(new ConstantNode('d'));
(yield ['["c", "d"]', $array]);
}
protected function getArrayNode()
{
$array = $this->createArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
+ $array->addElement(new ConstantNode('a'), new ConstantNode('b'));
+ $array->addElement(new ConstantNode('b'));
return $array;
}
protected function createArrayNode()
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
+ return new ArrayNode();
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/BinaryNodeTest.php b/vendor/symfony/expression-language/Tests/Node/BinaryNodeTest.php
index c69d7e986..580ce27fc 100644
--- a/vendor/symfony/expression-language/Tests/Node/BinaryNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/BinaryNodeTest.php
@@ -13,27 +13,27 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
-class BinaryNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+class BinaryNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- $array = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
- return [[\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('or', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('||', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('and', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('&&', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], [0, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('&', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], [6, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('|', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], [6, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('^', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('===', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('!==', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('==', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('!=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], [-1, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [3, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('+', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [4, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('*', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [1, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('/', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [1, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('%', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [25, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('**', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['ab', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('~', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'))], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), $array)], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), $array)], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('not in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), $array)], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('not in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), $array)], [[1, 2, 3], new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('..', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3))], [1, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('matches', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('abc'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('/^[a-z]+$/'))]];
+ $array = new ArrayNode();
+ $array->addElement(new ConstantNode('a'));
+ $array->addElement(new ConstantNode('b'));
+ return [[true, new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))], [true, new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))], [false, new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))], [false, new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))], [0, new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))], [6, new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))], [6, new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))], [true, new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))], [true, new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))], [true, new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))], [false, new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))], [false, new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))], [true, new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))], [true, new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))], [false, new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))], [false, new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))], [true, new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))], [-1, new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))], [3, new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))], [4, new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))], [1, new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))], [1, new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))], [25, new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))], ['ab', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))], [true, new BinaryNode('in', new ConstantNode('a'), $array)], [false, new BinaryNode('in', new ConstantNode('c'), $array)], [true, new BinaryNode('not in', new ConstantNode('c'), $array)], [false, new BinaryNode('not in', new ConstantNode('a'), $array)], [[1, 2, 3], new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))], [1, new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+$/'))]];
}
public function getCompileData()
{
- $array = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
- return [['(true || false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('or', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(true || false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('||', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(true && false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('and', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(true && false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('&&', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(2 & 4)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('&', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], ['(2 | 4)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('|', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], ['(2 ^ 4)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('^', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], ['(1 < 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 <= 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 <= 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(1 > 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 >= 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 >= 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(true === true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('===', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], ['(true !== true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('!==', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], ['(2 == 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('==', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(2 != 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('!=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(1 - 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 + 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('+', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(2 * 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('*', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(2 / 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('/', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(5 % 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('%', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['pow(5, 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('**', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['("a" . "b")', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('~', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'))], ['in_array("a", [0 => "a", 1 => "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), $array)], ['in_array("c", [0 => "a", 1 => "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), $array)], ['!in_array("c", [0 => "a", 1 => "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('not in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), $array)], ['!in_array("a", [0 => "a", 1 => "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('not in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), $array)], ['range(1, 3)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('..', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3))], ['preg_match("/^[a-z]+/i\\$/", "abc")', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('matches', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('abc'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('/^[a-z]+/i$/'))]];
+ $array = new ArrayNode();
+ $array->addElement(new ConstantNode('a'));
+ $array->addElement(new ConstantNode('b'));
+ return [['(true || false)', new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))], ['(true || false)', new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))], ['(true && false)', new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))], ['(true && false)', new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))], ['(2 & 4)', new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))], ['(2 | 4)', new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))], ['(2 ^ 4)', new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))], ['(1 < 2)', new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))], ['(1 <= 2)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))], ['(1 <= 1)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))], ['(1 > 2)', new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))], ['(1 >= 2)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))], ['(1 >= 1)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))], ['(true === true)', new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))], ['(true !== true)', new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))], ['(2 == 1)', new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))], ['(2 != 1)', new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))], ['(1 - 2)', new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))], ['(1 + 2)', new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))], ['(2 * 2)', new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))], ['(2 / 2)', new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))], ['(5 % 2)', new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))], ['pow(5, 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))], ['("a" . "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))], ['in_array("a", [0 => "a", 1 => "b"])', new BinaryNode('in', new ConstantNode('a'), $array)], ['in_array("c", [0 => "a", 1 => "b"])', new BinaryNode('in', new ConstantNode('c'), $array)], ['!in_array("c", [0 => "a", 1 => "b"])', new BinaryNode('not in', new ConstantNode('c'), $array)], ['!in_array("a", [0 => "a", 1 => "b"])', new BinaryNode('not in', new ConstantNode('a'), $array)], ['range(1, 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))], ['preg_match("/^[a-z]+/i\\$/", "abc")', new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+/i$/'))]];
}
public function getDumpData()
{
- $array = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
- return [['(true or false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('or', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(true || false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('||', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(true and false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('and', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(true && false)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('&&', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false))], ['(2 & 4)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('&', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], ['(2 | 4)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('|', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], ['(2 ^ 4)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('^', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(4))], ['(1 < 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 <= 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 <= 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('<=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(1 > 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 >= 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 >= 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('>=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(true === true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('===', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], ['(true !== true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('!==', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], ['(2 == 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('==', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(2 != 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('!=', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(1 - 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(1 + 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('+', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(2 * 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('*', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(2 / 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('/', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(5 % 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('%', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(5 ** 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('**', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(5), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['("a" ~ "b")', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('~', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'))], ['("a" in ["a", "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), $array)], ['("c" in ["a", "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), $array)], ['("c" not in ["a", "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('not in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('c'), $array)], ['("a" not in ["a", "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('not in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), $array)], ['(1 .. 3)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('..', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3))], ['("abc" matches "/^[a-z]+/i$/")', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('matches', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('abc'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('/^[a-z]+/i$/'))]];
+ $array = new ArrayNode();
+ $array->addElement(new ConstantNode('a'));
+ $array->addElement(new ConstantNode('b'));
+ return [['(true or false)', new BinaryNode('or', new ConstantNode(true), new ConstantNode(false))], ['(true || false)', new BinaryNode('||', new ConstantNode(true), new ConstantNode(false))], ['(true and false)', new BinaryNode('and', new ConstantNode(true), new ConstantNode(false))], ['(true && false)', new BinaryNode('&&', new ConstantNode(true), new ConstantNode(false))], ['(2 & 4)', new BinaryNode('&', new ConstantNode(2), new ConstantNode(4))], ['(2 | 4)', new BinaryNode('|', new ConstantNode(2), new ConstantNode(4))], ['(2 ^ 4)', new BinaryNode('^', new ConstantNode(2), new ConstantNode(4))], ['(1 < 2)', new BinaryNode('<', new ConstantNode(1), new ConstantNode(2))], ['(1 <= 2)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(2))], ['(1 <= 1)', new BinaryNode('<=', new ConstantNode(1), new ConstantNode(1))], ['(1 > 2)', new BinaryNode('>', new ConstantNode(1), new ConstantNode(2))], ['(1 >= 2)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(2))], ['(1 >= 1)', new BinaryNode('>=', new ConstantNode(1), new ConstantNode(1))], ['(true === true)', new BinaryNode('===', new ConstantNode(true), new ConstantNode(true))], ['(true !== true)', new BinaryNode('!==', new ConstantNode(true), new ConstantNode(true))], ['(2 == 1)', new BinaryNode('==', new ConstantNode(2), new ConstantNode(1))], ['(2 != 1)', new BinaryNode('!=', new ConstantNode(2), new ConstantNode(1))], ['(1 - 2)', new BinaryNode('-', new ConstantNode(1), new ConstantNode(2))], ['(1 + 2)', new BinaryNode('+', new ConstantNode(1), new ConstantNode(2))], ['(2 * 2)', new BinaryNode('*', new ConstantNode(2), new ConstantNode(2))], ['(2 / 2)', new BinaryNode('/', new ConstantNode(2), new ConstantNode(2))], ['(5 % 2)', new BinaryNode('%', new ConstantNode(5), new ConstantNode(2))], ['(5 ** 2)', new BinaryNode('**', new ConstantNode(5), new ConstantNode(2))], ['("a" ~ "b")', new BinaryNode('~', new ConstantNode('a'), new ConstantNode('b'))], ['("a" in ["a", "b"])', new BinaryNode('in', new ConstantNode('a'), $array)], ['("c" in ["a", "b"])', new BinaryNode('in', new ConstantNode('c'), $array)], ['("c" not in ["a", "b"])', new BinaryNode('not in', new ConstantNode('c'), $array)], ['("a" not in ["a", "b"])', new BinaryNode('not in', new ConstantNode('a'), $array)], ['(1 .. 3)', new BinaryNode('..', new ConstantNode(1), new ConstantNode(3))], ['("abc" matches "/^[a-z]+/i$/")', new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('/^[a-z]+/i$/'))]];
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/ConditionalNodeTest.php b/vendor/symfony/expression-language/Tests/Node/ConditionalNodeTest.php
index bbbbcc1f1..f7146499b 100644
--- a/vendor/symfony/expression-language/Tests/Node/ConditionalNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/ConditionalNodeTest.php
@@ -12,18 +12,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
-class ConditionalNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+class ConditionalNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- return [[1, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], [2, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))]];
+ return [[1, new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))], [2, new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))]];
}
public function getCompileData()
{
- return [['((true) ? (1) : (2))', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['((false) ? (1) : (2))', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))]];
+ return [['((true) ? (1) : (2))', new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))], ['((false) ? (1) : (2))', new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))]];
}
public function getDumpData()
{
- return [['(true ? 1 : 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))], ['(false ? 1 : 2)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2))]];
+ return [['(true ? 1 : 2)', new ConditionalNode(new ConstantNode(true), new ConstantNode(1), new ConstantNode(2))], ['(false ? 1 : 2)', new ConditionalNode(new ConstantNode(false), new ConstantNode(1), new ConstantNode(2))]];
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php b/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php
index 1ed279aa1..b9fa58308 100644
--- a/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/ConstantNodeTest.php
@@ -11,18 +11,18 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
-class ConstantNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+class ConstantNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- return [[\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false)], [\true, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true)], [null, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(null)], [3, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3)], [3.3, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3.3)], ['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo')], [[1, 'b' => 'a'], new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode([1, 'b' => 'a'])]];
+ return [[false, new ConstantNode(false)], [true, new ConstantNode(true)], [null, new ConstantNode(null)], [3, new ConstantNode(3)], [3.3, new ConstantNode(3.3)], ['foo', new ConstantNode('foo')], [[1, 'b' => 'a'], new ConstantNode([1, 'b' => 'a'])]];
}
public function getCompileData()
{
- return [['false', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false)], ['true', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true)], ['null', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(null)], ['3', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3)], ['3.3', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3.3)], ['"foo"', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo')], ['[0 => 1, "b" => "a"]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode([1, 'b' => 'a'])]];
+ return [['false', new ConstantNode(false)], ['true', new ConstantNode(true)], ['null', new ConstantNode(null)], ['3', new ConstantNode(3)], ['3.3', new ConstantNode(3.3)], ['"foo"', new ConstantNode('foo')], ['[0 => 1, "b" => "a"]', new ConstantNode([1, 'b' => 'a'])]];
}
public function getDumpData()
{
- return [['false', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false)], ['true', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true)], ['null', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(null)], ['3', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3)], ['3.3', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3.3)], ['"foo"', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo')], ['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo', \true)], ['{0: 1, "b": "a", 1: true}', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode([1, 'b' => 'a', \true])], ['{"a\\"b": "c", "a\\\\b": "d"}', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(['a"b' => 'c', '_PhpScoper5ea00cc67502b\\a\\b' => 'd'])], ['["c", "d"]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(['c', 'd'])], ['{"a": ["b"]}', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(['a' => ['b']])]];
+ return [['false', new ConstantNode(false)], ['true', new ConstantNode(true)], ['null', new ConstantNode(null)], ['3', new ConstantNode(3)], ['3.3', new ConstantNode(3.3)], ['"foo"', new ConstantNode('foo')], ['foo', new ConstantNode('foo', true)], ['{0: 1, "b": "a", 1: true}', new ConstantNode([1, 'b' => 'a', true])], ['{"a\\"b": "c", "a\\\\b": "d"}', new ConstantNode(['a"b' => 'c', '_PhpScoper5ea00cc67502b\\a\\b' => 'd'])], ['["c", "d"]', new ConstantNode(['c', 'd'])], ['{"a": ["b"]}', new ConstantNode(['a' => ['b']])]];
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/FunctionNodeTest.php b/vendor/symfony/expression-language/Tests/Node/FunctionNodeTest.php
index f88fad8bf..a57c41154 100644
--- a/vendor/symfony/expression-language/Tests/Node/FunctionNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/FunctionNodeTest.php
@@ -13,24 +13,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\FunctionNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node;
-class FunctionNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+use function sprintf;
+
+class FunctionNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- return [['bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\FunctionNode('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node([new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('bar')])), [], ['foo' => $this->getCallables()]]];
+ return [['bar', new FunctionNode('foo', new Node([new ConstantNode('bar')])), [], ['foo' => $this->getCallables()]]];
}
public function getCompileData()
{
- return [['foo("bar")', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\FunctionNode('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node([new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('bar')])), ['foo' => $this->getCallables()]]];
+ return [['foo("bar")', new FunctionNode('foo', new Node([new ConstantNode('bar')])), ['foo' => $this->getCallables()]]];
}
public function getDumpData()
{
- return [['foo("bar")', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\FunctionNode('foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node([new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('bar')])), ['foo' => $this->getCallables()]]];
+ return [['foo("bar")', new FunctionNode('foo', new Node([new ConstantNode('bar')])), ['foo' => $this->getCallables()]]];
}
protected function getCallables()
{
return ['compiler' => function ($arg) {
- return \sprintf('foo(%s)', $arg);
+ return sprintf('foo(%s)', $arg);
}, 'evaluator' => function ($variables, $arg) {
return $arg;
}];
diff --git a/vendor/symfony/expression-language/Tests/Node/GetAttrNodeTest.php b/vendor/symfony/expression-language/Tests/Node/GetAttrNodeTest.php
index 5ea226864..6df281780 100644
--- a/vendor/symfony/expression-language/Tests/Node/GetAttrNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/GetAttrNodeTest.php
@@ -14,25 +14,25 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode;
-class GetAttrNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+class GetAttrNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- return [['b', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(0), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b']]], ['a', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b']]], ['bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL), ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\Obj()]], ['baz', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\Obj()]], ['a', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('index'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b'], 'index' => 'b']]];
+ return [['b', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b']]], ['a', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b']]], ['bar', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]], ['baz', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]], ['a', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL), ['foo' => ['b' => 'a', 'b'], 'index' => 'b']]];
}
public function getCompileData()
{
- return [['$foo[0]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(0), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL)], ['$foo["b"]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL)], ['$foo->foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL), ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\Obj()]], ['$foo->foo(["b" => "a", 0 => "b"])', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\Obj()]], ['$foo[$index]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('index'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL)]];
+ return [['$foo[0]', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], ['$foo["b"]', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], ['$foo->foo', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]], ['$foo->foo(["b" => "a", 0 => "b"])', new GetAttrNode(new NameNode('foo'), new ConstantNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]], ['$foo[$index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)]];
}
public function getDumpData()
{
- return [['foo[0]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(0), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL)], ['foo["b"]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL)], ['foo.foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL), ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\Obj()]], ['foo.foo({"b": "a", 0: "b"})', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), ['foo' => new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\Obj()]], ['foo[index]', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('index'), $this->getArrayNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL)]];
+ return [['foo[0]', new GetAttrNode(new NameNode('foo'), new ConstantNode(0), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], ['foo["b"]', new GetAttrNode(new NameNode('foo'), new ConstantNode('b'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)], ['foo.foo', new GetAttrNode(new NameNode('foo'), new NameNode('foo'), $this->getArrayNode(), GetAttrNode::PROPERTY_CALL), ['foo' => new Obj()]], ['foo.foo({"b": "a", 0: "b"})', new GetAttrNode(new NameNode('foo'), new NameNode('foo'), $this->getArrayNode(), GetAttrNode::METHOD_CALL), ['foo' => new Obj()]], ['foo[index]', new GetAttrNode(new NameNode('foo'), new NameNode('index'), $this->getArrayNode(), GetAttrNode::ARRAY_CALL)]];
}
protected function getArrayNode()
{
- $array = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
- $array->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('b'));
+ $array = new ArrayNode();
+ $array->addElement(new ConstantNode('a'), new ConstantNode('b'));
+ $array->addElement(new ConstantNode('b'));
return $array;
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/NameNodeTest.php b/vendor/symfony/expression-language/Tests/Node/NameNodeTest.php
index 9d58d3a22..5aaebc341 100644
--- a/vendor/symfony/expression-language/Tests/Node/NameNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/NameNodeTest.php
@@ -11,18 +11,18 @@
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode;
-class NameNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+class NameNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- return [['bar', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), ['foo' => 'bar']]];
+ return [['bar', new NameNode('foo'), ['foo' => 'bar']]];
}
public function getCompileData()
{
- return [['$foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo')]];
+ return [['$foo', new NameNode('foo')]];
}
public function getDumpData()
{
- return [['foo', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo')]];
+ return [['foo', new NameNode('foo')]];
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/NodeTest.php b/vendor/symfony/expression-language/Tests/Node/NodeTest.php
index e220d4008..d6a3ff5c8 100644
--- a/vendor/symfony/expression-language/Tests/Node/NodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/NodeTest.php
@@ -13,11 +13,14 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node;
-class NodeTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function serialize;
+use function unserialize;
+
+class NodeTest extends TestCase
{
public function testToString()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node([new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo')]);
+ $node = new Node([new ConstantNode('foo')]);
$this->assertEquals(<<<'EOF'
Node(
ConstantNode(value: 'foo')
@@ -27,9 +30,9 @@ public function testToString()
}
public function testSerialization()
{
- $node = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node(['foo' => 'bar'], ['bar' => 'foo']);
- $serializedNode = \serialize($node);
- $unserializedNode = \unserialize($serializedNode);
+ $node = new Node(['foo' => 'bar'], ['bar' => 'foo']);
+ $serializedNode = serialize($node);
+ $unserializedNode = unserialize($serializedNode);
$this->assertEquals($node, $unserializedNode);
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/UnaryNodeTest.php b/vendor/symfony/expression-language/Tests/Node/UnaryNodeTest.php
index f10a76771..5abf617d7 100644
--- a/vendor/symfony/expression-language/Tests/Node/UnaryNodeTest.php
+++ b/vendor/symfony/expression-language/Tests/Node/UnaryNodeTest.php
@@ -12,18 +12,18 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode;
-class UnaryNodeTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Tests\Node\AbstractNodeTest
+class UnaryNodeTest extends AbstractNodeTest
{
public function getEvaluateData()
{
- return [[-1, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], [3, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('+', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('!', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], [\false, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('not', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))]];
+ return [[-1, new UnaryNode('-', new ConstantNode(1))], [3, new UnaryNode('+', new ConstantNode(3))], [false, new UnaryNode('!', new ConstantNode(true))], [false, new UnaryNode('not', new ConstantNode(true))]];
}
public function getCompileData()
{
- return [['(-1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(+3)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('+', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3))], ['(!true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('!', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], ['(!true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('not', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))]];
+ return [['(-1)', new UnaryNode('-', new ConstantNode(1))], ['(+3)', new UnaryNode('+', new ConstantNode(3))], ['(!true)', new UnaryNode('!', new ConstantNode(true))], ['(!true)', new UnaryNode('not', new ConstantNode(true))]];
}
public function getDumpData()
{
- return [['(- 1)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(1))], ['(+ 3)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('+', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3))], ['(! true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('!', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))], ['(not true)', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('not', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true))]];
+ return [['(- 1)', new UnaryNode('-', new ConstantNode(1))], ['(+ 3)', new UnaryNode('+', new ConstantNode(3))], ['(! true)', new UnaryNode('!', new ConstantNode(true))], ['(not true)', new UnaryNode('not', new ConstantNode(true))]];
}
}
diff --git a/vendor/symfony/expression-language/Tests/Node/index.php b/vendor/symfony/expression-language/Tests/Node/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Tests/Node/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Tests/ParsedExpressionTest.php b/vendor/symfony/expression-language/Tests/ParsedExpressionTest.php
index 054ed46a1..137771210 100644
--- a/vendor/symfony/expression-language/Tests/ParsedExpressionTest.php
+++ b/vendor/symfony/expression-language/Tests/ParsedExpressionTest.php
@@ -13,13 +13,16 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression;
-class ParsedExpressionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function serialize;
+use function unserialize;
+
+class ParsedExpressionTest extends TestCase
{
public function testSerialization()
{
- $expression = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression('25', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('25'));
- $serializedExpression = \serialize($expression);
- $unserializedExpression = \unserialize($serializedExpression);
+ $expression = new ParsedExpression('25', new ConstantNode('25'));
+ $serializedExpression = serialize($expression);
+ $unserializedExpression = unserialize($serializedExpression);
$this->assertEquals($expression, $unserializedExpression);
}
}
diff --git a/vendor/symfony/expression-language/Tests/ParserCache/ParserCacheAdapterTest.php b/vendor/symfony/expression-language/Tests/ParserCache/ParserCacheAdapterTest.php
index e5bef075c..938d0f030 100644
--- a/vendor/symfony/expression-language/Tests/ParserCache/ParserCacheAdapterTest.php
+++ b/vendor/symfony/expression-language/Tests/ParserCache/ParserCacheAdapterTest.php
@@ -14,29 +14,31 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter;
+use BadMethodCallException;
+
/**
* @group legacy
*/
-class ParserCacheAdapterTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ParserCacheAdapterTest extends TestCase
{
public function testGetItem()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
$key = 'key';
$value = 'value';
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
$poolMock->expects($this->once())->method('fetch')->with($key)->willReturn($value);
$cacheItem = $parserCacheAdapter->getItem($key);
$this->assertEquals($cacheItem->get(), $value);
- $this->assertEquals($cacheItem->isHit(), \true);
+ $this->assertEquals($cacheItem->isHit(), true);
}
public function testSave()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
$cacheItemMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemInterface')->getMock();
$key = 'key';
- $value = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParsedExpression('1 + 1', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\Node([], []));
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
+ $value = new ParsedExpression('1 + 1', new Node([], []));
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
$poolMock->expects($this->once())->method('save')->with($key, $value);
$cacheItemMock->expects($this->once())->method('getKey')->willReturn($key);
$cacheItemMock->expects($this->once())->method('get')->willReturn($value);
@@ -45,54 +47,54 @@ public function testSave()
public function testGetItems()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
- $this->expectException(\BadMethodCallException::class);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->getItems();
}
public function testHasItem()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
$key = 'key';
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
- $this->expectException(\BadMethodCallException::class);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->hasItem($key);
}
public function testClear()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
- $this->expectException(\BadMethodCallException::class);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->clear();
}
public function testDeleteItem()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
$key = 'key';
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
- $this->expectException(\BadMethodCallException::class);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->deleteItem($key);
}
public function testDeleteItems()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
$keys = ['key'];
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
- $this->expectException(\BadMethodCallException::class);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->deleteItems($keys);
}
public function testSaveDeferred()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
$cacheItemMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Psr\\Cache\\CacheItemInterface')->getMock();
- $this->expectException(\BadMethodCallException::class);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->saveDeferred($cacheItemMock);
}
public function testCommit()
{
$poolMock = $this->getMockBuilder('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\ParserCache\\ParserCacheInterface')->getMock();
- $parserCacheAdapter = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\ParserCache\ParserCacheAdapter($poolMock);
- $this->expectException(\BadMethodCallException::class);
+ $parserCacheAdapter = new ParserCacheAdapter($poolMock);
+ $this->expectException(BadMethodCallException::class);
$parserCacheAdapter->commit();
}
}
diff --git a/vendor/symfony/expression-language/Tests/ParserCache/index.php b/vendor/symfony/expression-language/Tests/ParserCache/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Tests/ParserCache/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Tests/ParserTest.php b/vendor/symfony/expression-language/Tests/ParserTest.php
index 14b20a3fc..670b878bd 100644
--- a/vendor/symfony/expression-language/Tests/ParserTest.php
+++ b/vendor/symfony/expression-language/Tests/ParserTest.php
@@ -13,23 +13,31 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode;
+use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode;
use _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser;
-class ParserTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ParserTest extends TestCase
{
public function testParseWithInvalidName()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\SyntaxError');
$this->expectExceptionMessage('Variable "foo" is not valid around position 1 for expression `foo`.');
- $lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
- $parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser([]);
+ $lexer = new Lexer();
+ $parser = new Parser([]);
$parser->parse($lexer->tokenize('foo'));
}
public function testParseWithZeroInNames()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\SyntaxError');
$this->expectExceptionMessage('Variable "foo" is not valid around position 1 for expression `foo`.');
- $lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
- $parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser([]);
+ $lexer = new Lexer();
+ $parser = new Parser([]);
$parser->parse($lexer->tokenize('foo'), [0]);
}
/**
@@ -37,46 +45,46 @@ public function testParseWithZeroInNames()
*/
public function testParse($node, $expression, $names = [])
{
- $lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
- $parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser([]);
+ $lexer = new Lexer();
+ $parser = new Parser([]);
$this->assertEquals($node, $parser->parse($lexer->tokenize($expression), $names));
}
public function getParseData()
{
- $arguments = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode();
- $arguments->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('arg1'));
- $arguments->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2));
- $arguments->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true));
- $arrayNode = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArrayNode();
- $arrayNode->addElement(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('bar'));
+ $arguments = new ArgumentsNode();
+ $arguments->addElement(new ConstantNode('arg1'));
+ $arguments->addElement(new ConstantNode(2));
+ $arguments->addElement(new ConstantNode(true));
+ $arrayNode = new ArrayNode();
+ $arrayNode->addElement(new NameNode('bar'));
return [
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('a'), 'a', ['a']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('a'), '"a"'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3), '3'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false), 'false'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), 'true'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(null), 'null'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3)), '-3'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3)), '3 - 3'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('*', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('-', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3)), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(2)), '(3 - 3) * 2'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('bar', \true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL), 'foo.bar', ['foo']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('bar', \true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), 'foo.bar()', ['foo']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('not', \true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), 'foo.not()', ['foo']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('bar', \true), $arguments, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), 'foo.bar("arg1", 2, true)', ['foo']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(3), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL), 'foo[3]', ['foo']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConditionalNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode(\false)), 'true ? true : false'],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('matches', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('/foo/')), '"foo" matches "/foo/"'],
+ [new NameNode('a'), 'a', ['a']],
+ [new ConstantNode('a'), '"a"'],
+ [new ConstantNode(3), '3'],
+ [new ConstantNode(false), 'false'],
+ [new ConstantNode(true), 'true'],
+ [new ConstantNode(null), 'null'],
+ [new UnaryNode('-', new ConstantNode(3)), '-3'],
+ [new BinaryNode('-', new ConstantNode(3), new ConstantNode(3)), '3 - 3'],
+ [new BinaryNode('*', new BinaryNode('-', new ConstantNode(3), new ConstantNode(3)), new ConstantNode(2)), '(3 - 3) * 2'],
+ [new GetAttrNode(new NameNode('foo'), new ConstantNode('bar', true), new ArgumentsNode(), GetAttrNode::PROPERTY_CALL), 'foo.bar', ['foo']],
+ [new GetAttrNode(new NameNode('foo'), new ConstantNode('bar', true), new ArgumentsNode(), GetAttrNode::METHOD_CALL), 'foo.bar()', ['foo']],
+ [new GetAttrNode(new NameNode('foo'), new ConstantNode('not', true), new ArgumentsNode(), GetAttrNode::METHOD_CALL), 'foo.not()', ['foo']],
+ [new GetAttrNode(new NameNode('foo'), new ConstantNode('bar', true), $arguments, GetAttrNode::METHOD_CALL), 'foo.bar("arg1", 2, true)', ['foo']],
+ [new GetAttrNode(new NameNode('foo'), new ConstantNode(3), new ArgumentsNode(), GetAttrNode::ARRAY_CALL), 'foo[3]', ['foo']],
+ [new ConditionalNode(new ConstantNode(true), new ConstantNode(true), new ConstantNode(false)), 'true ? true : false'],
+ [new BinaryNode('matches', new ConstantNode('foo'), new ConstantNode('/foo/')), '"foo" matches "/foo/"'],
// chained calls
- [$this->createGetAttrNode($this->createGetAttrNode($this->createGetAttrNode($this->createGetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), 'bar', \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), 'foo', \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::METHOD_CALL), 'baz', \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL), '3', \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL), 'foo.bar().foo().baz[3]', ['foo']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), 'bar', ['foo' => 'bar']],
+ [$this->createGetAttrNode($this->createGetAttrNode($this->createGetAttrNode($this->createGetAttrNode(new NameNode('foo'), 'bar', GetAttrNode::METHOD_CALL), 'foo', GetAttrNode::METHOD_CALL), 'baz', GetAttrNode::PROPERTY_CALL), '3', GetAttrNode::ARRAY_CALL), 'foo.bar().foo().baz[3]', ['foo']],
+ [new NameNode('foo'), 'bar', ['foo' => 'bar']],
// Operators collisions
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('in', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('not', \true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL), $arrayNode), 'foo.not in [bar]', ['foo', 'bar']],
- [new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\BinaryNode('or', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\UnaryNode('not', new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo')), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode(new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\NameNode('foo'), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode('not', \true), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::PROPERTY_CALL)), 'not foo or foo.not', ['foo']],
+ [new BinaryNode('in', new GetAttrNode(new NameNode('foo'), new ConstantNode('not', true), new ArgumentsNode(), GetAttrNode::PROPERTY_CALL), $arrayNode), 'foo.not in [bar]', ['foo', 'bar']],
+ [new BinaryNode('or', new UnaryNode('not', new NameNode('foo')), new GetAttrNode(new NameNode('foo'), new ConstantNode('not', true), new ArgumentsNode(), GetAttrNode::PROPERTY_CALL)), 'not foo or foo.not', ['foo']],
];
}
private function createGetAttrNode($node, $item, $type)
{
- return new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode($node, new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ConstantNode($item, \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\GetAttrNode::ARRAY_CALL !== $type), new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Node\ArgumentsNode(), $type);
+ return new GetAttrNode($node, new ConstantNode($item, GetAttrNode::ARRAY_CALL !== $type), new ArgumentsNode(), $type);
}
/**
* @dataProvider getInvalidPostfixData
@@ -84,8 +92,8 @@ private function createGetAttrNode($node, $item, $type)
public function testParseWithInvalidPostfixData($expr, $names = [])
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\SyntaxError');
- $lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
- $parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser([]);
+ $lexer = new Lexer();
+ $parser = new Parser([]);
$parser->parse($lexer->tokenize($expr), $names);
}
public function getInvalidPostfixData()
@@ -96,8 +104,8 @@ public function testNameProposal()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\ExpressionLanguage\\SyntaxError');
$this->expectExceptionMessage('Did you mean "baz"?');
- $lexer = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Lexer();
- $parser = new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Parser([]);
+ $lexer = new Lexer();
+ $parser = new Parser([]);
$parser->parse($lexer->tokenize('foo > bar'), ['foo', 'baz']);
}
}
diff --git a/vendor/symfony/expression-language/Tests/index.php b/vendor/symfony/expression-language/Tests/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/Tests/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/expression-language/Token.php b/vendor/symfony/expression-language/Token.php
index cac2cbea2..31d5849b6 100644
--- a/vendor/symfony/expression-language/Token.php
+++ b/vendor/symfony/expression-language/Token.php
@@ -10,6 +10,9 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use function sprintf;
+use function strtoupper;
+
/**
* Represents a Token.
*
@@ -44,7 +47,7 @@ public function __construct($type, $value, $cursor)
*/
public function __toString()
{
- return \sprintf('%3d %-11s %s', $this->cursor, \strtoupper($this->type), $this->value);
+ return sprintf('%3d %-11s %s', $this->cursor, strtoupper($this->type), $this->value);
}
/**
* Tests the current token for a type and/or a value.
diff --git a/vendor/symfony/expression-language/TokenStream.php b/vendor/symfony/expression-language/TokenStream.php
index f45121b7d..d70061ee0 100644
--- a/vendor/symfony/expression-language/TokenStream.php
+++ b/vendor/symfony/expression-language/TokenStream.php
@@ -10,6 +10,9 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage;
+use function implode;
+use function sprintf;
+
/**
* Represents a token stream.
*
@@ -38,7 +41,7 @@ public function __construct(array $tokens, $expression = '')
*/
public function __toString()
{
- return \implode("\n", $this->tokens);
+ return implode("\n", $this->tokens);
}
/**
* Sets the pointer to the next token and returns the old one.
@@ -47,7 +50,7 @@ public function next()
{
++$this->position;
if (!isset($this->tokens[$this->position])) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError('Unexpected end of expression.', $this->current->cursor, $this->expression);
+ throw new SyntaxError('Unexpected end of expression.', $this->current->cursor, $this->expression);
}
$this->current = $this->tokens[$this->position];
}
@@ -62,7 +65,7 @@ public function expect($type, $value = null, $message = null)
{
$token = $this->current;
if (!$token->test($type, $value)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\SyntaxError(\sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s).', $message ? $message . '. ' : '', $token->type, $token->value, $type, $value ? \sprintf(' with value "%s"', $value) : ''), $token->cursor, $this->expression);
+ throw new SyntaxError(sprintf('%sUnexpected token "%s" of value "%s" ("%s" expected%s).', $message ? $message . '. ' : '', $token->type, $token->value, $type, $value ? sprintf(' with value "%s"', $value) : ''), $token->cursor, $this->expression);
}
$this->next();
}
@@ -73,7 +76,7 @@ public function expect($type, $value = null, $message = null)
*/
public function isEOF()
{
- return \_PhpScoper5ea00cc67502b\Symfony\Component\ExpressionLanguage\Token::EOF_TYPE === $this->current->type;
+ return Token::EOF_TYPE === $this->current->type;
}
/**
* @internal
diff --git a/vendor/symfony/expression-language/index.php b/vendor/symfony/expression-language/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/expression-language/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/filesystem/Exception/FileNotFoundException.php b/vendor/symfony/filesystem/Exception/FileNotFoundException.php
index a2c36434a..22e716869 100644
--- a/vendor/symfony/filesystem/Exception/FileNotFoundException.php
+++ b/vendor/symfony/filesystem/Exception/FileNotFoundException.php
@@ -10,21 +10,24 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception;
+use Exception;
+use function sprintf;
+
/**
* Exception class thrown when a file couldn't be found.
*
* @author Fabien Potencier
* @author Christian Gärtner
*/
-class FileNotFoundException extends \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException
+class FileNotFoundException extends IOException
{
- public function __construct($message = null, $code = 0, \Exception $previous = null, $path = null)
+ public function __construct($message = null, $code = 0, Exception $previous = null, $path = null)
{
if (null === $message) {
if (null === $path) {
$message = 'File could not be found.';
} else {
- $message = \sprintf('File "%s" could not be found.', $path);
+ $message = sprintf('File "%s" could not be found.', $path);
}
}
parent::__construct($message, $code, $previous, $path);
diff --git a/vendor/symfony/filesystem/Exception/IOException.php b/vendor/symfony/filesystem/Exception/IOException.php
index e77c6efe0..4a171cd37 100644
--- a/vendor/symfony/filesystem/Exception/IOException.php
+++ b/vendor/symfony/filesystem/Exception/IOException.php
@@ -10,6 +10,9 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception;
+use Exception;
+use RuntimeException;
+
/**
* Exception class thrown when a filesystem operation failure happens.
*
@@ -17,10 +20,10 @@
* @author Christian Gärtner
* @author Fabien Potencier
*/
-class IOException extends \RuntimeException implements \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOExceptionInterface
+class IOException extends RuntimeException implements IOExceptionInterface
{
private $path;
- public function __construct($message, $code = 0, \Exception $previous = null, $path = null)
+ public function __construct($message, $code = 0, Exception $previous = null, $path = null)
{
$this->path = $path;
parent::__construct($message, $code, $previous);
diff --git a/vendor/symfony/filesystem/Exception/IOExceptionInterface.php b/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
index f39d6e9a0..d27ca774a 100644
--- a/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
+++ b/vendor/symfony/filesystem/Exception/IOExceptionInterface.php
@@ -15,7 +15,7 @@
*
* @author Christian Gärtner
*/
-interface IOExceptionInterface extends \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\ExceptionInterface
+interface IOExceptionInterface extends ExceptionInterface
{
/**
* Returns the associated path for the exception.
diff --git a/vendor/symfony/filesystem/Exception/index.php b/vendor/symfony/filesystem/Exception/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/filesystem/Exception/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/filesystem/Filesystem.php b/vendor/symfony/filesystem/Filesystem.php
index fb1127221..da9444858 100644
--- a/vendor/symfony/filesystem/Filesystem.php
+++ b/vendor/symfony/filesystem/Filesystem.php
@@ -12,6 +12,79 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException;
+use Exception;
+use FilesystemIterator;
+use RecursiveDirectoryIterator;
+use RecursiveIteratorIterator;
+use Throwable;
+use Traversable;
+use function array_pop;
+use function array_reverse;
+use function array_slice;
+use function basename;
+use function call_user_func_array;
+use function chgrp;
+use function chmod;
+use function chown;
+use function count;
+use function ctype_alpha;
+use function defined;
+use function dirname;
+use function explode;
+use function fclose;
+use function file_exists;
+use function file_put_contents;
+use function fileinode;
+use function filemtime;
+use function fileperms;
+use function filesize;
+use function fopen;
+use function func_get_args;
+use function function_exists;
+use function implode;
+use function is_array;
+use function is_dir;
+use function is_file;
+use function is_link;
+use function is_readable;
+use function is_writable;
+use function iterator_to_array;
+use function lchgrp;
+use function lchown;
+use function mt_rand;
+use function parse_url;
+use function posix_getgrnam;
+use function readlink;
+use function realpath;
+use function rename;
+use function restore_error_handler;
+use function rtrim;
+use function set_error_handler;
+use function sprintf;
+use function str_repeat;
+use function str_replace;
+use function stream_context_create;
+use function stream_copy_to_stream;
+use function stream_is_local;
+use function stripos;
+use function strlen;
+use function strpos;
+use function strspn;
+use function strtr;
+use function substr;
+use function tempnam;
+use function touch;
+use function trigger_error;
+use function trim;
+use function umask;
+use function uniqid;
+use const DIRECTORY_SEPARATOR;
+use const E_USER_DEPRECATED;
+use const FILE_APPEND;
+use const PHP_MAXPATHLEN;
+use const PHP_URL_HOST;
+use const PHP_URL_SCHEME;
+
/**
* Provides basic utility to manipulate the file system.
*
@@ -34,38 +107,38 @@ class Filesystem
* @throws FileNotFoundException When originFile doesn't exist
* @throws IOException When copy fails
*/
- public function copy($originFile, $targetFile, $overwriteNewerFiles = \false)
+ public function copy($originFile, $targetFile, $overwriteNewerFiles = false)
{
- $originIsLocal = \stream_is_local($originFile) || 0 === \stripos($originFile, 'file://');
- if ($originIsLocal && !\is_file($originFile)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException(\sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
+ $originIsLocal = stream_is_local($originFile) || 0 === stripos($originFile, 'file://');
+ if ($originIsLocal && !is_file($originFile)) {
+ throw new FileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
}
- $this->mkdir(\dirname($targetFile));
- $doCopy = \true;
- if (!$overwriteNewerFiles && null === \parse_url($originFile, \PHP_URL_HOST) && \is_file($targetFile)) {
- $doCopy = \filemtime($originFile) > \filemtime($targetFile);
+ $this->mkdir(dirname($targetFile));
+ $doCopy = true;
+ if (!$overwriteNewerFiles && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) {
+ $doCopy = filemtime($originFile) > filemtime($targetFile);
}
if ($doCopy) {
// https://bugs.php.net/64634
- if (\false === ($source = @\fopen($originFile, 'r'))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
+ if (false === ($source = @fopen($originFile, 'r'))) {
+ throw new IOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading.', $originFile, $targetFile), 0, null, $originFile);
}
// Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
- if (\false === ($target = @\fopen($targetFile, 'w', null, \stream_context_create(['ftp' => ['overwrite' => \true]])))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);
+ if (false === ($target = @fopen($targetFile, 'w', null, stream_context_create(['ftp' => ['overwrite' => true]])))) {
+ throw new IOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing.', $originFile, $targetFile), 0, null, $originFile);
}
- $bytesCopied = \stream_copy_to_stream($source, $target);
- \fclose($source);
- \fclose($target);
+ $bytesCopied = stream_copy_to_stream($source, $target);
+ fclose($source);
+ fclose($target);
unset($source, $target);
- if (!\is_file($targetFile)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile);
+ if (!is_file($targetFile)) {
+ throw new IOException(sprintf('Failed to copy "%s" to "%s".', $originFile, $targetFile), 0, null, $originFile);
}
if ($originIsLocal) {
// Like `cp`, preserve executable permission bits
- @\chmod($targetFile, \fileperms($targetFile) | \fileperms($originFile) & 0111);
- if ($bytesCopied !== ($bytesOrigin = \filesize($originFile))) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
+ @chmod($targetFile, fileperms($targetFile) | fileperms($originFile) & 0111);
+ if ($bytesCopied !== ($bytesOrigin = filesize($originFile))) {
+ throw new IOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
}
}
}
@@ -81,16 +154,16 @@ public function copy($originFile, $targetFile, $overwriteNewerFiles = \false)
public function mkdir($dirs, $mode = 0777)
{
foreach ($this->toIterable($dirs) as $dir) {
- if (\is_dir($dir)) {
+ if (is_dir($dir)) {
continue;
}
- if (!self::box('mkdir', $dir, $mode, \true)) {
- if (!\is_dir($dir)) {
+ if (!self::box('mkdir', $dir, $mode, true)) {
+ if (!is_dir($dir)) {
// The directory was not created by a concurrent process. Let's throw an exception with a developer friendly error message if we have one
if (self::$lastError) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to create "%s": %s.', $dir, self::$lastError), 0, null, $dir);
+ throw new IOException(sprintf('Failed to create "%s": %s.', $dir, self::$lastError), 0, null, $dir);
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to create "%s".', $dir), 0, null, $dir);
+ throw new IOException(sprintf('Failed to create "%s".', $dir), 0, null, $dir);
}
}
}
@@ -104,16 +177,16 @@ public function mkdir($dirs, $mode = 0777)
*/
public function exists($files)
{
- $maxPathLength = \PHP_MAXPATHLEN - 2;
+ $maxPathLength = PHP_MAXPATHLEN - 2;
foreach ($this->toIterable($files) as $file) {
- if (\strlen($file) > $maxPathLength) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
+ if (strlen($file) > $maxPathLength) {
+ throw new IOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
}
- if (!\file_exists($file)) {
- return \false;
+ if (!file_exists($file)) {
+ return false;
}
}
- return \true;
+ return true;
}
/**
* Sets access and modification time of file.
@@ -127,9 +200,9 @@ public function exists($files)
public function touch($files, $time = null, $atime = null)
{
foreach ($this->toIterable($files) as $file) {
- $touch = $time ? @\touch($file, $time, $atime) : @\touch($file);
- if (\true !== $touch) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to touch "%s".', $file), 0, null, $file);
+ $touch = $time ? @touch($file, $time, $atime) : @touch($file);
+ if (true !== $touch) {
+ throw new IOException(sprintf('Failed to touch "%s".', $file), 0, null, $file);
}
}
}
@@ -142,25 +215,25 @@ public function touch($files, $time = null, $atime = null)
*/
public function remove($files)
{
- if ($files instanceof \Traversable) {
- $files = \iterator_to_array($files, \false);
- } elseif (!\is_array($files)) {
+ if ($files instanceof Traversable) {
+ $files = iterator_to_array($files, false);
+ } elseif (!is_array($files)) {
$files = [$files];
}
- $files = \array_reverse($files);
+ $files = array_reverse($files);
foreach ($files as $file) {
- if (\is_link($file)) {
+ if (is_link($file)) {
// See https://bugs.php.net/52176
- if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && \file_exists($file)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to remove symlink "%s": %s.', $file, self::$lastError));
+ if (!(self::box('unlink', $file) || '\\' !== DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
+ throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, self::$lastError));
}
- } elseif (\is_dir($file)) {
- $this->remove(new \FilesystemIterator($file, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));
- if (!self::box('rmdir', $file) && \file_exists($file)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to remove directory "%s": %s.', $file, self::$lastError));
+ } elseif (is_dir($file)) {
+ $this->remove(new FilesystemIterator($file, FilesystemIterator::CURRENT_AS_PATHNAME | FilesystemIterator::SKIP_DOTS));
+ if (!self::box('rmdir', $file) && file_exists($file)) {
+ throw new IOException(sprintf('Failed to remove directory "%s": %s.', $file, self::$lastError));
}
- } elseif (!self::box('unlink', $file) && \file_exists($file)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to remove file "%s": %s.', $file, self::$lastError));
+ } elseif (!self::box('unlink', $file) && file_exists($file)) {
+ throw new IOException(sprintf('Failed to remove file "%s": %s.', $file, self::$lastError));
}
}
}
@@ -174,14 +247,14 @@ public function remove($files)
*
* @throws IOException When the change fails
*/
- public function chmod($files, $mode, $umask = 00, $recursive = \false)
+ public function chmod($files, $mode, $umask = 00, $recursive = false)
{
foreach ($this->toIterable($files) as $file) {
- if (\true !== @\chmod($file, $mode & ~$umask)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to chmod file "%s".', $file), 0, null, $file);
+ if (true !== @chmod($file, $mode & ~$umask)) {
+ throw new IOException(sprintf('Failed to chmod file "%s".', $file), 0, null, $file);
}
- if ($recursive && \is_dir($file) && !\is_link($file)) {
- $this->chmod(new \FilesystemIterator($file), $mode, $umask, \true);
+ if ($recursive && is_dir($file) && !is_link($file)) {
+ $this->chmod(new FilesystemIterator($file), $mode, $umask, true);
}
}
}
@@ -194,19 +267,19 @@ public function chmod($files, $mode, $umask = 00, $recursive = \false)
*
* @throws IOException When the change fails
*/
- public function chown($files, $user, $recursive = \false)
+ public function chown($files, $user, $recursive = false)
{
foreach ($this->toIterable($files) as $file) {
- if ($recursive && \is_dir($file) && !\is_link($file)) {
- $this->chown(new \FilesystemIterator($file), $user, \true);
+ if ($recursive && is_dir($file) && !is_link($file)) {
+ $this->chown(new FilesystemIterator($file), $user, true);
}
- if (\is_link($file) && \function_exists('lchown')) {
- if (\true !== @\lchown($file, $user)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to chown file "%s".', $file), 0, null, $file);
+ if (is_link($file) && function_exists('lchown')) {
+ if (true !== @lchown($file, $user)) {
+ throw new IOException(sprintf('Failed to chown file "%s".', $file), 0, null, $file);
}
} else {
- if (\true !== @\chown($file, $user)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to chown file "%s".', $file), 0, null, $file);
+ if (true !== @chown($file, $user)) {
+ throw new IOException(sprintf('Failed to chown file "%s".', $file), 0, null, $file);
}
}
}
@@ -220,19 +293,19 @@ public function chown($files, $user, $recursive = \false)
*
* @throws IOException When the change fails
*/
- public function chgrp($files, $group, $recursive = \false)
+ public function chgrp($files, $group, $recursive = false)
{
foreach ($this->toIterable($files) as $file) {
- if ($recursive && \is_dir($file) && !\is_link($file)) {
- $this->chgrp(new \FilesystemIterator($file), $group, \true);
+ if ($recursive && is_dir($file) && !is_link($file)) {
+ $this->chgrp(new FilesystemIterator($file), $group, true);
}
- if (\is_link($file) && \function_exists('lchgrp')) {
- if (\true !== @\lchgrp($file, $group) || \defined('HHVM_VERSION') && !\posix_getgrnam($group)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
+ if (is_link($file) && function_exists('lchgrp')) {
+ if (true !== @lchgrp($file, $group) || defined('HHVM_VERSION') && !posix_getgrnam($group)) {
+ throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
}
} else {
- if (\true !== @\chgrp($file, $group)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
+ if (true !== @chgrp($file, $group)) {
+ throw new IOException(sprintf('Failed to chgrp file "%s".', $file), 0, null, $file);
}
}
}
@@ -247,20 +320,20 @@ public function chgrp($files, $group, $recursive = \false)
* @throws IOException When target file or directory already exists
* @throws IOException When origin cannot be renamed
*/
- public function rename($origin, $target, $overwrite = \false)
+ public function rename($origin, $target, $overwrite = false)
{
// we check that target does not exist
if (!$overwrite && $this->isReadable($target)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target);
+ throw new IOException(sprintf('Cannot rename because the target "%s" already exists.', $target), 0, null, $target);
}
- if (\true !== @\rename($origin, $target)) {
- if (\is_dir($origin)) {
+ if (true !== @rename($origin, $target)) {
+ if (is_dir($origin)) {
// See https://bugs.php.net/54097 & https://php.net/rename#113943
$this->mirror($origin, $target, null, ['override' => $overwrite, 'delete' => $overwrite]);
$this->remove($origin);
return;
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Cannot rename "%s" to "%s".', $origin, $target), 0, null, $target);
+ throw new IOException(sprintf('Cannot rename "%s" to "%s".', $origin, $target), 0, null, $target);
}
}
/**
@@ -274,11 +347,11 @@ public function rename($origin, $target, $overwrite = \false)
*/
private function isReadable($filename)
{
- $maxPathLength = \PHP_MAXPATHLEN - 2;
- if (\strlen($filename) > $maxPathLength) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
+ $maxPathLength = PHP_MAXPATHLEN - 2;
+ if (strlen($filename) > $maxPathLength) {
+ throw new IOException(sprintf('Could not check if file is readable because path length exceeds %d characters.', $maxPathLength), 0, null, $filename);
}
- return \is_readable($filename);
+ return is_readable($filename);
}
/**
* Creates a symbolic link or copy a directory.
@@ -289,19 +362,19 @@ private function isReadable($filename)
*
* @throws IOException When symlink fails
*/
- public function symlink($originDir, $targetDir, $copyOnWindows = \false)
+ public function symlink($originDir, $targetDir, $copyOnWindows = false)
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $originDir = \strtr($originDir, '/', '\\');
- $targetDir = \strtr($targetDir, '/', '\\');
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $originDir = strtr($originDir, '/', '\\');
+ $targetDir = strtr($targetDir, '/', '\\');
if ($copyOnWindows) {
$this->mirror($originDir, $targetDir);
return;
}
}
- $this->mkdir(\dirname($targetDir));
- if (\is_link($targetDir)) {
- if (\readlink($targetDir) === $originDir) {
+ $this->mkdir(dirname($targetDir));
+ if (is_link($targetDir)) {
+ if (readlink($targetDir) === $originDir) {
return;
}
$this->remove($targetDir);
@@ -322,14 +395,14 @@ public function symlink($originDir, $targetDir, $copyOnWindows = \false)
public function hardlink($originFile, $targetFiles)
{
if (!$this->exists($originFile)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException(null, 0, null, $originFile);
+ throw new FileNotFoundException(null, 0, null, $originFile);
}
- if (!\is_file($originFile)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException(\sprintf('Origin file "%s" is not a file.', $originFile));
+ if (!is_file($originFile)) {
+ throw new FileNotFoundException(sprintf('Origin file "%s" is not a file.', $originFile));
}
foreach ($this->toIterable($targetFiles) as $targetFile) {
- if (\is_file($targetFile)) {
- if (\fileinode($originFile) === \fileinode($targetFile)) {
+ if (is_file($targetFile)) {
+ if (fileinode($originFile) === fileinode($targetFile)) {
continue;
}
$this->remove($targetFile);
@@ -347,11 +420,11 @@ public function hardlink($originFile, $targetFiles)
private function linkException($origin, $target, $linkType)
{
if (self::$lastError) {
- if ('\\' === \DIRECTORY_SEPARATOR && \false !== \strpos(self::$lastError, 'error code(1314)')) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
+ if ('\\' === DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
+ throw new IOException(sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
}
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to create "%s" link from "%s" to "%s".', $linkType, $origin, $target), 0, null, $target);
+ throw new IOException(sprintf('Failed to create "%s" link from "%s" to "%s".', $linkType, $origin, $target), 0, null, $target);
}
/**
* Resolves links in paths.
@@ -369,24 +442,24 @@ private function linkException($origin, $target, $linkType)
*
* @return string|null
*/
- public function readlink($path, $canonicalize = \false)
+ public function readlink($path, $canonicalize = false)
{
- if (!$canonicalize && !\is_link($path)) {
+ if (!$canonicalize && !is_link($path)) {
return null;
}
if ($canonicalize) {
if (!$this->exists($path)) {
return null;
}
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $path = \readlink($path);
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $path = readlink($path);
}
- return \realpath($path);
+ return realpath($path);
}
- if ('\\' === \DIRECTORY_SEPARATOR) {
- return \realpath($path);
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ return realpath($path);
}
- return \readlink($path);
+ return readlink($path);
}
/**
* Given an existing path, convert it to a path relative to a given starting path.
@@ -399,29 +472,29 @@ public function readlink($path, $canonicalize = \false)
public function makePathRelative($endPath, $startPath)
{
if (!$this->isAbsolutePath($endPath) || !$this->isAbsolutePath($startPath)) {
- @\trigger_error(\sprintf('Support for passing relative paths to %s() is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), \E_USER_DEPRECATED);
+ @trigger_error(sprintf('Support for passing relative paths to %s() is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
}
// Normalize separators on Windows
- if ('\\' === \DIRECTORY_SEPARATOR) {
- $endPath = \str_replace('\\', '/', $endPath);
- $startPath = \str_replace('\\', '/', $startPath);
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ $endPath = str_replace('\\', '/', $endPath);
+ $startPath = str_replace('\\', '/', $startPath);
}
$stripDriveLetter = function ($path) {
- if (\strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && \ctype_alpha($path[0])) {
- return \substr($path, 2);
+ if (strlen($path) > 2 && ':' === $path[1] && '/' === $path[2] && ctype_alpha($path[0])) {
+ return substr($path, 2);
}
return $path;
};
$endPath = $stripDriveLetter($endPath);
$startPath = $stripDriveLetter($startPath);
// Split the paths into arrays
- $startPathArr = \explode('/', \trim($startPath, '/'));
- $endPathArr = \explode('/', \trim($endPath, '/'));
+ $startPathArr = explode('/', trim($startPath, '/'));
+ $endPathArr = explode('/', trim($endPath, '/'));
$normalizePathArray = function ($pathSegments, $absolute) {
$result = [];
foreach ($pathSegments as $segment) {
- if ('..' === $segment && ($absolute || \count($result))) {
- \array_pop($result);
+ if ('..' === $segment && ($absolute || count($result))) {
+ array_pop($result);
} elseif ('.' !== $segment) {
$result[] = $segment;
}
@@ -436,14 +509,14 @@ public function makePathRelative($endPath, $startPath)
++$index;
}
// Determine how deep the start path is relative to the common path (ie, "web/bundles" = 2 levels)
- if (1 === \count($startPathArr) && '' === $startPathArr[0]) {
+ if (1 === count($startPathArr) && '' === $startPathArr[0]) {
$depth = 0;
} else {
- $depth = \count($startPathArr) - $index;
+ $depth = count($startPathArr) - $index;
}
// Repeated "../" for each level need to reach the common path
- $traverser = \str_repeat('../', $depth);
- $endPathRemainder = \implode('/', \array_slice($endPathArr, $index));
+ $traverser = str_repeat('../', $depth);
+ $endPathRemainder = implode('/', array_slice($endPathArr, $index));
// Construct $endPath from traversing to the common path, then to the remaining $endPath
$relativePath = $traverser . ('' !== $endPathRemainder ? $endPathRemainder . '/' : '');
return '' === $relativePath ? './' : $relativePath;
@@ -458,7 +531,7 @@ public function makePathRelative($endPath, $startPath)
*
* @param string $originDir The origin directory
* @param string $targetDir The target directory
- * @param \Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created
+ * @param Traversable|null $iterator Iterator that filters which files and directories to copy, if null a recursive iterator is created
* @param array $options An array of boolean options
* Valid options are:
* - $options['override'] If true, target files newer than origin files are overwritten (see copy(), defaults to false)
@@ -467,56 +540,56 @@ public function makePathRelative($endPath, $startPath)
*
* @throws IOException When file type is unknown
*/
- public function mirror($originDir, $targetDir, \Traversable $iterator = null, $options = [])
+ public function mirror($originDir, $targetDir, Traversable $iterator = null, $options = [])
{
- $targetDir = \rtrim($targetDir, '/\\');
- $originDir = \rtrim($originDir, '/\\');
- $originDirLen = \strlen($originDir);
+ $targetDir = rtrim($targetDir, '/\\');
+ $originDir = rtrim($originDir, '/\\');
+ $originDirLen = strlen($originDir);
// Iterate in destination folder to remove obsolete entries
if ($this->exists($targetDir) && isset($options['delete']) && $options['delete']) {
$deleteIterator = $iterator;
if (null === $deleteIterator) {
- $flags = \FilesystemIterator::SKIP_DOTS;
- $deleteIterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($targetDir, $flags), \RecursiveIteratorIterator::CHILD_FIRST);
+ $flags = FilesystemIterator::SKIP_DOTS;
+ $deleteIterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($targetDir, $flags), RecursiveIteratorIterator::CHILD_FIRST);
}
- $targetDirLen = \strlen($targetDir);
+ $targetDirLen = strlen($targetDir);
foreach ($deleteIterator as $file) {
- $origin = $originDir . \substr($file->getPathname(), $targetDirLen);
+ $origin = $originDir . substr($file->getPathname(), $targetDirLen);
if (!$this->exists($origin)) {
$this->remove($file);
}
}
}
- $copyOnWindows = \false;
+ $copyOnWindows = false;
if (isset($options['copy_on_windows'])) {
$copyOnWindows = $options['copy_on_windows'];
}
if (null === $iterator) {
- $flags = $copyOnWindows ? \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS : \FilesystemIterator::SKIP_DOTS;
- $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($originDir, $flags), \RecursiveIteratorIterator::SELF_FIRST);
+ $flags = $copyOnWindows ? FilesystemIterator::SKIP_DOTS | FilesystemIterator::FOLLOW_SYMLINKS : FilesystemIterator::SKIP_DOTS;
+ $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($originDir, $flags), RecursiveIteratorIterator::SELF_FIRST);
}
if ($this->exists($originDir)) {
$this->mkdir($targetDir);
}
foreach ($iterator as $file) {
- $target = $targetDir . \substr($file->getPathname(), $originDirLen);
+ $target = $targetDir . substr($file->getPathname(), $originDirLen);
if ($copyOnWindows) {
- if (\is_file($file)) {
- $this->copy($file, $target, isset($options['override']) ? $options['override'] : \false);
- } elseif (\is_dir($file)) {
+ if (is_file($file)) {
+ $this->copy($file, $target, isset($options['override']) ? $options['override'] : false);
+ } elseif (is_dir($file)) {
$this->mkdir($target);
} else {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Unable to guess "%s" file type.', $file), 0, null, $file);
+ throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file);
}
} else {
- if (\is_link($file)) {
+ if (is_link($file)) {
$this->symlink($file->getLinkTarget(), $target);
- } elseif (\is_dir($file)) {
+ } elseif (is_dir($file)) {
$this->mkdir($target);
- } elseif (\is_file($file)) {
- $this->copy($file, $target, isset($options['override']) ? $options['override'] : \false);
+ } elseif (is_file($file)) {
+ $this->copy($file, $target, isset($options['override']) ? $options['override'] : false);
} else {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Unable to guess "%s" file type.', $file), 0, null, $file);
+ throw new IOException(sprintf('Unable to guess "%s" file type.', $file), 0, null, $file);
}
}
}
@@ -530,7 +603,7 @@ public function mirror($originDir, $targetDir, \Traversable $iterator = null, $o
*/
public function isAbsolutePath($file)
{
- return \strspn($file, '/\\', 0, 1) || \strlen($file) > 3 && \ctype_alpha($file[0]) && ':' === $file[1] && \strspn($file, '/\\', 2, 1) || null !== \parse_url($file, \PHP_URL_SCHEME);
+ return strspn($file, '/\\', 0, 1) || strlen($file) > 3 && ctype_alpha($file[0]) && ':' === $file[1] && strspn($file, '/\\', 2, 1) || null !== parse_url($file, PHP_URL_SCHEME);
}
/**
* Creates a temporary file with support for custom stream wrappers.
@@ -543,35 +616,35 @@ public function isAbsolutePath($file)
*/
public function tempnam($dir, $prefix)
{
- list($scheme, $hierarchy) = $this->getSchemeAndHierarchy($dir);
+ [$scheme, $hierarchy] = $this->getSchemeAndHierarchy($dir);
// If no scheme or scheme is "file" or "gs" (Google Cloud) create temp file in local filesystem
if (null === $scheme || 'file' === $scheme || 'gs' === $scheme) {
- $tmpFile = @\tempnam($hierarchy, $prefix);
+ $tmpFile = @tempnam($hierarchy, $prefix);
// If tempnam failed or no scheme return the filename otherwise prepend the scheme
- if (\false !== $tmpFile) {
+ if (false !== $tmpFile) {
if (null !== $scheme && 'gs' !== $scheme) {
return $scheme . '://' . $tmpFile;
}
return $tmpFile;
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException('A temporary file could not be created.');
+ throw new IOException('A temporary file could not be created.');
}
// Loop until we create a valid temp file or have reached 10 attempts
for ($i = 0; $i < 10; ++$i) {
// Create a unique filename
- $tmpFile = $dir . '/' . $prefix . \uniqid(\mt_rand(), \true);
+ $tmpFile = $dir . '/' . $prefix . uniqid(mt_rand(), true);
// Use fopen instead of file_exists as some streams do not support stat
// Use mode 'x+' to atomically check existence and create to avoid a TOCTOU vulnerability
- $handle = @\fopen($tmpFile, 'x+');
+ $handle = @fopen($tmpFile, 'x+');
// If unsuccessful restart the loop
- if (\false === $handle) {
+ if (false === $handle) {
continue;
}
// Close the file if it was successfully opened
- @\fclose($handle);
+ @fclose($handle);
return $tmpFile;
}
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException('A temporary file could not be created.');
+ throw new IOException('A temporary file could not be created.');
}
/**
* Atomically dumps content into a file.
@@ -583,21 +656,21 @@ public function tempnam($dir, $prefix)
*/
public function dumpFile($filename, $content)
{
- $dir = \dirname($filename);
- if (!\is_dir($dir)) {
+ $dir = dirname($filename);
+ if (!is_dir($dir)) {
$this->mkdir($dir);
}
- if (!\is_writable($dir)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
+ if (!is_writable($dir)) {
+ throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
}
// Will create a temp file with 0600 access rights
// when the filesystem supports chmod.
- $tmpFile = $this->tempnam($dir, \basename($filename));
- if (\false === @\file_put_contents($tmpFile, $content)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
+ $tmpFile = $this->tempnam($dir, basename($filename));
+ if (false === @file_put_contents($tmpFile, $content)) {
+ throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
}
- @\chmod($tmpFile, \file_exists($filename) ? \fileperms($filename) : 0666 & ~\umask());
- $this->rename($tmpFile, $filename, \true);
+ @chmod($tmpFile, file_exists($filename) ? fileperms($filename) : 0666 & ~umask());
+ $this->rename($tmpFile, $filename, true);
}
/**
* Appends content to an existing file.
@@ -609,25 +682,25 @@ public function dumpFile($filename, $content)
*/
public function appendToFile($filename, $content)
{
- $dir = \dirname($filename);
- if (!\is_dir($dir)) {
+ $dir = dirname($filename);
+ if (!is_dir($dir)) {
$this->mkdir($dir);
}
- if (!\is_writable($dir)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
+ if (!is_writable($dir)) {
+ throw new IOException(sprintf('Unable to write to the "%s" directory.', $dir), 0, null, $dir);
}
- if (\false === @\file_put_contents($filename, $content, \FILE_APPEND)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
+ if (false === @file_put_contents($filename, $content, FILE_APPEND)) {
+ throw new IOException(sprintf('Failed to write file "%s".', $filename), 0, null, $filename);
}
}
/**
* @param mixed $files
*
- * @return array|\Traversable
+ * @return array|Traversable
*/
private function toIterable($files)
{
- return \is_array($files) || $files instanceof \Traversable ? $files : [$files];
+ return is_array($files) || $files instanceof Traversable ? $files : [$files];
}
/**
* Gets a 2-tuple of scheme (may be null) and hierarchical part of a filename (e.g. file:///tmp -> [file, tmp]).
@@ -638,8 +711,8 @@ private function toIterable($files)
*/
private function getSchemeAndHierarchy($filename)
{
- $components = \explode('://', $filename, 2);
- return 2 === \count($components) ? [$components[0], $components[1]] : [null, $components[0]];
+ $components = explode('://', $filename, 2);
+ return 2 === count($components) ? [$components[0], $components[1]] : [null, $components[0]];
}
/**
* @param callable $func
@@ -649,15 +722,15 @@ private function getSchemeAndHierarchy($filename)
private static function box($func)
{
self::$lastError = null;
- \set_error_handler(__CLASS__ . '::handleError');
+ set_error_handler(__CLASS__ . '::handleError');
try {
- $result = \call_user_func_array($func, \array_slice(\func_get_args(), 1));
- \restore_error_handler();
+ $result = call_user_func_array($func, array_slice(func_get_args(), 1));
+ restore_error_handler();
return $result;
- } catch (\Throwable $e) {
- } catch (\Exception $e) {
+ } catch (Throwable $e) {
+ } catch (Exception $e) {
}
- \restore_error_handler();
+ restore_error_handler();
throw $e;
}
/**
diff --git a/vendor/symfony/filesystem/LockHandler.php b/vendor/symfony/filesystem/LockHandler.php
index 3623254f1..20d42c4bc 100644
--- a/vendor/symfony/filesystem/LockHandler.php
+++ b/vendor/symfony/filesystem/LockHandler.php
@@ -13,7 +13,26 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Lock\Store\FlockStore;
use _PhpScoper5ea00cc67502b\Symfony\Component\Lock\Store\SemaphoreStore;
-@\trigger_error(\sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use %s or %s instead.', \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler::class, \_PhpScoper5ea00cc67502b\Symfony\Component\Lock\Store\SemaphoreStore::class, \_PhpScoper5ea00cc67502b\Symfony\Component\Lock\Store\FlockStore::class), \E_USER_DEPRECATED);
+use function chmod;
+use function fclose;
+use function flock;
+use function fopen;
+use function hash;
+use function is_dir;
+use function is_writable;
+use function preg_replace;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use function sys_get_temp_dir;
+use function trigger_error;
+use function usleep;
+use const E_USER_DEPRECATED;
+use const LOCK_EX;
+use const LOCK_NB;
+use const LOCK_UN;
+
+@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use %s or %s instead.', LockHandler::class, SemaphoreStore::class, FlockStore::class), E_USER_DEPRECATED);
/**
* LockHandler class provides a simple abstraction to lock anything by means of
* a file lock.
@@ -41,15 +60,15 @@ class LockHandler
*/
public function __construct($name, $lockPath = null)
{
- $lockPath = $lockPath ?: \sys_get_temp_dir();
- if (!\is_dir($lockPath)) {
- $fs = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Filesystem();
+ $lockPath = $lockPath ?: sys_get_temp_dir();
+ if (!is_dir($lockPath)) {
+ $fs = new Filesystem();
$fs->mkdir($lockPath);
}
- if (!\is_writable($lockPath)) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException(\sprintf('The directory "%s" is not writable.', $lockPath), 0, null, $lockPath);
+ if (!is_writable($lockPath)) {
+ throw new IOException(sprintf('The directory "%s" is not writable.', $lockPath), 0, null, $lockPath);
}
- $this->file = \sprintf('%s/sf.%s.%s.lock', $lockPath, \preg_replace('/[^a-z0-9\\._-]+/i', '-', $name), \hash('sha256', $name));
+ $this->file = sprintf('%s/sf.%s.%s.lock', $lockPath, preg_replace('/[^a-z0-9\\._-]+/i', '-', $name), hash('sha256', $name));
}
/**
* Lock the resource.
@@ -60,37 +79,37 @@ public function __construct($name, $lockPath = null)
*
* @throws IOException If the lock file could not be created or opened
*/
- public function lock($blocking = \false)
+ public function lock($blocking = false)
{
if ($this->handle) {
- return \true;
+ return true;
}
$error = null;
// Silence error reporting
- \set_error_handler(function ($errno, $msg) use(&$error) {
+ set_error_handler(function ($errno, $msg) use(&$error) {
$error = $msg;
});
- if (!($this->handle = \fopen($this->file, 'r+') ?: \fopen($this->file, 'r'))) {
- if ($this->handle = \fopen($this->file, 'x')) {
- \chmod($this->file, 0666);
- } elseif (!($this->handle = \fopen($this->file, 'r+') ?: \fopen($this->file, 'r'))) {
- \usleep(100);
+ if (!($this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r'))) {
+ if ($this->handle = fopen($this->file, 'x')) {
+ chmod($this->file, 0666);
+ } elseif (!($this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r'))) {
+ usleep(100);
// Give some time for chmod() to complete
- $this->handle = \fopen($this->file, 'r+') ?: \fopen($this->file, 'r');
+ $this->handle = fopen($this->file, 'r+') ?: fopen($this->file, 'r');
}
}
- \restore_error_handler();
+ restore_error_handler();
if (!$this->handle) {
- throw new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException($error, 0, null, $this->file);
+ throw new IOException($error, 0, null, $this->file);
}
// On Windows, even if PHP doc says the contrary, LOCK_NB works, see
// https://bugs.php.net/54129
- if (!\flock($this->handle, \LOCK_EX | ($blocking ? 0 : \LOCK_NB))) {
- \fclose($this->handle);
+ if (!flock($this->handle, LOCK_EX | ($blocking ? 0 : LOCK_NB))) {
+ fclose($this->handle);
$this->handle = null;
- return \false;
+ return false;
}
- return \true;
+ return true;
}
/**
* Release the resource.
@@ -98,8 +117,8 @@ public function lock($blocking = \false)
public function release()
{
if ($this->handle) {
- \flock($this->handle, \LOCK_UN | \LOCK_NB);
- \fclose($this->handle);
+ flock($this->handle, LOCK_UN | LOCK_NB);
+ fclose($this->handle);
$this->handle = null;
}
}
diff --git a/vendor/symfony/filesystem/Tests/ExceptionTest.php b/vendor/symfony/filesystem/Tests/ExceptionTest.php
index fd2b19328..33c03ea02 100644
--- a/vendor/symfony/filesystem/Tests/ExceptionTest.php
+++ b/vendor/symfony/filesystem/Tests/ExceptionTest.php
@@ -16,27 +16,27 @@
/**
* Test class for Filesystem.
*/
-class ExceptionTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class ExceptionTest extends TestCase
{
public function testGetPath()
{
- $e = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException('', 0, null, '/foo');
+ $e = new IOException('', 0, null, '/foo');
$this->assertEquals('/foo', $e->getPath(), 'The pass should be returned.');
}
public function testGeneratedMessage()
{
- $e = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException(null, 0, null, '/foo');
+ $e = new FileNotFoundException(null, 0, null, '/foo');
$this->assertEquals('/foo', $e->getPath());
$this->assertEquals('File "/foo" could not be found.', $e->getMessage(), 'A message should be generated.');
}
public function testGeneratedMessageWithoutPath()
{
- $e = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException();
+ $e = new FileNotFoundException();
$this->assertEquals('File could not be found.', $e->getMessage(), 'A message should be generated.');
}
public function testCustomMessage()
{
- $e = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\FileNotFoundException('bar', 0, null, '/foo');
+ $e = new FileNotFoundException('bar', 0, null, '/foo');
$this->assertEquals('bar', $e->getMessage(), 'A custom message should be possible still.');
}
}
diff --git a/vendor/symfony/filesystem/Tests/FilesystemTest.php b/vendor/symfony/filesystem/Tests/FilesystemTest.php
index c235c2d48..1251bcb8e 100644
--- a/vendor/symfony/filesystem/Tests/FilesystemTest.php
+++ b/vendor/symfony/filesystem/Tests/FilesystemTest.php
@@ -10,16 +10,58 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Tests;
+use ArrayObject;
+use Phar;
+use function chdir;
+use function chmod;
+use function defined;
+use function exec;
+use function fclose;
+use function file_get_contents;
+use function file_put_contents;
+use function fileinode;
+use function fileperms;
+use function fopen;
+use function fseek;
+use function fwrite;
+use function getcwd;
+use function getenv;
+use function in_array;
+use function is_dir;
+use function is_file;
+use function is_link;
+use function link;
+use function mkdir;
+use function mt_rand;
+use function readlink;
+use function realpath;
+use function rmdir;
+use function rtrim;
+use function str_repeat;
+use function str_replace;
+use function stream_get_wrappers;
+use function stream_wrapper_register;
+use function strlen;
+use function symlink;
+use function sys_get_temp_dir;
+use function time;
+use function touch;
+use function umask;
+use function uniqid;
+use function unlink;
+use const DIRECTORY_SEPARATOR;
+use const PHP_MAXPATHLEN;
+
/**
* Test class for Filesystem.
*/
-class FilesystemTest extends \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Tests\FilesystemTestCase
+class FilesystemTest extends FilesystemTestCase
{
public function testCopyCreatesNewFile()
{
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
$this->filesystem->copy($sourceFilePath, $targetFilePath);
$this->assertFileExists($targetFilePath);
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
@@ -27,63 +69,63 @@ public function testCopyCreatesNewFile()
public function testCopyFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
$this->filesystem->copy($sourceFilePath, $targetFilePath);
}
public function testCopyUnreadableFileFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
// skip test on Windows; PHP can't easily set file as unreadable on Windows
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('This test cannot run on Windows.');
}
- if (!\getenv('USER') || 'root' === \getenv('USER')) {
+ if (!getenv('USER') || 'root' === getenv('USER')) {
$this->markTestSkipped('This test will fail if run under superuser');
}
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
// make sure target cannot be read
$this->filesystem->chmod($sourceFilePath, 0222);
$this->filesystem->copy($sourceFilePath, $targetFilePath);
}
public function testCopyOverridesExistingFileIfModified()
{
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
- \file_put_contents($targetFilePath, 'TARGET FILE');
- \touch($targetFilePath, \time() - 1000);
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
+ file_put_contents($targetFilePath, 'TARGET FILE');
+ touch($targetFilePath, time() - 1000);
$this->filesystem->copy($sourceFilePath, $targetFilePath);
$this->assertFileExists($targetFilePath);
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
}
public function testCopyDoesNotOverrideExistingFileByDefault()
{
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
- \file_put_contents($targetFilePath, 'TARGET FILE');
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
+ file_put_contents($targetFilePath, 'TARGET FILE');
// make sure both files have the same modification time
- $modificationTime = \time() - 1000;
- \touch($sourceFilePath, $modificationTime);
- \touch($targetFilePath, $modificationTime);
+ $modificationTime = time() - 1000;
+ touch($sourceFilePath, $modificationTime);
+ touch($targetFilePath, $modificationTime);
$this->filesystem->copy($sourceFilePath, $targetFilePath);
$this->assertFileExists($targetFilePath);
$this->assertStringEqualsFile($targetFilePath, 'TARGET FILE');
}
public function testCopyOverridesExistingFileIfForced()
{
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
- \file_put_contents($targetFilePath, 'TARGET FILE');
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
+ file_put_contents($targetFilePath, 'TARGET FILE');
// make sure both files have the same modification time
- $modificationTime = \time() - 1000;
- \touch($sourceFilePath, $modificationTime);
- \touch($targetFilePath, $modificationTime);
- $this->filesystem->copy($sourceFilePath, $targetFilePath, \true);
+ $modificationTime = time() - 1000;
+ touch($sourceFilePath, $modificationTime);
+ touch($targetFilePath, $modificationTime);
+ $this->filesystem->copy($sourceFilePath, $targetFilePath, true);
$this->assertFileExists($targetFilePath);
$this->assertStringEqualsFile($targetFilePath, 'SOURCE FILE');
}
@@ -91,30 +133,30 @@ public function testCopyWithOverrideWithReadOnlyTargetFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
// skip test on Windows; PHP can't easily set file as unwritable on Windows
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('This test cannot run on Windows.');
}
- if (!\getenv('USER') || 'root' === \getenv('USER')) {
+ if (!getenv('USER') || 'root' === getenv('USER')) {
$this->markTestSkipped('This test will fail if run under superuser');
}
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
- \file_put_contents($targetFilePath, 'TARGET FILE');
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
+ file_put_contents($targetFilePath, 'TARGET FILE');
// make sure both files have the same modification time
- $modificationTime = \time() - 1000;
- \touch($sourceFilePath, $modificationTime);
- \touch($targetFilePath, $modificationTime);
+ $modificationTime = time() - 1000;
+ touch($sourceFilePath, $modificationTime);
+ touch($targetFilePath, $modificationTime);
// make sure target is read-only
$this->filesystem->chmod($targetFilePath, 0444);
- $this->filesystem->copy($sourceFilePath, $targetFilePath, \true);
+ $this->filesystem->copy($sourceFilePath, $targetFilePath, true);
}
public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
{
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFileDirectory = $this->workspace . \DIRECTORY_SEPARATOR . 'directory';
- $targetFilePath = $targetFileDirectory . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFileDirectory = $this->workspace . DIRECTORY_SEPARATOR . 'directory';
+ $targetFilePath = $targetFileDirectory . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
$this->filesystem->copy($sourceFilePath, $targetFilePath);
$this->assertDirectoryExists($targetFileDirectory);
$this->assertFileExists($targetFilePath);
@@ -125,25 +167,25 @@ public function testCopyCreatesTargetDirectoryIfItDoesNotExist()
*/
public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
{
- if (!\in_array('https', \stream_get_wrappers())) {
+ if (!in_array('https', stream_get_wrappers())) {
$this->markTestSkipped('"https" stream wrapper is not enabled.');
}
$sourceFilePath = 'https://symfony.com/images/common/logo/logo_symfony_header.png';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($targetFilePath, 'TARGET FILE');
- $this->filesystem->copy($sourceFilePath, $targetFilePath, \false);
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($targetFilePath, 'TARGET FILE');
+ $this->filesystem->copy($sourceFilePath, $targetFilePath, false);
$this->assertFileExists($targetFilePath);
- $this->assertEquals(\file_get_contents($sourceFilePath), \file_get_contents($targetFilePath));
+ $this->assertEquals(file_get_contents($sourceFilePath), file_get_contents($targetFilePath));
}
public function testMkdirCreatesDirectoriesRecursively()
{
- $directory = $this->workspace . \DIRECTORY_SEPARATOR . 'directory' . \DIRECTORY_SEPARATOR . 'sub_directory';
+ $directory = $this->workspace . DIRECTORY_SEPARATOR . 'directory' . DIRECTORY_SEPARATOR . 'sub_directory';
$this->filesystem->mkdir($directory);
$this->assertDirectoryExists($directory);
}
public function testMkdirCreatesDirectoriesFromArray()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
$directories = [$basePath . '1', $basePath . '2', $basePath . '3'];
$this->filesystem->mkdir($directories);
$this->assertDirectoryExists($basePath . '1');
@@ -152,8 +194,8 @@ public function testMkdirCreatesDirectoriesFromArray()
}
public function testMkdirCreatesDirectoriesFromTraversableObject()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- $directories = new \ArrayObject([$basePath . '1', $basePath . '2', $basePath . '3']);
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ $directories = new ArrayObject([$basePath . '1', $basePath . '2', $basePath . '3']);
$this->filesystem->mkdir($directories);
$this->assertDirectoryExists($basePath . '1');
$this->assertDirectoryExists($basePath . '2');
@@ -162,26 +204,26 @@ public function testMkdirCreatesDirectoriesFromTraversableObject()
public function testMkdirCreatesDirectoriesFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
$dir = $basePath . '2';
- \file_put_contents($dir, '');
+ file_put_contents($dir, '');
$this->filesystem->mkdir($dir);
}
public function testTouchCreatesEmptyFile()
{
- $file = $this->workspace . \DIRECTORY_SEPARATOR . '1';
+ $file = $this->workspace . DIRECTORY_SEPARATOR . '1';
$this->filesystem->touch($file);
$this->assertFileExists($file);
}
public function testTouchFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
- $file = $this->workspace . \DIRECTORY_SEPARATOR . '1' . \DIRECTORY_SEPARATOR . '2';
+ $file = $this->workspace . DIRECTORY_SEPARATOR . '1' . DIRECTORY_SEPARATOR . '2';
$this->filesystem->touch($file);
}
public function testTouchCreatesEmptyFilesFromArray()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
$files = [$basePath . '1', $basePath . '2', $basePath . '3'];
$this->filesystem->touch($files);
$this->assertFileExists($basePath . '1');
@@ -190,8 +232,8 @@ public function testTouchCreatesEmptyFilesFromArray()
}
public function testTouchCreatesEmptyFilesFromTraversableObject()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- $files = new \ArrayObject([$basePath . '1', $basePath . '2', $basePath . '3']);
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ $files = new ArrayObject([$basePath . '1', $basePath . '2', $basePath . '3']);
$this->filesystem->touch($files);
$this->assertFileExists($basePath . '1');
$this->assertFileExists($basePath . '2');
@@ -199,18 +241,18 @@ public function testTouchCreatesEmptyFilesFromTraversableObject()
}
public function testRemoveCleansFilesAndDirectoriesIteratively()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR . 'directory' . \DIRECTORY_SEPARATOR;
- \mkdir($basePath);
- \mkdir($basePath . 'dir');
- \touch($basePath . 'file');
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR . 'directory' . DIRECTORY_SEPARATOR;
+ mkdir($basePath);
+ mkdir($basePath . 'dir');
+ touch($basePath . 'file');
$this->filesystem->remove($basePath);
$this->assertFileNotExists($basePath);
}
public function testRemoveCleansArrayOfFilesAndDirectories()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- \mkdir($basePath . 'dir');
- \touch($basePath . 'file');
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ mkdir($basePath . 'dir');
+ touch($basePath . 'file');
$files = [$basePath . 'dir', $basePath . 'file'];
$this->filesystem->remove($files);
$this->assertFileNotExists($basePath . 'dir');
@@ -218,18 +260,18 @@ public function testRemoveCleansArrayOfFilesAndDirectories()
}
public function testRemoveCleansTraversableObjectOfFilesAndDirectories()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- \mkdir($basePath . 'dir');
- \touch($basePath . 'file');
- $files = new \ArrayObject([$basePath . 'dir', $basePath . 'file']);
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ mkdir($basePath . 'dir');
+ touch($basePath . 'file');
+ $files = new ArrayObject([$basePath . 'dir', $basePath . 'file']);
$this->filesystem->remove($files);
$this->assertFileNotExists($basePath . 'dir');
$this->assertFileNotExists($basePath . 'file');
}
public function testRemoveIgnoresNonExistingFiles()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- \mkdir($basePath . 'dir');
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ mkdir($basePath . 'dir');
$files = [$basePath . 'dir', $basePath . 'file'];
$this->filesystem->remove($files);
$this->assertFileNotExists($basePath . 'dir');
@@ -237,79 +279,79 @@ public function testRemoveIgnoresNonExistingFiles()
public function testRemoveCleansInvalidLinks()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR . 'directory' . \DIRECTORY_SEPARATOR;
- \mkdir($basePath);
- \mkdir($basePath . 'dir');
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR . 'directory' . DIRECTORY_SEPARATOR;
+ mkdir($basePath);
+ mkdir($basePath . 'dir');
// create symlink to nonexistent file
- @\symlink($basePath . 'file', $basePath . 'file-link');
+ @symlink($basePath . 'file', $basePath . 'file-link');
// create symlink to dir using trailing forward slash
$this->filesystem->symlink($basePath . 'dir/', $basePath . 'dir-link');
$this->assertDirectoryExists($basePath . 'dir-link');
// create symlink to nonexistent dir
- \rmdir($basePath . 'dir');
- $this->assertFalse('\\' === \DIRECTORY_SEPARATOR ? @\readlink($basePath . 'dir-link') : \is_dir($basePath . 'dir-link'));
+ rmdir($basePath . 'dir');
+ $this->assertFalse('\\' === DIRECTORY_SEPARATOR ? @readlink($basePath . 'dir-link') : is_dir($basePath . 'dir-link'));
$this->filesystem->remove($basePath);
$this->assertFileNotExists($basePath);
}
public function testFilesExists()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR . 'directory' . \DIRECTORY_SEPARATOR;
- \mkdir($basePath);
- \touch($basePath . 'file1');
- \mkdir($basePath . 'folder');
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR . 'directory' . DIRECTORY_SEPARATOR;
+ mkdir($basePath);
+ touch($basePath . 'file1');
+ mkdir($basePath . 'folder');
$this->assertTrue($this->filesystem->exists($basePath . 'file1'));
$this->assertTrue($this->filesystem->exists($basePath . 'folder'));
}
public function testFilesExistsFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
- if ('\\' !== \DIRECTORY_SEPARATOR) {
+ if ('\\' !== DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Long file names are an issue on Windows');
}
$basePath = $this->workspace . '\\directory\\';
- $maxPathLength = \PHP_MAXPATHLEN - 2;
- $oldPath = \getcwd();
- \mkdir($basePath);
- \chdir($basePath);
- $file = \str_repeat('T', $maxPathLength - \strlen($basePath) + 1);
+ $maxPathLength = PHP_MAXPATHLEN - 2;
+ $oldPath = getcwd();
+ mkdir($basePath);
+ chdir($basePath);
+ $file = str_repeat('T', $maxPathLength - strlen($basePath) + 1);
$path = $basePath . $file;
- \exec('TYPE NUL >>' . $file);
+ exec('TYPE NUL >>' . $file);
// equivalent of touch, we can not use the php touch() here because it suffers from the same limitation
$this->longPathNamesWindows[] = $path;
// save this so we can clean up later
- \chdir($oldPath);
+ chdir($oldPath);
$this->filesystem->exists($path);
}
public function testFilesExistsTraversableObjectOfFilesAndDirectories()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- \mkdir($basePath . 'dir');
- \touch($basePath . 'file');
- $files = new \ArrayObject([$basePath . 'dir', $basePath . 'file']);
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ mkdir($basePath . 'dir');
+ touch($basePath . 'file');
+ $files = new ArrayObject([$basePath . 'dir', $basePath . 'file']);
$this->assertTrue($this->filesystem->exists($files));
}
public function testFilesNotExistsTraversableObjectOfFilesAndDirectories()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR;
- \mkdir($basePath . 'dir');
- \touch($basePath . 'file');
- \touch($basePath . 'file2');
- $files = new \ArrayObject([$basePath . 'dir', $basePath . 'file', $basePath . 'file2']);
- \unlink($basePath . 'file');
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR;
+ mkdir($basePath . 'dir');
+ touch($basePath . 'file');
+ touch($basePath . 'file2');
+ $files = new ArrayObject([$basePath . 'dir', $basePath . 'file', $basePath . 'file2']);
+ unlink($basePath . 'file');
$this->assertFalse($this->filesystem->exists($files));
}
public function testInvalidFileNotExists()
{
- $basePath = $this->workspace . \DIRECTORY_SEPARATOR . 'directory' . \DIRECTORY_SEPARATOR;
- $this->assertFalse($this->filesystem->exists($basePath . \time()));
+ $basePath = $this->workspace . DIRECTORY_SEPARATOR . 'directory' . DIRECTORY_SEPARATOR;
+ $this->assertFalse($this->filesystem->exists($basePath . time()));
}
public function testChmodChangesFileMode()
{
$this->markAsSkippedIfChmodIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
- $file = $dir . \DIRECTORY_SEPARATOR . 'file';
- \touch($file);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
+ $file = $dir . DIRECTORY_SEPARATOR . 'file';
+ touch($file);
$this->filesystem->chmod($file, 0400);
$this->filesystem->chmod($dir, 0753);
$this->assertFilePermissions(753, $dir);
@@ -318,43 +360,43 @@ public function testChmodChangesFileMode()
public function testChmodWithWrongModLeavesPreviousPermissionsUntouched()
{
$this->markAsSkippedIfChmodIsMissing();
- if (\defined('HHVM_VERSION')) {
+ if (defined('HHVM_VERSION')) {
$this->markTestSkipped('chmod() changes permissions even when passing invalid modes on HHVM');
}
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- \touch($dir);
- $permissions = \fileperms($dir);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ touch($dir);
+ $permissions = fileperms($dir);
$this->filesystem->chmod($dir, 'Wrongmode');
- $this->assertSame($permissions, \fileperms($dir));
+ $this->assertSame($permissions, fileperms($dir));
}
public function testChmodRecursive()
{
$this->markAsSkippedIfChmodIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
- $file = $dir . \DIRECTORY_SEPARATOR . 'file';
- \touch($file);
- $this->filesystem->chmod($file, 0400, 00, \true);
- $this->filesystem->chmod($dir, 0753, 00, \true);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
+ $file = $dir . DIRECTORY_SEPARATOR . 'file';
+ touch($file);
+ $this->filesystem->chmod($file, 0400, 00, true);
+ $this->filesystem->chmod($dir, 0753, 00, true);
$this->assertFilePermissions(753, $dir);
$this->assertFilePermissions(753, $file);
}
public function testChmodAppliesUmask()
{
$this->markAsSkippedIfChmodIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ touch($file);
$this->filesystem->chmod($file, 0770, 022);
$this->assertFilePermissions(750, $file);
}
public function testChmodChangesModeOfArrayOfFiles()
{
$this->markAsSkippedIfChmodIsMissing();
- $directory = $this->workspace . \DIRECTORY_SEPARATOR . 'directory';
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
+ $directory = $this->workspace . DIRECTORY_SEPARATOR . 'directory';
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
$files = [$directory, $file];
- \mkdir($directory);
- \touch($file);
+ mkdir($directory);
+ touch($file);
$this->filesystem->chmod($files, 0753);
$this->assertFilePermissions(753, $file);
$this->assertFilePermissions(753, $directory);
@@ -362,11 +404,11 @@ public function testChmodChangesModeOfArrayOfFiles()
public function testChmodChangesModeOfTraversableFileObject()
{
$this->markAsSkippedIfChmodIsMissing();
- $directory = $this->workspace . \DIRECTORY_SEPARATOR . 'directory';
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $files = new \ArrayObject([$directory, $file]);
- \mkdir($directory);
- \touch($file);
+ $directory = $this->workspace . DIRECTORY_SEPARATOR . 'directory';
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $files = new ArrayObject([$directory, $file]);
+ mkdir($directory);
+ touch($file);
$this->filesystem->chmod($files, 0753);
$this->assertFilePermissions(753, $file);
$this->assertFilePermissions(753, $directory);
@@ -374,19 +416,19 @@ public function testChmodChangesModeOfTraversableFileObject()
public function testChmodChangesZeroModeOnSubdirectoriesOnRecursive()
{
$this->markAsSkippedIfChmodIsMissing();
- $directory = $this->workspace . \DIRECTORY_SEPARATOR . 'directory';
- $subdirectory = $directory . \DIRECTORY_SEPARATOR . 'subdirectory';
- \mkdir($directory);
- \mkdir($subdirectory);
- \chmod($subdirectory, 00);
- $this->filesystem->chmod($directory, 0753, 00, \true);
+ $directory = $this->workspace . DIRECTORY_SEPARATOR . 'directory';
+ $subdirectory = $directory . DIRECTORY_SEPARATOR . 'subdirectory';
+ mkdir($directory);
+ mkdir($subdirectory);
+ chmod($subdirectory, 00);
+ $this->filesystem->chmod($directory, 0753, 00, true);
$this->assertFilePermissions(753, $subdirectory);
}
public function testChown()
{
$this->markAsSkippedIfPosixIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
$owner = $this->getFileOwner($dir);
$this->filesystem->chown($dir, $owner);
$this->assertSame($owner, $this->getFileOwner($dir));
@@ -394,20 +436,20 @@ public function testChown()
public function testChownRecursive()
{
$this->markAsSkippedIfPosixIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
- $file = $dir . \DIRECTORY_SEPARATOR . 'file';
- \touch($file);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
+ $file = $dir . DIRECTORY_SEPARATOR . 'file';
+ touch($file);
$owner = $this->getFileOwner($dir);
- $this->filesystem->chown($dir, $owner, \true);
+ $this->filesystem->chown($dir, $owner, true);
$this->assertSame($owner, $this->getFileOwner($file));
}
public function testChownSymlink()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->symlink($file, $link);
$owner = $this->getFileOwner($link);
$this->filesystem->chown($link, $owner);
@@ -416,9 +458,9 @@ public function testChownSymlink()
public function testChownLink()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->hardlink($file, $link);
$owner = $this->getFileOwner($link);
$this->filesystem->chown($link, $owner);
@@ -428,35 +470,35 @@ public function testChownSymlinkFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->symlink($file, $link);
- $this->filesystem->chown($link, 'user' . \time() . \mt_rand(1000, 9999));
+ $this->filesystem->chown($link, 'user' . time() . mt_rand(1000, 9999));
}
public function testChownLinkFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->hardlink($file, $link);
- $this->filesystem->chown($link, 'user' . \time() . \mt_rand(1000, 9999));
+ $this->filesystem->chown($link, 'user' . time() . mt_rand(1000, 9999));
}
public function testChownFail()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->markAsSkippedIfPosixIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
- $this->filesystem->chown($dir, 'user' . \time() . \mt_rand(1000, 9999));
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
+ $this->filesystem->chown($dir, 'user' . time() . mt_rand(1000, 9999));
}
public function testChgrp()
{
$this->markAsSkippedIfPosixIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
$group = $this->getFileGroup($dir);
$this->filesystem->chgrp($dir, $group);
$this->assertSame($group, $this->getFileGroup($dir));
@@ -464,20 +506,20 @@ public function testChgrp()
public function testChgrpRecursive()
{
$this->markAsSkippedIfPosixIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
- $file = $dir . \DIRECTORY_SEPARATOR . 'file';
- \touch($file);
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
+ $file = $dir . DIRECTORY_SEPARATOR . 'file';
+ touch($file);
$group = $this->getFileGroup($dir);
- $this->filesystem->chgrp($dir, $group, \true);
+ $this->filesystem->chgrp($dir, $group, true);
$this->assertSame($group, $this->getFileGroup($file));
}
public function testChgrpSymlink()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->symlink($file, $link);
$group = $this->getFileGroup($link);
$this->filesystem->chgrp($link, $group);
@@ -486,9 +528,9 @@ public function testChgrpSymlink()
public function testChgrpLink()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->hardlink($file, $link);
$group = $this->getFileGroup($link);
$this->filesystem->chgrp($link, $group);
@@ -498,35 +540,35 @@ public function testChgrpSymlinkFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->symlink($file, $link);
- $this->filesystem->chgrp($link, 'user' . \time() . \mt_rand(1000, 9999));
+ $this->filesystem->chgrp($link, 'user' . time() . mt_rand(1000, 9999));
}
public function testChgrpLinkFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->hardlink($file, $link);
- $this->filesystem->chgrp($link, 'user' . \time() . \mt_rand(1000, 9999));
+ $this->filesystem->chgrp($link, 'user' . time() . mt_rand(1000, 9999));
}
public function testChgrpFail()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->markAsSkippedIfPosixIsMissing();
- $dir = $this->workspace . \DIRECTORY_SEPARATOR . 'dir';
- \mkdir($dir);
- $this->filesystem->chgrp($dir, 'user' . \time() . \mt_rand(1000, 9999));
+ $dir = $this->workspace . DIRECTORY_SEPARATOR . 'dir';
+ mkdir($dir);
+ $this->filesystem->chgrp($dir, 'user' . time() . mt_rand(1000, 9999));
}
public function testRename()
{
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $newPath = $this->workspace . \DIRECTORY_SEPARATOR . 'new_file';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $newPath = $this->workspace . DIRECTORY_SEPARATOR . 'new_file';
+ touch($file);
$this->filesystem->rename($file, $newPath);
$this->assertFileNotExists($file);
$this->assertFileExists($newPath);
@@ -534,42 +576,42 @@ public function testRename()
public function testRenameThrowsExceptionIfTargetAlreadyExists()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $newPath = $this->workspace . \DIRECTORY_SEPARATOR . 'new_file';
- \touch($file);
- \touch($newPath);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $newPath = $this->workspace . DIRECTORY_SEPARATOR . 'new_file';
+ touch($file);
+ touch($newPath);
$this->filesystem->rename($file, $newPath);
}
public function testRenameOverwritesTheTargetIfItAlreadyExists()
{
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $newPath = $this->workspace . \DIRECTORY_SEPARATOR . 'new_file';
- \touch($file);
- \touch($newPath);
- $this->filesystem->rename($file, $newPath, \true);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $newPath = $this->workspace . DIRECTORY_SEPARATOR . 'new_file';
+ touch($file);
+ touch($newPath);
+ $this->filesystem->rename($file, $newPath, true);
$this->assertFileNotExists($file);
$this->assertFileExists($newPath);
}
public function testRenameThrowsExceptionOnError()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
- $file = $this->workspace . \DIRECTORY_SEPARATOR . \uniqid('fs_test_', \true);
- $newPath = $this->workspace . \DIRECTORY_SEPARATOR . 'new_file';
+ $file = $this->workspace . DIRECTORY_SEPARATOR . uniqid('fs_test_', true);
+ $newPath = $this->workspace . DIRECTORY_SEPARATOR . 'new_file';
$this->filesystem->rename($file, $newPath);
}
public function testSymlink()
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Windows does not support creating "broken" symlinks');
}
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
// $file does not exist right now: creating "broken" links is a wanted feature
$this->filesystem->symlink($file, $link);
- $this->assertTrue(\is_link($link));
+ $this->assertTrue(is_link($link));
// Create the linked file AFTER creating the link
- \touch($file);
- $this->assertEquals($file, \readlink($link));
+ touch($file);
+ $this->assertEquals($file, readlink($link));
}
/**
* @depends testSymlink
@@ -577,57 +619,57 @@ public function testSymlink()
public function testRemoveSymlink()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
$this->filesystem->remove($link);
- $this->assertFalse(\is_link($link));
- $this->assertFalse(\is_file($link));
+ $this->assertFalse(is_link($link));
+ $this->assertFalse(is_file($link));
$this->assertDirectoryNotExists($link);
}
public function testSymlinkIsOverwrittenIfPointsToDifferentTarget()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
- \symlink($this->workspace, $link);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
+ symlink($this->workspace, $link);
$this->filesystem->symlink($file, $link);
- $this->assertTrue(\is_link($link));
- $this->assertEquals($file, \readlink($link));
+ $this->assertTrue(is_link($link));
+ $this->assertEquals($file, readlink($link));
}
public function testSymlinkIsNotOverwrittenIfAlreadyCreated()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
- \symlink($file, $link);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
+ symlink($file, $link);
$this->filesystem->symlink($file, $link);
- $this->assertTrue(\is_link($link));
- $this->assertEquals($file, \readlink($link));
+ $this->assertTrue(is_link($link));
+ $this->assertEquals($file, readlink($link));
}
public function testSymlinkCreatesTargetDirectoryIfItDoesNotExist()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link1 = $this->workspace . \DIRECTORY_SEPARATOR . 'dir' . \DIRECTORY_SEPARATOR . 'link';
- $link2 = $this->workspace . \DIRECTORY_SEPARATOR . 'dir' . \DIRECTORY_SEPARATOR . 'subdir' . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link1 = $this->workspace . DIRECTORY_SEPARATOR . 'dir' . DIRECTORY_SEPARATOR . 'link';
+ $link2 = $this->workspace . DIRECTORY_SEPARATOR . 'dir' . DIRECTORY_SEPARATOR . 'subdir' . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->symlink($file, $link1);
$this->filesystem->symlink($file, $link2);
- $this->assertTrue(\is_link($link1));
- $this->assertEquals($file, \readlink($link1));
- $this->assertTrue(\is_link($link2));
- $this->assertEquals($file, \readlink($link2));
+ $this->assertTrue(is_link($link1));
+ $this->assertEquals($file, readlink($link1));
+ $this->assertTrue(is_link($link2));
+ $this->assertEquals($file, readlink($link2));
}
public function testLink()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
$this->filesystem->hardlink($file, $link);
- $this->assertTrue(\is_file($link));
- $this->assertEquals(\fileinode($file), \fileinode($link));
+ $this->assertTrue(is_file($link));
+ $this->assertEquals(fileinode($file), fileinode($link));
}
/**
* @depends testLink
@@ -635,75 +677,75 @@ public function testLink()
public function testRemoveLink()
{
$this->markAsSkippedIfLinkIsMissing();
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
$this->filesystem->remove($link);
- $this->assertTrue(!\is_file($link));
+ $this->assertTrue(!is_file($link));
}
public function testLinkIsOverwrittenIfPointsToDifferentTarget()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $file2 = $this->workspace . \DIRECTORY_SEPARATOR . 'file2';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
- \touch($file2);
- \link($file2, $link);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $file2 = $this->workspace . DIRECTORY_SEPARATOR . 'file2';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
+ touch($file2);
+ link($file2, $link);
$this->filesystem->hardlink($file, $link);
- $this->assertTrue(\is_file($link));
- $this->assertEquals(\fileinode($file), \fileinode($link));
+ $this->assertTrue(is_file($link));
+ $this->assertEquals(fileinode($file), fileinode($link));
}
public function testLinkIsNotOverwrittenIfAlreadyCreated()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
- \link($file, $link);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
+ link($file, $link);
$this->filesystem->hardlink($file, $link);
- $this->assertTrue(\is_file($link));
- $this->assertEquals(\fileinode($file), \fileinode($link));
+ $this->assertTrue(is_file($link));
+ $this->assertEquals(fileinode($file), fileinode($link));
}
public function testLinkWithSeveralTargets()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link1 = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- $link2 = $this->workspace . \DIRECTORY_SEPARATOR . 'link2';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link1 = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ $link2 = $this->workspace . DIRECTORY_SEPARATOR . 'link2';
+ touch($file);
$this->filesystem->hardlink($file, [$link1, $link2]);
- $this->assertTrue(\is_file($link1));
- $this->assertEquals(\fileinode($file), \fileinode($link1));
- $this->assertTrue(\is_file($link2));
- $this->assertEquals(\fileinode($file), \fileinode($link2));
+ $this->assertTrue(is_file($link1));
+ $this->assertEquals(fileinode($file), fileinode($link1));
+ $this->assertTrue(is_file($link2));
+ $this->assertEquals(fileinode($file), fileinode($link2));
}
public function testLinkWithSameTarget()
{
$this->markAsSkippedIfLinkIsMissing();
- $file = $this->workspace . \DIRECTORY_SEPARATOR . 'file';
- $link = $this->workspace . \DIRECTORY_SEPARATOR . 'link';
- \touch($file);
+ $file = $this->workspace . DIRECTORY_SEPARATOR . 'file';
+ $link = $this->workspace . DIRECTORY_SEPARATOR . 'link';
+ touch($file);
// practically same as testLinkIsNotOverwrittenIfAlreadyCreated
$this->filesystem->hardlink($file, [$link, $link]);
- $this->assertTrue(\is_file($link));
- $this->assertEquals(\fileinode($file), \fileinode($link));
+ $this->assertTrue(is_file($link));
+ $this->assertEquals(fileinode($file), fileinode($link));
}
public function testReadRelativeLink()
{
$this->markAsSkippedIfSymlinkIsMissing();
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Relative symbolic links are not supported on Windows');
}
$file = $this->workspace . '/file';
$link1 = $this->workspace . '/dir/link';
$link2 = $this->workspace . '/dir/link2';
- \touch($file);
+ touch($file);
$this->filesystem->symlink('../file', $link1);
$this->filesystem->symlink('link', $link2);
$this->assertEquals($this->normalize('../file'), $this->filesystem->readlink($link1));
$this->assertEquals('link', $this->filesystem->readlink($link2));
- $this->assertEquals($file, $this->filesystem->readlink($link1, \true));
- $this->assertEquals($file, $this->filesystem->readlink($link2, \true));
- $this->assertEquals($file, $this->filesystem->readlink($file, \true));
+ $this->assertEquals($file, $this->filesystem->readlink($link1, true));
+ $this->assertEquals($file, $this->filesystem->readlink($link2, true));
+ $this->assertEquals($file, $this->filesystem->readlink($file, true));
}
public function testReadAbsoluteLink()
{
@@ -711,28 +753,28 @@ public function testReadAbsoluteLink()
$file = $this->normalize($this->workspace . '/file');
$link1 = $this->normalize($this->workspace . '/dir/link');
$link2 = $this->normalize($this->workspace . '/dir/link2');
- \touch($file);
+ touch($file);
$this->filesystem->symlink($file, $link1);
$this->filesystem->symlink($link1, $link2);
$this->assertEquals($file, $this->filesystem->readlink($link1));
$this->assertEquals($link1, $this->filesystem->readlink($link2));
- $this->assertEquals($file, $this->filesystem->readlink($link1, \true));
- $this->assertEquals($file, $this->filesystem->readlink($link2, \true));
- $this->assertEquals($file, $this->filesystem->readlink($file, \true));
+ $this->assertEquals($file, $this->filesystem->readlink($link1, true));
+ $this->assertEquals($file, $this->filesystem->readlink($link2, true));
+ $this->assertEquals($file, $this->filesystem->readlink($file, true));
}
public function testReadBrokenLink()
{
$this->markAsSkippedIfSymlinkIsMissing();
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('Windows does not support creating "broken" symlinks');
}
$file = $this->workspace . '/file';
$link = $this->workspace . '/link';
$this->filesystem->symlink($file, $link);
$this->assertEquals($file, $this->filesystem->readlink($link));
- $this->assertNull($this->filesystem->readlink($link, \true));
- \touch($file);
- $this->assertEquals($file, $this->filesystem->readlink($link, \true));
+ $this->assertNull($this->filesystem->readlink($link, true));
+ touch($file);
+ $this->assertEquals($file, $this->filesystem->readlink($link, true));
}
public function testReadLinkDefaultPathDoesNotExist()
{
@@ -741,20 +783,20 @@ public function testReadLinkDefaultPathDoesNotExist()
public function testReadLinkDefaultPathNotLink()
{
$file = $this->normalize($this->workspace . '/file');
- \touch($file);
+ touch($file);
$this->assertNull($this->filesystem->readlink($file));
}
public function testReadLinkCanonicalizePath()
{
$this->markAsSkippedIfSymlinkIsMissing();
$file = $this->normalize($this->workspace . '/file');
- \mkdir($this->normalize($this->workspace . '/dir'));
- \touch($file);
- $this->assertEquals($file, $this->filesystem->readlink($this->normalize($this->workspace . '/dir/../file'), \true));
+ mkdir($this->normalize($this->workspace . '/dir'));
+ touch($file);
+ $this->assertEquals($file, $this->filesystem->readlink($this->normalize($this->workspace . '/dir/../file'), true));
}
public function testReadLinkCanonicalizedPathDoesNotExist()
{
- $this->assertNull($this->filesystem->readlink($this->normalize($this->workspace . 'invalid'), \true));
+ $this->assertNull($this->filesystem->readlink($this->normalize($this->workspace . 'invalid'), true));
}
/**
* @dataProvider providePathsForMakePathRelative
@@ -767,7 +809,7 @@ public function testMakePathRelative($endPath, $startPath, $expectedPath)
public function providePathsForMakePathRelative()
{
$paths = [['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component', '../'], ['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/src/Symfony/Component/', '../'], ['/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component', '../'], ['/var/lib/symfony/src/Symfony', '/var/lib/symfony/src/Symfony/Component/', '../'], ['/usr/lib/symfony/', '/var/lib/symfony/src/Symfony/Component', '../../../../../../usr/lib/symfony/'], ['/var/lib/symfony/src/Symfony/', '/var/lib/symfony/', 'src/Symfony/'], ['/aa/bb', '/aa/bb', './'], ['/aa/bb', '/aa/bb/', './'], ['/aa/bb/', '/aa/bb', './'], ['/aa/bb/', '/aa/bb/', './'], ['/aa/bb/cc', '/aa/bb/cc/dd', '../'], ['/aa/bb/cc', '/aa/bb/cc/dd/', '../'], ['/aa/bb/cc/', '/aa/bb/cc/dd', '../'], ['/aa/bb/cc/', '/aa/bb/cc/dd/', '../'], ['/aa/bb/cc', '/aa', 'bb/cc/'], ['/aa/bb/cc', '/aa/', 'bb/cc/'], ['/aa/bb/cc/', '/aa', 'bb/cc/'], ['/aa/bb/cc/', '/aa/', 'bb/cc/'], ['/a/aab/bb', '/a/aa', '../aab/bb/'], ['/a/aab/bb', '/a/aa/', '../aab/bb/'], ['/a/aab/bb/', '/a/aa', '../aab/bb/'], ['/a/aab/bb/', '/a/aa/', '../aab/bb/'], ['/a/aab/bb/', '/', 'a/aab/bb/'], ['/a/aab/bb/', '/b/aab', '../../a/aab/bb/'], ['/aab/bb', '/aa', '../aab/bb/'], ['/aab', '/aa', '../aab/'], ['/aa/bb/cc', '/aa/dd/..', 'bb/cc/'], ['/aa/../bb/cc', '/aa/dd/..', '../bb/cc/'], ['/aa/bb/../../cc', '/aa/../dd/..', 'cc/'], ['/../aa/bb/cc', '/aa/dd/..', 'bb/cc/'], ['/../../aa/../bb/cc', '/aa/dd/..', '../bb/cc/'], ['C:/aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'], ['c:/aa/../bb/cc', 'c:/aa/dd/..', '../bb/cc/'], ['C:/aa/bb/../../cc', 'C:/aa/../dd/..', 'cc/'], ['C:/../aa/bb/cc', 'C:/aa/dd/..', 'bb/cc/'], ['C:/../../aa/../bb/cc', 'C:/aa/dd/..', '../bb/cc/']];
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$paths[] = ['c:\\var\\lib/symfony/src/Symfony/', 'c:/var/lib/symfony/', 'src/Symfony/'];
}
return $paths;
@@ -788,38 +830,38 @@ public function provideLegacyPathsForMakePathRelativeWithRelativePaths()
}
public function testMirrorCopiesFilesAndDirectoriesRecursively()
{
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- $directory = $sourcePath . 'directory' . \DIRECTORY_SEPARATOR;
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ $directory = $sourcePath . 'directory' . DIRECTORY_SEPARATOR;
$file1 = $directory . 'file1';
$file2 = $sourcePath . 'file2';
- \mkdir($sourcePath);
- \mkdir($directory);
- \file_put_contents($file1, 'FILE1');
- \file_put_contents($file2, 'FILE2');
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
+ mkdir($sourcePath);
+ mkdir($directory);
+ file_put_contents($file1, 'FILE1');
+ file_put_contents($file2, 'FILE2');
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertDirectoryExists($targetPath);
$this->assertDirectoryExists($targetPath . 'directory');
- $this->assertFileEquals($file1, $targetPath . 'directory' . \DIRECTORY_SEPARATOR . 'file1');
+ $this->assertFileEquals($file1, $targetPath . 'directory' . DIRECTORY_SEPARATOR . 'file1');
$this->assertFileEquals($file2, $targetPath . 'file2');
$this->filesystem->remove($file1);
- $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => \false]);
- $this->assertTrue($this->filesystem->exists($targetPath . 'directory' . \DIRECTORY_SEPARATOR . 'file1'));
- $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => \true]);
- $this->assertFalse($this->filesystem->exists($targetPath . 'directory' . \DIRECTORY_SEPARATOR . 'file1'));
- \file_put_contents($file1, 'FILE1');
- $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => \true]);
- $this->assertTrue($this->filesystem->exists($targetPath . 'directory' . \DIRECTORY_SEPARATOR . 'file1'));
+ $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => false]);
+ $this->assertTrue($this->filesystem->exists($targetPath . 'directory' . DIRECTORY_SEPARATOR . 'file1'));
+ $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]);
+ $this->assertFalse($this->filesystem->exists($targetPath . 'directory' . DIRECTORY_SEPARATOR . 'file1'));
+ file_put_contents($file1, 'FILE1');
+ $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]);
+ $this->assertTrue($this->filesystem->exists($targetPath . 'directory' . DIRECTORY_SEPARATOR . 'file1'));
$this->filesystem->remove($directory);
- $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => \true]);
+ $this->filesystem->mirror($sourcePath, $targetPath, null, ['delete' => true]);
$this->assertFalse($this->filesystem->exists($targetPath . 'directory'));
- $this->assertFalse($this->filesystem->exists($targetPath . 'directory' . \DIRECTORY_SEPARATOR . 'file1'));
+ $this->assertFalse($this->filesystem->exists($targetPath . 'directory' . DIRECTORY_SEPARATOR . 'file1'));
}
public function testMirrorCreatesEmptyDirectory()
{
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- \mkdir($sourcePath);
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ mkdir($sourcePath);
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertDirectoryExists($targetPath);
$this->filesystem->remove($sourcePath);
@@ -827,89 +869,89 @@ public function testMirrorCreatesEmptyDirectory()
public function testMirrorCopiesLinks()
{
$this->markAsSkippedIfSymlinkIsMissing();
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- \mkdir($sourcePath);
- \file_put_contents($sourcePath . 'file1', 'FILE1');
- \symlink($sourcePath . 'file1', $sourcePath . 'link1');
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ mkdir($sourcePath);
+ file_put_contents($sourcePath . 'file1', 'FILE1');
+ symlink($sourcePath . 'file1', $sourcePath . 'link1');
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertDirectoryExists($targetPath);
$this->assertFileEquals($sourcePath . 'file1', $targetPath . 'link1');
- $this->assertTrue(\is_link($targetPath . \DIRECTORY_SEPARATOR . 'link1'));
+ $this->assertTrue(is_link($targetPath . DIRECTORY_SEPARATOR . 'link1'));
}
public function testMirrorCopiesLinkedDirectoryContents()
{
- $this->markAsSkippedIfSymlinkIsMissing(\true);
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- \mkdir($sourcePath . 'nested/', 0777, \true);
- \file_put_contents($sourcePath . '/nested/file1.txt', 'FILE1');
+ $this->markAsSkippedIfSymlinkIsMissing(true);
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ mkdir($sourcePath . 'nested/', 0777, true);
+ file_put_contents($sourcePath . '/nested/file1.txt', 'FILE1');
// Note: We symlink directory, not file
- \symlink($sourcePath . 'nested', $sourcePath . 'link1');
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
+ symlink($sourcePath . 'nested', $sourcePath . 'link1');
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertDirectoryExists($targetPath);
$this->assertFileEquals($sourcePath . '/nested/file1.txt', $targetPath . 'link1/file1.txt');
- $this->assertTrue(\is_link($targetPath . \DIRECTORY_SEPARATOR . 'link1'));
+ $this->assertTrue(is_link($targetPath . DIRECTORY_SEPARATOR . 'link1'));
}
public function testMirrorCopiesRelativeLinkedContents()
{
- $this->markAsSkippedIfSymlinkIsMissing(\true);
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- $oldPath = \getcwd();
- \mkdir($sourcePath . 'nested/', 0777, \true);
- \file_put_contents($sourcePath . '/nested/file1.txt', 'FILE1');
+ $this->markAsSkippedIfSymlinkIsMissing(true);
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ $oldPath = getcwd();
+ mkdir($sourcePath . 'nested/', 0777, true);
+ file_put_contents($sourcePath . '/nested/file1.txt', 'FILE1');
// Note: Create relative symlink
- \chdir($sourcePath);
- \symlink('nested', 'link1');
- \chdir($oldPath);
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
+ chdir($sourcePath);
+ symlink('nested', 'link1');
+ chdir($oldPath);
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertDirectoryExists($targetPath);
$this->assertFileEquals($sourcePath . '/nested/file1.txt', $targetPath . 'link1/file1.txt');
- $this->assertTrue(\is_link($targetPath . \DIRECTORY_SEPARATOR . 'link1'));
- $this->assertEquals('\\' === \DIRECTORY_SEPARATOR ? \realpath($sourcePath . '\\nested') : 'nested', \readlink($targetPath . \DIRECTORY_SEPARATOR . 'link1'));
+ $this->assertTrue(is_link($targetPath . DIRECTORY_SEPARATOR . 'link1'));
+ $this->assertEquals('\\' === DIRECTORY_SEPARATOR ? realpath($sourcePath . '\\nested') : 'nested', readlink($targetPath . DIRECTORY_SEPARATOR . 'link1'));
}
public function testMirrorContentsWithSameNameAsSourceOrTargetWithoutDeleteOption()
{
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- \mkdir($sourcePath);
- \touch($sourcePath . 'source');
- \touch($sourcePath . 'target');
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
- $oldPath = \getcwd();
- \chdir($this->workspace);
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ mkdir($sourcePath);
+ touch($sourcePath . 'source');
+ touch($sourcePath . 'target');
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
+ $oldPath = getcwd();
+ chdir($this->workspace);
$this->filesystem->mirror('source', $targetPath);
- \chdir($oldPath);
+ chdir($oldPath);
$this->assertDirectoryExists($targetPath);
$this->assertFileExists($targetPath . 'source');
$this->assertFileExists($targetPath . 'target');
}
public function testMirrorContentsWithSameNameAsSourceOrTargetWithDeleteOption()
{
- $sourcePath = $this->workspace . \DIRECTORY_SEPARATOR . 'source' . \DIRECTORY_SEPARATOR;
- \mkdir($sourcePath);
- \touch($sourcePath . 'source');
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'target' . \DIRECTORY_SEPARATOR;
- \mkdir($targetPath);
- \touch($targetPath . 'source');
- \touch($targetPath . 'target');
- $oldPath = \getcwd();
- \chdir($this->workspace);
- $this->filesystem->mirror('source', 'target', null, ['delete' => \true]);
- \chdir($oldPath);
+ $sourcePath = $this->workspace . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR;
+ mkdir($sourcePath);
+ touch($sourcePath . 'source');
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'target' . DIRECTORY_SEPARATOR;
+ mkdir($targetPath);
+ touch($targetPath . 'source');
+ touch($targetPath . 'target');
+ $oldPath = getcwd();
+ chdir($this->workspace);
+ $this->filesystem->mirror('source', 'target', null, ['delete' => true]);
+ chdir($oldPath);
$this->assertDirectoryExists($targetPath);
$this->assertFileExists($targetPath . 'source');
$this->assertFileNotExists($targetPath . 'target');
}
public function testMirrorFromSubdirectoryInToParentDirectory()
{
- $targetPath = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR;
- $sourcePath = $targetPath . 'bar' . \DIRECTORY_SEPARATOR;
+ $targetPath = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR;
+ $sourcePath = $targetPath . 'bar' . DIRECTORY_SEPARATOR;
$file1 = $sourcePath . 'file1';
$file2 = $sourcePath . 'file2';
$this->filesystem->mkdir($sourcePath);
- \file_put_contents($file1, 'FILE1');
- \file_put_contents($file2, 'FILE2');
+ file_put_contents($file1, 'FILE1');
+ file_put_contents($file2, 'FILE2');
$this->filesystem->mirror($sourcePath, $targetPath);
$this->assertFileEquals($file1, $targetPath . 'file1');
}
@@ -923,7 +965,7 @@ public function testIsAbsolutePath($path, $expectedResult)
}
public function providePathsForIsAbsolutePath()
{
- return [['/var/lib', \true], ['_PhpScoper5ea00cc67502b\\c:\\var\\lib', \true], ['_PhpScoper5ea00cc67502b\\var\\lib', \true], ['var/lib', \false], ['../var/lib', \false], ['', \false], [null, \false]];
+ return [['/var/lib', true], ['_PhpScoper5ea00cc67502b\\c:\\var\\lib', true], ['_PhpScoper5ea00cc67502b\\var\\lib', true], ['var/lib', false], ['../var/lib', false], ['', false], [null, false]];
}
public function testTempnam()
{
@@ -941,7 +983,7 @@ public function testTempnamWithFileScheme()
}
public function testTempnamWithMockScheme()
{
- \stream_wrapper_register('mock', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Tests\\Fixtures\\MockStream\\MockStream');
+ stream_wrapper_register('mock', '_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Tests\\Fixtures\\MockStream\\MockStream');
$scheme = 'mock://';
$dirname = $scheme . $this->workspace;
$filename = $this->filesystem->tempnam($dirname, 'foo');
@@ -969,13 +1011,13 @@ public function testTempnamWithPharSchemeFails()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
// Skip test if Phar disabled phar.readonly must be 0 in php.ini
- if (!\Phar::canWrite()) {
+ if (!Phar::canWrite()) {
$this->markTestSkipped('This test cannot run when phar.readonly is 1.');
}
$scheme = 'phar://';
$dirname = $scheme . $this->workspace;
$pharname = 'foo.phar';
- new \Phar($this->workspace . '/' . $pharname, 0, $pharname);
+ new Phar($this->workspace . '/' . $pharname, 0, $pharname);
// The phar:// stream does not support mode x: fails to create file, errors "failed to open stream: phar error: "$filename" is not a file in phar "$pharname"" and returns false
$this->filesystem->tempnam($dirname, $pharname . '/bar');
}
@@ -990,63 +1032,63 @@ public function testTempnamWithHTTPSchemeFails()
public function testTempnamOnUnwritableFallsBackToSysTmp()
{
$scheme = 'file://';
- $dirname = $scheme . $this->workspace . \DIRECTORY_SEPARATOR . 'does_not_exist';
+ $dirname = $scheme . $this->workspace . DIRECTORY_SEPARATOR . 'does_not_exist';
$filename = $this->filesystem->tempnam($dirname, 'bar');
- $realTempDir = \realpath(\sys_get_temp_dir());
- $this->assertStringStartsWith(\rtrim($scheme . $realTempDir, \DIRECTORY_SEPARATOR), $filename);
+ $realTempDir = realpath(sys_get_temp_dir());
+ $this->assertStringStartsWith(rtrim($scheme . $realTempDir, DIRECTORY_SEPARATOR), $filename);
$this->assertFileExists($filename);
// Tear down
- @\unlink($filename);
+ @unlink($filename);
}
public function testDumpFile()
{
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
// skip mode check on Windows
- if ('\\' !== \DIRECTORY_SEPARATOR) {
- $oldMask = \umask(02);
+ if ('\\' !== DIRECTORY_SEPARATOR) {
+ $oldMask = umask(02);
}
$this->filesystem->dumpFile($filename, 'bar');
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'bar');
// skip mode check on Windows
- if ('\\' !== \DIRECTORY_SEPARATOR) {
+ if ('\\' !== DIRECTORY_SEPARATOR) {
$this->assertFilePermissions(664, $filename);
- \umask($oldMask);
+ umask($oldMask);
}
}
public function testDumpFileWithArray()
{
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
$this->filesystem->dumpFile($filename, ['bar']);
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'bar');
}
public function testDumpFileWithResource()
{
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
- $resource = \fopen('php://memory', 'rw');
- \fwrite($resource, 'bar');
- \fseek($resource, 0);
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
+ $resource = fopen('php://memory', 'rw');
+ fwrite($resource, 'bar');
+ fseek($resource, 0);
$this->filesystem->dumpFile($filename, $resource);
- \fclose($resource);
+ fclose($resource);
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'bar');
}
public function testDumpFileOverwritesAnExistingFile()
{
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo.txt';
- \file_put_contents($filename, 'FOO BAR');
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo.txt';
+ file_put_contents($filename, 'FOO BAR');
$this->filesystem->dumpFile($filename, 'bar');
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'bar');
}
public function testDumpFileWithFileScheme()
{
- if (\defined('HHVM_VERSION')) {
+ if (defined('HHVM_VERSION')) {
$this->markTestSkipped('HHVM does not handle the file:// scheme correctly');
}
$scheme = 'file://';
- $filename = $scheme . $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
+ $filename = $scheme . $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
$this->filesystem->dumpFile($filename, 'bar');
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'bar');
@@ -1054,36 +1096,36 @@ public function testDumpFileWithFileScheme()
public function testDumpFileWithZlibScheme()
{
$scheme = 'compress.zlib://';
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
$this->filesystem->dumpFile($filename, 'bar');
// Zlib stat uses file:// wrapper so remove scheme
- $this->assertFileExists(\str_replace($scheme, '', $filename));
+ $this->assertFileExists(str_replace($scheme, '', $filename));
$this->assertStringEqualsFile($filename, 'bar');
}
public function testAppendToFile()
{
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'bar.txt';
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'bar.txt';
// skip mode check on Windows
- if ('\\' !== \DIRECTORY_SEPARATOR) {
- $oldMask = \umask(02);
+ if ('\\' !== DIRECTORY_SEPARATOR) {
+ $oldMask = umask(02);
}
$this->filesystem->dumpFile($filename, 'foo');
$this->filesystem->appendToFile($filename, 'bar');
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'foobar');
// skip mode check on Windows
- if ('\\' !== \DIRECTORY_SEPARATOR) {
+ if ('\\' !== DIRECTORY_SEPARATOR) {
$this->assertFilePermissions(664, $filename);
- \umask($oldMask);
+ umask($oldMask);
}
}
public function testAppendToFileWithScheme()
{
- if (\defined('HHVM_VERSION')) {
+ if (defined('HHVM_VERSION')) {
$this->markTestSkipped('HHVM does not handle the file:// scheme correctly');
}
$scheme = 'file://';
- $filename = $scheme . $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
+ $filename = $scheme . $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
$this->filesystem->dumpFile($filename, 'foo');
$this->filesystem->appendToFile($filename, 'bar');
$this->assertFileExists($filename);
@@ -1092,26 +1134,26 @@ public function testAppendToFileWithScheme()
public function testAppendToFileWithZlibScheme()
{
$scheme = 'compress.zlib://';
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'baz.txt';
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'baz.txt';
$this->filesystem->dumpFile($filename, 'foo');
// Zlib stat uses file:// wrapper so remove it
- $this->assertStringEqualsFile(\str_replace($scheme, '', $filename), 'foo');
+ $this->assertStringEqualsFile(str_replace($scheme, '', $filename), 'foo');
$this->filesystem->appendToFile($filename, 'bar');
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'foobar');
}
public function testAppendToFileCreateTheFileIfNotExists()
{
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo' . \DIRECTORY_SEPARATOR . 'bar.txt';
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo' . DIRECTORY_SEPARATOR . 'bar.txt';
// skip mode check on Windows
- if ('\\' !== \DIRECTORY_SEPARATOR) {
- $oldMask = \umask(02);
+ if ('\\' !== DIRECTORY_SEPARATOR) {
+ $oldMask = umask(02);
}
$this->filesystem->appendToFile($filename, 'bar');
// skip mode check on Windows
- if ('\\' !== \DIRECTORY_SEPARATOR) {
+ if ('\\' !== DIRECTORY_SEPARATOR) {
$this->assertFilePermissions(664, $filename);
- \umask($oldMask);
+ umask($oldMask);
}
$this->assertFileExists($filename);
$this->assertStringEqualsFile($filename, 'bar');
@@ -1119,19 +1161,19 @@ public function testAppendToFileCreateTheFileIfNotExists()
public function testDumpKeepsExistingPermissionsWhenOverwritingAnExistingFile()
{
$this->markAsSkippedIfChmodIsMissing();
- $filename = $this->workspace . \DIRECTORY_SEPARATOR . 'foo.txt';
- \file_put_contents($filename, 'FOO BAR');
- \chmod($filename, 0745);
+ $filename = $this->workspace . DIRECTORY_SEPARATOR . 'foo.txt';
+ file_put_contents($filename, 'FOO BAR');
+ chmod($filename, 0745);
$this->filesystem->dumpFile($filename, 'bar', null);
$this->assertFilePermissions(745, $filename);
}
public function testCopyShouldKeepExecutionPermission()
{
$this->markAsSkippedIfChmodIsMissing();
- $sourceFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_source_file';
- $targetFilePath = $this->workspace . \DIRECTORY_SEPARATOR . 'copy_target_file';
- \file_put_contents($sourceFilePath, 'SOURCE FILE');
- \chmod($sourceFilePath, 0745);
+ $sourceFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_source_file';
+ $targetFilePath = $this->workspace . DIRECTORY_SEPARATOR . 'copy_target_file';
+ file_put_contents($sourceFilePath, 'SOURCE FILE');
+ chmod($sourceFilePath, 0745);
$this->filesystem->copy($sourceFilePath, $targetFilePath);
$this->assertFilePermissions(767, $targetFilePath);
}
@@ -1144,6 +1186,6 @@ public function testCopyShouldKeepExecutionPermission()
*/
private function normalize($path)
{
- return \str_replace('/', \DIRECTORY_SEPARATOR, $path);
+ return str_replace('/', DIRECTORY_SEPARATOR, $path);
}
}
diff --git a/vendor/symfony/filesystem/Tests/FilesystemTestCase.php b/vendor/symfony/filesystem/Tests/FilesystemTestCase.php
index 3f9e62e80..b10372dc5 100644
--- a/vendor/symfony/filesystem/Tests/FilesystemTestCase.php
+++ b/vendor/symfony/filesystem/Tests/FilesystemTestCase.php
@@ -12,7 +12,31 @@
use _PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase;
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Filesystem;
-class FilesystemTestCase extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+use function error_get_last;
+use function exec;
+use function fileperms;
+use function function_exists;
+use function is_array;
+use function link;
+use function microtime;
+use function mkdir;
+use function mt_rand;
+use function posix_getgrgid;
+use function posix_getpwuid;
+use function realpath;
+use function sprintf;
+use function stat;
+use function strpos;
+use function substr;
+use function symlink;
+use function sys_get_temp_dir;
+use function tempnam;
+use function umask;
+use function unlink;
+use const DIRECTORY_SEPARATOR;
+use const PHP_ZTS;
+
+class FilesystemTestCase extends TestCase
{
private $umask;
protected $longPathNamesWindows = [];
@@ -34,49 +58,49 @@ class FilesystemTestCase extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\Test
private static $symlinkOnWindows = null;
public static function setUpBeforeClass()
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
- self::$linkOnWindows = \true;
- $originFile = \tempnam(\sys_get_temp_dir(), 'li');
- $targetFile = \tempnam(\sys_get_temp_dir(), 'li');
- if (\true !== @\link($originFile, $targetFile)) {
- $report = \error_get_last();
- if (\is_array($report) && \false !== \strpos($report['message'], 'error code(1314)')) {
- self::$linkOnWindows = \false;
+ if ('\\' === DIRECTORY_SEPARATOR) {
+ self::$linkOnWindows = true;
+ $originFile = tempnam(sys_get_temp_dir(), 'li');
+ $targetFile = tempnam(sys_get_temp_dir(), 'li');
+ if (true !== @link($originFile, $targetFile)) {
+ $report = error_get_last();
+ if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
+ self::$linkOnWindows = false;
}
} else {
- @\unlink($targetFile);
+ @unlink($targetFile);
}
- self::$symlinkOnWindows = \true;
- $originDir = \tempnam(\sys_get_temp_dir(), 'sl');
- $targetDir = \tempnam(\sys_get_temp_dir(), 'sl');
- if (\true !== @\symlink($originDir, $targetDir)) {
- $report = \error_get_last();
- if (\is_array($report) && \false !== \strpos($report['message'], 'error code(1314)')) {
- self::$symlinkOnWindows = \false;
+ self::$symlinkOnWindows = true;
+ $originDir = tempnam(sys_get_temp_dir(), 'sl');
+ $targetDir = tempnam(sys_get_temp_dir(), 'sl');
+ if (true !== @symlink($originDir, $targetDir)) {
+ $report = error_get_last();
+ if (is_array($report) && false !== strpos($report['message'], 'error code(1314)')) {
+ self::$symlinkOnWindows = false;
}
} else {
- @\unlink($targetDir);
+ @unlink($targetDir);
}
}
}
protected function setUp()
{
- $this->umask = \umask(0);
- $this->filesystem = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Filesystem();
- $this->workspace = \sys_get_temp_dir() . '/' . \microtime(\true) . '.' . \mt_rand();
- \mkdir($this->workspace, 0777, \true);
- $this->workspace = \realpath($this->workspace);
+ $this->umask = umask(0);
+ $this->filesystem = new Filesystem();
+ $this->workspace = sys_get_temp_dir() . '/' . microtime(true) . '.' . mt_rand();
+ mkdir($this->workspace, 0777, true);
+ $this->workspace = realpath($this->workspace);
}
protected function tearDown()
{
if (!empty($this->longPathNamesWindows)) {
foreach ($this->longPathNamesWindows as $path) {
- \exec('DEL ' . $path);
+ exec('DEL ' . $path);
}
$this->longPathNamesWindows = [];
}
$this->filesystem->remove($this->workspace);
- \umask($this->umask);
+ umask($this->umask);
}
/**
* @param int $expectedFilePerms Expected file permissions as three digits (i.e. 755)
@@ -84,52 +108,52 @@ protected function tearDown()
*/
protected function assertFilePermissions($expectedFilePerms, $filePath)
{
- $actualFilePerms = (int) \substr(\sprintf('%o', \fileperms($filePath)), -3);
- $this->assertEquals($expectedFilePerms, $actualFilePerms, \sprintf('File permissions for %s must be %s. Actual %s', $filePath, $expectedFilePerms, $actualFilePerms));
+ $actualFilePerms = (int) substr(sprintf('%o', fileperms($filePath)), -3);
+ $this->assertEquals($expectedFilePerms, $actualFilePerms, sprintf('File permissions for %s must be %s. Actual %s', $filePath, $expectedFilePerms, $actualFilePerms));
}
protected function getFileOwner($filepath)
{
$this->markAsSkippedIfPosixIsMissing();
- $infos = \stat($filepath);
- return ($datas = \posix_getpwuid($infos['uid'])) ? $datas['name'] : null;
+ $infos = stat($filepath);
+ return ($datas = posix_getpwuid($infos['uid'])) ? $datas['name'] : null;
}
protected function getFileGroup($filepath)
{
$this->markAsSkippedIfPosixIsMissing();
- $infos = \stat($filepath);
- if ($datas = \posix_getgrgid($infos['gid'])) {
+ $infos = stat($filepath);
+ if ($datas = posix_getgrgid($infos['gid'])) {
return $datas['name'];
}
$this->markTestSkipped('Unable to retrieve file group name');
}
protected function markAsSkippedIfLinkIsMissing()
{
- if (!\function_exists('link')) {
+ if (!function_exists('link')) {
$this->markTestSkipped('link is not supported');
}
- if ('\\' === \DIRECTORY_SEPARATOR && \false === self::$linkOnWindows) {
+ if ('\\' === DIRECTORY_SEPARATOR && false === self::$linkOnWindows) {
$this->markTestSkipped('link requires "Create hard links" privilege on windows');
}
}
- protected function markAsSkippedIfSymlinkIsMissing($relative = \false)
+ protected function markAsSkippedIfSymlinkIsMissing($relative = false)
{
- if ('\\' === \DIRECTORY_SEPARATOR && \false === self::$symlinkOnWindows) {
+ if ('\\' === DIRECTORY_SEPARATOR && false === self::$symlinkOnWindows) {
$this->markTestSkipped('symlink requires "Create symbolic links" privilege on Windows');
}
// https://bugs.php.net/69473
- if ($relative && '\\' === \DIRECTORY_SEPARATOR && 1 === \PHP_ZTS) {
+ if ($relative && '\\' === DIRECTORY_SEPARATOR && 1 === PHP_ZTS) {
$this->markTestSkipped('symlink does not support relative paths on thread safe Windows PHP versions');
}
}
protected function markAsSkippedIfChmodIsMissing()
{
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('chmod is not supported on Windows');
}
}
protected function markAsSkippedIfPosixIsMissing()
{
- if (!\function_exists('posix_isatty')) {
+ if (!function_exists('posix_isatty')) {
$this->markTestSkipped('Function posix_isatty is required.');
}
}
diff --git a/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php b/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php
index 85dc59004..e17202bb0 100644
--- a/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php
+++ b/vendor/symfony/filesystem/Tests/Fixtures/MockStream/MockStream.php
@@ -29,7 +29,7 @@ class MockStream
*/
public function stream_open($path, $mode, $options, &$opened_path)
{
- return \true;
+ return true;
}
/**
* @param string $path The file path or URL to stat
diff --git a/vendor/symfony/filesystem/Tests/Fixtures/MockStream/index.php b/vendor/symfony/filesystem/Tests/Fixtures/MockStream/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/filesystem/Tests/Fixtures/MockStream/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/filesystem/Tests/Fixtures/index.php b/vendor/symfony/filesystem/Tests/Fixtures/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/filesystem/Tests/Fixtures/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/filesystem/Tests/LockHandlerTest.php b/vendor/symfony/filesystem/Tests/LockHandlerTest.php
index b75b61cde..1df46bd64 100644
--- a/vendor/symfony/filesystem/Tests/LockHandlerTest.php
+++ b/vendor/symfony/filesystem/Tests/LockHandlerTest.php
@@ -14,68 +14,82 @@
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException;
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Filesystem;
use _PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler;
+use Exception;
+use Throwable;
+use function chmod;
+use function get_class;
+use function getenv;
+use function is_dir;
+use function mkdir;
+use function sprintf;
+use function strpos;
+use function sys_get_temp_dir;
+use function uniqid;
+use function unlink;
+use const DIRECTORY_SEPARATOR;
+
/**
* @group legacy
*/
-class LockHandlerTest extends \_PhpScoper5ea00cc67502b\PHPUnit\Framework\TestCase
+class LockHandlerTest extends TestCase
{
public function testConstructWhenRepositoryDoesNotExist()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->expectExceptionMessage('Failed to create "/a/b/c/d/e": mkdir(): Permission denied.');
- if (!\getenv('USER') || 'root' === \getenv('USER')) {
+ if (!getenv('USER') || 'root' === getenv('USER')) {
$this->markTestSkipped('This test will fail if run under superuser');
}
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler('lock', '/a/b/c/d/e');
+ new LockHandler('lock', '/a/b/c/d/e');
}
public function testConstructWhenRepositoryIsNotWriteable()
{
$this->expectException('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException');
$this->expectExceptionMessage('The directory "/" is not writable.');
- if (!\getenv('USER') || 'root' === \getenv('USER')) {
+ if (!getenv('USER') || 'root' === getenv('USER')) {
$this->markTestSkipped('This test will fail if run under superuser');
}
- new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler('lock', '/');
+ new LockHandler('lock', '/');
}
public function testErrorHandlingInLockIfLockPathBecomesUnwritable()
{
// skip test on Windows; PHP can't easily set file as unreadable on Windows
- if ('\\' === \DIRECTORY_SEPARATOR) {
+ if ('\\' === DIRECTORY_SEPARATOR) {
$this->markTestSkipped('This test cannot run on Windows.');
}
- if (!\getenv('USER') || 'root' === \getenv('USER')) {
+ if (!getenv('USER') || 'root' === getenv('USER')) {
$this->markTestSkipped('This test will fail if run under superuser');
}
- $lockPath = \sys_get_temp_dir() . '/' . \uniqid('', \true);
+ $lockPath = sys_get_temp_dir() . '/' . uniqid('', true);
$e = null;
$wrongMessage = null;
try {
- \mkdir($lockPath);
- $lockHandler = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler('lock', $lockPath);
- \chmod($lockPath, 0444);
+ mkdir($lockPath);
+ $lockHandler = new LockHandler('lock', $lockPath);
+ chmod($lockPath, 0444);
$lockHandler->lock();
- } catch (\_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Exception\IOException $e) {
- if (\false === \strpos($e->getMessage(), 'Permission denied')) {
+ } catch (IOException $e) {
+ if (false === strpos($e->getMessage(), 'Permission denied')) {
$wrongMessage = $e->getMessage();
} else {
$this->addToAssertionCount(1);
}
- } catch (\Exception $e) {
- } catch (\Throwable $e) {
+ } catch (Exception $e) {
+ } catch (Throwable $e) {
}
- if (\is_dir($lockPath)) {
- $fs = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\Filesystem();
+ if (is_dir($lockPath)) {
+ $fs = new Filesystem();
$fs->remove($lockPath);
}
- $this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException', $e, \sprintf('Expected IOException to be thrown, got %s instead.', \get_class($e)));
- $this->assertNull($wrongMessage, \sprintf('Expected exception message to contain "Permission denied", got "%s" instead.', $wrongMessage));
+ $this->assertInstanceOf('_PhpScoper5ea00cc67502b\\Symfony\\Component\\Filesystem\\Exception\\IOException', $e, sprintf('Expected IOException to be thrown, got %s instead.', get_class($e)));
+ $this->assertNull($wrongMessage, sprintf('Expected exception message to contain "Permission denied", got "%s" instead.', $wrongMessage));
}
public function testConstructSanitizeName()
{
- $lock = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler('');
- $file = \sprintf('%s/sf.-php-echo-hello-word-.4b3d9d0d27ddef3a78a64685dda3a963e478659a9e5240feaf7b4173a8f28d5f.lock', \sys_get_temp_dir());
+ $lock = new LockHandler('');
+ $file = sprintf('%s/sf.-php-echo-hello-word-.4b3d9d0d27ddef3a78a64685dda3a963e478659a9e5240feaf7b4173a8f28d5f.lock', sys_get_temp_dir());
// ensure the file does not exist before the lock
- @\unlink($file);
+ @unlink($file);
$lock->lock();
$this->assertFileExists($file);
$lock->release();
@@ -83,8 +97,8 @@ public function testConstructSanitizeName()
public function testLockRelease()
{
$name = 'symfony-test-filesystem.lock';
- $l1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler($name);
- $l2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler($name);
+ $l1 = new LockHandler($name);
+ $l2 = new LockHandler($name);
$this->assertTrue($l1->lock());
$this->assertFalse($l2->lock());
$l1->release();
@@ -94,7 +108,7 @@ public function testLockRelease()
public function testLockTwice()
{
$name = 'symfony-test-filesystem.lock';
- $lockHandler = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler($name);
+ $lockHandler = new LockHandler($name);
$this->assertTrue($lockHandler->lock());
$this->assertTrue($lockHandler->lock());
$lockHandler->release();
@@ -102,8 +116,8 @@ public function testLockTwice()
public function testLockIsReleased()
{
$name = 'symfony-test-filesystem.lock';
- $l1 = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler($name);
- $l2 = new \_PhpScoper5ea00cc67502b\Symfony\Component\Filesystem\LockHandler($name);
+ $l1 = new LockHandler($name);
+ $l2 = new LockHandler($name);
$this->assertTrue($l1->lock());
$this->assertFalse($l2->lock());
$l1 = null;
diff --git a/vendor/symfony/filesystem/Tests/index.php b/vendor/symfony/filesystem/Tests/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/filesystem/Tests/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/filesystem/index.php b/vendor/symfony/filesystem/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/filesystem/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/index.php b/vendor/symfony/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-apcu/Apcu.php b/vendor/symfony/polyfill-apcu/Apcu.php
index 7d8945edf..2da9582ff 100644
--- a/vendor/symfony/polyfill-apcu/Apcu.php
+++ b/vendor/symfony/polyfill-apcu/Apcu.php
@@ -10,6 +10,8 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu;
+use function is_array;
+
/**
* Apcu for Zend Server Data Cache.
*
@@ -22,7 +24,7 @@ final class Apcu
{
public static function apcu_add($key, $var = null, $ttl = 0)
{
- if (!\is_array($key)) {
+ if (!is_array($key)) {
return apc_add($key, $var, $ttl);
}
$errors = array();
@@ -35,7 +37,7 @@ public static function apcu_add($key, $var = null, $ttl = 0)
}
public static function apcu_store($key, $var = null, $ttl = 0)
{
- if (!\is_array($key)) {
+ if (!is_array($key)) {
return apc_store($key, $var, $ttl);
}
$errors = array();
@@ -48,30 +50,30 @@ public static function apcu_store($key, $var = null, $ttl = 0)
}
public static function apcu_exists($keys)
{
- if (!\is_array($keys)) {
+ if (!is_array($keys)) {
return apc_exists($keys);
}
$existing = array();
foreach ($keys as $k) {
if (apc_exists($k)) {
- $existing[$k] = \true;
+ $existing[$k] = true;
}
}
return $existing;
}
public static function apcu_fetch($key, &$success = null)
{
- if (!\is_array($key)) {
+ if (!is_array($key)) {
return apc_fetch($key, $success);
}
- $succeeded = \true;
+ $succeeded = true;
$values = array();
foreach ($key as $k) {
$v = apc_fetch($k, $success);
if ($success) {
$values[$k] = $v;
} else {
- $succeeded = \false;
+ $succeeded = false;
}
}
$success = $succeeded;
@@ -79,10 +81,10 @@ public static function apcu_fetch($key, &$success = null)
}
public static function apcu_delete($key)
{
- if (!\is_array($key)) {
+ if (!is_array($key)) {
return apc_delete($key);
}
- $success = \true;
+ $success = true;
foreach ($key as $k) {
$success = apc_delete($k) && $success;
}
diff --git a/vendor/symfony/polyfill-apcu/bootstrap.php b/vendor/symfony/polyfill-apcu/bootstrap.php
index 04d6ceb2c..7e7153eb3 100644
--- a/vendor/symfony/polyfill-apcu/bootstrap.php
+++ b/vendor/symfony/polyfill-apcu/bootstrap.php
@@ -11,82 +11,89 @@
* file that was distributed with this source code.
*/
use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu as p;
-if (!\extension_loaded('apc') && !\extension_loaded('apcu')) {
+use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu\Apcu;
+use function class_exists;
+use function extension_loaded;
+use function function_exists;
+use const APC_ITER_ALL;
+use const APC_LIST_ACTIVE;
+
+if (!extension_loaded('apc') && !extension_loaded('apcu')) {
return;
}
-if (!\function_exists('_PhpScoper5ea00cc67502b\\apcu_add')) {
- if (\extension_loaded('Zend Data Cache')) {
+if (!function_exists('_PhpScoper5ea00cc67502b\\apcu_add')) {
+ if (extension_loaded('Zend Data Cache')) {
function apcu_add($key, $var = null, $ttl = 0)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu\Apcu::apcu_add($key, $var, $ttl);
+ return Apcu::apcu_add($key, $var, $ttl);
}
function apcu_delete($key)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu\Apcu::apcu_delete($key);
+ return Apcu::apcu_delete($key);
}
function apcu_exists($keys)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu\Apcu::apcu_exists($keys);
+ return Apcu::apcu_exists($keys);
}
function apcu_fetch($key, &$success = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu\Apcu::apcu_fetch($key, $success);
+ return Apcu::apcu_fetch($key, $success);
}
function apcu_store($key, $var = null, $ttl = 0)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Apcu\Apcu::apcu_store($key, $var, $ttl);
+ return Apcu::apcu_store($key, $var, $ttl);
}
} else {
function apcu_add($key, $var = null, $ttl = 0)
{
- return \_PhpScoper5ea00cc67502b\apc_add($key, $var, $ttl);
+ return apc_add($key, $var, $ttl);
}
function apcu_delete($key)
{
- return \_PhpScoper5ea00cc67502b\apc_delete($key);
+ return apc_delete($key);
}
function apcu_exists($keys)
{
- return \_PhpScoper5ea00cc67502b\apc_exists($keys);
+ return apc_exists($keys);
}
function apcu_fetch($key, &$success = null)
{
- return \_PhpScoper5ea00cc67502b\apc_fetch($key, $success);
+ return apc_fetch($key, $success);
}
function apcu_store($key, $var = null, $ttl = 0)
{
- return \_PhpScoper5ea00cc67502b\apc_store($key, $var, $ttl);
+ return apc_store($key, $var, $ttl);
}
}
- function apcu_cache_info($limited = \false)
+ function apcu_cache_info($limited = false)
{
- return \_PhpScoper5ea00cc67502b\apc_cache_info('user', $limited);
+ return apc_cache_info('user', $limited);
}
function apcu_cas($key, $old, $new)
{
- return \_PhpScoper5ea00cc67502b\apc_cas($key, $old, $new);
+ return apc_cas($key, $old, $new);
}
function apcu_clear_cache()
{
- return \_PhpScoper5ea00cc67502b\apc_clear_cache('user');
+ return apc_clear_cache('user');
}
- function apcu_dec($key, $step = 1, &$success = \false)
+ function apcu_dec($key, $step = 1, &$success = false)
{
- return \_PhpScoper5ea00cc67502b\apc_dec($key, $step, $success);
+ return apc_dec($key, $step, $success);
}
- function apcu_inc($key, $step = 1, &$success = \false)
+ function apcu_inc($key, $step = 1, &$success = false)
{
- return \_PhpScoper5ea00cc67502b\apc_inc($key, $step, $success);
+ return apc_inc($key, $step, $success);
}
- function apcu_sma_info($limited = \false)
+ function apcu_sma_info($limited = false)
{
- return \_PhpScoper5ea00cc67502b\apc_sma_info($limited);
+ return apc_sma_info($limited);
}
}
-if (!\class_exists('_PhpScoper5ea00cc67502b\\APCUIterator', \false) && \class_exists('_PhpScoper5ea00cc67502b\\APCIterator', \false)) {
- class APCUIterator extends \_PhpScoper5ea00cc67502b\APCIterator
+if (!class_exists('_PhpScoper5ea00cc67502b\\APCUIterator', false) && class_exists('_PhpScoper5ea00cc67502b\\APCIterator', false)) {
+ class APCUIterator extends APCIterator
{
- public function __construct($search = null, $format = \APC_ITER_ALL, $chunk_size = 100, $list = \APC_LIST_ACTIVE)
+ public function __construct($search = null, $format = APC_ITER_ALL, $chunk_size = 100, $list = APC_LIST_ACTIVE)
{
parent::__construct('user', $search, $format, $chunk_size, $list);
}
diff --git a/vendor/symfony/polyfill-apcu/index.php b/vendor/symfony/polyfill-apcu/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-apcu/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-ctype/Ctype.php b/vendor/symfony/polyfill-ctype/Ctype.php
index c3b723ce1..3686f310f 100644
--- a/vendor/symfony/polyfill-ctype/Ctype.php
+++ b/vendor/symfony/polyfill-ctype/Ctype.php
@@ -10,6 +10,11 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype;
+use function chr;
+use function is_int;
+use function is_string;
+use function preg_match;
+
/**
* Ctype implementation through regex.
*
@@ -31,7 +36,7 @@ final class Ctype
public static function ctype_alnum($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^A-Za-z0-9]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
}
/**
* Returns TRUE if every character in text is a letter, FALSE otherwise.
@@ -45,7 +50,7 @@ public static function ctype_alnum($text)
public static function ctype_alpha($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^A-Za-z]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
}
/**
* Returns TRUE if every character in text is a control character from the current locale, FALSE otherwise.
@@ -59,7 +64,7 @@ public static function ctype_alpha($text)
public static function ctype_cntrl($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^\\x00-\\x1f\\x7f]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^\\x00-\\x1f\\x7f]/', $text);
}
/**
* Returns TRUE if every character in the string text is a decimal digit, FALSE otherwise.
@@ -73,7 +78,7 @@ public static function ctype_cntrl($text)
public static function ctype_digit($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^0-9]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
}
/**
* Returns TRUE if every character in text is printable and actually creates visible output (no white space), FALSE otherwise.
@@ -87,7 +92,7 @@ public static function ctype_digit($text)
public static function ctype_graph($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^!-~]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
}
/**
* Returns TRUE if every character in text is a lowercase letter.
@@ -101,7 +106,7 @@ public static function ctype_graph($text)
public static function ctype_lower($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^a-z]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
}
/**
* Returns TRUE if every character in text will actually create output (including blanks). Returns FALSE if text contains control characters or characters that do not have any output or control function at all.
@@ -115,7 +120,7 @@ public static function ctype_lower($text)
public static function ctype_print($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^ -~]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
}
/**
* Returns TRUE if every character in text is printable, but neither letter, digit or blank, FALSE otherwise.
@@ -129,7 +134,7 @@ public static function ctype_print($text)
public static function ctype_punct($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^!-\\/\\:-@\\[-`\\{-~]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^!-\\/\\:-@\\[-`\\{-~]/', $text);
}
/**
* Returns TRUE if every character in text creates some sort of white space, FALSE otherwise. Besides the blank character this also includes tab, vertical tab, line feed, carriage return and form feed characters.
@@ -143,7 +148,7 @@ public static function ctype_punct($text)
public static function ctype_space($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^\\s]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^\\s]/', $text);
}
/**
* Returns TRUE if every character in text is an uppercase letter.
@@ -157,7 +162,7 @@ public static function ctype_space($text)
public static function ctype_upper($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^A-Z]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
}
/**
* Returns TRUE if every character in text is a hexadecimal 'digit', that is a decimal digit or a character from [A-Fa-f] , FALSE otherwise.
@@ -171,7 +176,7 @@ public static function ctype_upper($text)
public static function ctype_xdigit($text)
{
$text = self::convert_int_to_char_for_ctype($text);
- return \is_string($text) && '' !== $text && !\preg_match('/[^A-Fa-f0-9]/', $text);
+ return is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
}
/**
* Converts integers to their char versions according to normal ctype behaviour, if needed.
@@ -187,7 +192,7 @@ public static function ctype_xdigit($text)
*/
private static function convert_int_to_char_for_ctype($int)
{
- if (!\is_int($int)) {
+ if (!is_int($int)) {
return $int;
}
if ($int < -128 || $int > 255) {
@@ -196,6 +201,6 @@ private static function convert_int_to_char_for_ctype($int)
if ($int < 0) {
$int += 256;
}
- return \chr($int);
+ return chr($int);
}
}
diff --git a/vendor/symfony/polyfill-ctype/bootstrap.php b/vendor/symfony/polyfill-ctype/bootstrap.php
index 124f579d0..64eb3ed68 100644
--- a/vendor/symfony/polyfill-ctype/bootstrap.php
+++ b/vendor/symfony/polyfill-ctype/bootstrap.php
@@ -11,49 +11,52 @@
* file that was distributed with this source code.
*/
use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype as p;
-if (!\function_exists('ctype_alnum')) {
+use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype;
+use function function_exists;
+
+if (!function_exists('ctype_alnum')) {
function ctype_alnum($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_alnum($text);
+ return Ctype::ctype_alnum($text);
}
function ctype_alpha($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_alpha($text);
+ return Ctype::ctype_alpha($text);
}
function ctype_cntrl($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_cntrl($text);
+ return Ctype::ctype_cntrl($text);
}
function ctype_digit($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_digit($text);
+ return Ctype::ctype_digit($text);
}
function ctype_graph($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_graph($text);
+ return Ctype::ctype_graph($text);
}
function ctype_lower($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_lower($text);
+ return Ctype::ctype_lower($text);
}
function ctype_print($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_print($text);
+ return Ctype::ctype_print($text);
}
function ctype_punct($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_punct($text);
+ return Ctype::ctype_punct($text);
}
function ctype_space($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_space($text);
+ return Ctype::ctype_space($text);
}
function ctype_upper($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_upper($text);
+ return Ctype::ctype_upper($text);
}
function ctype_xdigit($text)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Ctype\Ctype::ctype_xdigit($text);
+ return Ctype::ctype_xdigit($text);
}
}
diff --git a/vendor/symfony/polyfill-ctype/index.php b/vendor/symfony/polyfill-ctype/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-ctype/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-intl-idn/Idn.php b/vendor/symfony/polyfill-intl-idn/Idn.php
index b87d9fe49..9ef8a6ab6 100644
--- a/vendor/symfony/polyfill-intl-idn/Idn.php
+++ b/vendor/symfony/polyfill-intl-idn/Idn.php
@@ -26,6 +26,23 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn;
+use function array_unique;
+use function count;
+use function explode;
+use function implode;
+use function mb_strlen;
+use function mb_strtolower;
+use function mb_substr;
+use function sort;
+use function strlen;
+use function strpos;
+use function strrpos;
+use function strtolower;
+use function substr;
+use function trigger_error;
+use const E_USER_DEPRECATED;
+use const PHP_VERSION_ID;
+
/**
* Partial intl implementation in pure PHP.
*
@@ -48,44 +65,44 @@ final class Idn
private static $decodeTable = array('a' => 0, 'b' => 1, 'c' => 2, 'd' => 3, 'e' => 4, 'f' => 5, 'g' => 6, 'h' => 7, 'i' => 8, 'j' => 9, 'k' => 10, 'l' => 11, 'm' => 12, 'n' => 13, 'o' => 14, 'p' => 15, 'q' => 16, 'r' => 17, 's' => 18, 't' => 19, 'u' => 20, 'v' => 21, 'w' => 22, 'x' => 23, 'y' => 24, 'z' => 25, '0' => 26, '1' => 27, '2' => 28, '3' => 29, '4' => 30, '5' => 31, '6' => 32, '7' => 33, '8' => 34, '9' => 35);
public static function idn_to_ascii($domain, $options, $variant, &$idna_info = array())
{
- if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
- @\trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
+ if (PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
+ @trigger_error('idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED);
}
if (self::INTL_IDNA_VARIANT_UTS46 === $variant) {
- $domain = \mb_strtolower($domain, 'utf-8');
+ $domain = mb_strtolower($domain, 'utf-8');
}
- $parts = \explode('.', $domain);
+ $parts = explode('.', $domain);
foreach ($parts as $i => &$part) {
- if ('' === $part && \count($parts) > 1 + $i) {
- return \false;
+ if ('' === $part && count($parts) > 1 + $i) {
+ return false;
}
- if (\false === ($part = self::encodePart($part))) {
- return \false;
+ if (false === ($part = self::encodePart($part))) {
+ return false;
}
}
- $output = \implode('.', $parts);
- $idna_info = array('result' => \strlen($output) > 255 ? \false : $output, 'isTransitionalDifferent' => \false, 'errors' => 0);
+ $output = implode('.', $parts);
+ $idna_info = array('result' => strlen($output) > 255 ? false : $output, 'isTransitionalDifferent' => false, 'errors' => 0);
return $idna_info['result'];
}
public static function idn_to_utf8($domain, $options, $variant, &$idna_info = array())
{
- if (\PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
- @\trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', \E_USER_DEPRECATED);
+ if (PHP_VERSION_ID >= 70200 && self::INTL_IDNA_VARIANT_2003 === $variant) {
+ @trigger_error('idn_to_utf8(): INTL_IDNA_VARIANT_2003 is deprecated', E_USER_DEPRECATED);
}
- $parts = \explode('.', $domain);
+ $parts = explode('.', $domain);
foreach ($parts as &$part) {
- $length = \strlen($part);
+ $length = strlen($part);
if ($length < 1 || 63 < $length) {
continue;
}
- if (0 !== \strpos($part, 'xn--')) {
+ if (0 !== strpos($part, 'xn--')) {
continue;
}
- $part = \substr($part, 4);
+ $part = substr($part, 4);
$part = self::decodePart($part);
}
- $output = \implode('.', $parts);
- $idna_info = array('result' => \strlen($output) > 255 ? \false : $output, 'isTransitionalDifferent' => \false, 'errors' => 0);
+ $output = implode('.', $parts);
+ $idna_info = array('result' => strlen($output) > 255 ? false : $output, 'isTransitionalDifferent' => false, 'errors' => 0);
return $idna_info['result'];
}
private static function encodePart($input)
@@ -94,7 +111,7 @@ private static function encodePart($input)
$n = 128;
$bias = 72;
$delta = 0;
- $h = $b = \count($codePoints['basic']);
+ $h = $b = count($codePoints['basic']);
$output = '';
foreach ($codePoints['basic'] as $code) {
$output .= mb_chr($code, 'utf-8');
@@ -105,10 +122,10 @@ private static function encodePart($input)
if ($b > 0) {
$output .= '-';
}
- $codePoints['nonBasic'] = \array_unique($codePoints['nonBasic']);
- \sort($codePoints['nonBasic']);
+ $codePoints['nonBasic'] = array_unique($codePoints['nonBasic']);
+ sort($codePoints['nonBasic']);
$i = 0;
- $length = \mb_strlen($input, 'utf-8');
+ $length = mb_strlen($input, 'utf-8');
while ($h < $length) {
$m = $codePoints['nonBasic'][$i++];
$delta += ($m - $n) * ($h + 1);
@@ -138,14 +155,14 @@ private static function encodePart($input)
++$n;
}
$output = 'xn--' . $output;
- return \strlen($output) < 1 || 63 < \strlen($output) ? \false : \strtolower($output);
+ return strlen($output) < 1 || 63 < strlen($output) ? false : strtolower($output);
}
private static function listCodePoints($input)
{
$codePoints = array('all' => array(), 'basic' => array(), 'nonBasic' => array());
- $length = \mb_strlen($input, 'utf-8');
+ $length = mb_strlen($input, 'utf-8');
for ($i = 0; $i < $length; ++$i) {
- $char = \mb_substr($input, $i, 1, 'utf-8');
+ $char = mb_substr($input, $i, 1, 'utf-8');
$code = mb_ord($char, 'utf-8');
if ($code < 128) {
$codePoints['all'][] = $codePoints['basic'][] = $code;
@@ -182,14 +199,14 @@ private static function decodePart($input)
$i = 0;
$bias = 72;
$output = '';
- $pos = \strrpos($input, '-');
- if (\false !== $pos) {
- $output = \substr($input, 0, $pos++);
+ $pos = strrpos($input, '-');
+ if (false !== $pos) {
+ $output = substr($input, 0, $pos++);
} else {
$pos = 0;
}
- $outputLength = \strlen($output);
- $inputLength = \strlen($input);
+ $outputLength = strlen($output);
+ $inputLength = strlen($input);
while ($pos < $inputLength) {
$oldi = $i;
$w = 1;
@@ -205,7 +222,7 @@ private static function decodePart($input)
$bias = self::adapt($i - $oldi, ++$outputLength, 0 === $oldi);
$n = $n + (int) ($i / $outputLength);
$i = $i % $outputLength;
- $output = \mb_substr($output, 0, $i, 'utf-8') . mb_chr($n, 'utf-8') . \mb_substr($output, $i, $outputLength - 1, 'utf-8');
+ $output = mb_substr($output, 0, $i, 'utf-8') . mb_chr($n, 'utf-8') . mb_substr($output, $i, $outputLength - 1, 'utf-8');
++$i;
}
return $output;
diff --git a/vendor/symfony/polyfill-intl-idn/bootstrap.php b/vendor/symfony/polyfill-intl-idn/bootstrap.php
index fdd134bb3..4a37c5f75 100644
--- a/vendor/symfony/polyfill-intl-idn/bootstrap.php
+++ b/vendor/symfony/polyfill-intl-idn/bootstrap.php
@@ -11,62 +11,71 @@
* file that was distributed with this source code.
*/
use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn as p;
-if (!\defined('IDNA_DEFAULT')) {
- \define('U_IDNA_PROHIBITED_ERROR', 66560);
- \define('U_IDNA_ERROR_START', 66560);
- \define('U_IDNA_UNASSIGNED_ERROR', 66561);
- \define('U_IDNA_CHECK_BIDI_ERROR', 66562);
- \define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563);
- \define('U_IDNA_ACE_PREFIX_ERROR', 66564);
- \define('U_IDNA_VERIFICATION_ERROR', 66565);
- \define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566);
- \define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567);
- \define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568);
- \define('U_IDNA_ERROR_LIMIT', 66569);
- \define('U_STRINGPREP_PROHIBITED_ERROR', 66560);
- \define('U_STRINGPREP_UNASSIGNED_ERROR', 66561);
- \define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562);
- \define('IDNA_DEFAULT', 0);
- \define('IDNA_ALLOW_UNASSIGNED', 1);
- \define('IDNA_USE_STD3_RULES', 2);
- \define('IDNA_CHECK_BIDI', 4);
- \define('IDNA_CHECK_CONTEXTJ', 8);
- \define('IDNA_NONTRANSITIONAL_TO_ASCII', 16);
- \define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32);
- \define('INTL_IDNA_VARIANT_2003', 0);
- \define('INTL_IDNA_VARIANT_UTS46', 1);
- \define('IDNA_ERROR_EMPTY_LABEL', 1);
- \define('IDNA_ERROR_LABEL_TOO_LONG', 2);
- \define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4);
- \define('IDNA_ERROR_LEADING_HYPHEN', 8);
- \define('IDNA_ERROR_TRAILING_HYPHEN', 16);
- \define('IDNA_ERROR_HYPHEN_3_4', 32);
- \define('IDNA_ERROR_LEADING_COMBINING_MARK', 64);
- \define('IDNA_ERROR_DISALLOWED', 128);
- \define('IDNA_ERROR_PUNYCODE', 256);
- \define('IDNA_ERROR_LABEL_HAS_DOT', 512);
- \define('IDNA_ERROR_INVALID_ACE_LABEL', 1024);
- \define('IDNA_ERROR_BIDI', 2048);
- \define('IDNA_ERROR_CONTEXTJ', 4096);
+use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn\Idn;
+use function define;
+use function defined;
+use function function_exists;
+use const IDNA_DEFAULT;
+use const INTL_IDNA_VARIANT_2003;
+use const INTL_IDNA_VARIANT_UTS46;
+use const PHP_VERSION_ID;
+
+if (!defined('IDNA_DEFAULT')) {
+ define('U_IDNA_PROHIBITED_ERROR', 66560);
+ define('U_IDNA_ERROR_START', 66560);
+ define('U_IDNA_UNASSIGNED_ERROR', 66561);
+ define('U_IDNA_CHECK_BIDI_ERROR', 66562);
+ define('U_IDNA_STD3_ASCII_RULES_ERROR', 66563);
+ define('U_IDNA_ACE_PREFIX_ERROR', 66564);
+ define('U_IDNA_VERIFICATION_ERROR', 66565);
+ define('U_IDNA_LABEL_TOO_LONG_ERROR', 66566);
+ define('U_IDNA_ZERO_LENGTH_LABEL_ERROR', 66567);
+ define('U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR', 66568);
+ define('U_IDNA_ERROR_LIMIT', 66569);
+ define('U_STRINGPREP_PROHIBITED_ERROR', 66560);
+ define('U_STRINGPREP_UNASSIGNED_ERROR', 66561);
+ define('U_STRINGPREP_CHECK_BIDI_ERROR', 66562);
+ define('IDNA_DEFAULT', 0);
+ define('IDNA_ALLOW_UNASSIGNED', 1);
+ define('IDNA_USE_STD3_RULES', 2);
+ define('IDNA_CHECK_BIDI', 4);
+ define('IDNA_CHECK_CONTEXTJ', 8);
+ define('IDNA_NONTRANSITIONAL_TO_ASCII', 16);
+ define('IDNA_NONTRANSITIONAL_TO_UNICODE', 32);
+ define('INTL_IDNA_VARIANT_2003', 0);
+ define('INTL_IDNA_VARIANT_UTS46', 1);
+ define('IDNA_ERROR_EMPTY_LABEL', 1);
+ define('IDNA_ERROR_LABEL_TOO_LONG', 2);
+ define('IDNA_ERROR_DOMAIN_NAME_TOO_LONG', 4);
+ define('IDNA_ERROR_LEADING_HYPHEN', 8);
+ define('IDNA_ERROR_TRAILING_HYPHEN', 16);
+ define('IDNA_ERROR_HYPHEN_3_4', 32);
+ define('IDNA_ERROR_LEADING_COMBINING_MARK', 64);
+ define('IDNA_ERROR_DISALLOWED', 128);
+ define('IDNA_ERROR_PUNYCODE', 256);
+ define('IDNA_ERROR_LABEL_HAS_DOT', 512);
+ define('IDNA_ERROR_INVALID_ACE_LABEL', 1024);
+ define('IDNA_ERROR_BIDI', 2048);
+ define('IDNA_ERROR_CONTEXTJ', 4096);
}
-if (!\function_exists('idn_to_ascii')) {
- if (\PHP_VERSION_ID < 70400) {
- function idn_to_ascii($domain, $options = \IDNA_DEFAULT, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = array())
+if (!function_exists('idn_to_ascii')) {
+ if (PHP_VERSION_ID < 70400) {
+ function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array())
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn\Idn::idn_to_ascii($domain, $options, $variant, $idna_info);
+ return Idn::idn_to_ascii($domain, $options, $variant, $idna_info);
}
- function idn_to_utf8($domain, $options = \IDNA_DEFAULT, $variant = \INTL_IDNA_VARIANT_2003, &$idna_info = array())
+ function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_2003, &$idna_info = array())
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn\Idn::idn_to_utf8($domain, $options, $variant, $idna_info);
+ return Idn::idn_to_utf8($domain, $options, $variant, $idna_info);
}
} else {
- function idn_to_ascii($domain, $options = \IDNA_DEFAULT, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = array())
+ function idn_to_ascii($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array())
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn\Idn::idn_to_ascii($domain, $options, $variant, $idna_info);
+ return Idn::idn_to_ascii($domain, $options, $variant, $idna_info);
}
- function idn_to_utf8($domain, $options = \IDNA_DEFAULT, $variant = \INTL_IDNA_VARIANT_UTS46, &$idna_info = array())
+ function idn_to_utf8($domain, $options = IDNA_DEFAULT, $variant = INTL_IDNA_VARIANT_UTS46, &$idna_info = array())
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Intl\Idn\Idn::idn_to_utf8($domain, $options, $variant, $idna_info);
+ return Idn::idn_to_utf8($domain, $options, $variant, $idna_info);
}
}
}
diff --git a/vendor/symfony/polyfill-intl-idn/index.php b/vendor/symfony/polyfill-intl-idn/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-intl-idn/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-mbstring/Mbstring.php b/vendor/symfony/polyfill-mbstring/Mbstring.php
index e218d16ba..4efc9fb0b 100644
--- a/vendor/symfony/polyfill-mbstring/Mbstring.php
+++ b/vendor/symfony/polyfill-mbstring/Mbstring.php
@@ -10,6 +10,62 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring;
+use function array_map;
+use function array_walk_recursive;
+use function base64_decode;
+use function base64_encode;
+use function chr;
+use function count;
+use function explode;
+use function file_exists;
+use function floor;
+use function gettype;
+use function hexdec;
+use function html_entity_decode;
+use function htmlentities;
+use function iconv;
+use function iconv_mime_decode;
+use function iconv_strlen;
+use function iconv_strpos;
+use function iconv_strrpos;
+use function iconv_substr;
+use function is_array;
+use function is_object;
+use function is_scalar;
+use function mb_convert_encoding;
+use function mb_internal_encoding;
+use function mb_strlen;
+use function mb_substr;
+use function method_exists;
+use function ord;
+use function preg_match;
+use function preg_replace;
+use function preg_replace_callback;
+use function preg_split;
+use function sprintf;
+use function str_replace;
+use function strcasecmp;
+use function strlen;
+use function strncmp;
+use function strpos;
+use function strrchr;
+use function strrpos;
+use function strtolower;
+use function strtoupper;
+use function substr;
+use function substr_count;
+use function substr_replace;
+use function trigger_error;
+use function unpack;
+use const E_USER_WARNING;
+use const ENT_COMPAT;
+use const MB_CASE_LOWER;
+use const MB_CASE_TITLE;
+use const MB_CASE_UPPER;
+use const PHP_INT_MAX;
+use const PREG_SPLIT_DELIM_CAPTURE;
+use const PREG_SPLIT_NO_EMPTY;
+
/**
* Partial mbstring implementation in PHP, iconv based, UTF-8 centric.
*
@@ -66,71 +122,71 @@
*/
final class Mbstring
{
- const MB_CASE_FOLD = \PHP_INT_MAX;
+ const MB_CASE_FOLD = PHP_INT_MAX;
private static $encodingList = array('ASCII', 'UTF-8');
private static $language = 'neutral';
private static $internalEncoding = 'UTF-8';
private static $caseFold = array(array('µ', 'ſ', "ͅ", 'ς', "ϐ", "ϑ", "ϕ", "ϖ", "ϰ", "ϱ", "ϵ", "ẛ", "ι"), array('μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "ṡ", 'ι'));
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
{
- if (\is_array($fromEncoding) || \false !== \strpos($fromEncoding, ',')) {
+ if (is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) {
$fromEncoding = self::mb_detect_encoding($s, $fromEncoding);
} else {
$fromEncoding = self::getEncoding($fromEncoding);
}
$toEncoding = self::getEncoding($toEncoding);
if ('BASE64' === $fromEncoding) {
- $s = \base64_decode($s);
+ $s = base64_decode($s);
$fromEncoding = $toEncoding;
}
if ('BASE64' === $toEncoding) {
- return \base64_encode($s);
+ return base64_encode($s);
}
if ('HTML-ENTITIES' === $toEncoding || 'HTML' === $toEncoding) {
if ('HTML-ENTITIES' === $fromEncoding || 'HTML' === $fromEncoding) {
$fromEncoding = 'Windows-1252';
}
if ('UTF-8' !== $fromEncoding) {
- $s = \iconv($fromEncoding, 'UTF-8//IGNORE', $s);
+ $s = iconv($fromEncoding, 'UTF-8//IGNORE', $s);
}
- return \preg_replace_callback('/[\\x80-\\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s);
+ return preg_replace_callback('/[\\x80-\\xFF]+/', array(__CLASS__, 'html_encoding_callback'), $s);
}
if ('HTML-ENTITIES' === $fromEncoding) {
- $s = \html_entity_decode($s, \ENT_COMPAT, 'UTF-8');
+ $s = html_entity_decode($s, ENT_COMPAT, 'UTF-8');
$fromEncoding = 'UTF-8';
}
- return \iconv($fromEncoding, $toEncoding . '//IGNORE', $s);
+ return iconv($fromEncoding, $toEncoding . '//IGNORE', $s);
}
public static function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
{
$vars = array(&$a, &$b, &$c, &$d, &$e, &$f);
- $ok = \true;
- \array_walk_recursive($vars, function (&$v) use(&$ok, $toEncoding, $fromEncoding) {
- if (\false === ($v = \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding))) {
- $ok = \false;
+ $ok = true;
+ array_walk_recursive($vars, function (&$v) use(&$ok, $toEncoding, $fromEncoding) {
+ if (false === ($v = Mbstring::mb_convert_encoding($v, $toEncoding, $fromEncoding))) {
+ $ok = false;
}
});
- return $ok ? $fromEncoding : \false;
+ return $ok ? $fromEncoding : false;
}
public static function mb_decode_mimeheader($s)
{
- return \iconv_mime_decode($s, 2, self::$internalEncoding);
+ return iconv_mime_decode($s, 2, self::$internalEncoding);
}
public static function mb_encode_mimeheader($s, $charset = null, $transferEncoding = null, $linefeed = null, $indent = null)
{
- \trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', \E_USER_WARNING);
+ trigger_error('mb_encode_mimeheader() is bugged. Please use iconv_mime_encode() instead', E_USER_WARNING);
}
public static function mb_decode_numericentity($s, $convmap, $encoding = null)
{
- if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) {
- \trigger_error('mb_decode_numericentity() expects parameter 1 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING);
+ if (null !== $s && !is_scalar($s) && !(is_object($s) && method_exists($s, '__toString'))) {
+ trigger_error('mb_decode_numericentity() expects parameter 1 to be string, ' . gettype($s) . ' given', E_USER_WARNING);
return null;
}
- if (!\is_array($convmap) || !$convmap) {
- return \false;
+ if (!is_array($convmap) || !$convmap) {
+ return false;
}
- if (null !== $encoding && !\is_scalar($encoding)) {
- \trigger_error('mb_decode_numericentity() expects parameter 3 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING);
+ if (null !== $encoding && !is_scalar($encoding)) {
+ trigger_error('mb_decode_numericentity() expects parameter 3 to be string, ' . gettype($s) . ' given', E_USER_WARNING);
return '';
// Instead of null (cf. mb_encode_numericentity).
}
@@ -141,23 +197,23 @@ public static function mb_decode_numericentity($s, $convmap, $encoding = null)
$encoding = self::getEncoding($encoding);
if ('UTF-8' === $encoding) {
$encoding = null;
- if (!\preg_match('//u', $s)) {
- $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
+ if (!preg_match('//u', $s)) {
+ $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
- $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
- $cnt = \floor(\count($convmap) / 4) * 4;
+ $cnt = floor(count($convmap) / 4) * 4;
for ($i = 0; $i < $cnt; $i += 4) {
// collector_decode_htmlnumericentity ignores $convmap[$i + 3]
$convmap[$i] += $convmap[$i + 2];
$convmap[$i + 1] += $convmap[$i + 2];
}
- $s = \preg_replace_callback('/(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use($cnt, $convmap) {
- $c = isset($m[2]) ? (int) \hexdec($m[2]) : $m[1];
+ $s = preg_replace_callback('/(?:0*([0-9]+)|x0*([0-9a-fA-F]+))(?!&);?/', function (array $m) use($cnt, $convmap) {
+ $c = isset($m[2]) ? (int) hexdec($m[2]) : $m[1];
for ($i = 0; $i < $cnt; $i += 4) {
if ($c >= $convmap[$i] && $c <= $convmap[$i + 1]) {
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_chr($c - $convmap[$i + 2]);
+ return Mbstring::mb_chr($c - $convmap[$i + 2]);
}
}
return $m[0];
@@ -165,24 +221,24 @@ public static function mb_decode_numericentity($s, $convmap, $encoding = null)
if (null === $encoding) {
return $s;
}
- return \iconv('UTF-8', $encoding . '//IGNORE', $s);
+ return iconv('UTF-8', $encoding . '//IGNORE', $s);
}
- public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = \false)
+ public static function mb_encode_numericentity($s, $convmap, $encoding = null, $is_hex = false)
{
- if (null !== $s && !\is_scalar($s) && !(\is_object($s) && \method_exists($s, '__toString'))) {
- \trigger_error('mb_encode_numericentity() expects parameter 1 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING);
+ if (null !== $s && !is_scalar($s) && !(is_object($s) && method_exists($s, '__toString'))) {
+ trigger_error('mb_encode_numericentity() expects parameter 1 to be string, ' . gettype($s) . ' given', E_USER_WARNING);
return null;
}
- if (!\is_array($convmap) || !$convmap) {
- return \false;
+ if (!is_array($convmap) || !$convmap) {
+ return false;
}
- if (null !== $encoding && !\is_scalar($encoding)) {
- \trigger_error('mb_encode_numericentity() expects parameter 3 to be string, ' . \gettype($s) . ' given', \E_USER_WARNING);
+ if (null !== $encoding && !is_scalar($encoding)) {
+ trigger_error('mb_encode_numericentity() expects parameter 3 to be string, ' . gettype($s) . ' given', E_USER_WARNING);
return null;
// Instead of '' (cf. mb_decode_numericentity).
}
- if (null !== $is_hex && !\is_scalar($is_hex)) {
- \trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, ' . \gettype($s) . ' given', \E_USER_WARNING);
+ if (null !== $is_hex && !is_scalar($is_hex)) {
+ trigger_error('mb_encode_numericentity() expects parameter 4 to be boolean, ' . gettype($s) . ' given', E_USER_WARNING);
return null;
}
$s = (string) $s;
@@ -192,26 +248,26 @@ public static function mb_encode_numericentity($s, $convmap, $encoding = null, $
$encoding = self::getEncoding($encoding);
if ('UTF-8' === $encoding) {
$encoding = null;
- if (!\preg_match('//u', $s)) {
- $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
+ if (!preg_match('//u', $s)) {
+ $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
- $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
- static $ulenMask = array("" => 2, "" => 2, "" => 3, "" => 4);
- $cnt = \floor(\count($convmap) / 4) * 4;
+ static $ulenMask = array("�" => 2, "�" => 2, "�" => 3, "�" => 4);
+ $cnt = floor(count($convmap) / 4) * 4;
$i = 0;
- $len = \strlen($s);
+ $len = strlen($s);
$result = '';
while ($i < $len) {
- $ulen = $s[$i] < "" ? 1 : $ulenMask[$s[$i] & ""];
- $uchr = \substr($s, $i, $ulen);
+ $ulen = $s[$i] < "�" ? 1 : $ulenMask[$s[$i] & "�"];
+ $uchr = substr($s, $i, $ulen);
$i += $ulen;
$c = self::mb_ord($uchr);
for ($j = 0; $j < $cnt; $j += 4) {
if ($c >= $convmap[$j] && $c <= $convmap[$j + 1]) {
$cOffset = $c + $convmap[$j + 2] & $convmap[$j + 3];
- $result .= $is_hex ? \sprintf('%X;', $cOffset) : '' . $cOffset . ';';
+ $result .= $is_hex ? sprintf('%X;', $cOffset) : '' . $cOffset . ';';
continue 2;
}
}
@@ -220,7 +276,7 @@ public static function mb_encode_numericentity($s, $convmap, $encoding = null, $
if (null === $encoding) {
return $result;
}
- return \iconv('UTF-8', $encoding . '//IGNORE', $result);
+ return iconv('UTF-8', $encoding . '//IGNORE', $result);
}
public static function mb_convert_case($s, $mode, $encoding = null)
{
@@ -231,20 +287,20 @@ public static function mb_convert_case($s, $mode, $encoding = null)
$encoding = self::getEncoding($encoding);
if ('UTF-8' === $encoding) {
$encoding = null;
- if (!\preg_match('//u', $s)) {
- $s = @\iconv('UTF-8', 'UTF-8//IGNORE', $s);
+ if (!preg_match('//u', $s)) {
+ $s = @iconv('UTF-8', 'UTF-8//IGNORE', $s);
}
} else {
- $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
- if (\MB_CASE_TITLE == $mode) {
+ if (MB_CASE_TITLE == $mode) {
static $titleRegexp = null;
if (null === $titleRegexp) {
$titleRegexp = self::getData('titleCaseRegexp');
}
- $s = \preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s);
+ $s = preg_replace_callback($titleRegexp, array(__CLASS__, 'title_case'), $s);
} else {
- if (\MB_CASE_UPPER == $mode) {
+ if (MB_CASE_UPPER == $mode) {
static $upper = null;
if (null === $upper) {
$upper = self::getData('upperCase');
@@ -252,7 +308,7 @@ public static function mb_convert_case($s, $mode, $encoding = null)
$map = $upper;
} else {
if (self::MB_CASE_FOLD === $mode) {
- $s = \str_replace(self::$caseFold[0], self::$caseFold[1], $s);
+ $s = str_replace(self::$caseFold[0], self::$caseFold[1], $s);
}
static $lower = null;
if (null === $lower) {
@@ -260,23 +316,23 @@ public static function mb_convert_case($s, $mode, $encoding = null)
}
$map = $lower;
}
- static $ulenMask = array("" => 2, "" => 2, "" => 3, "" => 4);
+ static $ulenMask = array("�" => 2, "�" => 2, "�" => 3, "�" => 4);
$i = 0;
- $len = \strlen($s);
+ $len = strlen($s);
while ($i < $len) {
- $ulen = $s[$i] < "" ? 1 : $ulenMask[$s[$i] & ""];
- $uchr = \substr($s, $i, $ulen);
+ $ulen = $s[$i] < "�" ? 1 : $ulenMask[$s[$i] & "�"];
+ $uchr = substr($s, $i, $ulen);
$i += $ulen;
if (isset($map[$uchr])) {
$uchr = $map[$uchr];
- $nlen = \strlen($uchr);
+ $nlen = strlen($uchr);
if ($nlen == $ulen) {
$nlen = $i;
do {
$s[--$nlen] = $uchr[--$ulen];
} while ($ulen);
} else {
- $s = \substr_replace($s, $uchr, $i - $ulen, $ulen);
+ $s = substr_replace($s, $uchr, $i - $ulen, $ulen);
$len += $nlen - $ulen;
$i += $nlen - $ulen;
}
@@ -286,7 +342,7 @@ public static function mb_convert_case($s, $mode, $encoding = null)
if (null === $encoding) {
return $s;
}
- return \iconv('UTF-8', $encoding . '//IGNORE', $s);
+ return iconv('UTF-8', $encoding . '//IGNORE', $s);
}
public static function mb_internal_encoding($encoding = null)
{
@@ -294,24 +350,24 @@ public static function mb_internal_encoding($encoding = null)
return self::$internalEncoding;
}
$encoding = self::getEncoding($encoding);
- if ('UTF-8' === $encoding || \false !== @\iconv($encoding, $encoding, ' ')) {
+ if ('UTF-8' === $encoding || false !== @iconv($encoding, $encoding, ' ')) {
self::$internalEncoding = $encoding;
- return \true;
+ return true;
}
- return \false;
+ return false;
}
public static function mb_language($lang = null)
{
if (null === $lang) {
return self::$language;
}
- switch ($lang = \strtolower($lang)) {
+ switch ($lang = strtolower($lang)) {
case 'uni':
case 'neutral':
self::$language = $lang;
- return \true;
+ return true;
}
- return \false;
+ return false;
}
public static function mb_list_encodings()
{
@@ -319,68 +375,68 @@ public static function mb_list_encodings()
}
public static function mb_encoding_aliases($encoding)
{
- switch (\strtoupper($encoding)) {
+ switch (strtoupper($encoding)) {
case 'UTF8':
case 'UTF-8':
return array('utf8');
}
- return \false;
+ return false;
}
public static function mb_check_encoding($var = null, $encoding = null)
{
if (null === $encoding) {
if (null === $var) {
- return \false;
+ return false;
}
$encoding = self::$internalEncoding;
}
- return self::mb_detect_encoding($var, array($encoding)) || \false !== @\iconv($encoding, $encoding, $var);
+ return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var);
}
- public static function mb_detect_encoding($str, $encodingList = null, $strict = \false)
+ public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
{
if (null === $encodingList) {
$encodingList = self::$encodingList;
} else {
- if (!\is_array($encodingList)) {
- $encodingList = \array_map('trim', \explode(',', $encodingList));
+ if (!is_array($encodingList)) {
+ $encodingList = array_map('trim', explode(',', $encodingList));
}
- $encodingList = \array_map('strtoupper', $encodingList);
+ $encodingList = array_map('strtoupper', $encodingList);
}
foreach ($encodingList as $enc) {
switch ($enc) {
case 'ASCII':
- if (!\preg_match('/[\\x80-\\xFF]/', $str)) {
+ if (!preg_match('/[\\x80-\\xFF]/', $str)) {
return $enc;
}
break;
case 'UTF8':
case 'UTF-8':
- if (\preg_match('//u', $str)) {
+ if (preg_match('//u', $str)) {
return 'UTF-8';
}
break;
default:
- if (0 === \strncmp($enc, 'ISO-8859-', 9)) {
+ if (0 === strncmp($enc, 'ISO-8859-', 9)) {
return $enc;
}
}
}
- return \false;
+ return false;
}
public static function mb_detect_order($encodingList = null)
{
if (null === $encodingList) {
return self::$encodingList;
}
- if (!\is_array($encodingList)) {
- $encodingList = \array_map('trim', \explode(',', $encodingList));
+ if (!is_array($encodingList)) {
+ $encodingList = array_map('trim', explode(',', $encodingList));
}
- $encodingList = \array_map('strtoupper', $encodingList);
+ $encodingList = array_map('strtoupper', $encodingList);
foreach ($encodingList as $enc) {
switch ($enc) {
default:
- if (\strncmp($enc, 'ISO-8859-', 9)) {
- return \false;
+ if (strncmp($enc, 'ISO-8859-', 9)) {
+ return false;
}
// no break
case 'ASCII':
@@ -389,34 +445,34 @@ public static function mb_detect_order($encodingList = null)
}
}
self::$encodingList = $encodingList;
- return \true;
+ return true;
}
public static function mb_strlen($s, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return \strlen($s);
+ return strlen($s);
}
- return @\iconv_strlen($s, $encoding);
+ return @iconv_strlen($s, $encoding);
}
public static function mb_strpos($haystack, $needle, $offset = 0, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return \strpos($haystack, $needle, $offset);
+ return strpos($haystack, $needle, $offset);
}
$needle = (string) $needle;
if ('' === $needle) {
- \trigger_error(__METHOD__ . ': Empty delimiter', \E_USER_WARNING);
- return \false;
+ trigger_error(__METHOD__ . ': Empty delimiter', E_USER_WARNING);
+ return false;
}
- return \iconv_strpos($haystack, $needle, $offset, $encoding);
+ return iconv_strpos($haystack, $needle, $offset, $encoding);
}
public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return \strrpos($haystack, $needle, $offset);
+ return strrpos($haystack, $needle, $offset);
}
if ($offset != (int) $offset) {
$offset = 0;
@@ -430,21 +486,21 @@ public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = n
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
}
}
- $pos = \iconv_strrpos($haystack, $needle, $encoding);
- return \false !== $pos ? $offset + $pos : \false;
+ $pos = iconv_strrpos($haystack, $needle, $encoding);
+ return false !== $pos ? $offset + $pos : false;
}
public static function mb_str_split($string, $split_length = 1, $encoding = null)
{
- if (null !== $string && !\is_scalar($string) && !(\is_object($string) && \method_exists($string, '__toString'))) {
- \trigger_error('mb_str_split() expects parameter 1 to be string, ' . \gettype($string) . ' given', \E_USER_WARNING);
+ if (null !== $string && !is_scalar($string) && !(is_object($string) && method_exists($string, '__toString'))) {
+ trigger_error('mb_str_split() expects parameter 1 to be string, ' . gettype($string) . ' given', E_USER_WARNING);
return null;
}
if (1 > ($split_length = (int) $split_length)) {
- \trigger_error('The length of each segment must be greater than zero', \E_USER_WARNING);
- return \false;
+ trigger_error('The length of each segment must be greater than zero', E_USER_WARNING);
+ return false;
}
if (null === $encoding) {
- $encoding = \mb_internal_encoding();
+ $encoding = mb_internal_encoding();
}
if ('UTF-8' === ($encoding = self::getEncoding($encoding))) {
$rx = '/(';
@@ -453,38 +509,38 @@ public static function mb_str_split($string, $split_length = 1, $encoding = null
$split_length -= 65535;
}
$rx .= '.{' . $split_length . '})/us';
- return \preg_split($rx, $string, null, \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY);
+ return preg_split($rx, $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
}
$result = array();
- $length = \mb_strlen($string, $encoding);
+ $length = mb_strlen($string, $encoding);
for ($i = 0; $i < $length; $i += $split_length) {
- $result[] = \mb_substr($string, $i, $split_length, $encoding);
+ $result[] = mb_substr($string, $i, $split_length, $encoding);
}
return $result;
}
public static function mb_strtolower($s, $encoding = null)
{
- return self::mb_convert_case($s, \MB_CASE_LOWER, $encoding);
+ return self::mb_convert_case($s, MB_CASE_LOWER, $encoding);
}
public static function mb_strtoupper($s, $encoding = null)
{
- return self::mb_convert_case($s, \MB_CASE_UPPER, $encoding);
+ return self::mb_convert_case($s, MB_CASE_UPPER, $encoding);
}
public static function mb_substitute_character($c = null)
{
- if (0 === \strcasecmp($c, 'none')) {
- return \true;
+ if (0 === strcasecmp($c, 'none')) {
+ return true;
}
- return null !== $c ? \false : 'none';
+ return null !== $c ? false : 'none';
}
public static function mb_substr($s, $start, $length = null, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return (string) \substr($s, $start, null === $length ? 2147483647 : $length);
+ return (string) substr($s, $start, null === $length ? 2147483647 : $length);
}
if ($start < 0) {
- $start = \iconv_strlen($s, $encoding) + $start;
+ $start = iconv_strlen($s, $encoding) + $start;
if ($start < 0) {
$start = 0;
}
@@ -492,12 +548,12 @@ public static function mb_substr($s, $start, $length = null, $encoding = null)
if (null === $length) {
$length = 2147483647;
} elseif ($length < 0) {
- $length = \iconv_strlen($s, $encoding) + $length - $start;
+ $length = iconv_strlen($s, $encoding) + $length - $start;
if ($length < 0) {
return '';
}
}
- return (string) \iconv_substr($s, $start, $length, $encoding);
+ return (string) iconv_substr($s, $start, $length, $encoding);
}
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
{
@@ -505,22 +561,22 @@ public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = n
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
return self::mb_strpos($haystack, $needle, $offset, $encoding);
}
- public static function mb_stristr($haystack, $needle, $part = \false, $encoding = null)
+ public static function mb_stristr($haystack, $needle, $part = false, $encoding = null)
{
$pos = self::mb_stripos($haystack, $needle, 0, $encoding);
return self::getSubpart($pos, $part, $haystack, $encoding);
}
- public static function mb_strrchr($haystack, $needle, $part = \false, $encoding = null)
+ public static function mb_strrchr($haystack, $needle, $part = false, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('CP850' === $encoding || 'ASCII' === $encoding) {
- return \strrchr($haystack, $needle, $part);
+ return strrchr($haystack, $needle, $part);
}
$needle = self::mb_substr($needle, 0, 1, $encoding);
- $pos = \iconv_strrpos($haystack, $needle, $encoding);
+ $pos = iconv_strrpos($haystack, $needle, $encoding);
return self::getSubpart($pos, $part, $haystack, $encoding);
}
- public static function mb_strrichr($haystack, $needle, $part = \false, $encoding = null)
+ public static function mb_strrichr($haystack, $needle, $part = false, $encoding = null)
{
$needle = self::mb_substr($needle, 0, 1, $encoding);
$pos = self::mb_strripos($haystack, $needle, $encoding);
@@ -532,16 +588,16 @@ public static function mb_strripos($haystack, $needle, $offset = 0, $encoding =
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
}
- public static function mb_strstr($haystack, $needle, $part = \false, $encoding = null)
+ public static function mb_strstr($haystack, $needle, $part = false, $encoding = null)
{
- $pos = \strpos($haystack, $needle);
- if (\false === $pos) {
- return \false;
+ $pos = strpos($haystack, $needle);
+ if (false === $pos) {
+ return false;
}
if ($part) {
- return \substr($haystack, 0, $pos);
+ return substr($haystack, 0, $pos);
}
- return \substr($haystack, $pos);
+ return substr($haystack, $pos);
}
public static function mb_get_info($type = 'all')
{
@@ -552,11 +608,11 @@ public static function mb_get_info($type = 'all')
if (isset($info[$type])) {
return $info[$type];
}
- return \false;
+ return false;
}
public static function mb_http_input($type = '')
{
- return \false;
+ return false;
}
public static function mb_http_output($encoding = null)
{
@@ -566,14 +622,14 @@ public static function mb_strwidth($s, $encoding = null)
{
$encoding = self::getEncoding($encoding);
if ('UTF-8' !== $encoding) {
- $s = \iconv($encoding, 'UTF-8//IGNORE', $s);
+ $s = iconv($encoding, 'UTF-8//IGNORE', $s);
}
- $s = \preg_replace('/[\\x{1100}-\\x{115F}\\x{2329}\\x{232A}\\x{2E80}-\\x{303E}\\x{3040}-\\x{A4CF}\\x{AC00}-\\x{D7A3}\\x{F900}-\\x{FAFF}\\x{FE10}-\\x{FE19}\\x{FE30}-\\x{FE6F}\\x{FF00}-\\x{FF60}\\x{FFE0}-\\x{FFE6}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}]/u', '', $s, -1, $wide);
- return ($wide << 1) + \iconv_strlen($s, 'UTF-8');
+ $s = preg_replace('/[\\x{1100}-\\x{115F}\\x{2329}\\x{232A}\\x{2E80}-\\x{303E}\\x{3040}-\\x{A4CF}\\x{AC00}-\\x{D7A3}\\x{F900}-\\x{FAFF}\\x{FE10}-\\x{FE19}\\x{FE30}-\\x{FE6F}\\x{FF00}-\\x{FF60}\\x{FFE0}-\\x{FFE6}\\x{20000}-\\x{2FFFD}\\x{30000}-\\x{3FFFD}]/u', '', $s, -1, $wide);
+ return ($wide << 1) + iconv_strlen($s, 'UTF-8');
}
public static function mb_substr_count($haystack, $needle, $encoding = null)
{
- return \substr_count($haystack, $needle);
+ return substr_count($haystack, $needle);
}
public static function mb_output_handler($contents, $status)
{
@@ -582,28 +638,28 @@ public static function mb_output_handler($contents, $status)
public static function mb_chr($code, $encoding = null)
{
if (0x80 > ($code %= 0x200000)) {
- $s = \chr($code);
+ $s = chr($code);
} elseif (0x800 > $code) {
- $s = \chr(0xc0 | $code >> 6) . \chr(0x80 | $code & 0x3f);
+ $s = chr(0xc0 | $code >> 6) . chr(0x80 | $code & 0x3f);
} elseif (0x10000 > $code) {
- $s = \chr(0xe0 | $code >> 12) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f);
+ $s = chr(0xe0 | $code >> 12) . chr(0x80 | $code >> 6 & 0x3f) . chr(0x80 | $code & 0x3f);
} else {
- $s = \chr(0xf0 | $code >> 18) . \chr(0x80 | $code >> 12 & 0x3f) . \chr(0x80 | $code >> 6 & 0x3f) . \chr(0x80 | $code & 0x3f);
+ $s = chr(0xf0 | $code >> 18) . chr(0x80 | $code >> 12 & 0x3f) . chr(0x80 | $code >> 6 & 0x3f) . chr(0x80 | $code & 0x3f);
}
if ('UTF-8' !== ($encoding = self::getEncoding($encoding))) {
- $s = \mb_convert_encoding($s, $encoding, 'UTF-8');
+ $s = mb_convert_encoding($s, $encoding, 'UTF-8');
}
return $s;
}
public static function mb_ord($s, $encoding = null)
{
if ('UTF-8' !== ($encoding = self::getEncoding($encoding))) {
- $s = \mb_convert_encoding($s, 'UTF-8', $encoding);
+ $s = mb_convert_encoding($s, 'UTF-8', $encoding);
}
- if (1 === \strlen($s)) {
- return \ord($s);
+ if (1 === strlen($s)) {
+ return ord($s);
}
- $code = ($s = \unpack('C*', \substr($s, 0, 4))) ? $s[1] : 0;
+ $code = ($s = unpack('C*', substr($s, 0, 4))) ? $s[1] : 0;
if (0xf0 <= $code) {
return ($code - 0xf0 << 18) + ($s[2] - 0x80 << 12) + ($s[3] - 0x80 << 6) + $s[4] - 0x80;
}
@@ -617,8 +673,8 @@ public static function mb_ord($s, $encoding = null)
}
private static function getSubpart($pos, $part, $haystack, $encoding)
{
- if (\false === $pos) {
- return \false;
+ if (false === $pos) {
+ return false;
}
if ($part) {
return self::mb_substr($haystack, 0, $pos, $encoding);
@@ -629,10 +685,10 @@ private static function html_encoding_callback(array $m)
{
$i = 1;
$entities = '';
- $m = \unpack('C*', \htmlentities($m[0], \ENT_COMPAT, 'UTF-8'));
+ $m = unpack('C*', htmlentities($m[0], ENT_COMPAT, 'UTF-8'));
while (isset($m[$i])) {
if (0x80 > $m[$i]) {
- $entities .= \chr($m[$i++]);
+ $entities .= chr($m[$i++]);
continue;
}
if (0xf0 <= $m[$i]) {
@@ -648,14 +704,14 @@ private static function html_encoding_callback(array $m)
}
private static function title_case(array $s)
{
- return self::mb_convert_case($s[1], \MB_CASE_UPPER, 'UTF-8') . self::mb_convert_case($s[2], \MB_CASE_LOWER, 'UTF-8');
+ return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8') . self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8');
}
private static function getData($file)
{
- if (\file_exists($file = __DIR__ . '/Resources/unidata/' . $file . '.php')) {
+ if (file_exists($file = __DIR__ . '/Resources/unidata/' . $file . '.php')) {
return require $file;
}
- return \false;
+ return false;
}
private static function getEncoding($encoding)
{
@@ -665,7 +721,7 @@ private static function getEncoding($encoding)
if ('UTF-8' === $encoding) {
return 'UTF-8';
}
- $encoding = \strtoupper($encoding);
+ $encoding = strtoupper($encoding);
if ('8BIT' === $encoding || 'BINARY' === $encoding) {
return 'CP850';
}
diff --git a/vendor/symfony/polyfill-mbstring/Resources/index.php b/vendor/symfony/polyfill-mbstring/Resources/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-mbstring/Resources/unidata/index.php b/vendor/symfony/polyfill-mbstring/Resources/unidata/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/Resources/unidata/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-mbstring/bootstrap.php b/vendor/symfony/polyfill-mbstring/bootstrap.php
index f2462fc52..c40523898 100644
--- a/vendor/symfony/polyfill-mbstring/bootstrap.php
+++ b/vendor/symfony/polyfill-mbstring/bootstrap.php
@@ -11,157 +11,163 @@
* file that was distributed with this source code.
*/
use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring as p;
-if (!\defined('MB_CASE_UPPER')) {
- \define('MB_CASE_UPPER', 0);
- \define('MB_CASE_LOWER', 1);
- \define('MB_CASE_TITLE', 2);
+use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring;
+use function define;
+use function defined;
+use function function_exists;
+use function parse_str;
+
+if (!defined('MB_CASE_UPPER')) {
+ define('MB_CASE_UPPER', 0);
+ define('MB_CASE_LOWER', 1);
+ define('MB_CASE_TITLE', 2);
}
-if (!\function_exists('mb_strlen')) {
+if (!function_exists('mb_strlen')) {
function mb_convert_encoding($s, $to, $from = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_encoding($s, $to, $from);
+ return Mbstring::mb_convert_encoding($s, $to, $from);
}
function mb_decode_mimeheader($s)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_decode_mimeheader($s);
+ return Mbstring::mb_decode_mimeheader($s);
}
function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent);
+ return Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent);
}
function mb_decode_numericentity($s, $convmap, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_decode_numericentity($s, $convmap, $enc);
+ return Mbstring::mb_decode_numericentity($s, $convmap, $enc);
}
- function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = \false)
+ function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex);
+ return Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex);
}
function mb_convert_case($s, $mode, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_case($s, $mode, $enc);
+ return Mbstring::mb_convert_case($s, $mode, $enc);
}
function mb_internal_encoding($enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_internal_encoding($enc);
+ return Mbstring::mb_internal_encoding($enc);
}
function mb_language($lang = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_language($lang);
+ return Mbstring::mb_language($lang);
}
function mb_list_encodings()
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_list_encodings();
+ return Mbstring::mb_list_encodings();
}
function mb_encoding_aliases($encoding)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_encoding_aliases($encoding);
+ return Mbstring::mb_encoding_aliases($encoding);
}
function mb_check_encoding($var = null, $encoding = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_check_encoding($var, $encoding);
+ return Mbstring::mb_check_encoding($var, $encoding);
}
- function mb_detect_encoding($str, $encodingList = null, $strict = \false)
+ function mb_detect_encoding($str, $encodingList = null, $strict = false)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_encoding($str, $encodingList, $strict);
+ return Mbstring::mb_detect_encoding($str, $encodingList, $strict);
}
function mb_detect_order($encodingList = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_detect_order($encodingList);
+ return Mbstring::mb_detect_order($encodingList);
}
function mb_parse_str($s, &$result = array())
{
- \parse_str($s, $result);
+ parse_str($s, $result);
}
function mb_strlen($s, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strlen($s, $enc);
+ return Mbstring::mb_strlen($s, $enc);
}
function mb_strpos($s, $needle, $offset = 0, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strpos($s, $needle, $offset, $enc);
+ return Mbstring::mb_strpos($s, $needle, $offset, $enc);
}
function mb_strtolower($s, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strtolower($s, $enc);
+ return Mbstring::mb_strtolower($s, $enc);
}
function mb_strtoupper($s, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strtoupper($s, $enc);
+ return Mbstring::mb_strtoupper($s, $enc);
}
function mb_substitute_character($char = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_substitute_character($char);
+ return Mbstring::mb_substitute_character($char);
}
function mb_substr($s, $start, $length = 2147483647, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_substr($s, $start, $length, $enc);
+ return Mbstring::mb_substr($s, $start, $length, $enc);
}
function mb_stripos($s, $needle, $offset = 0, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_stripos($s, $needle, $offset, $enc);
+ return Mbstring::mb_stripos($s, $needle, $offset, $enc);
}
- function mb_stristr($s, $needle, $part = \false, $enc = null)
+ function mb_stristr($s, $needle, $part = false, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_stristr($s, $needle, $part, $enc);
+ return Mbstring::mb_stristr($s, $needle, $part, $enc);
}
- function mb_strrchr($s, $needle, $part = \false, $enc = null)
+ function mb_strrchr($s, $needle, $part = false, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strrchr($s, $needle, $part, $enc);
+ return Mbstring::mb_strrchr($s, $needle, $part, $enc);
}
- function mb_strrichr($s, $needle, $part = \false, $enc = null)
+ function mb_strrichr($s, $needle, $part = false, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strrichr($s, $needle, $part, $enc);
+ return Mbstring::mb_strrichr($s, $needle, $part, $enc);
}
function mb_strripos($s, $needle, $offset = 0, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strripos($s, $needle, $offset, $enc);
+ return Mbstring::mb_strripos($s, $needle, $offset, $enc);
}
function mb_strrpos($s, $needle, $offset = 0, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strrpos($s, $needle, $offset, $enc);
+ return Mbstring::mb_strrpos($s, $needle, $offset, $enc);
}
- function mb_strstr($s, $needle, $part = \false, $enc = null)
+ function mb_strstr($s, $needle, $part = false, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strstr($s, $needle, $part, $enc);
+ return Mbstring::mb_strstr($s, $needle, $part, $enc);
}
function mb_get_info($type = 'all')
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_get_info($type);
+ return Mbstring::mb_get_info($type);
}
function mb_http_output($enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_http_output($enc);
+ return Mbstring::mb_http_output($enc);
}
function mb_strwidth($s, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_strwidth($s, $enc);
+ return Mbstring::mb_strwidth($s, $enc);
}
function mb_substr_count($haystack, $needle, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_substr_count($haystack, $needle, $enc);
+ return Mbstring::mb_substr_count($haystack, $needle, $enc);
}
function mb_output_handler($contents, $status)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_output_handler($contents, $status);
+ return Mbstring::mb_output_handler($contents, $status);
}
function mb_http_input($type = '')
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_http_input($type);
+ return Mbstring::mb_http_input($type);
}
function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f);
+ return Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f);
}
}
-if (!\function_exists('_PhpScoper5ea00cc67502b\\mb_chr')) {
+if (!function_exists('_PhpScoper5ea00cc67502b\\mb_chr')) {
function mb_ord($s, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_ord($s, $enc);
+ return Mbstring::mb_ord($s, $enc);
}
function mb_chr($code, $enc = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_chr($code, $enc);
+ return Mbstring::mb_chr($code, $enc);
}
function mb_scrub($s, $enc = null)
{
@@ -169,9 +175,9 @@ function mb_scrub($s, $enc = null)
return \mb_convert_encoding($s, $enc, $enc);
}
}
-if (!\function_exists('_PhpScoper5ea00cc67502b\\mb_str_split')) {
+if (!function_exists('_PhpScoper5ea00cc67502b\\mb_str_split')) {
function mb_str_split($string, $split_length = 1, $encoding = null)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Mbstring\Mbstring::mb_str_split($string, $split_length, $encoding);
+ return Mbstring::mb_str_split($string, $split_length, $encoding);
}
}
diff --git a/vendor/symfony/polyfill-mbstring/index.php b/vendor/symfony/polyfill-mbstring/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-mbstring/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-php70/Php70.php b/vendor/symfony/polyfill-php70/Php70.php
index abc2c140d..ba400617a 100644
--- a/vendor/symfony/polyfill-php70/Php70.php
+++ b/vendor/symfony/polyfill-php70/Php70.php
@@ -10,6 +10,19 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Polyfill\Php70;
+use ArithmeticError;
+use DivisionByZeroError;
+use TypeError;
+use function gettype;
+use function is_int;
+use function is_numeric;
+use function preg_replace_callback;
+use function restore_error_handler;
+use function set_error_handler;
+use function sprintf;
+use function trigger_error;
+use const PHP_INT_MAX;
+
/**
* @author Nicolas Grekas
*
@@ -22,10 +35,10 @@ public static function intdiv($dividend, $divisor)
$dividend = self::intArg($dividend, __FUNCTION__, 1);
$divisor = self::intArg($divisor, __FUNCTION__, 2);
if (0 === $divisor) {
- throw new \DivisionByZeroError('Division by zero');
+ throw new DivisionByZeroError('Division by zero');
}
- if (-1 === $divisor && ~\PHP_INT_MAX === $dividend) {
- throw new \ArithmeticError('Division of PHP_INT_MIN by -1 is not an integer');
+ if (-1 === $divisor && ~PHP_INT_MAX === $dividend) {
+ throw new ArithmeticError('Division of PHP_INT_MIN by -1 is not an integer');
}
return ($dividend - $dividend % $divisor) / $divisor;
}
@@ -37,7 +50,7 @@ public static function preg_replace_callback_array(array $patterns, $subject, $l
return $result;
}
foreach ($patterns as $pattern => $callback) {
- $result = \preg_replace_callback($pattern, $callback, $result, $limit, $c);
+ $result = preg_replace_callback($pattern, $callback, $result, $limit, $c);
$count += $c;
}
return $result;
@@ -47,20 +60,20 @@ public static function error_clear_last()
static $handler;
if (!$handler) {
$handler = function () {
- return \false;
+ return false;
};
}
- \set_error_handler($handler);
- @\trigger_error('');
- \restore_error_handler();
+ set_error_handler($handler);
+ @trigger_error('');
+ restore_error_handler();
}
private static function intArg($value, $caller, $pos)
{
- if (\is_int($value)) {
+ if (is_int($value)) {
return $value;
}
- if (!\is_numeric($value) || \PHP_INT_MAX <= ($value += 0) || ~\PHP_INT_MAX >= $value) {
- throw new \TypeError(\sprintf('%s() expects parameter %d to be integer, %s given', $caller, $pos, \gettype($value)));
+ if (!is_numeric($value) || PHP_INT_MAX <= ($value += 0) || ~PHP_INT_MAX >= $value) {
+ throw new TypeError(sprintf('%s() expects parameter %d to be integer, %s given', $caller, $pos, gettype($value)));
}
return (int) $value;
}
diff --git a/vendor/symfony/polyfill-php70/Resources/index.php b/vendor/symfony/polyfill-php70/Resources/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-php70/Resources/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php b/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php
index c0d3c34b6..80742f88e 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
+use function class_alias;
+
class ArithmeticError extends \Error
{
}
-\class_alias('_PhpScoper5ea00cc67502b\\ArithmeticError', 'ArithmeticError', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ArithmeticError', 'ArithmeticError', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php b/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php
index 22eed93fd..d1598b903 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
+use function class_alias;
+
class AssertionError extends \Error
{
}
-\class_alias('_PhpScoper5ea00cc67502b\\AssertionError', 'AssertionError', \false);
+class_alias('_PhpScoper5ea00cc67502b\\AssertionError', 'AssertionError', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php b/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php
index 39190d01c..6d9b40a44 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
+use function class_alias;
+
class DivisionByZeroError extends \Error
{
}
-\class_alias('_PhpScoper5ea00cc67502b\\DivisionByZeroError', 'DivisionByZeroError', \false);
+class_alias('_PhpScoper5ea00cc67502b\\DivisionByZeroError', 'DivisionByZeroError', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/Error.php b/vendor/symfony/polyfill-php70/Resources/stubs/Error.php
index f561b496a..54642ce1c 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/Error.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/Error.php
@@ -2,7 +2,10 @@
namespace _PhpScoper5ea00cc67502b;
-class Error extends \Exception
+use Exception;
+use function class_alias;
+
+class Error extends Exception
{
}
-\class_alias('_PhpScoper5ea00cc67502b\\Error', 'Error', \false);
+class_alias('_PhpScoper5ea00cc67502b\\Error', 'Error', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php b/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php
index d0d76e8cc..f592e221a 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/ParseError.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
+use function class_alias;
+
class ParseError extends \Error
{
}
-\class_alias('_PhpScoper5ea00cc67502b\\ParseError', 'ParseError', \false);
+class_alias('_PhpScoper5ea00cc67502b\\ParseError', 'ParseError', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php b/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php
index b1cf934d7..abd2ccba9 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/SessionUpdateTimestampHandlerInterface.php
@@ -2,6 +2,8 @@
namespace _PhpScoper5ea00cc67502b;
+use function class_alias;
+
interface SessionUpdateTimestampHandlerInterface
{
/**
@@ -22,4 +24,4 @@ public function validateId($key);
*/
public function updateTimestamp($key, $val);
}
-\class_alias('_PhpScoper5ea00cc67502b\\SessionUpdateTimestampHandlerInterface', 'SessionUpdateTimestampHandlerInterface', \false);
+class_alias('_PhpScoper5ea00cc67502b\\SessionUpdateTimestampHandlerInterface', 'SessionUpdateTimestampHandlerInterface', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php b/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php
index 04ecc92e2..5914c79c5 100644
--- a/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/TypeError.php
@@ -2,7 +2,9 @@
namespace _PhpScoper5ea00cc67502b;
+use function class_alias;
+
class TypeError extends \Error
{
}
-\class_alias('_PhpScoper5ea00cc67502b\\TypeError', 'TypeError', \false);
+class_alias('_PhpScoper5ea00cc67502b\\TypeError', 'TypeError', false);
diff --git a/vendor/symfony/polyfill-php70/Resources/stubs/index.php b/vendor/symfony/polyfill-php70/Resources/stubs/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-php70/Resources/stubs/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-php70/bootstrap.php b/vendor/symfony/polyfill-php70/bootstrap.php
index 764dbbb95..f330df5cc 100644
--- a/vendor/symfony/polyfill-php70/bootstrap.php
+++ b/vendor/symfony/polyfill-php70/bootstrap.php
@@ -11,26 +11,33 @@
* file that was distributed with this source code.
*/
use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Php70 as p;
-if (\PHP_VERSION_ID < 70000) {
- if (!\defined('PHP_INT_MIN')) {
- \define('PHP_INT_MIN', ~\PHP_INT_MAX);
+use _PhpScoper5ea00cc67502b\Symfony\Polyfill\Php70\Php70;
+use function define;
+use function defined;
+use function function_exists;
+use const PHP_INT_MAX;
+use const PHP_VERSION_ID;
+
+if (PHP_VERSION_ID < 70000) {
+ if (!defined('PHP_INT_MIN')) {
+ define('PHP_INT_MIN', ~PHP_INT_MAX);
}
- if (!\function_exists('intdiv')) {
+ if (!function_exists('intdiv')) {
function intdiv($dividend, $divisor)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Php70\Php70::intdiv($dividend, $divisor);
+ return Php70::intdiv($dividend, $divisor);
}
}
- if (!\function_exists('preg_replace_callback_array')) {
+ if (!function_exists('preg_replace_callback_array')) {
function preg_replace_callback_array(array $patterns, $subject, $limit = -1, &$count = 0)
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Php70\Php70::preg_replace_callback_array($patterns, $subject, $limit, $count);
+ return Php70::preg_replace_callback_array($patterns, $subject, $limit, $count);
}
}
- if (!\function_exists('error_clear_last')) {
+ if (!function_exists('error_clear_last')) {
function error_clear_last()
{
- return \_PhpScoper5ea00cc67502b\Symfony\Polyfill\Php70\Php70::error_clear_last();
+ return Php70::error_clear_last();
}
}
}
diff --git a/vendor/symfony/polyfill-php70/index.php b/vendor/symfony/polyfill-php70/index.php
new file mode 100644
index 000000000..97775fe0f
--- /dev/null
+++ b/vendor/symfony/polyfill-php70/index.php
@@ -0,0 +1,36 @@
+
+* @copyright 2007-2016 PrestaShop SA
+* @version Release: $Revision$
+* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
+* International Registered Trademark & Property of PrestaShop SA
+*/
+
+header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
+
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+header("Location: ../");
+exit;
diff --git a/vendor/symfony/polyfill-php72/Php72.php b/vendor/symfony/polyfill-php72/Php72.php
index 0839d20ca..36d7b8af8 100644
--- a/vendor/symfony/polyfill-php72/Php72.php
+++ b/vendor/symfony/polyfill-php72/Php72.php
@@ -10,6 +10,35 @@
*/
namespace _PhpScoper5ea00cc67502b\Symfony\Polyfill\Php72;
+use function array_map;
+use function chr;
+use function debug_backtrace;
+use function debug_zval_dump;
+use function fstat;
+use function function_exists;
+use function getenv;
+use function gettype;
+use function hexdec;
+use function in_array;
+use function is_resource;
+use function mb_convert_encoding;
+use function ob_get_clean;
+use function ob_start;
+use function ord;
+use function posix_isatty;
+use function spl_object_hash;
+use function stream_get_meta_data;
+use function strlen;
+use function substr;
+use function trigger_error;
+use function unpack;
+use const DEBUG_BACKTRACE_IGNORE_ARGS;
+use const DIRECTORY_SEPARATOR;
+use const E_USER_WARNING;
+use const PHP_INT_SIZE;
+use const PHP_OS;
+use const PHP_VERSION_ID;
+
/**
* @author Nicolas Grekas
+
+ >
+ );
+}
diff --git a/views/js/src/back/carrierconfig/components/CarrierConfigError.tsx b/views/js/src/back/carrierconfig/components/CarrierConfigError.tsx
index 4ca4136b6..e19bb3881 100644
--- a/views/js/src/back/carrierconfig/components/CarrierConfigError.tsx
+++ b/views/js/src/back/carrierconfig/components/CarrierConfigError.tsx
@@ -1,82 +1,82 @@
-/**
- * Copyright (c) 2012-2020, Mollie B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * @author Mollie B.V.
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-import React, { ReactElement, useCallback } from 'react';
-import cx from 'classnames';
-import { faRedoAlt } from '@fortawesome/free-solid-svg-icons';
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import styled from 'styled-components';
-
-import { IMollieCarrierConfig, ITranslations } from '@shared/globals';
-import { useMappedState } from 'redux-react-hook';
-
-interface IProps {
- retry: Function;
- message?: string;
-}
-
-const Code = styled.code`
- font-size: 14px!important;
-` as any;
-
-export default function ConfigCarrierError({ retry, message }: IProps): ReactElement<{}> {
- const { translations, config: { legacy } }: Partial = useCallback(useMappedState((state: IMollieCarriersState): any => ({
- translations: state.translations,
- config: state.config,
- })), []);
-
- return (
-
- );
-}
+/**
+ * Copyright (c) 2012-2020, Mollie B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @author Mollie B.V.
+ * @copyright Mollie B.V.
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
+ * @category Mollie
+ * @package Mollie
+ * @link https://www.mollie.nl
+ */
+import React, { ReactElement, useCallback } from 'react';
+import cx from 'classnames';
+import { faRedoAlt } from '@fortawesome/free-solid-svg-icons';
+import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
+import styled from 'styled-components';
+
+import { IMollieCarrierConfig, ITranslations } from '@shared/globals';
+import { useMappedState } from 'redux-react-hook';
+
+interface IProps {
+ retry: Function;
+ message?: string;
+}
+
+const Code = styled.code`
+ font-size: 14px!important;
+` as any;
+
+export default function ConfigCarrierError({ retry, message }: IProps): ReactElement<{}> {
+ const { translations, config: { legacy } }: Partial = useCallback(useMappedState((state: IMollieCarriersState): any => ({
+ translations: state.translations,
+ config: state.config,
+ })), []);
+
+ return (
+
+ );
+}
diff --git a/views/js/src/back/carrierconfig/components/index.php b/views/js/src/back/carrierconfig/components/index.php
index a950d02f4..729abf520 100644
--- a/views/js/src/back/carrierconfig/components/index.php
+++ b/views/js/src/back/carrierconfig/components/index.php
@@ -1,11 +1,11 @@
-
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-import React from 'react';
-import { StoreContext } from 'redux-react-hook';
-import { render } from 'react-dom';
-
-import { IMollieCarrierConfig, ITranslations } from '@shared/globals';
-
-export default (
- target: string,
- config: IMollieCarrierConfig,
- translations: ITranslations
-) => {
- (async function() {
- const [
- { default: store },
- { updateConfig, updateTranslations },
- { default: CarrierConfig },
- ] = await Promise.all([
- import(/* webpackChunkName: "carrierconfig" */ '@carrierconfig/store'),
- import(/* webpackChunkName: "carrierconfig" */ '@carrierconfig/store/actions'),
- import(/* webpackChunkName: "carrierconfig" */ '@carrierconfig/components/CarrierConfig'),
- ]);
-
- store.dispatch(updateConfig(config));
- store.dispatch(updateTranslations(translations));
-
- return render(
- (
-
-
-
- ),
- document.getElementById(`${target}_container`)
- );
- }());
-};
+/**
+ * Copyright (c) 2012-2020, Mollie B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @author Mollie B.V.
+ * @copyright Mollie B.V.
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
+ * @category Mollie
+ * @package Mollie
+ * @link https://www.mollie.nl
+ */
+import React from 'react';
+import { StoreContext } from 'redux-react-hook';
+import { render } from 'react-dom';
+
+import { IMollieCarrierConfig, ITranslations } from '@shared/globals';
+
+export default (
+ target: string,
+ config: IMollieCarrierConfig,
+ translations: ITranslations
+) => {
+ (async function() {
+ const [
+ { default: store },
+ { updateConfig, updateTranslations },
+ { default: CarrierConfig },
+ ] = await Promise.all([
+ import(/* webpackChunkName: "carrierconfig" */ '@carrierconfig/store'),
+ import(/* webpackChunkName: "carrierconfig" */ '@carrierconfig/store/actions'),
+ import(/* webpackChunkName: "carrierconfig" */ '@carrierconfig/components/CarrierConfig'),
+ ]);
+
+ store.dispatch(updateConfig(config));
+ store.dispatch(updateTranslations(translations));
+
+ return render(
+ (
+
+
+
+ ),
+ document.getElementById(`${target}_container`)
+ );
+ }());
+};
diff --git a/views/js/src/back/carrierconfig/store/actions.ts b/views/js/src/back/carrierconfig/store/actions.ts
index c659e9824..2251648dc 100644
--- a/views/js/src/back/carrierconfig/store/actions.ts
+++ b/views/js/src/back/carrierconfig/store/actions.ts
@@ -1,58 +1,58 @@
-/**
- * Copyright (c) 2012-2020, Mollie B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * @author Mollie B.V.
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-// Action types
-import { IMollieCarrierConfig, ITranslations } from '@shared/globals';
-
-export enum ReduxActionTypes {
- updateTranslations = 'UPDATE_MOLLIE_CARRIER_TRANSLATIONS',
- updateConfig = 'UPDATE_MOLLIE_CARRIER_CONFIG',
-}
-
-// Action creators
-export interface IUpdateTranslationsAction {
- type: string;
- translations: ITranslations;
-}
-
-export interface IUpdateCarrierConfigAction {
- type: string;
- config: IMollieCarrierConfig;
-}
-
-export function updateTranslations(translations: ITranslations): IUpdateTranslationsAction {
- return { type: ReduxActionTypes.updateTranslations, translations };
-}
-
-export function updateConfig(config: IMollieCarrierConfig): IUpdateCarrierConfigAction {
- return { type: ReduxActionTypes.updateConfig, config };
-}
+/**
+ * Copyright (c) 2012-2020, Mollie B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @author Mollie B.V.
+ * @copyright Mollie B.V.
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
+ * @category Mollie
+ * @package Mollie
+ * @link https://www.mollie.nl
+ */
+// Action types
+import { IMollieCarrierConfig, ITranslations } from '@shared/globals';
+
+export enum ReduxActionTypes {
+ updateTranslations = 'UPDATE_MOLLIE_CARRIER_TRANSLATIONS',
+ updateConfig = 'UPDATE_MOLLIE_CARRIER_CONFIG',
+}
+
+// Action creators
+export interface IUpdateTranslationsAction {
+ type: string;
+ translations: ITranslations;
+}
+
+export interface IUpdateCarrierConfigAction {
+ type: string;
+ config: IMollieCarrierConfig;
+}
+
+export function updateTranslations(translations: ITranslations): IUpdateTranslationsAction {
+ return { type: ReduxActionTypes.updateTranslations, translations };
+}
+
+export function updateConfig(config: IMollieCarrierConfig): IUpdateCarrierConfigAction {
+ return { type: ReduxActionTypes.updateConfig, config };
+}
diff --git a/views/js/src/back/carrierconfig/store/carriers.ts b/views/js/src/back/carrierconfig/store/carriers.ts
index a4f04794e..3a1602828 100644
--- a/views/js/src/back/carrierconfig/store/carriers.ts
+++ b/views/js/src/back/carrierconfig/store/carriers.ts
@@ -1,69 +1,69 @@
-/**
- * Copyright (c) 2012-2020, Mollie B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * @author Mollie B.V.
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-import { combineReducers } from 'redux';
-
-import { IUpdateCarrierConfigAction, IUpdateTranslationsAction, ReduxActionTypes } from '@carrierconfig/store/actions';
-import { IMollieCarrierConfig, IMollieCarrierConfigItem, ITranslations } from '@shared/globals';
-
-declare global {
- interface IMollieCarriersState {
- translations: ITranslations;
- config: IMollieCarrierConfig;
- carriers: Array;
- }
-}
-
-const translations = (state: any = {}, action: IUpdateTranslationsAction): ITranslations => {
- switch (action.type) {
- case ReduxActionTypes.updateTranslations:
- return action.translations;
- default:
- return state;
- }
-};
-
-const config = (state: any = {}, action: IUpdateCarrierConfigAction): IMollieCarrierConfig => {
- switch (action.type) {
- case ReduxActionTypes.updateConfig:
- return action.config;
- default:
- return state;
- }
-};
-
-const checkoutApp = combineReducers({
- translations,
- config,
-});
-
-export default checkoutApp;
+/**
+ * Copyright (c) 2012-2020, Mollie B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @author Mollie B.V.
+ * @copyright Mollie B.V.
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
+ * @category Mollie
+ * @package Mollie
+ * @link https://www.mollie.nl
+ */
+import { combineReducers } from 'redux';
+
+import { IUpdateCarrierConfigAction, IUpdateTranslationsAction, ReduxActionTypes } from '@carrierconfig/store/actions';
+import { IMollieCarrierConfig, IMollieCarrierConfigItem, ITranslations } from '@shared/globals';
+
+declare global {
+ interface IMollieCarriersState {
+ translations: ITranslations;
+ config: IMollieCarrierConfig;
+ carriers: Array;
+ }
+}
+
+const translations = (state: any = {}, action: IUpdateTranslationsAction): ITranslations => {
+ switch (action.type) {
+ case ReduxActionTypes.updateTranslations:
+ return action.translations;
+ default:
+ return state;
+ }
+};
+
+const config = (state: any = {}, action: IUpdateCarrierConfigAction): IMollieCarrierConfig => {
+ switch (action.type) {
+ case ReduxActionTypes.updateConfig:
+ return action.config;
+ default:
+ return state;
+ }
+};
+
+const checkoutApp = combineReducers({
+ translations,
+ config,
+});
+
+export default checkoutApp;
diff --git a/views/js/src/back/carrierconfig/store/index.php b/views/js/src/back/carrierconfig/store/index.php
index a950d02f4..729abf520 100644
--- a/views/js/src/back/carrierconfig/store/index.php
+++ b/views/js/src/back/carrierconfig/store/index.php
@@ -1,11 +1,11 @@
-
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-import { createStore, Store } from 'redux';
-
-import carriersApp from '@carrierconfig/store/carriers';
-
-declare let window: any;
-
-let store: Store;
-const devTools = window.__REDUX_DEVTOOLS_EXTENSION__;
-
-store = createStore(
- carriersApp,
- devTools && devTools(),
-);
-
-export default store;
+/**
+ * Copyright (c) 2012-2020, Mollie B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @author Mollie B.V.
+ * @copyright Mollie B.V.
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
+ * @category Mollie
+ * @package Mollie
+ * @link https://www.mollie.nl
+ */
+import { createStore, Store } from 'redux';
+
+import carriersApp from '@carrierconfig/store/carriers';
+
+declare let window: any;
+
+let store: Store;
+const devTools = window.__REDUX_DEVTOOLS_EXTENSION__;
+
+store = createStore(
+ carriersApp,
+ devTools && devTools(),
+);
+
+export default store;
diff --git a/views/js/src/back/methodconfig/components/PaymentMethod.tsx b/views/js/src/back/methodconfig/components/PaymentMethod.tsx
index 977b13ec2..f64b464b4 100644
--- a/views/js/src/back/methodconfig/components/PaymentMethod.tsx
+++ b/views/js/src/back/methodconfig/components/PaymentMethod.tsx
@@ -1,275 +1,275 @@
-/**
- * Copyright (c) 2012-2020, Mollie B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * @author Mollie B.V.
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-import React, { ReactElement, useEffect } from 'react';
-import styled from 'styled-components';
-import { SortableElement } from 'react-sortable-hoc';
-import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
-import { faChevronDown, faChevronUp, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
-
-import Switch from '@methodconfig/components/Switch';
-import { IMollieMethodConfig, ITranslations } from '@shared/globals';
-
-interface IProps {
- position: number;
- max: number;
- enabled: boolean;
- available: boolean;
- tipEnableSSL: boolean;
- name: string;
- code: string;
- imageUrl: string;
- translations: ITranslations;
- config: IMollieMethodConfig;
-
- moveMethod: Function;
- onToggle: Function;
-}
-
-declare let $: any;
-
-const Li = styled.li`
-cursor: move!important;
--webkit-touch-callout: none; /* iOS Safari */
- -webkit-user-select: none; /* Safari */
- -khtml-user-select: none; /* Konqueror HTML */
- -moz-user-select: none; /* Firefox */
- -ms-user-select: none; /* Internet Explorer/Edge */
- user-select: none; /* Non-prefixed version, currently
- supported by Chrome and Opera */
-
-border: 1px solid #0c95fd;
-border-bottom-width: ${(props: any) => props.last ? '1px' : '2px'};
-background-color: #fff;
-display: table;
-width: 100%;
-padding: 5px 0;
-margin-bottom: -1px;
-${({ legacy }: any) => legacy ? 'width: calc(100% - 2px);' : ''}
-` as any;
-
-const PositionColumn = styled.div`
-display: table-cell;
-width: 80px!important;
-vertical-align: middle!important;
-text-align: right!important;
-` as any;
-
-const IconColumn = styled.div`
-display: table-cell;
-width: 75px;
-text-align: left;
-vertical-align: middle;
-` as any;
-
-const InfoColumn = styled.div`
-display: table-cell;
-height: 50px;
-vertical-align: middle;
-box-sizing: border-box;
-` as any;
-
-const PositionIndicator = styled.span`
-border: solid 1px #ccc;
-background-color: #eee;
-padding: 0;
-font-size: 1.4em;
-color: #aaa;
-cursor: move;
-text-shadow: #fff 1px 1px;
--webkit-border-radius: 3px;
-border-radius: 3px;
--webkit-box-shadow: rgba(0,0,0,0.2) 0 1px 3px inset;
-box-shadow: rgba(0,0,0,0.2) 0 1px 3px inset;
-display: block;
-width: 40px;
-text-align: center;
-margin: 0 auto;
-${({ legacy }: any) => legacy ? 'height: 24px;line-height: 24px;' : ''}
-` as any;
-
-const ArrowButton = styled.button`
-padding: 1px 5px;
-font-size: 11px;
-line-height: 1.5;
-border-radius: 3px;
-color: #363A41;
-display: inline-block;
-margin-bottom: 0;
-font-weight: normal;
-text-align: center;
-vertical-align: middle;
-cursor: pointer;
-background: #2eacce none;
-border: 1px solid #0000;
-white-space: nowrap;
-font-family: inherit;
-width: 26px!important;
-margin-top: 6px!important;
-margin-right: 2px!important;
-
-:hover {
- background-color: #008abd;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-
-:disabled {
- background-color: #2eacce;
- border-color: #2eacce;
- cursor: not-allowed;
- opacity: .65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-${({ legacy }: any) => legacy ? 'height: 20px;line-height: 20px;' : ''}
-` as any;
-
-const ButtonBox = styled.div`
-margin: 0 auto;
-text-align: center;
-` as any;
-
-function PaymentMethod({
- enabled,
- onToggle,
- code,
- translations,
- position,
- max,
- name,
- imageUrl,
- moveMethod,
- available,
- tipEnableSSL,
- config: { legacy }
-}: IProps
-): ReactElement<{}> {
- function _toggleMethod(enabled: boolean): void {
- onToggle(code, enabled);
- }
-
- useEffect(() => {
- if (typeof $ !== 'undefined' && typeof $.prototype.tooltip === 'function') {
- $('[data-toggle=tooltip]').tooltip();
- }
- });
-
- return (
-
+ );
+}
+
+export default SortableElement(PaymentMethod);
diff --git a/views/js/src/back/methodconfig/components/PaymentMethodConfig.tsx b/views/js/src/back/methodconfig/components/PaymentMethodConfig.tsx
index 8e20f8db6..f1a6034e8 100644
--- a/views/js/src/back/methodconfig/components/PaymentMethodConfig.tsx
+++ b/views/js/src/back/methodconfig/components/PaymentMethodConfig.tsx
@@ -1,85 +1,85 @@
-/**
- * Copyright (c) 2012-2020, Mollie B.V.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * - Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- * @author Mollie B.V.
- * @copyright Mollie B.V.
- * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
- * @category Mollie
- * @package Mollie
- * @link https://www.mollie.nl
- */
-import React, { ReactElement, useEffect, useState } from 'react';
-import { isEmpty } from 'lodash';
-
-import PaymentMethods from '@methodconfig/components/PaymentMethods';
-import PaymentMethodsError from '@methodconfig/components/PaymentMethodsError';
-import axios from '@shared/axios';
-import { IMollieMethodConfig, IMolliePaymentMethodItem, ITranslations } from '@shared/globals';
-import LoadingDots from '@shared/components/LoadingDots';
-
-interface IProps {
- config: IMollieMethodConfig;
- translations: ITranslations;
- target: string;
-}
-
-export default function PaymentMethodConfig(props: IProps): ReactElement<{}> {
- const [methods, setMethods] = useState>(undefined);
- const [message, setMessage] = useState(undefined);
-
- async function _init(): Promise {
- try {
- const { config: { ajaxEndpoint } } = props;
- const { data: { methods: newMethods, message: newMessage } = { methods: null, message: '' } } = await axios.post(ajaxEndpoint, {
- resource: 'orders',
- action: 'retrieve',
- });
-
- setMethods(newMethods);
- setMessage(newMessage);
- } catch (e) {
- setMethods(null);
- setMessage((e instanceof Error && typeof e.message !== 'undefined') ? e.message : 'Check the browser console for errors');
- }
- }
-
- useEffect(() => {
- _init().then();
- }, []);
-
- const { target, translations, config } = props;
-
- if (typeof methods === 'undefined') {
- return ;
- }
-
- if (methods === null || !Array.isArray(methods) || (Array.isArray(methods) && isEmpty(methods))) {
- return ;
- }
-
- return (
-
- );
-}
+/**
+ * Copyright (c) 2012-2020, Mollie B.V.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+ * DAMAGE.
+ *
+ * @author Mollie B.V.
+ * @copyright Mollie B.V.
+ * @license Berkeley Software Distribution License (BSD-License 2) http://www.opensource.org/licenses/bsd-license.php
+ * @category Mollie
+ * @package Mollie
+ * @link https://www.mollie.nl
+ */
+import React, { ReactElement, useEffect, useState } from 'react';
+import { isEmpty } from 'lodash';
+
+import PaymentMethods from '@methodconfig/components/PaymentMethods';
+import PaymentMethodsError from '@methodconfig/components/PaymentMethodsError';
+import axios from '@shared/axios';
+import { IMollieMethodConfig, IMolliePaymentMethodItem, ITranslations } from '@shared/globals';
+import LoadingDots from '@shared/components/LoadingDots';
+
+interface IProps {
+ config: IMollieMethodConfig;
+ translations: ITranslations;
+ target: string;
+}
+
+export default function PaymentMethodConfig(props: IProps): ReactElement<{}> {
+ const [methods, setMethods] = useState>(undefined);
+ const [message, setMessage] = useState(undefined);
+
+ async function _init(): Promise {
+ try {
+ const { config: { ajaxEndpoint } } = props;
+ const { data: { methods: newMethods, message: newMessage } = { methods: null, message: '' } } = await axios.post(ajaxEndpoint, {
+ resource: 'orders',
+ action: 'retrieve',
+ });
+
+ setMethods(newMethods);
+ setMessage(newMessage);
+ } catch (e) {
+ setMethods(null);
+ setMessage((e instanceof Error && typeof e.message !== 'undefined') ? e.message : 'Check the browser console for errors');
+ }
+ }
+
+ useEffect(() => {
+ _init().then();
+ }, []);
+
+ const { target, translations, config } = props;
+
+ if (typeof methods === 'undefined') {
+ return ;
+ }
+
+ if (methods === null || !Array.isArray(methods) || (Array.isArray(methods) && isEmpty(methods))) {
+ return ;
+ }
+
+ return (
+