+ */
+interface TagAwareAdapterInterface extends AdapterInterface
+{
+ /**
+ * Invalidates cached items using tags.
+ *
+ * @param string[] $tags An array of tags to invalidate
+ *
+ * @return bool True on success
+ *
+ * @throws InvalidArgumentException When $tags is not valid
+ */
+ public function invalidateTags(array $tags);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Adapter/TraceableAdapter.php b/modules/empikmarketplace/vendor/symfony/cache/Adapter/TraceableAdapter.php
new file mode 100644
index 00000000..cc855c13
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Adapter/TraceableAdapter.php
@@ -0,0 +1,229 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Adapter;
+
+use Psr\Cache\CacheItemInterface;
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\ResettableInterface;
+
+/**
+ * An adapter that collects data about all cache calls.
+ *
+ * @author Aaron Scherer
+ * @author Tobias Nyholm
+ * @author Nicolas Grekas
+ */
+class TraceableAdapter implements AdapterInterface, PruneableInterface, ResettableInterface
+{
+ protected $pool;
+ private $calls = [];
+
+ public function __construct(AdapterInterface $pool)
+ {
+ $this->pool = $pool;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getItem($key)
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ $item = $this->pool->getItem($key);
+ } finally {
+ $event->end = microtime(true);
+ }
+ if ($event->result[$key] = $item->isHit()) {
+ ++$event->hits;
+ } else {
+ ++$event->misses;
+ }
+
+ return $item;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasItem($key)
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result[$key] = $this->pool->hasItem($key);
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteItem($key)
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result[$key] = $this->pool->deleteItem($key);
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function save(CacheItemInterface $item)
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result[$item->getKey()] = $this->pool->save($item);
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function saveDeferred(CacheItemInterface $item)
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result[$item->getKey()] = $this->pool->saveDeferred($item);
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getItems(array $keys = [])
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ $result = $this->pool->getItems($keys);
+ } finally {
+ $event->end = microtime(true);
+ }
+ $f = function () use ($result, $event) {
+ $event->result = [];
+ foreach ($result as $key => $item) {
+ if ($event->result[$key] = $item->isHit()) {
+ ++$event->hits;
+ } else {
+ ++$event->misses;
+ }
+ yield $key => $item;
+ }
+ };
+
+ return $f();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function clear()
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result = $this->pool->clear();
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteItems(array $keys)
+ {
+ $event = $this->start(__FUNCTION__);
+ $event->result['keys'] = $keys;
+ try {
+ return $event->result['result'] = $this->pool->deleteItems($keys);
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function commit()
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result = $this->pool->commit();
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function prune()
+ {
+ if (!$this->pool instanceof PruneableInterface) {
+ return false;
+ }
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result = $this->pool->prune();
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reset()
+ {
+ if ($this->pool instanceof ResettableInterface) {
+ $this->pool->reset();
+ }
+
+ $this->clearCalls();
+ }
+
+ public function getCalls()
+ {
+ return $this->calls;
+ }
+
+ public function clearCalls()
+ {
+ $this->calls = [];
+ }
+
+ protected function start($name)
+ {
+ $this->calls[] = $event = new TraceableAdapterEvent();
+ $event->name = $name;
+ $event->start = microtime(true);
+
+ return $event;
+ }
+}
+
+class TraceableAdapterEvent
+{
+ public $name;
+ public $start;
+ public $end;
+ public $result;
+ public $hits = 0;
+ public $misses = 0;
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php b/modules/empikmarketplace/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php
new file mode 100644
index 00000000..de68955d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Adapter/TraceableTagAwareAdapter.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Adapter;
+
+/**
+ * @author Robin Chalas
+ */
+class TraceableTagAwareAdapter extends TraceableAdapter implements TagAwareAdapterInterface
+{
+ public function __construct(TagAwareAdapterInterface $pool)
+ {
+ parent::__construct($pool);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function invalidateTags(array $tags)
+ {
+ $event = $this->start(__FUNCTION__);
+ try {
+ return $event->result = $this->pool->invalidateTags($tags);
+ } finally {
+ $event->end = microtime(true);
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/CHANGELOG.md b/modules/empikmarketplace/vendor/symfony/cache/CHANGELOG.md
new file mode 100644
index 00000000..11c1b936
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/CHANGELOG.md
@@ -0,0 +1,36 @@
+CHANGELOG
+=========
+
+3.4.0
+-----
+
+ * added using options from Memcached DSN
+ * added PruneableInterface so PSR-6 or PSR-16 cache implementations can declare support for manual stale cache pruning
+ * added prune logic to FilesystemTrait, PhpFilesTrait, PdoTrait, TagAwareAdapter and ChainTrait
+ * now FilesystemAdapter, PhpFilesAdapter, FilesystemCache, PhpFilesCache, PdoAdapter, PdoCache, ChainAdapter, and
+ ChainCache implement PruneableInterface and support manual stale cache pruning
+
+3.3.0
+-----
+
+ * [EXPERIMENTAL] added CacheItem::getPreviousTags() to get bound tags coming from the pool storage if any
+ * added PSR-16 "Simple Cache" implementations for all existing PSR-6 adapters
+ * added Psr6Cache and SimpleCacheAdapter for bidirectional interoperability between PSR-6 and PSR-16
+ * added MemcachedAdapter (PSR-6) and MemcachedCache (PSR-16)
+ * added TraceableAdapter (PSR-6) and TraceableCache (PSR-16)
+
+3.2.0
+-----
+
+ * added TagAwareAdapter for tags-based invalidation
+ * added PdoAdapter with PDO and Doctrine DBAL support
+ * added PhpArrayAdapter and PhpFilesAdapter for OPcache-backed shared memory storage (PHP 7+ only)
+ * added NullAdapter
+
+3.1.0
+-----
+
+ * added the component with strict PSR-6 implementations
+ * added ApcuAdapter, ArrayAdapter, FilesystemAdapter and RedisAdapter
+ * added AbstractAdapter, ChainAdapter and ProxyAdapter
+ * added DoctrineAdapter and DoctrineProvider for bidirectional interoperability with Doctrine Cache
diff --git a/modules/empikmarketplace/vendor/symfony/cache/CacheItem.php b/modules/empikmarketplace/vendor/symfony/cache/CacheItem.php
new file mode 100644
index 00000000..7ae6568c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/CacheItem.php
@@ -0,0 +1,192 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache;
+
+use Psr\Cache\CacheItemInterface;
+use Psr\Log\LoggerInterface;
+use Symfony\Component\Cache\Exception\InvalidArgumentException;
+
+/**
+ * @author Nicolas Grekas
+ */
+final class CacheItem implements CacheItemInterface
+{
+ protected $key;
+ protected $value;
+ protected $isHit = false;
+ protected $expiry;
+ protected $tags = [];
+ protected $prevTags = [];
+ protected $innerItem;
+ protected $poolHash;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getKey()
+ {
+ return $this->key;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get()
+ {
+ return $this->value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isHit()
+ {
+ return $this->isHit;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return $this
+ */
+ public function set($value)
+ {
+ $this->value = $value;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return $this
+ */
+ public function expiresAt($expiration)
+ {
+ if (null === $expiration) {
+ $this->expiry = null;
+ } elseif ($expiration instanceof \DateTimeInterface) {
+ $this->expiry = (int) $expiration->format('U');
+ } else {
+ throw new InvalidArgumentException(sprintf('Expiration date must implement DateTimeInterface or be null, "%s" given.', \is_object($expiration) ? \get_class($expiration) : \gettype($expiration)));
+ }
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @return $this
+ */
+ public function expiresAfter($time)
+ {
+ if (null === $time) {
+ $this->expiry = null;
+ } elseif ($time instanceof \DateInterval) {
+ $this->expiry = (int) \DateTime::createFromFormat('U', time())->add($time)->format('U');
+ } elseif (\is_int($time)) {
+ $this->expiry = $time + time();
+ } else {
+ throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', \is_object($time) ? \get_class($time) : \gettype($time)));
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds a tag to a cache item.
+ *
+ * @param string|string[] $tags A tag or array of tags
+ *
+ * @return $this
+ *
+ * @throws InvalidArgumentException When $tag is not valid
+ */
+ public function tag($tags)
+ {
+ if (!\is_array($tags)) {
+ $tags = [$tags];
+ }
+ foreach ($tags as $tag) {
+ if (!\is_string($tag)) {
+ throw new InvalidArgumentException(sprintf('Cache tag must be string, "%s" given.', \is_object($tag) ? \get_class($tag) : \gettype($tag)));
+ }
+ if (isset($this->tags[$tag])) {
+ continue;
+ }
+ if ('' === $tag) {
+ throw new InvalidArgumentException('Cache tag length must be greater than zero.');
+ }
+ if (false !== strpbrk($tag, '{}()/\@:')) {
+ throw new InvalidArgumentException(sprintf('Cache tag "%s" contains reserved characters {}()/\@:.', $tag));
+ }
+ $this->tags[$tag] = $tag;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Returns the list of tags bound to the value coming from the pool storage if any.
+ *
+ * @return array
+ */
+ public function getPreviousTags()
+ {
+ return $this->prevTags;
+ }
+
+ /**
+ * Validates a cache key according to PSR-6.
+ *
+ * @param string $key The key to validate
+ *
+ * @return string
+ *
+ * @throws InvalidArgumentException When $key is not valid
+ */
+ public static function validateKey($key)
+ {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+ if ('' === $key) {
+ throw new InvalidArgumentException('Cache key length must be greater than zero.');
+ }
+ if (false !== strpbrk($key, '{}()/\@:')) {
+ throw new InvalidArgumentException(sprintf('Cache key "%s" contains reserved characters {}()/\@:.', $key));
+ }
+
+ return $key;
+ }
+
+ /**
+ * Internal logging helper.
+ *
+ * @internal
+ */
+ public static function log(LoggerInterface $logger = null, $message, $context = [])
+ {
+ if ($logger) {
+ $logger->warning($message, $context);
+ } else {
+ $replace = [];
+ foreach ($context as $k => $v) {
+ if (is_scalar($v)) {
+ $replace['{'.$k.'}'] = $v;
+ }
+ }
+ @trigger_error(strtr($message, $replace), \E_USER_WARNING);
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/DataCollector/CacheDataCollector.php b/modules/empikmarketplace/vendor/symfony/cache/DataCollector/CacheDataCollector.php
new file mode 100644
index 00000000..c9e87d5c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/DataCollector/CacheDataCollector.php
@@ -0,0 +1,188 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\DataCollector;
+
+use Symfony\Component\Cache\Adapter\TraceableAdapter;
+use Symfony\Component\Cache\Adapter\TraceableAdapterEvent;
+use Symfony\Component\HttpFoundation\Request;
+use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\HttpKernel\DataCollector\DataCollector;
+use Symfony\Component\HttpKernel\DataCollector\LateDataCollectorInterface;
+
+/**
+ * @author Aaron Scherer
+ * @author Tobias Nyholm
+ */
+class CacheDataCollector extends DataCollector implements LateDataCollectorInterface
+{
+ /**
+ * @var TraceableAdapter[]
+ */
+ private $instances = [];
+
+ /**
+ * @param string $name
+ */
+ public function addInstance($name, TraceableAdapter $instance)
+ {
+ $this->instances[$name] = $instance;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function collect(Request $request, Response $response, \Exception $exception = null)
+ {
+ $empty = ['calls' => [], 'config' => [], 'options' => [], 'statistics' => []];
+ $this->data = ['instances' => $empty, 'total' => $empty];
+ foreach ($this->instances as $name => $instance) {
+ $this->data['instances']['calls'][$name] = $instance->getCalls();
+ }
+
+ $this->data['instances']['statistics'] = $this->calculateStatistics();
+ $this->data['total']['statistics'] = $this->calculateTotalStatistics();
+ }
+
+ public function reset()
+ {
+ $this->data = [];
+ foreach ($this->instances as $instance) {
+ $instance->clearCalls();
+ }
+ }
+
+ public function lateCollect()
+ {
+ $this->data = $this->cloneVar($this->data);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName()
+ {
+ return 'cache';
+ }
+
+ /**
+ * Method returns amount of logged Cache reads: "get" calls.
+ *
+ * @return array
+ */
+ public function getStatistics()
+ {
+ return $this->data['instances']['statistics'];
+ }
+
+ /**
+ * Method returns the statistic totals.
+ *
+ * @return array
+ */
+ public function getTotals()
+ {
+ return $this->data['total']['statistics'];
+ }
+
+ /**
+ * Method returns all logged Cache call objects.
+ *
+ * @return mixed
+ */
+ public function getCalls()
+ {
+ return $this->data['instances']['calls'];
+ }
+
+ /**
+ * @return array
+ */
+ private function calculateStatistics()
+ {
+ $statistics = [];
+ foreach ($this->data['instances']['calls'] as $name => $calls) {
+ $statistics[$name] = [
+ 'calls' => 0,
+ 'time' => 0,
+ 'reads' => 0,
+ 'writes' => 0,
+ 'deletes' => 0,
+ 'hits' => 0,
+ 'misses' => 0,
+ ];
+ /** @var TraceableAdapterEvent $call */
+ foreach ($calls as $call) {
+ ++$statistics[$name]['calls'];
+ $statistics[$name]['time'] += $call->end - $call->start;
+ if ('getItem' === $call->name) {
+ ++$statistics[$name]['reads'];
+ if ($call->hits) {
+ ++$statistics[$name]['hits'];
+ } else {
+ ++$statistics[$name]['misses'];
+ }
+ } elseif ('getItems' === $call->name) {
+ $statistics[$name]['reads'] += $call->hits + $call->misses;
+ $statistics[$name]['hits'] += $call->hits;
+ $statistics[$name]['misses'] += $call->misses;
+ } elseif ('hasItem' === $call->name) {
+ ++$statistics[$name]['reads'];
+ if (false === $call->result) {
+ ++$statistics[$name]['misses'];
+ } else {
+ ++$statistics[$name]['hits'];
+ }
+ } elseif ('save' === $call->name) {
+ ++$statistics[$name]['writes'];
+ } elseif ('deleteItem' === $call->name) {
+ ++$statistics[$name]['deletes'];
+ }
+ }
+ if ($statistics[$name]['reads']) {
+ $statistics[$name]['hit_read_ratio'] = round(100 * $statistics[$name]['hits'] / $statistics[$name]['reads'], 2);
+ } else {
+ $statistics[$name]['hit_read_ratio'] = null;
+ }
+ }
+
+ return $statistics;
+ }
+
+ /**
+ * @return array
+ */
+ private function calculateTotalStatistics()
+ {
+ $statistics = $this->getStatistics();
+ $totals = [
+ 'calls' => 0,
+ 'time' => 0,
+ 'reads' => 0,
+ 'writes' => 0,
+ 'deletes' => 0,
+ 'hits' => 0,
+ 'misses' => 0,
+ ];
+ foreach ($statistics as $name => $values) {
+ foreach ($totals as $key => $value) {
+ $totals[$key] += $statistics[$name][$key];
+ }
+ }
+ if ($totals['reads']) {
+ $totals['hit_read_ratio'] = round(100 * $totals['hits'] / $totals['reads'], 2);
+ } else {
+ $totals['hit_read_ratio'] = null;
+ }
+
+ return $totals;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/DoctrineProvider.php b/modules/empikmarketplace/vendor/symfony/cache/DoctrineProvider.php
new file mode 100644
index 00000000..4c5cd0cb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/DoctrineProvider.php
@@ -0,0 +1,103 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache;
+
+use Doctrine\Common\Cache\CacheProvider;
+use Psr\Cache\CacheItemPoolInterface;
+
+/**
+ * @author Nicolas Grekas
+ */
+class DoctrineProvider extends CacheProvider implements PruneableInterface, ResettableInterface
+{
+ private $pool;
+
+ public function __construct(CacheItemPoolInterface $pool)
+ {
+ $this->pool = $pool;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function prune()
+ {
+ return $this->pool instanceof PruneableInterface && $this->pool->prune();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reset()
+ {
+ if ($this->pool instanceof ResettableInterface) {
+ $this->pool->reset();
+ }
+ $this->setNamespace($this->getNamespace());
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch($id)
+ {
+ $item = $this->pool->getItem(rawurlencode($id));
+
+ return $item->isHit() ? $item->get() : false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doContains($id)
+ {
+ return $this->pool->hasItem(rawurlencode($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave($id, $data, $lifeTime = 0)
+ {
+ $item = $this->pool->getItem(rawurlencode($id));
+
+ if (0 < $lifeTime) {
+ $item->expiresAfter($lifeTime);
+ }
+
+ return $this->pool->save($item->set($data));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete($id)
+ {
+ return $this->pool->deleteItem(rawurlencode($id));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFlush()
+ {
+ return $this->pool->clear();
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doGetStats()
+ {
+ return null;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Exception/CacheException.php b/modules/empikmarketplace/vendor/symfony/cache/Exception/CacheException.php
new file mode 100644
index 00000000..e87b2db8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Exception/CacheException.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Exception;
+
+use Psr\Cache\CacheException as Psr6CacheInterface;
+use Psr\SimpleCache\CacheException as SimpleCacheInterface;
+
+class CacheException extends \Exception implements Psr6CacheInterface, SimpleCacheInterface
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Exception/InvalidArgumentException.php b/modules/empikmarketplace/vendor/symfony/cache/Exception/InvalidArgumentException.php
new file mode 100644
index 00000000..828bf3ed
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Exception/InvalidArgumentException.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Exception;
+
+use Psr\Cache\InvalidArgumentException as Psr6CacheInterface;
+use Psr\SimpleCache\InvalidArgumentException as SimpleCacheInterface;
+
+class InvalidArgumentException extends \InvalidArgumentException implements Psr6CacheInterface, SimpleCacheInterface
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/LICENSE b/modules/empikmarketplace/vendor/symfony/cache/LICENSE
new file mode 100644
index 00000000..a7ec7080
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2016-2020 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/modules/empikmarketplace/vendor/symfony/cache/PruneableInterface.php b/modules/empikmarketplace/vendor/symfony/cache/PruneableInterface.php
new file mode 100644
index 00000000..42615253
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/PruneableInterface.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache;
+
+/**
+ * Interface extends psr-6 and psr-16 caches to allow for pruning (deletion) of all expired cache items.
+ */
+interface PruneableInterface
+{
+ /**
+ * @return bool
+ */
+ public function prune();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/README.md b/modules/empikmarketplace/vendor/symfony/cache/README.md
new file mode 100644
index 00000000..c4ab7520
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/README.md
@@ -0,0 +1,18 @@
+Symfony PSR-6 implementation for caching
+========================================
+
+This component provides an extended [PSR-6](http://www.php-fig.org/psr/psr-6/)
+implementation for adding cache to your applications. It is designed to have a
+low overhead so that caching is fastest. It ships with a few caching adapters
+for the most widespread and suited to caching backends. It also provides a
+`doctrine/cache` proxy adapter to cover more advanced caching needs and a proxy
+adapter for greater interoperability between PSR-6 implementations.
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/cache.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/modules/empikmarketplace/vendor/symfony/cache/ResettableInterface.php b/modules/empikmarketplace/vendor/symfony/cache/ResettableInterface.php
new file mode 100644
index 00000000..6be72861
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/ResettableInterface.php
@@ -0,0 +1,20 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache;
+
+/**
+ * Resets a pool's local state.
+ */
+interface ResettableInterface
+{
+ public function reset();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/AbstractCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/AbstractCache.php
new file mode 100644
index 00000000..baedb737
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/AbstractCache.php
@@ -0,0 +1,190 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Psr\Log\LoggerAwareInterface;
+use Psr\SimpleCache\CacheInterface;
+use Symfony\Component\Cache\CacheItem;
+use Symfony\Component\Cache\Exception\InvalidArgumentException;
+use Symfony\Component\Cache\ResettableInterface;
+use Symfony\Component\Cache\Traits\AbstractTrait;
+
+/**
+ * @author Nicolas Grekas
+ */
+abstract class AbstractCache implements CacheInterface, LoggerAwareInterface, ResettableInterface
+{
+ /**
+ * @internal
+ */
+ const NS_SEPARATOR = ':';
+
+ use AbstractTrait {
+ deleteItems as private;
+ AbstractTrait::deleteItem as delete;
+ AbstractTrait::hasItem as has;
+ }
+
+ private $defaultLifetime;
+
+ /**
+ * @param string $namespace
+ * @param int $defaultLifetime
+ */
+ protected function __construct($namespace = '', $defaultLifetime = 0)
+ {
+ $this->defaultLifetime = max(0, (int) $defaultLifetime);
+ $this->namespace = '' === $namespace ? '' : CacheItem::validateKey($namespace).':';
+ if (null !== $this->maxIdLength && \strlen($namespace) > $this->maxIdLength - 24) {
+ throw new InvalidArgumentException(sprintf('Namespace must be %d chars max, %d given ("%s").', $this->maxIdLength - 24, \strlen($namespace), $namespace));
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get($key, $default = null)
+ {
+ $id = $this->getId($key);
+
+ try {
+ foreach ($this->doFetch([$id]) as $value) {
+ return $value;
+ }
+ } catch (\Exception $e) {
+ CacheItem::log($this->logger, 'Failed to fetch key "{key}"', ['key' => $key, 'exception' => $e]);
+ }
+
+ return $default;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set($key, $value, $ttl = null)
+ {
+ CacheItem::validateKey($key);
+
+ return $this->setMultiple([$key => $value], $ttl);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getMultiple($keys, $default = null)
+ {
+ if ($keys instanceof \Traversable) {
+ $keys = iterator_to_array($keys, false);
+ } elseif (!\is_array($keys)) {
+ throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
+ }
+ $ids = [];
+
+ foreach ($keys as $key) {
+ $ids[] = $this->getId($key);
+ }
+ try {
+ $values = $this->doFetch($ids);
+ } catch (\Exception $e) {
+ CacheItem::log($this->logger, 'Failed to fetch requested values', ['keys' => $keys, 'exception' => $e]);
+ $values = [];
+ }
+ $ids = array_combine($ids, $keys);
+
+ return $this->generateValues($values, $ids, $default);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setMultiple($values, $ttl = null)
+ {
+ if (!\is_array($values) && !$values instanceof \Traversable) {
+ throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', \is_object($values) ? \get_class($values) : \gettype($values)));
+ }
+ $valuesById = [];
+
+ foreach ($values as $key => $value) {
+ if (\is_int($key)) {
+ $key = (string) $key;
+ }
+ $valuesById[$this->getId($key)] = $value;
+ }
+ if (false === $ttl = $this->normalizeTtl($ttl)) {
+ return $this->doDelete(array_keys($valuesById));
+ }
+
+ try {
+ $e = $this->doSave($valuesById, $ttl);
+ } catch (\Exception $e) {
+ }
+ if (true === $e || [] === $e) {
+ return true;
+ }
+ $keys = [];
+ foreach (\is_array($e) ? $e : array_keys($valuesById) as $id) {
+ $keys[] = substr($id, \strlen($this->namespace));
+ }
+ CacheItem::log($this->logger, 'Failed to save values', ['keys' => $keys, 'exception' => $e instanceof \Exception ? $e : null]);
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteMultiple($keys)
+ {
+ if ($keys instanceof \Traversable) {
+ $keys = iterator_to_array($keys, false);
+ } elseif (!\is_array($keys)) {
+ throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
+ }
+
+ return $this->deleteItems($keys);
+ }
+
+ private function normalizeTtl($ttl)
+ {
+ if (null === $ttl) {
+ return $this->defaultLifetime;
+ }
+ if ($ttl instanceof \DateInterval) {
+ $ttl = (int) \DateTime::createFromFormat('U', 0)->add($ttl)->format('U');
+ }
+ if (\is_int($ttl)) {
+ return 0 < $ttl ? $ttl : false;
+ }
+
+ throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', \is_object($ttl) ? \get_class($ttl) : \gettype($ttl)));
+ }
+
+ private function generateValues($values, &$keys, $default)
+ {
+ try {
+ foreach ($values as $id => $value) {
+ if (!isset($keys[$id])) {
+ $id = key($keys);
+ }
+ $key = $keys[$id];
+ unset($keys[$id]);
+ yield $key => $value;
+ }
+ } catch (\Exception $e) {
+ CacheItem::log($this->logger, 'Failed to fetch requested values', ['keys' => array_values($keys), 'exception' => $e]);
+ }
+
+ foreach ($keys as $key) {
+ yield $key => $default;
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/ApcuCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/ApcuCache.php
new file mode 100644
index 00000000..e583b443
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/ApcuCache.php
@@ -0,0 +1,29 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Symfony\Component\Cache\Traits\ApcuTrait;
+
+class ApcuCache extends AbstractCache
+{
+ use ApcuTrait;
+
+ /**
+ * @param string $namespace
+ * @param int $defaultLifetime
+ * @param string|null $version
+ */
+ public function __construct($namespace = '', $defaultLifetime = 0, $version = null)
+ {
+ $this->init($namespace, $defaultLifetime, $version);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/ArrayCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/ArrayCache.php
new file mode 100644
index 00000000..6013f0ad
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/ArrayCache.php
@@ -0,0 +1,148 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Psr\Log\LoggerAwareInterface;
+use Psr\SimpleCache\CacheInterface;
+use Symfony\Component\Cache\CacheItem;
+use Symfony\Component\Cache\Exception\InvalidArgumentException;
+use Symfony\Component\Cache\ResettableInterface;
+use Symfony\Component\Cache\Traits\ArrayTrait;
+
+/**
+ * @author Nicolas Grekas
+ */
+class ArrayCache implements CacheInterface, LoggerAwareInterface, ResettableInterface
+{
+ use ArrayTrait {
+ ArrayTrait::deleteItem as delete;
+ ArrayTrait::hasItem as has;
+ }
+
+ private $defaultLifetime;
+
+ /**
+ * @param int $defaultLifetime
+ * @param bool $storeSerialized Disabling serialization can lead to cache corruptions when storing mutable values but increases performance otherwise
+ */
+ public function __construct($defaultLifetime = 0, $storeSerialized = true)
+ {
+ $this->defaultLifetime = (int) $defaultLifetime;
+ $this->storeSerialized = $storeSerialized;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get($key, $default = null)
+ {
+ foreach ($this->getMultiple([$key], $default) as $v) {
+ return $v;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getMultiple($keys, $default = null)
+ {
+ if ($keys instanceof \Traversable) {
+ $keys = iterator_to_array($keys, false);
+ } elseif (!\is_array($keys)) {
+ throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
+ }
+ foreach ($keys as $key) {
+ CacheItem::validateKey($key);
+ }
+
+ return $this->generateItems($keys, time(), function ($k, $v, $hit) use ($default) { return $hit ? $v : $default; });
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteMultiple($keys)
+ {
+ if (!\is_array($keys) && !$keys instanceof \Traversable) {
+ throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
+ }
+ foreach ($keys as $key) {
+ $this->delete($key);
+ }
+
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set($key, $value, $ttl = null)
+ {
+ CacheItem::validateKey($key);
+
+ return $this->setMultiple([$key => $value], $ttl);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setMultiple($values, $ttl = null)
+ {
+ if (!\is_array($values) && !$values instanceof \Traversable) {
+ throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', \is_object($values) ? \get_class($values) : \gettype($values)));
+ }
+ $valuesArray = [];
+
+ foreach ($values as $key => $value) {
+ \is_int($key) || CacheItem::validateKey($key);
+ $valuesArray[$key] = $value;
+ }
+ if (false === $ttl = $this->normalizeTtl($ttl)) {
+ return $this->deleteMultiple(array_keys($valuesArray));
+ }
+ if ($this->storeSerialized) {
+ foreach ($valuesArray as $key => $value) {
+ try {
+ $valuesArray[$key] = serialize($value);
+ } catch (\Exception $e) {
+ $type = \is_object($value) ? \get_class($value) : \gettype($value);
+ CacheItem::log($this->logger, 'Failed to save key "{key}" ({type})', ['key' => $key, 'type' => $type, 'exception' => $e]);
+
+ return false;
+ }
+ }
+ }
+ $expiry = 0 < $ttl ? time() + $ttl : \PHP_INT_MAX;
+
+ foreach ($valuesArray as $key => $value) {
+ $this->values[$key] = $value;
+ $this->expiries[$key] = $expiry;
+ }
+
+ return true;
+ }
+
+ private function normalizeTtl($ttl)
+ {
+ if (null === $ttl) {
+ return $this->defaultLifetime;
+ }
+ if ($ttl instanceof \DateInterval) {
+ $ttl = (int) \DateTime::createFromFormat('U', 0)->add($ttl)->format('U');
+ }
+ if (\is_int($ttl)) {
+ return 0 < $ttl ? $ttl : false;
+ }
+
+ throw new InvalidArgumentException(sprintf('Expiration date must be an integer, a DateInterval or null, "%s" given.', \is_object($ttl) ? \get_class($ttl) : \gettype($ttl)));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/ChainCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/ChainCache.php
new file mode 100644
index 00000000..2e6c7277
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/ChainCache.php
@@ -0,0 +1,252 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Psr\SimpleCache\CacheInterface;
+use Symfony\Component\Cache\Exception\InvalidArgumentException;
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\ResettableInterface;
+
+/**
+ * Chains several caches together.
+ *
+ * Cached items are fetched from the first cache having them in its data store.
+ * They are saved and deleted in all caches at once.
+ *
+ * @author Nicolas Grekas
+ */
+class ChainCache implements CacheInterface, PruneableInterface, ResettableInterface
+{
+ private $miss;
+ private $caches = [];
+ private $defaultLifetime;
+ private $cacheCount;
+
+ /**
+ * @param CacheInterface[] $caches The ordered list of caches used to fetch cached items
+ * @param int $defaultLifetime The lifetime of items propagated from lower caches to upper ones
+ */
+ public function __construct(array $caches, $defaultLifetime = 0)
+ {
+ if (!$caches) {
+ throw new InvalidArgumentException('At least one cache must be specified.');
+ }
+
+ foreach ($caches as $cache) {
+ if (!$cache instanceof CacheInterface) {
+ throw new InvalidArgumentException(sprintf('The class "%s" does not implement the "%s" interface.', \get_class($cache), CacheInterface::class));
+ }
+ }
+
+ $this->miss = new \stdClass();
+ $this->caches = array_values($caches);
+ $this->cacheCount = \count($this->caches);
+ $this->defaultLifetime = 0 < $defaultLifetime ? (int) $defaultLifetime : null;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get($key, $default = null)
+ {
+ $miss = null !== $default && \is_object($default) ? $default : $this->miss;
+
+ foreach ($this->caches as $i => $cache) {
+ $value = $cache->get($key, $miss);
+
+ if ($miss !== $value) {
+ while (0 <= --$i) {
+ $this->caches[$i]->set($key, $value, $this->defaultLifetime);
+ }
+
+ return $value;
+ }
+ }
+
+ return $default;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getMultiple($keys, $default = null)
+ {
+ $miss = null !== $default && \is_object($default) ? $default : $this->miss;
+
+ return $this->generateItems($this->caches[0]->getMultiple($keys, $miss), 0, $miss, $default);
+ }
+
+ private function generateItems($values, $cacheIndex, $miss, $default)
+ {
+ $missing = [];
+ $nextCacheIndex = $cacheIndex + 1;
+ $nextCache = isset($this->caches[$nextCacheIndex]) ? $this->caches[$nextCacheIndex] : null;
+
+ foreach ($values as $k => $value) {
+ if ($miss !== $value) {
+ yield $k => $value;
+ } elseif (!$nextCache) {
+ yield $k => $default;
+ } else {
+ $missing[] = $k;
+ }
+ }
+
+ if ($missing) {
+ $cache = $this->caches[$cacheIndex];
+ $values = $this->generateItems($nextCache->getMultiple($missing, $miss), $nextCacheIndex, $miss, $default);
+
+ foreach ($values as $k => $value) {
+ if ($miss !== $value) {
+ $cache->set($k, $value, $this->defaultLifetime);
+ yield $k => $value;
+ } else {
+ yield $k => $default;
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function has($key)
+ {
+ foreach ($this->caches as $cache) {
+ if ($cache->has($key)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function clear()
+ {
+ $cleared = true;
+ $i = $this->cacheCount;
+
+ while ($i--) {
+ $cleared = $this->caches[$i]->clear() && $cleared;
+ }
+
+ return $cleared;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function delete($key)
+ {
+ $deleted = true;
+ $i = $this->cacheCount;
+
+ while ($i--) {
+ $deleted = $this->caches[$i]->delete($key) && $deleted;
+ }
+
+ return $deleted;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteMultiple($keys)
+ {
+ if ($keys instanceof \Traversable) {
+ $keys = iterator_to_array($keys, false);
+ }
+ $deleted = true;
+ $i = $this->cacheCount;
+
+ while ($i--) {
+ $deleted = $this->caches[$i]->deleteMultiple($keys) && $deleted;
+ }
+
+ return $deleted;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set($key, $value, $ttl = null)
+ {
+ $saved = true;
+ $i = $this->cacheCount;
+
+ while ($i--) {
+ $saved = $this->caches[$i]->set($key, $value, $ttl) && $saved;
+ }
+
+ return $saved;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setMultiple($values, $ttl = null)
+ {
+ if ($values instanceof \Traversable) {
+ $valuesIterator = $values;
+ $values = function () use ($valuesIterator, &$values) {
+ $generatedValues = [];
+
+ foreach ($valuesIterator as $key => $value) {
+ yield $key => $value;
+ $generatedValues[$key] = $value;
+ }
+
+ $values = $generatedValues;
+ };
+ $values = $values();
+ }
+ $saved = true;
+ $i = $this->cacheCount;
+
+ while ($i--) {
+ $saved = $this->caches[$i]->setMultiple($values, $ttl) && $saved;
+ }
+
+ return $saved;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function prune()
+ {
+ $pruned = true;
+
+ foreach ($this->caches as $cache) {
+ if ($cache instanceof PruneableInterface) {
+ $pruned = $cache->prune() && $pruned;
+ }
+ }
+
+ return $pruned;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reset()
+ {
+ foreach ($this->caches as $cache) {
+ if ($cache instanceof ResettableInterface) {
+ $cache->reset();
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/DoctrineCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/DoctrineCache.php
new file mode 100644
index 00000000..ea1a4eda
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/DoctrineCache.php
@@ -0,0 +1,31 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Doctrine\Common\Cache\CacheProvider;
+use Symfony\Component\Cache\Traits\DoctrineTrait;
+
+class DoctrineCache extends AbstractCache
+{
+ use DoctrineTrait;
+
+ /**
+ * @param string $namespace
+ * @param int $defaultLifetime
+ */
+ public function __construct(CacheProvider $provider, $namespace = '', $defaultLifetime = 0)
+ {
+ parent::__construct('', $defaultLifetime);
+ $this->provider = $provider;
+ $provider->setNamespace($namespace);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/FilesystemCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/FilesystemCache.php
new file mode 100644
index 00000000..ccd57953
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/FilesystemCache.php
@@ -0,0 +1,31 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\Traits\FilesystemTrait;
+
+class FilesystemCache extends AbstractCache implements PruneableInterface
+{
+ use FilesystemTrait;
+
+ /**
+ * @param string $namespace
+ * @param int $defaultLifetime
+ * @param string|null $directory
+ */
+ public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
+ {
+ parent::__construct('', $defaultLifetime);
+ $this->init($namespace, $directory);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/MemcachedCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/MemcachedCache.php
new file mode 100644
index 00000000..94a9f297
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/MemcachedCache.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Symfony\Component\Cache\Traits\MemcachedTrait;
+
+class MemcachedCache extends AbstractCache
+{
+ use MemcachedTrait;
+
+ protected $maxIdLength = 250;
+
+ /**
+ * @param string $namespace
+ * @param int $defaultLifetime
+ */
+ public function __construct(\Memcached $client, $namespace = '', $defaultLifetime = 0)
+ {
+ $this->init($client, $namespace, $defaultLifetime);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/NullCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/NullCache.php
new file mode 100644
index 00000000..fa986aeb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/NullCache.php
@@ -0,0 +1,86 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Psr\SimpleCache\CacheInterface;
+
+/**
+ * @author Nicolas Grekas
+ */
+class NullCache implements CacheInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function get($key, $default = null)
+ {
+ return $default;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getMultiple($keys, $default = null)
+ {
+ foreach ($keys as $key) {
+ yield $key => $default;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function has($key)
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function clear()
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function delete($key)
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteMultiple($keys)
+ {
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set($key, $value, $ttl = null)
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setMultiple($values, $ttl = null)
+ {
+ return false;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/PdoCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/PdoCache.php
new file mode 100644
index 00000000..c92e049a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/PdoCache.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\Traits\PdoTrait;
+
+class PdoCache extends AbstractCache implements PruneableInterface
+{
+ use PdoTrait;
+
+ protected $maxIdLength = 255;
+
+ /**
+ * You can either pass an existing database connection as PDO instance or
+ * a Doctrine DBAL Connection or a DSN string that will be used to
+ * lazy-connect to the database when the cache is actually used.
+ *
+ * List of available options:
+ * * db_table: The name of the table [default: cache_items]
+ * * db_id_col: The column where to store the cache id [default: item_id]
+ * * db_data_col: The column where to store the cache data [default: item_data]
+ * * db_lifetime_col: The column where to store the lifetime [default: item_lifetime]
+ * * db_time_col: The column where to store the timestamp [default: item_time]
+ * * db_username: The username when lazy-connect [default: '']
+ * * db_password: The password when lazy-connect [default: '']
+ * * db_connection_options: An array of driver-specific connection options [default: []]
+ *
+ * @param \PDO|Connection|string $connOrDsn A \PDO or Connection instance or DSN string or null
+ * @param string $namespace
+ * @param int $defaultLifetime
+ * @param array $options An associative array of options
+ *
+ * @throws InvalidArgumentException When first argument is not PDO nor Connection nor string
+ * @throws InvalidArgumentException When PDO error mode is not PDO::ERRMODE_EXCEPTION
+ * @throws InvalidArgumentException When namespace contains invalid characters
+ */
+ public function __construct($connOrDsn, $namespace = '', $defaultLifetime = 0, array $options = [])
+ {
+ $this->init($connOrDsn, $namespace, $defaultLifetime, $options);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/PhpArrayCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/PhpArrayCache.php
new file mode 100644
index 00000000..7bb25ff8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/PhpArrayCache.php
@@ -0,0 +1,259 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Psr\SimpleCache\CacheInterface;
+use Symfony\Component\Cache\Exception\InvalidArgumentException;
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\ResettableInterface;
+use Symfony\Component\Cache\Traits\PhpArrayTrait;
+
+/**
+ * Caches items at warm up time using a PHP array that is stored in shared memory by OPCache since PHP 7.0.
+ * Warmed up items are read-only and run-time discovered items are cached using a fallback adapter.
+ *
+ * @author Titouan Galopin
+ * @author Nicolas Grekas
+ */
+class PhpArrayCache implements CacheInterface, PruneableInterface, ResettableInterface
+{
+ use PhpArrayTrait;
+
+ /**
+ * @param string $file The PHP file were values are cached
+ * @param CacheInterface $fallbackPool A pool to fallback on when an item is not hit
+ */
+ public function __construct($file, CacheInterface $fallbackPool)
+ {
+ $this->file = $file;
+ $this->pool = $fallbackPool;
+ $this->zendDetectUnicode = filter_var(ini_get('zend.detect_unicode'), \FILTER_VALIDATE_BOOLEAN);
+ }
+
+ /**
+ * This adapter should only be used on PHP 7.0+ to take advantage of how PHP
+ * stores arrays in its latest versions. This factory method decorates the given
+ * fallback pool with this adapter only if the current PHP version is supported.
+ *
+ * @param string $file The PHP file were values are cached
+ * @param CacheInterface $fallbackPool A pool to fallback on when an item is not hit
+ *
+ * @return CacheInterface
+ */
+ public static function create($file, CacheInterface $fallbackPool)
+ {
+ if (\PHP_VERSION_ID >= 70000) {
+ return new static($file, $fallbackPool);
+ }
+
+ return $fallbackPool;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get($key, $default = null)
+ {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+ if (null === $this->values) {
+ $this->initialize();
+ }
+ if (!isset($this->values[$key])) {
+ return $this->pool->get($key, $default);
+ }
+
+ $value = $this->values[$key];
+
+ if ('N;' === $value) {
+ $value = null;
+ } elseif (\is_string($value) && isset($value[2]) && ':' === $value[1]) {
+ try {
+ $e = null;
+ $value = unserialize($value);
+ } catch (\Error $e) {
+ } catch (\Exception $e) {
+ }
+ if (null !== $e) {
+ return $default;
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getMultiple($keys, $default = null)
+ {
+ if ($keys instanceof \Traversable) {
+ $keys = iterator_to_array($keys, false);
+ } elseif (!\is_array($keys)) {
+ throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
+ }
+ foreach ($keys as $key) {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+ }
+ if (null === $this->values) {
+ $this->initialize();
+ }
+
+ return $this->generateItems($keys, $default);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function has($key)
+ {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+ if (null === $this->values) {
+ $this->initialize();
+ }
+
+ return isset($this->values[$key]) || $this->pool->has($key);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function delete($key)
+ {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+ if (null === $this->values) {
+ $this->initialize();
+ }
+
+ return !isset($this->values[$key]) && $this->pool->delete($key);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function deleteMultiple($keys)
+ {
+ if (!\is_array($keys) && !$keys instanceof \Traversable) {
+ throw new InvalidArgumentException(sprintf('Cache keys must be array or Traversable, "%s" given.', \is_object($keys) ? \get_class($keys) : \gettype($keys)));
+ }
+
+ $deleted = true;
+ $fallbackKeys = [];
+
+ foreach ($keys as $key) {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+
+ if (isset($this->values[$key])) {
+ $deleted = false;
+ } else {
+ $fallbackKeys[] = $key;
+ }
+ }
+ if (null === $this->values) {
+ $this->initialize();
+ }
+
+ if ($fallbackKeys) {
+ $deleted = $this->pool->deleteMultiple($fallbackKeys) && $deleted;
+ }
+
+ return $deleted;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function set($key, $value, $ttl = null)
+ {
+ if (!\is_string($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+ if (null === $this->values) {
+ $this->initialize();
+ }
+
+ return !isset($this->values[$key]) && $this->pool->set($key, $value, $ttl);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setMultiple($values, $ttl = null)
+ {
+ if (!\is_array($values) && !$values instanceof \Traversable) {
+ throw new InvalidArgumentException(sprintf('Cache values must be array or Traversable, "%s" given.', \is_object($values) ? \get_class($values) : \gettype($values)));
+ }
+
+ $saved = true;
+ $fallbackValues = [];
+
+ foreach ($values as $key => $value) {
+ if (!\is_string($key) && !\is_int($key)) {
+ throw new InvalidArgumentException(sprintf('Cache key must be string, "%s" given.', \is_object($key) ? \get_class($key) : \gettype($key)));
+ }
+
+ if (isset($this->values[$key])) {
+ $saved = false;
+ } else {
+ $fallbackValues[$key] = $value;
+ }
+ }
+
+ if ($fallbackValues) {
+ $saved = $this->pool->setMultiple($fallbackValues, $ttl) && $saved;
+ }
+
+ return $saved;
+ }
+
+ private function generateItems(array $keys, $default)
+ {
+ $fallbackKeys = [];
+
+ foreach ($keys as $key) {
+ if (isset($this->values[$key])) {
+ $value = $this->values[$key];
+
+ if ('N;' === $value) {
+ yield $key => null;
+ } elseif (\is_string($value) && isset($value[2]) && ':' === $value[1]) {
+ try {
+ yield $key => unserialize($value);
+ } catch (\Error $e) {
+ yield $key => $default;
+ } catch (\Exception $e) {
+ yield $key => $default;
+ }
+ } else {
+ yield $key => $value;
+ }
+ } else {
+ $fallbackKeys[] = $key;
+ }
+ }
+
+ if ($fallbackKeys) {
+ foreach ($this->pool->getMultiple($fallbackKeys, $default) as $key => $item) {
+ yield $key => $item;
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/PhpFilesCache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/PhpFilesCache.php
new file mode 100644
index 00000000..50c19034
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/PhpFilesCache.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Symfony\Component\Cache\Exception\CacheException;
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\Traits\PhpFilesTrait;
+
+class PhpFilesCache extends AbstractCache implements PruneableInterface
+{
+ use PhpFilesTrait;
+
+ /**
+ * @param string $namespace
+ * @param int $defaultLifetime
+ * @param string|null $directory
+ *
+ * @throws CacheException if OPcache is not enabled
+ */
+ public function __construct($namespace = '', $defaultLifetime = 0, $directory = null)
+ {
+ if (!static::isSupported()) {
+ throw new CacheException('OPcache is not enabled.');
+ }
+ parent::__construct('', $defaultLifetime);
+ $this->init($namespace, $directory);
+
+ $e = new \Exception();
+ $this->includeHandler = function () use ($e) { throw $e; };
+ $this->zendDetectUnicode = filter_var(ini_get('zend.detect_unicode'), \FILTER_VALIDATE_BOOLEAN);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/Simple/Psr6Cache.php b/modules/empikmarketplace/vendor/symfony/cache/Simple/Psr6Cache.php
new file mode 100644
index 00000000..6b3de205
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/Simple/Psr6Cache.php
@@ -0,0 +1,241 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Cache\Simple;
+
+use Psr\Cache\CacheException as Psr6CacheException;
+use Psr\Cache\CacheItemPoolInterface;
+use Psr\SimpleCache\CacheException as SimpleCacheException;
+use Psr\SimpleCache\CacheInterface;
+use Symfony\Component\Cache\Adapter\AdapterInterface;
+use Symfony\Component\Cache\CacheItem;
+use Symfony\Component\Cache\Exception\InvalidArgumentException;
+use Symfony\Component\Cache\PruneableInterface;
+use Symfony\Component\Cache\ResettableInterface;
+use Symfony\Component\Cache\Traits\ProxyTrait;
+
+/**
+ * @author Nicolas Grekas
+ *
+ * @internal
+ */
+trait RedisTrait
+{
+ 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
+ */
+ private function init($redisClient, $namespace = '', $defaultLifetime = 0)
+ {
+ parent::__construct($namespace, $defaultLifetime);
+
+ 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 \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \RedisCluster && !$redisClient instanceof \Predis\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;
+ }
+
+ /**
+ * Creates a Redis connection using a DSN configuration.
+ *
+ * Example DSN:
+ * - redis://localhost
+ * - redis://example.com:1234
+ * - redis://secret@example.com/13
+ * - redis:///var/run/redis.sock
+ * - redis://secret@/var/run/redis.sock/13
+ *
+ * @param string $dsn
+ * @param array $options See self::$defaultConnectionOptions
+ *
+ * @throws InvalidArgumentException when the DSN is invalid
+ *
+ * @return \Redis|\Predis\Client According to the "class" option
+ */
+ public static function createConnection($dsn, array $options = [])
+ {
+ 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) {
+ if (isset($m[1])) {
+ $auth = $m[1];
+ }
+
+ return 'file://';
+ }, $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 InvalidArgumentException(sprintf('Invalid Redis DSN: "%s".', $dsn));
+ }
+ if (isset($params['path']) && preg_match('#/(\d+)$#', $params['path'], $m)) {
+ $params['dbindex'] = $m[1];
+ $params['path'] = substr($params['path'], 0, -\strlen($m[0]));
+ }
+ if (isset($params['host'])) {
+ $scheme = 'tcp';
+ } else {
+ $scheme = 'unix';
+ }
+ $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);
+ $params += $query;
+ }
+ $params += $options + self::$defaultConnectionOptions;
+ if (null === $params['class'] && !\extension_loaded('redis') && !class_exists(\Predis\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') ? \Redis::class : \Predis\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']);
+
+ set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; });
+ $isConnected = $redis->isConnected();
+ restore_error_handler();
+ if (!$isConnected) {
+ $error = preg_match('/^Redis::p?connect\(\): (.*)/', $error, $error) ? sprintf(' (%s)', $error[1]) : '';
+ throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$error.'.');
+ }
+
+ 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 "%s" failed: ', $dsn).$e.'.');
+ }
+ } catch (\RedisException $e) {
+ throw new InvalidArgumentException(sprintf('Redis connection "%s" failed: ', $dsn).$e->getMessage());
+ }
+
+ return true;
+ };
+
+ if ($params['lazy']) {
+ $redis = new RedisProxy($redis, $initializer);
+ } else {
+ $initializer($redis);
+ }
+ } elseif (is_a($class, \Predis\Client::class, true)) {
+ $params['scheme'] = $scheme;
+ $params['database'] = $params['dbindex'] ?: null;
+ $params['password'] = $auth;
+ $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 InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
+ }
+
+ return $redis;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doFetch(array $ids)
+ {
+ if (!$ids) {
+ return [];
+ }
+
+ $result = [];
+
+ if ($this->redis instanceof \Predis\Client && $this->redis->getConnection() instanceof ClusterInterface) {
+ $values = $this->pipeline(function () use ($ids) {
+ foreach ($ids as $id) {
+ yield 'get' => [$id];
+ }
+ });
+ } else {
+ $values = $this->redis->mget($ids);
+
+ if (!\is_array($values) || \count($values) !== \count($ids)) {
+ return [];
+ }
+
+ $values = array_combine($ids, $values);
+ }
+
+ foreach ($values as $id => $v) {
+ if ($v) {
+ $result[$id] = parent::unserialize($v);
+ }
+ }
+
+ return $result;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doHave($id)
+ {
+ return (bool) $this->redis->exists($id);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doClear($namespace)
+ {
+ $cleared = true;
+ $hosts = [$this->redis];
+ $evalArgs = [[$namespace], 0];
+
+ if ($this->redis instanceof \Predis\Client) {
+ $evalArgs = [0, $namespace];
+
+ $connection = $this->redis->getConnection();
+ if ($connection instanceof ClusterInterface && $connection instanceof \Traversable) {
+ $hosts = [];
+ foreach ($connection as $c) {
+ $hosts[] = new \Predis\Client($c);
+ }
+ }
+ } elseif ($this->redis instanceof \RedisArray) {
+ $hosts = [];
+ foreach ($this->redis->_hosts() as $host) {
+ $hosts[] = $this->redis->_instance($host);
+ }
+ } elseif ($this->redis instanceof \RedisCluster) {
+ $hosts = [];
+ foreach ($this->redis->_masters() as $host) {
+ $hosts[] = $h = new \Redis();
+ $h->connect($host[0], $host[1]);
+ }
+ }
+ foreach ($hosts as $host) {
+ if (!isset($namespace[0])) {
+ $cleared = $host->flushDb() && $cleared;
+ continue;
+ }
+
+ $info = $host->info('Server');
+ $info = isset($info['Server']) ? $info['Server'] : $info;
+
+ 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.
+ $cleared = $host->eval("local keys=redis.call('KEYS',ARGV[1]..'*') for i=1,#keys,5000 do redis.call('DEL',unpack(keys,i,math.min(i+4999,#keys))) end return 1", $evalArgs[0], $evalArgs[1]) && $cleared;
+ continue;
+ }
+
+ $cursor = null;
+ do {
+ $keys = $host instanceof \Predis\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];
+ }
+ if ($keys) {
+ $this->doDelete($keys);
+ }
+ } while ($cursor = (int) $cursor);
+ }
+
+ return $cleared;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doDelete(array $ids)
+ {
+ if (!$ids) {
+ return true;
+ }
+
+ if ($this->redis instanceof \Predis\Client && $this->redis->getConnection() instanceof ClusterInterface) {
+ $this->pipeline(function () use ($ids) {
+ foreach ($ids as $id) {
+ yield 'del' => [$id];
+ }
+ })->rewind();
+ } else {
+ $this->redis->del($ids);
+ }
+
+ return true;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function doSave(array $values, $lifetime)
+ {
+ $serialized = [];
+ $failed = [];
+
+ foreach ($values as $id => $value) {
+ try {
+ $serialized[$id] = serialize($value);
+ } catch (\Exception $e) {
+ $failed[] = $id;
+ }
+ }
+
+ if (!$serialized) {
+ return $failed;
+ }
+
+ $results = $this->pipeline(function () use ($serialized, $lifetime) {
+ foreach ($serialized as $id => $value) {
+ if (0 >= $lifetime) {
+ yield 'set' => [$id, $value];
+ } else {
+ yield 'setEx' => [$id, $lifetime, $value];
+ }
+ }
+ });
+ foreach ($results as $id => $result) {
+ if (true !== $result && (!$result instanceof Status || $result !== Status::get('OK'))) {
+ $failed[] = $id;
+ }
+ }
+
+ return $failed;
+ }
+
+ private function pipeline(\Closure $generator)
+ {
+ $ids = [];
+
+ if ($this->redis instanceof \RedisCluster || ($this->redis instanceof \Predis\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);
+ $ids[] = $args[0];
+ }
+ } elseif ($this->redis instanceof \Predis\Client) {
+ $results = $this->redis->pipeline(function ($redis) use ($generator, &$ids) {
+ foreach ($generator() as $command => $args) {
+ \call_user_func_array([$redis, $command], $args);
+ $ids[] = $args[0];
+ }
+ });
+ } 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(\Redis::PIPELINE);
+ }
+ \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)) {
+ $results[$k] = $connections[$h][$c];
+ }
+ } else {
+ $this->redis->multi(\Redis::PIPELINE);
+ foreach ($generator() as $command => $args) {
+ \call_user_func_array([$this->redis, $command], $args);
+ $ids[] = $args[0];
+ }
+ $results = $this->redis->exec();
+ }
+
+ foreach ($ids as $k => $id) {
+ yield $id => $results[$k];
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/composer.json b/modules/empikmarketplace/vendor/symfony/cache/composer.json
new file mode 100644
index 00000000..f412e4f1
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/composer.json
@@ -0,0 +1,45 @@
+{
+ "name": "symfony/cache",
+ "type": "library",
+ "description": "Symfony Cache component with PSR-6, PSR-16, and tags",
+ "keywords": ["caching", "psr6"],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "provide": {
+ "psr/cache-implementation": "1.0",
+ "psr/simple-cache-implementation": "1.0"
+ },
+ "require": {
+ "php": "^5.5.9|>=7.0.8",
+ "psr/cache": "~1.0",
+ "psr/log": "~1.0",
+ "psr/simple-cache": "^1.0",
+ "symfony/polyfill-apcu": "~1.1"
+ },
+ "require-dev": {
+ "cache/integration-tests": "dev-master",
+ "doctrine/cache": "^1.6",
+ "doctrine/dbal": "^2.4|^3.0",
+ "predis/predis": "^1.0"
+ },
+ "conflict": {
+ "symfony/var-dumper": "<3.3"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\Cache\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/modules/empikmarketplace/vendor/symfony/cache/phpunit.xml.dist b/modules/empikmarketplace/vendor/symfony/cache/phpunit.xml.dist
new file mode 100644
index 00000000..c35458ca
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/cache/phpunit.xml.dist
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+ ./Tests/
+
+
+
+
+
+ ./
+
+ ./Tests
+ ./vendor
+
+
+
+
+
+
+
+
+
+
+ Cache\IntegrationTests
+ Doctrine\Common\Cache
+ Symfony\Component\Cache
+ Symfony\Component\Cache\Tests\Fixtures
+ Symfony\Component\Cache\Traits
+
+
+
+
+
+
+
diff --git a/modules/empikmarketplace/vendor/symfony/config/.gitignore b/modules/empikmarketplace/vendor/symfony/config/.gitignore
new file mode 100644
index 00000000..c49a5d8d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/.gitignore
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
diff --git a/modules/empikmarketplace/vendor/symfony/config/CHANGELOG.md b/modules/empikmarketplace/vendor/symfony/config/CHANGELOG.md
new file mode 100644
index 00000000..6cb610c4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/CHANGELOG.md
@@ -0,0 +1,78 @@
+CHANGELOG
+=========
+
+3.4.0
+-----
+
+ * added `setDeprecated()` method to indicate a deprecated node
+ * added `XmlUtils::parse()` method to parse an XML string
+ * deprecated `ConfigCachePass`
+
+3.3.0
+-----
+
+ * added `ReflectionClassResource` class
+ * added second `$exists` constructor argument to `ClassExistenceResource`
+ * made `ClassExistenceResource` work with interfaces and traits
+ * added `ConfigCachePass` (originally in FrameworkBundle)
+ * added `castToArray()` helper to turn any config value into an array
+
+3.0.0
+-----
+
+ * removed `ReferenceDumper` class
+ * removed the `ResourceInterface::isFresh()` method
+ * removed `BCResourceInterfaceChecker` class
+ * removed `ResourceInterface::getResource()` method
+
+2.8.0
+-----
+
+The edge case of defining just one value for nodes of type Enum is now allowed:
+
+```php
+$rootNode
+ ->children()
+ ->enumNode('variable')
+ ->values(['value'])
+ ->end()
+ ->end()
+;
+```
+
+Before: `InvalidArgumentException` (variable must contain at least two
+distinct elements).
+After: the code will work as expected and it will restrict the values of the
+`variable` option to just `value`.
+
+ * deprecated the `ResourceInterface::isFresh()` method. If you implement custom resource types and they
+ can be validated that way, make them implement the new `SelfCheckingResourceInterface`.
+ * deprecated the getResource() method in ResourceInterface. You can still call this method
+ on concrete classes implementing the interface, but it does not make sense at the interface
+ level as you need to know about the particular type of resource at hand to understand the
+ semantics of the returned value.
+
+2.7.0
+-----
+
+ * added `ConfigCacheInterface`, `ConfigCacheFactoryInterface` and a basic `ConfigCacheFactory`
+ implementation to delegate creation of ConfigCache instances
+
+2.2.0
+-----
+
+ * added `ArrayNodeDefinition::canBeEnabled()` and `ArrayNodeDefinition::canBeDisabled()`
+ to ease configuration when some sections are respectively disabled / enabled
+ by default.
+ * added a `normalizeKeys()` method for array nodes (to avoid key normalization)
+ * added numerical type handling for config definitions
+ * added convenience methods for optional configuration sections to `ArrayNodeDefinition`
+ * added a utils class for XML manipulations
+
+2.1.0
+-----
+
+ * added a way to add documentation on configuration
+ * implemented `Serializable` on resources
+ * `LoaderResolverInterface` is now used instead of `LoaderResolver` for type
+ hinting
diff --git a/modules/empikmarketplace/vendor/symfony/config/ConfigCache.php b/modules/empikmarketplace/vendor/symfony/config/ConfigCache.php
new file mode 100644
index 00000000..b2a39076
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ConfigCache.php
@@ -0,0 +1,62 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+use Symfony\Component\Config\Resource\SelfCheckingResourceChecker;
+
+/**
+ * ConfigCache caches arbitrary content in files on disk.
+ *
+ * When in debug mode, those metadata resources that implement
+ * \Symfony\Component\Config\Resource\SelfCheckingResourceInterface will
+ * be used to check cache freshness.
+ *
+ * @author Fabien Potencier
+ * @author Matthias Pigulla
+ */
+class ConfigCache extends ResourceCheckerConfigCache
+{
+ private $debug;
+
+ /**
+ * @param string $file The absolute cache path
+ * @param bool $debug Whether debugging is enabled or not
+ */
+ public function __construct($file, $debug)
+ {
+ $this->debug = (bool) $debug;
+
+ $checkers = [];
+ if (true === $this->debug) {
+ $checkers = [new SelfCheckingResourceChecker()];
+ }
+
+ parent::__construct($file, $checkers);
+ }
+
+ /**
+ * Checks if the cache is still fresh.
+ *
+ * This implementation always returns true when debug is off and the
+ * cache file exists.
+ *
+ * @return bool true if the cache is fresh, false otherwise
+ */
+ public function isFresh()
+ {
+ if (!$this->debug && is_file($this->getPath())) {
+ return true;
+ }
+
+ return parent::isFresh();
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/ConfigCacheFactory.php b/modules/empikmarketplace/vendor/symfony/config/ConfigCacheFactory.php
new file mode 100644
index 00000000..7903cca9
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ConfigCacheFactory.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+/**
+ * Basic implementation of ConfigCacheFactoryInterface that
+ * creates an instance of the default ConfigCache.
+ *
+ * This factory and/or cache do not support cache validation
+ * by means of ResourceChecker instances (that is, service-based).
+ *
+ * @author Matthias Pigulla
+ */
+class ConfigCacheFactory implements ConfigCacheFactoryInterface
+{
+ private $debug;
+
+ /**
+ * @param bool $debug The debug flag to pass to ConfigCache
+ */
+ public function __construct($debug)
+ {
+ $this->debug = $debug;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ 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)));
+ }
+
+ $cache = new ConfigCache($file, $this->debug);
+ if (!$cache->isFresh()) {
+ \call_user_func($callback, $cache);
+ }
+
+ return $cache;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/ConfigCacheFactoryInterface.php b/modules/empikmarketplace/vendor/symfony/config/ConfigCacheFactoryInterface.php
new file mode 100644
index 00000000..8e80142b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ConfigCacheFactoryInterface.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+/**
+ * Interface for a ConfigCache factory. This factory creates
+ * an instance of ConfigCacheInterface and initializes the
+ * cache if necessary.
+ *
+ * @author Matthias Pigulla
+ */
+interface ConfigCacheFactoryInterface
+{
+ /**
+ * Creates a cache instance and (re-)initializes it if necessary.
+ *
+ * @param string $file The absolute cache file path
+ * @param callable $callable The callable to be executed when the cache needs to be filled (i. e. is not fresh). The cache will be passed as the only parameter to this callback
+ *
+ * @return ConfigCacheInterface The cache instance
+ */
+ public function cache($file, $callable);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/ConfigCacheInterface.php b/modules/empikmarketplace/vendor/symfony/config/ConfigCacheInterface.php
new file mode 100644
index 00000000..7c47ad70
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ConfigCacheInterface.php
@@ -0,0 +1,49 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+use Symfony\Component\Config\Resource\ResourceInterface;
+
+/**
+ * Interface for ConfigCache.
+ *
+ * @author Matthias Pigulla
+ */
+interface ConfigCacheInterface
+{
+ /**
+ * Gets the cache file path.
+ *
+ * @return string The cache file path
+ */
+ public function getPath();
+
+ /**
+ * Checks if the cache is still fresh.
+ *
+ * This check should take the metadata passed to the write() method into consideration.
+ *
+ * @return bool Whether the cache is still fresh
+ */
+ public function isFresh();
+
+ /**
+ * Writes the given content into the cache file. Metadata will be stored
+ * independently and can be used to check cache freshness at a later time.
+ *
+ * @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
+ */
+ public function write($content, array $metadata = null);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/ArrayNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/ArrayNode.php
new file mode 100644
index 00000000..59a0af87
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/ArrayNode.php
@@ -0,0 +1,379 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
+
+/**
+ * Represents an Array node in the config tree.
+ *
+ * @author Johannes M. Schmitt
+ */
+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;
+
+ public function setNormalizeKeys($normalizeKeys)
+ {
+ $this->normalizeKeys = (bool) $normalizeKeys;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * Namely, you mostly have foo_bar in YAML while you have foo-bar in XML.
+ * After running this method, all keys are normalized to foo_bar.
+ *
+ * If you have a mixed key like foo-bar_moo, it will not be altered.
+ * The key will also not be altered if the target key already exists.
+ */
+ protected function preNormalize($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)) {
+ $normalized[$normalizedKey] = $v;
+ } else {
+ $normalized[$k] = $v;
+ }
+ }
+
+ return $normalized;
+ }
+
+ /**
+ * Retrieves the children of this node.
+ *
+ * @return array The children
+ */
+ public function getChildren()
+ {
+ return $this->children;
+ }
+
+ /**
+ * Sets the xml remappings that should be performed.
+ *
+ * @param array $remappings An array of the form [[string, string]]
+ */
+ public function setXmlRemappings(array $remappings)
+ {
+ $this->xmlRemappings = $remappings;
+ }
+
+ /**
+ * Gets the xml remappings that should be performed.
+ *
+ * @return array an array of the form [[string, string]]
+ */
+ public function getXmlRemappings()
+ {
+ return $this->xmlRemappings;
+ }
+
+ /**
+ * Sets whether to add default values for this array if it has not been
+ * defined in any of the configuration files.
+ *
+ * @param bool $boolean
+ */
+ public function setAddIfNotSet($boolean)
+ {
+ $this->addIfNotSet = (bool) $boolean;
+ }
+
+ /**
+ * Sets whether false is allowed as value indicating that the array should be unset.
+ *
+ * @param bool $allow
+ */
+ public function setAllowFalse($allow)
+ {
+ $this->allowFalse = (bool) $allow;
+ }
+
+ /**
+ * Sets whether new keys can be defined in subsequent configurations.
+ *
+ * @param bool $allow
+ */
+ public function setAllowNewKeys($allow)
+ {
+ $this->allowNewKeys = (bool) $allow;
+ }
+
+ /**
+ * Sets if deep merging should occur.
+ *
+ * @param bool $boolean
+ */
+ public function setPerformDeepMerging($boolean)
+ {
+ $this->performDeepMerging = (bool) $boolean;
+ }
+
+ /**
+ * Whether extra keys should just be ignored without an exception.
+ *
+ * @param bool $boolean To allow extra keys
+ * @param bool $remove To remove extra keys
+ */
+ public function setIgnoreExtraKeys($boolean, $remove = true)
+ {
+ $this->ignoreExtraKeys = (bool) $boolean;
+ $this->removeExtraKeys = $this->ignoreExtraKeys && $remove;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasDefaultValue()
+ {
+ return $this->addIfNotSet;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefaultValue()
+ {
+ if (!$this->hasDefaultValue()) {
+ throw new \RuntimeException(sprintf('The node at path "%s" has no default value.', $this->getPath()));
+ }
+
+ $defaults = [];
+ foreach ($this->children as $name => $child) {
+ if ($child->hasDefaultValue()) {
+ $defaults[$name] = $child->getDefaultValue();
+ }
+ }
+
+ return $defaults;
+ }
+
+ /**
+ * Adds a child node.
+ *
+ * @throws \InvalidArgumentException when the child node has no name
+ * @throws \InvalidArgumentException when the child node's name is not unique
+ */
+ public function addChild(NodeInterface $node)
+ {
+ $name = $node->getName();
+ 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));
+ }
+
+ $this->children[$name] = $node;
+ }
+
+ /**
+ * Finalizes the value of this node.
+ *
+ * @param mixed $value
+ *
+ * @return mixed The finalised value
+ *
+ * @throws UnsetKeyException
+ * @throws InvalidConfigurationException if the node doesn't have enough children
+ */
+ protected function finalizeValue($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 ($child->isRequired()) {
+ $ex = new InvalidConfigurationException(sprintf('The child node "%s" at path "%s" must be configured.', $name, $this->getPath()));
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+
+ if ($child->hasDefaultValue()) {
+ $value[$name] = $child->getDefaultValue();
+ }
+
+ continue;
+ }
+
+ if ($child->isDeprecated()) {
+ @trigger_error($child->getDeprecationMessage($name, $this->getPath()), \E_USER_DEPRECATED);
+ }
+
+ try {
+ $value[$name] = $child->finalize($value[$name]);
+ } catch (UnsetKeyException $e) {
+ unset($value[$name]);
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * Validates the type of the value.
+ *
+ * @param mixed $value
+ *
+ * @throws InvalidTypeException
+ */
+ protected function validateType($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);
+ }
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+ }
+
+ /**
+ * Normalizes the value.
+ *
+ * @param mixed $value The value to normalize
+ *
+ * @return mixed The normalized value
+ *
+ * @throws InvalidConfigurationException
+ */
+ protected function normalizeValue($value)
+ {
+ if (false === $value) {
+ return $value;
+ }
+
+ $value = $this->remapXml($value);
+
+ $normalized = [];
+ foreach ($value as $name => $val) {
+ if (isset($this->children[$name])) {
+ try {
+ $normalized[$name] = $this->children[$name]->normalize($val);
+ } catch (UnsetKeyException $e) {
+ }
+ unset($value[$name]);
+ } elseif (!$this->removeExtraKeys) {
+ $normalized[$name] = $val;
+ }
+ }
+
+ // if extra fields are present, throw exception
+ 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;
+ }
+
+ return $normalized;
+ }
+
+ /**
+ * Remaps multiple singular values to a single plural value.
+ *
+ * @param array $value The source values
+ *
+ * @return array The remapped values
+ */
+ protected function remapXml($value)
+ {
+ foreach ($this->xmlRemappings as list($singular, $plural)) {
+ if (!isset($value[$singular])) {
+ continue;
+ }
+
+ $value[$plural] = Processor::normalizeConfig($value, $singular, $plural);
+ unset($value[$singular]);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Merges values together.
+ *
+ * @param mixed $leftSide The left side to merge
+ * @param mixed $rightSide The right side to merge
+ *
+ * @return mixed The merged values
+ *
+ * @throws InvalidConfigurationException
+ * @throws \RuntimeException
+ */
+ protected function mergeValues($leftSide, $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;
+ }
+
+ if (false === $leftSide || !$this->performDeepMerging) {
+ return $rightSide;
+ }
+
+ foreach ($rightSide as $k => $v) {
+ // no conflict
+ if (!\array_key_exists($k, $leftSide)) {
+ if (!$this->allowNewKeys) {
+ $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;
+ }
+
+ $leftSide[$k] = $v;
+ continue;
+ }
+
+ if (!isset($this->children[$k])) {
+ throw new \RuntimeException('merge() expects a normalized config array.');
+ }
+
+ $leftSide[$k] = $this->children[$k]->merge($leftSide[$k], $v);
+ }
+
+ return $leftSide;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/BaseNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/BaseNode.php
new file mode 100644
index 00000000..10bcb49c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/BaseNode.php
@@ -0,0 +1,381 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\Exception;
+use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException;
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+
+/**
+ * The base node class.
+ *
+ * @author Johannes M. Schmitt
+ */
+abstract class BaseNode implements NodeInterface
+{
+ protected $name;
+ protected $parent;
+ protected $normalizationClosures = [];
+ protected $finalValidationClosures = [];
+ protected $allowOverwrite = true;
+ protected $required = false;
+ protected $deprecationMessage = null;
+ protected $equivalentValues = [];
+ protected $attributes = [];
+
+ /**
+ * @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
+ */
+ public function __construct($name, NodeInterface $parent = null)
+ {
+ if (false !== strpos($name = (string) $name, '.')) {
+ throw new \InvalidArgumentException('The name must not contain ".".');
+ }
+
+ $this->name = $name;
+ $this->parent = $parent;
+ }
+
+ /**
+ * @param string $key
+ */
+ public function setAttribute($key, $value)
+ {
+ $this->attributes[$key] = $value;
+ }
+
+ /**
+ * @param string $key
+ *
+ * @return mixed
+ */
+ public function getAttribute($key, $default = null)
+ {
+ return isset($this->attributes[$key]) ? $this->attributes[$key] : $default;
+ }
+
+ /**
+ * @param string $key
+ *
+ * @return bool
+ */
+ public function hasAttribute($key)
+ {
+ return isset($this->attributes[$key]);
+ }
+
+ /**
+ * @return array
+ */
+ public function getAttributes()
+ {
+ return $this->attributes;
+ }
+
+ public function setAttributes(array $attributes)
+ {
+ $this->attributes = $attributes;
+ }
+
+ /**
+ * @param string $key
+ */
+ public function removeAttribute($key)
+ {
+ unset($this->attributes[$key]);
+ }
+
+ /**
+ * Sets an info message.
+ *
+ * @param string $info
+ */
+ public function setInfo($info)
+ {
+ $this->setAttribute('info', $info);
+ }
+
+ /**
+ * Returns info message.
+ *
+ * @return string|null The info text
+ */
+ public function getInfo()
+ {
+ return $this->getAttribute('info');
+ }
+
+ /**
+ * Sets the example configuration for this node.
+ *
+ * @param string|array $example
+ */
+ public function setExample($example)
+ {
+ $this->setAttribute('example', $example);
+ }
+
+ /**
+ * Retrieves the example configuration for this node.
+ *
+ * @return string|array|null The example
+ */
+ public function getExample()
+ {
+ return $this->getAttribute('example');
+ }
+
+ /**
+ * Adds an equivalent value.
+ *
+ * @param mixed $originalValue
+ * @param mixed $equivalentValue
+ */
+ public function addEquivalentValue($originalValue, $equivalentValue)
+ {
+ $this->equivalentValues[] = [$originalValue, $equivalentValue];
+ }
+
+ /**
+ * Set this node as required.
+ *
+ * @param bool $boolean Required node
+ */
+ public function setRequired($boolean)
+ {
+ $this->required = (bool) $boolean;
+ }
+
+ /**
+ * Sets this node as deprecated.
+ *
+ * You can use %node% and %path% placeholders in your message to display,
+ * respectively, the node name and its complete path.
+ *
+ * @param string|null $message Deprecated message
+ */
+ public function setDeprecated($message)
+ {
+ $this->deprecationMessage = $message;
+ }
+
+ /**
+ * Sets if this node can be overridden.
+ *
+ * @param bool $allow
+ */
+ public function setAllowOverwrite($allow)
+ {
+ $this->allowOverwrite = (bool) $allow;
+ }
+
+ /**
+ * Sets the closures used for normalization.
+ *
+ * @param \Closure[] $closures An array of Closures used for normalization
+ */
+ public function setNormalizationClosures(array $closures)
+ {
+ $this->normalizationClosures = $closures;
+ }
+
+ /**
+ * Sets the closures used for final validation.
+ *
+ * @param \Closure[] $closures An array of Closures used for final validation
+ */
+ public function setFinalValidationClosures(array $closures)
+ {
+ $this->finalValidationClosures = $closures;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isRequired()
+ {
+ return $this->required;
+ }
+
+ /**
+ * Checks if this node is deprecated.
+ *
+ * @return bool
+ */
+ public function isDeprecated()
+ {
+ return null !== $this->deprecationMessage;
+ }
+
+ /**
+ * Returns the deprecated message.
+ *
+ * @param string $node the configuration node name
+ * @param string $path the path of the node
+ *
+ * @return string
+ */
+ public function getDeprecationMessage($node, $path)
+ {
+ return strtr($this->deprecationMessage, ['%node%' => $node, '%path%' => $path]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPath()
+ {
+ $path = $this->name;
+
+ if (null !== $this->parent) {
+ $path = $this->parent->getPath().'.'.$path;
+ }
+
+ return $path;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ final public function merge($leftSide, $rightSide)
+ {
+ if (!$this->allowOverwrite) {
+ 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);
+
+ return $this->mergeValues($leftSide, $rightSide);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ final public function normalize($value)
+ {
+ $value = $this->preNormalize($value);
+
+ // run custom normalization closures
+ foreach ($this->normalizationClosures as $closure) {
+ $value = $closure($value);
+ }
+
+ // replace value with their equivalent
+ foreach ($this->equivalentValues as $data) {
+ if ($data[0] === $value) {
+ $value = $data[1];
+ }
+ }
+
+ // validate type
+ $this->validateType($value);
+
+ // normalize value
+ return $this->normalizeValue($value);
+ }
+
+ /**
+ * Normalizes the value before any other normalization is applied.
+ *
+ * @param mixed $value
+ *
+ * @return mixed The normalized array value
+ */
+ protected function preNormalize($value)
+ {
+ return $value;
+ }
+
+ /**
+ * Returns parent node for this node.
+ *
+ * @return NodeInterface|null
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ final public function finalize($value)
+ {
+ $this->validateType($value);
+
+ $value = $this->finalizeValue($value);
+
+ // Perform validation on the final value if a closure has been set.
+ // The closure is also allowed to return another value.
+ foreach ($this->finalValidationClosures as $closure) {
+ try {
+ $value = $closure($value);
+ } catch (Exception $e) {
+ throw $e;
+ } catch (\Exception $e) {
+ throw new InvalidConfigurationException(sprintf('Invalid configuration for path "%s": ', $this->getPath()).$e->getMessage(), $e->getCode(), $e);
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * Validates the type of a Node.
+ *
+ * @param mixed $value The value to validate
+ *
+ * @throws InvalidTypeException when the value is invalid
+ */
+ abstract protected function validateType($value);
+
+ /**
+ * Normalizes the value.
+ *
+ * @param mixed $value The value to normalize
+ *
+ * @return mixed The normalized value
+ */
+ abstract protected function normalizeValue($value);
+
+ /**
+ * Merges two values together.
+ *
+ * @param mixed $leftSide
+ * @param mixed $rightSide
+ *
+ * @return mixed The merged value
+ */
+ abstract protected function mergeValues($leftSide, $rightSide);
+
+ /**
+ * Finalizes a value.
+ *
+ * @param mixed $value The value to finalize
+ *
+ * @return mixed The finalized value
+ */
+ abstract protected function finalizeValue($value);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/BooleanNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/BooleanNode.php
new file mode 100644
index 00000000..85f467b6
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/BooleanNode.php
@@ -0,0 +1,47 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+
+/**
+ * This node represents a Boolean value in the config tree.
+ *
+ * @author Johannes M. Schmitt
+ */
+class BooleanNode extends ScalarNode
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function validateType($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);
+ }
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function isValueEmpty($value)
+ {
+ // a boolean value cannot be empty
+ return false;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
new file mode 100644
index 00000000..da4ebf62
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ArrayNodeDefinition.php
@@ -0,0 +1,522 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\ArrayNode;
+use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
+use Symfony\Component\Config\Definition\PrototypedArrayNode;
+
+/**
+ * This class provides a fluent interface for defining an array node.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ArrayNodeDefinition extends NodeDefinition implements ParentNodeDefinitionInterface
+{
+ protected $performDeepMerging = true;
+ protected $ignoreExtraKeys = false;
+ protected $removeExtraKeys = true;
+ protected $children = [];
+ protected $prototype;
+ protected $atLeastOne = false;
+ protected $allowNewKeys = true;
+ protected $key;
+ protected $removeKeyItem;
+ protected $addDefaults = false;
+ protected $addDefaultChildren = false;
+ protected $nodeBuilder;
+ protected $normalizeKeys = true;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __construct($name, NodeParentInterface $parent = null)
+ {
+ parent::__construct($name, $parent);
+
+ $this->nullEquivalent = [];
+ $this->trueEquivalent = [];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setBuilder(NodeBuilder $builder)
+ {
+ $this->nodeBuilder = $builder;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function children()
+ {
+ return $this->getNodeBuilder();
+ }
+
+ /**
+ * Sets a prototype for child nodes.
+ *
+ * @param string $type The type of node
+ *
+ * @return NodeDefinition
+ */
+ public function prototype($type)
+ {
+ return $this->prototype = $this->getNodeBuilder()->node(null, $type)->setParent($this);
+ }
+
+ /**
+ * @return VariableNodeDefinition
+ */
+ public function variablePrototype()
+ {
+ return $this->prototype('variable');
+ }
+
+ /**
+ * @return ScalarNodeDefinition
+ */
+ public function scalarPrototype()
+ {
+ return $this->prototype('scalar');
+ }
+
+ /**
+ * @return BooleanNodeDefinition
+ */
+ public function booleanPrototype()
+ {
+ return $this->prototype('boolean');
+ }
+
+ /**
+ * @return IntegerNodeDefinition
+ */
+ public function integerPrototype()
+ {
+ return $this->prototype('integer');
+ }
+
+ /**
+ * @return FloatNodeDefinition
+ */
+ public function floatPrototype()
+ {
+ return $this->prototype('float');
+ }
+
+ /**
+ * @return ArrayNodeDefinition
+ */
+ public function arrayPrototype()
+ {
+ return $this->prototype('array');
+ }
+
+ /**
+ * @return EnumNodeDefinition
+ */
+ public function enumPrototype()
+ {
+ return $this->prototype('enum');
+ }
+
+ /**
+ * Adds the default value if the node is not set in the configuration.
+ *
+ * This method is applicable to concrete nodes only (not to prototype nodes).
+ * If this function has been called and the node is not set during the finalization
+ * phase, it's default value will be derived from its children default values.
+ *
+ * @return $this
+ */
+ public function addDefaultsIfNotSet()
+ {
+ $this->addDefaults = true;
+
+ return $this;
+ }
+
+ /**
+ * Adds children with a default value when none are defined.
+ *
+ * This method is applicable to prototype nodes only.
+ *
+ * @param int|string|array|null $children The number of children|The child name|The children names to be added
+ *
+ * @return $this
+ */
+ public function addDefaultChildrenIfNoneSet($children = null)
+ {
+ $this->addDefaultChildren = $children;
+
+ return $this;
+ }
+
+ /**
+ * Requires the node to have at least one element.
+ *
+ * This method is applicable to prototype nodes only.
+ *
+ * @return $this
+ */
+ public function requiresAtLeastOneElement()
+ {
+ $this->atLeastOne = true;
+
+ return $this;
+ }
+
+ /**
+ * Disallows adding news keys in a subsequent configuration.
+ *
+ * If used all keys have to be defined in the same configuration file.
+ *
+ * @return $this
+ */
+ public function disallowNewKeysInSubsequentConfigs()
+ {
+ $this->allowNewKeys = false;
+
+ return $this;
+ }
+
+ /**
+ * Sets a normalization rule for XML configurations.
+ *
+ * @param string $singular The key to remap
+ * @param string $plural The plural of the key for irregular plurals
+ *
+ * @return $this
+ */
+ public function fixXmlConfig($singular, $plural = null)
+ {
+ $this->normalization()->remap($singular, $plural);
+
+ return $this;
+ }
+
+ /**
+ * Sets the attribute which value is to be used as key.
+ *
+ * This is useful when you have an indexed array that should be an
+ * associative array. You can select an item from within the array
+ * to be the key of the particular item. For example, if "id" is the
+ * "key", then:
+ *
+ * [
+ * ['id' => 'my_name', 'foo' => 'bar'],
+ * ];
+ *
+ * becomes
+ *
+ * [
+ * 'my_name' => ['foo' => 'bar'],
+ * ];
+ *
+ * If you'd like "'id' => 'my_name'" to still be present in the resulting
+ * array, then you can set the second argument of this method to false.
+ *
+ * This method is applicable to prototype nodes only.
+ *
+ * @param string $name The name of the key
+ * @param bool $removeKeyItem Whether or not the key item should be removed
+ *
+ * @return $this
+ */
+ public function useAttributeAsKey($name, $removeKeyItem = true)
+ {
+ $this->key = $name;
+ $this->removeKeyItem = $removeKeyItem;
+
+ return $this;
+ }
+
+ /**
+ * Sets whether the node can be unset.
+ *
+ * @param bool $allow
+ *
+ * @return $this
+ */
+ public function canBeUnset($allow = true)
+ {
+ $this->merge()->allowUnset($allow);
+
+ return $this;
+ }
+
+ /**
+ * Adds an "enabled" boolean to enable the current section.
+ *
+ * By default, the section is disabled. If any configuration is specified then
+ * the node will be automatically enabled:
+ *
+ * enableableArrayNode: {enabled: true, ...} # The config is enabled & default values get overridden
+ * enableableArrayNode: ~ # The config is enabled & use the default values
+ * enableableArrayNode: true # The config is enabled & use the default values
+ * enableableArrayNode: {other: value, ...} # The config is enabled & default values get overridden
+ * enableableArrayNode: {enabled: false, ...} # The config is disabled
+ * enableableArrayNode: false # The config is disabled
+ *
+ * @return $this
+ */
+ 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;
+
+ return $v;
+ })
+ ->end()
+ ->children()
+ ->booleanNode('enabled')
+ ->defaultFalse()
+ ;
+
+ return $this;
+ }
+
+ /**
+ * Adds an "enabled" boolean to enable the current section.
+ *
+ * By default, the section is enabled.
+ *
+ * @return $this
+ */
+ public function canBeDisabled()
+ {
+ $this
+ ->addDefaultsIfNotSet()
+ ->treatFalseLike(['enabled' => false])
+ ->treatTrueLike(['enabled' => true])
+ ->treatNullLike(['enabled' => true])
+ ->children()
+ ->booleanNode('enabled')
+ ->defaultTrue()
+ ;
+
+ return $this;
+ }
+
+ /**
+ * Disables the deep merging of the node.
+ *
+ * @return $this
+ */
+ public function performNoDeepMerging()
+ {
+ $this->performDeepMerging = false;
+
+ return $this;
+ }
+
+ /**
+ * Allows extra config keys to be specified under an array without
+ * throwing an exception.
+ *
+ * Those config values are ignored and removed from the resulting
+ * array. This should be used only in special cases where you want
+ * to send an entire configuration array through a special tree that
+ * processes only part of the array.
+ *
+ * @param bool $remove Whether to remove the extra keys
+ *
+ * @return $this
+ */
+ public function ignoreExtraKeys($remove = true)
+ {
+ $this->ignoreExtraKeys = true;
+ $this->removeExtraKeys = $remove;
+
+ return $this;
+ }
+
+ /**
+ * Sets key normalization.
+ *
+ * @param bool $bool Whether to enable key normalization
+ *
+ * @return $this
+ */
+ public function normalizeKeys($bool)
+ {
+ $this->normalizeKeys = (bool) $bool;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function append(NodeDefinition $node)
+ {
+ $this->children[$node->name] = $node->setParent($this);
+
+ return $this;
+ }
+
+ /**
+ * Returns a node builder to be used to add children and prototype.
+ *
+ * @return NodeBuilder The node builder
+ */
+ protected function getNodeBuilder()
+ {
+ if (null === $this->nodeBuilder) {
+ $this->nodeBuilder = new NodeBuilder();
+ }
+
+ return $this->nodeBuilder->setParent($this);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createNode()
+ {
+ if (null === $this->prototype) {
+ $node = new ArrayNode($this->name, $this->parent);
+
+ $this->validateConcreteNode($node);
+
+ $node->setAddIfNotSet($this->addDefaults);
+
+ foreach ($this->children as $child) {
+ $child->parent = $node;
+ $node->addChild($child->getNode());
+ }
+ } else {
+ $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 (true === $this->atLeastOne) {
+ $node->setMinNumberOfElements(1);
+ }
+
+ if ($this->default) {
+ $node->setDefaultValue($this->defaultValue);
+ }
+
+ if (false !== $this->addDefaultChildren) {
+ $node->setAddChildrenIfNoneSet($this->addDefaultChildren);
+ if ($this->prototype instanceof static && null === $this->prototype->prototype) {
+ $this->prototype->addDefaultsIfNotSet();
+ }
+ }
+
+ $this->prototype->parent = $node;
+ $node->setPrototype($this->prototype->getNode());
+ }
+
+ $node->setAllowNewKeys($this->allowNewKeys);
+ $node->addEquivalentValue(null, $this->nullEquivalent);
+ $node->addEquivalentValue(true, $this->trueEquivalent);
+ $node->addEquivalentValue(false, $this->falseEquivalent);
+ $node->setPerformDeepMerging($this->performDeepMerging);
+ $node->setRequired($this->required);
+ $node->setDeprecated($this->deprecationMessage);
+ $node->setIgnoreExtraKeys($this->ignoreExtraKeys, $this->removeExtraKeys);
+ $node->setNormalizeKeys($this->normalizeKeys);
+
+ if (null !== $this->normalization) {
+ $node->setNormalizationClosures($this->normalization->before);
+ $node->setXmlRemappings($this->normalization->remappings);
+ }
+
+ if (null !== $this->merge) {
+ $node->setAllowOverwrite($this->merge->allowOverwrite);
+ $node->setAllowFalse($this->merge->allowFalse);
+ }
+
+ if (null !== $this->validation) {
+ $node->setFinalValidationClosures($this->validation->rules);
+ }
+
+ return $node;
+ }
+
+ /**
+ * Validate the configuration of a concrete node.
+ *
+ * @throws InvalidDefinitionException
+ */
+ protected function validateConcreteNode(ArrayNode $node)
+ {
+ $path = $node->getPath();
+
+ if (null !== $this->key) {
+ 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 (true === $this->atLeastOne) {
+ throw new InvalidDefinitionException(sprintf('->requiresAtLeastOneElement() is not applicable to concrete nodes at path "%s".', $path));
+ }
+
+ if ($this->default) {
+ throw new InvalidDefinitionException(sprintf('->defaultValue() 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));
+ }
+ }
+
+ /**
+ * Validate the configuration of a prototype node.
+ *
+ * @throws InvalidDefinitionException
+ */
+ protected function validatePrototypeNode(PrototypedArrayNode $node)
+ {
+ $path = $node->getPath();
+
+ if ($this->addDefaults) {
+ throw new InvalidDefinitionException(sprintf('->addDefaultsIfNotSet() is not applicable to prototype nodes at path "%s".', $path));
+ }
+
+ if (false !== $this->addDefaultChildren) {
+ if ($this->default) {
+ 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 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 InvalidDefinitionException(sprintf('->addDefaultChildrenIfNoneSet() might not set default children names as ->useAttributeAsKey() is not used at path "%s".', $path));
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
new file mode 100644
index 00000000..28e56579
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/BooleanNodeDefinition.php
@@ -0,0 +1,53 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\BooleanNode;
+use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
+
+/**
+ * This class provides a fluent interface for defining a node.
+ *
+ * @author Johannes M. Schmitt
+ */
+class BooleanNodeDefinition extends ScalarNodeDefinition
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function __construct($name, NodeParentInterface $parent = null)
+ {
+ parent::__construct($name, $parent);
+
+ $this->nullEquivalent = true;
+ }
+
+ /**
+ * Instantiate a Node.
+ *
+ * @return BooleanNode The node
+ */
+ protected function instantiateNode()
+ {
+ return new BooleanNode($this->name, $this->parent);
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws InvalidDefinitionException
+ */
+ public function cannotBeEmpty()
+ {
+ throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
new file mode 100644
index 00000000..817906f5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/EnumNodeDefinition.php
@@ -0,0 +1,56 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\EnumNode;
+
+/**
+ * Enum Node Definition.
+ *
+ * @author Johannes M. Schmitt
+ */
+class EnumNodeDefinition extends ScalarNodeDefinition
+{
+ private $values;
+
+ /**
+ * @return $this
+ */
+ public function values(array $values)
+ {
+ $values = array_unique($values);
+
+ if (empty($values)) {
+ throw new \InvalidArgumentException('->values() must be called with at least one value.');
+ }
+
+ $this->values = $values;
+
+ return $this;
+ }
+
+ /**
+ * Instantiate a Node.
+ *
+ * @return EnumNode The node
+ *
+ * @throws \RuntimeException
+ */
+ protected function instantiateNode()
+ {
+ if (null === $this->values) {
+ throw new \RuntimeException('You must call ->values() on enum nodes.');
+ }
+
+ return new EnumNode($this->name, $this->parent, $this->values);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ExprBuilder.php
new file mode 100644
index 00000000..5db229dc
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ExprBuilder.php
@@ -0,0 +1,248 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
+
+/**
+ * This class builds an if expression.
+ *
+ * @author Johannes M. Schmitt
+ * @author Christophe Coevoet
+ */
+class ExprBuilder
+{
+ protected $node;
+ public $ifPart;
+ public $thenPart;
+
+ public function __construct(NodeDefinition $node)
+ {
+ $this->node = $node;
+ }
+
+ /**
+ * Marks the expression as being always used.
+ *
+ * @return $this
+ */
+ public function always(\Closure $then = null)
+ {
+ $this->ifPart = function ($v) { return true; };
+
+ if (null !== $then) {
+ $this->thenPart = $then;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Sets a closure to use as tests.
+ *
+ * The default one tests if the value is true.
+ *
+ * @return $this
+ */
+ public function ifTrue(\Closure $closure = null)
+ {
+ if (null === $closure) {
+ $closure = function ($v) { return true === $v; };
+ }
+
+ $this->ifPart = $closure;
+
+ return $this;
+ }
+
+ /**
+ * Tests if the value is a string.
+ *
+ * @return $this
+ */
+ public function ifString()
+ {
+ $this->ifPart = function ($v) { return \is_string($v); };
+
+ return $this;
+ }
+
+ /**
+ * Tests if the value is null.
+ *
+ * @return $this
+ */
+ public function ifNull()
+ {
+ $this->ifPart = function ($v) { return null === $v; };
+
+ return $this;
+ }
+
+ /**
+ * Tests if the value is empty.
+ *
+ * @return ExprBuilder
+ */
+ public function ifEmpty()
+ {
+ $this->ifPart = function ($v) { return empty($v); };
+
+ return $this;
+ }
+
+ /**
+ * Tests if the value is an array.
+ *
+ * @return $this
+ */
+ public function ifArray()
+ {
+ $this->ifPart = function ($v) { return \is_array($v); };
+
+ return $this;
+ }
+
+ /**
+ * Tests if the value is in an array.
+ *
+ * @return $this
+ */
+ public function ifInArray(array $array)
+ {
+ $this->ifPart = function ($v) use ($array) { return \in_array($v, $array, true); };
+
+ return $this;
+ }
+
+ /**
+ * Tests if the value is not in an array.
+ *
+ * @return $this
+ */
+ public function ifNotInArray(array $array)
+ {
+ $this->ifPart = function ($v) use ($array) { return !\in_array($v, $array, true); };
+
+ return $this;
+ }
+
+ /**
+ * Transforms variables of any type into an array.
+ *
+ * @return $this
+ */
+ public function castToArray()
+ {
+ $this->ifPart = function ($v) { return !\is_array($v); };
+ $this->thenPart = function ($v) { return [$v]; };
+
+ return $this;
+ }
+
+ /**
+ * Sets the closure to run if the test pass.
+ *
+ * @return $this
+ */
+ public function then(\Closure $closure)
+ {
+ $this->thenPart = $closure;
+
+ return $this;
+ }
+
+ /**
+ * Sets a closure returning an empty array.
+ *
+ * @return $this
+ */
+ public function thenEmptyArray()
+ {
+ $this->thenPart = function ($v) { return []; };
+
+ return $this;
+ }
+
+ /**
+ * Sets a closure marking the value as invalid at processing time.
+ *
+ * if you want to add the value of the node in your message just use a %s placeholder.
+ *
+ * @param string $message
+ *
+ * @return $this
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function thenInvalid($message)
+ {
+ $this->thenPart = function ($v) use ($message) { throw new \InvalidArgumentException(sprintf($message, json_encode($v))); };
+
+ return $this;
+ }
+
+ /**
+ * Sets a closure unsetting this key of the array at processing time.
+ *
+ * @return $this
+ *
+ * @throws UnsetKeyException
+ */
+ public function thenUnset()
+ {
+ $this->thenPart = function ($v) { throw new UnsetKeyException('Unsetting key.'); };
+
+ return $this;
+ }
+
+ /**
+ * Returns the related node.
+ *
+ * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
+ *
+ * @throws \RuntimeException
+ */
+ public function end()
+ {
+ if (null === $this->ifPart) {
+ throw new \RuntimeException('You must specify an if part.');
+ }
+ if (null === $this->thenPart) {
+ throw new \RuntimeException('You must specify a then part.');
+ }
+
+ return $this->node;
+ }
+
+ /**
+ * Builds the expressions.
+ *
+ * @param ExprBuilder[] $expressions An array of ExprBuilder instances to build
+ *
+ * @return array
+ */
+ public static function buildExpressions(array $expressions)
+ {
+ foreach ($expressions as $k => $expr) {
+ if ($expr instanceof self) {
+ $if = $expr->ifPart;
+ $then = $expr->thenPart;
+ $expressions[$k] = function ($v) use ($if, $then) {
+ return $if($v) ? $then($v) : $v;
+ };
+ }
+ }
+
+ return $expressions;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
new file mode 100644
index 00000000..c0bed462
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/FloatNodeDefinition.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\FloatNode;
+
+/**
+ * This class provides a fluent interface for defining a float node.
+ *
+ * @author Jeanmonod David
+ */
+class FloatNodeDefinition extends NumericNodeDefinition
+{
+ /**
+ * Instantiates a Node.
+ *
+ * @return FloatNode The node
+ */
+ protected function instantiateNode()
+ {
+ return new FloatNode($this->name, $this->parent, $this->min, $this->max);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
new file mode 100644
index 00000000..f6c3c147
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/IntegerNodeDefinition.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\IntegerNode;
+
+/**
+ * This class provides a fluent interface for defining an integer node.
+ *
+ * @author Jeanmonod David
+ */
+class IntegerNodeDefinition extends NumericNodeDefinition
+{
+ /**
+ * Instantiates a Node.
+ *
+ * @return IntegerNode The node
+ */
+ protected function instantiateNode()
+ {
+ return new IntegerNode($this->name, $this->parent, $this->min, $this->max);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/MergeBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/MergeBuilder.php
new file mode 100644
index 00000000..105e2d64
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/MergeBuilder.php
@@ -0,0 +1,67 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+/**
+ * This class builds merge conditions.
+ *
+ * @author Johannes M. Schmitt
+ */
+class MergeBuilder
+{
+ protected $node;
+ public $allowFalse = false;
+ public $allowOverwrite = true;
+
+ public function __construct(NodeDefinition $node)
+ {
+ $this->node = $node;
+ }
+
+ /**
+ * Sets whether the node can be unset.
+ *
+ * @param bool $allow
+ *
+ * @return $this
+ */
+ public function allowUnset($allow = true)
+ {
+ $this->allowFalse = $allow;
+
+ return $this;
+ }
+
+ /**
+ * Sets whether the node can be overwritten.
+ *
+ * @param bool $deny Whether the overwriting is forbidden or not
+ *
+ * @return $this
+ */
+ public function denyOverwrite($deny = true)
+ {
+ $this->allowOverwrite = !$deny;
+
+ return $this;
+ }
+
+ /**
+ * Returns the related node.
+ *
+ * @return NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition
+ */
+ public function end()
+ {
+ return $this->node;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeBuilder.php
new file mode 100644
index 00000000..2809cb6c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeBuilder.php
@@ -0,0 +1,238 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+/**
+ * This class provides a fluent interface for building a node.
+ *
+ * @author Johannes M. Schmitt
+ */
+class NodeBuilder implements NodeParentInterface
+{
+ protected $parent;
+ protected $nodeMapping;
+
+ public function __construct()
+ {
+ $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(ParentNodeDefinitionInterface $parent = null)
+ {
+ $this->parent = $parent;
+
+ return $this;
+ }
+
+ /**
+ * Creates a child array node.
+ *
+ * @param string $name The name of the node
+ *
+ * @return ArrayNodeDefinition The child node
+ */
+ public function arrayNode($name)
+ {
+ return $this->node($name, 'array');
+ }
+
+ /**
+ * Creates a child scalar node.
+ *
+ * @param string $name The name of the node
+ *
+ * @return ScalarNodeDefinition The child node
+ */
+ public function scalarNode($name)
+ {
+ return $this->node($name, 'scalar');
+ }
+
+ /**
+ * Creates a child Boolean node.
+ *
+ * @param string $name The name of the node
+ *
+ * @return BooleanNodeDefinition The child node
+ */
+ public function booleanNode($name)
+ {
+ return $this->node($name, 'boolean');
+ }
+
+ /**
+ * Creates a child integer node.
+ *
+ * @param string $name The name of the node
+ *
+ * @return IntegerNodeDefinition The child node
+ */
+ public function integerNode($name)
+ {
+ return $this->node($name, 'integer');
+ }
+
+ /**
+ * Creates a child float node.
+ *
+ * @param string $name The name of the node
+ *
+ * @return FloatNodeDefinition The child node
+ */
+ public function floatNode($name)
+ {
+ return $this->node($name, 'float');
+ }
+
+ /**
+ * Creates a child EnumNode.
+ *
+ * @param string $name
+ *
+ * @return EnumNodeDefinition
+ */
+ public function enumNode($name)
+ {
+ return $this->node($name, 'enum');
+ }
+
+ /**
+ * Creates a child variable node.
+ *
+ * @param string $name The name of the node
+ *
+ * @return VariableNodeDefinition The builder of the child node
+ */
+ public function variableNode($name)
+ {
+ return $this->node($name, 'variable');
+ }
+
+ /**
+ * Returns the parent node.
+ *
+ * @return NodeDefinition&ParentNodeDefinitionInterface The parent node
+ */
+ public function end()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Creates a child node.
+ *
+ * @param string|null $name The name of the node
+ * @param string $type The type of the node
+ *
+ * @return NodeDefinition The child node
+ *
+ * @throws \RuntimeException When the node type is not registered
+ * @throws \RuntimeException When the node class is not found
+ */
+ public function node($name, $type)
+ {
+ $class = $this->getNodeClass($type);
+
+ $node = new $class($name);
+
+ $this->append($node);
+
+ return $node;
+ }
+
+ /**
+ * Appends a node definition.
+ *
+ * Usage:
+ *
+ * $node = new ArrayNodeDefinition('name')
+ * ->children()
+ * ->scalarNode('foo')->end()
+ * ->scalarNode('baz')->end()
+ * ->append($this->getBarNodeDefinition())
+ * ->end()
+ * ;
+ *
+ * @return $this
+ */
+ public function append(NodeDefinition $node)
+ {
+ if ($node instanceof ParentNodeDefinitionInterface) {
+ $builder = clone $this;
+ $builder->setParent(null);
+ $node->setBuilder($builder);
+ }
+
+ if (null !== $this->parent) {
+ $this->parent->append($node);
+ // Make this builder the node parent to allow for a fluid interface
+ $node->setParent($this);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds or overrides a node Type.
+ *
+ * @param string $type The name of the type
+ * @param string $class The fully qualified name the node definition class
+ *
+ * @return $this
+ */
+ public function setNodeClass($type, $class)
+ {
+ $this->nodeMapping[strtolower($type)] = $class;
+
+ return $this;
+ }
+
+ /**
+ * Returns the class name of the node definition.
+ *
+ * @param string $type The node type
+ *
+ * @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
+ */
+ protected function getNodeClass($type)
+ {
+ $type = strtolower($type);
+
+ if (!isset($this->nodeMapping[$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));
+ }
+
+ return $class;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeDefinition.php
new file mode 100644
index 00000000..cc245d74
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeDefinition.php
@@ -0,0 +1,353 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
+use Symfony\Component\Config\Definition\NodeInterface;
+
+/**
+ * This class provides a fluent interface for defining a node.
+ *
+ * @author Johannes M. Schmitt
+ */
+abstract class NodeDefinition implements NodeParentInterface
+{
+ protected $name;
+ protected $normalization;
+ protected $validation;
+ protected $defaultValue;
+ protected $default = false;
+ protected $required = false;
+ protected $deprecationMessage = null;
+ protected $merge;
+ protected $allowEmptyValue = true;
+ protected $nullEquivalent;
+ 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, NodeParentInterface $parent = null)
+ {
+ $this->parent = $parent;
+ $this->name = $name;
+ }
+
+ /**
+ * Sets the parent node.
+ *
+ * @return $this
+ */
+ public function setParent(NodeParentInterface $parent)
+ {
+ $this->parent = $parent;
+
+ return $this;
+ }
+
+ /**
+ * Sets info message.
+ *
+ * @param string $info The info text
+ *
+ * @return $this
+ */
+ public function info($info)
+ {
+ return $this->attribute('info', $info);
+ }
+
+ /**
+ * Sets example configuration.
+ *
+ * @param string|array $example
+ *
+ * @return $this
+ */
+ public function example($example)
+ {
+ return $this->attribute('example', $example);
+ }
+
+ /**
+ * Sets an attribute on the node.
+ *
+ * @param string $key
+ * @param mixed $value
+ *
+ * @return $this
+ */
+ public function attribute($key, $value)
+ {
+ $this->attributes[$key] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Returns the parent node.
+ *
+ * @return NodeParentInterface|NodeBuilder|NodeDefinition|ArrayNodeDefinition|VariableNodeDefinition|null The builder of the parent node
+ */
+ public function end()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Creates the node.
+ *
+ * @param bool $forceRootNode Whether to force this node as the root node
+ *
+ * @return NodeInterface
+ */
+ public function getNode($forceRootNode = false)
+ {
+ if ($forceRootNode) {
+ $this->parent = null;
+ }
+
+ if (null !== $this->normalization) {
+ $this->normalization->before = ExprBuilder::buildExpressions($this->normalization->before);
+ }
+
+ if (null !== $this->validation) {
+ $this->validation->rules = ExprBuilder::buildExpressions($this->validation->rules);
+ }
+
+ $node = $this->createNode();
+ $node->setAttributes($this->attributes);
+
+ return $node;
+ }
+
+ /**
+ * Sets the default value.
+ *
+ * @param mixed $value The default value
+ *
+ * @return $this
+ */
+ public function defaultValue($value)
+ {
+ $this->default = true;
+ $this->defaultValue = $value;
+
+ return $this;
+ }
+
+ /**
+ * Sets the node as required.
+ *
+ * @return $this
+ */
+ public function isRequired()
+ {
+ $this->required = true;
+
+ return $this;
+ }
+
+ /**
+ * Sets the node as deprecated.
+ *
+ * You can use %node% and %path% placeholders in your message to display,
+ * respectively, the node name and its complete path.
+ *
+ * @param string $message Deprecation message
+ *
+ * @return $this
+ */
+ public function setDeprecated($message = 'The child node "%node%" at path "%path%" is deprecated.')
+ {
+ $this->deprecationMessage = $message;
+
+ return $this;
+ }
+
+ /**
+ * Sets the equivalent value used when the node contains null.
+ *
+ * @param mixed $value
+ *
+ * @return $this
+ */
+ public function treatNullLike($value)
+ {
+ $this->nullEquivalent = $value;
+
+ return $this;
+ }
+
+ /**
+ * Sets the equivalent value used when the node contains true.
+ *
+ * @param mixed $value
+ *
+ * @return $this
+ */
+ public function treatTrueLike($value)
+ {
+ $this->trueEquivalent = $value;
+
+ return $this;
+ }
+
+ /**
+ * Sets the equivalent value used when the node contains false.
+ *
+ * @param mixed $value
+ *
+ * @return $this
+ */
+ public function treatFalseLike($value)
+ {
+ $this->falseEquivalent = $value;
+
+ return $this;
+ }
+
+ /**
+ * Sets null as the default value.
+ *
+ * @return $this
+ */
+ public function defaultNull()
+ {
+ return $this->defaultValue(null);
+ }
+
+ /**
+ * Sets true as the default value.
+ *
+ * @return $this
+ */
+ public function defaultTrue()
+ {
+ return $this->defaultValue(true);
+ }
+
+ /**
+ * Sets false as the default value.
+ *
+ * @return $this
+ */
+ public function defaultFalse()
+ {
+ return $this->defaultValue(false);
+ }
+
+ /**
+ * Sets an expression to run before the normalization.
+ *
+ * @return ExprBuilder
+ */
+ public function beforeNormalization()
+ {
+ return $this->normalization()->before();
+ }
+
+ /**
+ * Denies the node value being empty.
+ *
+ * @return $this
+ */
+ public function cannotBeEmpty()
+ {
+ $this->allowEmptyValue = false;
+
+ return $this;
+ }
+
+ /**
+ * Sets an expression to run for the validation.
+ *
+ * The expression receives the value of the node and must return it. It can
+ * modify it.
+ * An exception should be thrown when the node is not valid.
+ *
+ * @return ExprBuilder
+ */
+ public function validate()
+ {
+ return $this->validation()->rule();
+ }
+
+ /**
+ * Sets whether the node can be overwritten.
+ *
+ * @param bool $deny Whether the overwriting is forbidden or not
+ *
+ * @return $this
+ */
+ public function cannotBeOverwritten($deny = true)
+ {
+ $this->merge()->denyOverwrite($deny);
+
+ return $this;
+ }
+
+ /**
+ * Gets the builder for validation rules.
+ *
+ * @return ValidationBuilder
+ */
+ protected function validation()
+ {
+ if (null === $this->validation) {
+ $this->validation = new ValidationBuilder($this);
+ }
+
+ return $this->validation;
+ }
+
+ /**
+ * Gets the builder for merging rules.
+ *
+ * @return MergeBuilder
+ */
+ protected function merge()
+ {
+ if (null === $this->merge) {
+ $this->merge = new MergeBuilder($this);
+ }
+
+ return $this->merge;
+ }
+
+ /**
+ * Gets the builder for normalization rules.
+ *
+ * @return NormalizationBuilder
+ */
+ protected function normalization()
+ {
+ if (null === $this->normalization) {
+ $this->normalization = new NormalizationBuilder($this);
+ }
+
+ return $this->normalization;
+ }
+
+ /**
+ * Instantiate and configure the node according to this definition.
+ *
+ * @return NodeInterface The node instance
+ *
+ * @throws InvalidDefinitionException When the definition is invalid
+ */
+ abstract protected function createNode();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeParentInterface.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeParentInterface.php
new file mode 100644
index 00000000..305e9931
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NodeParentInterface.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+/**
+ * An interface that must be implemented by all node parents.
+ *
+ * @author Victor Berchet
+ */
+interface NodeParentInterface
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
new file mode 100644
index 00000000..d3cdca90
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NormalizationBuilder.php
@@ -0,0 +1,60 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+/**
+ * This class builds normalization conditions.
+ *
+ * @author Johannes M. Schmitt
+ */
+class NormalizationBuilder
+{
+ protected $node;
+ public $before = [];
+ public $remappings = [];
+
+ public function __construct(NodeDefinition $node)
+ {
+ $this->node = $node;
+ }
+
+ /**
+ * Registers a key to remap to its plural form.
+ *
+ * @param string $key The key to remap
+ * @param string $plural The plural of the key in case of irregular plural
+ *
+ * @return $this
+ */
+ public function remap($key, $plural = null)
+ {
+ $this->remappings[] = [$key, null === $plural ? $key.'s' : $plural];
+
+ return $this;
+ }
+
+ /**
+ * Registers a closure to run before the normalization or an expression builder to build it if null is provided.
+ *
+ * @return ExprBuilder|$this
+ */
+ public function before(\Closure $closure = null)
+ {
+ if (null !== $closure) {
+ $this->before[] = $closure;
+
+ return $this;
+ }
+
+ return $this->before[] = new ExprBuilder($this->node);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
new file mode 100644
index 00000000..390b1136
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/NumericNodeDefinition.php
@@ -0,0 +1,73 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
+
+/**
+ * Abstract class that contains common code of integer and float node definitions.
+ *
+ * @author David Jeanmonod
+ */
+abstract class NumericNodeDefinition extends ScalarNodeDefinition
+{
+ protected $min;
+ protected $max;
+
+ /**
+ * Ensures that the value is smaller than the given reference.
+ *
+ * @param mixed $max
+ *
+ * @return $this
+ *
+ * @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));
+ }
+ $this->max = $max;
+
+ return $this;
+ }
+
+ /**
+ * Ensures that the value is bigger than the given reference.
+ *
+ * @param mixed $min
+ *
+ * @return $this
+ *
+ * @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));
+ }
+ $this->min = $min;
+
+ return $this;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws InvalidDefinitionException
+ */
+ public function cannotBeEmpty()
+ {
+ throw new InvalidDefinitionException('->cannotBeEmpty() is not applicable to NumericNodeDefinition.');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
new file mode 100644
index 00000000..1bf2ad4b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ParentNodeDefinitionInterface.php
@@ -0,0 +1,49 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+/**
+ * An interface that must be implemented by nodes which can have children.
+ *
+ * @author Victor Berchet
+ */
+interface ParentNodeDefinitionInterface
+{
+ /**
+ * Returns a builder to add children nodes.
+ *
+ * @return NodeBuilder
+ */
+ public function children();
+
+ /**
+ * Appends a node definition.
+ *
+ * Usage:
+ *
+ * $node = $parentNode
+ * ->children()
+ * ->scalarNode('foo')->end()
+ * ->scalarNode('baz')->end()
+ * ->append($this->getBarNodeDefinition())
+ * ->end()
+ * ;
+ *
+ * @return $this
+ */
+ public function append(NodeDefinition $node);
+
+ /**
+ * Sets a custom children builder.
+ */
+ public function setBuilder(NodeBuilder $builder);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
new file mode 100644
index 00000000..6170555c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ScalarNodeDefinition.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\ScalarNode;
+
+/**
+ * This class provides a fluent interface for defining a node.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ScalarNodeDefinition extends VariableNodeDefinition
+{
+ /**
+ * Instantiate a Node.
+ *
+ * @return ScalarNode The node
+ */
+ protected function instantiateNode()
+ {
+ return new ScalarNode($this->name, $this->parent);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/TreeBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/TreeBuilder.php
new file mode 100644
index 00000000..384477c5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/TreeBuilder.php
@@ -0,0 +1,67 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\NodeInterface;
+
+/**
+ * This is the entry class for building a config tree.
+ *
+ * @author Johannes M. Schmitt
+ */
+class TreeBuilder implements NodeParentInterface
+{
+ protected $tree;
+ protected $root;
+
+ /**
+ * @deprecated since 3.4. To be removed in 4.0
+ */
+ protected $builder;
+
+ /**
+ * Creates the root node.
+ *
+ * @param string $name The name of the root node
+ * @param string $type The type of the root node
+ * @param NodeBuilder $builder A custom node builder instance
+ *
+ * @return ArrayNodeDefinition|NodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')
+ *
+ * @throws \RuntimeException When the node type is not supported
+ */
+ public function root($name, $type = 'array', NodeBuilder $builder = null)
+ {
+ $builder = $builder ?: new NodeBuilder();
+
+ return $this->root = $builder->node($name, $type)->setParent($this);
+ }
+
+ /**
+ * Builds the tree.
+ *
+ * @return NodeInterface
+ *
+ * @throws \RuntimeException
+ */
+ public function buildTree()
+ {
+ if (null === $this->root) {
+ throw new \RuntimeException('The configuration tree has no root node.');
+ }
+ if (null !== $this->tree) {
+ return $this->tree;
+ }
+
+ return $this->tree = $this->root->getNode(true);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ValidationBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
new file mode 100644
index 00000000..4efc726c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/ValidationBuilder.php
@@ -0,0 +1,44 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+/**
+ * This class builds validation conditions.
+ *
+ * @author Christophe Coevoet
+ */
+class ValidationBuilder
+{
+ protected $node;
+ public $rules = [];
+
+ public function __construct(NodeDefinition $node)
+ {
+ $this->node = $node;
+ }
+
+ /**
+ * Registers a closure to run as normalization or an expression builder to build it if null is provided.
+ *
+ * @return ExprBuilder|$this
+ */
+ public function rule(\Closure $closure = null)
+ {
+ if (null !== $closure) {
+ $this->rules[] = $closure;
+
+ return $this;
+ }
+
+ return $this->rules[] = new ExprBuilder($this->node);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
new file mode 100644
index 00000000..26565e17
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Builder/VariableNodeDefinition.php
@@ -0,0 +1,65 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Builder;
+
+use Symfony\Component\Config\Definition\VariableNode;
+
+/**
+ * This class provides a fluent interface for defining a node.
+ *
+ * @author Johannes M. Schmitt
+ */
+class VariableNodeDefinition extends NodeDefinition
+{
+ /**
+ * Instantiate a Node.
+ *
+ * @return VariableNode The node
+ */
+ protected function instantiateNode()
+ {
+ return new VariableNode($this->name, $this->parent);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function createNode()
+ {
+ $node = $this->instantiateNode();
+
+ if (null !== $this->normalization) {
+ $node->setNormalizationClosures($this->normalization->before);
+ }
+
+ if (null !== $this->merge) {
+ $node->setAllowOverwrite($this->merge->allowOverwrite);
+ }
+
+ 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->setRequired($this->required);
+ $node->setDeprecated($this->deprecationMessage);
+
+ if (null !== $this->validation) {
+ $node->setFinalValidationClosures($this->validation->rules);
+ }
+
+ return $node;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/ConfigurationInterface.php b/modules/empikmarketplace/vendor/symfony/config/Definition/ConfigurationInterface.php
new file mode 100644
index 00000000..d6456edb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/ConfigurationInterface.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+/**
+ * Configuration interface.
+ *
+ * @author Victor Berchet
+ */
+interface ConfigurationInterface
+{
+ /**
+ * Generates the configuration tree builder.
+ *
+ * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
+ */
+ public function getConfigTreeBuilder();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
new file mode 100644
index 00000000..7f863990
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Dumper/XmlReferenceDumper.php
@@ -0,0 +1,312 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Dumper;
+
+use Symfony\Component\Config\Definition\ArrayNode;
+use Symfony\Component\Config\Definition\ConfigurationInterface;
+use Symfony\Component\Config\Definition\EnumNode;
+use Symfony\Component\Config\Definition\NodeInterface;
+use Symfony\Component\Config\Definition\PrototypedArrayNode;
+
+/**
+ * Dumps a XML reference configuration for the given configuration/node instance.
+ *
+ * @author Wouter J
+ */
+class XmlReferenceDumper
+{
+ private $reference;
+
+ public function dump(ConfigurationInterface $configuration, $namespace = null)
+ {
+ return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree(), $namespace);
+ }
+
+ public function dumpNode(NodeInterface $node, $namespace = null)
+ {
+ $this->reference = '';
+ $this->writeNode($node, 0, true, $namespace);
+ $ref = $this->reference;
+ $this->reference = null;
+
+ return $ref;
+ }
+
+ /**
+ * @param int $depth
+ * @param bool $root If the node is the root node
+ * @param string $namespace The namespace of the node
+ */
+ 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) {
+ return $rootName === $mapping[1];
+ });
+
+ if (\count($remapping)) {
+ list($singular) = current($remapping);
+ $rootName = $singular;
+ }
+ }
+ $rootName = str_replace('_', '-', $rootName);
+
+ $rootAttributes = [];
+ $rootAttributeComments = [];
+ $rootChildren = [];
+ $rootComments = [];
+
+ if ($node instanceof ArrayNode) {
+ $children = $node->getChildren();
+
+ // comments about the root node
+ if ($rootInfo = $node->getInfo()) {
+ $rootComments[] = $rootInfo;
+ }
+
+ if ($rootNamespace) {
+ $rootComments[] = 'Namespace: '.$rootNamespace;
+ }
+
+ // render prototyped nodes
+ if ($node instanceof PrototypedArrayNode) {
+ $prototype = $node->getPrototype();
+
+ $info = 'prototype';
+ if (null !== $prototype->getInfo()) {
+ $info .= ': '.$prototype->getInfo();
+ }
+ array_unshift($rootComments, $info);
+
+ if ($key = $node->getKeyAttribute()) {
+ $rootAttributes[$key] = str_replace('-', ' ', $rootName).' '.$key;
+ }
+
+ if ($prototype instanceof PrototypedArrayNode) {
+ $prototype->setName($key);
+ $children = [$key => $prototype];
+ } elseif ($prototype instanceof ArrayNode) {
+ $children = $prototype->getChildren();
+ } else {
+ if ($prototype->hasDefaultValue()) {
+ $prototypeValue = $prototype->getDefaultValue();
+ } else {
+ switch (\get_class($prototype)) {
+ case 'Symfony\Component\Config\Definition\ScalarNode':
+ $prototypeValue = 'scalar value';
+ break;
+
+ case 'Symfony\Component\Config\Definition\FloatNode':
+ case 'Symfony\Component\Config\Definition\IntegerNode':
+ $prototypeValue = 'numeric value';
+ break;
+
+ case 'Symfony\Component\Config\Definition\BooleanNode':
+ $prototypeValue = 'true|false';
+ break;
+
+ case 'Symfony\Component\Config\Definition\EnumNode':
+ $prototypeValue = implode('|', array_map('json_encode', $prototype->getValues()));
+ break;
+
+ default:
+ $prototypeValue = 'value';
+ }
+ }
+ }
+ }
+
+ // get attributes and elements
+ foreach ($children as $child) {
+ if (!$child instanceof ArrayNode) {
+ // get attributes
+
+ // metadata
+ $name = str_replace('_', '-', $child->getName());
+ $value = '%%%%not_defined%%%%'; // use a string which isn't used in the normal world
+
+ // comments
+ $comments = [];
+ if ($info = $child->getInfo()) {
+ $comments[] = $info;
+ }
+
+ if ($example = $child->getExample()) {
+ $comments[] = 'Example: '.$example;
+ }
+
+ if ($child->isRequired()) {
+ $comments[] = 'Required';
+ }
+
+ if ($child->isDeprecated()) {
+ $comments[] = sprintf('Deprecated (%s)', $child->getDeprecationMessage($child->getName(), $node->getPath()));
+ }
+
+ if ($child instanceof EnumNode) {
+ $comments[] = 'One of '.implode('; ', array_map('json_encode', $child->getValues()));
+ }
+
+ if (\count($comments)) {
+ $rootAttributeComments[$name] = implode(";\n", $comments);
+ }
+
+ // default values
+ if ($child->hasDefaultValue()) {
+ $value = $child->getDefaultValue();
+ }
+
+ // append attribute
+ $rootAttributes[$name] = $value;
+ } else {
+ // get elements
+ $rootChildren[] = $child;
+ }
+ }
+ }
+
+ // render comments
+
+ // root node comment
+ if (\count($rootComments)) {
+ foreach ($rootComments as $comment) {
+ $this->writeLine('', $depth);
+ }
+ }
+
+ // attribute comments
+ 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);
+
+ if ($multiline) {
+ $this->writeLine('', $depth);
+ } else {
+ $this->writeLine('', $depth);
+ }
+ }
+ }
+
+ // render start tag + attributes
+ $rootIsVariablePrototype = isset($prototypeValue);
+ $rootIsEmptyTag = (0 === \count($rootChildren) && !$rootIsVariablePrototype);
+ $rootOpenTag = '<'.$rootName;
+ if (1 >= ($attributesCount = \count($rootAttributes))) {
+ if (1 === $attributesCount) {
+ $rootOpenTag .= sprintf(' %s="%s"', current(array_keys($rootAttributes)), $this->writeValue(current($rootAttributes)));
+ }
+
+ $rootOpenTag .= $rootIsEmptyTag ? ' />' : '>';
+
+ if ($rootIsVariablePrototype) {
+ $rootOpenTag .= $prototypeValue.''.$rootName.'>';
+ }
+
+ $this->writeLine($rootOpenTag, $depth);
+ } else {
+ $this->writeLine($rootOpenTag, $depth);
+
+ $i = 1;
+
+ foreach ($rootAttributes as $attrName => $attrValue) {
+ $attr = sprintf('%s="%s"', $attrName, $this->writeValue($attrValue));
+
+ $this->writeLine($attr, $depth + 4);
+
+ if ($attributesCount === $i++) {
+ $this->writeLine($rootIsEmptyTag ? '/>' : '>', $depth);
+
+ if ($rootIsVariablePrototype) {
+ $rootOpenTag .= $prototypeValue.''.$rootName.'>';
+ }
+ }
+ }
+ }
+
+ // render children tags
+ foreach ($rootChildren as $child) {
+ $this->writeLine('');
+ $this->writeNode($child, $depth + 4);
+ }
+
+ // render end tag
+ if (!$rootIsEmptyTag && !$rootIsVariablePrototype) {
+ $this->writeLine('');
+
+ $rootEndTag = ''.$rootName.'>';
+ $this->writeLine($rootEndTag, $depth);
+ }
+ }
+
+ /**
+ * Outputs a single config reference line.
+ *
+ * @param string $text
+ * @param int $indent
+ */
+ private function writeLine($text, $indent = 0)
+ {
+ $indent = \strlen($text) + $indent;
+ $format = '%'.$indent.'s';
+
+ $this->reference .= sprintf($format, $text).\PHP_EOL;
+ }
+
+ /**
+ * Renders the string conversion of the value.
+ *
+ * @param mixed $value
+ *
+ * @return string
+ */
+ private function writeValue($value)
+ {
+ if ('%%%%not_defined%%%%' === $value) {
+ return '';
+ }
+
+ if (\is_string($value) || is_numeric($value)) {
+ return $value;
+ }
+
+ if (false === $value) {
+ return 'false';
+ }
+
+ if (true === $value) {
+ return 'true';
+ }
+
+ if (null === $value) {
+ return 'null';
+ }
+
+ if (empty($value)) {
+ return '';
+ }
+
+ if (\is_array($value)) {
+ return implode(',', $value);
+ }
+
+ return '';
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php
new file mode 100644
index 00000000..ba355394
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Dumper/YamlReferenceDumper.php
@@ -0,0 +1,252 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Dumper;
+
+use Symfony\Component\Config\Definition\ArrayNode;
+use Symfony\Component\Config\Definition\ConfigurationInterface;
+use Symfony\Component\Config\Definition\EnumNode;
+use Symfony\Component\Config\Definition\NodeInterface;
+use Symfony\Component\Config\Definition\PrototypedArrayNode;
+use Symfony\Component\Config\Definition\ScalarNode;
+use Symfony\Component\Yaml\Inline;
+
+/**
+ * Dumps a Yaml reference configuration for the given configuration/node instance.
+ *
+ * @author Kevin Bond
+ */
+class YamlReferenceDumper
+{
+ private $reference;
+
+ public function dump(ConfigurationInterface $configuration)
+ {
+ return $this->dumpNode($configuration->getConfigTreeBuilder()->buildTree());
+ }
+
+ public function dumpAtPath(ConfigurationInterface $configuration, $path)
+ {
+ $rootNode = $node = $configuration->getConfigTreeBuilder()->buildTree();
+
+ foreach (explode('.', $path) as $step) {
+ if (!$node instanceof ArrayNode) {
+ throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
+ }
+
+ /** @var NodeInterface[] $children */
+ $children = $node instanceof PrototypedArrayNode ? $this->getPrototypeChildren($node) : $node->getChildren();
+
+ foreach ($children as $child) {
+ if ($child->getName() === $step) {
+ $node = $child;
+
+ continue 2;
+ }
+ }
+
+ throw new \UnexpectedValueException(sprintf('Unable to find node at path "%s.%s".', $rootNode->getName(), $path));
+ }
+
+ return $this->dumpNode($node);
+ }
+
+ public function dumpNode(NodeInterface $node)
+ {
+ $this->reference = '';
+ $this->writeNode($node);
+ $ref = $this->reference;
+ $this->reference = null;
+
+ return $ref;
+ }
+
+ /**
+ * @param int $depth
+ * @param bool $prototypedArray
+ */
+ private function writeNode(NodeInterface $node, NodeInterface $parentNode = null, $depth = 0, $prototypedArray = false)
+ {
+ $comments = [];
+ $default = '';
+ $defaultArray = null;
+ $children = null;
+ $example = $node->getExample();
+
+ // defaults
+ if ($node instanceof ArrayNode) {
+ $children = $node->getChildren();
+
+ if ($node instanceof PrototypedArrayNode) {
+ $children = $this->getPrototypeChildren($node);
+ }
+
+ if (!$children) {
+ if ($node->hasDefaultValue() && \count($defaultArray = $node->getDefaultValue())) {
+ $default = '';
+ } elseif (!\is_array($example)) {
+ $default = '[]';
+ }
+ }
+ } elseif ($node instanceof EnumNode) {
+ $comments[] = 'One of '.implode('; ', array_map('json_encode', $node->getValues()));
+ $default = $node->hasDefaultValue() ? Inline::dump($node->getDefaultValue()) : '~';
+ } else {
+ $default = '~';
+
+ if ($node->hasDefaultValue()) {
+ $default = $node->getDefaultValue();
+
+ if (\is_array($default)) {
+ if (\count($defaultArray = $node->getDefaultValue())) {
+ $default = '';
+ } elseif (!\is_array($example)) {
+ $default = '[]';
+ }
+ } else {
+ $default = Inline::dump($default);
+ }
+ }
+ }
+
+ // required?
+ if ($node->isRequired()) {
+ $comments[] = 'Required';
+ }
+
+ // deprecated?
+ if ($node->isDeprecated()) {
+ $comments[] = sprintf('Deprecated (%s)', $node->getDeprecationMessage($node->getName(), $parentNode ? $parentNode->getPath() : $node->getPath()));
+ }
+
+ // example
+ if ($example && !\is_array($example)) {
+ $comments[] = 'Example: '.$example;
+ }
+
+ $default = '' != (string) $default ? ' '.$default : '';
+ $comments = \count($comments) ? '# '.implode(', ', $comments) : '';
+
+ $key = $prototypedArray ? '-' : $node->getName().':';
+ $text = rtrim(sprintf('%-21s%s %s', $key, $default, $comments), ' ');
+
+ if ($info = $node->getInfo()) {
+ $this->writeLine('');
+ // indenting multi-line info
+ $info = str_replace("\n", sprintf("\n%".($depth * 4).'s# ', ' '), $info);
+ $this->writeLine('# '.$info, $depth * 4);
+ }
+
+ $this->writeLine($text, $depth * 4);
+
+ // output defaults
+ if ($defaultArray) {
+ $this->writeLine('');
+
+ $message = \count($defaultArray) > 1 ? 'Defaults' : 'Default';
+
+ $this->writeLine('# '.$message.':', $depth * 4 + 4);
+
+ $this->writeArray($defaultArray, $depth + 1);
+ }
+
+ if (\is_array($example)) {
+ $this->writeLine('');
+
+ $message = \count($example) > 1 ? 'Examples' : 'Example';
+
+ $this->writeLine('# '.$message.':', $depth * 4 + 4);
+
+ $this->writeArray($example, $depth + 1);
+ }
+
+ if ($children) {
+ foreach ($children as $childNode) {
+ $this->writeNode($childNode, $node, $depth + 1, $node instanceof PrototypedArrayNode && !$node->getKeyAttribute());
+ }
+ }
+ }
+
+ /**
+ * Outputs a single config reference line.
+ *
+ * @param string $text
+ * @param int $indent
+ */
+ private function writeLine($text, $indent = 0)
+ {
+ $indent = \strlen($text) + $indent;
+ $format = '%'.$indent.'s';
+
+ $this->reference .= sprintf($format, $text)."\n";
+ }
+
+ private function writeArray(array $array, $depth)
+ {
+ $isIndexed = array_values($array) === $array;
+
+ foreach ($array as $key => $value) {
+ if (\is_array($value)) {
+ $val = '';
+ } else {
+ $val = $value;
+ }
+
+ if ($isIndexed) {
+ $this->writeLine('- '.$val, $depth * 4);
+ } else {
+ $this->writeLine(sprintf('%-20s %s', $key.':', $val), $depth * 4);
+ }
+
+ if (\is_array($value)) {
+ $this->writeArray($value, $depth + 1);
+ }
+ }
+ }
+
+ /**
+ * @return array
+ */
+ private function getPrototypeChildren(PrototypedArrayNode $node)
+ {
+ $prototype = $node->getPrototype();
+ $key = $node->getKeyAttribute();
+
+ // Do not expand prototype if it isn't an array node nor uses attribute as key
+ if (!$key && !$prototype instanceof ArrayNode) {
+ return $node->getChildren();
+ }
+
+ if ($prototype instanceof ArrayNode) {
+ $keyNode = new ArrayNode($key, $node);
+ $children = $prototype->getChildren();
+
+ if ($prototype instanceof PrototypedArrayNode && $prototype->getKeyAttribute()) {
+ $children = $this->getPrototypeChildren($prototype);
+ }
+
+ // add children
+ foreach ($children as $childNode) {
+ $keyNode->addChild($childNode);
+ }
+ } else {
+ $keyNode = new ScalarNode($key, $node);
+ }
+
+ $info = 'Prototype';
+ if (null !== $prototype->getInfo()) {
+ $info .= ': '.$prototype->getInfo();
+ }
+ $keyNode->setInfo($info);
+
+ return [$key => $keyNode];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/EnumNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/EnumNode.php
new file mode 100644
index 00000000..15c8db3e
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/EnumNode.php
@@ -0,0 +1,54 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+
+/**
+ * Node which only allows a finite set of values.
+ *
+ * @author Johannes M. Schmitt
+ */
+class EnumNode extends ScalarNode
+{
+ private $values;
+
+ public function __construct($name, NodeInterface $parent = null, array $values = [])
+ {
+ $values = array_unique($values);
+ if (empty($values)) {
+ throw new \InvalidArgumentException('$values must contain at least one element.');
+ }
+
+ parent::__construct($name, $parent);
+ $this->values = $values;
+ }
+
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ protected function finalizeValue($value)
+ {
+ $value = parent::finalizeValue($value);
+
+ if (!\in_array($value, $this->values, true)) {
+ $ex = new InvalidConfigurationException(sprintf('The value %s is not allowed for path "%s". Permissible values: %s', json_encode($value), $this->getPath(), implode(', ', array_map('json_encode', $this->values))));
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+
+ return $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php
new file mode 100644
index 00000000..48dd9325
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/DuplicateKeyException.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * This exception is thrown whenever the key of an array is not unique. This can
+ * only be the case if the configuration is coming from an XML file.
+ *
+ * @author Johannes M. Schmitt
+ */
+class DuplicateKeyException extends InvalidConfigurationException
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/Exception.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/Exception.php
new file mode 100644
index 00000000..8933a492
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/Exception.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * Base exception for all configuration exceptions.
+ *
+ * @author Johannes M. Schmitt
+ */
+class Exception extends \RuntimeException
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php
new file mode 100644
index 00000000..726c07fb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/ForbiddenOverwriteException.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * This exception is thrown when a configuration path is overwritten from a
+ * subsequent configuration file, but the entry node specifically forbids this.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ForbiddenOverwriteException extends InvalidConfigurationException
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php
new file mode 100644
index 00000000..3dbc57b1
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidConfigurationException.php
@@ -0,0 +1,49 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * A very general exception which can be thrown whenever non of the more specific
+ * exceptions is suitable.
+ *
+ * @author Johannes M. Schmitt
+ */
+class InvalidConfigurationException extends Exception
+{
+ private $path;
+ private $containsHints = false;
+
+ public function setPath($path)
+ {
+ $this->path = $path;
+ }
+
+ public function getPath()
+ {
+ return $this->path;
+ }
+
+ /**
+ * Adds extra information that is suffixed to the original exception message.
+ *
+ * @param string $hint
+ */
+ public function addHint($hint)
+ {
+ if (!$this->containsHints) {
+ $this->message .= "\nHint: ".$hint;
+ $this->containsHints = true;
+ } else {
+ $this->message .= ', '.$hint;
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php
new file mode 100644
index 00000000..98310dae
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidDefinitionException.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * Thrown when an error is detected in a node Definition.
+ *
+ * @author Victor Berchet
+ */
+class InvalidDefinitionException extends Exception
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidTypeException.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidTypeException.php
new file mode 100644
index 00000000..d7ca8c9d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/InvalidTypeException.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * This exception is thrown if an invalid type is encountered.
+ *
+ * @author Johannes M. Schmitt
+ */
+class InvalidTypeException extends InvalidConfigurationException
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/UnsetKeyException.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/UnsetKeyException.php
new file mode 100644
index 00000000..863181a3
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Exception/UnsetKeyException.php
@@ -0,0 +1,22 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition\Exception;
+
+/**
+ * This exception is usually not encountered by the end-user, but only used
+ * internally to signal the parent scope to unset a key.
+ *
+ * @author Johannes M. Schmitt
+ */
+class UnsetKeyException extends Exception
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/FloatNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/FloatNode.php
new file mode 100644
index 00000000..9eb87899
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/FloatNode.php
@@ -0,0 +1,43 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+
+/**
+ * This node represents a float value in the config tree.
+ *
+ * @author Jeanmonod David
+ */
+class FloatNode extends NumericNode
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function validateType($value)
+ {
+ // Integers are also accepted, we just cast them
+ if (\is_int($value)) {
+ $value = (float) $value;
+ }
+
+ if (!\is_float($value)) {
+ $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected float, but got %s.', $this->getPath(), \gettype($value)));
+ if ($hint = $this->getInfo()) {
+ $ex->addHint($hint);
+ }
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/IntegerNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/IntegerNode.php
new file mode 100644
index 00000000..8ec068a8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/IntegerNode.php
@@ -0,0 +1,38 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+
+/**
+ * This node represents an integer value in the config tree.
+ *
+ * @author Jeanmonod David
+ */
+class IntegerNode extends NumericNode
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function validateType($value)
+ {
+ if (!\is_int($value)) {
+ $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected int, but got %s.', $this->getPath(), \gettype($value)));
+ if ($hint = $this->getInfo()) {
+ $ex->addHint($hint);
+ }
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/NodeInterface.php b/modules/empikmarketplace/vendor/symfony/config/Definition/NodeInterface.php
new file mode 100644
index 00000000..45f1f681
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/NodeInterface.php
@@ -0,0 +1,100 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException;
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+
+/**
+ * Common Interface among all nodes.
+ *
+ * In most cases, it is better to inherit from BaseNode instead of implementing
+ * this interface yourself.
+ *
+ * @author Johannes M. Schmitt
+ */
+interface NodeInterface
+{
+ /**
+ * Returns the name of the node.
+ *
+ * @return string The name of the node
+ */
+ public function getName();
+
+ /**
+ * Returns the path of the node.
+ *
+ * @return string The node path
+ */
+ public function getPath();
+
+ /**
+ * Returns true when the node is required.
+ *
+ * @return bool If the node is required
+ */
+ public function isRequired();
+
+ /**
+ * Returns true when the node has a default value.
+ *
+ * @return bool If the node has a default value
+ */
+ public function hasDefaultValue();
+
+ /**
+ * Returns the default value of the node.
+ *
+ * @return mixed The default value
+ *
+ * @throws \RuntimeException if the node has no default value
+ */
+ public function getDefaultValue();
+
+ /**
+ * Normalizes a value.
+ *
+ * @param mixed $value The value to normalize
+ *
+ * @return mixed The normalized value
+ *
+ * @throws InvalidTypeException if the value type is invalid
+ */
+ public function normalize($value);
+
+ /**
+ * Merges two values together.
+ *
+ * @param mixed $leftSide
+ * @param mixed $rightSide
+ *
+ * @return mixed The merged value
+ *
+ * @throws ForbiddenOverwriteException if the configuration path cannot be overwritten
+ * @throws InvalidTypeException if the value type is invalid
+ */
+ public function merge($leftSide, $rightSide);
+
+ /**
+ * Finalizes a value.
+ *
+ * @param mixed $value The value to finalize
+ *
+ * @return mixed The finalized value
+ *
+ * @throws InvalidTypeException if the value type is invalid
+ * @throws InvalidConfigurationException if the value is invalid configuration
+ */
+ public function finalize($value);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/NumericNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/NumericNode.php
new file mode 100644
index 00000000..439935e4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/NumericNode.php
@@ -0,0 +1,64 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+
+/**
+ * This node represents a numeric value in the config tree.
+ *
+ * @author David Jeanmonod
+ */
+class NumericNode extends ScalarNode
+{
+ protected $min;
+ protected $max;
+
+ public function __construct($name, NodeInterface $parent = null, $min = null, $max = null)
+ {
+ parent::__construct($name, $parent);
+ $this->min = $min;
+ $this->max = $max;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function finalizeValue($value)
+ {
+ $value = parent::finalizeValue($value);
+
+ $errorMsg = null;
+ if (isset($this->min) && $value < $this->min) {
+ $errorMsg = sprintf('The value %s is too small for path "%s". Should be greater than or equal to %s', $value, $this->getPath(), $this->min);
+ }
+ if (isset($this->max) && $value > $this->max) {
+ $errorMsg = sprintf('The value %s is too big for path "%s". Should be less than or equal to %s', $value, $this->getPath(), $this->max);
+ }
+ if (isset($errorMsg)) {
+ $ex = new InvalidConfigurationException($errorMsg);
+ $ex->setPath($this->getPath());
+ throw $ex;
+ }
+
+ return $value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function isValueEmpty($value)
+ {
+ // a numeric value cannot be empty
+ return false;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/Processor.php b/modules/empikmarketplace/vendor/symfony/config/Definition/Processor.php
new file mode 100644
index 00000000..0a935eeb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/Processor.php
@@ -0,0 +1,97 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+/**
+ * This class is the entry point for config normalization/merging/finalization.
+ *
+ * @author Johannes M. Schmitt
+ */
+class Processor
+{
+ /**
+ * Processes an array of configurations.
+ *
+ * @param NodeInterface $configTree The node tree describing the configuration
+ * @param array $configs An array of configuration items to process
+ *
+ * @return array The processed configuration
+ */
+ public function process(NodeInterface $configTree, array $configs)
+ {
+ $currentConfig = [];
+ foreach ($configs as $config) {
+ $config = $configTree->normalize($config);
+ $currentConfig = $configTree->merge($currentConfig, $config);
+ }
+
+ return $configTree->finalize($currentConfig);
+ }
+
+ /**
+ * Processes an array of configurations.
+ *
+ * @param ConfigurationInterface $configuration The configuration class
+ * @param array $configs An array of configuration items to process
+ *
+ * @return array The processed configuration
+ */
+ public function processConfiguration(ConfigurationInterface $configuration, array $configs)
+ {
+ return $this->process($configuration->getConfigTreeBuilder()->buildTree(), $configs);
+ }
+
+ /**
+ * Normalizes a configuration entry.
+ *
+ * This method returns a normalize configuration array for a given key
+ * to remove the differences due to the original format (YAML and XML mainly).
+ *
+ * Here is an example.
+ *
+ * The configuration in XML:
+ *
+ * twig.extension.foo
+ * twig.extension.bar
+ *
+ * And the same configuration in YAML:
+ *
+ * extensions: ['twig.extension.foo', 'twig.extension.bar']
+ *
+ * @param array $config A config array
+ * @param string $key The key to normalize
+ * @param string $plural The plural form of the key if it is irregular
+ *
+ * @return array
+ */
+ public static function normalizeConfig($config, $key, $plural = null)
+ {
+ if (null === $plural) {
+ $plural = $key.'s';
+ }
+
+ if (isset($config[$plural])) {
+ return $config[$plural];
+ }
+
+ if (isset($config[$key])) {
+ if (\is_string($config[$key]) || !\is_int(key($config[$key]))) {
+ // only one
+ return [$config[$key]];
+ }
+
+ return $config[$key];
+ }
+
+ return [];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/PrototypeNodeInterface.php b/modules/empikmarketplace/vendor/symfony/config/Definition/PrototypeNodeInterface.php
new file mode 100644
index 00000000..8bbb84d4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/PrototypeNodeInterface.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+/**
+ * This interface must be implemented by nodes which can be used as prototypes.
+ *
+ * @author Johannes M. Schmitt
+ */
+interface PrototypeNodeInterface extends NodeInterface
+{
+ /**
+ * Sets the name of the node.
+ *
+ * @param string $name The name of the node
+ */
+ public function setName($name);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/PrototypedArrayNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/PrototypedArrayNode.php
new file mode 100644
index 00000000..d18a109a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/PrototypedArrayNode.php
@@ -0,0 +1,377 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\DuplicateKeyException;
+use Symfony\Component\Config\Definition\Exception\Exception;
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+use Symfony\Component\Config\Definition\Exception\UnsetKeyException;
+
+/**
+ * Represents a prototyped Array node in the config tree.
+ *
+ * @author Johannes M. Schmitt
+ */
+class PrototypedArrayNode extends ArrayNode
+{
+ protected $prototype;
+ protected $keyAttribute;
+ protected $removeKeyAttribute = false;
+ protected $minNumberOfElements = 0;
+ protected $defaultValue = [];
+ protected $defaultChildren;
+ /**
+ * @var NodeInterface[] An array of the prototypes of the simplified value children
+ */
+ private $valuePrototypes = [];
+
+ /**
+ * Sets the minimum number of elements that a prototype based node must
+ * contain. By default this is zero, meaning no elements.
+ *
+ * @param int $number
+ */
+ public function setMinNumberOfElements($number)
+ {
+ $this->minNumberOfElements = $number;
+ }
+
+ /**
+ * Sets the attribute which value is to be used as key.
+ *
+ * This is useful when you have an indexed array that should be an
+ * associative array. You can select an item from within the array
+ * to be the key of the particular item. For example, if "id" is the
+ * "key", then:
+ *
+ * [
+ * ['id' => 'my_name', 'foo' => 'bar'],
+ * ];
+ *
+ * becomes
+ *
+ * [
+ * 'my_name' => ['foo' => 'bar'],
+ * ];
+ *
+ * If you'd like "'id' => 'my_name'" to still be present in the resulting
+ * array, then you can set the second argument of this method to false.
+ *
+ * @param string $attribute The name of the attribute which value is to be used as a key
+ * @param bool $remove Whether or not to remove the key
+ */
+ public function setKeyAttribute($attribute, $remove = true)
+ {
+ $this->keyAttribute = $attribute;
+ $this->removeKeyAttribute = $remove;
+ }
+
+ /**
+ * Retrieves the name of the attribute which value should be used as key.
+ *
+ * @return string|null The name of the attribute
+ */
+ public function getKeyAttribute()
+ {
+ return $this->keyAttribute;
+ }
+
+ /**
+ * Sets the default value of this node.
+ *
+ * @param string $value
+ *
+ * @throws \InvalidArgumentException if the default value is not an array
+ */
+ public function setDefaultValue($value)
+ {
+ if (!\is_array($value)) {
+ throw new \InvalidArgumentException($this->getPath().': the default value of an array node has to be an array.');
+ }
+
+ $this->defaultValue = $value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasDefaultValue()
+ {
+ return true;
+ }
+
+ /**
+ * Adds default children when none are set.
+ *
+ * @param int|string|array|null $children The number of children|The child name|The children names to be added
+ */
+ public function setAddChildrenIfNoneSet($children = ['defaults'])
+ {
+ if (null === $children) {
+ $this->defaultChildren = ['defaults'];
+ } else {
+ $this->defaultChildren = \is_int($children) && $children > 0 ? range(1, $children) : (array) $children;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * The default value could be either explicited or derived from the prototype
+ * default value.
+ */
+ public function getDefaultValue()
+ {
+ if (null !== $this->defaultChildren) {
+ $default = $this->prototype->hasDefaultValue() ? $this->prototype->getDefaultValue() : [];
+ $defaults = [];
+ foreach (array_values($this->defaultChildren) as $i => $name) {
+ $defaults[null === $this->keyAttribute ? $i : $name] = $default;
+ }
+
+ return $defaults;
+ }
+
+ return $this->defaultValue;
+ }
+
+ /**
+ * Sets the node prototype.
+ */
+ public function setPrototype(PrototypeNodeInterface $node)
+ {
+ $this->prototype = $node;
+ }
+
+ /**
+ * Retrieves the prototype.
+ *
+ * @return PrototypeNodeInterface The prototype
+ */
+ public function getPrototype()
+ {
+ return $this->prototype;
+ }
+
+ /**
+ * Disable adding concrete children for prototyped nodes.
+ *
+ * @throws Exception
+ */
+ public function addChild(NodeInterface $node)
+ {
+ throw new Exception('A prototyped array node can not have concrete children.');
+ }
+
+ /**
+ * Finalizes the value of this node.
+ *
+ * @param mixed $value
+ *
+ * @return mixed The finalized value
+ *
+ * @throws UnsetKeyException
+ * @throws InvalidConfigurationException if the node doesn't have enough children
+ */
+ protected function finalizeValue($value)
+ {
+ if (false === $value) {
+ throw new UnsetKeyException(sprintf('Unsetting key for path "%s", value: "%s".', $this->getPath(), json_encode($value)));
+ }
+
+ foreach ($value as $k => $v) {
+ $prototype = $this->getPrototypeForChild($k);
+ try {
+ $value[$k] = $prototype->finalize($v);
+ } catch (UnsetKeyException $e) {
+ unset($value[$k]);
+ }
+ }
+
+ if (\count($value) < $this->minNumberOfElements) {
+ $ex = new InvalidConfigurationException(sprintf('The path "%s" should have at least %d element(s) defined.', $this->getPath(), $this->minNumberOfElements));
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+
+ return $value;
+ }
+
+ /**
+ * Normalizes the value.
+ *
+ * @param mixed $value The value to normalize
+ *
+ * @return mixed The normalized value
+ *
+ * @throws InvalidConfigurationException
+ * @throws DuplicateKeyException
+ */
+ protected function normalizeValue($value)
+ {
+ if (false === $value) {
+ return $value;
+ }
+
+ $value = $this->remapXml($value);
+
+ $isAssoc = array_keys($value) !== range(0, \count($value) - 1);
+ $normalized = [];
+ foreach ($value as $k => $v) {
+ if (null !== $this->keyAttribute && \is_array($v)) {
+ if (!isset($v[$this->keyAttribute]) && \is_int($k) && !$isAssoc) {
+ $ex = new InvalidConfigurationException(sprintf('The attribute "%s" must be set for path "%s".', $this->keyAttribute, $this->getPath()));
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ } elseif (isset($v[$this->keyAttribute])) {
+ $k = $v[$this->keyAttribute];
+
+ // remove the key attribute when required
+ if ($this->removeKeyAttribute) {
+ unset($v[$this->keyAttribute]);
+ }
+
+ // if only "value" is left
+ if (array_keys($v) === ['value']) {
+ $v = $v['value'];
+ if ($this->prototype instanceof ArrayNode && ($children = $this->prototype->getChildren()) && \array_key_exists('value', $children)) {
+ $valuePrototype = current($this->valuePrototypes) ?: clone $children['value'];
+ $valuePrototype->parent = $this;
+ $originalClosures = $this->prototype->normalizationClosures;
+ if (\is_array($originalClosures)) {
+ $valuePrototypeClosures = $valuePrototype->normalizationClosures;
+ $valuePrototype->normalizationClosures = \is_array($valuePrototypeClosures) ? array_merge($originalClosures, $valuePrototypeClosures) : $originalClosures;
+ }
+ $this->valuePrototypes[$k] = $valuePrototype;
+ }
+ }
+ }
+
+ if (\array_key_exists($k, $normalized)) {
+ $ex = new DuplicateKeyException(sprintf('Duplicate key "%s" for path "%s".', $k, $this->getPath()));
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+ }
+
+ $prototype = $this->getPrototypeForChild($k);
+ if (null !== $this->keyAttribute || $isAssoc) {
+ $normalized[$k] = $prototype->normalize($v);
+ } else {
+ $normalized[] = $prototype->normalize($v);
+ }
+ }
+
+ return $normalized;
+ }
+
+ /**
+ * Merges values together.
+ *
+ * @param mixed $leftSide The left side to merge
+ * @param mixed $rightSide The right side to merge
+ *
+ * @return mixed The merged values
+ *
+ * @throws InvalidConfigurationException
+ * @throws \RuntimeException
+ */
+ protected function mergeValues($leftSide, $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;
+ }
+
+ if (false === $leftSide || !$this->performDeepMerging) {
+ return $rightSide;
+ }
+
+ foreach ($rightSide as $k => $v) {
+ // prototype, and key is irrelevant, append the element
+ if (null === $this->keyAttribute) {
+ $leftSide[] = $v;
+ continue;
+ }
+
+ // no conflict
+ if (!\array_key_exists($k, $leftSide)) {
+ if (!$this->allowNewKeys) {
+ $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.', $this->getPath()));
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+
+ $leftSide[$k] = $v;
+ continue;
+ }
+
+ $prototype = $this->getPrototypeForChild($k);
+ $leftSide[$k] = $prototype->merge($leftSide[$k], $v);
+ }
+
+ return $leftSide;
+ }
+
+ /**
+ * Returns a prototype for the child node that is associated to $key in the value array.
+ * For general child nodes, this will be $this->prototype.
+ * But if $this->removeKeyAttribute is true and there are only two keys in the child node:
+ * one is same as this->keyAttribute and the other is 'value', then the prototype will be different.
+ *
+ * For example, assume $this->keyAttribute is 'name' and the value array is as follows:
+ *
+ * [
+ * [
+ * 'name' => 'name001',
+ * 'value' => 'value001'
+ * ]
+ * ]
+ *
+ * Now, the key is 0 and the child node is:
+ *
+ * [
+ * 'name' => 'name001',
+ * 'value' => 'value001'
+ * ]
+ *
+ * When normalizing the value array, the 'name' element will removed from the child node
+ * and its value becomes the new key of the child node:
+ *
+ * [
+ * 'name001' => ['value' => 'value001']
+ * ]
+ *
+ * Now only 'value' element is left in the child node which can be further simplified into a string:
+ *
+ * ['name001' => 'value001']
+ *
+ * Now, the key becomes 'name001' and the child node becomes 'value001' and
+ * the prototype of child node 'name001' should be a ScalarNode instead of an ArrayNode instance.
+ *
+ * @param string $key The key of the child node
+ *
+ * @return mixed The prototype instance
+ */
+ private function getPrototypeForChild($key)
+ {
+ $prototype = isset($this->valuePrototypes[$key]) ? $this->valuePrototypes[$key] : $this->prototype;
+ $prototype->setName($key);
+
+ return $prototype;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/ScalarNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/ScalarNode.php
new file mode 100644
index 00000000..53c1ed29
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/ScalarNode.php
@@ -0,0 +1,53 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidTypeException;
+
+/**
+ * This node represents a scalar value in the config tree.
+ *
+ * The following values are considered scalars:
+ * * booleans
+ * * strings
+ * * null
+ * * integers
+ * * floats
+ *
+ * @author Johannes M. Schmitt
+ */
+class ScalarNode extends VariableNode
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function validateType($value)
+ {
+ if (!is_scalar($value) && null !== $value) {
+ $ex = new InvalidTypeException(sprintf('Invalid type for path "%s". Expected scalar, but got %s.', $this->getPath(), \gettype($value)));
+ if ($hint = $this->getInfo()) {
+ $ex->addHint($hint);
+ }
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function isValueEmpty($value)
+ {
+ return null === $value || '' === $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Definition/VariableNode.php b/modules/empikmarketplace/vendor/symfony/config/Definition/VariableNode.php
new file mode 100644
index 00000000..1a3442d9
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Definition/VariableNode.php
@@ -0,0 +1,128 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Definition;
+
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+
+/**
+ * This node represents a value of variable type in the config tree.
+ *
+ * This node is intended for values of arbitrary type.
+ * Any PHP type is accepted as a value.
+ *
+ * @author Jeremy Mikola
+ */
+class VariableNode extends BaseNode implements PrototypeNodeInterface
+{
+ protected $defaultValueSet = false;
+ protected $defaultValue;
+ protected $allowEmptyValue = true;
+
+ public function setDefaultValue($value)
+ {
+ $this->defaultValueSet = true;
+ $this->defaultValue = $value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function hasDefaultValue()
+ {
+ return $this->defaultValueSet;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getDefaultValue()
+ {
+ $v = $this->defaultValue;
+
+ return $v instanceof \Closure ? $v() : $v;
+ }
+
+ /**
+ * Sets if this node is allowed to have an empty value.
+ *
+ * @param bool $boolean True if this entity will accept empty values
+ */
+ public function setAllowEmptyValue($boolean)
+ {
+ $this->allowEmptyValue = (bool) $boolean;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function validateType($value)
+ {
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function finalizeValue($value)
+ {
+ if (!$this->allowEmptyValue && $this->isValueEmpty($value)) {
+ $ex = new InvalidConfigurationException(sprintf('The path "%s" cannot contain an empty value, but got %s.', $this->getPath(), json_encode($value)));
+ if ($hint = $this->getInfo()) {
+ $ex->addHint($hint);
+ }
+ $ex->setPath($this->getPath());
+
+ throw $ex;
+ }
+
+ return $value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function normalizeValue($value)
+ {
+ return $value;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function mergeValues($leftSide, $rightSide)
+ {
+ return $rightSide;
+ }
+
+ /**
+ * Evaluates if the given value is to be treated as empty.
+ *
+ * By default, PHP's empty() function is used to test for emptiness. This
+ * method may be overridden by subtypes to better match their understanding
+ * of empty data.
+ *
+ * @param mixed $value
+ *
+ * @return bool
+ */
+ protected function isValueEmpty($value)
+ {
+ return empty($value);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/DependencyInjection/ConfigCachePass.php b/modules/empikmarketplace/vendor/symfony/config/DependencyInjection/ConfigCachePass.php
new file mode 100644
index 00000000..30df15be
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/DependencyInjection/ConfigCachePass.php
@@ -0,0 +1,52 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\DependencyInjection;
+
+@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use tagged iterator arguments instead.', ConfigCachePass::class), \E_USER_DEPRECATED);
+
+use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\Compiler\PriorityTaggedServiceTrait;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Adds services tagged config_cache.resource_checker to the config_cache_factory service, ordering them by priority.
+ *
+ * @author Matthias Pigulla
+ * @author Benjamin Klotz
+ *
+ * @deprecated since version 3.4, to be removed in 4.0. Use tagged iterator arguments instead.
+ */
+class ConfigCachePass implements CompilerPassInterface
+{
+ use PriorityTaggedServiceTrait;
+
+ private $factoryServiceId;
+ private $resourceCheckerTag;
+
+ public function __construct($factoryServiceId = 'config_cache_factory', $resourceCheckerTag = 'config_cache.resource_checker')
+ {
+ $this->factoryServiceId = $factoryServiceId;
+ $this->resourceCheckerTag = $resourceCheckerTag;
+ }
+
+ public function process(ContainerBuilder $container)
+ {
+ $resourceCheckers = $this->findAndSortTaggedServices($this->resourceCheckerTag, $container);
+
+ if (empty($resourceCheckers)) {
+ return;
+ }
+
+ $container->getDefinition($this->factoryServiceId)->replaceArgument(0, new IteratorArgument($resourceCheckers));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php b/modules/empikmarketplace/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php
new file mode 100644
index 00000000..6a3b01cf
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Exception/FileLoaderImportCircularReferenceException.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Exception;
+
+/**
+ * Exception class for when a circular reference is detected when importing resources.
+ *
+ * @author Fabien Potencier
+ */
+class FileLoaderImportCircularReferenceException extends FileLoaderLoadException
+{
+ public function __construct(array $resources, $code = null, $previous = null)
+ {
+ $message = sprintf('Circular reference detected in "%s" ("%s" > "%s").', $this->varToString($resources[0]), implode('" > "', $resources), $resources[0]);
+
+ \Exception::__construct($message, $code, $previous);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Exception/FileLoaderLoadException.php b/modules/empikmarketplace/vendor/symfony/config/Exception/FileLoaderLoadException.php
new file mode 100644
index 00000000..82d90eb3
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Exception/FileLoaderLoadException.php
@@ -0,0 +1,109 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Exception;
+
+/**
+ * Exception class for when a resource cannot be loaded or imported.
+ *
+ * @author Ryan Weaver
+ */
+class FileLoaderLoadException extends \Exception
+{
+ /**
+ * @param string $resource The resource that could not be imported
+ * @param string $sourceResource The original resource importing the new resource
+ * @param int $code The error code
+ * @param \Exception $previous A previous exception
+ * @param string $type The type of resource
+ */
+ public function __construct($resource, $sourceResource = null, $code = null, $previous = null, $type = null)
+ {
+ $message = '';
+ if ($previous) {
+ // Include the previous exception, to help the user see what might be the underlying cause
+
+ // Trim the trailing period of the previous message. We only want 1 period remove so no rtrim...
+ if ('.' === substr($previous->getMessage(), -1)) {
+ $trimmedMessage = substr($previous->getMessage(), 0, -1);
+ $message .= sprintf('%s', $trimmedMessage).' in ';
+ } else {
+ $message .= sprintf('%s', $previous->getMessage()).' in ';
+ }
+ $message .= $resource.' ';
+
+ // show tweaked trace to complete the human readable sentence
+ if (null === $sourceResource) {
+ $message .= sprintf('(which is loaded in resource "%s")', $this->varToString($resource));
+ } else {
+ $message .= sprintf('(which is being imported from "%s")', $this->varToString($sourceResource));
+ }
+ $message .= '.';
+
+ // if there's no previous message, present it the default way
+ } elseif (null === $sourceResource) {
+ $message .= sprintf('Cannot load resource "%s".', $this->varToString($resource));
+ } else {
+ $message .= sprintf('Cannot import resource "%s" from "%s".', $this->varToString($resource), $this->varToString($sourceResource));
+ }
+
+ // Is the resource located inside a bundle?
+ if ('@' === $resource[0]) {
+ $parts = explode(\DIRECTORY_SEPARATOR, $resource);
+ $bundle = substr($parts[0], 1);
+ $message .= sprintf(' Make sure the "%s" bundle is correctly registered and loaded in the application kernel class.', $bundle);
+ $message .= sprintf(' If the bundle is registered, make sure the bundle path "%s" is not empty.', $resource);
+ } elseif (null !== $type) {
+ // maybe there is no loader for this specific type
+ if ('annotation' === $type) {
+ $message .= ' Make sure annotations are installed and enabled.';
+ } else {
+ $message .= sprintf(' Make sure there is a loader supporting the "%s" type.', $type);
+ }
+ }
+
+ parent::__construct($message, $code, $previous);
+ }
+
+ protected function varToString($var)
+ {
+ if (\is_object($var)) {
+ return sprintf('Object(%s)', \get_class($var));
+ }
+
+ if (\is_array($var)) {
+ $a = [];
+ foreach ($var as $k => $v) {
+ $a[] = sprintf('%s => %s', $k, $this->varToString($v));
+ }
+
+ return sprintf('Array(%s)', implode(', ', $a));
+ }
+
+ if (\is_resource($var)) {
+ return sprintf('Resource(%s)', get_resource_type($var));
+ }
+
+ if (null === $var) {
+ return 'null';
+ }
+
+ if (false === $var) {
+ return 'false';
+ }
+
+ if (true === $var) {
+ return 'true';
+ }
+
+ return (string) $var;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php b/modules/empikmarketplace/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php
new file mode 100644
index 00000000..648cf0e7
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Exception/FileLocatorFileNotFoundException.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Exception;
+
+/**
+ * File locator exception if a file does not exist.
+ *
+ * @author Leo Feyer
+ */
+class FileLocatorFileNotFoundException extends \InvalidArgumentException
+{
+ private $paths;
+
+ public function __construct($message = '', $code = 0, $previous = null, array $paths = [])
+ {
+ parent::__construct($message, $code, $previous);
+
+ $this->paths = $paths;
+ }
+
+ public function getPaths()
+ {
+ return $this->paths;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/FileLocator.php b/modules/empikmarketplace/vendor/symfony/config/FileLocator.php
new file mode 100644
index 00000000..5f315ba7
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/FileLocator.php
@@ -0,0 +1,98 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
+
+/**
+ * FileLocator uses an array of pre-defined paths to find files.
+ *
+ * @author Fabien Potencier
+ */
+class FileLocator implements FileLocatorInterface
+{
+ protected $paths;
+
+ /**
+ * @param string|array $paths A path or an array of paths where to look for resources
+ */
+ public function __construct($paths = [])
+ {
+ $this->paths = (array) $paths;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function locate($name, $currentPath = null, $first = true)
+ {
+ if ('' == $name) {
+ throw new \InvalidArgumentException('An empty file name is not valid to be located.');
+ }
+
+ if ($this->isAbsolutePath($name)) {
+ if (!file_exists($name)) {
+ throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist.', $name), 0, null, [$name]);
+ }
+
+ return $name;
+ }
+
+ $paths = $this->paths;
+
+ if (null !== $currentPath) {
+ array_unshift($paths, $currentPath);
+ }
+
+ $paths = array_unique($paths);
+ $filepaths = $notfound = [];
+
+ foreach ($paths as $path) {
+ if (@file_exists($file = $path.\DIRECTORY_SEPARATOR.$name)) {
+ if (true === $first) {
+ return $file;
+ }
+ $filepaths[] = $file;
+ } else {
+ $notfound[] = $file;
+ }
+ }
+
+ if (!$filepaths) {
+ throw new FileLocatorFileNotFoundException(sprintf('The file "%s" does not exist (in: "%s").', $name, implode('", "', $paths)), 0, null, $notfound);
+ }
+
+ return $filepaths;
+ }
+
+ /**
+ * Returns whether the file path is an absolute path.
+ *
+ * @param string $file A file path
+ *
+ * @return bool
+ */
+ private function isAbsolutePath($file)
+ {
+ if ('/' === $file[0] || '\\' === $file[0]
+ || (\strlen($file) > 3 && ctype_alpha($file[0])
+ && ':' === $file[1]
+ && ('\\' === $file[2] || '/' === $file[2])
+ )
+ || null !== parse_url($file, \PHP_URL_SCHEME)
+ ) {
+ return true;
+ }
+
+ return false;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/FileLocatorInterface.php b/modules/empikmarketplace/vendor/symfony/config/FileLocatorInterface.php
new file mode 100644
index 00000000..cf3c2e59
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/FileLocatorInterface.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
+
+/**
+ * @author Fabien Potencier
+ */
+interface FileLocatorInterface
+{
+ /**
+ * Returns a full path for a given file name.
+ *
+ * @param string $name The file name to locate
+ * @param string|null $currentPath The current path
+ * @param bool $first Whether to return the first occurrence or an array of filenames
+ *
+ * @return string|array The full path to the file or an array of file paths
+ *
+ * @throws \InvalidArgumentException If $name is empty
+ * @throws FileLocatorFileNotFoundException If a file is not found
+ */
+ public function locate($name, $currentPath = null, $first = true);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/LICENSE b/modules/empikmarketplace/vendor/symfony/config/LICENSE
new file mode 100644
index 00000000..9e936ec0
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2004-2020 Fabien Potencier
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is furnished
+to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/DelegatingLoader.php b/modules/empikmarketplace/vendor/symfony/config/Loader/DelegatingLoader.php
new file mode 100644
index 00000000..452e81c5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/DelegatingLoader.php
@@ -0,0 +1,50 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+use Symfony\Component\Config\Exception\FileLoaderLoadException;
+
+/**
+ * DelegatingLoader delegates loading to other loaders using a loader resolver.
+ *
+ * This loader acts as an array of LoaderInterface objects - each having
+ * a chance to load a given resource (handled by the resolver)
+ *
+ * @author Fabien Potencier
+ */
+class DelegatingLoader extends Loader
+{
+ public function __construct(LoaderResolverInterface $resolver)
+ {
+ $this->resolver = $resolver;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function load($resource, $type = null)
+ {
+ if (false === $loader = $this->resolver->resolve($resource, $type)) {
+ throw new FileLoaderLoadException($resource, null, null, null, $type);
+ }
+
+ return $loader->load($resource, $type);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports($resource, $type = null)
+ {
+ return false !== $this->resolver->resolve($resource, $type);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/FileLoader.php b/modules/empikmarketplace/vendor/symfony/config/Loader/FileLoader.php
new file mode 100644
index 00000000..2f1d471b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/FileLoader.php
@@ -0,0 +1,174 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+use Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException;
+use Symfony\Component\Config\Exception\FileLoaderLoadException;
+use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
+use Symfony\Component\Config\FileLocatorInterface;
+use Symfony\Component\Config\Resource\FileExistenceResource;
+use Symfony\Component\Config\Resource\GlobResource;
+
+/**
+ * FileLoader is the abstract class used by all built-in loaders that are file based.
+ *
+ * @author Fabien Potencier
+ */
+abstract class FileLoader extends Loader
+{
+ protected static $loading = [];
+
+ protected $locator;
+
+ private $currentDir;
+
+ public function __construct(FileLocatorInterface $locator)
+ {
+ $this->locator = $locator;
+ }
+
+ /**
+ * Sets the current directory.
+ *
+ * @param string $dir
+ */
+ public function setCurrentDir($dir)
+ {
+ $this->currentDir = $dir;
+ }
+
+ /**
+ * Returns the file locator used by this loader.
+ *
+ * @return FileLocatorInterface
+ */
+ public function getLocator()
+ {
+ return $this->locator;
+ }
+
+ /**
+ * Imports a resource.
+ *
+ * @param mixed $resource A Resource
+ * @param string|null $type The resource type or null if unknown
+ * @param bool $ignoreErrors Whether to ignore import errors or not
+ * @param string|null $sourceResource The original resource importing the new resource
+ *
+ * @return mixed
+ *
+ * @throws FileLoaderLoadException
+ * @throws FileLoaderImportCircularReferenceException
+ * @throws FileLocatorFileNotFoundException
+ */
+ public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null)
+ {
+ if (\is_string($resource) && \strlen($resource) !== $i = strcspn($resource, '*?{[')) {
+ $ret = [];
+ $isSubpath = 0 !== $i && false !== strpos(substr($resource, 0, $i), '/');
+ foreach ($this->glob($resource, false, $_, $ignoreErrors || !$isSubpath) as $path => $info) {
+ if (null !== $res = $this->doImport($path, 'glob' === $type ? null : $type, $ignoreErrors, $sourceResource)) {
+ $ret[] = $res;
+ }
+ $isSubpath = true;
+ }
+
+ if ($isSubpath) {
+ return isset($ret[1]) ? $ret : (isset($ret[0]) ? $ret[0] : null);
+ }
+ }
+
+ return $this->doImport($resource, $type, $ignoreErrors, $sourceResource);
+ }
+
+ /**
+ * @internal
+ */
+ protected function glob($pattern, $recursive, &$resource = null, $ignoreErrors = false)
+ {
+ if (\strlen($pattern) === $i = strcspn($pattern, '*?{[')) {
+ $prefix = $pattern;
+ $pattern = '';
+ } elseif (0 === $i || false === strpos(substr($pattern, 0, $i), '/')) {
+ $prefix = '.';
+ $pattern = '/'.$pattern;
+ } else {
+ $prefix = \dirname(substr($pattern, 0, 1 + $i));
+ $pattern = substr($pattern, \strlen($prefix));
+ }
+
+ try {
+ $prefix = $this->locator->locate($prefix, $this->currentDir, true);
+ } catch (FileLocatorFileNotFoundException $e) {
+ if (!$ignoreErrors) {
+ throw $e;
+ }
+
+ $resource = [];
+ foreach ($e->getPaths() as $path) {
+ $resource[] = new FileExistenceResource($path);
+ }
+
+ return;
+ }
+ $resource = new GlobResource($prefix, $pattern, $recursive);
+
+ foreach ($resource as $path => $info) {
+ yield $path => $info;
+ }
+ }
+
+ private function doImport($resource, $type = null, $ignoreErrors = false, $sourceResource = null)
+ {
+ try {
+ $loader = $this->resolve($resource, $type);
+
+ if ($loader instanceof self && null !== $this->currentDir) {
+ $resource = $loader->getLocator()->locate($resource, $this->currentDir, false);
+ }
+
+ $resources = \is_array($resource) ? $resource : [$resource];
+ for ($i = 0; $i < $resourcesCount = \count($resources); ++$i) {
+ if (isset(self::$loading[$resources[$i]])) {
+ if ($i == $resourcesCount - 1) {
+ throw new FileLoaderImportCircularReferenceException(array_keys(self::$loading));
+ }
+ } else {
+ $resource = $resources[$i];
+ break;
+ }
+ }
+ self::$loading[$resource] = true;
+
+ try {
+ $ret = $loader->load($resource, $type);
+ } finally {
+ unset(self::$loading[$resource]);
+ }
+
+ return $ret;
+ } catch (FileLoaderImportCircularReferenceException $e) {
+ throw $e;
+ } catch (\Exception $e) {
+ if (!$ignoreErrors) {
+ // prevent embedded imports from nesting multiple exceptions
+ if ($e instanceof FileLoaderLoadException) {
+ throw $e;
+ }
+
+ throw new FileLoaderLoadException($resource, $sourceResource, null, $e, $type);
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/GlobFileLoader.php b/modules/empikmarketplace/vendor/symfony/config/Loader/GlobFileLoader.php
new file mode 100644
index 00000000..f432b45b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/GlobFileLoader.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+/**
+ * GlobFileLoader loads files from a glob pattern.
+ *
+ * @author Fabien Potencier
+ */
+class GlobFileLoader extends FileLoader
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function load($resource, $type = null)
+ {
+ return $this->import($resource);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports($resource, $type = null)
+ {
+ return 'glob' === $type;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/Loader.php b/modules/empikmarketplace/vendor/symfony/config/Loader/Loader.php
new file mode 100644
index 00000000..d2f2ec90
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/Loader.php
@@ -0,0 +1,78 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+use Symfony\Component\Config\Exception\FileLoaderLoadException;
+
+/**
+ * Loader is the abstract class used by all built-in loaders.
+ *
+ * @author Fabien Potencier
+ */
+abstract class Loader implements LoaderInterface
+{
+ protected $resolver;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getResolver()
+ {
+ return $this->resolver;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setResolver(LoaderResolverInterface $resolver)
+ {
+ $this->resolver = $resolver;
+ }
+
+ /**
+ * Imports a resource.
+ *
+ * @param mixed $resource A resource
+ * @param string|null $type The resource type or null if unknown
+ *
+ * @return mixed
+ */
+ public function import($resource, $type = null)
+ {
+ return $this->resolve($resource, $type)->load($resource, $type);
+ }
+
+ /**
+ * Finds a loader able to load an imported resource.
+ *
+ * @param mixed $resource A resource
+ * @param string|null $type The resource type or null if unknown
+ *
+ * @return $this|LoaderInterface
+ *
+ * @throws FileLoaderLoadException If no loader is found
+ */
+ public function resolve($resource, $type = null)
+ {
+ if ($this->supports($resource, $type)) {
+ return $this;
+ }
+
+ $loader = null === $this->resolver ? false : $this->resolver->resolve($resource, $type);
+
+ if (false === $loader) {
+ throw new FileLoaderLoadException($resource, null, null, null, $type);
+ }
+
+ return $loader;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderInterface.php b/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderInterface.php
new file mode 100644
index 00000000..dfca9dd2
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderInterface.php
@@ -0,0 +1,52 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+/**
+ * LoaderInterface is the interface implemented by all loader classes.
+ *
+ * @author Fabien Potencier
+ */
+interface LoaderInterface
+{
+ /**
+ * Loads a resource.
+ *
+ * @param mixed $resource The resource
+ * @param string|null $type The resource type or null if unknown
+ *
+ * @throws \Exception If something went wrong
+ */
+ public function load($resource, $type = null);
+
+ /**
+ * Returns whether this class supports the given resource.
+ *
+ * @param mixed $resource A resource
+ * @param string|null $type The resource type or null if unknown
+ *
+ * @return bool True if this class supports the given resource, false otherwise
+ */
+ public function supports($resource, $type = null);
+
+ /**
+ * Gets the loader resolver.
+ *
+ * @return LoaderResolverInterface A LoaderResolverInterface instance
+ */
+ public function getResolver();
+
+ /**
+ * Sets the loader resolver.
+ */
+ public function setResolver(LoaderResolverInterface $resolver);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderResolver.php b/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderResolver.php
new file mode 100644
index 00000000..c99efda4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderResolver.php
@@ -0,0 +1,68 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+/**
+ * LoaderResolver selects a loader for a given resource.
+ *
+ * A resource can be anything (e.g. a full path to a config file or a Closure).
+ * Each loader determines whether it can load a resource and how.
+ *
+ * @author Fabien Potencier
+ */
+class LoaderResolver implements LoaderResolverInterface
+{
+ /**
+ * @var LoaderInterface[] An array of LoaderInterface objects
+ */
+ private $loaders = [];
+
+ /**
+ * @param LoaderInterface[] $loaders An array of loaders
+ */
+ public function __construct(array $loaders = [])
+ {
+ foreach ($loaders as $loader) {
+ $this->addLoader($loader);
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function resolve($resource, $type = null)
+ {
+ foreach ($this->loaders as $loader) {
+ if ($loader->supports($resource, $type)) {
+ return $loader;
+ }
+ }
+
+ return false;
+ }
+
+ public function addLoader(LoaderInterface $loader)
+ {
+ $this->loaders[] = $loader;
+ $loader->setResolver($this);
+ }
+
+ /**
+ * Returns the registered loaders.
+ *
+ * @return LoaderInterface[] An array of LoaderInterface instances
+ */
+ public function getLoaders()
+ {
+ return $this->loaders;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderResolverInterface.php b/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderResolverInterface.php
new file mode 100644
index 00000000..40f1a1a6
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Loader/LoaderResolverInterface.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Loader;
+
+/**
+ * LoaderResolverInterface selects a loader for a given resource.
+ *
+ * @author Fabien Potencier
+ */
+interface LoaderResolverInterface
+{
+ /**
+ * Returns a loader able to load the resource.
+ *
+ * @param mixed $resource A resource
+ * @param string|null $type The resource type or null if unknown
+ *
+ * @return LoaderInterface|false The loader or false if none is able to load the resource
+ */
+ public function resolve($resource, $type = null);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/README.md b/modules/empikmarketplace/vendor/symfony/config/README.md
new file mode 100644
index 00000000..0bbde552
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/README.md
@@ -0,0 +1,15 @@
+Config Component
+================
+
+The Config component provides several classes to help you find, load, combine,
+autofill and validate configuration values of any kind, whatever their source
+may be (YAML, XML, INI files, or for instance a database).
+
+Resources
+---------
+
+ * [Documentation](https://symfony.com/doc/current/components/config.html)
+ * [Contributing](https://symfony.com/doc/current/contributing/index.html)
+ * [Report issues](https://github.com/symfony/symfony/issues) and
+ [send Pull Requests](https://github.com/symfony/symfony/pulls)
+ in the [main Symfony repository](https://github.com/symfony/symfony)
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/ClassExistenceResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/ClassExistenceResource.php
new file mode 100644
index 00000000..f58d2a6d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/ClassExistenceResource.php
@@ -0,0 +1,238 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * ClassExistenceResource represents a class existence.
+ * Freshness is only evaluated against resource existence.
+ *
+ * The resource must be a fully-qualified class name.
+ *
+ * @author Fabien Potencier
+ */
+class ClassExistenceResource implements SelfCheckingResourceInterface, \Serializable
+{
+ private $resource;
+ private $exists;
+
+ private static $autoloadLevel = 0;
+ private static $autoloadedClass;
+ private static $existsCache = [];
+
+ /**
+ * @param string $resource The fully-qualified class name
+ * @param bool|null $exists Boolean when the existency check has already been done
+ */
+ public function __construct($resource, $exists = null)
+ {
+ $this->resource = $resource;
+ if (null !== $exists) {
+ $this->exists = [(bool) $exists, null];
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * @return string The file path to the resource
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws \ReflectionException when a parent class/interface/trait is not found
+ */
+ public function isFresh($timestamp)
+ {
+ $loaded = class_exists($this->resource, false) || interface_exists($this->resource, false) || trait_exists($this->resource, false);
+
+ if (null !== $exists = &self::$existsCache[$this->resource]) {
+ if ($loaded) {
+ $exists = [true, null];
+ } elseif (0 >= $timestamp && !$exists[0] && null !== $exists[1]) {
+ throw new \ReflectionException($exists[1]);
+ }
+ } elseif ([false, null] === $exists = [$loaded, null]) {
+ if (!self::$autoloadLevel++) {
+ spl_autoload_register(__CLASS__.'::throwOnRequiredClass');
+ }
+ $autoloadedClass = self::$autoloadedClass;
+ self::$autoloadedClass = ltrim($this->resource, '\\');
+
+ try {
+ $exists[0] = class_exists($this->resource) || interface_exists($this->resource, false) || trait_exists($this->resource, false);
+ } catch (\Exception $e) {
+ $exists[1] = $e->getMessage();
+
+ try {
+ self::throwOnRequiredClass($this->resource, $e);
+ } catch (\ReflectionException $e) {
+ if (0 >= $timestamp) {
+ throw $e;
+ }
+ }
+ } catch (\Throwable $e) {
+ $exists[1] = $e->getMessage();
+
+ throw $e;
+ } finally {
+ self::$autoloadedClass = $autoloadedClass;
+ if (!--self::$autoloadLevel) {
+ spl_autoload_unregister(__CLASS__.'::throwOnRequiredClass');
+ }
+ }
+ }
+
+ if (null === $this->exists) {
+ $this->exists = $exists;
+ }
+
+ return $this->exists[0] xor !$exists[0];
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ if (null === $this->exists) {
+ $this->isFresh(0);
+ }
+
+ return serialize([$this->resource, $this->exists]);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ list($this->resource, $this->exists) = unserialize($serialized);
+
+ if (\is_bool($this->exists)) {
+ $this->exists = [$this->exists, null];
+ }
+ }
+
+ /**
+ * Throws a reflection exception when the passed class does not exist but is required.
+ *
+ * A class is considered "not required" when it's loaded as part of a "class_exists" or similar check.
+ *
+ * This function can be used as an autoload function to throw a reflection
+ * exception if the class was not found by previous autoload functions.
+ *
+ * A previous exception can be passed. In this case, the class is considered as being
+ * required totally, so if it doesn't exist, a reflection exception is always thrown.
+ * If it exists, the previous exception is rethrown.
+ *
+ * @throws \ReflectionException
+ *
+ * @internal
+ */
+ public static function throwOnRequiredClass($class, \Exception $previous = null)
+ {
+ // If the passed class is the resource being checked, we shouldn't throw.
+ if (null === $previous && self::$autoloadedClass === $class) {
+ return;
+ }
+
+ if (class_exists($class, false) || interface_exists($class, false) || trait_exists($class, false)) {
+ if (null !== $previous) {
+ throw $previous;
+ }
+
+ return;
+ }
+
+ if ($previous instanceof \ReflectionException) {
+ throw $previous;
+ }
+
+ $message = sprintf('Class "%s" not found.', $class);
+
+ if (self::$autoloadedClass !== $class) {
+ $message = substr_replace($message, sprintf(' while loading "%s"', self::$autoloadedClass), -1, 0);
+ }
+
+ if (null !== $previous) {
+ $message = $previous->getMessage();
+ }
+
+ $e = new \ReflectionException($message, 0, $previous);
+
+ if (null !== $previous) {
+ throw $e;
+ }
+
+ $trace = debug_backtrace();
+ $autoloadFrame = [
+ 'function' => 'spl_autoload_call',
+ 'args' => [$class],
+ ];
+
+ if (\PHP_VERSION_ID >= 80000 && isset($trace[1])) {
+ $callerFrame = $trace[1];
+ $i = 2;
+ } elseif (false !== $i = array_search($autoloadFrame, $trace, true)) {
+ $callerFrame = $trace[++$i];
+ } else {
+ throw $e;
+ }
+
+ if (isset($callerFrame['function']) && !isset($callerFrame['class'])) {
+ switch ($callerFrame['function']) {
+ case 'get_class_methods':
+ case 'get_class_vars':
+ case 'get_parent_class':
+ case 'is_a':
+ case 'is_subclass_of':
+ case 'class_exists':
+ case 'class_implements':
+ case 'class_parents':
+ case 'trait_exists':
+ case 'defined':
+ case 'interface_exists':
+ case 'method_exists':
+ case 'property_exists':
+ case 'is_callable':
+ return;
+ }
+
+ $props = [
+ 'file' => isset($callerFrame['file']) ? $callerFrame['file'] : null,
+ 'line' => isset($callerFrame['line']) ? $callerFrame['line'] : null,
+ 'trace' => \array_slice($trace, 1 + $i),
+ ];
+
+ foreach ($props as $p => $v) {
+ if (null !== $v) {
+ $r = new \ReflectionProperty('Exception', $p);
+ $r->setAccessible(true);
+ $r->setValue($e, $v);
+ }
+ }
+ }
+
+ throw $e;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/ComposerResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/ComposerResource.php
new file mode 100644
index 00000000..9fb304be
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/ComposerResource.php
@@ -0,0 +1,84 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * ComposerResource tracks the PHP version and Composer dependencies.
+ *
+ * @author Nicolas Grekas
+ */
+class ComposerResource implements SelfCheckingResourceInterface, \Serializable
+{
+ private $vendors;
+
+ private static $runtimeVendors;
+
+ public function __construct()
+ {
+ self::refresh();
+ $this->vendors = self::$runtimeVendors;
+ }
+
+ public function getVendors()
+ {
+ return array_keys($this->vendors);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return __CLASS__;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isFresh($timestamp)
+ {
+ self::refresh();
+
+ return array_values(self::$runtimeVendors) === array_values($this->vendors);
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ return serialize($this->vendors);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ $this->vendors = unserialize($serialized);
+ }
+
+ private static function refresh()
+ {
+ self::$runtimeVendors = [];
+
+ foreach (get_declared_classes() as $class) {
+ if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
+ $r = new \ReflectionClass($class);
+ $v = \dirname(\dirname($r->getFileName()));
+ if (file_exists($v.'/composer/installed.json')) {
+ self::$runtimeVendors[$v] = @filemtime($v.'/composer/installed.json');
+ }
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/DirectoryResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/DirectoryResource.php
new file mode 100644
index 00000000..e79b19ec
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/DirectoryResource.php
@@ -0,0 +1,122 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * DirectoryResource represents a resources stored in a subdirectory tree.
+ *
+ * @author Fabien Potencier
+ */
+class DirectoryResource implements SelfCheckingResourceInterface, \Serializable
+{
+ private $resource;
+ private $pattern;
+
+ /**
+ * @param string $resource The file path to the resource
+ * @param string|null $pattern A pattern to restrict monitored files
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct($resource, $pattern = null)
+ {
+ $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false);
+ $this->pattern = $pattern;
+
+ if (false === $this->resource || !is_dir($this->resource)) {
+ throw new \InvalidArgumentException(sprintf('The directory "%s" does not exist.', $resource));
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return md5(serialize([$this->resource, $this->pattern]));
+ }
+
+ /**
+ * @return string The file path to the resource
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * Returns the pattern to restrict monitored files.
+ *
+ * @return string|null
+ */
+ public function getPattern()
+ {
+ return $this->pattern;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isFresh($timestamp)
+ {
+ if (!is_dir($this->resource)) {
+ return false;
+ }
+
+ if ($timestamp < filemtime($this->resource)) {
+ return false;
+ }
+
+ foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->resource), \RecursiveIteratorIterator::SELF_FIRST) as $file) {
+ // if regex filtering is enabled only check matching files
+ if ($this->pattern && $file->isFile() && !preg_match($this->pattern, $file->getBasename())) {
+ continue;
+ }
+
+ // always monitor directories for changes, except the .. entries
+ // (otherwise deleted files wouldn't get detected)
+ if ($file->isDir() && '/..' === substr($file, -3)) {
+ continue;
+ }
+
+ // for broken links
+ try {
+ $fileMTime = $file->getMTime();
+ } catch (\RuntimeException $e) {
+ continue;
+ }
+
+ // early return if a file's mtime exceeds the passed timestamp
+ if ($timestamp < $fileMTime) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ return serialize([$this->resource, $this->pattern]);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ list($this->resource, $this->pattern) = unserialize($serialized);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/FileExistenceResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/FileExistenceResource.php
new file mode 100644
index 00000000..34047651
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/FileExistenceResource.php
@@ -0,0 +1,76 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * FileExistenceResource represents a resource stored on the filesystem.
+ * Freshness is only evaluated against resource creation or deletion.
+ *
+ * The resource can be a file or a directory.
+ *
+ * @author Charles-Henri Bruyand
+ */
+class FileExistenceResource implements SelfCheckingResourceInterface, \Serializable
+{
+ private $resource;
+
+ private $exists;
+
+ /**
+ * @param string $resource The file path to the resource
+ */
+ public function __construct($resource)
+ {
+ $this->resource = (string) $resource;
+ $this->exists = file_exists($resource);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * @return string The file path to the resource
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isFresh($timestamp)
+ {
+ return file_exists($this->resource) === $this->exists;
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ return serialize([$this->resource, $this->exists]);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ list($this->resource, $this->exists) = unserialize($serialized);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/FileResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/FileResource.php
new file mode 100644
index 00000000..bee06237
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/FileResource.php
@@ -0,0 +1,81 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * FileResource represents a resource stored on the filesystem.
+ *
+ * The resource can be a file or a directory.
+ *
+ * @author Fabien Potencier
+ */
+class FileResource implements SelfCheckingResourceInterface, \Serializable
+{
+ /**
+ * @var string|false
+ */
+ private $resource;
+
+ /**
+ * @param string $resource The file path to the resource
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct($resource)
+ {
+ $this->resource = realpath($resource) ?: (file_exists($resource) ? $resource : false);
+
+ if (false === $this->resource) {
+ throw new \InvalidArgumentException(sprintf('The file "%s" does not exist.', $resource));
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * @return string The canonicalized, absolute path to the resource
+ */
+ public function getResource()
+ {
+ return $this->resource;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isFresh($timestamp)
+ {
+ return false !== ($filemtime = @filemtime($this->resource)) && $filemtime <= $timestamp;
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ return serialize($this->resource);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ $this->resource = unserialize($serialized);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/GlobResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/GlobResource.php
new file mode 100644
index 00000000..1aa3bcf6
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/GlobResource.php
@@ -0,0 +1,159 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Finder\Glob;
+
+/**
+ * GlobResource represents a set of resources stored on the filesystem.
+ *
+ * Only existence/removal is tracked (not mtimes.)
+ *
+ * @author Nicolas Grekas
+ */
+class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface, \Serializable
+{
+ private $prefix;
+ private $pattern;
+ private $recursive;
+ private $hash;
+
+ /**
+ * @param string $prefix A directory prefix
+ * @param string $pattern A glob pattern
+ * @param bool $recursive Whether directories should be scanned recursively or not
+ *
+ * @throws \InvalidArgumentException
+ */
+ public function __construct($prefix, $pattern, $recursive)
+ {
+ $this->prefix = realpath($prefix) ?: (file_exists($prefix) ? $prefix : false);
+ $this->pattern = $pattern;
+ $this->recursive = $recursive;
+
+ if (false === $this->prefix) {
+ throw new \InvalidArgumentException(sprintf('The path "%s" does not exist.', $prefix));
+ }
+ }
+
+ public function getPrefix()
+ {
+ return $this->prefix;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return 'glob.'.$this->prefix.$this->pattern.(int) $this->recursive;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function isFresh($timestamp)
+ {
+ $hash = $this->computeHash();
+
+ if (null === $this->hash) {
+ $this->hash = $hash;
+ }
+
+ return $this->hash === $hash;
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ if (null === $this->hash) {
+ $this->hash = $this->computeHash();
+ }
+
+ return serialize([$this->prefix, $this->pattern, $this->recursive, $this->hash]);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ list($this->prefix, $this->pattern, $this->recursive, $this->hash) = unserialize($serialized);
+ }
+
+ public function getIterator()
+ {
+ if (!file_exists($this->prefix) || (!$this->recursive && '' === $this->pattern)) {
+ return;
+ }
+
+ if (0 !== strpos($this->prefix, 'phar://') && false === strpos($this->pattern, '/**/') && (\defined('GLOB_BRACE') || false === strpos($this->pattern, '{'))) {
+ $paths = glob($this->prefix.$this->pattern, \GLOB_NOSORT | (\defined('GLOB_BRACE') ? \GLOB_BRACE : 0));
+ sort($paths);
+ foreach ($paths as $path) {
+ if ($this->recursive && is_dir($path)) {
+ $files = iterator_to_array(new \RecursiveIteratorIterator(
+ new \RecursiveCallbackFilterIterator(
+ new \RecursiveDirectoryIterator($path, \FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS),
+ function (\SplFileInfo $file) { return '.' !== $file->getBasename()[0]; }
+ ),
+ \RecursiveIteratorIterator::LEAVES_ONLY
+ ));
+ uasort($files, function (\SplFileInfo $a, \SplFileInfo $b) {
+ return (string) $a > (string) $b ? 1 : -1;
+ });
+
+ foreach ($files as $path => $info) {
+ if ($info->isFile()) {
+ yield $path => $info;
+ }
+ }
+ } elseif (is_file($path)) {
+ yield $path => new \SplFileInfo($path);
+ }
+ }
+
+ return;
+ }
+
+ if (!class_exists(Finder::class)) {
+ throw new \LogicException(sprintf('Extended glob pattern "%s" cannot be used as the Finder component is not installed.', $this->pattern));
+ }
+
+ $finder = new Finder();
+ $regex = Glob::toRegex($this->pattern);
+ if ($this->recursive) {
+ $regex = substr_replace($regex, '(/|$)', -2, 1);
+ }
+
+ $prefixLen = \strlen($this->prefix);
+ foreach ($finder->followLinks()->sortByName()->in($this->prefix) as $path => $info) {
+ if (preg_match($regex, substr('\\' === \DIRECTORY_SEPARATOR ? str_replace('\\', '/', $path) : $path, $prefixLen)) && $info->isFile()) {
+ yield $path => $info;
+ }
+ }
+ }
+
+ private function computeHash()
+ {
+ $hash = hash_init('md5');
+
+ foreach ($this->getIterator() as $path => $info) {
+ hash_update($hash, $path."\n");
+ }
+
+ return hash_final($hash);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/ReflectionClassResource.php b/modules/empikmarketplace/vendor/symfony/config/Resource/ReflectionClassResource.php
new file mode 100644
index 00000000..79b21fbf
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/ReflectionClassResource.php
@@ -0,0 +1,256 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+/**
+ * @author Nicolas Grekas
+ */
+class ReflectionClassResource implements SelfCheckingResourceInterface, \Serializable
+{
+ private $files = [];
+ private $className;
+ private $classReflector;
+ private $excludedVendors = [];
+ private $hash;
+
+ public function __construct(\ReflectionClass $classReflector, $excludedVendors = [])
+ {
+ $this->className = $classReflector->name;
+ $this->classReflector = $classReflector;
+ $this->excludedVendors = $excludedVendors;
+ }
+
+ public function isFresh($timestamp)
+ {
+ if (null === $this->hash) {
+ $this->hash = $this->computeHash();
+ $this->loadFiles($this->classReflector);
+ }
+
+ foreach ($this->files as $file => $v) {
+ if (false === $filemtime = @filemtime($file)) {
+ return false;
+ }
+
+ if ($filemtime > $timestamp) {
+ return $this->hash === $this->computeHash();
+ }
+ }
+
+ return true;
+ }
+
+ public function __toString()
+ {
+ return 'reflection.'.$this->className;
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ if (null === $this->hash) {
+ $this->hash = $this->computeHash();
+ $this->loadFiles($this->classReflector);
+ }
+
+ return serialize([$this->files, $this->className, $this->hash]);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ list($this->files, $this->className, $this->hash) = unserialize($serialized);
+ }
+
+ private function loadFiles(\ReflectionClass $class)
+ {
+ foreach ($class->getInterfaces() as $v) {
+ $this->loadFiles($v);
+ }
+ do {
+ $file = $class->getFileName();
+ if (false !== $file && file_exists($file)) {
+ foreach ($this->excludedVendors as $vendor) {
+ if (0 === strpos($file, $vendor) && false !== strpbrk(substr($file, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) {
+ $file = false;
+ break;
+ }
+ }
+ if ($file) {
+ $this->files[$file] = null;
+ }
+ }
+ foreach ($class->getTraits() as $v) {
+ $this->loadFiles($v);
+ }
+ } while ($class = $class->getParentClass());
+ }
+
+ private function computeHash()
+ {
+ if (null === $this->classReflector) {
+ try {
+ $this->classReflector = new \ReflectionClass($this->className);
+ } catch (\ReflectionException $e) {
+ // the class does not exist anymore
+ return false;
+ }
+ }
+ $hash = hash_init('md5');
+
+ foreach ($this->generateSignature($this->classReflector) as $info) {
+ hash_update($hash, $info);
+ }
+
+ return hash_final($hash);
+ }
+
+ private function generateSignature(\ReflectionClass $class)
+ {
+ yield $class->getDocComment();
+ yield (int) $class->isFinal();
+ yield (int) $class->isAbstract();
+
+ if ($class->isTrait()) {
+ yield print_r(class_uses($class->name), true);
+ } else {
+ yield print_r(class_parents($class->name), true);
+ yield print_r(class_implements($class->name), true);
+ yield print_r($class->getConstants(), true);
+ }
+
+ if (!$class->isInterface()) {
+ $defaults = $class->getDefaultProperties();
+
+ foreach ($class->getProperties(\ReflectionProperty::IS_PUBLIC | \ReflectionProperty::IS_PROTECTED) as $p) {
+ yield $p->getDocComment();
+ yield $p->isDefault() ? '' : '';
+ yield $p->isPublic() ? 'public' : 'protected';
+ yield $p->isStatic() ? 'static' : '';
+ yield '$'.$p->name;
+ yield print_r(isset($defaults[$p->name]) && !\is_object($defaults[$p->name]) ? $defaults[$p->name] : null, true);
+ }
+ }
+
+ if (\defined('HHVM_VERSION')) {
+ foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) {
+ // workaround HHVM bug with variadics, see https://github.com/facebook/hhvm/issues/5762
+ yield preg_replace('/^ @@.*/m', '', new ReflectionMethodHhvmWrapper($m->class, $m->name));
+ }
+ } else {
+ foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC | \ReflectionMethod::IS_PROTECTED) as $m) {
+ $defaults = [];
+ $parametersWithUndefinedConstants = [];
+ foreach ($m->getParameters() as $p) {
+ if (!$p->isDefaultValueAvailable()) {
+ $defaults[$p->name] = null;
+
+ continue;
+ }
+
+ if (!$p->isDefaultValueConstant() || \defined($p->getDefaultValueConstantName())) {
+ $defaults[$p->name] = $p->getDefaultValue();
+
+ continue;
+ }
+
+ $defaults[$p->name] = $p->getDefaultValueConstantName();
+ $parametersWithUndefinedConstants[$p->name] = true;
+ }
+
+ if (!$parametersWithUndefinedConstants) {
+ yield preg_replace('/^ @@.*/m', '', $m);
+ } else {
+ $t = \PHP_VERSION_ID >= 70000 ? $m->getReturnType() : '';
+ $stack = [
+ $m->getDocComment(),
+ $m->getName(),
+ $m->isAbstract(),
+ $m->isFinal(),
+ $m->isStatic(),
+ $m->isPublic(),
+ $m->isPrivate(),
+ $m->isProtected(),
+ $m->returnsReference(),
+ $t instanceof \ReflectionNamedType ? ((string) $t->allowsNull()).$t->getName() : (string) $t,
+ ];
+
+ foreach ($m->getParameters() as $p) {
+ if (!isset($parametersWithUndefinedConstants[$p->name])) {
+ $stack[] = (string) $p;
+ } else {
+ $t = \PHP_VERSION_ID >= 70000 ? $p->getType() : '';
+ $stack[] = $p->isOptional();
+ $stack[] = $t instanceof \ReflectionNamedType ? ((string) $t->allowsNull()).$t->getName() : (string) $t;
+ $stack[] = $p->isPassedByReference();
+ $stack[] = \PHP_VERSION_ID >= 50600 ? $p->isVariadic() : '';
+ $stack[] = $p->getName();
+ }
+ }
+
+ yield implode(',', $stack);
+ }
+
+ yield print_r($defaults, true);
+ }
+ }
+
+ if ($class->isAbstract() || $class->isInterface() || $class->isTrait()) {
+ return;
+ }
+
+ if (interface_exists(EventSubscriberInterface::class, false) && $class->isSubclassOf(EventSubscriberInterface::class)) {
+ yield EventSubscriberInterface::class;
+ yield print_r(\call_user_func([$class->name, 'getSubscribedEvents']), true);
+ }
+
+ if (interface_exists(ServiceSubscriberInterface::class, false) && $class->isSubclassOf(ServiceSubscriberInterface::class)) {
+ yield ServiceSubscriberInterface::class;
+ yield print_r(\call_user_func([$class->name, 'getSubscribedServices']), true);
+ }
+ }
+}
+
+/**
+ * @internal
+ */
+class ReflectionMethodHhvmWrapper extends \ReflectionMethod
+{
+ public function getParameters()
+ {
+ $params = [];
+
+ foreach (parent::getParameters() as $i => $p) {
+ $params[] = new ReflectionParameterHhvmWrapper([$this->class, $this->name], $i);
+ }
+
+ return $params;
+ }
+}
+
+/**
+ * @internal
+ */
+class ReflectionParameterHhvmWrapper extends \ReflectionParameter
+{
+ public function getDefaultValue()
+ {
+ return [$this->isVariadic(), $this->isDefaultValueAvailable() ? parent::getDefaultValue() : null];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/ResourceInterface.php b/modules/empikmarketplace/vendor/symfony/config/Resource/ResourceInterface.php
new file mode 100644
index 00000000..d98fd427
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/ResourceInterface.php
@@ -0,0 +1,33 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * ResourceInterface is the interface that must be implemented by all Resource classes.
+ *
+ * @author Fabien Potencier
+ */
+interface ResourceInterface
+{
+ /**
+ * Returns a string representation of the Resource.
+ *
+ * This method is necessary to allow for resource de-duplication, for example by means
+ * of array_unique(). The string returned need not have a particular meaning, but has
+ * to be identical for different ResourceInterface instances referring to the same
+ * resource; and it should be unlikely to collide with that of other, unrelated
+ * resource instances.
+ *
+ * @return string A string representation unique to the underlying Resource
+ */
+ public function __toString();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php b/modules/empikmarketplace/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php
new file mode 100644
index 00000000..d72203bc
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/SelfCheckingResourceChecker.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+use Symfony\Component\Config\ResourceCheckerInterface;
+
+/**
+ * Resource checker for instances of SelfCheckingResourceInterface.
+ *
+ * As these resources perform the actual check themselves, we can provide
+ * this class as a standard way of validating them.
+ *
+ * @author Matthias Pigulla
+ */
+class SelfCheckingResourceChecker implements ResourceCheckerInterface
+{
+ public function supports(ResourceInterface $metadata)
+ {
+ return $metadata instanceof SelfCheckingResourceInterface;
+ }
+
+ public function isFresh(ResourceInterface $resource, $timestamp)
+ {
+ /* @var SelfCheckingResourceInterface $resource */
+ return $resource->isFresh($timestamp);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php b/modules/empikmarketplace/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php
new file mode 100644
index 00000000..b3260f2b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Resource/SelfCheckingResourceInterface.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Resource;
+
+/**
+ * Interface for Resources that can check for freshness autonomously,
+ * without special support from external services.
+ *
+ * @author Matthias Pigulla
+ */
+interface SelfCheckingResourceInterface extends ResourceInterface
+{
+ /**
+ * Returns true if the resource has not been updated since the given timestamp.
+ *
+ * @param int $timestamp The last time the resource was loaded
+ *
+ * @return bool True if the resource has not been updated, false otherwise
+ */
+ public function isFresh($timestamp);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerConfigCache.php b/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerConfigCache.php
new file mode 100644
index 00000000..0538f3f4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerConfigCache.php
@@ -0,0 +1,183 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+use Symfony\Component\Config\Resource\ResourceInterface;
+use Symfony\Component\Filesystem\Exception\IOException;
+use Symfony\Component\Filesystem\Filesystem;
+
+/**
+ * ResourceCheckerConfigCache uses instances of ResourceCheckerInterface
+ * to check whether cached data is still fresh.
+ *
+ * @author Matthias Pigulla
+ */
+class ResourceCheckerConfigCache implements ConfigCacheInterface
+{
+ /**
+ * @var string
+ */
+ private $file;
+
+ /**
+ * @var iterable|ResourceCheckerInterface[]
+ */
+ private $resourceCheckers;
+
+ /**
+ * @param string $file The absolute cache path
+ * @param iterable|ResourceCheckerInterface[] $resourceCheckers The ResourceCheckers to use for the freshness check
+ */
+ public function __construct($file, $resourceCheckers = [])
+ {
+ $this->file = $file;
+ $this->resourceCheckers = $resourceCheckers;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPath()
+ {
+ return $this->file;
+ }
+
+ /**
+ * Checks if the cache is still fresh.
+ *
+ * This implementation will make a decision solely based on the ResourceCheckers
+ * passed in the constructor.
+ *
+ * The first ResourceChecker that supports a given resource is considered authoritative.
+ * Resources with no matching ResourceChecker will silently be ignored and considered fresh.
+ *
+ * @return bool true if the cache is fresh, false otherwise
+ */
+ public function isFresh()
+ {
+ if (!is_file($this->file)) {
+ return false;
+ }
+
+ if ($this->resourceCheckers instanceof \Traversable && !$this->resourceCheckers instanceof \Countable) {
+ $this->resourceCheckers = iterator_to_array($this->resourceCheckers);
+ }
+
+ if (!\count($this->resourceCheckers)) {
+ return true; // shortcut - if we don't have any checkers we don't need to bother with the meta file at all
+ }
+
+ $metadata = $this->getMetaFile();
+
+ if (!is_file($metadata)) {
+ return false;
+ }
+
+ $meta = $this->safelyUnserialize($metadata);
+
+ if (false === $meta) {
+ return false;
+ }
+
+ $time = filemtime($this->file);
+
+ foreach ($meta as $resource) {
+ /* @var ResourceInterface $resource */
+ foreach ($this->resourceCheckers as $checker) {
+ if (!$checker->supports($resource)) {
+ continue; // next checker
+ }
+ if ($checker->isFresh($resource, $time)) {
+ break; // no need to further check this resource
+ }
+
+ return false; // cache is stale
+ }
+ // no suitable checker found, ignore this resource
+ }
+
+ return true;
+ }
+
+ /**
+ * Writes cache.
+ *
+ * @param string $content The content to write in the cache
+ * @param ResourceInterface[] $metadata An array of metadata
+ *
+ * @throws \RuntimeException When cache file can't be written
+ */
+ public function write($content, array $metadata = null)
+ {
+ $mode = 0666;
+ $umask = umask();
+ $filesystem = new Filesystem();
+ $filesystem->dumpFile($this->file, $content);
+ try {
+ $filesystem->chmod($this->file, $mode, $umask);
+ } catch (IOException $e) {
+ // discard chmod failure (some filesystem may not support it)
+ }
+
+ if (null !== $metadata) {
+ $filesystem->dumpFile($this->getMetaFile(), serialize($metadata));
+ try {
+ $filesystem->chmod($this->getMetaFile(), $mode, $umask);
+ } catch (IOException $e) {
+ // discard chmod failure (some filesystem may not support it)
+ }
+ }
+
+ if (\function_exists('opcache_invalidate') && filter_var(ini_get('opcache.enable'), \FILTER_VALIDATE_BOOLEAN)) {
+ @opcache_invalidate($this->file, true);
+ }
+ }
+
+ /**
+ * Gets the meta file path.
+ *
+ * @return string The meta file path
+ */
+ private function getMetaFile()
+ {
+ return $this->file.'.meta';
+ }
+
+ private function safelyUnserialize($file)
+ {
+ $e = null;
+ $meta = false;
+ $content = file_get_contents($file);
+ $signalingException = new \UnexpectedValueException();
+ $prevUnserializeHandler = ini_set('unserialize_callback_func', '');
+ $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) {
+ if (__FILE__ === $file) {
+ throw $signalingException;
+ }
+
+ return $prevErrorHandler ? $prevErrorHandler($type, $msg, $file, $line, $context) : false;
+ });
+
+ try {
+ $meta = unserialize($content);
+ } catch (\Error $e) {
+ } catch (\Exception $e) {
+ }
+ restore_error_handler();
+ ini_set('unserialize_callback_func', $prevUnserializeHandler);
+ if (null !== $e && $e !== $signalingException) {
+ throw $e;
+ }
+
+ return $meta;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php b/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php
new file mode 100644
index 00000000..c00fa7db
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerConfigCacheFactory.php
@@ -0,0 +1,48 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+/**
+ * A ConfigCacheFactory implementation that validates the
+ * cache with an arbitrary set of ResourceCheckers.
+ *
+ * @author Matthias Pigulla
+ */
+class ResourceCheckerConfigCacheFactory implements ConfigCacheFactoryInterface
+{
+ private $resourceCheckers = [];
+
+ /**
+ * @param iterable|ResourceCheckerInterface[] $resourceCheckers
+ */
+ public function __construct($resourceCheckers = [])
+ {
+ $this->resourceCheckers = $resourceCheckers;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ 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)));
+ }
+
+ $cache = new ResourceCheckerConfigCache($file, $this->resourceCheckers);
+ if (!$cache->isFresh()) {
+ \call_user_func($callback, $cache);
+ }
+
+ return $cache;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerInterface.php b/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerInterface.php
new file mode 100644
index 00000000..612d7778
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/ResourceCheckerInterface.php
@@ -0,0 +1,48 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config;
+
+use Symfony\Component\Config\Resource\ResourceInterface;
+
+/**
+ * Interface for ResourceCheckers.
+ *
+ * When a ResourceCheckerConfigCache instance is checked for freshness, all its associated
+ * metadata resources are passed to ResourceCheckers. The ResourceCheckers
+ * can then inspect the resources and decide whether the cache can be considered
+ * fresh or not.
+ *
+ * @author Matthias Pigulla
+ * @author Benjamin Klotz
+ */
+interface ResourceCheckerInterface
+{
+ /**
+ * Queries the ResourceChecker whether it can validate a given
+ * resource or not.
+ *
+ * @param ResourceInterface $metadata The resource to be checked for freshness
+ *
+ * @return bool True if the ResourceChecker can handle this resource type, false if not
+ */
+ public function supports(ResourceInterface $metadata);
+
+ /**
+ * Validates the resource.
+ *
+ * @param ResourceInterface $resource The resource to be validated
+ * @param int $timestamp The timestamp at which the cache associated with this resource was created
+ *
+ * @return bool True if the resource has not changed since the given timestamp, false otherwise
+ */
+ public function isFresh(ResourceInterface $resource, $timestamp);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/ConfigCacheFactoryTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/ConfigCacheFactoryTest.php
new file mode 100644
index 00000000..6190b9b4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/ConfigCacheFactoryTest.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\ConfigCacheFactory;
+
+class ConfigCacheFactoryTest extends TestCase
+{
+ public function testCacheWithInvalidCallback()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('Invalid type for callback argument. Expected callable, but got "object".');
+ $cacheFactory = new ConfigCacheFactory(true);
+
+ $cacheFactory->cache('file', new \stdClass());
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/ConfigCacheTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/ConfigCacheTest.php
new file mode 100644
index 00000000..95a58817
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/ConfigCacheTest.php
@@ -0,0 +1,99 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\ConfigCache;
+use Symfony\Component\Config\Tests\Resource\ResourceStub;
+
+class ConfigCacheTest extends TestCase
+{
+ private $cacheFile = null;
+
+ protected function setUp()
+ {
+ $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);
+ }
+ }
+ }
+
+ /**
+ * @dataProvider debugModes
+ */
+ public function testCacheIsNotValidIfNothingHasBeenCached($debug)
+ {
+ unlink($this->cacheFile); // remove tempnam() side effect
+ $cache = new ConfigCache($this->cacheFile, $debug);
+
+ $this->assertFalse($cache->isFresh());
+ }
+
+ public function testIsAlwaysFreshInProduction()
+ {
+ $staleResource = new ResourceStub();
+ $staleResource->setFresh(false);
+
+ $cache = new ConfigCache($this->cacheFile, false);
+ $cache->write('', [$staleResource]);
+
+ $this->assertTrue($cache->isFresh());
+ }
+
+ /**
+ * @dataProvider debugModes
+ */
+ public function testIsFreshWhenNoResourceProvided($debug)
+ {
+ $cache = new ConfigCache($this->cacheFile, $debug);
+ $cache->write('', []);
+ $this->assertTrue($cache->isFresh());
+ }
+
+ public function testFreshResourceInDebug()
+ {
+ $freshResource = new ResourceStub();
+ $freshResource->setFresh(true);
+
+ $cache = new ConfigCache($this->cacheFile, true);
+ $cache->write('', [$freshResource]);
+
+ $this->assertTrue($cache->isFresh());
+ }
+
+ public function testStaleResourceInDebug()
+ {
+ $staleResource = new ResourceStub();
+ $staleResource->setFresh(false);
+
+ $cache = new ConfigCache($this->cacheFile, true);
+ $cache->write('', [$staleResource]);
+
+ $this->assertFalse($cache->isFresh());
+ }
+
+ public function debugModes()
+ {
+ return [
+ [true],
+ [false],
+ ];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/ArrayNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/ArrayNodeTest.php
new file mode 100644
index 00000000..f726e8dd
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/ArrayNodeTest.php
@@ -0,0 +1,237 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\ArrayNode;
+use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
+use Symfony\Component\Config\Definition\ScalarNode;
+
+class ArrayNodeTest extends TestCase
+{
+ public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
+ $node = new ArrayNode('root');
+ $node->normalize(false);
+ }
+
+ public function testExceptionThrownOnUnrecognizedChild()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('Unrecognized option "foo" under "root"');
+ $node = new ArrayNode('root');
+ $node->normalize(['foo' => 'bar']);
+ }
+
+ public function ignoreAndRemoveMatrixProvider()
+ {
+ $unrecognizedOptionException = new InvalidConfigurationException('Unrecognized option "foo" under "root"');
+
+ return [
+ [true, true, [], 'no exception is thrown for an unrecognized child if the ignoreExtraKeys option is set to true'],
+ [true, false, ['foo' => 'bar'], 'extra keys are not removed when ignoreExtraKeys second option is set to false'],
+ [false, true, $unrecognizedOptionException],
+ [false, false, $unrecognizedOptionException],
+ ];
+ }
+
+ /**
+ * @dataProvider ignoreAndRemoveMatrixProvider
+ */
+ public function testIgnoreAndRemoveBehaviors($ignore, $remove, $expected, $message = '')
+ {
+ if ($expected instanceof \Exception) {
+ $this->expectException(\get_class($expected));
+ $this->expectExceptionMessage($expected->getMessage());
+ }
+ $node = new ArrayNode('root');
+ $node->setIgnoreExtraKeys($ignore, $remove);
+ $result = $node->normalize(['foo' => 'bar']);
+ $this->assertSame($expected, $result, $message);
+ }
+
+ /**
+ * @dataProvider getPreNormalizationTests
+ */
+ public function testPreNormalize($denormalized, $normalized)
+ {
+ $node = new ArrayNode('foo');
+
+ $r = new \ReflectionMethod($node, 'preNormalize');
+ $r->setAccessible(true);
+
+ $this->assertSame($normalized, $r->invoke($node, $denormalized));
+ }
+
+ public function getPreNormalizationTests()
+ {
+ return [
+ [
+ ['foo-bar' => 'foo'],
+ ['foo_bar' => 'foo'],
+ ],
+ [
+ ['foo-bar_moo' => 'foo'],
+ ['foo-bar_moo' => 'foo'],
+ ],
+ [
+ ['anything-with-dash-and-no-underscore' => 'first', 'no_dash' => 'second'],
+ ['anything_with_dash_and_no_underscore' => 'first', 'no_dash' => 'second'],
+ ],
+ [
+ ['foo-bar' => null, 'foo_bar' => 'foo'],
+ ['foo-bar' => null, 'foo_bar' => 'foo'],
+ ],
+ ];
+ }
+
+ /**
+ * @dataProvider getZeroNamedNodeExamplesData
+ */
+ public function testNodeNameCanBeZero($denormalized, $normalized)
+ {
+ $zeroNode = new ArrayNode(0);
+ $zeroNode->addChild(new ScalarNode('name'));
+ $fiveNode = new ArrayNode(5);
+ $fiveNode->addChild(new ScalarNode(0));
+ $fiveNode->addChild(new ScalarNode('new_key'));
+ $rootNode = new ArrayNode('root');
+ $rootNode->addChild($zeroNode);
+ $rootNode->addChild($fiveNode);
+ $rootNode->addChild(new ScalarNode('string_key'));
+ $r = new \ReflectionMethod($rootNode, 'normalizeValue');
+ $r->setAccessible(true);
+
+ $this->assertSame($normalized, $r->invoke($rootNode, $denormalized));
+ }
+
+ public function getZeroNamedNodeExamplesData()
+ {
+ return [
+ [
+ [
+ 0 => [
+ 'name' => 'something',
+ ],
+ 5 => [
+ 0 => 'this won\'t work too',
+ 'new_key' => 'some other value',
+ ],
+ 'string_key' => 'just value',
+ ],
+ [
+ 0 => [
+ 'name' => 'something',
+ ],
+ 5 => [
+ 0 => 'this won\'t work too',
+ 'new_key' => 'some other value',
+ ],
+ 'string_key' => 'just value',
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * @dataProvider getPreNormalizedNormalizedOrderedData
+ */
+ public function testChildrenOrderIsMaintainedOnNormalizeValue($prenormalized, $normalized)
+ {
+ $scalar1 = new ScalarNode('1');
+ $scalar2 = new ScalarNode('2');
+ $scalar3 = new ScalarNode('3');
+ $node = new ArrayNode('foo');
+ $node->addChild($scalar1);
+ $node->addChild($scalar3);
+ $node->addChild($scalar2);
+
+ $r = new \ReflectionMethod($node, 'normalizeValue');
+ $r->setAccessible(true);
+
+ $this->assertSame($normalized, $r->invoke($node, $prenormalized));
+ }
+
+ public function getPreNormalizedNormalizedOrderedData()
+ {
+ return [
+ [
+ ['2' => 'two', '1' => 'one', '3' => 'three'],
+ ['2' => 'two', '1' => 'one', '3' => 'three'],
+ ],
+ ];
+ }
+
+ public function testAddChildEmptyName()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('Child nodes must be named.');
+ $node = new ArrayNode('root');
+
+ $childNode = new ArrayNode('');
+ $node->addChild($childNode);
+ }
+
+ public function testAddChildNameAlreadyExists()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('A child node named "foo" already exists.');
+ $node = new ArrayNode('root');
+
+ $childNode = new ArrayNode('foo');
+ $node->addChild($childNode);
+
+ $childNodeWithSameName = new ArrayNode('foo');
+ $node->addChild($childNodeWithSameName);
+ }
+
+ public function testGetDefaultValueWithoutDefaultValue()
+ {
+ $this->expectException('RuntimeException');
+ $this->expectExceptionMessage('The node at path "foo" has no default value.');
+ $node = new ArrayNode('foo');
+ $node->getDefaultValue();
+ }
+
+ public function testSetDeprecated()
+ {
+ $childNode = new ArrayNode('foo');
+ $childNode->setDeprecated('"%node%" is deprecated');
+
+ $this->assertTrue($childNode->isDeprecated());
+ $this->assertSame('"foo" is deprecated', $childNode->getDeprecationMessage($childNode->getName(), $childNode->getPath()));
+
+ $node = new ArrayNode('root');
+ $node->addChild($childNode);
+
+ $deprecationTriggered = false;
+ $deprecationHandler = function ($level, $message, $file, $line) use (&$prevErrorHandler, &$deprecationTriggered) {
+ if (\E_USER_DEPRECATED === $level) {
+ return $deprecationTriggered = true;
+ }
+
+ return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false;
+ };
+
+ $prevErrorHandler = set_error_handler($deprecationHandler);
+ $node->finalize([]);
+ restore_error_handler();
+
+ $this->assertFalse($deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set');
+
+ $prevErrorHandler = set_error_handler($deprecationHandler);
+ $node->finalize(['foo' => []]);
+ restore_error_handler();
+ $this->assertTrue($deprecationTriggered, '->finalize() should trigger if the deprecated node is set');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/BooleanNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/BooleanNodeTest.php
new file mode 100644
index 00000000..8552eeba
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/BooleanNodeTest.php
@@ -0,0 +1,74 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\BooleanNode;
+
+class BooleanNodeTest extends TestCase
+{
+ /**
+ * @dataProvider getValidValues
+ */
+ public function testNormalize($value)
+ {
+ $node = new BooleanNode('test');
+ $this->assertSame($value, $node->normalize($value));
+ }
+
+ /**
+ * @dataProvider getValidValues
+ *
+ * @param bool $value
+ */
+ public function testValidNonEmptyValues($value)
+ {
+ $node = new BooleanNode('test');
+ $node->setAllowEmptyValue(false);
+
+ $this->assertSame($value, $node->finalize($value));
+ }
+
+ public function getValidValues()
+ {
+ return [
+ [false],
+ [true],
+ ];
+ }
+
+ /**
+ * @dataProvider getInvalidValues
+ */
+ public function testNormalizeThrowsExceptionOnInvalidValues($value)
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
+ $node = new BooleanNode('test');
+ $node->normalize($value);
+ }
+
+ public function getInvalidValues()
+ {
+ return [
+ [null],
+ [''],
+ ['foo'],
+ [0],
+ [1],
+ [0.0],
+ [0.1],
+ [[]],
+ [['foo' => 'bar']],
+ [new \stdClass()],
+ ];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php
new file mode 100644
index 00000000..1123b415
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php
@@ -0,0 +1,362 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
+use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
+use Symfony\Component\Config\Definition\Exception\InvalidDefinitionException;
+use Symfony\Component\Config\Definition\Processor;
+
+class ArrayNodeDefinitionTest extends TestCase
+{
+ public function testAppendingSomeNode()
+ {
+ $parent = new ArrayNodeDefinition('root');
+ $child = new ScalarNodeDefinition('child');
+
+ $parent
+ ->children()
+ ->scalarNode('foo')->end()
+ ->scalarNode('bar')->end()
+ ->end()
+ ->append($child);
+
+ $this->assertCount(3, $this->getField($parent, 'children'));
+ $this->assertContains($child, $this->getField($parent, 'children'));
+ }
+
+ /**
+ * @dataProvider providePrototypeNodeSpecificCalls
+ */
+ public function testPrototypeNodeSpecificOption($method, $args)
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException');
+ $node = new ArrayNodeDefinition('root');
+
+ \call_user_func_array([$node, $method], $args);
+
+ $node->getNode();
+ }
+
+ public function providePrototypeNodeSpecificCalls()
+ {
+ return [
+ ['defaultValue', [[]]],
+ ['addDefaultChildrenIfNoneSet', []],
+ ['requiresAtLeastOneElement', []],
+ ['useAttributeAsKey', ['foo']],
+ ];
+ }
+
+ public function testConcreteNodeSpecificOption()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException');
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->addDefaultsIfNotSet()
+ ->prototype('array')
+ ;
+ $node->getNode();
+ }
+
+ public function testPrototypeNodesCantHaveADefaultValueWhenUsingDefaultChildren()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException');
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->defaultValue([])
+ ->addDefaultChildrenIfNoneSet('foo')
+ ->prototype('array')
+ ;
+ $node->getNode();
+ }
+
+ public function testPrototypedArrayNodeDefaultWhenUsingDefaultChildren()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->addDefaultChildrenIfNoneSet()
+ ->prototype('array')
+ ;
+ $tree = $node->getNode();
+ $this->assertEquals([[]], $tree->getDefaultValue());
+ }
+
+ /**
+ * @dataProvider providePrototypedArrayNodeDefaults
+ */
+ public function testPrototypedArrayNodeDefault($args, $shouldThrowWhenUsingAttrAsKey, $shouldThrowWhenNotUsingAttrAsKey, $defaults)
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->addDefaultChildrenIfNoneSet($args)
+ ->prototype('array')
+ ;
+
+ try {
+ $tree = $node->getNode();
+ $this->assertFalse($shouldThrowWhenNotUsingAttrAsKey);
+ $this->assertEquals($defaults, $tree->getDefaultValue());
+ } catch (InvalidDefinitionException $e) {
+ $this->assertTrue($shouldThrowWhenNotUsingAttrAsKey);
+ }
+
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->useAttributeAsKey('attr')
+ ->addDefaultChildrenIfNoneSet($args)
+ ->prototype('array')
+ ;
+
+ try {
+ $tree = $node->getNode();
+ $this->assertFalse($shouldThrowWhenUsingAttrAsKey);
+ $this->assertEquals($defaults, $tree->getDefaultValue());
+ } catch (InvalidDefinitionException $e) {
+ $this->assertTrue($shouldThrowWhenUsingAttrAsKey);
+ }
+ }
+
+ public function providePrototypedArrayNodeDefaults()
+ {
+ return [
+ [null, true, false, [[]]],
+ [2, true, false, [[], []]],
+ ['2', false, true, ['2' => []]],
+ ['foo', false, true, ['foo' => []]],
+ [['foo'], false, true, ['foo' => []]],
+ [['foo', 'bar'], false, true, ['foo' => [], 'bar' => []]],
+ ];
+ }
+
+ public function testNestedPrototypedArrayNodes()
+ {
+ $nodeDefinition = new ArrayNodeDefinition('root');
+ $nodeDefinition
+ ->addDefaultChildrenIfNoneSet()
+ ->prototype('array')
+ ->prototype('array')
+ ;
+ $node = $nodeDefinition->getNode();
+
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\PrototypedArrayNode', $node);
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\PrototypedArrayNode', $node->getPrototype());
+ }
+
+ public function testEnabledNodeDefaults()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->canBeEnabled()
+ ->children()
+ ->scalarNode('foo')->defaultValue('bar')->end()
+ ;
+
+ $this->assertEquals(['enabled' => false, 'foo' => 'bar'], $node->getNode()->getDefaultValue());
+ }
+
+ /**
+ * @dataProvider getEnableableNodeFixtures
+ */
+ public function testTrueEnableEnabledNode($expected, $config, $message)
+ {
+ $processor = new Processor();
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->canBeEnabled()
+ ->children()
+ ->scalarNode('foo')->defaultValue('bar')->end()
+ ;
+
+ $this->assertEquals(
+ $expected,
+ $processor->process($node->getNode(), $config),
+ $message
+ );
+ }
+
+ public function testCanBeDisabled()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node->canBeDisabled();
+
+ $this->assertTrue($this->getField($node, 'addDefaults'));
+ $this->assertEquals(['enabled' => false], $this->getField($node, 'falseEquivalent'));
+ $this->assertEquals(['enabled' => true], $this->getField($node, 'trueEquivalent'));
+ $this->assertEquals(['enabled' => true], $this->getField($node, 'nullEquivalent'));
+
+ $nodeChildren = $this->getField($node, 'children');
+ $this->assertArrayHasKey('enabled', $nodeChildren);
+
+ $enabledNode = $nodeChildren['enabled'];
+ $this->assertTrue($this->getField($enabledNode, 'default'));
+ $this->assertTrue($this->getField($enabledNode, 'defaultValue'));
+ }
+
+ public function testIgnoreExtraKeys()
+ {
+ $node = new ArrayNodeDefinition('root');
+
+ $this->assertFalse($this->getField($node, 'ignoreExtraKeys'));
+
+ $result = $node->ignoreExtraKeys();
+
+ $this->assertEquals($node, $result);
+ $this->assertTrue($this->getField($node, 'ignoreExtraKeys'));
+ }
+
+ public function testNormalizeKeys()
+ {
+ $node = new ArrayNodeDefinition('root');
+
+ $this->assertTrue($this->getField($node, 'normalizeKeys'));
+
+ $result = $node->normalizeKeys(false);
+
+ $this->assertEquals($node, $result);
+ $this->assertFalse($this->getField($node, 'normalizeKeys'));
+ }
+
+ public function testUnsetChild()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->children()
+ ->scalarNode('value')
+ ->beforeNormalization()
+ ->ifTrue(function ($value) {
+ return empty($value);
+ })
+ ->thenUnset()
+ ->end()
+ ->end()
+ ->end()
+ ;
+
+ $this->assertSame([], $node->getNode()->normalize(['value' => null]));
+ }
+
+ public function testPrototypeVariable()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('variable'), $node->variablePrototype());
+ }
+
+ public function testPrototypeScalar()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('scalar'), $node->scalarPrototype());
+ }
+
+ public function testPrototypeBoolean()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('boolean'), $node->booleanPrototype());
+ }
+
+ public function testPrototypeInteger()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('integer'), $node->integerPrototype());
+ }
+
+ public function testPrototypeFloat()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('float'), $node->floatPrototype());
+ }
+
+ public function testPrototypeArray()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('array'), $node->arrayPrototype());
+ }
+
+ public function testPrototypeEnum()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $this->assertEquals($node->prototype('enum'), $node->enumPrototype());
+ }
+
+ public function getEnableableNodeFixtures()
+ {
+ return [
+ [['enabled' => true, 'foo' => 'bar'], [true], 'true enables an enableable node'],
+ [['enabled' => true, 'foo' => 'bar'], [null], 'null enables an enableable node'],
+ [['enabled' => true, 'foo' => 'bar'], [['enabled' => true]], 'An enableable node can be enabled'],
+ [['enabled' => true, 'foo' => 'baz'], [['foo' => 'baz']], 'any configuration enables an enableable node'],
+ [['enabled' => false, 'foo' => 'baz'], [['foo' => 'baz', 'enabled' => false]], 'An enableable node can be disabled'],
+ [['enabled' => false, 'foo' => 'bar'], [false], 'false disables an enableable node'],
+ ];
+ }
+
+ public function testRequiresAtLeastOneElement()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->requiresAtLeastOneElement()
+ ->integerPrototype();
+
+ $node->getNode()->finalize([1]);
+
+ $this->addToAssertionCount(1);
+ }
+
+ /**
+ * @group legacy
+ * @expectedDeprecation Using Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition::cannotBeEmpty() at path "root" has no effect, consider requiresAtLeastOneElement() instead. In 4.0 both methods will behave the same.
+ */
+ public function testCannotBeEmpty()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->cannotBeEmpty()
+ ->integerPrototype();
+
+ $node->getNode()->finalize([]);
+ }
+
+ public function testSetDeprecated()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node
+ ->children()
+ ->arrayNode('foo')->setDeprecated('The "%path%" node is deprecated.')->end()
+ ->end()
+ ;
+ $deprecatedNode = $node->getNode()->getChildren()['foo'];
+
+ $this->assertTrue($deprecatedNode->isDeprecated());
+ $this->assertSame('The "root.foo" node is deprecated.', $deprecatedNode->getDeprecationMessage($deprecatedNode->getName(), $deprecatedNode->getPath()));
+ }
+
+ /**
+ * @group legacy
+ * @expectedDeprecation ->cannotBeEmpty() is not applicable to concrete nodes at path "root". In 4.0 it will throw an exception.
+ */
+ public function testCannotBeEmptyOnConcreteNode()
+ {
+ $node = new ArrayNodeDefinition('root');
+ $node->cannotBeEmpty();
+
+ $node->getNode()->finalize([]);
+ }
+
+ protected function getField($object, $field)
+ {
+ $reflection = new \ReflectionProperty($object, $field);
+ $reflection->setAccessible(true);
+
+ return $reflection->getValue($object);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php
new file mode 100644
index 00000000..6f568a2d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/BooleanNodeDefinitionTest.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition;
+
+class BooleanNodeDefinitionTest extends TestCase
+{
+ public function testCannotBeEmptyThrowsAnException()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException');
+ $this->expectExceptionMessage('->cannotBeEmpty() is not applicable to BooleanNodeDefinition.');
+ $def = new BooleanNodeDefinition('foo');
+ $def->cannotBeEmpty();
+ }
+
+ public function testSetDeprecated()
+ {
+ $def = new BooleanNodeDefinition('foo');
+ $def->setDeprecated('The "%path%" node is deprecated.');
+
+ $node = $def->getNode();
+
+ $this->assertTrue($node->isDeprecated());
+ $this->assertSame('The "foo" node is deprecated.', $node->getDeprecationMessage($node->getName(), $node->getPath()));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php
new file mode 100644
index 00000000..2e43a135
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/EnumNodeDefinitionTest.php
@@ -0,0 +1,73 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\EnumNodeDefinition;
+
+class EnumNodeDefinitionTest extends TestCase
+{
+ public function testWithOneValue()
+ {
+ $def = new EnumNodeDefinition('foo');
+ $def->values(['foo']);
+
+ $node = $def->getNode();
+ $this->assertEquals(['foo'], $node->getValues());
+ }
+
+ public function testWithOneDistinctValue()
+ {
+ $def = new EnumNodeDefinition('foo');
+ $def->values(['foo', 'foo']);
+
+ $node = $def->getNode();
+ $this->assertEquals(['foo'], $node->getValues());
+ }
+
+ public function testNoValuesPassed()
+ {
+ $this->expectException('RuntimeException');
+ $this->expectExceptionMessage('You must call ->values() on enum nodes.');
+ $def = new EnumNodeDefinition('foo');
+ $def->getNode();
+ }
+
+ public function testWithNoValues()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('->values() must be called with at least one value.');
+ $def = new EnumNodeDefinition('foo');
+ $def->values([]);
+ }
+
+ public function testGetNode()
+ {
+ $def = new EnumNodeDefinition('foo');
+ $def->values(['foo', 'bar']);
+
+ $node = $def->getNode();
+ $this->assertEquals(['foo', 'bar'], $node->getValues());
+ }
+
+ public function testSetDeprecated()
+ {
+ $def = new EnumNodeDefinition('foo');
+ $def->values(['foo', 'bar']);
+ $def->setDeprecated('The "%path%" node is deprecated.');
+
+ $node = $def->getNode();
+
+ $this->assertTrue($node->isDeprecated());
+ $this->assertSame('The "foo" node is deprecated.', $def->getNode()->getDeprecationMessage($node->getName(), $node->getPath()));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php
new file mode 100644
index 00000000..2dfb7a0a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/ExprBuilderTest.php
@@ -0,0 +1,264 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+
+class ExprBuilderTest extends TestCase
+{
+ public function testAlwaysExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->always($this->returnClosure('new_value'))
+ ->end();
+
+ $this->assertFinalizedValueIs('new_value', $test);
+ }
+
+ public function testIfTrueExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifTrue()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test, ['key' => true]);
+
+ $test = $this->getTestBuilder()
+ ->ifTrue(function ($v) { return true; })
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test);
+
+ $test = $this->getTestBuilder()
+ ->ifTrue(function ($v) { return false; })
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('value', $test);
+ }
+
+ public function testIfStringExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifString()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test);
+
+ $test = $this->getTestBuilder()
+ ->ifString()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs(45, $test, ['key' => 45]);
+ }
+
+ public function testIfNullExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifNull()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test, ['key' => null]);
+
+ $test = $this->getTestBuilder()
+ ->ifNull()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('value', $test);
+ }
+
+ public function testIfEmptyExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifEmpty()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test, ['key' => []]);
+
+ $test = $this->getTestBuilder()
+ ->ifEmpty()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('value', $test);
+ }
+
+ public function testIfArrayExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifArray()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test, ['key' => []]);
+
+ $test = $this->getTestBuilder()
+ ->ifArray()
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('value', $test);
+ }
+
+ public function testIfInArrayExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifInArray(['foo', 'bar', 'value'])
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test);
+
+ $test = $this->getTestBuilder()
+ ->ifInArray(['foo', 'bar'])
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('value', $test);
+ }
+
+ public function testIfNotInArrayExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifNotInArray(['foo', 'bar'])
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test);
+
+ $test = $this->getTestBuilder()
+ ->ifNotInArray(['foo', 'bar', 'value_from_config'])
+ ->then($this->returnClosure('new_value'))
+ ->end();
+ $this->assertFinalizedValueIs('new_value', $test);
+ }
+
+ public function testThenEmptyArrayExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifString()
+ ->thenEmptyArray()
+ ->end();
+ $this->assertFinalizedValueIs([], $test);
+ }
+
+ /**
+ * @dataProvider castToArrayValues
+ */
+ public function testCastToArrayExpression($configValue, $expectedValue)
+ {
+ $test = $this->getTestBuilder()
+ ->castToArray()
+ ->end();
+ $this->assertFinalizedValueIs($expectedValue, $test, ['key' => $configValue]);
+ }
+
+ public function castToArrayValues()
+ {
+ yield ['value', ['value']];
+ yield [-3.14, [-3.14]];
+ yield [null, [null]];
+ yield [['value'], ['value']];
+ }
+
+ public function testThenInvalid()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $test = $this->getTestBuilder()
+ ->ifString()
+ ->thenInvalid('Invalid value')
+ ->end();
+ $this->finalizeTestBuilder($test);
+ }
+
+ public function testThenUnsetExpression()
+ {
+ $test = $this->getTestBuilder()
+ ->ifString()
+ ->thenUnset()
+ ->end();
+ $this->assertEquals([], $this->finalizeTestBuilder($test));
+ }
+
+ public function testEndIfPartNotSpecified()
+ {
+ $this->expectException('RuntimeException');
+ $this->expectExceptionMessage('You must specify an if part.');
+ $this->getTestBuilder()->end();
+ }
+
+ public function testEndThenPartNotSpecified()
+ {
+ $this->expectException('RuntimeException');
+ $this->expectExceptionMessage('You must specify a then part.');
+ $builder = $this->getTestBuilder();
+ $builder->ifPart = 'test';
+ $builder->end();
+ }
+
+ /**
+ * Create a test treebuilder with a variable node, and init the validation.
+ *
+ * @return TreeBuilder
+ */
+ protected function getTestBuilder()
+ {
+ $builder = new TreeBuilder();
+
+ return $builder
+ ->root('test')
+ ->children()
+ ->variableNode('key')
+ ->validate()
+ ;
+ }
+
+ /**
+ * Close the validation process and finalize with the given config.
+ *
+ * @param TreeBuilder $testBuilder The tree builder to finalize
+ * @param array $config The config you want to use for the finalization, if nothing provided
+ * a simple ['key'=>'value'] will be used
+ *
+ * @return array The finalized config values
+ */
+ protected function finalizeTestBuilder($testBuilder, $config = null)
+ {
+ return $testBuilder
+ ->end()
+ ->end()
+ ->end()
+ ->buildTree()
+ ->finalize(null === $config ? ['key' => 'value'] : $config)
+ ;
+ }
+
+ /**
+ * Return a closure that will return the given value.
+ *
+ * @param mixed $val The value that the closure must return
+ *
+ * @return \Closure
+ */
+ protected function returnClosure($val)
+ {
+ return function ($v) use ($val) {
+ return $val;
+ };
+ }
+
+ /**
+ * Assert that the given test builder, will return the given value.
+ *
+ * @param mixed $value The value to test
+ * @param TreeBuilder $treeBuilder The tree builder to finalize
+ * @param mixed $config The config values that new to be finalized
+ */
+ protected function assertFinalizedValueIs($value, $treeBuilder, $config = null)
+ {
+ $this->assertEquals(['key' => $value], $this->finalizeTestBuilder($treeBuilder, $config));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php
new file mode 100644
index 00000000..46518c65
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/NodeBuilderTest.php
@@ -0,0 +1,91 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder;
+use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition;
+
+class NodeBuilderTest extends TestCase
+{
+ public function testThrowsAnExceptionWhenTryingToCreateANonRegisteredNodeType()
+ {
+ $this->expectException('RuntimeException');
+ $builder = new BaseNodeBuilder();
+ $builder->node('', 'foobar');
+ }
+
+ public function testThrowsAnExceptionWhenTheNodeClassIsNotFound()
+ {
+ $this->expectException('RuntimeException');
+ $builder = new BaseNodeBuilder();
+ $builder
+ ->setNodeClass('noclasstype', '\\foo\\bar\\noclass')
+ ->node('', 'noclasstype');
+ }
+
+ public function testAddingANewNodeType()
+ {
+ $class = SomeNodeDefinition::class;
+
+ $builder = new BaseNodeBuilder();
+ $node = $builder
+ ->setNodeClass('newtype', $class)
+ ->node('', 'newtype');
+
+ $this->assertInstanceOf($class, $node);
+ }
+
+ public function testOverridingAnExistingNodeType()
+ {
+ $class = SomeNodeDefinition::class;
+
+ $builder = new BaseNodeBuilder();
+ $node = $builder
+ ->setNodeClass('variable', $class)
+ ->node('', 'variable');
+
+ $this->assertInstanceOf($class, $node);
+ }
+
+ public function testNodeTypesAreNotCaseSensitive()
+ {
+ $builder = new BaseNodeBuilder();
+
+ $node1 = $builder->node('', 'VaRiAbLe');
+ $node2 = $builder->node('', 'variable');
+
+ $this->assertInstanceOf(\get_class($node1), $node2);
+
+ $builder->setNodeClass('CuStOm', SomeNodeDefinition::class);
+
+ $node1 = $builder->node('', 'CUSTOM');
+ $node2 = $builder->node('', 'custom');
+
+ $this->assertInstanceOf(\get_class($node1), $node2);
+ }
+
+ public function testNumericNodeCreation()
+ {
+ $builder = new BaseNodeBuilder();
+
+ $node = $builder->integerNode('foo')->min(3)->max(5);
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition', $node);
+
+ $node = $builder->floatNode('bar')->min(3.0)->max(5.0);
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\FloatNodeDefinition', $node);
+ }
+}
+
+class SomeNodeDefinition extends BaseVariableNodeDefinition
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php
new file mode 100644
index 00000000..aa938bba
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/NumericNodeDefinitionTest.php
@@ -0,0 +1,89 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\FloatNodeDefinition;
+use Symfony\Component\Config\Definition\Builder\IntegerNodeDefinition;
+
+class NumericNodeDefinitionTest extends TestCase
+{
+ public function testIncoherentMinAssertion()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('You cannot define a min(4) as you already have a max(3)');
+ $def = new IntegerNodeDefinition('foo');
+ $def->max(3)->min(4);
+ }
+
+ public function testIncoherentMaxAssertion()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('You cannot define a max(2) as you already have a min(3)');
+ $node = new IntegerNodeDefinition('foo');
+ $node->min(3)->max(2);
+ }
+
+ public function testIntegerMinAssertion()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('The value 4 is too small for path "foo". Should be greater than or equal to 5');
+ $def = new IntegerNodeDefinition('foo');
+ $def->min(5)->getNode()->finalize(4);
+ }
+
+ public function testIntegerMaxAssertion()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('The value 4 is too big for path "foo". Should be less than or equal to 3');
+ $def = new IntegerNodeDefinition('foo');
+ $def->max(3)->getNode()->finalize(4);
+ }
+
+ public function testIntegerValidMinMaxAssertion()
+ {
+ $def = new IntegerNodeDefinition('foo');
+ $node = $def->min(3)->max(7)->getNode();
+ $this->assertEquals(4, $node->finalize(4));
+ }
+
+ public function testFloatMinAssertion()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('The value 400 is too small for path "foo". Should be greater than or equal to 500');
+ $def = new FloatNodeDefinition('foo');
+ $def->min(5E2)->getNode()->finalize(4e2);
+ }
+
+ public function testFloatMaxAssertion()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('The value 4.3 is too big for path "foo". Should be less than or equal to 0.3');
+ $def = new FloatNodeDefinition('foo');
+ $def->max(0.3)->getNode()->finalize(4.3);
+ }
+
+ public function testFloatValidMinMaxAssertion()
+ {
+ $def = new FloatNodeDefinition('foo');
+ $node = $def->min(3.0)->max(7e2)->getNode();
+ $this->assertEquals(4.5, $node->finalize(4.5));
+ }
+
+ public function testCannotBeEmptyThrowsAnException()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidDefinitionException');
+ $this->expectExceptionMessage('->cannotBeEmpty() is not applicable to NumericNodeDefinition.');
+ $def = new IntegerNodeDefinition('foo');
+ $def->cannotBeEmpty();
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php
new file mode 100644
index 00000000..53c9c256
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Builder/TreeBuilderTest.php
@@ -0,0 +1,134 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Builder;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder as CustomNodeBuilder;
+
+class TreeBuilderTest extends TestCase
+{
+ public function testUsingACustomNodeBuilder()
+ {
+ $builder = new TreeBuilder();
+ $root = $builder->root('custom', 'array', new CustomNodeBuilder());
+
+ $nodeBuilder = $root->children();
+
+ $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder);
+
+ $nodeBuilder = $nodeBuilder->arrayNode('deeper')->children();
+
+ $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\NodeBuilder', $nodeBuilder);
+ }
+
+ public function testOverrideABuiltInNodeType()
+ {
+ $builder = new TreeBuilder();
+ $root = $builder->root('override', 'array', new CustomNodeBuilder());
+
+ $definition = $root->children()->variableNode('variable');
+
+ $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\VariableNodeDefinition', $definition);
+ }
+
+ public function testAddANodeType()
+ {
+ $builder = new TreeBuilder();
+ $root = $builder->root('override', 'array', new CustomNodeBuilder());
+
+ $definition = $root->children()->barNode('variable');
+
+ $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\Builder\BarNodeDefinition', $definition);
+ }
+
+ public function testCreateABuiltInNodeTypeWithACustomNodeBuilder()
+ {
+ $builder = new TreeBuilder();
+ $root = $builder->root('builtin', 'array', new CustomNodeBuilder());
+
+ $definition = $root->children()->booleanNode('boolean');
+
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition', $definition);
+ }
+
+ public function testPrototypedArrayNodeUseTheCustomNodeBuilder()
+ {
+ $builder = new TreeBuilder();
+ $root = $builder->root('override', 'array', new CustomNodeBuilder());
+
+ $root->prototype('bar')->end();
+
+ $this->assertInstanceOf('Symfony\Component\Config\Tests\Fixtures\BarNode', $root->getNode(true)->getPrototype());
+ }
+
+ public function testAnExtendedNodeBuilderGetsPropagatedToTheChildren()
+ {
+ $builder = new TreeBuilder();
+
+ $builder->root('propagation')
+ ->children()
+ ->setNodeClass('extended', 'Symfony\Component\Config\Definition\Builder\BooleanNodeDefinition')
+ ->node('foo', 'extended')->end()
+ ->arrayNode('child')
+ ->children()
+ ->node('foo', 'extended')
+ ->end()
+ ->end()
+ ->end()
+ ->end();
+
+ $node = $builder->buildTree();
+ $children = $node->getChildren();
+
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\BooleanNode', $children['foo']);
+
+ $childChildren = $children['child']->getChildren();
+
+ $this->assertInstanceOf('Symfony\Component\Config\Definition\BooleanNode', $childChildren['foo']);
+ }
+
+ public function testDefinitionInfoGetsTransferredToNode()
+ {
+ $builder = new TreeBuilder();
+
+ $builder->root('test')->info('root info')
+ ->children()
+ ->node('child', 'variable')->info('child info')->defaultValue('default')
+ ->end()
+ ->end();
+
+ $tree = $builder->buildTree();
+ $children = $tree->getChildren();
+
+ $this->assertEquals('root info', $tree->getInfo());
+ $this->assertEquals('child info', $children['child']->getInfo());
+ }
+
+ public function testDefinitionExampleGetsTransferredToNode()
+ {
+ $builder = new TreeBuilder();
+
+ $builder->root('test')
+ ->example(['key' => 'value'])
+ ->children()
+ ->node('child', 'variable')->info('child info')->defaultValue('default')->example('example')
+ ->end()
+ ->end();
+
+ $tree = $builder->buildTree();
+ $children = $tree->getChildren();
+
+ $this->assertIsArray($tree->getExample());
+ $this->assertEquals('example', $children['child']->getExample());
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php
new file mode 100644
index 00000000..1bd60215
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Dumper/XmlReferenceDumperTest.php
@@ -0,0 +1,114 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Dumper;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper;
+use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration;
+
+class XmlReferenceDumperTest extends TestCase
+{
+ public function testDumper()
+ {
+ $configuration = new ExampleConfiguration();
+
+ $dumper = new XmlReferenceDumper();
+ $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration));
+ }
+
+ public function testNamespaceDumper()
+ {
+ $configuration = new ExampleConfiguration();
+
+ $dumper = new XmlReferenceDumper();
+ $this->assertEquals(str_replace('http://example.org/schema/dic/acme_root', 'http://symfony.com/schema/dic/symfony', $this->getConfigurationAsString()), $dumper->dump($configuration, 'http://symfony.com/schema/dic/symfony'));
+ }
+
+ private function getConfigurationAsString()
+ {
+ return str_replace("\n", \PHP_EOL, <<<'EOL'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ scalar value
+
+
+ scalar value
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+EOL
+ );
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
new file mode 100644
index 00000000..3cb9121b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/Dumper/YamlReferenceDumperTest.php
@@ -0,0 +1,143 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition\Dumper;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
+use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration;
+
+class YamlReferenceDumperTest extends TestCase
+{
+ public function testDumper()
+ {
+ $configuration = new ExampleConfiguration();
+
+ $dumper = new YamlReferenceDumper();
+
+ $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration));
+ }
+
+ public function provideDumpAtPath()
+ {
+ return [
+ 'Regular node' => ['scalar_true', << ['array', << ['array.child2', << ['cms_pages.page', << ['cms_pages.page.locale', <<assertSame(trim($expected), trim($dumper->dumpAtPath($configuration, $path)));
+ }
+
+ private function getConfigurationAsString()
+ {
+ return <<<'EOL'
+acme_root:
+ boolean: true
+ scalar_empty: ~
+ scalar_null: null
+ scalar_true: true
+ scalar_false: false
+ scalar_default: default
+ scalar_array_empty: []
+ scalar_array_defaults:
+
+ # Defaults:
+ - elem1
+ - elem2
+ scalar_required: ~ # Required
+ scalar_deprecated: ~ # Deprecated (The child node "scalar_deprecated" at path "acme_root" is deprecated.)
+ scalar_deprecated_with_message: ~ # Deprecated (Deprecation custom message for "scalar_deprecated_with_message" at "acme_root")
+ node_with_a_looong_name: ~
+ enum_with_default: this # One of "this"; "that"
+ enum: ~ # One of "this"; "that"
+
+ # some info
+ array:
+ child1: ~
+ child2: ~
+
+ # this is a long
+ # multi-line info text
+ # which should be indented
+ child3: ~ # Example: example setting
+ scalar_prototyped: []
+ parameters:
+
+ # Prototype: Parameter name
+ name: ~
+ connections:
+
+ # Prototype
+ -
+ user: ~
+ pass: ~
+ cms_pages:
+
+ # Prototype
+ page:
+
+ # Prototype
+ locale:
+ title: ~ # Required
+ path: ~ # Required
+ pipou:
+
+ # Prototype
+ name: []
+
+EOL;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/EnumNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/EnumNodeTest.php
new file mode 100644
index 00000000..fa89eea2
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/EnumNodeTest.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\EnumNode;
+
+class EnumNodeTest extends TestCase
+{
+ public function testFinalizeValue()
+ {
+ $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 EnumNode('foo', null, []);
+ }
+
+ public function testConstructionWithOneValue()
+ {
+ $node = new EnumNode('foo', null, ['foo']);
+ $this->assertSame('foo', $node->finalize('foo'));
+ }
+
+ public function testConstructionWithOneDistinctValue()
+ {
+ $node = new EnumNode('foo', null, ['foo', 'foo']);
+ $this->assertSame('foo', $node->finalize('foo'));
+ }
+
+ public function testFinalizeWithInvalidValue()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('The value "foobar" is not allowed for path "foo". Permissible values: "foo", "bar"');
+ $node = new EnumNode('foo', null, ['foo', 'bar']);
+ $node->finalize('foobar');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/FinalizationTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/FinalizationTest.php
new file mode 100644
index 00000000..be68a27c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/FinalizationTest.php
@@ -0,0 +1,74 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Definition\NodeInterface;
+use Symfony\Component\Config\Definition\Processor;
+
+class FinalizationTest extends TestCase
+{
+ public function testUnsetKeyWithDeepHierarchy()
+ {
+ $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,
+ ],
+ ];
+
+ $this->assertEquals([
+ 'level1' => [
+ 'level1_scalar' => 'foo',
+ ],
+ ], $this->process($tree, [$a, $b]));
+ }
+
+ protected function process(NodeInterface $tree, array $configs)
+ {
+ $processor = new Processor();
+
+ return $processor->process($tree, $configs);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/FloatNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/FloatNodeTest.php
new file mode 100644
index 00000000..fed9f013
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/FloatNodeTest.php
@@ -0,0 +1,78 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\FloatNode;
+
+class FloatNodeTest extends TestCase
+{
+ /**
+ * @dataProvider getValidValues
+ */
+ public function testNormalize($value)
+ {
+ $node = new FloatNode('test');
+ $this->assertSame($value, $node->normalize($value));
+ }
+
+ /**
+ * @dataProvider getValidValues
+ *
+ * @param int $value
+ */
+ public function testValidNonEmptyValues($value)
+ {
+ $node = new FloatNode('test');
+ $node->setAllowEmptyValue(false);
+
+ $this->assertSame($value, $node->finalize($value));
+ }
+
+ public function getValidValues()
+ {
+ return [
+ [1798.0],
+ [-678.987],
+ [12.56E45],
+ [0.0],
+ // Integer are accepted too, they will be cast
+ [17],
+ [-10],
+ [0],
+ ];
+ }
+
+ /**
+ * @dataProvider getInvalidValues
+ */
+ public function testNormalizeThrowsExceptionOnInvalidValues($value)
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
+ $node = new FloatNode('test');
+ $node->normalize($value);
+ }
+
+ public function getInvalidValues()
+ {
+ return [
+ [null],
+ [''],
+ ['foo'],
+ [true],
+ [false],
+ [[]],
+ [['foo' => 'bar']],
+ [new \stdClass()],
+ ];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php
new file mode 100644
index 00000000..3fb1b771
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/IntegerNodeTest.php
@@ -0,0 +1,75 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\IntegerNode;
+
+class IntegerNodeTest extends TestCase
+{
+ /**
+ * @dataProvider getValidValues
+ */
+ public function testNormalize($value)
+ {
+ $node = new IntegerNode('test');
+ $this->assertSame($value, $node->normalize($value));
+ }
+
+ /**
+ * @dataProvider getValidValues
+ *
+ * @param int $value
+ */
+ public function testValidNonEmptyValues($value)
+ {
+ $node = new IntegerNode('test');
+ $node->setAllowEmptyValue(false);
+
+ $this->assertSame($value, $node->finalize($value));
+ }
+
+ public function getValidValues()
+ {
+ return [
+ [1798],
+ [-678],
+ [0],
+ ];
+ }
+
+ /**
+ * @dataProvider getInvalidValues
+ */
+ public function testNormalizeThrowsExceptionOnInvalidValues($value)
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
+ $node = new IntegerNode('test');
+ $node->normalize($value);
+ }
+
+ public function getInvalidValues()
+ {
+ return [
+ [null],
+ [''],
+ ['foo'],
+ [true],
+ [false],
+ [0.0],
+ [0.1],
+ [[]],
+ [['foo' => 'bar']],
+ [new \stdClass()],
+ ];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/MergeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/MergeTest.php
new file mode 100644
index 00000000..8fee2635
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/MergeTest.php
@@ -0,0 +1,192 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+
+class MergeTest extends TestCase
+{
+ public function testForbiddenOverwrite()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException');
+ $tb = new TreeBuilder();
+ $tree = $tb
+ ->root('root', 'array')
+ ->children()
+ ->node('foo', 'scalar')
+ ->cannotBeOverwritten()
+ ->end()
+ ->end()
+ ->end()
+ ->buildTree()
+ ;
+
+ $a = [
+ 'foo' => 'bar',
+ ];
+
+ $b = [
+ 'foo' => 'moo',
+ ];
+
+ $tree->merge($a, $b);
+ }
+
+ public function testUnsetKey()
+ {
+ $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));
+ }
+
+ public function testDoesNotAllowNewKeysInSubsequentConfigs()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $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'],
+ ],
+ ];
+
+ $tree->merge($a, $b);
+ }
+
+ public function testPerformsNoDeepMerging()
+ {
+ $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',
+ ],
+ ];
+
+ $this->assertEquals([
+ 'no_deep_merging' => [
+ 'c' => 'd',
+ ],
+ ], $tree->merge($a, $b));
+ }
+
+ public function testPrototypeWithoutAKeyAttribute()
+ {
+ $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'],
+ ];
+
+ $this->assertEquals(['append_elements' => ['a', 'b', 'c', 'd']], $tree->merge($a, $b));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/NormalizationTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/NormalizationTest.php
new file mode 100644
index 00000000..200a9859
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/NormalizationTest.php
@@ -0,0 +1,228 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Definition\NodeInterface;
+
+class NormalizationTest extends TestCase
+{
+ /**
+ * @dataProvider getEncoderTests
+ */
+ public function testNormalizeEncoders($denormalized)
+ {
+ $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()
+ ;
+
+ $normalized = [
+ 'encoders' => [
+ 'foo' => ['algorithm' => 'plaintext'],
+ ],
+ ];
+
+ $this->assertNormalized($tree, $denormalized, $normalized);
+ }
+
+ public function getEncoderTests()
+ {
+ $configs = [];
+
+ // XML
+ $configs[] = [
+ 'encoder' => [
+ ['class' => 'foo', 'algorithm' => 'plaintext'],
+ ],
+ ];
+
+ // XML when only one element of this type
+ $configs[] = [
+ 'encoder' => ['class' => 'foo', 'algorithm' => 'plaintext'],
+ ];
+
+ // YAML/PHP
+ $configs[] = [
+ 'encoders' => [
+ ['class' => 'foo', 'algorithm' => 'plaintext'],
+ ],
+ ];
+
+ // YAML/PHP
+ $configs[] = [
+ 'encoders' => [
+ 'foo' => 'plaintext',
+ ],
+ ];
+
+ // YAML/PHP
+ $configs[] = [
+ 'encoders' => [
+ 'foo' => ['algorithm' => 'plaintext'],
+ ],
+ ];
+
+ return array_map(function ($v) {
+ return [$v];
+ }, $configs);
+ }
+
+ /**
+ * @dataProvider getAnonymousKeysTests
+ */
+ public function testAnonymousKeysArray($denormalized)
+ {
+ $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);
+ }
+
+ public function getAnonymousKeysTests()
+ {
+ $configs = [];
+
+ $configs[] = [
+ 'logout' => [
+ 'handlers' => ['a', 'b', 'c'],
+ ],
+ ];
+
+ $configs[] = [
+ 'logout' => [
+ 'handler' => ['a', 'b', 'c'],
+ ],
+ ];
+
+ return array_map(function ($v) { return [$v]; }, $configs);
+ }
+
+ /**
+ * @dataProvider getNumericKeysTests
+ */
+ public function testNumericKeysAsAttributes($denormalized)
+ {
+ $normalized = [
+ 'thing' => [42 => ['foo', 'bar'], 1337 => ['baz', 'qux']],
+ ];
+
+ $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, $normalized);
+ }
+
+ 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 [$v]; }, $configs);
+ }
+
+ public function testNonAssociativeArrayThrowsExceptionIfAttributeNotSet()
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $this->expectExceptionMessage('The attribute "id" must be set for path "root.thing".');
+ $denormalized = [
+ 'thing' => [
+ ['foo', 'bar'], ['baz', 'qux'],
+ ],
+ ];
+
+ $this->assertNormalized($this->getNumericKeysTestTree(), $denormalized, []);
+ }
+
+ public function testAssociativeArrayPreserveKeys()
+ {
+ $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(NodeInterface $tree, $denormalized, $normalized)
+ {
+ self::assertSame($normalized, $tree->normalize($denormalized));
+ }
+
+ private function getNumericKeysTestTree()
+ {
+ $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/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php
new file mode 100644
index 00000000..7a58ead8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/PrototypedArrayNodeTest.php
@@ -0,0 +1,341 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\ArrayNode;
+use Symfony\Component\Config\Definition\PrototypedArrayNode;
+use Symfony\Component\Config\Definition\ScalarNode;
+use Symfony\Component\Config\Definition\VariableNode;
+
+class PrototypedArrayNodeTest extends TestCase
+{
+ public function testGetDefaultValueReturnsAnEmptyArrayForPrototypes()
+ {
+ $node = new PrototypedArrayNode('root');
+ $prototype = new ArrayNode(null, $node);
+ $node->setPrototype($prototype);
+ $this->assertEmpty($node->getDefaultValue());
+ }
+
+ public function testGetDefaultValueReturnsDefaultValueForPrototypes()
+ {
+ $node = new PrototypedArrayNode('root');
+ $prototype = new ArrayNode(null, $node);
+ $node->setPrototype($prototype);
+ $node->setDefaultValue(['test']);
+ $this->assertEquals(['test'], $node->getDefaultValue());
+ }
+
+ // a remapped key (e.g. "mapping" -> "mappings") should be unset after being used
+ public function testRemappedKeysAreUnset()
+ {
+ $node = new ArrayNode('root');
+ $mappingsNode = new PrototypedArrayNode('mappings');
+ $node->addChild($mappingsNode);
+
+ // each item under mappings is just a scalar
+ $prototype = new ScalarNode(null, $mappingsNode);
+ $mappingsNode->setPrototype($prototype);
+
+ $remappings = [];
+ $remappings[] = ['mapping', 'mappings'];
+ $node->setXmlRemappings($remappings);
+
+ $normalized = $node->normalize(['mapping' => ['foo', 'bar']]);
+ $this->assertEquals(['mappings' => ['foo', 'bar']], $normalized);
+ }
+
+ /**
+ * Tests that when a key attribute is mapped, that key is removed from the array.
+ *
+ *
+ *
+ *
+ * The above should finally be mapped to an array that looks like this
+ * (because "id" is the key attribute).
+ *
+ * [
+ * 'things' => [
+ * 'option1' => 'foo',
+ * 'option2' => 'bar',
+ * ]
+ * ]
+ */
+ public function testMappedAttributeKeyIsRemoved()
+ {
+ $node = new PrototypedArrayNode('root');
+ $node->setKeyAttribute('id', true);
+
+ // each item under the root is an array, with one scalar item
+ $prototype = new ArrayNode(null, $node);
+ $prototype->addChild(new ScalarNode('foo'));
+ $node->setPrototype($prototype);
+
+ $children = [];
+ $children[] = ['id' => 'item_name', 'foo' => 'bar'];
+ $normalized = $node->normalize($children);
+
+ $expected = [];
+ $expected['item_name'] = ['foo' => 'bar'];
+ $this->assertEquals($expected, $normalized);
+ }
+
+ /**
+ * Tests the opposite of the testMappedAttributeKeyIsRemoved because
+ * the removal can be toggled with an option.
+ */
+ public function testMappedAttributeKeyNotRemoved()
+ {
+ $node = new PrototypedArrayNode('root');
+ $node->setKeyAttribute('id', false);
+
+ // each item under the root is an array, with two scalar items
+ $prototype = new ArrayNode(null, $node);
+ $prototype->addChild(new ScalarNode('foo'));
+ $prototype->addChild(new ScalarNode('id')); // the key attribute will remain
+ $node->setPrototype($prototype);
+
+ $children = [];
+ $children[] = ['id' => 'item_name', 'foo' => 'bar'];
+ $normalized = $node->normalize($children);
+
+ $expected = [];
+ $expected['item_name'] = ['id' => 'item_name', 'foo' => 'bar'];
+ $this->assertEquals($expected, $normalized);
+ }
+
+ public function testAddDefaultChildren()
+ {
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setAddChildrenIfNoneSet();
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals([['foo' => 'bar']], $node->getDefaultValue());
+
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setKeyAttribute('foobar');
+ $node->setAddChildrenIfNoneSet();
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals(['defaults' => ['foo' => 'bar']], $node->getDefaultValue());
+
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setKeyAttribute('foobar');
+ $node->setAddChildrenIfNoneSet('defaultkey');
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals(['defaultkey' => ['foo' => 'bar']], $node->getDefaultValue());
+
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setKeyAttribute('foobar');
+ $node->setAddChildrenIfNoneSet(['defaultkey']);
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals(['defaultkey' => ['foo' => 'bar']], $node->getDefaultValue());
+
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setKeyAttribute('foobar');
+ $node->setAddChildrenIfNoneSet(['dk1', 'dk2']);
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals(['dk1' => ['foo' => 'bar'], 'dk2' => ['foo' => 'bar']], $node->getDefaultValue());
+
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setAddChildrenIfNoneSet([5, 6]);
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals([0 => ['foo' => 'bar'], 1 => ['foo' => 'bar']], $node->getDefaultValue());
+
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setAddChildrenIfNoneSet(2);
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals([['foo' => 'bar'], ['foo' => 'bar']], $node->getDefaultValue());
+ }
+
+ public function testDefaultChildrenWinsOverDefaultValue()
+ {
+ $node = $this->getPrototypeNodeWithDefaultChildren();
+ $node->setAddChildrenIfNoneSet();
+ $node->setDefaultValue(['bar' => 'foo']);
+ $this->assertTrue($node->hasDefaultValue());
+ $this->assertEquals([['foo' => 'bar']], $node->getDefaultValue());
+ }
+
+ protected function getPrototypeNodeWithDefaultChildren()
+ {
+ $node = new PrototypedArrayNode('root');
+ $prototype = new ArrayNode(null, $node);
+ $child = new ScalarNode('foo');
+ $child->setDefaultValue('bar');
+ $prototype->addChild($child);
+ $prototype->setAddIfNotSet(true);
+ $node->setPrototype($prototype);
+
+ return $node;
+ }
+
+ /**
+ * Tests that when a key attribute is mapped, that key is removed from the array.
+ * And if only 'value' element is left in the array, it will replace its wrapper array.
+ *
+ *
+ *
+ *
+ * The above should finally be mapped to an array that looks like this
+ * (because "id" is the key attribute).
+ *
+ * [
+ * 'things' => [
+ * 'option1' => 'value1'
+ * ]
+ * ]
+ *
+ * It's also possible to mix 'value-only' and 'non-value-only' elements in the array.
+ *
+ *
+ *
+ *
+ * The above should finally be mapped to an array as follows
+ *
+ * [
+ * 'things' => [
+ * 'option1' => 'value1',
+ * 'option2' => [
+ * 'value' => 'value2',
+ * 'foo' => 'foo2'
+ * ]
+ * ]
+ * ]
+ *
+ * The 'value' element can also be ArrayNode:
+ *
+ *
+ *
+ *
+ *
+ * The above should be finally be mapped to an array as follows
+ *
+ * [
+ * 'things' => [
+ * 'option1' => [
+ * 'foo' => 'foo1',
+ * 'bar' => 'bar1'
+ * ]
+ * ]
+ * ]
+ *
+ * If using VariableNode for value node, it's also possible to mix different types of value nodes:
+ *
+ *
+ *
+ *
+ *
+ * The above should be finally mapped to an array as follows
+ *
+ * [
+ * 'things' => [
+ * 'option1' => [
+ * 'foo' => 'foo1',
+ * 'bar' => 'bar1'
+ * ],
+ * 'option2' => 'value2'
+ * ]
+ * ]
+ *
+ * @dataProvider getDataForKeyRemovedLeftValueOnly
+ */
+ public function testMappedAttributeKeyIsRemovedLeftValueOnly($value, $children, $expected)
+ {
+ $node = new PrototypedArrayNode('root');
+ $node->setKeyAttribute('id', true);
+
+ // each item under the root is an array, with one scalar item
+ $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);
+ $this->assertEquals($expected, $normalized);
+ }
+
+ public function getDataForKeyRemovedLeftValueOnly()
+ {
+ $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/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php
new file mode 100644
index 00000000..ac2d9376
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Definition/ScalarNodeTest.php
@@ -0,0 +1,161 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Definition;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Definition\ArrayNode;
+use Symfony\Component\Config\Definition\ScalarNode;
+
+class ScalarNodeTest extends TestCase
+{
+ /**
+ * @dataProvider getValidValues
+ */
+ public function testNormalize($value)
+ {
+ $node = new ScalarNode('test');
+ $this->assertSame($value, $node->normalize($value));
+ }
+
+ public function getValidValues()
+ {
+ return [
+ [false],
+ [true],
+ [null],
+ [''],
+ ['foo'],
+ [0],
+ [1],
+ [0.0],
+ [0.1],
+ ];
+ }
+
+ public function testSetDeprecated()
+ {
+ $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 ArrayNode('root');
+ $node->addChild($childNode);
+
+ $deprecationTriggered = 0;
+ $deprecationHandler = function ($level, $message, $file, $line) use (&$prevErrorHandler, &$deprecationTriggered) {
+ if (\E_USER_DEPRECATED === $level) {
+ return ++$deprecationTriggered;
+ }
+
+ return $prevErrorHandler ? $prevErrorHandler($level, $message, $file, $line) : false;
+ };
+
+ $prevErrorHandler = set_error_handler($deprecationHandler);
+ $node->finalize([]);
+ restore_error_handler();
+ $this->assertSame(0, $deprecationTriggered, '->finalize() should not trigger if the deprecated node is not set');
+
+ $prevErrorHandler = set_error_handler($deprecationHandler);
+ $node->finalize(['foo' => '']);
+ restore_error_handler();
+ $this->assertSame(1, $deprecationTriggered, '->finalize() should trigger if the deprecated node is set');
+ }
+
+ /**
+ * @dataProvider getInvalidValues
+ */
+ public function testNormalizeThrowsExceptionOnInvalidValues($value)
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
+ $node = new ScalarNode('test');
+ $node->normalize($value);
+ }
+
+ public function getInvalidValues()
+ {
+ return [
+ [[]],
+ [['foo' => 'bar']],
+ [new \stdClass()],
+ ];
+ }
+
+ public function testNormalizeThrowsExceptionWithoutHint()
+ {
+ $node = new ScalarNode('test');
+
+ $this->expectException('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 ScalarNode('test');
+ $node->setInfo('"the test value"');
+
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidTypeException');
+ $this->expectExceptionMessage("Invalid type for path \"test\". Expected scalar, but got array.\nHint: \"the test value\"");
+
+ $node->normalize([]);
+ }
+
+ /**
+ * @dataProvider getValidNonEmptyValues
+ *
+ * @param mixed $value
+ */
+ public function testValidNonEmptyValues($value)
+ {
+ $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],
+ ];
+ }
+
+ /**
+ * @dataProvider getEmptyValues
+ *
+ * @param mixed $value
+ */
+ public function testNotAllowedEmptyValuesThrowException($value)
+ {
+ $this->expectException('Symfony\Component\Config\Definition\Exception\InvalidConfigurationException');
+ $node = new ScalarNode('test');
+ $node->setAllowEmptyValue(false);
+ $node->finalize($value);
+ }
+
+ public function getEmptyValues()
+ {
+ return [
+ [null],
+ [''],
+ ];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php
new file mode 100644
index 00000000..c2b95195
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/DependencyInjection/ConfigCachePassTest.php
@@ -0,0 +1,59 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\DependencyInjection;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\DependencyInjection\ConfigCachePass;
+use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * @group legacy
+ */
+class ConfigCachePassTest extends TestCase
+{
+ public function testThatCheckersAreProcessedInPriorityOrder()
+ {
+ $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 ConfigCachePass();
+ $pass->process($container);
+
+ $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 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());
+ $this->assertCount($aliasesBefore, $container->getAliases());
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php
new file mode 100644
index 00000000..8363084c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Exception/FileLoaderLoadExceptionTest.php
@@ -0,0 +1,98 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Exception;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Exception\FileLoaderLoadException;
+
+class FileLoaderLoadExceptionTest extends TestCase
+{
+ public function testMessageCannotLoadResource()
+ {
+ $exception = new FileLoaderLoadException('resource', null);
+ $this->assertEquals('Cannot load resource "resource".', $exception->getMessage());
+ }
+
+ public function testMessageCannotLoadResourceWithType()
+ {
+ $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 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 FileLoaderLoadException('resource', 'sourceResource');
+ $this->assertEquals('Cannot import resource "resource" from "sourceResource".', $exception->getMessage());
+ }
+
+ public function testMessageCannotImportBundleResource()
+ {
+ $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 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 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 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/modules/empikmarketplace/vendor/symfony/config/Tests/FileLocatorTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/FileLocatorTest.php
new file mode 100644
index 00000000..e931916a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/FileLocatorTest.php
@@ -0,0 +1,114 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\FileLocator;
+
+class FileLocatorTest extends TestCase
+{
+ /**
+ * @dataProvider getIsAbsolutePathTests
+ */
+ public function testIsAbsolutePath($path)
+ {
+ $loader = new FileLocator([]);
+ $r = new \ReflectionObject($loader);
+ $m = $r->getMethod('isAbsolutePath');
+ $m->setAccessible(true);
+
+ $this->assertTrue($m->invoke($loader, $path), '->isAbsolutePath() returns true for an absolute path');
+ }
+
+ public function getIsAbsolutePathTests()
+ {
+ return [
+ ['/foo.xml'],
+ ['c:\\\\foo.xml'],
+ ['c:/foo.xml'],
+ ['\\server\\foo.xml'],
+ ['https://server/foo.xml'],
+ ['phar://server/foo.xml'],
+ ];
+ }
+
+ public function testLocate()
+ {
+ $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('Symfony\Component\Config\Exception\FileLocatorFileNotFoundException');
+ $this->expectExceptionMessage('The file "foobar.xml" does not exist');
+ $loader = new FileLocator([__DIR__.'/Fixtures']);
+
+ $loader->locate('foobar.xml', __DIR__);
+ }
+
+ public function testLocateThrowsAnExceptionIfTheFileDoesNotExistsInAbsolutePath()
+ {
+ $this->expectException('Symfony\Component\Config\Exception\FileLocatorFileNotFoundException');
+ $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 FileLocator([__DIR__.'/Fixtures']);
+
+ $loader->locate(null, __DIR__);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Again/foo.xml b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Again/foo.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/BadFileName.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/BadFileName.php
new file mode 100644
index 00000000..0f79bdd5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/BadFileName.php
@@ -0,0 +1,9 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Fixtures;
+
+use Symfony\Component\Config\Definition\ArrayNode;
+
+class BarNode extends ArrayNode
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php
new file mode 100644
index 00000000..b9c62e53
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/BarNodeDefinition.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Fixtures\Builder;
+
+use Symfony\Component\Config\Definition\Builder\NodeDefinition;
+use Symfony\Component\Config\Tests\Fixtures\BarNode;
+
+class BarNodeDefinition extends NodeDefinition
+{
+ protected function createNode()
+ {
+ return new BarNode($this->name);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php
new file mode 100644
index 00000000..22b8b32f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/NodeBuilder.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Fixtures\Builder;
+
+use Symfony\Component\Config\Definition\Builder\NodeBuilder as BaseNodeBuilder;
+
+class NodeBuilder extends BaseNodeBuilder
+{
+ public function barNode($name)
+ {
+ return $this->node($name, 'bar');
+ }
+
+ protected function getNodeClass($type)
+ {
+ switch ($type) {
+ case 'variable':
+ return __NAMESPACE__.'\\'.ucfirst($type).'NodeDefinition';
+ case 'bar':
+ return __NAMESPACE__.'\\'.ucfirst($type).'NodeDefinition';
+ default:
+ return parent::getNodeClass($type);
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php
new file mode 100644
index 00000000..6126ed43
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Builder/VariableNodeDefinition.php
@@ -0,0 +1,18 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Fixtures\Builder;
+
+use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVariableNodeDefinition;
+
+class VariableNodeDefinition extends BaseVariableNodeDefinition
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php
new file mode 100644
index 00000000..3f02700a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Configuration/ExampleConfiguration.php
@@ -0,0 +1,102 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Fixtures\Configuration;
+
+use Symfony\Component\Config\Definition\Builder\TreeBuilder;
+use Symfony\Component\Config\Definition\ConfigurationInterface;
+
+class ExampleConfiguration implements ConfigurationInterface
+{
+ public function getConfigTreeBuilder()
+ {
+ $treeBuilder = new TreeBuilder();
+ $rootNode = $treeBuilder->root('acme_root');
+
+ $rootNode
+ ->fixXmlConfig('parameter')
+ ->fixXmlConfig('connection')
+ ->fixXmlConfig('cms_page')
+ ->children()
+ ->booleanNode('boolean')->defaultTrue()->end()
+ ->scalarNode('scalar_empty')->end()
+ ->scalarNode('scalar_null')->defaultNull()->end()
+ ->scalarNode('scalar_true')->defaultTrue()->end()
+ ->scalarNode('scalar_false')->defaultFalse()->end()
+ ->scalarNode('scalar_default')->defaultValue('default')->end()
+ ->scalarNode('scalar_array_empty')->defaultValue([])->end()
+ ->scalarNode('scalar_array_defaults')->defaultValue(['elem1', 'elem2'])->end()
+ ->scalarNode('scalar_required')->isRequired()->end()
+ ->scalarNode('scalar_deprecated')->setDeprecated()->end()
+ ->scalarNode('scalar_deprecated_with_message')->setDeprecated('Deprecation custom message for "%node%" at "%path%"')->end()
+ ->scalarNode('node_with_a_looong_name')->end()
+ ->enumNode('enum_with_default')->values(['this', 'that'])->defaultValue('this')->end()
+ ->enumNode('enum')->values(['this', 'that'])->end()
+ ->arrayNode('array')
+ ->info('some info')
+ ->canBeUnset()
+ ->children()
+ ->scalarNode('child1')->end()
+ ->scalarNode('child2')->end()
+ ->scalarNode('child3')
+ ->info(
+ "this is a long\n".
+ "multi-line info text\n".
+ 'which should be indented'
+ )
+ ->example('example setting')
+ ->end()
+ ->end()
+ ->end()
+ ->arrayNode('scalar_prototyped')
+ ->prototype('scalar')->end()
+ ->end()
+ ->arrayNode('parameters')
+ ->useAttributeAsKey('name')
+ ->prototype('scalar')->info('Parameter name')->end()
+ ->end()
+ ->arrayNode('connections')
+ ->prototype('array')
+ ->children()
+ ->scalarNode('user')->end()
+ ->scalarNode('pass')->end()
+ ->end()
+ ->end()
+ ->end()
+ ->arrayNode('cms_pages')
+ ->useAttributeAsKey('page')
+ ->prototype('array')
+ ->useAttributeAsKey('locale')
+ ->prototype('array')
+ ->children()
+ ->scalarNode('title')->isRequired()->end()
+ ->scalarNode('path')->isRequired()->end()
+ ->end()
+ ->end()
+ ->end()
+ ->end()
+ ->arrayNode('pipou')
+ ->useAttributeAsKey('name')
+ ->prototype('array')
+ ->prototype('array')
+ ->children()
+ ->scalarNode('didou')
+ ->end()
+ ->end()
+ ->end()
+ ->end()
+ ->end()
+ ->end()
+ ;
+
+ return $treeBuilder;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/ParseError.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/ParseError.php
new file mode 100644
index 00000000..6bb22138
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/ParseError.php
@@ -0,0 +1,7 @@
+
+]>
+
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/invalid.xml b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/invalid.xml
new file mode 100644
index 00000000..a07af9fd
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/invalid.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/invalid_schema.xml b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/invalid_schema.xml
new file mode 100644
index 00000000..e2725a2c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/invalid_schema.xml
@@ -0,0 +1,2 @@
+
+
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/not_readable.xml b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/not_readable.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/schema.xsd b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/schema.xsd
new file mode 100644
index 00000000..e56820f6
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/schema.xsd
@@ -0,0 +1,9 @@
+
+
+
+
+
+
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/valid.xml b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/valid.xml
new file mode 100644
index 00000000..a96bb382
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/Util/valid.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/foo.xml b/modules/empikmarketplace/vendor/symfony/config/Tests/Fixtures/foo.xml
new file mode 100644
index 00000000..e69de29b
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php
new file mode 100644
index 00000000..38ae6ff7
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/DelegatingLoaderTest.php
@@ -0,0 +1,69 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Loader;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Loader\DelegatingLoader;
+use Symfony\Component\Config\Loader\LoaderResolver;
+
+class DelegatingLoaderTest extends TestCase
+{
+ public function testConstructor()
+ {
+ new DelegatingLoader($resolver = new LoaderResolver());
+ $this->assertTrue(true, '__construct() takes a loader resolver as its first argument');
+ }
+
+ public function testGetSetResolver()
+ {
+ $resolver = new LoaderResolver();
+ $loader = new DelegatingLoader($resolver);
+ $this->assertSame($resolver, $loader->getResolver(), '->getResolver() gets the resolver loader');
+ $loader->setResolver($resolver = new LoaderResolver());
+ $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader');
+ }
+
+ public function testSupports()
+ {
+ $loader1 = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $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('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $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('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $loader->expects($this->once())->method('supports')->willReturn(true);
+ $loader->expects($this->once())->method('load');
+ $resolver = new LoaderResolver([$loader]);
+ $loader = new DelegatingLoader($resolver);
+
+ $loader->load('foo');
+ }
+
+ public function testLoadThrowsAnExceptionIfTheResourceCannotBeLoaded()
+ {
+ $this->expectException('Symfony\Component\Config\Exception\FileLoaderLoadException');
+ $loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $loader->expects($this->once())->method('supports')->willReturn(false);
+ $resolver = new LoaderResolver([$loader]);
+ $loader = new DelegatingLoader($resolver);
+
+ $loader->load('foo');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/FileLoaderTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/FileLoaderTest.php
new file mode 100644
index 00000000..b59ace46
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/FileLoaderTest.php
@@ -0,0 +1,128 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Loader;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\FileLocator;
+use Symfony\Component\Config\Loader\FileLoader;
+use Symfony\Component\Config\Loader\LoaderResolver;
+
+class FileLoaderTest extends TestCase
+{
+ public function testImportWithFileLocatorDelegation()
+ {
+ $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
+
+ $locatorMockForAdditionalLoader = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
+ $locatorMockForAdditionalLoader->expects($this->any())->method('locate')->will($this->onConsecutiveCalls(
+ ['path/to/file1'], // Default
+ ['path/to/file1', 'path/to/file2'], // First is imported
+ ['path/to/file1', 'path/to/file2'], // Second is imported
+ ['path/to/file1'], // Exception
+ ['path/to/file1', 'path/to/file2'] // Exception
+ ));
+
+ $fileLoader = new TestFileLoader($locatorMock);
+ $fileLoader->setSupports(false);
+ $fileLoader->setCurrentDir('.');
+
+ $additionalLoader = new TestFileLoader($locatorMockForAdditionalLoader);
+ $additionalLoader->setCurrentDir('.');
+
+ $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
+ $this->assertSame('path/to/file1', $fileLoader->import('my_resource'));
+
+ // Check second file is imported if first is already loading
+ $fileLoader->addLoading('path/to/file1');
+ $this->assertSame('path/to/file2', $fileLoader->import('my_resource'));
+
+ // Check exception throws if first (and only available) file is already loading
+ try {
+ $fileLoader->import('my_resource');
+ $this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
+ } catch (\Exception $e) {
+ $this->assertInstanceOf('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
+ try {
+ $fileLoader->addLoading('path/to/file2');
+ $fileLoader->import('my_resource');
+ $this->fail('->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
+ } catch (\Exception $e) {
+ $this->assertInstanceOf('Symfony\Component\Config\Exception\FileLoaderImportCircularReferenceException', $e, '->import() throws a FileLoaderImportCircularReferenceException if the resource is already loading');
+ }
+ }
+
+ public function testImportWithGlobLikeResource()
+ {
+ $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
+ $loader = new TestFileLoader($locatorMock);
+
+ $this->assertSame('[foo]', $loader->import('[foo]'));
+ }
+
+ public function testImportWithNoGlobMatch()
+ {
+ $locatorMock = $this->getMockBuilder('Symfony\Component\Config\FileLocatorInterface')->getMock();
+ $loader = new TestFileLoader($locatorMock);
+
+ $this->assertNull($loader->import('./*.abc'));
+ }
+
+ public function testImportWithSimpleGlob()
+ {
+ $loader = new TestFileLoader(new FileLocator(__DIR__));
+
+ $this->assertSame(__FILE__, strtr($loader->import('FileLoaderTest.*'), '/', \DIRECTORY_SEPARATOR));
+ }
+}
+
+class TestFileLoader extends FileLoader
+{
+ private $supports = true;
+
+ public function load($resource, $type = null)
+ {
+ return $resource;
+ }
+
+ public function supports($resource, $type = null)
+ {
+ return $this->supports;
+ }
+
+ public function addLoading($resource)
+ {
+ self::$loading[$resource] = true;
+ }
+
+ public function removeLoading($resource)
+ {
+ unset(self::$loading[$resource]);
+ }
+
+ public function clearLoading()
+ {
+ self::$loading = [];
+ }
+
+ public function setSupports($supports)
+ {
+ $this->supports = $supports;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php
new file mode 100644
index 00000000..aabc2a60
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/LoaderResolverTest.php
@@ -0,0 +1,47 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Loader;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Loader\LoaderResolver;
+
+class LoaderResolverTest extends TestCase
+{
+ public function testConstructor()
+ {
+ $resolver = new LoaderResolver([
+ $loader = $this->getMockBuilder('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('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $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('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $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 LoaderResolver();
+ $resolver->addLoader($loader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock());
+
+ $this->assertEquals([$loader], $resolver->getLoaders(), 'addLoader() adds a loader');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/LoaderTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/LoaderTest.php
new file mode 100644
index 00000000..79ddf00f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Loader/LoaderTest.php
@@ -0,0 +1,116 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Loader;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Loader\Loader;
+
+class LoaderTest extends TestCase
+{
+ public function testGetSetResolver()
+ {
+ $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock();
+
+ $loader = new ProjectLoader1();
+ $loader->setResolver($resolver);
+
+ $this->assertSame($resolver, $loader->getResolver(), '->setResolver() sets the resolver loader');
+ }
+
+ public function testResolve()
+ {
+ $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+
+ $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock();
+ $resolver->expects($this->once())
+ ->method('resolve')
+ ->with('foo.xml')
+ ->willReturn($resolvedLoader);
+
+ $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');
+ }
+
+ public function testResolveWhenResolverCannotFindLoader()
+ {
+ $this->expectException('Symfony\Component\Config\Exception\FileLoaderLoadException');
+ $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock();
+ $resolver->expects($this->once())
+ ->method('resolve')
+ ->with('FOOBAR')
+ ->willReturn(false);
+
+ $loader = new ProjectLoader1();
+ $loader->setResolver($resolver);
+
+ $loader->resolve('FOOBAR');
+ }
+
+ public function testImport()
+ {
+ $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $resolvedLoader->expects($this->once())
+ ->method('load')
+ ->with('foo')
+ ->willReturn('yes');
+
+ $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock();
+ $resolver->expects($this->once())
+ ->method('resolve')
+ ->with('foo')
+ ->willReturn($resolvedLoader);
+
+ $loader = new ProjectLoader1();
+ $loader->setResolver($resolver);
+
+ $this->assertEquals('yes', $loader->import('foo'));
+ }
+
+ public function testImportWithType()
+ {
+ $resolvedLoader = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderInterface')->getMock();
+ $resolvedLoader->expects($this->once())
+ ->method('load')
+ ->with('foo', 'bar')
+ ->willReturn('yes');
+
+ $resolver = $this->getMockBuilder('Symfony\Component\Config\Loader\LoaderResolverInterface')->getMock();
+ $resolver->expects($this->once())
+ ->method('resolve')
+ ->with('foo', 'bar')
+ ->willReturn($resolvedLoader);
+
+ $loader = new ProjectLoader1();
+ $loader->setResolver($resolver);
+
+ $this->assertEquals('yes', $loader->import('foo', 'bar'));
+ }
+}
+
+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);
+ }
+
+ public function getType()
+ {
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php
new file mode 100644
index 00000000..8020a578
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ClassExistenceResourceTest.php
@@ -0,0 +1,130 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\ClassExistenceResource;
+use Symfony\Component\Config\Tests\Fixtures\BadFileName;
+use Symfony\Component\Config\Tests\Fixtures\BadParent;
+use Symfony\Component\Config\Tests\Fixtures\ParseError;
+use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
+
+class ClassExistenceResourceTest extends TestCase
+{
+ public function testToString()
+ {
+ $res = new ClassExistenceResource('BarClass');
+ $this->assertSame('BarClass', (string) $res);
+ }
+
+ public function testGetResource()
+ {
+ $res = new ClassExistenceResource('BarClass');
+ $this->assertSame('BarClass', $res->getResource());
+ }
+
+ public function testIsFreshWhenClassDoesNotExist()
+ {
+ $res = new ClassExistenceResource('Symfony\Component\Config\Tests\Fixtures\BarClass');
+
+ $this->assertTrue($res->isFresh(time()));
+
+ eval(<<assertFalse($res->isFresh(time()));
+ }
+
+ public function testIsFreshWhenClassExists()
+ {
+ $res = new ClassExistenceResource('Symfony\Component\Config\Tests\Resource\ClassExistenceResourceTest');
+
+ $this->assertTrue($res->isFresh(time()));
+ }
+
+ public function testExistsKo()
+ {
+ spl_autoload_register($autoloader = function ($class) use (&$loadedClass) { $loadedClass = $class; });
+
+ try {
+ $res = new ClassExistenceResource('MissingFooClass');
+ $this->assertTrue($res->isFresh(0));
+
+ $this->assertSame('MissingFooClass', $loadedClass);
+
+ $loadedClass = 123;
+
+ new ClassExistenceResource('MissingFooClass', false);
+
+ $this->assertSame(123, $loadedClass);
+ } finally {
+ spl_autoload_unregister($autoloader);
+ }
+ }
+
+ public function testBadParentWithTimestamp()
+ {
+ $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 ClassExistenceResource(BadParent::class, false);
+ $res->isFresh(0);
+ }
+
+ public function testBadFileName()
+ {
+ $this->expectException('ReflectionException');
+ $this->expectExceptionMessage('Mismatch between file name and class name.');
+
+ $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 ClassExistenceResource(BadFileName::class, false);
+ $res->isFresh(0);
+ }
+
+ public function testConditionalClass()
+ {
+ $res = new ClassExistenceResource(ConditionalClass::class, false);
+
+ $this->assertFalse($res->isFresh(0));
+ }
+
+ /**
+ * @requires PHP 7
+ */
+ public function testParseError()
+ {
+ $this->expectException('ParseError');
+
+ $res = new ClassExistenceResource(ParseError::class, false);
+ $res->isFresh(0);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php
new file mode 100644
index 00000000..6857c766
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ComposerResourceTest.php
@@ -0,0 +1,47 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use Composer\Autoload\ClassLoader;
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\ComposerResource;
+
+class ComposerResourceTest extends TestCase
+{
+ public function testGetVendor()
+ {
+ $res = new ComposerResource();
+
+ $r = new \ReflectionClass(ClassLoader::class);
+ $found = false;
+
+ foreach ($res->getVendors() as $vendor) {
+ if ($vendor && 0 === strpos($r->getFileName(), $vendor)) {
+ $found = true;
+ break;
+ }
+ }
+
+ $this->assertTrue($found);
+ }
+
+ public function testSerializeUnserialize()
+ {
+ $res = new ComposerResource();
+ $ser = unserialize(serialize($res));
+
+ $this->assertTrue($res->isFresh(0));
+ $this->assertTrue($ser->isFresh(0));
+
+ $this->assertEquals($res, $ser);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php
new file mode 100644
index 00000000..700df456
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/DirectoryResourceTest.php
@@ -0,0 +1,181 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\DirectoryResource;
+
+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);
+ }
+ touch($this->directory.'/tmp.xml');
+ }
+
+ protected function tearDown()
+ {
+ if (!is_dir($this->directory)) {
+ return;
+ }
+ $this->removeDirectory($this->directory);
+ }
+
+ protected function removeDirectory($directory)
+ {
+ $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory), \RecursiveIteratorIterator::CHILD_FIRST);
+ foreach ($iterator as $path) {
+ if (preg_match('#[/\\\\]\.\.?$#', $path->__toString())) {
+ continue;
+ }
+ if ($path->isDir()) {
+ rmdir($path->__toString());
+ } else {
+ unlink($path->__toString());
+ }
+ }
+ rmdir($directory);
+ }
+
+ public function testGetResource()
+ {
+ $resource = new DirectoryResource($this->directory);
+ $this->assertSame(realpath($this->directory), $resource->getResource(), '->getResource() returns the path to the resource');
+ }
+
+ public function testGetPattern()
+ {
+ $resource = new DirectoryResource($this->directory, 'bar');
+ $this->assertEquals('bar', $resource->getPattern());
+ }
+
+ public function testResourceDoesNotExist()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessageMatches('/The directory ".*" does not exist./');
+ new DirectoryResource('/____foo/foobar'.mt_rand(1, 999999));
+ }
+
+ public function testIsFresh()
+ {
+ $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 DirectoryResource($this->directory);
+ $this->removeDirectory($this->directory);
+
+ $this->assertFalse($resource->isFresh(time()), '->isFresh() returns false if the resource does not exist');
+ }
+
+ public function testIsFreshUpdateFile()
+ {
+ $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 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 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 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 DirectoryResource($this->directory);
+ $this->removeDirectory($this->directory);
+ $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 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 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)');
+ }
+
+ public function testFilterRegexListNoMatch()
+ {
+ $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 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 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 DirectoryResource($this->directory, '/.xml$/');
+ $resourceB = new DirectoryResource($this->directory, '/.yaml$/');
+
+ $this->assertCount(2, array_unique([$resourceA, $resourceB]));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php
new file mode 100644
index 00000000..ff7fc7b5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/FileExistenceResourceTest.php
@@ -0,0 +1,71 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\FileExistenceResource;
+
+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 FileExistenceResource($this->file);
+ }
+
+ protected function tearDown()
+ {
+ if (file_exists($this->file)) {
+ @unlink($this->file);
+ }
+ }
+
+ public function testToString()
+ {
+ $this->assertSame($this->file, (string) $this->resource);
+ }
+
+ public function testGetResource()
+ {
+ $this->assertSame($this->file, $this->resource->getResource(), '->getResource() returns the path to the resource');
+ }
+
+ public function testIsFreshWithExistingResource()
+ {
+ 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);
+ $this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been deleted');
+ }
+
+ public function testIsFreshWithAbsentResource()
+ {
+ $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);
+ $this->assertFalse($resource->isFresh($this->time), '->isFresh() returns false if the resource has been created');
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/FileResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/FileResourceTest.php
new file mode 100644
index 00000000..a84faa95
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/FileResourceTest.php
@@ -0,0 +1,81 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\FileResource;
+
+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 FileResource($this->file);
+ }
+
+ protected function tearDown()
+ {
+ if (file_exists($this->file)) {
+ @unlink($this->file);
+ }
+ }
+
+ public function testGetResource()
+ {
+ $this->assertSame(realpath($this->file), $this->resource->getResource(), '->getResource() returns the path to the resource');
+ }
+
+ public function testGetResourceWithScheme()
+ {
+ $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);
+ }
+
+ public function testResourceDoesNotExist()
+ {
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessageMatches('/The file ".*" does not exist./');
+ new FileResource('/____foo/foobar'.mt_rand(1, 999999));
+ }
+
+ public function testIsFresh()
+ {
+ $this->assertTrue($this->resource->isFresh($this->time), '->isFresh() returns true if the resource has not changed in same second');
+ $this->assertTrue($this->resource->isFresh($this->time + 10), '->isFresh() returns true if the resource has not changed');
+ $this->assertFalse($this->resource->isFresh($this->time - 86400), '->isFresh() returns false if the resource has been updated');
+ }
+
+ public function testIsFreshForDeletedResources()
+ {
+ 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());
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/GlobResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/GlobResourceTest.php
new file mode 100644
index 00000000..cfbfd2b4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/GlobResourceTest.php
@@ -0,0 +1,114 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\GlobResource;
+
+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');
+ }
+
+ public function testIterator()
+ {
+ $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 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->assertSame($dir, $resource->getPrefix());
+ }
+
+ public function testIsFreshNonRecursiveDetectsNewFile()
+ {
+ $dir = \dirname(__DIR__).'/Fixtures';
+ $resource = new GlobResource($dir, '/*', false);
+
+ $this->assertTrue($resource->isFresh(0));
+
+ mkdir($dir.'/TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+
+ rmdir($dir.'/TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+
+ touch($dir.'/TmpGlob');
+ $this->assertFalse($resource->isFresh(0));
+
+ unlink($dir.'/TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+ }
+
+ public function testIsFreshNonRecursiveDetectsRemovedFile()
+ {
+ $dir = \dirname(__DIR__).'/Fixtures';
+ $resource = new GlobResource($dir, '/*', false);
+
+ touch($dir.'/TmpGlob');
+ touch($dir.'/.TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+
+ unlink($dir.'/.TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+
+ unlink($dir.'/TmpGlob');
+ $this->assertFalse($resource->isFresh(0));
+ }
+
+ public function testIsFreshRecursiveDetectsRemovedFile()
+ {
+ $dir = \dirname(__DIR__).'/Fixtures';
+ $resource = new GlobResource($dir, '/*', true);
+
+ touch($dir.'/Resource/TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+
+ unlink($dir.'/Resource/TmpGlob');
+ $this->assertFalse($resource->isFresh(0));
+
+ touch($dir.'/Resource/TmpGlob');
+ $this->assertTrue($resource->isFresh(0));
+
+ unlink($dir.'/Resource/.hiddenFile');
+ $this->assertTrue($resource->isFresh(0));
+ }
+
+ public function testIsFreshRecursiveDetectsNewFile()
+ {
+ $dir = \dirname(__DIR__).'/Fixtures';
+ $resource = new GlobResource($dir, '/*', true);
+
+ $this->assertTrue($resource->isFresh(0));
+
+ touch($dir.'/Resource/TmpGlob');
+ $this->assertFalse($resource->isFresh(0));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php
new file mode 100644
index 00000000..74ed6b3e
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ReflectionClassResourceTest.php
@@ -0,0 +1,223 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\ReflectionClassResource;
+use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
+use Symfony\Component\EventDispatcher\EventSubscriberInterface;
+
+class ReflectionClassResourceTest extends TestCase
+{
+ public function testToString()
+ {
+ $res = new ReflectionClassResource(new \ReflectionClass('ErrorException'));
+
+ $this->assertSame('reflection.ErrorException', (string) $res);
+ }
+
+ public function testSerializeUnserialize()
+ {
+ $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 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);
+ $this->assertFalse($res->isFresh($now), '->isFresh() returns false if the resource does not exist');
+ }
+
+ /**
+ * @dataProvider provideHashedSignature
+ */
+ public function testHashedSignature($changeExpected, $changedLine, $changedCode, $setContext = null)
+ {
+ if ($setContext) {
+ $setContext();
+ }
+
+ $code = <<<'EOPHP'
+/* 0*/
+/* 1*/ class %s extends ErrorException
+/* 2*/ {
+/* 3*/ const FOO = 123;
+/* 4*/
+/* 5*/ public $pub = [];
+/* 6*/
+/* 7*/ protected $prot;
+/* 8*/
+/* 9*/ private $priv;
+/*10*/
+/*11*/ public function pub($arg = null) {}
+/*12*/
+/*13*/ protected function prot($a = []) {}
+/*14*/
+/*15*/ private function priv() {}
+/*16*/
+/*17*/ public function ccc($bar = A_CONSTANT_THAT_FOR_SURE_WILL_NEVER_BE_DEFINED_CCCCCC) {}
+/*18*/ }
+EOPHP;
+
+ static $expectedSignature, $generateSignature;
+
+ if (null === $expectedSignature) {
+ eval(sprintf($code, $class = 'Foo'.str_replace('.', '_', uniqid('', true))));
+ $r = new \ReflectionClass(ReflectionClassResource::class);
+ $generateSignature = $r->getMethod('generateSignature');
+ $generateSignature->setAccessible(true);
+ $generateSignature = $generateSignature->getClosure($r->newInstanceWithoutConstructor());
+ $expectedSignature = implode("\n", iterator_to_array($generateSignature(new \ReflectionClass($class))));
+ }
+
+ $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))));
+
+ if ($changeExpected) {
+ $this->assertNotSame($expectedSignature, $signature);
+ } else {
+ $this->assertSame($expectedSignature, $signature);
+ }
+ }
+
+ public function provideHashedSignature()
+ {
+ yield [0, 0, "// line change\n\n"];
+ yield [1, 0, '/** class docblock */'];
+ 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 '.DummyInterface::class];
+ yield [1, 3, 'const FOO = 456;'];
+ yield [1, 3, 'const BAR = 123;'];
+ yield [1, 4, '/** pub docblock */'];
+ yield [1, 5, 'protected $pub = [];'];
+ yield [1, 5, 'public $pub = [123];'];
+ yield [1, 6, '/** prot docblock */'];
+ yield [1, 7, 'private $prot;'];
+ yield [0, 8, '/** priv docblock */'];
+ yield [0, 9, 'private $priv = 123;'];
+ yield [1, 10, '/** pub docblock */'];
+ if (\PHP_VERSION_ID >= 50600) {
+ yield [1, 11, 'public function pub(...$arg) {}'];
+ }
+ 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}"];
+ yield [1, 12, '/** prot docblock */'];
+ yield [1, 13, 'protected function prot($a = [123]) {}'];
+ yield [0, 14, '/** priv docblock */'];
+ yield [0, 15, ''];
+
+ 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;'];
+ yield [0, 7, 'protected int $prot;'];
+ yield [0, 9, 'private string $priv;'];
+ }
+
+ 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'); }];
+ }
+
+ public function testEventSubscriber()
+ {
+ $res = new ReflectionClassResource(new \ReflectionClass(TestEventSubscriber::class));
+ $this->assertTrue($res->isFresh(0));
+
+ TestEventSubscriber::$subscribedEvents = [123];
+ $this->assertFalse($res->isFresh(0));
+
+ $res = new ReflectionClassResource(new \ReflectionClass(TestEventSubscriber::class));
+ $this->assertTrue($res->isFresh(0));
+ }
+
+ public function testServiceSubscriber()
+ {
+ $res = new ReflectionClassResource(new \ReflectionClass(TestServiceSubscriber::class));
+ $this->assertTrue($res->isFresh(0));
+
+ TestServiceSubscriber::$subscribedServices = [123];
+ $this->assertFalse($res->isFresh(0));
+
+ $res = new ReflectionClassResource(new \ReflectionClass(TestServiceSubscriber::class));
+ $this->assertTrue($res->isFresh(0));
+ }
+
+ public function testIgnoresObjectsInSignature()
+ {
+ $res = new ReflectionClassResource(new \ReflectionClass(TestServiceWithStaticProperty::class));
+ $this->assertTrue($res->isFresh(0));
+
+ TestServiceWithStaticProperty::$initializedObject = new TestServiceWithStaticProperty();
+ $this->assertTrue($res->isFresh(0));
+ }
+}
+
+interface DummyInterface
+{
+}
+
+class TestEventSubscriber implements EventSubscriberInterface
+{
+ public static $subscribedEvents = [];
+
+ public static function getSubscribedEvents()
+ {
+ return self::$subscribedEvents;
+ }
+}
+
+class TestServiceSubscriber implements ServiceSubscriberInterface
+{
+ public static $subscribedServices = [];
+
+ public static function getSubscribedServices()
+ {
+ return self::$subscribedServices;
+ }
+}
+
+class TestServiceWithStaticProperty
+{
+ public static $initializedObject;
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ResourceStub.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ResourceStub.php
new file mode 100644
index 00000000..b01729cb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Resource/ResourceStub.php
@@ -0,0 +1,34 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Resource;
+
+use Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
+
+class ResourceStub implements SelfCheckingResourceInterface
+{
+ private $fresh = true;
+
+ public function setFresh($isFresh)
+ {
+ $this->fresh = $isFresh;
+ }
+
+ public function __toString()
+ {
+ return 'stub';
+ }
+
+ public function isFresh($timestamp)
+ {
+ return $this->fresh;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php
new file mode 100644
index 00000000..9be53196
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/ResourceCheckerConfigCacheTest.php
@@ -0,0 +1,150 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Resource\FileResource;
+use Symfony\Component\Config\ResourceCheckerConfigCache;
+use Symfony\Component\Config\Tests\Resource\ResourceStub;
+
+class ResourceCheckerConfigCacheTest extends TestCase
+{
+ private $cacheFile = null;
+
+ protected function setUp()
+ {
+ $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);
+ }
+ }
+ }
+
+ public function testGetPath()
+ {
+ $cache = new ResourceCheckerConfigCache($this->cacheFile);
+
+ $this->assertSame($this->cacheFile, $cache->getPath());
+ }
+
+ public function testCacheIsNotFreshIfEmpty()
+ {
+ $checker = $this->getMockBuilder('\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); // remove tempnam() side effect
+ $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 ResourceCheckerConfigCache($this->cacheFile);
+ $this->assertTrue($cache->isFresh());
+ }
+
+ public function testCacheIsFreshIfEmptyCheckerIteratorProvided()
+ {
+ $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 ResourceCheckerConfigCache($this->cacheFile);
+ $cache->write('', [new ResourceStub()]);
+
+ $this->assertTrue($cache->isFresh()); // no (matching) ResourceChecker passed
+ }
+
+ public function testIsFreshWithchecker()
+ {
+ $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock();
+
+ $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('\Symfony\Component\Config\ResourceCheckerInterface')->getMock();
+
+ $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('\Symfony\Component\Config\ResourceCheckerInterface')->getMock();
+ $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)));
+
+ $this->assertFalse($cache->isFresh());
+ }
+
+ public function testCacheKeepsContent()
+ {
+ $cache = new ResourceCheckerConfigCache($this->cacheFile);
+ $cache->write('FOOBAR');
+
+ $this->assertSame('FOOBAR', file_get_contents($cache->getPath()));
+ }
+
+ public function testCacheIsNotFreshIfNotExistsMetaFile()
+ {
+ $checker = $this->getMockBuilder('\Symfony\Component\Config\ResourceCheckerInterface')->getMock();
+ $cache = new ResourceCheckerConfigCache($this->cacheFile, [$checker]);
+ $cache->write('foo', [new FileResource(__FILE__)]);
+
+ $metaFile = "{$this->cacheFile}.meta";
+ unlink($metaFile);
+
+ $this->assertFalse($cache->isFresh());
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Tests/Util/XmlUtilsTest.php b/modules/empikmarketplace/vendor/symfony/config/Tests/Util/XmlUtilsTest.php
new file mode 100644
index 00000000..f0b77ae6
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Tests/Util/XmlUtilsTest.php
@@ -0,0 +1,240 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Tests\Util;
+
+use PHPUnit\Framework\TestCase;
+use Symfony\Component\Config\Util\XmlUtils;
+
+class XmlUtilsTest extends TestCase
+{
+ public function testLoadFile()
+ {
+ $fixtures = __DIR__.'/../Fixtures/Util/';
+
+ try {
+ XmlUtils::loadFile($fixtures);
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertStringContainsString('is not a file', $e->getMessage());
+ }
+
+ try {
+ XmlUtils::loadFile($fixtures.'non_existing.xml');
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertStringContainsString('is not a file', $e->getMessage());
+ }
+
+ try {
+ if ('\\' === \DIRECTORY_SEPARATOR) {
+ $this->markTestSkipped('chmod is not supported on Windows');
+ }
+ chmod($fixtures.'not_readable.xml', 000);
+ XmlUtils::loadFile($fixtures.'not_readable.xml');
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ chmod($fixtures.'not_readable.xml', 0644);
+ $this->assertStringContainsString('is not readable', $e->getMessage());
+ }
+
+ try {
+ XmlUtils::loadFile($fixtures.'invalid.xml');
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertStringContainsString('ERROR ', $e->getMessage());
+ }
+
+ try {
+ XmlUtils::loadFile($fixtures.'document_type.xml');
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertStringContainsString('Document types are not allowed', $e->getMessage());
+ }
+
+ try {
+ XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd');
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertStringContainsString('ERROR 1845', $e->getMessage());
+ }
+
+ try {
+ XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file');
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertStringContainsString('XSD file or callable', $e->getMessage());
+ }
+
+ $mock = $this->getMockBuilder(Validator::class)->getMock();
+ $mock->expects($this->exactly(2))->method('validate')->will($this->onConsecutiveCalls(false, true));
+
+ try {
+ XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate']);
+ $this->fail();
+ } catch (\InvalidArgumentException $e) {
+ $this->assertMatchesRegularExpression('/The XML file ".+" is not valid\./', $e->getMessage());
+ }
+
+ $this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', [$mock, 'validate']));
+ $this->assertSame([], libxml_get_errors());
+ }
+
+ public function testParseWithInvalidValidatorCallable()
+ {
+ $this->expectException('Symfony\Component\Config\Util\Exception\InvalidXmlException');
+ $this->expectExceptionMessage('The XML is not valid');
+ $fixtures = __DIR__.'/../Fixtures/Util/';
+
+ $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', 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)
+ {
+ $dom = new \DOMDocument();
+ $dom->loadXML($root ? $xml : ''.$xml.'');
+
+ $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],
+ ];
+ }
+
+ /**
+ * @dataProvider getDataForPhpize
+ */
+ public function testPhpize($expected, $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'],
+ ];
+ }
+
+ 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));
+
+ XmlUtils::loadFile($file);
+ }
+
+ // test for issue https://github.com/symfony/symfony/issues/9731
+ public function testLoadWrongEmptyXMLWithErrorHandler()
+ {
+ if (\LIBXML_VERSION < 20900) {
+ $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 {
+ 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());
+ }
+ } finally {
+ restore_error_handler();
+ error_reporting($errorReporting);
+ }
+
+ if (\LIBXML_VERSION < 20900) {
+ $disableEntities = libxml_disable_entity_loader(true);
+ libxml_disable_entity_loader($disableEntities);
+
+ libxml_disable_entity_loader($originalDisableEntities);
+ $this->assertFalse($disableEntities);
+ }
+
+ // should not throw an exception
+ XmlUtils::loadFile(__DIR__.'/../Fixtures/Util/valid.xml', __DIR__.'/../Fixtures/Util/schema.xsd');
+ }
+}
+
+interface Validator
+{
+ public function validate();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Util/Exception/InvalidXmlException.php b/modules/empikmarketplace/vendor/symfony/config/Util/Exception/InvalidXmlException.php
new file mode 100644
index 00000000..a335bbd2
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Util/Exception/InvalidXmlException.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Util\Exception;
+
+/**
+ * Exception class for when XML parsing with an XSD schema file path or a callable validator produces errors unrelated
+ * to the actual XML parsing.
+ *
+ * @author Ole Rößner
+ */
+class InvalidXmlException extends XmlParsingException
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Util/Exception/XmlParsingException.php b/modules/empikmarketplace/vendor/symfony/config/Util/Exception/XmlParsingException.php
new file mode 100644
index 00000000..9bceed66
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Util/Exception/XmlParsingException.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Util\Exception;
+
+/**
+ * Exception class for when XML cannot be parsed properly.
+ *
+ * @author Ole Rößner
+ */
+class XmlParsingException extends \InvalidArgumentException
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/Util/XmlUtils.php b/modules/empikmarketplace/vendor/symfony/config/Util/XmlUtils.php
new file mode 100644
index 00000000..d833c428
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/Util/XmlUtils.php
@@ -0,0 +1,284 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\Config\Util;
+
+use Symfony\Component\Config\Util\Exception\InvalidXmlException;
+use Symfony\Component\Config\Util\Exception\XmlParsingException;
+
+/**
+ * XMLUtils is a bunch of utility methods to XML operations.
+ *
+ * This class contains static methods only and is not meant to be instantiated.
+ *
+ * @author Fabien Potencier
+ * @author Martin Hasoň
+ * @author Ole Rößner
+ */
+class XmlUtils
+{
+ /**
+ * This class should not be instantiated.
+ */
+ private function __construct()
+ {
+ }
+
+ /**
+ * Parses an XML string.
+ *
+ * @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
+ *
+ * @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
+ */
+ public static function parse($content, $schemaOrCallable = null)
+ {
+ if (!\extension_loaded('dom')) {
+ throw new \RuntimeException('Extension DOM is required.');
+ }
+
+ $internalErrors = libxml_use_internal_errors(true);
+ if (\LIBXML_VERSION < 20900) {
+ $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))) {
+ if (\LIBXML_VERSION < 20900) {
+ libxml_disable_entity_loader($disableEntities);
+ }
+
+ throw new XmlParsingException(implode("\n", static::getXmlErrors($internalErrors)));
+ }
+
+ $dom->normalizeDocument();
+
+ libxml_use_internal_errors($internalErrors);
+ if (\LIBXML_VERSION < 20900) {
+ libxml_disable_entity_loader($disableEntities);
+ }
+
+ foreach ($dom->childNodes as $child) {
+ 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();
+
+ $e = null;
+ if (\is_callable($schemaOrCallable)) {
+ try {
+ $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);
+ $valid = @$dom->schemaValidateSource($schemaSource);
+ } else {
+ 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 InvalidXmlException('The XML is not valid.', 0, $e);
+ }
+ throw new XmlParsingException(implode("\n", $messages), 0, $e);
+ }
+ }
+
+ libxml_clear_errors();
+ libxml_use_internal_errors($internalErrors);
+
+ return $dom;
+ }
+
+ /**
+ * Loads an XML file.
+ *
+ * @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
+ *
+ * @throws \InvalidArgumentException When loading of XML file returns error
+ * @throws XmlParsingException When XML parsing returns any errors
+ * @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_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));
+ }
+
+ try {
+ return static::parse($content, $schemaOrCallable);
+ } catch (InvalidXmlException $e) {
+ throw new XmlParsingException(sprintf('The XML file "%s" is not valid.', $file), 0, $e->getPrevious());
+ }
+ }
+
+ /**
+ * Converts a \DOMElement object to a PHP array.
+ *
+ * The following rules applies during the conversion:
+ *
+ * * Each tag is converted to a key value or an array
+ * if there is more than one "value"
+ *
+ * * The content of a tag is set under a "value" key (bar)
+ * if the tag also has some nested tags
+ *
+ * * The attributes are converted to keys ()
+ *
+ * * The nested-tags are converted to keys (bar)
+ *
+ * @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)
+ {
+ $prefix = (string) $element->prefix;
+ $empty = true;
+ $config = [];
+ foreach ($element->attributes as $name => $node) {
+ if ($checkPrefix && !\in_array((string) $node->prefix, ['', $prefix], true)) {
+ continue;
+ }
+ $config[$name] = static::phpize($node->value);
+ $empty = false;
+ }
+
+ $nodeValue = false;
+ foreach ($element->childNodes as $node) {
+ 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) {
+ $value = static::convertDomElementToArray($node, $checkPrefix);
+
+ $key = $node->localName;
+ if (isset($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;
+ }
+ }
+
+ if (false !== $nodeValue) {
+ $value = static::phpize($nodeValue);
+ if (\count($config)) {
+ $config['value'] = $value;
+ } else {
+ $config = $value;
+ }
+ }
+
+ return !$empty ? $config : null;
+ }
+
+ /**
+ * Converts an xml value to a PHP type.
+ *
+ * @param mixed $value
+ *
+ * @return mixed
+ */
+ public static function phpize($value)
+ {
+ $value = (string) $value;
+ $lowercaseValue = strtolower($value);
+
+ switch (true) {
+ case 'null' === $lowercaseValue:
+ return null;
+ 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)):
+ $raw = $value;
+ $cast = (int) $value;
+
+ return '0' == $value[1] ? octdec($value) : (((string) $raw === (string) $cast) ? $cast : $raw);
+ case 'true' === $lowercaseValue:
+ 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 (float) $value;
+ default:
+ return $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
+ );
+ }
+
+ libxml_clear_errors();
+ libxml_use_internal_errors($internalErrors);
+
+ return $errors;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/composer.json b/modules/empikmarketplace/vendor/symfony/config/composer.json
new file mode 100644
index 00000000..5088bdd8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/composer.json
@@ -0,0 +1,43 @@
+{
+ "name": "symfony/config",
+ "type": "library",
+ "description": "Symfony Config Component",
+ "keywords": [],
+ "homepage": "https://symfony.com",
+ "license": "MIT",
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "require": {
+ "php": "^5.5.9|>=7.0.8",
+ "symfony/filesystem": "~2.8|~3.0|~4.0",
+ "symfony/polyfill-ctype": "~1.8"
+ },
+ "require-dev": {
+ "symfony/finder": "~3.3|~4.0",
+ "symfony/yaml": "~3.0|~4.0",
+ "symfony/dependency-injection": "~3.3|~4.0",
+ "symfony/event-dispatcher": "~3.3|~4.0"
+ },
+ "conflict": {
+ "symfony/finder": "<3.3",
+ "symfony/dependency-injection": "<3.3"
+ },
+ "suggest": {
+ "symfony/yaml": "To use the yaml reference dumper"
+ },
+ "autoload": {
+ "psr-4": { "Symfony\\Component\\Config\\": "" },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "minimum-stability": "dev"
+}
diff --git a/modules/empikmarketplace/vendor/symfony/config/phpunit.xml.dist b/modules/empikmarketplace/vendor/symfony/config/phpunit.xml.dist
new file mode 100644
index 00000000..1cfdb3cd
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/config/phpunit.xml.dist
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+ ./Tests/
+
+
+
+
+
+ ./
+
+ ./Resources
+ ./Tests
+ ./vendor
+
+
+
+
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/.gitignore b/modules/empikmarketplace/vendor/symfony/dependency-injection/.gitignore
new file mode 100644
index 00000000..c49a5d8d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/.gitignore
@@ -0,0 +1,3 @@
+vendor/
+composer.lock
+phpunit.xml
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Alias.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Alias.php
new file mode 100644
index 00000000..de14c5ea
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Alias.php
@@ -0,0 +1,94 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+class Alias
+{
+ private $id;
+ private $public;
+ private $private;
+
+ /**
+ * @param string $id Alias identifier
+ * @param bool $public If this alias is public
+ */
+ public function __construct($id, $public = true)
+ {
+ $this->id = (string) $id;
+ $this->public = $public;
+ $this->private = 2 > \func_num_args();
+ }
+
+ /**
+ * Checks if this DI Alias should be public or not.
+ *
+ * @return bool
+ */
+ public function isPublic()
+ {
+ return $this->public;
+ }
+
+ /**
+ * Sets if this Alias is public.
+ *
+ * @param bool $boolean If this Alias should be public
+ *
+ * @return $this
+ */
+ public function setPublic($boolean)
+ {
+ $this->public = (bool) $boolean;
+ $this->private = false;
+
+ return $this;
+ }
+
+ /**
+ * Sets if this Alias is private.
+ *
+ * When set, the "private" state has a higher precedence than "public".
+ * In version 3.4, a "private" alias always remains publicly accessible,
+ * but triggers a deprecation notice when accessed from the container,
+ * so that the alias can be made really private in 4.0.
+ *
+ * @param bool $boolean
+ *
+ * @return $this
+ */
+ public function setPrivate($boolean)
+ {
+ $this->private = (bool) $boolean;
+
+ return $this;
+ }
+
+ /**
+ * Whether this alias is private.
+ *
+ * @return bool
+ */
+ public function isPrivate()
+ {
+ return $this->private;
+ }
+
+ /**
+ * Returns the Id of this alias.
+ *
+ * @return string The alias id
+ */
+ public function __toString()
+ {
+ return $this->id;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php
new file mode 100644
index 00000000..b46eb77b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/ArgumentInterface.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Argument;
+
+/**
+ * Represents a complex argument containing nested values.
+ *
+ * @author Titouan Galopin
+ */
+interface ArgumentInterface
+{
+ /**
+ * @return array
+ */
+ public function getValues();
+
+ public function setValues(array $values);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/BoundArgument.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/BoundArgument.php
new file mode 100644
index 00000000..a2069844
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/BoundArgument.php
@@ -0,0 +1,46 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Argument;
+
+/**
+ * @author Guilhem Niot
+ */
+final class BoundArgument implements ArgumentInterface
+{
+ private static $sequence = 0;
+
+ private $value;
+ private $identifier;
+ private $used;
+
+ public function __construct($value)
+ {
+ $this->value = $value;
+ $this->identifier = ++self::$sequence;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getValues()
+ {
+ return [$this->value, $this->identifier, $this->used];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setValues(array $values)
+ {
+ list($this->value, $this->identifier, $this->used) = $values;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/IteratorArgument.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
new file mode 100644
index 00000000..2d796d2d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/IteratorArgument.php
@@ -0,0 +1,55 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Argument;
+
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Represents a collection of values to lazily iterate over.
+ *
+ * @author Titouan Galopin
+ */
+class IteratorArgument implements ArgumentInterface
+{
+ private $values;
+
+ /**
+ * @param Reference[] $values
+ */
+ public function __construct(array $values)
+ {
+ $this->setValues($values);
+ }
+
+ /**
+ * @return array The values to lazily iterate over
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * @param Reference[] $values The service references to lazily iterate over
+ */
+ public function setValues(array $values)
+ {
+ foreach ($values as $k => $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/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
new file mode 100644
index 00000000..b00a36c3
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/RewindableGenerator.php
@@ -0,0 +1,46 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Argument;
+
+/**
+ * @internal
+ */
+class RewindableGenerator implements \IteratorAggregate, \Countable
+{
+ private $generator;
+ private $count;
+
+ /**
+ * @param int|callable $count
+ */
+ public function __construct(callable $generator, $count)
+ {
+ $this->generator = $generator;
+ $this->count = $count;
+ }
+
+ public function getIterator()
+ {
+ $g = $this->generator;
+
+ return $g();
+ }
+
+ public function count()
+ {
+ if (\is_callable($count = $this->count)) {
+ $this->count = $count();
+ }
+
+ return $this->count;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
new file mode 100644
index 00000000..6331affa
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php
@@ -0,0 +1,50 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Argument;
+
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Represents a service wrapped in a memoizing closure.
+ *
+ * @author Nicolas Grekas
+ */
+class ServiceClosureArgument implements ArgumentInterface
+{
+ private $values;
+
+ public function __construct(Reference $reference)
+ {
+ $this->values = [$reference];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getValues()
+ {
+ return $this->values;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setValues(array $values)
+ {
+ 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/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
new file mode 100644
index 00000000..f00e5339
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Argument/TaggedIteratorArgument.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Argument;
+
+/**
+ * Represents a collection of services found by tag name to lazily iterate over.
+ *
+ * @author Roland Franssen
+ */
+class TaggedIteratorArgument extends IteratorArgument
+{
+ private $tag;
+
+ /**
+ * @param string $tag
+ */
+ public function __construct($tag)
+ {
+ parent::__construct([]);
+
+ $this->tag = (string) $tag;
+ }
+
+ public function getTag()
+ {
+ return $this->tag;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/CHANGELOG.md b/modules/empikmarketplace/vendor/symfony/dependency-injection/CHANGELOG.md
new file mode 100644
index 00000000..a004161b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/CHANGELOG.md
@@ -0,0 +1,116 @@
+CHANGELOG
+=========
+
+3.4.0
+-----
+
+ * moved the `ExtensionCompilerPass` to before-optimization passes with priority -1000
+ * deprecated "public-by-default" definitions and aliases, the new default will be "private" in 4.0
+ * added `EnvVarProcessorInterface` and corresponding "container.env_var_processor" tag for processing env vars
+ * added support for ignore-on-uninitialized references
+ * deprecated service auto-registration while autowiring
+ * deprecated the ability to check for the initialization of a private service with the `Container::initialized()` method
+ * deprecated support for top-level anonymous services in XML
+ * deprecated case insensitivity of parameter names
+ * deprecated the `ResolveDefinitionTemplatesPass` class in favor of `ResolveChildDefinitionsPass`
+ * added `TaggedIteratorArgument` with YAML (`!tagged foo`) and XML (``) support
+ * deprecated `AutowireExceptionPass` and `AutowirePass::getAutowiringExceptions()`, use `Definition::addError()` and the `DefinitionErrorExceptionPass` instead
+
+
+3.3.0
+-----
+
+ * deprecated autowiring services based on the types they implement;
+ rename (or alias) your services to their FQCN id to make them autowirable
+ * added "ServiceSubscriberInterface" - to allow for per-class explicit service-locator definitions
+ * added "container.service_locator" tag for defining service-locator services
+ * added anonymous services support in YAML configuration files using the `!service` tag.
+ * added "TypedReference" and "ServiceClosureArgument" for creating service-locator services
+ * added `ServiceLocator` - a PSR-11 container holding a set of services to be lazily loaded
+ * added "instanceof" section for local interface-defined configs
+ * added prototype services for PSR4-based discovery and registration
+ * added `ContainerBuilder::getReflectionClass()` for retrieving and tracking reflection class info
+ * deprecated `ContainerBuilder::getClassResource()`, use `ContainerBuilder::getReflectionClass()` or `ContainerBuilder::addObjectResource()` instead
+ * added `ContainerBuilder::fileExists()` for checking and tracking file or directory existence
+ * deprecated autowiring-types, use aliases instead
+ * added support for omitting the factory class name in a service definition if the definition class is set
+ * deprecated case insensitivity of service identifiers
+ * added "iterator" argument type for lazy iteration over a set of values and services
+ * added file-wide configurable defaults for service attributes "public", "tags",
+ "autowire" and "autoconfigure"
+ * made the "class" attribute optional, using the "id" as fallback
+ * using the `PhpDumper` with an uncompiled `ContainerBuilder` is deprecated and
+ will not be supported anymore in 4.0
+ * deprecated the `DefinitionDecorator` class in favor of `ChildDefinition`
+ * allow config files to be loaded using a glob pattern
+ * [BC BREAK] the `NullDumper` class is now final
+
+3.2.0
+-----
+
+ * allowed to prioritize compiler passes by introducing a third argument to `PassConfig::addPass()`, to `Compiler::addPass` and to `ContainerBuilder::addCompilerPass()`
+ * added support for PHP constants in YAML configuration files
+ * deprecated the ability to set or unset a private service with the `Container::set()` method
+ * deprecated the ability to check for the existence of a private service with the `Container::has()` method
+ * deprecated the ability to request a private service with the `Container::get()` method
+ * deprecated support for generating a dumped `Container` without populating the method map
+
+3.0.0
+-----
+
+ * removed all deprecated codes from 2.x versions
+
+2.8.0
+-----
+
+ * deprecated the abstract ContainerAware class in favor of ContainerAwareTrait
+ * deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0
+ * allowed specifying a directory to recursively load all configuration files it contains
+ * deprecated the concept of scopes
+ * added `Definition::setShared()` and `Definition::isShared()`
+ * added ResettableContainerInterface to be able to reset the container to release memory on shutdown
+ * added a way to define the priority of service decoration
+ * added support for service autowiring
+
+2.7.0
+-----
+
+ * deprecated synchronized services
+
+2.6.0
+-----
+
+ * added new factory syntax and deprecated the old one
+
+2.5.0
+-----
+
+* added DecoratorServicePass and a way to override a service definition (Definition::setDecoratedService())
+* deprecated SimpleXMLElement class.
+
+2.4.0
+-----
+
+ * added support for expressions in service definitions
+ * added ContainerAwareTrait to add default container aware behavior to a class
+
+2.2.0
+-----
+
+ * added Extension::isConfigEnabled() to ease working with enableable configurations
+ * added an Extension base class with sensible defaults to be used in conjunction
+ with the Config component.
+ * added PrependExtensionInterface (to be able to allow extensions to prepend
+ application configuration settings for any Bundle)
+
+2.1.0
+-----
+
+ * added IntrospectableContainerInterface (to be able to check if a service
+ has been initialized or not)
+ * added ConfigurationExtensionInterface
+ * added Definition::clearTag()
+ * component exceptions that inherit base SPL classes are now used exclusively
+ (this includes dumped containers)
+ * [BC BREAK] fixed unescaping of class arguments, method
+ ParameterBag::unescapeValue() was made public
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/ChildDefinition.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/ChildDefinition.php
new file mode 100644
index 00000000..123b3874
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/ChildDefinition.php
@@ -0,0 +1,126 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
+
+/**
+ * This definition extends another definition.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ChildDefinition extends Definition
+{
+ private $parent;
+
+ /**
+ * @param string $parent The id of Definition instance to decorate
+ */
+ public function __construct($parent)
+ {
+ $this->parent = $parent;
+ $this->setPrivate(false);
+ }
+
+ /**
+ * Returns the Definition to inherit from.
+ *
+ * @return string
+ */
+ public function getParent()
+ {
+ return $this->parent;
+ }
+
+ /**
+ * Sets the Definition to inherit from.
+ *
+ * @param string $parent
+ *
+ * @return $this
+ */
+ public function setParent($parent)
+ {
+ $this->parent = $parent;
+
+ return $this;
+ }
+
+ /**
+ * Gets an argument to pass to the service constructor/factory method.
+ *
+ * If replaceArgument() has been used to replace an argument, this method
+ * will return the replacement value.
+ *
+ * @param int|string $index
+ *
+ * @return mixed The argument value
+ *
+ * @throws OutOfBoundsException When the argument does not exist
+ */
+ public function getArgument($index)
+ {
+ if (\array_key_exists('index_'.$index, $this->arguments)) {
+ return $this->arguments['index_'.$index];
+ }
+
+ return parent::getArgument($index);
+ }
+
+ /**
+ * You should always use this method when overwriting existing arguments
+ * of the parent definition.
+ *
+ * If you directly call setArguments() keep in mind that you must follow
+ * certain conventions when you want to overwrite the arguments of the
+ * parent definition, otherwise your arguments will only be appended.
+ *
+ * @param int|string $index
+ * @param mixed $value
+ *
+ * @return $this
+ *
+ * @throws InvalidArgumentException when $index isn't an integer
+ */
+ public function replaceArgument($index, $value)
+ {
+ if (\is_int($index)) {
+ $this->arguments['index_'.$index] = $value;
+ } elseif (0 === strpos($index, '$')) {
+ $this->arguments[$index] = $value;
+ } else {
+ throw new InvalidArgumentException('The argument must be an existing index or the name of a constructor\'s parameter.');
+ }
+
+ return $this;
+ }
+
+ /**
+ * @internal
+ */
+ public function setAutoconfigured($autoconfigured)
+ {
+ throw new BadMethodCallException('A ChildDefinition cannot be autoconfigured.');
+ }
+
+ /**
+ * @internal
+ */
+ public function setInstanceofConditionals(array $instanceof)
+ {
+ throw new BadMethodCallException('A ChildDefinition cannot have instanceof conditionals set on it.');
+ }
+}
+
+class_alias(ChildDefinition::class, DefinitionDecorator::class);
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
new file mode 100644
index 00000000..863bab47
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AbstractRecursivePass.php
@@ -0,0 +1,174 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * @author Nicolas Grekas
+ */
+abstract class AbstractRecursivePass implements CompilerPassInterface
+{
+ /**
+ * @var ContainerBuilder
+ */
+ protected $container;
+ protected $currentId;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $this->container = $container;
+
+ try {
+ $this->processValue($container->getDefinitions(), true);
+ } finally {
+ $this->container = null;
+ }
+ }
+
+ /**
+ * Processes a value found in a definition tree.
+ *
+ * @param mixed $value
+ * @param bool $isRoot
+ *
+ * @return mixed The processed value
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ if (\is_array($value)) {
+ foreach ($value as $k => $v) {
+ if ($isRoot) {
+ $this->currentId = $k;
+ }
+ if ($v !== $processedValue = $this->processValue($v, $isRoot)) {
+ $value[$k] = $processedValue;
+ }
+ }
+ } elseif ($value instanceof ArgumentInterface) {
+ $value->setValues($this->processValue($value->getValues()));
+ } elseif ($value instanceof Definition) {
+ $value->setArguments($this->processValue($value->getArguments()));
+ $value->setProperties($this->processValue($value->getProperties()));
+ $value->setMethodCalls($this->processValue($value->getMethodCalls()));
+
+ $changes = $value->getChanges();
+ if (isset($changes['factory'])) {
+ $value->setFactory($this->processValue($value->getFactory()));
+ }
+ if (isset($changes['configurator'])) {
+ $value->setConfigurator($this->processValue($value->getConfigurator()));
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * @param bool $required
+ *
+ * @return \ReflectionFunctionAbstract|null
+ *
+ * @throws RuntimeException
+ */
+ protected function getConstructor(Definition $definition, $required)
+ {
+ if ($definition->isSynthetic()) {
+ return null;
+ }
+
+ 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())) {
+ $this->container->fileExists($r->getFileName());
+ }
+
+ return $r;
+ }
+
+ if ($factory) {
+ list($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 RuntimeException(sprintf('Invalid service "%s": "__construct()" cannot be used as a factory method.', $this->currentId));
+ }
+
+ return $this->getReflectionMethod(new Definition($class), $method);
+ }
+
+ $class = $definition->getClass();
+
+ try {
+ if (!$r = $this->container->getReflectionClass($class)) {
+ throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
+ }
+ } catch (\ReflectionException $e) {
+ throw new RuntimeException(sprintf('Invalid service "%s": ', $this->currentId).lcfirst($e->getMessage()));
+ }
+ if (!$r = $r->getConstructor()) {
+ if ($required) {
+ 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 RuntimeException(sprintf('Invalid service "%s": ', $this->currentId).sprintf($class !== $this->currentId ? 'constructor of class "%s"' : 'its constructor', $class).' must be public.');
+ }
+
+ return $r;
+ }
+
+ /**
+ * @param string $method
+ *
+ * @throws RuntimeException
+ *
+ * @return \ReflectionFunctionAbstract
+ */
+ protected function getReflectionMethod(Definition $definition, $method)
+ {
+ if ('__construct' === $method) {
+ return $this->getConstructor($definition, true);
+ }
+
+ if (!$class = $definition->getClass()) {
+ throw new RuntimeException(sprintf('Invalid service "%s": the class is not set.', $this->currentId));
+ }
+
+ if (!$r = $this->container->getReflectionClass($class)) {
+ throw new RuntimeException(sprintf('Invalid service "%s": class "%s" does not exist.', $this->currentId, $class));
+ }
+
+ if (!$r->hasMethod($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 RuntimeException(sprintf('Invalid service "%s": method "%s()" must be public.', $this->currentId, $class !== $this->currentId ? $class.'::'.$method : $method));
+ }
+
+ return $r;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
new file mode 100644
index 00000000..bff9d420
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AnalyzeServiceReferencesPass.php
@@ -0,0 +1,192 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\ExpressionLanguage;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\ExpressionLanguage\Expression;
+
+/**
+ * Run this pass before passes that need to know more about the relation of
+ * your services.
+ *
+ * This class will populate the ServiceReferenceGraph with information. You can
+ * retrieve the graph in other passes from the compiler.
+ *
+ * @author Johannes M. Schmitt
+ */
+class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements RepeatablePassInterface
+{
+ private $graph;
+ private $currentDefinition;
+ private $onlyConstructorArguments;
+ private $hasProxyDumper;
+ private $lazy;
+ private $expressionLanguage;
+ private $byConstructor;
+
+ /**
+ * @param bool $onlyConstructorArguments Sets this Service Reference pass to ignore method calls
+ */
+ public function __construct($onlyConstructorArguments = false, $hasProxyDumper = true)
+ {
+ $this->onlyConstructorArguments = (bool) $onlyConstructorArguments;
+ $this->hasProxyDumper = (bool) $hasProxyDumper;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setRepeatedPass(RepeatedPass $repeatedPass)
+ {
+ // no-op for BC
+ }
+
+ /**
+ * Processes a ContainerBuilder object to populate the service reference graph.
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $this->container = $container;
+ $this->graph = $container->getCompiler()->getServiceReferenceGraph();
+ $this->graph->clear();
+ $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)
+ {
+ $lazy = $this->lazy;
+
+ if ($value instanceof ArgumentInterface) {
+ $this->lazy = true;
+ parent::processValue($value->getValues());
+ $this->lazy = $lazy;
+
+ return $value;
+ }
+ if ($value instanceof Expression) {
+ $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
+
+ return $value;
+ }
+ 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()),
+ ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(),
+ $this->byConstructor
+ );
+
+ return $value;
+ }
+ if (!$value instanceof Definition) {
+ return parent::processValue($value, $isRoot);
+ }
+ if ($isRoot) {
+ if ($value->isSynthetic() || $value->isAbstract()) {
+ return $value;
+ }
+ $this->currentDefinition = $value;
+ } elseif ($this->currentDefinition === $value) {
+ return $value;
+ }
+ $this->lazy = false;
+
+ $byConstructor = $this->byConstructor;
+ $this->byConstructor = $isRoot || $byConstructor;
+ $this->processValue($value->getFactory());
+ $this->processValue($value->getArguments());
+ $this->byConstructor = $byConstructor;
+
+ if (!$this->onlyConstructorArguments) {
+ $this->processValue($value->getProperties());
+ $this->processValue($value->getMethodCalls());
+ $this->processValue($value->getConfigurator());
+ }
+ $this->lazy = $lazy;
+
+ return $value;
+ }
+
+ /**
+ * Returns a service definition given the full name or an alias.
+ *
+ * @param string $id A full id or alias for a service definition
+ *
+ * @return Definition|null The definition related to the supplied id
+ */
+ private function getDefinition($id)
+ {
+ return null === $id ? null : $this->container->getDefinition($id);
+ }
+
+ private function getDefinitionId($id)
+ {
+ while ($this->container->hasAlias($id)) {
+ $id = (string) $this->container->getAlias($id);
+ }
+
+ if (!$this->container->hasDefinition($id)) {
+ return null;
+ }
+
+ return $this->container->normalizeId($id);
+ }
+
+ private function getExpressionLanguage()
+ {
+ if (null === $this->expressionLanguage) {
+ 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 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 $this->expressionLanguage;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
new file mode 100644
index 00000000..03420683
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutoAliasServicePass.php
@@ -0,0 +1,41 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Alias;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+
+/**
+ * Sets a service to be an alias of another one, given a format pattern.
+ */
+class AutoAliasServicePass implements CompilerPassInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ foreach ($container->findTaggedServiceIds('auto_alias') as $serviceId => $tags) {
+ foreach ($tags as $tag) {
+ if (!isset($tag['format'])) {
+ 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 Alias($aliasId, true));
+ }
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php
new file mode 100644
index 00000000..6a755025
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowireExceptionPass.php
@@ -0,0 +1,74 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace 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);
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Throws autowire exceptions from AutowirePass for definitions that still exist.
+ *
+ * @deprecated since version 3.4, will be removed in 4.0.
+ *
+ * @author Ryan Weaver
+ */
+class AutowireExceptionPass implements CompilerPassInterface
+{
+ private $autowirePass;
+ private $inlineServicePass;
+
+ public function __construct(AutowirePass $autowirePass, InlineServiceDefinitionsPass $inlineServicePass)
+ {
+ $this->autowirePass = $autowirePass;
+ $this->inlineServicePass = $inlineServicePass;
+ }
+
+ public function process(ContainerBuilder $container)
+ {
+ // the pass should only be run once
+ if (null === $this->autowirePass || null === $this->inlineServicePass) {
+ return;
+ }
+
+ $inlinedIds = $this->inlineServicePass->getInlinedServiceIds();
+ $exceptions = $this->autowirePass->getAutowiringExceptions();
+
+ // free up references
+ $this->autowirePass = null;
+ $this->inlineServicePass = null;
+
+ foreach ($exceptions as $exception) {
+ if ($this->doesServiceExistInTheContainer($exception->getServiceId(), $container, $inlinedIds)) {
+ throw $exception;
+ }
+ }
+ }
+
+ private function doesServiceExistInTheContainer($serviceId, ContainerBuilder $container, array $inlinedIds)
+ {
+ if ($container->hasDefinition($serviceId)) {
+ 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 false;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
new file mode 100644
index 00000000..b1dae2a4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowirePass.php
@@ -0,0 +1,580 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\Config\Resource\ClassExistenceResource;
+use Symfony\Component\DependencyInjection\Config\AutowireServiceResource;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\AutowiringFailedException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
+use Symfony\Component\DependencyInjection\TypedReference;
+
+/**
+ * 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 AbstractRecursivePass
+{
+ private $definedTypes = [];
+ private $types;
+ private $ambiguousServiceTypes;
+ private $autowired = [];
+ private $lastFailure;
+ private $throwOnAutowiringException;
+ private $autowiringExceptions = [];
+ private $strictMode;
+
+ /**
+ * @param bool $throwOnAutowireException Errors can be retrieved via Definition::getErrors()
+ */
+ public function __construct($throwOnAutowireException = true)
+ {
+ $this->throwOnAutowiringException = $throwOnAutowireException;
+ }
+
+ /**
+ * @deprecated since version 3.4, to be removed in 4.0.
+ *
+ * @return AutowiringFailedException[]
+ */
+ 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);
+
+ return $this->autowiringExceptions;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ // clear out any possibly stored exceptions from before
+ $this->autowiringExceptions = [];
+ $this->strictMode = $container->hasParameter('container.autowiring.strict_mode') && $container->getParameter('container.autowiring.strict_mode');
+
+ try {
+ parent::process($container);
+ } finally {
+ $this->definedTypes = [];
+ $this->types = null;
+ $this->ambiguousServiceTypes = null;
+ $this->autowired = [];
+ }
+ }
+
+ /**
+ * Creates a resource to help know if this service has changed.
+ *
+ * @return AutowireServiceResource
+ *
+ * @deprecated since version 3.3, to be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.
+ */
+ 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);
+
+ $metadata = [];
+
+ foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflectionMethod) {
+ if (!$reflectionMethod->isStatic()) {
+ $metadata[$reflectionMethod->name] = self::getResourceMetadataForMethod($reflectionMethod);
+ }
+ }
+
+ return new AutowireServiceResource($reflectionClass->name, $reflectionClass->getFileName(), $metadata);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ try {
+ return $this->doProcessValue($value, $isRoot);
+ } catch (AutowiringFailedException $e) {
+ if ($this->throwOnAutowiringException) {
+ throw $e;
+ }
+
+ $this->autowiringExceptions[] = $e;
+ $this->container->getDefinition($this->currentId)->addError($e->getMessage());
+
+ return parent::processValue($value, $isRoot);
+ }
+ }
+
+ private function doProcessValue($value, $isRoot = false)
+ {
+ 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 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()));
+
+ return $value;
+ }
+
+ $methodCalls = $value->getMethodCalls();
+
+ try {
+ $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()]);
+ }
+
+ $methodCalls = $this->autowireCalls($reflectionClass, $methodCalls);
+
+ if ($constructor) {
+ list(, $arguments) = array_shift($methodCalls);
+
+ if ($arguments !== $value->getArguments()) {
+ $value->setArguments($arguments);
+ }
+ }
+
+ if ($methodCalls !== $value->getMethodCalls()) {
+ $value->setMethodCalls($methodCalls);
+ }
+
+ return $value;
+ }
+
+ /**
+ * @return array
+ */
+ private function autowireCalls(\ReflectionClass $reflectionClass, array $methodCalls)
+ {
+ foreach ($methodCalls as $i => $call) {
+ list($method, $arguments) = $call;
+
+ if ($method instanceof \ReflectionFunctionAbstract) {
+ $reflectionMethod = $method;
+ } else {
+ $definition = new Definition($reflectionClass->name);
+ try {
+ $reflectionMethod = $this->getReflectionMethod($definition, $method);
+ } catch (RuntimeException $e) {
+ if ($definition->getFactory()) {
+ continue;
+ }
+ throw $e;
+ }
+ }
+
+ $arguments = $this->autowireMethod($reflectionMethod, $arguments);
+
+ if ($arguments !== $call[1]) {
+ $methodCalls[$i][1] = $arguments;
+ }
+ }
+
+ return $methodCalls;
+ }
+
+ /**
+ * Autowires the constructor or a method.
+ *
+ * @return array The autowired arguments
+ *
+ * @throws AutowiringFailedException
+ */
+ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, array $arguments)
+ {
+ $class = $reflectionMethod instanceof \ReflectionMethod ? $reflectionMethod->class : $this->currentId;
+ $method = $reflectionMethod->name;
+ $parameters = $reflectionMethod->getParameters();
+ if (method_exists('ReflectionMethod', 'isVariadic') && $reflectionMethod->isVariadic()) {
+ array_pop($parameters);
+ }
+
+ foreach ($parameters as $index => $parameter) {
+ if (\array_key_exists($index, $arguments) && '' !== $arguments[$index]) {
+ continue;
+ }
+
+ $type = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true);
+
+ if (!$type) {
+ if (isset($arguments[$index])) {
+ continue;
+ }
+
+ // no default value? Then fail
+ if (!$parameter->isDefaultValueAvailable()) {
+ // For core classes, isDefaultValueAvailable() can
+ // be false when isOptional() returns true. If the
+ // argument *is* optional, allow it to be missing
+ if ($parameter->isOptional()) {
+ continue;
+ }
+ $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 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 AutowiringFailedException($this->currentId, $failureMessage);
+ }
+ $this->container->log($this, $failureMessage);
+ }
+
+ $arguments[$index] = $value;
+ }
+
+ if ($parameters && !isset($arguments[++$index])) {
+ while (0 <= --$index) {
+ $parameter = $parameters[$index];
+ if (!$parameter->isDefaultValueAvailable() || $parameter->getDefaultValue() !== $arguments[$index]) {
+ break;
+ }
+ unset($arguments[$index]);
+ }
+ }
+
+ // 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);
+
+ return $arguments;
+ }
+
+ /**
+ * @return TypedReference|null A reference to the service matching the given type, if any
+ */
+ private function getAutowiredReference(TypedReference $reference, $deprecationMessage)
+ {
+ $this->lastFailure = null;
+ $type = $reference->getType();
+
+ if ($type !== $this->container->normalizeId($reference) || ($this->container->has($type) && !$this->container->findDefinition($type)->isAbstract())) {
+ return $reference;
+ }
+
+ if (null === $this->types) {
+ $this->populateAvailableTypes($this->strictMode);
+ }
+
+ if (isset($this->definedTypes[$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);
+ }
+
+ @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 TypedReference($this->autowired[$type], $type) : null;
+ }
+
+ if (!$this->strictMode) {
+ return $this->createAutowiredDefinition($type);
+ }
+
+ return null;
+ }
+
+ /**
+ * Populates the list of available types.
+ */
+ private function populateAvailableTypes($onlyAutowiringTypes = false)
+ {
+ $this->types = [];
+ if (!$onlyAutowiringTypes) {
+ $this->ambiguousServiceTypes = [];
+ }
+
+ foreach ($this->container->getDefinitions() as $id => $definition) {
+ $this->populateAvailableType($id, $definition, $onlyAutowiringTypes);
+ }
+ }
+
+ /**
+ * Populates the list of available types for a given definition.
+ *
+ * @param string $id
+ */
+ 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;
+ $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)) {
+ return;
+ }
+
+ foreach ($reflectionClass->getInterfaces() as $reflectionInterface) {
+ $this->set($reflectionInterface->name, $id);
+ }
+
+ do {
+ $this->set($reflectionClass->name, $id);
+ } while ($reflectionClass = $reflectionClass->getParentClass());
+ }
+
+ /**
+ * Associates a type and a service id if applicable.
+ *
+ * @param string $type
+ * @param string $id
+ */
+ private function set($type, $id)
+ {
+ if (isset($this->definedTypes[$type])) {
+ return;
+ }
+
+ // is this already a type/class that is known to match multiple services?
+ if (isset($this->ambiguousServiceTypes[$type])) {
+ $this->ambiguousServiceTypes[$type][] = $id;
+
+ return;
+ }
+
+ // check to make sure the type doesn't match multiple services
+ if (!isset($this->types[$type]) || $this->types[$type] === $id) {
+ $this->types[$type] = $id;
+
+ return;
+ }
+
+ // keep an array of all services matching this type
+ if (!isset($this->ambiguousServiceTypes[$type])) {
+ $this->ambiguousServiceTypes[$type] = [$this->types[$type]];
+ unset($this->types[$type]);
+ }
+ $this->ambiguousServiceTypes[$type][] = $id;
+ }
+
+ /**
+ * Registers a definition for the type if possible or throws an exception.
+ *
+ * @param string $type
+ *
+ * @return TypedReference|null A reference to the registered definition
+ */
+ private function createAutowiredDefinition($type)
+ {
+ 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 Definition($type);
+ $argumentDefinition->setPublic(false);
+ $argumentDefinition->setAutowired(true);
+
+ try {
+ $originalThrowSetting = $this->throwOnAutowiringException;
+ $this->throwOnAutowiringException = true;
+ $this->processValue($argumentDefinition, true);
+ $this->container->setDefinition($argumentId, $argumentDefinition);
+ } catch (AutowiringFailedException $e) {
+ $this->autowired[$type] = false;
+ $this->lastFailure = $e->getMessage();
+ $this->container->log($this, $this->lastFailure);
+
+ return null;
+ } finally {
+ $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 TypedReference($argumentId, $type);
+ }
+
+ private function createTypeNotFoundMessage(TypedReference $reference, $label)
+ {
+ $trackResources = $this->container->isTrackingResources();
+ $this->container->setResourceTracking(false);
+ try {
+ if ($r = $this->container->getReflectionClass($type = $reference->getType(), false)) {
+ $alternatives = $this->createTypeAlternatives($reference);
+ }
+ } finally {
+ $this->container->setResourceTracking($trackResources);
+ }
+
+ if (!$r) {
+ // either $type does not exist or a parent class does not exist
+ try {
+ $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 = $e->getMessage();
+ }
+
+ $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);
+
+ 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);
+
+ if (null !== $this->lastFailure) {
+ $message = $this->lastFailure."\n".$message;
+ $this->lastFailure = null;
+ }
+
+ return $message;
+ }
+
+ private function createTypeAlternatives(TypedReference $reference)
+ {
+ // try suggesting available aliases first
+ if ($message = $this->getAliasesSuggestionForType($type = $reference->getType())) {
+ return ' '.$message;
+ }
+ if (null === $this->ambiguousServiceTypes) {
+ $this->populateAvailableTypes();
+ }
+
+ if (isset($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]);
+ } 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);
+ }
+
+ /**
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+ private static function getResourceMetadataForMethod(\ReflectionMethod $method)
+ {
+ $methodArgumentsMetadata = [];
+ foreach ($method->getParameters() as $parameter) {
+ try {
+ if (method_exists($parameter, 'getType')) {
+ $type = $parameter->getType();
+ if ($type && !$type->isBuiltin()) {
+ $class = new \ReflectionClass($type instanceof \ReflectionNamedType ? $type->getName() : (string) $type);
+ } else {
+ $class = null;
+ }
+ } else {
+ $class = $parameter->getClass();
+ }
+ } catch (\ReflectionException $e) {
+ // type-hint is against a non-existent class
+ $class = false;
+ }
+
+ $isVariadic = method_exists($parameter, 'isVariadic') && $parameter->isVariadic();
+ $methodArgumentsMetadata[] = [
+ 'class' => $class,
+ 'isOptional' => $parameter->isOptional(),
+ 'defaultValue' => ($parameter->isOptional() && !$isVariadic) ? $parameter->getDefaultValue() : null,
+ ];
+ }
+
+ return $methodArgumentsMetadata;
+ }
+
+ private function getAliasesSuggestionForType($type, $extraContext = null)
+ {
+ $aliases = [];
+ 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);
+ for ($i = 0, --$len; $i < $len; ++$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]);
+
+ return $message;
+ }
+
+ if ($aliases) {
+ return sprintf('Try changing the type-hint%s to "%s" instead.', $extraContext, $aliases[0]);
+ }
+
+ return null;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
new file mode 100644
index 00000000..efb9df7b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/AutowireRequiredMethodsPass.php
@@ -0,0 +1,70 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+
+/**
+ * Looks for definitions with autowiring enabled and registers their corresponding "@required" methods as setters.
+ *
+ * @author Nicolas Grekas
+ */
+class AutowireRequiredMethodsPass extends AbstractRecursivePass
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ $value = parent::processValue($value, $isRoot);
+
+ if (!$value instanceof Definition || !$value->isAutowired() || $value->isAbstract() || !$value->getClass()) {
+ return $value;
+ }
+ if (!$reflectionClass = $this->container->getReflectionClass($value->getClass(), false)) {
+ return $value;
+ }
+
+ $alreadyCalledMethods = [];
+
+ foreach ($value->getMethodCalls() as list($method)) {
+ $alreadyCalledMethods[strtolower($method)] = true;
+ }
+
+ foreach ($reflectionClass->getMethods() as $reflectionMethod) {
+ $r = $reflectionMethod;
+
+ 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)) {
+ $value->addMethodCall($reflectionMethod->name);
+ break;
+ }
+ if (false === stripos($doc, '@inheritdoc') || !preg_match('#(?:^/\*\*|\n\s*+\*)\s*+(?:\{@inheritdoc\}|@inheritdoc)(?:\s|\*/$)#i', $doc)) {
+ break;
+ }
+ }
+ try {
+ $r = $r->getPrototype();
+ } catch (\ReflectionException $e) {
+ break; // method has no prototype
+ }
+ }
+ }
+
+ return $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
new file mode 100644
index 00000000..30a6f524
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.php
@@ -0,0 +1,87 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+
+/**
+ * Checks if arguments of methods are properly configured.
+ *
+ * @author Kévin Dunglas
+ * @author Nicolas Grekas
+ */
+class CheckArgumentsValidityPass extends AbstractRecursivePass
+{
+ private $throwExceptions;
+
+ public function __construct($throwExceptions = true)
+ {
+ $this->throwExceptions = $throwExceptions;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ 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);
+ $value->addError($msg);
+ if ($this->throwExceptions) {
+ 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);
+ $value->addError($msg);
+ if ($this->throwExceptions) {
+ throw new RuntimeException($msg);
+ }
+ }
+ }
+
+ foreach ($value->getMethodCalls() as $methodCall) {
+ $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);
+ $value->addError($msg);
+ if ($this->throwExceptions) {
+ 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);
+ $value->addError($msg);
+ if ($this->throwExceptions) {
+ throw new RuntimeException($msg);
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
new file mode 100644
index 00000000..55d911c4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckCircularReferencesPass.php
@@ -0,0 +1,78 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+
+/**
+ * Checks your services for circular references.
+ *
+ * References from method calls are ignored since we might be able to resolve
+ * these references depending on the order in which services are called.
+ *
+ * Circular reference from method calls will only be detected at run-time.
+ *
+ * @author Johannes M. Schmitt
+ */
+class CheckCircularReferencesPass implements CompilerPassInterface
+{
+ private $currentPath;
+ private $checkedNodes;
+
+ /**
+ * Checks the ContainerBuilder object for circular references.
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $graph = $container->getCompiler()->getServiceReferenceGraph();
+
+ $this->checkedNodes = [];
+ foreach ($graph->getNodes() as $id => $node) {
+ $this->currentPath = [$id];
+
+ $this->checkOutEdges($node->getOutEdges());
+ }
+ }
+
+ /**
+ * Checks for circular references.
+ *
+ * @param ServiceReferenceGraphEdge[] $edges An array of Edges
+ *
+ * @throws ServiceCircularReferenceException when a circular reference is found
+ */
+ private function checkOutEdges(array $edges)
+ {
+ foreach ($edges as $edge) {
+ $node = $edge->getDestNode();
+ $id = $node->getId();
+
+ 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);
+ $this->currentPath[] = $id;
+
+ if (false !== $searchKey) {
+ throw new ServiceCircularReferenceException($id, \array_slice($this->currentPath, $searchKey));
+ }
+
+ $this->checkOutEdges($node->getOutEdges());
+ }
+
+ $this->checkedNodes[$id] = true;
+ array_pop($this->currentPath);
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
new file mode 100644
index 00000000..4b6d277f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckDefinitionValidityPass.php
@@ -0,0 +1,89 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+
+/**
+ * This pass validates each definition individually only taking the information
+ * into account which is contained in the definition itself.
+ *
+ * Later passes can rely on the following, and specifically do not need to
+ * perform these checks themselves:
+ *
+ * - non synthetic, non abstract services always have a class set
+ * - synthetic services are always public
+ *
+ * @author Johannes M. Schmitt
+ */
+class CheckDefinitionValidityPass implements CompilerPassInterface
+{
+ /**
+ * Processes the ContainerBuilder to validate the Definition.
+ *
+ * @throws RuntimeException When the Definition is invalid
+ */
+ public function process(ContainerBuilder $container)
+ {
+ foreach ($container->getDefinitions() as $id => $definition) {
+ // synthetic service is public
+ if ($definition->isSynthetic() && !($definition->isPublic() || $definition->isPrivate())) {
+ 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 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 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 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. 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 RuntimeException(sprintf('A "tags" attribute must be of a scalar-type for service "%s", tag "%s", attribute "%s".', $id, $name, $attribute));
+ }
+ }
+ }
+ }
+
+ if ($definition->isPublic() && !$definition->isPrivate()) {
+ $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
+ if (null !== $usedEnvs) {
+ throw new EnvParameterException([$resolvedId], null, 'A service name ("%s") cannot contain dynamic values.');
+ }
+ }
+ }
+
+ foreach ($container->getAliases() as $id => $alias) {
+ if ($alias->isPublic() && !$alias->isPrivate()) {
+ $resolvedId = $container->resolveEnvPlaceholders($id, null, $usedEnvs);
+ if (null !== $usedEnvs) {
+ throw new EnvParameterException([$resolvedId], null, 'An alias name ("%s") cannot contain dynamic values.');
+ }
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
new file mode 100644
index 00000000..77b35f18
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php
@@ -0,0 +1,36 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Checks that all references are pointing to a valid service.
+ *
+ * @author Johannes M. Schmitt
+ */
+class CheckExceptionOnInvalidReferenceBehaviorPass extends AbstractRecursivePass
+{
+ protected function processValue($value, $isRoot = false)
+ {
+ if (!$value instanceof Reference) {
+ return parent::processValue($value, $isRoot);
+ }
+ 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/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
new file mode 100644
index 00000000..8f2a3bdf
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CheckReferenceValidityPass.php
@@ -0,0 +1,43 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Checks the validity of references.
+ *
+ * The following checks are performed by this pass:
+ * - target definitions are not abstract
+ *
+ * @author Johannes M. Schmitt
+ */
+class CheckReferenceValidityPass extends AbstractRecursivePass
+{
+ protected function processValue($value, $isRoot = false)
+ {
+ if ($isRoot && $value instanceof Definition && ($value->isSynthetic() || $value->isAbstract())) {
+ return $value;
+ }
+ if ($value instanceof Reference && $this->container->hasDefinition((string) $value)) {
+ $targetDefinition = $this->container->getDefinition((string) $value);
+
+ if ($targetDefinition->isAbstract()) {
+ 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/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/Compiler.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/Compiler.php
new file mode 100644
index 00000000..0eb9d036
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/Compiler.php
@@ -0,0 +1,165 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
+
+/**
+ * This class is used to remove circular dependencies between individual passes.
+ *
+ * @author Johannes M. Schmitt
+ */
+class Compiler
+{
+ private $passConfig;
+ private $log = [];
+ private $loggingFormatter;
+ private $serviceReferenceGraph;
+
+ public function __construct()
+ {
+ $this->passConfig = new PassConfig();
+ $this->serviceReferenceGraph = new ServiceReferenceGraph();
+ }
+
+ /**
+ * Returns the PassConfig.
+ *
+ * @return PassConfig The PassConfig instance
+ */
+ public function getPassConfig()
+ {
+ return $this->passConfig;
+ }
+
+ /**
+ * Returns the ServiceReferenceGraph.
+ *
+ * @return ServiceReferenceGraph The ServiceReferenceGraph instance
+ */
+ public function getServiceReferenceGraph()
+ {
+ return $this->serviceReferenceGraph;
+ }
+
+ /**
+ * Returns the logging formatter which can be used by compilation passes.
+ *
+ * @return LoggingFormatter
+ *
+ * @deprecated since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead.
+ */
+ 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 LoggingFormatter();
+ }
+
+ return $this->loggingFormatter;
+ }
+
+ /**
+ * Adds a pass to the PassConfig.
+ *
+ * @param CompilerPassInterface $pass A compiler pass
+ * @param string $type The type of the pass
+ */
+ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
+ {
+ if (\func_num_args() >= 3) {
+ $priority = func_get_arg(2);
+ } else {
+ if (__CLASS__ !== static::class) {
+ $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);
+ }
+ }
+
+ $priority = 0;
+ }
+
+ $this->passConfig->addPass($pass, $type, $priority);
+ }
+
+ /**
+ * Adds a log message.
+ *
+ * @param string $string The log message
+ *
+ * @deprecated since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead.
+ */
+ 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);
+
+ $this->log[] = $string;
+ }
+
+ /**
+ * @final
+ */
+ public function log(CompilerPassInterface $pass, $message)
+ {
+ if (false !== strpos($message, "\n")) {
+ $message = str_replace("\n", "\n".\get_class($pass).': ', trim($message));
+ }
+
+ $this->log[] = \get_class($pass).': '.$message;
+ }
+
+ /**
+ * Returns the log.
+ *
+ * @return array Log array
+ */
+ public function getLog()
+ {
+ return $this->log;
+ }
+
+ /**
+ * Run the Compiler and process all Passes.
+ */
+ public function compile(ContainerBuilder $container)
+ {
+ try {
+ foreach ($this->passConfig->getPasses() as $pass) {
+ $pass->process($container);
+ }
+ } 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->setValue($prev, $resolvedMsg);
+ }
+ } while ($prev = $prev->getPrevious());
+
+ if ($usedEnvs) {
+ $e = new EnvParameterException($usedEnvs, $e);
+ }
+
+ throw $e;
+ } finally {
+ $this->getServiceReferenceGraph()->clear();
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
new file mode 100644
index 00000000..30850060
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/CompilerPassInterface.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Interface that must be implemented by compilation passes.
+ *
+ * @author Johannes M. Schmitt
+ */
+interface CompilerPassInterface
+{
+ /**
+ * You can modify the container here before it is dumped to PHP code.
+ */
+ public function process(ContainerBuilder $container);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
new file mode 100644
index 00000000..bf5f9157
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/DecoratorServicePass.php
@@ -0,0 +1,81 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Alias;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Overwrites a service but keeps the overridden one.
+ *
+ * @author Christophe Coevoet
+ * @author Fabien Potencier
+ * @author Diego Saint Esteben
+ */
+class DecoratorServicePass implements CompilerPassInterface
+{
+ public function process(ContainerBuilder $container)
+ {
+ $definitions = new \SplPriorityQueue();
+ $order = \PHP_INT_MAX;
+
+ foreach ($container->getDefinitions() as $id => $definition) {
+ if (!$decorated = $definition->getDecoratedService()) {
+ continue;
+ }
+ $definitions->insert([$id, $definition], [$decorated[2], --$order]);
+ }
+ $decoratingDefinitions = [];
+
+ foreach ($definitions as list($id, $definition)) {
+ list($inner, $renamedId) = $definition->getDecoratedService();
+
+ $definition->setDecoratedService(null);
+
+ if (!$renamedId) {
+ $renamedId = $id.'.inner';
+ }
+
+ // we create a new alias/service for the service we are replacing
+ // to be able to reference it in the new one
+ if ($container->hasAlias($inner)) {
+ $alias = $container->getAlias($inner);
+ $public = $alias->isPublic();
+ $private = $alias->isPrivate();
+ $container->setAlias($renamedId, new Alias($container->normalizeId($alias), false));
+ } else {
+ $decoratedDefinition = $container->getDefinition($inner);
+ $public = $decoratedDefinition->isPublic();
+ $private = $decoratedDefinition->isPrivate();
+ $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->setAutowiringTypes($types);
+ }
+ $decoratingDefinition->setTags([]);
+ if ($autowiringTypes) {
+ $decoratingDefinition->setAutowiringTypes([]);
+ }
+ $decoratingDefinitions[$inner] = $definition;
+ }
+
+ $container->setAlias($inner, $id)->setPublic($public)->setPrivate($private);
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
new file mode 100644
index 00000000..73b5d1d5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php
@@ -0,0 +1,39 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+
+/**
+ * Throws an exception for any Definitions that have errors and still exist.
+ *
+ * @author Ryan Weaver
+ */
+class DefinitionErrorExceptionPass extends AbstractRecursivePass
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ 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 RuntimeException($message);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
new file mode 100644
index 00000000..27e50482
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ExtensionCompilerPass.php
@@ -0,0 +1,37 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * A pass to automatically process extensions if they implement
+ * CompilerPassInterface.
+ *
+ * @author Wouter J
+ */
+class ExtensionCompilerPass implements CompilerPassInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ foreach ($container->getExtensions() as $extension) {
+ if (!$extension instanceof CompilerPassInterface) {
+ continue;
+ }
+
+ $extension->process($container);
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php
new file mode 100644
index 00000000..67575c03
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/FactoryReturnTypePass.php
@@ -0,0 +1,112 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * @author Guilhem N.
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+class FactoryReturnTypePass implements CompilerPassInterface
+{
+ private $resolveClassPass;
+
+ 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);
+ }
+ $this->resolveClassPass = $resolveClassPass;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ // works only since php 7.0 and hhvm 3.11
+ if (!method_exists(\ReflectionMethod::class, 'getReturnType')) {
+ return;
+ }
+ $resolveClassPassChanges = null !== $this->resolveClassPass ? $this->resolveClassPass->getChanges() : [];
+
+ foreach ($container->getDefinitions() as $id => $definition) {
+ $this->updateDefinition($container, $id, $definition, $resolveClassPassChanges);
+ }
+ }
+
+ private function updateDefinition(ContainerBuilder $container, $id, Definition $definition, array $resolveClassPassChanges, array $previous = [])
+ {
+ // circular reference
+ if (isset($previous[$id])) {
+ return;
+ }
+
+ $factory = $definition->getFactory();
+ if (null === $factory || (!isset($resolveClassPassChanges[$id]) && null !== $definition->getClass())) {
+ return;
+ }
+
+ $class = null;
+ if (\is_string($factory)) {
+ try {
+ $m = new \ReflectionFunction($factory);
+ if (false !== $m->getFileName() && file_exists($m->getFileName())) {
+ $container->fileExists($m->getFileName());
+ }
+ } catch (\ReflectionException $e) {
+ return;
+ }
+ } else {
+ if ($factory[0] instanceof Reference) {
+ $previous[$id] = true;
+ $factoryId = $container->normalizeId($factory[0]);
+ $factoryDefinition = $container->findDefinition($factoryId);
+ $this->updateDefinition($container, $factoryId, $factoryDefinition, $resolveClassPassChanges, $previous);
+ $class = $factoryDefinition->getClass();
+ } else {
+ $class = $factory[0];
+ }
+
+ if (!$m = $container->getReflectionClass($class, false)) {
+ return;
+ }
+ try {
+ $m = $m->getMethod($factory[1]);
+ } catch (\ReflectionException $e) {
+ return;
+ }
+ }
+
+ $returnType = $m->getReturnType();
+ if (null !== $returnType && !$returnType->isBuiltin()) {
+ $returnType = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType;
+ if (null !== $class) {
+ $declaringClass = $m->getDeclaringClass()->getName();
+ if ('self' === strtolower($returnType)) {
+ $returnType = $declaringClass;
+ } 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);
+ }
+ $definition->setClass($returnType);
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
new file mode 100644
index 00000000..9d8a02e7
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php
@@ -0,0 +1,153 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Inline service definitions where this is possible.
+ *
+ * @author Johannes M. Schmitt
+ */
+class InlineServiceDefinitionsPass extends AbstractRecursivePass implements RepeatablePassInterface
+{
+ private $cloningIds = [];
+ private $inlinedServiceIds = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setRepeatedPass(RepeatedPass $repeatedPass)
+ {
+ // no-op for BC
+ }
+
+ /**
+ * Returns an array of all services inlined by this pass.
+ *
+ * The key is the inlined service id and its value is the list of services it was inlined into.
+ *
+ * @deprecated since version 3.4, to be removed in 4.0.
+ *
+ * @return array
+ */
+ public function getInlinedServiceIds()
+ {
+ @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)
+ {
+ if ($value instanceof ArgumentInterface) {
+ // Reference found in ArgumentInterface::getValues() are not inlineable
+ return $value;
+ }
+
+ if ($value instanceof Definition && $this->cloningIds) {
+ if ($value->isShared()) {
+ return $value;
+ }
+ $value = clone $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->inlinedServiceIds[$id][] = $this->currentId;
+
+ if ($definition->isShared()) {
+ return $definition;
+ }
+
+ if (isset($this->cloningIds[$id])) {
+ $ids = array_keys($this->cloningIds);
+ $ids[] = $id;
+
+ throw new ServiceCircularReferenceException($id, \array_slice($ids, array_search($id, $ids)));
+ }
+
+ $this->cloningIds[$id] = true;
+ try {
+ return $this->processValue($definition);
+ } finally {
+ unset($this->cloningIds[$id]);
+ }
+ }
+
+ /**
+ * Checks if the definition is inlineable.
+ *
+ * @return bool If the definition is inlineable
+ */
+ private function isInlineableDefinition($id, Definition $definition, ServiceReferenceGraph $graph)
+ {
+ if ($definition->getErrors() || $definition->isDeprecated() || $definition->isLazy() || $definition->isSynthetic()) {
+ return false;
+ }
+
+ if (!$definition->isShared()) {
+ return true;
+ }
+
+ if ($definition->isPublic() || $definition->isPrivate()) {
+ return false;
+ }
+
+ if (!$graph->hasNode($id)) {
+ return true;
+ }
+
+ if ($this->currentId == $id) {
+ return false;
+ }
+
+ $ids = [];
+ $isReferencedByConstructor = false;
+ foreach ($graph->getNode($id)->getInEdges() as $edge) {
+ $isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
+ if ($edge->isWeak() || $edge->isLazy()) {
+ return false;
+ }
+ $ids[] = $edge->getSourceNode()->getId();
+ }
+
+ if (!$ids) {
+ return true;
+ }
+
+ if (\count(array_unique($ids)) > 1) {
+ 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/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php
new file mode 100644
index 00000000..0d91f00f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/LoggingFormatter.php
@@ -0,0 +1,54 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace 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);
+
+/**
+ * Used to format logging messages during the compilation.
+ *
+ * @author Johannes M. Schmitt
+ *
+ * @deprecated since version 3.3, to be removed in 4.0. Use the ContainerBuilder::log() method instead.
+ */
+class LoggingFormatter
+{
+ public function formatRemoveService(CompilerPassInterface $pass, $id, $reason)
+ {
+ return $this->format($pass, sprintf('Removed service "%s"; reason: %s.', $id, $reason));
+ }
+
+ public function formatInlineService(CompilerPassInterface $pass, $id, $target)
+ {
+ return $this->format($pass, sprintf('Inlined service "%s" to "%s".', $id, $target));
+ }
+
+ 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));
+ }
+
+ public function formatResolveInheritance(CompilerPassInterface $pass, $childId, $parentId)
+ {
+ return $this->format($pass, sprintf('Resolving inheritance for "%s" (parent: %s).', $childId, $parentId));
+ }
+
+ 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));
+ }
+
+ public function format(CompilerPassInterface $pass, $message)
+ {
+ return sprintf('%s: %s', \get_class($pass), $message);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
new file mode 100644
index 00000000..caa1fd22
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php
@@ -0,0 +1,206 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\LogicException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Extension\ConfigurationExtensionInterface;
+use Symfony\Component\DependencyInjection\Extension\Extension;
+use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
+use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
+use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
+
+/**
+ * Merges extension configs into the container builder.
+ *
+ * @author Fabien Potencier
+ */
+class MergeExtensionConfigurationPass implements CompilerPassInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ 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 PrependExtensionInterface) {
+ $extension->prepend($container);
+ }
+ }
+
+ foreach ($container->getExtensions() as $name => $extension) {
+ if (!$config = $container->getExtensionConfig($name)) {
+ // this extension was not called
+ continue;
+ }
+ $resolvingBag = $container->getParameterBag();
+ if ($resolvingBag instanceof EnvPlaceholderParameterBag && $extension instanceof Extension) {
+ // create a dedicated bag so that we can track env vars per-extension
+ $resolvingBag = new MergeExtensionConfigurationParameterBag($resolvingBag);
+ }
+ $config = $resolvingBag->resolveValue($config);
+
+ try {
+ $tmpContainer = new MergeExtensionConfigurationContainerBuilder($extension, $resolvingBag);
+ $tmpContainer->setResourceTracking($container->isTrackingResources());
+ $tmpContainer->addObjectResource($extension);
+ 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 MergeExtensionConfigurationParameterBag) {
+ $container->getParameterBag()->mergeEnvPlaceholders($resolvingBag);
+ }
+
+ throw $e;
+ }
+
+ if ($resolvingBag instanceof MergeExtensionConfigurationParameterBag) {
+ // don't keep track of env vars that are *overridden* when configs are merged
+ $resolvingBag->freezeAfterProcessing($extension, $tmpContainer);
+ }
+
+ $container->merge($tmpContainer);
+ $container->getParameterBag()->add($parameters);
+ }
+
+ $container->addDefinitions($definitions);
+ $container->addAliases($aliases);
+ }
+}
+
+/**
+ * @internal
+ */
+class MergeExtensionConfigurationParameterBag extends EnvPlaceholderParameterBag
+{
+ private $processedEnvPlaceholders;
+
+ public function __construct(parent $parameterBag)
+ {
+ parent::__construct($parameterBag->all());
+ $this->mergeEnvPlaceholders($parameterBag);
+ }
+
+ public function freezeAfterProcessing(Extension $extension, ContainerBuilder $container)
+ {
+ if (!$config = $extension->getProcessedConfigs()) {
+ // Extension::processConfiguration() wasn't called, we cannot know how configs were merged
+ return;
+ }
+ $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());
+
+ foreach (parent::getEnvPlaceholders() as $env => $placeholders) {
+ foreach ($placeholders as $placeholder) {
+ if (false !== stripos($config, $placeholder)) {
+ $this->processedEnvPlaceholders[$env] = $placeholders;
+ break;
+ }
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getEnvPlaceholders()
+ {
+ return null !== $this->processedEnvPlaceholders ? $this->processedEnvPlaceholders : parent::getEnvPlaceholders();
+ }
+}
+
+/**
+ * A container builder preventing using methods that wouldn't have any effect from extensions.
+ *
+ * @internal
+ */
+class MergeExtensionConfigurationContainerBuilder extends ContainerBuilder
+{
+ private $extensionClass;
+
+ public function __construct(ExtensionInterface $extension, ParameterBagInterface $parameterBag = null)
+ {
+ parent::__construct($parameterBag);
+
+ $this->extensionClass = \get_class($extension);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
+ {
+ 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(ExtensionInterface $extension)
+ {
+ 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)
+ {
+ 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)) {
+ return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
+ }
+
+ $bag = $this->getParameterBag();
+ $value = $bag->resolveValue($value);
+
+ if (!$bag instanceof EnvPlaceholderParameterBag) {
+ return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
+ }
+
+ foreach ($bag->getEnvPlaceholders() as $env => $placeholders) {
+ if (false === strpos($env, ':')) {
+ continue;
+ }
+ foreach ($placeholders as $placeholder) {
+ 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));
+ }
+ }
+ }
+
+ return parent::resolveEnvPlaceholders($value, $format, $usedEnvs);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/PassConfig.php
new file mode 100644
index 00000000..d95b2198
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/PassConfig.php
@@ -0,0 +1,282 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+
+/**
+ * Compiler Pass Configuration.
+ *
+ * This class has a default configuration embedded.
+ *
+ * @author Johannes M. Schmitt
+ */
+class PassConfig
+{
+ const TYPE_AFTER_REMOVING = 'afterRemoving';
+ const TYPE_BEFORE_OPTIMIZATION = 'beforeOptimization';
+ const TYPE_BEFORE_REMOVING = 'beforeRemoving';
+ const TYPE_OPTIMIZE = 'optimization';
+ const TYPE_REMOVE = 'removing';
+
+ private $mergePass;
+ private $afterRemovingPasses = [];
+ private $beforeOptimizationPasses = [];
+ private $beforeRemovingPasses = [];
+ private $optimizationPasses;
+ private $removingPasses;
+
+ public function __construct()
+ {
+ $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.
+ *
+ * @return CompilerPassInterface[]
+ */
+ public function getPasses()
+ {
+ return array_merge(
+ [$this->mergePass],
+ $this->getBeforeOptimizationPasses(),
+ $this->getOptimizationPasses(),
+ $this->getBeforeRemovingPasses(),
+ $this->getRemovingPasses(),
+ $this->getAfterRemovingPasses()
+ );
+ }
+
+ /**
+ * Adds a pass.
+ *
+ * @param CompilerPassInterface $pass A Compiler pass
+ * @param string $type The pass type
+ *
+ * @throws InvalidArgumentException when a pass type doesn't exist
+ */
+ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
+ {
+ if (\func_num_args() >= 3) {
+ $priority = func_get_arg(2);
+ } else {
+ if (__CLASS__ !== static::class) {
+ $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);
+ }
+ }
+
+ $priority = 0;
+ }
+
+ $property = $type.'Passes';
+ if (!isset($this->$property)) {
+ throw new InvalidArgumentException(sprintf('Invalid type "%s".', $type));
+ }
+
+ $passes = &$this->$property;
+
+ if (!isset($passes[$priority])) {
+ $passes[$priority] = [];
+ }
+ $passes[$priority][] = $pass;
+ }
+
+ /**
+ * Gets all passes for the AfterRemoving pass.
+ *
+ * @return CompilerPassInterface[]
+ */
+ public function getAfterRemovingPasses()
+ {
+ return $this->sortPasses($this->afterRemovingPasses);
+ }
+
+ /**
+ * Gets all passes for the BeforeOptimization pass.
+ *
+ * @return CompilerPassInterface[]
+ */
+ public function getBeforeOptimizationPasses()
+ {
+ return $this->sortPasses($this->beforeOptimizationPasses);
+ }
+
+ /**
+ * Gets all passes for the BeforeRemoving pass.
+ *
+ * @return CompilerPassInterface[]
+ */
+ public function getBeforeRemovingPasses()
+ {
+ return $this->sortPasses($this->beforeRemovingPasses);
+ }
+
+ /**
+ * Gets all passes for the Optimization pass.
+ *
+ * @return CompilerPassInterface[]
+ */
+ public function getOptimizationPasses()
+ {
+ return $this->sortPasses($this->optimizationPasses);
+ }
+
+ /**
+ * Gets all passes for the Removing pass.
+ *
+ * @return CompilerPassInterface[]
+ */
+ public function getRemovingPasses()
+ {
+ return $this->sortPasses($this->removingPasses);
+ }
+
+ /**
+ * Gets the Merge pass.
+ *
+ * @return CompilerPassInterface
+ */
+ public function getMergePass()
+ {
+ return $this->mergePass;
+ }
+
+ public function setMergePass(CompilerPassInterface $pass)
+ {
+ $this->mergePass = $pass;
+ }
+
+ /**
+ * Sets the AfterRemoving passes.
+ *
+ * @param CompilerPassInterface[] $passes
+ */
+ public function setAfterRemovingPasses(array $passes)
+ {
+ $this->afterRemovingPasses = [$passes];
+ }
+
+ /**
+ * Sets the BeforeOptimization passes.
+ *
+ * @param CompilerPassInterface[] $passes
+ */
+ public function setBeforeOptimizationPasses(array $passes)
+ {
+ $this->beforeOptimizationPasses = [$passes];
+ }
+
+ /**
+ * Sets the BeforeRemoving passes.
+ *
+ * @param CompilerPassInterface[] $passes
+ */
+ public function setBeforeRemovingPasses(array $passes)
+ {
+ $this->beforeRemovingPasses = [$passes];
+ }
+
+ /**
+ * Sets the Optimization passes.
+ *
+ * @param CompilerPassInterface[] $passes
+ */
+ public function setOptimizationPasses(array $passes)
+ {
+ $this->optimizationPasses = [$passes];
+ }
+
+ /**
+ * Sets the Removing passes.
+ *
+ * @param CompilerPassInterface[] $passes
+ */
+ public function setRemovingPasses(array $passes)
+ {
+ $this->removingPasses = [$passes];
+ }
+
+ /**
+ * Sort passes by priority.
+ *
+ * @param array $passes CompilerPassInterface instances with their priority as key
+ *
+ * @return CompilerPassInterface[]
+ */
+ private function sortPasses(array $passes)
+ {
+ if (0 === \count($passes)) {
+ return [];
+ }
+
+ krsort($passes);
+
+ // Flatten the array
+ return \call_user_func_array('array_merge', $passes);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
new file mode 100644
index 00000000..c7e12536
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/PriorityTaggedServiceTrait.php
@@ -0,0 +1,54 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Trait that allows a generic method to find and sort service by priority option in the tag.
+ *
+ * @author Iltar van der Berg
+ */
+trait PriorityTaggedServiceTrait
+{
+ /**
+ * Finds all services with the given tag name and order them by their priority.
+ *
+ * The order of additions must be respected for services having the same priority,
+ * and knowing that the \SplPriorityQueue class does not respect the FIFO method,
+ * we should not use that class.
+ *
+ * @see https://bugs.php.net/53710
+ * @see https://bugs.php.net/60926
+ *
+ * @param string $tagName
+ *
+ * @return Reference[]
+ */
+ private function findAndSortTaggedServices($tagName, ContainerBuilder $container)
+ {
+ $services = [];
+
+ foreach ($container->findTaggedServiceIds($tagName, true) as $serviceId => $attributes) {
+ $priority = isset($attributes[0]['priority']) ? $attributes[0]['priority'] : 0;
+ $services[$priority][] = new Reference($serviceId);
+ }
+
+ if ($services) {
+ krsort($services);
+ $services = \call_user_func_array('array_merge', $services);
+ }
+
+ return $services;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
new file mode 100644
index 00000000..b4d0d055
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RegisterEnvVarProcessorsPass.php
@@ -0,0 +1,78 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\EnvVarProcessor;
+use Symfony\Component\DependencyInjection\EnvVarProcessorInterface;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\DependencyInjection\ServiceLocator;
+
+/**
+ * Creates the container.env_var_processors_locator service.
+ *
+ * @author Nicolas Grekas
+ */
+class RegisterEnvVarProcessorsPass implements CompilerPassInterface
+{
+ private static $allowedTypes = ['array', 'bool', 'float', 'int', 'string'];
+
+ 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 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 ServiceClosureArgument(new Reference($id));
+ $types[$prefix] = self::validateProvidedTypes($type, $class);
+ }
+ }
+
+ if ($bag instanceof EnvPlaceholderParameterBag) {
+ foreach (EnvVarProcessor::getProvidedTypes() as $prefix => $type) {
+ if (!isset($types[$prefix])) {
+ $types[$prefix] = self::validateProvidedTypes($type, EnvVarProcessor::class);
+ }
+ }
+ $bag->setProvidedTypes($types);
+ }
+
+ if ($processors) {
+ $container->register('container.env_var_processors_locator', ServiceLocator::class)
+ ->setPublic(true)
+ ->setArguments([$processors])
+ ;
+ }
+ }
+
+ private static function validateProvidedTypes($types, $class)
+ {
+ $types = explode('|', $types);
+
+ foreach ($types as $type) {
+ 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/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
new file mode 100644
index 00000000..bf1387c0
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RegisterServiceSubscribersPass.php
@@ -0,0 +1,101 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
+use Symfony\Component\DependencyInjection\TypedReference;
+
+/**
+ * Compiler pass to register tagged services that require a service locator.
+ *
+ * @author Nicolas Grekas
+ */
+class RegisterServiceSubscribersPass extends AbstractRecursivePass
+{
+ protected function processValue($value, $isRoot = false)
+ {
+ 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;
+ continue;
+ }
+ 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 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)) {
+ $attributes['key'] = $attributes['id'];
+ }
+ if (isset($serviceMap[$attributes['key']])) {
+ continue;
+ }
+ $serviceMap[$attributes['key']] = new Reference($attributes['id']);
+ }
+ $class = $value->getClass();
+
+ if (!$r = $this->container->getReflectionClass($class)) {
+ throw new InvalidArgumentException(sprintf('Class "%s" used for service "%s" cannot be found.', $class, $this->currentId));
+ }
+ 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;
+
+ 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 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 = ContainerInterface::IGNORE_ON_INVALID_REFERENCE;
+ }
+ if (\is_int($key)) {
+ $key = $type;
+ }
+ if (!isset($serviceMap[$key])) {
+ if (!$autowire) {
+ 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 Reference($type);
+ }
+
+ $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 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) ServiceLocatorTagPass::register($this->container, $subscriberMap, $this->currentId)]);
+
+ return parent::processValue($value);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
new file mode 100644
index 00000000..04b6852f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemoveAbstractDefinitionsPass.php
@@ -0,0 +1,33 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Removes abstract Definitions.
+ */
+class RemoveAbstractDefinitionsPass implements CompilerPassInterface
+{
+ /**
+ * Removes abstract definitions from the ContainerBuilder.
+ */
+ 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));
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
new file mode 100644
index 00000000..03d9e1d8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemovePrivateAliasesPass.php
@@ -0,0 +1,39 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Remove private aliases from the container. They were only used to establish
+ * dependencies between services, and these dependencies have been resolved in
+ * one of the previous passes.
+ *
+ * @author Johannes M. Schmitt
+ */
+class RemovePrivateAliasesPass implements CompilerPassInterface
+{
+ /**
+ * Removes private aliases from the ContainerBuilder.
+ */
+ 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));
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
new file mode 100644
index 00000000..a1013f66
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RemoveUnusedDefinitionsPass.php
@@ -0,0 +1,85 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Removes unused service definitions from the container.
+ *
+ * @author Johannes M. Schmitt
+ */
+class RemoveUnusedDefinitionsPass implements RepeatablePassInterface
+{
+ private $repeatedPass;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setRepeatedPass(RepeatedPass $repeatedPass)
+ {
+ $this->repeatedPass = $repeatedPass;
+ }
+
+ /**
+ * Processes the ContainerBuilder to remove unused definitions.
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $graph = $container->getCompiler()->getServiceReferenceGraph();
+
+ $hasChanged = false;
+ foreach ($container->getDefinitions() as $id => $definition) {
+ if ($definition->isPublic() || $definition->isPrivate()) {
+ continue;
+ }
+
+ if ($graph->hasNode($id)) {
+ $edges = $graph->getNode($id)->getInEdges();
+ $referencingAliases = [];
+ $sourceIds = [];
+ foreach ($edges as $edge) {
+ if ($edge->isWeak()) {
+ continue;
+ }
+ $node = $edge->getSourceNode();
+ $sourceIds[] = $node->getId();
+
+ if ($node->isAlias()) {
+ $referencingAliases[] = $node->getValue();
+ }
+ }
+ $isReferenced = (\count(array_unique($sourceIds)) - \count($referencingAliases)) > 0;
+ } else {
+ $referencingAliases = [];
+ $isReferenced = false;
+ }
+
+ if (1 === \count($referencingAliases) && false === $isReferenced) {
+ $container->setDefinition((string) reset($referencingAliases), $definition);
+ $definition->setPublic(!$definition->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->removeDefinition($id);
+ $container->resolveEnvPlaceholders(serialize($definition));
+ $container->log($this, sprintf('Removed service "%s"; reason: unused.', $id));
+ $hasChanged = true;
+ }
+ }
+
+ if ($hasChanged) {
+ $this->repeatedPass->setRepeat();
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
new file mode 100644
index 00000000..2b88bfb9
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RepeatablePassInterface.php
@@ -0,0 +1,23 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+/**
+ * Interface that must be implemented by passes that are run as part of an
+ * RepeatedPass.
+ *
+ * @author Johannes M. Schmitt
+ */
+interface RepeatablePassInterface extends CompilerPassInterface
+{
+ public function setRepeatedPass(RepeatedPass $repeatedPass);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
new file mode 100644
index 00000000..3da1a0d5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/RepeatedPass.php
@@ -0,0 +1,79 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+
+/**
+ * A pass that might be run repeatedly.
+ *
+ * @author Johannes M. Schmitt
+ */
+class RepeatedPass implements CompilerPassInterface
+{
+ /**
+ * @var bool
+ */
+ private $repeat = false;
+
+ private $passes;
+
+ /**
+ * @param RepeatablePassInterface[] $passes An array of RepeatablePassInterface objects
+ *
+ * @throws InvalidArgumentException when the passes don't implement RepeatablePassInterface
+ */
+ public function __construct(array $passes)
+ {
+ foreach ($passes as $pass) {
+ if (!$pass instanceof RepeatablePassInterface) {
+ throw new InvalidArgumentException('$passes must be an array of RepeatablePassInterface.');
+ }
+
+ $pass->setRepeatedPass($this);
+ }
+
+ $this->passes = $passes;
+ }
+
+ /**
+ * Process the repeatable passes that run more than once.
+ */
+ public function process(ContainerBuilder $container)
+ {
+ do {
+ $this->repeat = false;
+ foreach ($this->passes as $pass) {
+ $pass->process($container);
+ }
+ } while ($this->repeat);
+ }
+
+ /**
+ * Sets if the pass should repeat.
+ */
+ public function setRepeat()
+ {
+ $this->repeat = true;
+ }
+
+ /**
+ * Returns the passes.
+ *
+ * @return RepeatablePassInterface[] An array of RepeatablePassInterface objects
+ */
+ public function getPasses()
+ {
+ return $this->passes;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
new file mode 100644
index 00000000..472bf941
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ReplaceAliasByActualDefinitionPass.php
@@ -0,0 +1,89 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Replaces aliases with actual service definitions, effectively removing these
+ * aliases.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ReplaceAliasByActualDefinitionPass extends AbstractRecursivePass
+{
+ private $replacements;
+
+ /**
+ * Process the Container to replace aliases with service definitions.
+ *
+ * @throws InvalidArgumentException if the service definition does not exist
+ */
+ public function process(ContainerBuilder $container)
+ {
+ // First collect all alias targets that need to be replaced
+ $seenAliasTargets = [];
+ $replacements = [];
+ foreach ($container->getAliases() as $definitionId => $target) {
+ $targetId = $container->normalizeId($target);
+ // Special case: leave this target alone
+ if ('service_container' === $targetId) {
+ continue;
+ }
+ // Check if target needs to be replaces
+ if (isset($replacements[$targetId])) {
+ $container->setAlias($definitionId, $replacements[$targetId])->setPublic($target->isPublic())->setPrivate($target->isPrivate());
+ }
+ // No need to process the same target twice
+ if (isset($seenAliasTargets[$targetId])) {
+ continue;
+ }
+ // Process new target
+ $seenAliasTargets[$targetId] = true;
+ try {
+ $definition = $container->getDefinition($targetId);
+ } 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;
+ }
+ // Remove private definition and schedule for replacement
+ $definition->setPublic(!$target->isPrivate());
+ $definition->setPrivate($target->isPrivate());
+ $container->setDefinition($definitionId, $definition);
+ $container->removeDefinition($targetId);
+ $replacements[$targetId] = $definitionId;
+ }
+ $this->replacements = $replacements;
+
+ parent::process($container);
+ $this->replacements = [];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ if ($value instanceof Reference && isset($this->replacements[$referenceId = $this->container->normalizeId($value)])) {
+ // Perform the replacement
+ $newId = $this->replacements[$referenceId];
+ $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/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
new file mode 100644
index 00000000..065dbb4b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php
@@ -0,0 +1,180 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\BoundArgument;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\DependencyInjection\TypedReference;
+
+/**
+ * @author Guilhem Niot
+ */
+class ResolveBindingsPass extends AbstractRecursivePass
+{
+ private $usedBindings = [];
+ private $unusedBindings = [];
+ private $errorMessages = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ 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);
+ if ($this->errorMessages) {
+ $message .= sprintf("\nCould be related to%s:", 1 < \count($this->errorMessages) ? ' one of' : '');
+ }
+ foreach ($this->errorMessages as $m) {
+ $message .= "\n - ".$m;
+ }
+ throw new InvalidArgumentException($message);
+ }
+ } finally {
+ $this->usedBindings = [];
+ $this->unusedBindings = [];
+ $this->errorMessages = [];
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ if ($value instanceof TypedReference && $value->getType() === $this->container->normalizeId($value)) {
+ // Already checked
+ $bindings = $this->container->getDefinition($this->currentId)->getBindings();
+
+ if (isset($bindings[$value->getType()])) {
+ return $this->getBindingValue($bindings[$value->getType()]);
+ }
+
+ return parent::processValue($value, $isRoot);
+ }
+
+ if (!$value instanceof Definition || !$bindings = $value->getBindings()) {
+ return parent::processValue($value, $isRoot);
+ }
+
+ foreach ($bindings as $key => $binding) {
+ list($bindingValue, $bindingId, $used) = $binding->getValues();
+ if ($used) {
+ $this->usedBindings[$bindingId] = true;
+ unset($this->unusedBindings[$bindingId]);
+ } elseif (!isset($this->usedBindings[$bindingId])) {
+ $this->unusedBindings[$bindingId] = [$key, $this->currentId];
+ }
+
+ if (isset($key[0]) && '$' === $key[0]) {
+ continue;
+ }
+
+ 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()) {
+ return parent::processValue($value, $isRoot);
+ }
+
+ $calls = $value->getMethodCalls();
+
+ try {
+ if ($constructor = $this->getConstructor($value, false)) {
+ $calls[] = [$constructor, $value->getArguments()];
+ }
+ } 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) {
+ $reflectionMethod = $method;
+ } else {
+ try {
+ $reflectionMethod = $this->getReflectionMethod($value, $method);
+ } catch (RuntimeException $e) {
+ if ($value->getFactory()) {
+ continue;
+ }
+ throw $e;
+ }
+ }
+
+ foreach ($reflectionMethod->getParameters() as $key => $parameter) {
+ if (\array_key_exists($key, $arguments) && '' !== $arguments[$key]) {
+ continue;
+ }
+
+ if (\array_key_exists('$'.$parameter->name, $bindings)) {
+ $arguments[$key] = $this->getBindingValue($bindings['$'.$parameter->name]);
+
+ continue;
+ }
+
+ $typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter, true);
+
+ if (!isset($bindings[$typeHint])) {
+ continue;
+ }
+
+ $arguments[$key] = $this->getBindingValue($bindings[$typeHint]);
+ }
+
+ if ($arguments !== $call[1]) {
+ ksort($arguments);
+ $calls[$i][1] = $arguments;
+ }
+ }
+
+ if ($constructor) {
+ list(, $arguments) = array_pop($calls);
+
+ if ($arguments !== $value->getArguments()) {
+ $value->setArguments($arguments);
+ }
+ }
+
+ if ($calls !== $value->getMethodCalls()) {
+ $value->setMethodCalls($calls);
+ }
+
+ return parent::processValue($value, $isRoot);
+ }
+
+ private function getBindingValue(BoundArgument $binding)
+ {
+ list($bindingValue, $bindingId) = $binding->getValues();
+
+ $this->usedBindings[$bindingId] = true;
+ unset($this->unusedBindings[$bindingId]);
+
+ return $bindingValue;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
new file mode 100644
index 00000000..539395a4
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveChildDefinitionsPass.php
@@ -0,0 +1,198 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ChildDefinition;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\ExceptionInterface;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+
+/**
+ * This replaces all ChildDefinition instances with their equivalent fully
+ * merged Definition instance.
+ *
+ * @author Johannes M. Schmitt
+ * @author Nicolas Grekas
+ */
+class ResolveChildDefinitionsPass extends AbstractRecursivePass
+{
+ private $currentPath;
+
+ protected function processValue($value, $isRoot = false)
+ {
+ if (!$value instanceof Definition) {
+ return parent::processValue($value, $isRoot);
+ }
+ if ($isRoot) {
+ // yes, we are specifically fetching the definition from the
+ // container to ensure we are not operating on stale data
+ $value = $this->container->getDefinition($this->currentId);
+ }
+ if ($value instanceof ChildDefinition) {
+ $this->currentPath = [];
+ $value = $this->resolveDefinition($value);
+ if ($isRoot) {
+ $this->container->setDefinition($this->currentId, $value);
+ }
+ }
+
+ return parent::processValue($value, $isRoot);
+ }
+
+ /**
+ * Resolves the definition.
+ *
+ * @return Definition
+ *
+ * @throws RuntimeException When the definition is invalid
+ */
+ private function resolveDefinition(ChildDefinition $definition)
+ {
+ try {
+ return $this->doResolveDefinition($definition);
+ } catch (ServiceCircularReferenceException $e) {
+ throw $e;
+ } 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(ChildDefinition $definition)
+ {
+ if (!$this->container->has($parent = $definition->getParent())) {
+ throw new RuntimeException(sprintf('Parent definition "%s" does not exist.', $parent));
+ }
+
+ $searchKey = array_search($parent, $this->currentPath);
+ $this->currentPath[] = $parent;
+
+ if (false !== $searchKey) {
+ throw new ServiceCircularReferenceException($parent, \array_slice($this->currentPath, $searchKey));
+ }
+
+ $parentDef = $this->container->findDefinition($parent);
+ 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 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->isDeprecated()) {
+ $def->setDeprecated(true, $parentDef->getDeprecationMessage('%service_id%'));
+ }
+ $def->setFactory($parentDef->getFactory());
+ $def->setConfigurator($parentDef->getConfigurator());
+ $def->setFile($parentDef->getFile());
+ $def->setPublic($parentDef->isPublic());
+ $def->setLazy($parentDef->isLazy());
+ $def->setAutowired($parentDef->isAutowired());
+ $def->setChanges($parentDef->getChanges());
+
+ $def->setBindings($definition->getBindings() + $parentDef->getBindings());
+
+ // overwrite with values specified in the decorator
+ $changes = $definition->getChanges();
+ if (isset($changes['class'])) {
+ $def->setClass($definition->getClass());
+ }
+ if (isset($changes['factory'])) {
+ $def->setFactory($definition->getFactory());
+ }
+ if (isset($changes['configurator'])) {
+ $def->setConfigurator($definition->getConfigurator());
+ }
+ if (isset($changes['file'])) {
+ $def->setFile($definition->getFile());
+ }
+ if (isset($changes['public'])) {
+ $def->setPublic($definition->isPublic());
+ } else {
+ $def->setPrivate($definition->isPrivate() || $parentDef->isPrivate());
+ }
+ if (isset($changes['lazy'])) {
+ $def->setLazy($definition->isLazy());
+ }
+ if (isset($changes['deprecated'])) {
+ $def->setDeprecated($definition->isDeprecated(), $definition->getDeprecationMessage('%service_id%'));
+ }
+ if (isset($changes['autowired'])) {
+ $def->setAutowired($definition->isAutowired());
+ }
+ if (isset($changes['shared'])) {
+ $def->setShared($definition->isShared());
+ }
+ if (isset($changes['decorated_service'])) {
+ $decoratedService = $definition->getDecoratedService();
+ if (null === $decoratedService) {
+ $def->setDecoratedService($decoratedService);
+ } else {
+ $def->setDecoratedService($decoratedService[0], $decoratedService[1], $decoratedService[2]);
+ }
+ }
+
+ // merge arguments
+ foreach ($definition->getArguments() as $k => $v) {
+ if (is_numeric($k)) {
+ $def->addArgument($v);
+ } elseif (0 === strpos($k, 'index_')) {
+ $def->replaceArgument((int) substr($k, \strlen('index_')), $v);
+ } else {
+ $def->setArgument($k, $v);
+ }
+ }
+
+ // merge properties
+ foreach ($definition->getProperties() as $k => $v) {
+ $def->setProperty($k, $v);
+ }
+
+ // append method calls
+ if ($calls = $definition->getMethodCalls()) {
+ $def->setMethodCalls(array_merge($def->getMethodCalls(), $calls));
+ }
+
+ // merge autowiring types
+ foreach ($definition->getAutowiringTypes(false) as $autowiringType) {
+ $def->addAutowiringType($autowiringType);
+ }
+
+ // these attributes are always taken from the child
+ $def->setAbstract($definition->isAbstract());
+ $def->setTags($definition->getTags());
+ // autoconfigure is never taken from parent (on purpose)
+ // and it's not legal on an instanceof
+ $def->setAutoconfigured($definition->isAutoconfigured());
+
+ return $def;
+ }
+}
+
+class_alias(ResolveChildDefinitionsPass::class, ResolveDefinitionTemplatesPass::class);
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
new file mode 100644
index 00000000..b1c1b4f8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveClassPass.php
@@ -0,0 +1,56 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ChildDefinition;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+
+/**
+ * @author Nicolas Grekas
+ */
+class ResolveClassPass implements CompilerPassInterface
+{
+ private $changes = [];
+
+ /**
+ * {@inheritdoc}
+ */
+ 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 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;
+ $definition->setClass($id);
+ }
+ }
+ }
+
+ /**
+ * @internal
+ *
+ * @deprecated since 3.3, to be removed in 4.0.
+ */
+ public function getChanges()
+ {
+ $changes = $this->changes;
+ $this->changes = [];
+
+ return $changes;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php
new file mode 100644
index 00000000..79fca8d5
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveDefinitionTemplatesPass.php
@@ -0,0 +1,29 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace 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(ResolveChildDefinitionsPass::class);
+
+if (false) {
+ /**
+ * This definition decorates another definition.
+ *
+ * @author Johannes M. Schmitt
+ *
+ * @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 AbstractRecursivePass
+ {
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
new file mode 100644
index 00000000..9e1edd4d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveEnvPlaceholdersPass.php
@@ -0,0 +1,44 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+
+/**
+ * Replaces env var placeholders by their current values.
+ */
+class ResolveEnvPlaceholdersPass extends AbstractRecursivePass
+{
+ protected function processValue($value, $isRoot = false)
+ {
+ if (\is_string($value)) {
+ return $this->container->resolveEnvPlaceholders($value, true);
+ }
+ if ($value instanceof Definition) {
+ $changes = $value->getChanges();
+ if (isset($changes['class'])) {
+ $value->setClass($this->container->resolveEnvPlaceholders($value->getClass(), true));
+ }
+ if (isset($changes['file'])) {
+ $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);
+ }
+
+ return $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
new file mode 100644
index 00000000..848da7f2
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveFactoryClassPass.php
@@ -0,0 +1,38 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+
+/**
+ * @author Maxime Steinhausser
+ */
+class ResolveFactoryClassPass extends AbstractRecursivePass
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ if ($value instanceof Definition && \is_array($factory = $value->getFactory()) && null === $factory[0]) {
+ if (null === $class = $value->getClass()) {
+ 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);
+ }
+
+ return parent::processValue($value, $isRoot);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
new file mode 100644
index 00000000..4e025113
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveHotPathPass.php
@@ -0,0 +1,71 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Propagate "container.hot_path" tags to referenced services.
+ *
+ * @author Nicolas Grekas
+ */
+class ResolveInstanceofConditionalsPass implements CompilerPassInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ foreach ($container->getAutoconfiguredInstanceof() as $interface => $definition) {
+ if ($definition->getArguments()) {
+ 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 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 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(ContainerBuilder $container, $id, Definition $definition)
+ {
+ $instanceofConditionals = $definition->getInstanceofConditionals();
+ $autoconfiguredInstanceof = $definition->isAutoconfigured() ? $container->getAutoconfiguredInstanceof() : [];
+ if (!$instanceofConditionals && !$autoconfiguredInstanceof) {
+ return $definition;
+ }
+
+ if (!$class = $container->getParameterBag()->resolveValue($definition->getClass())) {
+ return $definition;
+ }
+
+ $conditionals = $this->mergeConditionals($autoconfiguredInstanceof, $instanceofConditionals, $container);
+
+ $definition->setInstanceofConditionals([]);
+ $parent = $shared = null;
+ $instanceofTags = [];
+ $reflectionClass = null;
+
+ foreach ($conditionals as $interface => $instanceofDefs) {
+ if ($interface !== $class && !(null === $reflectionClass ? $reflectionClass = ($container->getReflectionClass($class, false) ?: false) : $reflectionClass)) {
+ continue;
+ }
+
+ 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);
+ $parent = 'instanceof.'.$interface.'.'.$key.'.'.$id;
+ $container->setDefinition($parent, $instanceofDef);
+ $instanceofTags[] = $instanceofDef->getTags();
+ $instanceofDef->setTags([]);
+
+ if (isset($instanceofDef->getChanges()['shared'])) {
+ $shared = $instanceofDef->isShared();
+ }
+ }
+ }
+
+ if ($parent) {
+ $bindings = $definition->getBindings();
+ $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->setParent($parent);
+
+ if (null !== $shared && !isset($definition->getChanges()['shared'])) {
+ $definition->setShared($shared);
+ }
+
+ $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))) {
+ continue;
+ }
+ $definition->addTag($k, $v);
+ }
+ }
+ }
+
+ $definition->setBindings($bindings);
+
+ // reset fields with "merge" behavior
+ $abstract
+ ->setBindings([])
+ ->setArguments([])
+ ->setMethodCalls([])
+ ->setDecoratedService(null)
+ ->setTags([])
+ ->setAbstract(true);
+ }
+
+ return $definition;
+ }
+
+ private function mergeConditionals(array $autoconfiguredInstanceof, array $instanceofConditionals, ContainerBuilder $container)
+ {
+ // make each value an array of ChildDefinition
+ $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 RuntimeException(sprintf('"%s" is set as an "instanceof" conditional, but it does not exist.', $interface));
+ }
+
+ if (!isset($autoconfiguredInstanceof[$interface])) {
+ $conditionals[$interface] = [];
+ }
+
+ $conditionals[$interface][] = $instanceofDef;
+ }
+
+ return $conditionals;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
new file mode 100644
index 00000000..f1a1475a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveInvalidReferencesPass.php
@@ -0,0 +1,111 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Emulates the invalid behavior if the reference is not found within the
+ * container.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ResolveInvalidReferencesPass implements CompilerPassInterface
+{
+ private $container;
+ private $signalingException;
+
+ /**
+ * Process the ContainerBuilder to resolve invalid references.
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $this->container = $container;
+ $this->signalingException = new RuntimeException('Invalid reference.');
+
+ try {
+ $this->processValue($container->getDefinitions(), 1);
+ } finally {
+ $this->container = $this->signalingException = null;
+ }
+ }
+
+ /**
+ * Processes arguments to determine invalid references.
+ *
+ * @throws RuntimeException When an invalid reference is found
+ */
+ private function processValue($value, $rootLevel = 0, $level = 0)
+ {
+ if ($value instanceof ServiceClosureArgument) {
+ $value->setValues($this->processValue($value->getValues(), 1, 1));
+ } elseif ($value instanceof ArgumentInterface) {
+ $value->setValues($this->processValue($value->getValues(), $rootLevel, 1 + $level));
+ } 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)) {
+ $i = 0;
+
+ foreach ($value as $k => $v) {
+ try {
+ if (false !== $i && $k !== $i++) {
+ $i = false;
+ }
+ if ($v !== $processedValue = $this->processValue($v, $rootLevel, 1 + $level)) {
+ $value[$k] = $processedValue;
+ }
+ } catch (RuntimeException $e) {
+ if ($rootLevel < $level || ($rootLevel && !$level)) {
+ unset($value[$k]);
+ } elseif ($rootLevel) {
+ throw $e;
+ } else {
+ $value[$k] = null;
+ }
+ }
+ }
+
+ // Ensure numerically indexed arguments have sequential numeric keys.
+ if (false !== $i) {
+ $value = array_values($value);
+ }
+ } elseif ($value instanceof Reference) {
+ if ($this->container->has($value)) {
+ return $value;
+ }
+ $invalidBehavior = $value->getInvalidBehavior();
+
+ // resolve invalid behavior
+ if (ContainerInterface::NULL_ON_INVALID_REFERENCE === $invalidBehavior) {
+ $value = null;
+ } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $invalidBehavior) {
+ if (0 < $level || $rootLevel) {
+ throw $this->signalingException;
+ }
+ $value = null;
+ }
+ }
+
+ return $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
new file mode 100644
index 00000000..225014f1
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php
@@ -0,0 +1,102 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\LazyProxy\ProxyHelper;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Resolves named arguments to their corresponding numeric index.
+ *
+ * @author Kévin Dunglas
+ */
+class ResolveNamedArgumentsPass extends AbstractRecursivePass
+{
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ 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;
+ $parameters = null;
+ $resolvedArguments = [];
+
+ foreach ($arguments as $key => $argument) {
+ if (\is_int($key)) {
+ $resolvedArguments[$key] = $argument;
+ continue;
+ }
+
+ if (null === $parameters) {
+ $r = $this->getReflectionMethod($value, $method);
+ $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId;
+ $method = $r->getName();
+ $parameters = $r->getParameters();
+ }
+
+ if (isset($key[0]) && '$' === $key[0]) {
+ foreach ($parameters as $j => $p) {
+ if ($key === '$'.$p->name) {
+ $resolvedArguments[$j] = $argument;
+
+ continue 2;
+ }
+ }
+
+ 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 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;
+ foreach ($parameters as $j => $p) {
+ if (!\array_key_exists($j, $resolvedArguments) && ProxyHelper::getTypeHint($r, $p, true) === $key) {
+ $resolvedArguments[$j] = $argument;
+ $typeFound = true;
+ }
+ }
+
+ if (!$typeFound) {
+ 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);
+ $calls[$i][1] = $resolvedArguments;
+ }
+ }
+
+ list(, $arguments) = array_pop($calls);
+
+ if ($arguments !== $value->getArguments()) {
+ $value->setArguments($arguments);
+ }
+ if ($calls !== $value->getMethodCalls()) {
+ $value->setMethodCalls($calls);
+ }
+
+ return parent::processValue($value, $isRoot);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
new file mode 100644
index 00000000..32eb6a3a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveParameterPlaceHoldersPass.php
@@ -0,0 +1,98 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
+
+/**
+ * Resolves all parameter placeholders "%somevalue%" to their real values.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ResolveParameterPlaceHoldersPass extends AbstractRecursivePass
+{
+ private $bag;
+ private $resolveArrays;
+ private $throwOnResolveException;
+
+ public function __construct($resolveArrays = true, $throwOnResolveException = true)
+ {
+ $this->resolveArrays = $resolveArrays;
+ $this->throwOnResolveException = $throwOnResolveException;
+ }
+
+ /**
+ * {@inheritdoc}
+ *
+ * @throws ParameterNotFoundException
+ */
+ public function process(ContainerBuilder $container)
+ {
+ $this->bag = $container->getParameterBag();
+
+ try {
+ parent::process($container);
+
+ $aliases = [];
+ foreach ($container->getAliases() as $name => $target) {
+ $this->currentId = $name;
+ $aliases[$this->bag->resolveValue($name)] = $target;
+ }
+ $container->setAliases($aliases);
+ } catch (ParameterNotFoundException $e) {
+ $e->setSourceId($this->currentId);
+
+ throw $e;
+ }
+
+ $this->bag->resolve();
+ $this->bag = null;
+ }
+
+ protected function processValue($value, $isRoot = false)
+ {
+ if (\is_string($value)) {
+ try {
+ $v = $this->bag->resolveValue($value);
+ } 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;
+ }
+ if ($value instanceof Definition) {
+ $value->setBindings($this->processValue($value->getBindings()));
+ $changes = $value->getChanges();
+ if (isset($changes['class'])) {
+ $value->setClass($this->bag->resolveValue($value->getClass()));
+ }
+ if (isset($changes['file'])) {
+ $value->setFile($this->bag->resolveValue($value->getFile()));
+ }
+ }
+
+ $value = parent::processValue($value, $isRoot);
+
+ if ($value && \is_array($value)) {
+ $value = array_combine($this->bag->resolveValue(array_keys($value)), $value);
+ }
+
+ return $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
new file mode 100644
index 00000000..1bd99345
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolvePrivatesPass.php
@@ -0,0 +1,40 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * @author Nicolas Grekas
+ */
+class ResolvePrivatesPass implements CompilerPassInterface
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ foreach ($container->getDefinitions() as $id => $definition) {
+ if ($definition->isPrivate()) {
+ $definition->setPublic(false);
+ $definition->setPrivate(true);
+ }
+ }
+
+ foreach ($container->getAliases() as $id => $alias) {
+ if ($alias->isPrivate()) {
+ $alias->setPublic(false);
+ $alias->setPrivate(true);
+ }
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
new file mode 100644
index 00000000..2559dcf1
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveReferencesToAliasesPass.php
@@ -0,0 +1,76 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Replaces all references to aliases with references to the actual service.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ResolveReferencesToAliasesPass extends AbstractRecursivePass
+{
+ /**
+ * {@inheritdoc}
+ */
+ public function process(ContainerBuilder $container)
+ {
+ parent::process($container);
+
+ foreach ($container->getAliases() as $id => $alias) {
+ $aliasId = $container->normalizeId($alias);
+ if ($aliasId !== $defId = $this->getDefinitionId($aliasId, $container)) {
+ $container->setAlias($id, $defId)->setPublic($alias->isPublic())->setPrivate($alias->isPrivate());
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ if ($value instanceof Reference) {
+ $defId = $this->getDefinitionId($id = $this->container->normalizeId($value), $this->container);
+
+ if ($defId !== $id) {
+ return new Reference($defId, $value->getInvalidBehavior());
+ }
+ }
+
+ return parent::processValue($value);
+ }
+
+ /**
+ * Resolves an alias into a definition id.
+ *
+ * @param string $id The definition or alias id to resolve
+ *
+ * @return string The definition id with aliases resolved
+ */
+ private function getDefinitionId($id, ContainerBuilder $container)
+ {
+ $seen = [];
+ while ($container->hasAlias($id)) {
+ if (isset($seen[$id])) {
+ throw new ServiceCircularReferenceException($id, array_merge(array_keys($seen), [$id]));
+ }
+ $seen[$id] = true;
+ $id = $container->normalizeId($container->getAlias($id));
+ }
+
+ return $id;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
new file mode 100644
index 00000000..ccc80a44
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveServiceSubscribersPass.php
@@ -0,0 +1,51 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Psr\Container\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * Compiler pass to inject their service locator to service subscribers.
+ *
+ * @author Nicolas Grekas
+ */
+class ResolveServiceSubscribersPass extends AbstractRecursivePass
+{
+ private $serviceLocator;
+
+ protected function processValue($value, $isRoot = false)
+ {
+ if ($value instanceof Reference && $this->serviceLocator && ContainerInterface::class === $this->container->normalizeId($value)) {
+ return new Reference($this->serviceLocator);
+ }
+
+ if (!$value instanceof Definition) {
+ return parent::processValue($value, $isRoot);
+ }
+
+ $serviceLocator = $this->serviceLocator;
+ $this->serviceLocator = null;
+
+ if ($value->hasTag('container.service_subscriber.locator')) {
+ $this->serviceLocator = $value->getTag('container.service_subscriber.locator')[0]['id'];
+ $value->clearTag('container.service_subscriber.locator');
+ }
+
+ try {
+ return parent::processValue($value);
+ } finally {
+ $this->serviceLocator = $serviceLocator;
+ }
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
new file mode 100644
index 00000000..009cee9b
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ResolveTaggedIteratorArgumentPass.php
@@ -0,0 +1,38 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
+
+/**
+ * Resolves all TaggedIteratorArgument arguments.
+ *
+ * @author Roland Franssen
+ */
+class ResolveTaggedIteratorArgumentPass extends AbstractRecursivePass
+{
+ use PriorityTaggedServiceTrait;
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function processValue($value, $isRoot = false)
+ {
+ if (!$value instanceof TaggedIteratorArgument) {
+ return parent::processValue($value, $isRoot);
+ }
+
+ $value->setValues($this->findAndSortTaggedServices($value->getTag(), $this->container));
+
+ return $value;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
new file mode 100644
index 00000000..a7427c5a
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceLocatorTagPass.php
@@ -0,0 +1,126 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Alias;
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\DependencyInjection\ServiceLocator;
+
+/**
+ * Applies the "container.service_locator" tag by wrapping references into ServiceClosureArgument instances.
+ *
+ * @author Nicolas Grekas
+ */
+final class ServiceLocatorTagPass extends AbstractRecursivePass
+{
+ protected function processValue($value, $isRoot = false)
+ {
+ if (!$value instanceof Definition || !$value->hasTag('container.service_locator')) {
+ return parent::processValue($value, $isRoot);
+ }
+
+ if (!$value->getClass()) {
+ $value->setClass(ServiceLocator::class);
+ }
+
+ $arguments = $value->getArguments();
+ 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 ServiceClosureArgument) {
+ continue;
+ }
+ 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)) {
+ $i = null;
+ }
+ $arguments[0][$k] = new ServiceClosureArgument($v);
+ }
+ ksort($arguments[0]);
+
+ $value->setArguments($arguments);
+
+ $id = 'service_locator.'.ContainerBuilder::hash($value);
+
+ if ($isRoot) {
+ if ($id !== $this->currentId) {
+ $this->container->setAlias($id, new Alias($this->currentId, false));
+ }
+
+ return $value;
+ }
+
+ $this->container->setDefinition($id, $value->setPublic(false));
+
+ return new Reference($id);
+ }
+
+ /**
+ * @param Reference[] $refMap
+ * @param string|null $callerId
+ *
+ * @return Reference
+ */
+ public static function register(ContainerBuilder $container, array $refMap, $callerId = null)
+ {
+ foreach ($refMap as $id => $ref) {
+ 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 ServiceClosureArgument($ref);
+ }
+ 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.'.ContainerBuilder::hash($locator))) {
+ $container->setDefinition($id, $locator);
+ }
+
+ if (null !== $callerId) {
+ $locatorId = $id;
+ // 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, ServiceLocator::class)
+ ->setPublic(false)
+ ->setFactory([new Reference($locatorId), 'withContext'])
+ ->addArgument($callerId)
+ ->addArgument(new Reference('service_container'));
+ }
+
+ return new Reference($id);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
new file mode 100644
index 00000000..e419e297
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php
@@ -0,0 +1,127 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+
+/**
+ * This is a directed graph of your services.
+ *
+ * This information can be used by your compiler passes instead of collecting
+ * it themselves which improves performance quite a lot.
+ *
+ * @author Johannes M. Schmitt
+ *
+ * @final since version 3.4
+ */
+class ServiceReferenceGraph
+{
+ /**
+ * @var ServiceReferenceGraphNode[]
+ */
+ private $nodes = [];
+
+ /**
+ * Checks if the graph has a specific node.
+ *
+ * @param string $id Id to check
+ *
+ * @return bool
+ */
+ public function hasNode($id)
+ {
+ return isset($this->nodes[$id]);
+ }
+
+ /**
+ * Gets a node by identifier.
+ *
+ * @param string $id The id to retrieve
+ *
+ * @return ServiceReferenceGraphNode
+ *
+ * @throws InvalidArgumentException if no node matches the supplied identifier
+ */
+ public function getNode($id)
+ {
+ if (!isset($this->nodes[$id])) {
+ throw new InvalidArgumentException(sprintf('There is no node with id "%s".', $id));
+ }
+
+ return $this->nodes[$id];
+ }
+
+ /**
+ * Returns all nodes.
+ *
+ * @return ServiceReferenceGraphNode[]
+ */
+ public function getNodes()
+ {
+ return $this->nodes;
+ }
+
+ /**
+ * Clears all nodes.
+ */
+ public function clear()
+ {
+ foreach ($this->nodes as $node) {
+ $node->clear();
+ }
+ $this->nodes = [];
+ }
+
+ /**
+ * Connects 2 nodes together in the Graph.
+ *
+ * @param string $sourceId
+ * @param mixed $sourceValue
+ * @param string $destId
+ * @param mixed $destValue
+ * @param string $reference
+ */
+ public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null/*, bool $lazy = false, bool $weak = false, bool $byConstructor = 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 ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor);
+
+ $sourceNode->addOutEdge($edge);
+ $destNode->addInEdge($edge);
+ }
+
+ /**
+ * Creates a graph node.
+ *
+ * @param string $id
+ * @param mixed $value
+ *
+ * @return ServiceReferenceGraphNode
+ */
+ private function createNode($id, $value)
+ {
+ if (isset($this->nodes[$id]) && $this->nodes[$id]->getValue() === $value) {
+ return $this->nodes[$id];
+ }
+
+ return $this->nodes[$id] = new ServiceReferenceGraphNode($id, $value);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
new file mode 100644
index 00000000..911e7a5f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php
@@ -0,0 +1,105 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+/**
+ * Represents an edge in your service graph.
+ *
+ * Value is typically a reference.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ServiceReferenceGraphEdge
+{
+ private $sourceNode;
+ private $destNode;
+ private $value;
+ private $lazy;
+ private $weak;
+ private $byConstructor;
+
+ /**
+ * @param mixed $value
+ * @param bool $lazy
+ * @param bool $weak
+ * @param bool $byConstructor
+ */
+ public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false, $byConstructor = false)
+ {
+ $this->sourceNode = $sourceNode;
+ $this->destNode = $destNode;
+ $this->value = $value;
+ $this->lazy = $lazy;
+ $this->weak = $weak;
+ $this->byConstructor = $byConstructor;
+ }
+
+ /**
+ * Returns the value of the edge.
+ *
+ * @return string
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Returns the source node.
+ *
+ * @return ServiceReferenceGraphNode
+ */
+ public function getSourceNode()
+ {
+ return $this->sourceNode;
+ }
+
+ /**
+ * Returns the destination node.
+ *
+ * @return ServiceReferenceGraphNode
+ */
+ public function getDestNode()
+ {
+ return $this->destNode;
+ }
+
+ /**
+ * Returns true if the edge is lazy, meaning it's a dependency not requiring direct instantiation.
+ *
+ * @return bool
+ */
+ public function isLazy()
+ {
+ return $this->lazy;
+ }
+
+ /**
+ * Returns true if the edge is weak, meaning it shouldn't prevent removing the target service.
+ *
+ * @return bool
+ */
+ public function isWeak()
+ {
+ return $this->weak;
+ }
+
+ /**
+ * Returns true if the edge links with a constructor argument.
+ *
+ * @return bool
+ */
+ public function isReferencedByConstructor()
+ {
+ return $this->byConstructor;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
new file mode 100644
index 00000000..50140b5f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphNode.php
@@ -0,0 +1,118 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Compiler;
+
+use Symfony\Component\DependencyInjection\Alias;
+use Symfony\Component\DependencyInjection\Definition;
+
+/**
+ * Represents a node in your service graph.
+ *
+ * Value is typically a definition, or an alias.
+ *
+ * @author Johannes M. Schmitt
+ */
+class ServiceReferenceGraphNode
+{
+ private $id;
+ private $inEdges = [];
+ private $outEdges = [];
+ private $value;
+
+ /**
+ * @param string $id The node identifier
+ * @param mixed $value The node value
+ */
+ public function __construct($id, $value)
+ {
+ $this->id = $id;
+ $this->value = $value;
+ }
+
+ public function addInEdge(ServiceReferenceGraphEdge $edge)
+ {
+ $this->inEdges[] = $edge;
+ }
+
+ public function addOutEdge(ServiceReferenceGraphEdge $edge)
+ {
+ $this->outEdges[] = $edge;
+ }
+
+ /**
+ * Checks if the value of this node is an Alias.
+ *
+ * @return bool True if the value is an Alias instance
+ */
+ public function isAlias()
+ {
+ return $this->value instanceof Alias;
+ }
+
+ /**
+ * Checks if the value of this node is a Definition.
+ *
+ * @return bool True if the value is a Definition instance
+ */
+ public function isDefinition()
+ {
+ return $this->value instanceof Definition;
+ }
+
+ /**
+ * Returns the identifier.
+ *
+ * @return string
+ */
+ public function getId()
+ {
+ return $this->id;
+ }
+
+ /**
+ * Returns the in edges.
+ *
+ * @return ServiceReferenceGraphEdge[]
+ */
+ public function getInEdges()
+ {
+ return $this->inEdges;
+ }
+
+ /**
+ * Returns the out edges.
+ *
+ * @return ServiceReferenceGraphEdge[]
+ */
+ public function getOutEdges()
+ {
+ return $this->outEdges;
+ }
+
+ /**
+ * Returns the value of this Node.
+ *
+ * @return mixed The value
+ */
+ public function getValue()
+ {
+ return $this->value;
+ }
+
+ /**
+ * Clears all edges.
+ */
+ public function clear()
+ {
+ $this->inEdges = $this->outEdges = [];
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php
new file mode 100644
index 00000000..68c1e3f6
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/AutowireServiceResource.php
@@ -0,0 +1,88 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace 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);
+
+use Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
+use Symfony\Component\DependencyInjection\Compiler\AutowirePass;
+
+/**
+ * @deprecated since version 3.3, to be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.
+ */
+class AutowireServiceResource implements SelfCheckingResourceInterface, \Serializable
+{
+ private $class;
+ private $filePath;
+ private $autowiringMetadata = [];
+
+ public function __construct($class, $path, array $autowiringMetadata)
+ {
+ $this->class = $class;
+ $this->filePath = $path;
+ $this->autowiringMetadata = $autowiringMetadata;
+ }
+
+ public function isFresh($timestamp)
+ {
+ if (!file_exists($this->filePath)) {
+ return false;
+ }
+
+ // has the file *not* been modified? Definitely fresh
+ if (@filemtime($this->filePath) <= $timestamp) {
+ return true;
+ }
+
+ try {
+ $reflectionClass = new \ReflectionClass($this->class);
+ } catch (\ReflectionException $e) {
+ // the class does not exist anymore!
+ return false;
+ }
+
+ return (array) $this === (array) AutowirePass::createResourceForClass($reflectionClass);
+ }
+
+ public function __toString()
+ {
+ return 'service.autowire.'.$this->class;
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ 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]);
+ } else {
+ list($this->class, $this->filePath, $this->autowiringMetadata) = unserialize($serialized);
+ }
+ }
+
+ /**
+ * @deprecated Implemented for compatibility with Symfony 2.8
+ */
+ public function getResource()
+ {
+ return $this->filePath;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
new file mode 100644
index 00000000..7560c335
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/ContainerParametersResource.php
@@ -0,0 +1,64 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Config;
+
+use Symfony\Component\Config\Resource\ResourceInterface;
+
+/**
+ * Tracks container parameters.
+ *
+ * @author Maxime Steinhausser
+ */
+class ContainerParametersResource implements ResourceInterface, \Serializable
+{
+ private $parameters;
+
+ /**
+ * @param array $parameters The container parameters to track
+ */
+ public function __construct(array $parameters)
+ {
+ $this->parameters = $parameters;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function __toString()
+ {
+ return 'container_parameters_'.md5(serialize($this->parameters));
+ }
+
+ /**
+ * @internal
+ */
+ public function serialize()
+ {
+ return serialize($this->parameters);
+ }
+
+ /**
+ * @internal
+ */
+ public function unserialize($serialized)
+ {
+ $this->parameters = unserialize($serialized);
+ }
+
+ /**
+ * @return array Tracked parameters
+ */
+ public function getParameters()
+ {
+ return $this->parameters;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
new file mode 100644
index 00000000..6ed77e3f
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Config/ContainerParametersResourceChecker.php
@@ -0,0 +1,52 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Config;
+
+use Symfony\Component\Config\Resource\ResourceInterface;
+use Symfony\Component\Config\ResourceCheckerInterface;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+
+/**
+ * @author Maxime Steinhausser
+ */
+class ContainerParametersResourceChecker implements ResourceCheckerInterface
+{
+ /** @var ContainerInterface */
+ private $container;
+
+ public function __construct(ContainerInterface $container)
+ {
+ $this->container = $container;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function supports(ResourceInterface $metadata)
+ {
+ return $metadata instanceof ContainerParametersResource;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ 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 true;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Container.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Container.php
new file mode 100644
index 00000000..e9d53023
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Container.php
@@ -0,0 +1,526 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
+use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
+use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
+
+/**
+ * Container is a dependency injection container.
+ *
+ * It gives access to object instances (services).
+ * Services and parameters are simple key/pair stores.
+ * The container can have four possible behaviors when a service
+ * does not exist (or is not initialized for the last case):
+ *
+ * * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception (the default)
+ * * NULL_ON_INVALID_REFERENCE: Returns null
+ * * IGNORE_ON_INVALID_REFERENCE: Ignores the wrapping command asking for the reference
+ * (for instance, ignore a setter if the service does not exist)
+ * * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized services or invalid references
+ *
+ * @author Fabien Potencier
+ * @author Johannes M. Schmitt
+ */
+class Container implements ResettableContainerInterface
+{
+ protected $parameterBag;
+ protected $services = [];
+ protected $fileMap = [];
+ protected $methodMap = [];
+ protected $aliases = [];
+ protected $loading = [];
+ protected $resolving = [];
+ protected $syntheticIds = [];
+
+ /**
+ * @internal
+ */
+ protected $privates = [];
+
+ /**
+ * @internal
+ */
+ protected $normalizedIds = [];
+
+ private $underscoreMap = ['_' => '', '.' => '_', '\\' => '_'];
+ private $envCache = [];
+ private $compiled = false;
+ private $getEnv;
+
+ public function __construct(ParameterBagInterface $parameterBag = null)
+ {
+ $this->parameterBag = $parameterBag ?: new EnvPlaceholderParameterBag();
+ }
+
+ /**
+ * Compiles the container.
+ *
+ * This method does two things:
+ *
+ * * Parameter values are resolved;
+ * * The parameter bag is frozen.
+ */
+ public function compile()
+ {
+ $this->parameterBag->resolve();
+
+ $this->parameterBag = new FrozenParameterBag($this->parameterBag->all());
+
+ $this->compiled = true;
+ }
+
+ /**
+ * Returns true if the container is compiled.
+ *
+ * @return bool
+ */
+ public function isCompiled()
+ {
+ return $this->compiled;
+ }
+
+ /**
+ * Returns true if the container parameter bag are frozen.
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ *
+ * @return bool true if the container parameter bag are frozen, false otherwise
+ */
+ 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 FrozenParameterBag;
+ }
+
+ /**
+ * Gets the service container parameter bag.
+ *
+ * @return ParameterBagInterface A ParameterBagInterface instance
+ */
+ public function getParameterBag()
+ {
+ return $this->parameterBag;
+ }
+
+ /**
+ * Gets a parameter.
+ *
+ * @param string $name The parameter name
+ *
+ * @return mixed The parameter value
+ *
+ * @throws InvalidArgumentException if the parameter is not defined
+ */
+ public function getParameter($name)
+ {
+ return $this->parameterBag->get($name);
+ }
+
+ /**
+ * Checks if a parameter exists.
+ *
+ * @param string $name The parameter name
+ *
+ * @return bool The presence of parameter in container
+ */
+ public function hasParameter($name)
+ {
+ return $this->parameterBag->has($name);
+ }
+
+ /**
+ * Sets a parameter.
+ *
+ * @param string $name The parameter name
+ * @param mixed $value The parameter value
+ */
+ public function setParameter($name, $value)
+ {
+ $this->parameterBag->set($name, $value);
+ }
+
+ /**
+ * Sets a service.
+ *
+ * Setting a synthetic service to null resets it: has() returns false and get()
+ * behaves in the same way as if the service was never created.
+ *
+ * @param string $id The service identifier
+ * @param object|null $service The service instance
+ */
+ 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) {
+ $initialize = $this->privates['service_container'];
+ unset($this->privates['service_container']);
+ $initialize();
+ }
+
+ $id = $this->normalizeId($id);
+
+ if ('service_container' === $id) {
+ 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);
+ 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);
+ }
+ } 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);
+ } 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);
+ }
+ }
+
+ if (isset($this->aliases[$id])) {
+ unset($this->aliases[$id]);
+ }
+
+ if (null === $service) {
+ unset($this->services[$id]);
+
+ return;
+ }
+
+ $this->services[$id] = $service;
+ }
+
+ /**
+ * Returns true if the given service is defined.
+ *
+ * @param string $id The service identifier
+ *
+ * @return bool true if the service is defined, false otherwise
+ */
+ 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);
+ }
+ if (isset($this->aliases[$id])) {
+ $id = $this->aliases[$id];
+ }
+ if (isset($this->services[$id])) {
+ return true;
+ }
+ if ('service_container' === $id) {
+ return true;
+ }
+
+ if (isset($this->fileMap[$id]) || isset($this->methodMap[$id])) {
+ return true;
+ }
+
+ if (--$i && $id !== $normalizedId = $this->normalizeId($id)) {
+ $id = $normalizedId;
+ continue;
+ }
+
+ // 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 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;
+ }
+ }
+
+ /**
+ * Gets a service.
+ *
+ * If a service is defined both through a set() method and
+ * with a get{$id}Service() method, the former has always precedence.
+ *
+ * @param string $id The service identifier
+ * @param int $invalidBehavior The behavior when the service does not exist
+ *
+ * @return object|null The associated service
+ *
+ * @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
+ *
+ * @see Reference
+ */
+ public function get($id, $invalidBehavior = /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
+ {
+ // Attempt to retrieve the service by checking first aliases then
+ // available services. Service IDs are case insensitive, however since
+ // this method can be called thousands of times during a request, avoid
+ // 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);
+ }
+ if (isset($this->aliases[$id])) {
+ $id = $this->aliases[$id];
+ }
+
+ // Re-use shared service instance if it exists.
+ if (isset($this->services[$id])) {
+ return $this->services[$id];
+ }
+ if ('service_container' === $id) {
+ return $this;
+ }
+
+ if (isset($this->loading[$id])) {
+ throw new ServiceCircularReferenceException($id, array_merge(array_keys($this->loading), [$id]));
+ }
+
+ $this->loading[$id] = true;
+
+ try {
+ if (isset($this->fileMap[$id])) {
+ return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->load($this->fileMap[$id]);
+ } elseif (isset($this->methodMap[$id])) {
+ return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->{$this->methodMap[$id]}();
+ } elseif (--$i && $id !== $normalizedId = $this->normalizeId($id)) {
+ unset($this->loading[$id]);
+ $id = $normalizedId;
+ continue;
+ } 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);
+
+ return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ 4 === $invalidBehavior ? null : $this->{$method}();
+ }
+
+ break;
+ } catch (\Exception $e) {
+ unset($this->services[$id]);
+
+ throw $e;
+ } finally {
+ unset($this->loading[$id]);
+ }
+ }
+
+ if (/* self::EXCEPTION_ON_INVALID_REFERENCE */ 1 === $invalidBehavior) {
+ if (!$id) {
+ throw new ServiceNotFoundException($id);
+ }
+ if (isset($this->syntheticIds[$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 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)) {
+ $alternatives[] = $knownId;
+ }
+ }
+
+ throw new ServiceNotFoundException($id, null, null, $alternatives);
+ }
+ }
+
+ /**
+ * Returns true if the given service has actually been initialized.
+ *
+ * @param string $id The service identifier
+ *
+ * @return bool true if service has already been initialized, false otherwise
+ */
+ 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);
+ }
+
+ if (isset($this->aliases[$id])) {
+ $id = $this->aliases[$id];
+ }
+
+ if ('service_container' === $id) {
+ return false;
+ }
+
+ return isset($this->services[$id]);
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function reset()
+ {
+ $this->services = [];
+ }
+
+ /**
+ * Gets all service ids.
+ *
+ * @return string[] An array of all defined service ids
+ */
+ public function getServiceIds()
+ {
+ $ids = [];
+
+ 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)) {
+ $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))));
+ }
+
+ /**
+ * Gets service ids that existed at compile time.
+ *
+ * @return array
+ */
+ public function getRemovedIds()
+ {
+ return [];
+ }
+
+ /**
+ * Camelizes a string.
+ *
+ * @param string $id A string to camelize
+ *
+ * @return string The camelized string
+ */
+ public static function camelize($id)
+ {
+ return strtr(ucwords(strtr($id, ['_' => ' ', '.' => '_ ', '\\' => '_ '])), [' ' => '']);
+ }
+
+ /**
+ * A string to underscore.
+ *
+ * @param string $id The string to underscore
+ *
+ * @return string The underscored string
+ */
+ 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)));
+ }
+
+ /**
+ * Creates a service by requiring its factory file.
+ */
+ protected function load($file)
+ {
+ return require $file;
+ }
+
+ /**
+ * Fetches a variable from the environment.
+ *
+ * @param string $name The name of the environment variable
+ *
+ * @return mixed The value to use for the provided environment variable name
+ *
+ * @throws EnvNotFoundException When the environment variable is not found and has no default value
+ */
+ protected function getEnv($name)
+ {
+ if (isset($this->resolving[$envName = "env($name)"])) {
+ throw new ParameterCircularReferenceException(array_keys($this->resolving));
+ }
+ 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 ServiceLocator([]));
+ }
+ if (!$this->getEnv) {
+ $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);
+ } else {
+ $prefix = 'string';
+ $localName = $name;
+ }
+ $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 {
+ unset($this->resolving[$envName]);
+ }
+ }
+
+ /**
+ * Returns the case sensitive id used at registration time.
+ *
+ * @param string $id
+ *
+ * @return string
+ *
+ * @internal
+ */
+ public function normalizeId($id)
+ {
+ if (!\is_string($id)) {
+ $id = (string) $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);
+ }
+ } else {
+ $normalizedId = $this->normalizedIds[$normalizedId] = $id;
+ }
+
+ return $normalizedId;
+ }
+
+ private function __clone()
+ {
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerAwareInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerAwareInterface.php
new file mode 100644
index 00000000..e7b9d575
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerAwareInterface.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+/**
+ * ContainerAwareInterface should be implemented by classes that depends on a Container.
+ *
+ * @author Fabien Potencier
+ */
+interface ContainerAwareInterface
+{
+ /**
+ * Sets the container.
+ */
+ public function setContainer(ContainerInterface $container = null);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerAwareTrait.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerAwareTrait.php
new file mode 100644
index 00000000..ee1ea2cb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerAwareTrait.php
@@ -0,0 +1,30 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+/**
+ * ContainerAware trait.
+ *
+ * @author Fabien Potencier
+ */
+trait ContainerAwareTrait
+{
+ /**
+ * @var ContainerInterface
+ */
+ protected $container;
+
+ public function setContainer(ContainerInterface $container = null)
+ {
+ $this->container = $container;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerBuilder.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerBuilder.php
new file mode 100644
index 00000000..97617cb0
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerBuilder.php
@@ -0,0 +1,1694 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Psr\Container\ContainerInterface as PsrContainerInterface;
+use Symfony\Component\Config\Resource\ClassExistenceResource;
+use Symfony\Component\Config\Resource\ComposerResource;
+use Symfony\Component\Config\Resource\DirectoryResource;
+use Symfony\Component\Config\Resource\FileExistenceResource;
+use Symfony\Component\Config\Resource\FileResource;
+use Symfony\Component\Config\Resource\GlobResource;
+use Symfony\Component\Config\Resource\ReflectionClassResource;
+use Symfony\Component\Config\Resource\ResourceInterface;
+use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
+use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\Compiler\Compiler;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\Compiler\PassConfig;
+use Symfony\Component\DependencyInjection\Compiler\ResolveEnvPlaceholdersPass;
+use Symfony\Component\DependencyInjection\Exception\BadMethodCallException;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\LogicException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
+use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
+use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface;
+use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator;
+use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
+use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
+use Symfony\Component\ExpressionLanguage\Expression;
+use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
+
+/**
+ * ContainerBuilder is a DI container that provides an API to easily describe services.
+ *
+ * @author Fabien Potencier
+ */
+class ContainerBuilder extends Container implements TaggedContainerInterface
+{
+ /**
+ * @var ExtensionInterface[]
+ */
+ private $extensions = [];
+
+ /**
+ * @var ExtensionInterface[]
+ */
+ private $extensionsByNs = [];
+
+ /**
+ * @var Definition[]
+ */
+ private $definitions = [];
+
+ /**
+ * @var Alias[]
+ */
+ private $aliasDefinitions = [];
+
+ /**
+ * @var ResourceInterface[]
+ */
+ private $resources = [];
+
+ private $extensionConfigs = [];
+
+ /**
+ * @var Compiler
+ */
+ private $compiler;
+
+ private $trackResources;
+
+ /**
+ * @var InstantiatorInterface|null
+ */
+ private $proxyInstantiator;
+
+ /**
+ * @var ExpressionLanguage|null
+ */
+ private $expressionLanguage;
+
+ /**
+ * @var ExpressionFunctionProviderInterface[]
+ */
+ private $expressionLanguageProviders = [];
+
+ /**
+ * @var string[] with tag names used by findTaggedServiceIds
+ */
+ private $usedTags = [];
+
+ /**
+ * @var string[][] a map of env var names to their placeholders
+ */
+ private $envPlaceholders = [];
+
+ /**
+ * @var int[] a map of env vars to their resolution counter
+ */
+ private $envCounters = [];
+
+ /**
+ * @var string[] the list of vendor directories
+ */
+ private $vendors;
+
+ 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(ParameterBagInterface $parameterBag = null)
+ {
+ parent::__construct($parameterBag);
+
+ $this->trackResources = interface_exists('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
+ */
+ private $classReflectors;
+
+ /**
+ * Sets the track resources flag.
+ *
+ * If you are not using the loaders and therefore don't want
+ * to depend on the Config component, set this flag to false.
+ *
+ * @param bool $track True if you want to track resources, false otherwise
+ */
+ public function setResourceTracking($track)
+ {
+ $this->trackResources = (bool) $track;
+ }
+
+ /**
+ * Checks if resources are tracked.
+ *
+ * @return bool true If resources are tracked, false otherwise
+ */
+ public function isTrackingResources()
+ {
+ return $this->trackResources;
+ }
+
+ /**
+ * Sets the instantiator to be used when fetching proxies.
+ */
+ public function setProxyInstantiator(InstantiatorInterface $proxyInstantiator)
+ {
+ $this->proxyInstantiator = $proxyInstantiator;
+ }
+
+ public function registerExtension(ExtensionInterface $extension)
+ {
+ $this->extensions[$extension->getAlias()] = $extension;
+
+ if (false !== $extension->getNamespace()) {
+ $this->extensionsByNs[$extension->getNamespace()] = $extension;
+ }
+ }
+
+ /**
+ * Returns an extension by alias or namespace.
+ *
+ * @param string $name An alias or a namespace
+ *
+ * @return ExtensionInterface An extension instance
+ *
+ * @throws LogicException if the extension is not registered
+ */
+ public function getExtension($name)
+ {
+ if (isset($this->extensions[$name])) {
+ return $this->extensions[$name];
+ }
+
+ if (isset($this->extensionsByNs[$name])) {
+ return $this->extensionsByNs[$name];
+ }
+
+ throw new LogicException(sprintf('Container extension "%s" is not registered.', $name));
+ }
+
+ /**
+ * Returns all registered extensions.
+ *
+ * @return ExtensionInterface[] An array of ExtensionInterface
+ */
+ public function getExtensions()
+ {
+ return $this->extensions;
+ }
+
+ /**
+ * Checks if we have an extension.
+ *
+ * @param string $name The name of the extension
+ *
+ * @return bool If the extension exists
+ */
+ public function hasExtension($name)
+ {
+ return isset($this->extensions[$name]) || isset($this->extensionsByNs[$name]);
+ }
+
+ /**
+ * Returns an array of resources loaded to build this configuration.
+ *
+ * @return ResourceInterface[] An array of resources
+ */
+ public function getResources()
+ {
+ return array_values($this->resources);
+ }
+
+ /**
+ * @return $this
+ */
+ public function addResource(ResourceInterface $resource)
+ {
+ if (!$this->trackResources) {
+ return $this;
+ }
+
+ if ($resource instanceof GlobResource && $this->inVendors($resource->getPrefix())) {
+ return $this;
+ }
+
+ $this->resources[(string) $resource] = $resource;
+
+ return $this;
+ }
+
+ /**
+ * Sets the resources for this configuration.
+ *
+ * @param ResourceInterface[] $resources An array of resources
+ *
+ * @return $this
+ */
+ public function setResources(array $resources)
+ {
+ if (!$this->trackResources) {
+ return $this;
+ }
+
+ $this->resources = $resources;
+
+ return $this;
+ }
+
+ /**
+ * Adds the object class hierarchy as resources.
+ *
+ * @param object|string $object An object instance or class name
+ *
+ * @return $this
+ */
+ public function addObjectResource($object)
+ {
+ if ($this->trackResources) {
+ if (\is_object($object)) {
+ $object = \get_class($object);
+ }
+ if (!isset($this->classReflectors[$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);
+ }
+ $file = $interface->getFileName();
+ if (false !== $file && file_exists($file)) {
+ $this->fileExists($file);
+ }
+ }
+ do {
+ $file = $class->getFileName();
+ if (false !== $file && file_exists($file)) {
+ $this->fileExists($file);
+ }
+ foreach ($class->getTraitNames() as $name) {
+ $this->addObjectResource($name);
+ }
+ } while ($class = $class->getParentClass());
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds the given class hierarchy as resources.
+ *
+ * @return $this
+ *
+ * @deprecated since version 3.3, to be removed in 4.0. Use addObjectResource() or getReflectionClass() instead.
+ */
+ 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);
+
+ return $this->addObjectResource($class->name);
+ }
+
+ /**
+ * Retrieves the requested reflection class and registers it for resource tracking.
+ *
+ * @param string $class
+ * @param bool $throw
+ *
+ * @return \ReflectionClass|null
+ *
+ * @throws \ReflectionException when a parent class/interface/trait is not found and $throw is true
+ *
+ * @final
+ */
+ public function getReflectionClass($class, $throw = true)
+ {
+ if (!$class = $this->getParameterBag()->resolveValue($class)) {
+ return null;
+ }
+
+ if (isset(self::$internalTypes[$class])) {
+ return null;
+ }
+
+ $resource = $classReflector = null;
+
+ try {
+ if (isset($this->classReflectors[$class])) {
+ $classReflector = $this->classReflectors[$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;
+ }
+ } catch (\ReflectionException $e) {
+ if ($throw) {
+ throw $e;
+ }
+ }
+
+ if ($this->trackResources) {
+ if (!$classReflector) {
+ $this->addResource($resource ?: new ClassExistenceResource($class, false));
+ } elseif (!$classReflector->isInternal()) {
+ $path = $classReflector->getFileName();
+
+ if (!$this->inVendors($path)) {
+ $this->addResource(new ReflectionClassResource($classReflector, $this->vendors));
+ }
+ }
+ $this->classReflectors[$class] = $classReflector;
+ }
+
+ return $classReflector ?: null;
+ }
+
+ /**
+ * Checks whether the requested file or directory exists and registers the result for resource tracking.
+ *
+ * @param string $path The file or directory path for which to check the existence
+ * @param bool|string $trackContents Whether to track contents of the given resource. If a string is passed,
+ * it will be used as pattern for tracking contents of the requested directory
+ *
+ * @return bool
+ *
+ * @final
+ */
+ public function fileExists($path, $trackContents = true)
+ {
+ $exists = file_exists($path);
+
+ if (!$this->trackResources || $this->inVendors($path)) {
+ return $exists;
+ }
+
+ if (!$exists) {
+ $this->addResource(new FileExistenceResource($path));
+
+ return $exists;
+ }
+
+ if (is_dir($path)) {
+ if ($trackContents) {
+ $this->addResource(new DirectoryResource($path, \is_string($trackContents) ? $trackContents : null));
+ } else {
+ $this->addResource(new GlobResource($path, '/*', false));
+ }
+ } elseif ($trackContents) {
+ $this->addResource(new FileResource($path));
+ }
+
+ return $exists;
+ }
+
+ /**
+ * Loads the configuration for an extension.
+ *
+ * @param string $extension The extension alias or namespace
+ * @param array $values An array of values that customizes the extension
+ *
+ * @return $this
+ *
+ * @throws BadMethodCallException When this ContainerBuilder is compiled
+ * @throws \LogicException if the extension is not registered
+ */
+ public function loadFromExtension($extension, array $values = null)
+ {
+ if ($this->isCompiled()) {
+ throw new BadMethodCallException('Cannot load from an extension on a compiled container.');
+ }
+
+ if (\func_num_args() < 2) {
+ $values = [];
+ }
+
+ $namespace = $this->getExtension($extension)->getAlias();
+
+ $this->extensionConfigs[$namespace][] = $values;
+
+ return $this;
+ }
+
+ /**
+ * Adds a compiler pass.
+ *
+ * @param CompilerPassInterface $pass A compiler pass
+ * @param string $type The type of compiler pass
+ * @param int $priority Used to sort the passes
+ *
+ * @return $this
+ */
+ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
+ {
+ if (\func_num_args() >= 3) {
+ $priority = func_get_arg(2);
+ } else {
+ if (__CLASS__ !== static::class) {
+ $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);
+ }
+ }
+
+ $priority = 0;
+ }
+
+ $this->getCompiler()->addPass($pass, $type, $priority);
+
+ $this->addObjectResource($pass);
+
+ return $this;
+ }
+
+ /**
+ * Returns the compiler pass config which can then be modified.
+ *
+ * @return PassConfig The compiler pass config
+ */
+ public function getCompilerPassConfig()
+ {
+ return $this->getCompiler()->getPassConfig();
+ }
+
+ /**
+ * Returns the compiler.
+ *
+ * @return Compiler The compiler
+ */
+ public function getCompiler()
+ {
+ if (null === $this->compiler) {
+ $this->compiler = new Compiler();
+ }
+
+ return $this->compiler;
+ }
+
+ /**
+ * Sets a service.
+ *
+ * @param string $id The service identifier
+ * @param object|null $service The service instance
+ *
+ * @throws BadMethodCallException When this ContainerBuilder is compiled
+ */
+ 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 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);
+ }
+
+ /**
+ * Removes a service definition.
+ *
+ * @param string $id The service identifier
+ */
+ public function removeDefinition($id)
+ {
+ if (isset($this->definitions[$id = $this->normalizeId($id)])) {
+ unset($this->definitions[$id]);
+ $this->removedIds[$id] = true;
+ }
+ }
+
+ /**
+ * Returns true if the given service is defined.
+ *
+ * @param string $id The service identifier
+ *
+ * @return bool true if the service is defined, false otherwise
+ */
+ public function has($id)
+ {
+ $id = $this->normalizeId($id);
+
+ return isset($this->definitions[$id]) || isset($this->aliasDefinitions[$id]) || parent::has($id);
+ }
+
+ /**
+ * Gets a service.
+ *
+ * @param string $id The service identifier
+ * @param int $invalidBehavior The behavior when the service does not exist
+ *
+ * @return object|null The associated service
+ *
+ * @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
+ *
+ * @see 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);
+ }
+
+ return $this->doGet($id, $invalidBehavior);
+ }
+
+ 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;
+ $inlineServices = [];
+ }
+ try {
+ if (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior) {
+ return parent::get($id, $invalidBehavior);
+ }
+ if ($service = parent::get($id, ContainerInterface::NULL_ON_INVALID_REFERENCE)) {
+ return $service;
+ }
+ } catch (ServiceCircularReferenceException $e) {
+ if ($isConstructorArgument) {
+ throw $e;
+ }
+ }
+
+ if (!isset($this->definitions[$id]) && isset($this->aliasDefinitions[$id])) {
+ return $this->doGet((string) $this->aliasDefinitions[$id], $invalidBehavior, $inlineServices, $isConstructorArgument);
+ }
+
+ try {
+ $definition = $this->getDefinition($id);
+ } catch (ServiceNotFoundException $e) {
+ if (ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE !== $invalidBehavior) {
+ return null;
+ }
+
+ throw $e;
+ }
+
+ if ($isConstructorArgument) {
+ $this->loading[$id] = true;
+ }
+
+ try {
+ return $this->createService($definition, $inlineServices, $isConstructorArgument, $id);
+ } finally {
+ if ($isConstructorArgument) {
+ unset($this->loading[$id]);
+ }
+ }
+ }
+
+ /**
+ * Merges a ContainerBuilder with the current ContainerBuilder configuration.
+ *
+ * Service definitions overrides the current defined ones.
+ *
+ * But for parameters, they are overridden by the current ones. It allows
+ * the parameters passed to the container constructor to have precedence
+ * over the loaded ones.
+ *
+ * $container = new ContainerBuilder(new ParameterBag(['foo' => 'bar']));
+ * $loader = new LoaderXXX($container);
+ * $loader->load('resource_name');
+ * $container->register('foo', 'stdClass');
+ *
+ * In the above example, even if the loaded resource defines a foo
+ * parameter, the value will still be 'bar' as defined in the ContainerBuilder
+ * constructor.
+ *
+ * @throws BadMethodCallException When this ContainerBuilder is compiled
+ */
+ public function merge(self $container)
+ {
+ if ($this->isCompiled()) {
+ throw new BadMethodCallException('Cannot merge on a compiled container.');
+ }
+
+ $this->addDefinitions($container->getDefinitions());
+ $this->addAliases($container->getAliases());
+ $this->getParameterBag()->add($container->getParameterBag()->all());
+
+ if ($this->trackResources) {
+ foreach ($container->getResources() as $resource) {
+ $this->addResource($resource);
+ }
+ }
+
+ foreach ($this->extensions as $name => $extension) {
+ if (!isset($this->extensionConfigs[$name])) {
+ $this->extensionConfigs[$name] = [];
+ }
+
+ $this->extensionConfigs[$name] = array_merge($this->extensionConfigs[$name], $container->getExtensionConfig($name));
+ }
+
+ if ($this->getParameterBag() instanceof EnvPlaceholderParameterBag && $container->getParameterBag() instanceof EnvPlaceholderParameterBag) {
+ $envPlaceholders = $container->getParameterBag()->getEnvPlaceholders();
+ $this->getParameterBag()->mergeEnvPlaceholders($container->getParameterBag());
+ } else {
+ $envPlaceholders = [];
+ }
+
+ foreach ($container->envCounters as $env => $count) {
+ if (!$count && !isset($envPlaceholders[$env])) {
+ continue;
+ }
+ if (!isset($this->envCounters[$env])) {
+ $this->envCounters[$env] = $count;
+ } else {
+ $this->envCounters[$env] += $count;
+ }
+ }
+
+ foreach ($container->getAutoconfiguredInstanceof() as $interface => $childDefinition) {
+ if (isset($this->autoconfiguredInstanceof[$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;
+ }
+ }
+
+ /**
+ * Returns the configuration array for the given extension.
+ *
+ * @param string $name The name of the extension
+ *
+ * @return array An array of configuration
+ */
+ public function getExtensionConfig($name)
+ {
+ if (!isset($this->extensionConfigs[$name])) {
+ $this->extensionConfigs[$name] = [];
+ }
+
+ return $this->extensionConfigs[$name];
+ }
+
+ /**
+ * Prepends a config array to the configs of the given extension.
+ *
+ * @param string $name The name of the extension
+ * @param array $config The config to set
+ */
+ public function prependExtensionConfig($name, array $config)
+ {
+ if (!isset($this->extensionConfigs[$name])) {
+ $this->extensionConfigs[$name] = [];
+ }
+
+ array_unshift($this->extensionConfigs[$name], $config);
+ }
+
+ /**
+ * Compiles the container.
+ *
+ * This method passes the container to compiler
+ * passes whose job is to manipulate and optimize
+ * the container.
+ *
+ * The main compiler passes roughly do four things:
+ *
+ * * The extension configurations are merged;
+ * * Parameter values are resolved;
+ * * The parameter bag is frozen;
+ * * Extension loading is disabled.
+ *
+ * @param bool $resolveEnvPlaceholders Whether %env()% parameters should be resolved using the current
+ * env vars or be replaced by uniquely identifiable placeholders.
+ * Set to "true" when you want to use the current ContainerBuilder
+ * directly, keep to "false" when the container is dumped instead.
+ */
+ public function compile(/*$resolveEnvPlaceholders = false*/)
+ {
+ if (1 <= \func_num_args()) {
+ $resolveEnvPlaceholders = func_get_arg(0);
+ } else {
+ if (__CLASS__ !== static::class) {
+ $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);
+ }
+ }
+ $resolveEnvPlaceholders = false;
+ }
+ $compiler = $this->getCompiler();
+
+ if ($this->trackResources) {
+ foreach ($compiler->getPassConfig()->getPasses() as $pass) {
+ $this->addObjectResource($pass);
+ }
+ }
+ $bag = $this->getParameterBag();
+
+ if ($resolveEnvPlaceholders && $bag instanceof EnvPlaceholderParameterBag) {
+ $compiler->addPass(new ResolveEnvPlaceholdersPass(), PassConfig::TYPE_AFTER_REMOVING, -1000);
+ }
+
+ $compiler->compile($this);
+
+ foreach ($this->definitions as $id => $definition) {
+ if ($this->trackResources && $definition->isLazy()) {
+ $this->getReflectionClass($definition->getClass());
+ }
+ }
+
+ $this->extensionConfigs = [];
+
+ if ($bag instanceof EnvPlaceholderParameterBag) {
+ if ($resolveEnvPlaceholders) {
+ $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;
+ }
+ }
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function 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.
+ *
+ * @return array
+ */
+ public function getRemovedIds()
+ {
+ return $this->removedIds;
+ }
+
+ /**
+ * Adds the service aliases.
+ */
+ public function addAliases(array $aliases)
+ {
+ foreach ($aliases as $alias => $id) {
+ $this->setAlias($alias, $id);
+ }
+ }
+
+ /**
+ * Sets the service aliases.
+ */
+ public function setAliases(array $aliases)
+ {
+ $this->aliasDefinitions = [];
+ $this->addAliases($aliases);
+ }
+
+ /**
+ * Sets an alias for an existing service.
+ *
+ * @param string $alias The alias to create
+ * @param string|Alias $id The service to alias
+ *
+ * @return Alias
+ *
+ * @throws InvalidArgumentException if the id is not a string or an Alias
+ * @throws InvalidArgumentException if the alias is for itself
+ */
+ public function setAlias($alias, $id)
+ {
+ $alias = $this->normalizeId($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 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 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;
+ }
+
+ /**
+ * Removes an alias.
+ *
+ * @param string $alias The alias to remove
+ */
+ public function removeAlias($alias)
+ {
+ if (isset($this->aliasDefinitions[$alias = $this->normalizeId($alias)])) {
+ unset($this->aliasDefinitions[$alias]);
+ $this->removedIds[$alias] = true;
+ }
+ }
+
+ /**
+ * Returns true if an alias exists under the given identifier.
+ *
+ * @param string $id The service identifier
+ *
+ * @return bool true if the alias exists, false otherwise
+ */
+ public function hasAlias($id)
+ {
+ return isset($this->aliasDefinitions[$this->normalizeId($id)]);
+ }
+
+ /**
+ * Gets all defined aliases.
+ *
+ * @return Alias[] An array of aliases
+ */
+ public function getAliases()
+ {
+ return $this->aliasDefinitions;
+ }
+
+ /**
+ * Gets an alias.
+ *
+ * @param string $id The service identifier
+ *
+ * @return Alias An Alias instance
+ *
+ * @throws InvalidArgumentException if the alias does not exist
+ */
+ public function getAlias($id)
+ {
+ $id = $this->normalizeId($id);
+
+ if (!isset($this->aliasDefinitions[$id])) {
+ throw new InvalidArgumentException(sprintf('The service alias "%s" does not exist.', $id));
+ }
+
+ return $this->aliasDefinitions[$id];
+ }
+
+ /**
+ * Registers a service definition.
+ *
+ * This methods allows for simple registration of service definition
+ * with a fluid interface.
+ *
+ * @param string $id The service identifier
+ * @param string|null $class The service class
+ *
+ * @return Definition A Definition instance
+ */
+ public function register($id, $class = null)
+ {
+ return $this->setDefinition($id, new Definition($class));
+ }
+
+ /**
+ * Registers an autowired service definition.
+ *
+ * This method implements a shortcut for using setDefinition() with
+ * an autowired definition.
+ *
+ * @param string $id The service identifier
+ * @param string|null $class The service class
+ *
+ * @return Definition The created definition
+ */
+ public function autowire($id, $class = null)
+ {
+ return $this->setDefinition($id, (new Definition($class))->setAutowired(true));
+ }
+
+ /**
+ * Adds the service definitions.
+ *
+ * @param Definition[] $definitions An array of service definitions
+ */
+ public function addDefinitions(array $definitions)
+ {
+ foreach ($definitions as $id => $definition) {
+ $this->setDefinition($id, $definition);
+ }
+ }
+
+ /**
+ * Sets the service definitions.
+ *
+ * @param Definition[] $definitions An array of service definitions
+ */
+ public function setDefinitions(array $definitions)
+ {
+ $this->definitions = [];
+ $this->addDefinitions($definitions);
+ }
+
+ /**
+ * Gets all service definitions.
+ *
+ * @return Definition[] An array of Definition instances
+ */
+ public function getDefinitions()
+ {
+ return $this->definitions;
+ }
+
+ /**
+ * Sets a service definition.
+ *
+ * @param string $id The service identifier
+ * @param Definition $definition A Definition instance
+ *
+ * @return Definition the service definition
+ *
+ * @throws BadMethodCallException When this ContainerBuilder is compiled
+ */
+ public function setDefinition($id, Definition $definition)
+ {
+ if ($this->isCompiled()) {
+ 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 InvalidArgumentException(sprintf('Invalid service id: "%s".', $id));
+ }
+
+ unset($this->aliasDefinitions[$id], $this->removedIds[$id]);
+
+ return $this->definitions[$id] = $definition;
+ }
+
+ /**
+ * Returns true if a service definition exists under the given identifier.
+ *
+ * @param string $id The service identifier
+ *
+ * @return bool true if the service definition exists, false otherwise
+ */
+ public function hasDefinition($id)
+ {
+ return isset($this->definitions[$this->normalizeId($id)]);
+ }
+
+ /**
+ * Gets a service definition.
+ *
+ * @param string $id The service identifier
+ *
+ * @return Definition A Definition instance
+ *
+ * @throws ServiceNotFoundException if the service definition does not exist
+ */
+ public function getDefinition($id)
+ {
+ $id = $this->normalizeId($id);
+
+ if (!isset($this->definitions[$id])) {
+ throw new ServiceNotFoundException($id);
+ }
+
+ return $this->definitions[$id];
+ }
+
+ /**
+ * Gets a service definition by id or alias.
+ *
+ * The method "unaliases" recursively to return a Definition instance.
+ *
+ * @param string $id The service identifier or alias
+ *
+ * @return Definition A Definition instance
+ *
+ * @throws ServiceNotFoundException if the service definition does not exist
+ */
+ public function findDefinition($id)
+ {
+ $id = $this->normalizeId($id);
+
+ $seen = [];
+ 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[] = $id;
+
+ throw new ServiceCircularReferenceException($id, $seen);
+ }
+
+ $seen[$id] = $id;
+ }
+
+ return $this->getDefinition($id);
+ }
+
+ /**
+ * Creates a service for a service definition.
+ *
+ * @param Definition $definition A service definition instance
+ * @param string $id The service identifier
+ * @param bool $tryProxy Whether to try proxying the service with a lazy proxy
+ *
+ * @return mixed The service described by the service definition
+ *
+ * @throws RuntimeException When the factory definition is incomplete
+ * @throws RuntimeException When the service is a synthetic service
+ * @throws InvalidArgumentException When configure callable is not callable
+ */
+ private function createService(Definition $definition, array &$inlineServices, $isConstructorArgument = false, $id = null, $tryProxy = true)
+ {
+ if (null === $id && isset($inlineServices[$h = spl_object_hash($definition)])) {
+ return $inlineServices[$h];
+ }
+
+ 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 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);
+ }
+
+ 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);
+ }
+ );
+ $this->shareService($definition, $proxy, $id, $inlineServices);
+
+ return $proxy;
+ }
+
+ $parameterBag = $this->getParameterBag();
+
+ if (null !== $definition->getFile()) {
+ require_once $parameterBag->resolveValue($definition->getFile());
+ }
+
+ $arguments = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getArguments())), $inlineServices, $isConstructorArgument);
+
+ if (null !== $factory = $definition->getFactory()) {
+ if (\is_array($factory)) {
+ $factory = [$this->doResolveServices($parameterBag->resolveValue($factory[0]), $inlineServices, $isConstructorArgument), $factory[1]];
+ } 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);
+ }
+ }
+ } else {
+ $r = new \ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
+
+ $service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs(array_values($arguments));
+ // don't trigger deprecations for internal uses
+ // @deprecated since version 3.3, to be removed in 4.0 along with the deprecated class
+ $deprecationAllowlist = ['event_dispatcher' => ContainerAwareEventDispatcher::class];
+
+ if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ") && (!isset($deprecationAllowlist[$id]) || $deprecationAllowlist[$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()) {
+ // share only if proxying failed, or if not a proxy
+ $this->shareService($definition, $service, $id, $inlineServices);
+ }
+
+ $properties = $this->doResolveServices($parameterBag->unescapeValue($parameterBag->resolveValue($definition->getProperties())), $inlineServices);
+ foreach ($properties as $name => $value) {
+ $service->$name = $value;
+ }
+
+ foreach ($definition->getMethodCalls() as $call) {
+ $this->callMethod($service, $call, $inlineServices);
+ }
+
+ if ($callable = $definition->getConfigurator()) {
+ if (\is_array($callable)) {
+ $callable[0] = $parameterBag->resolveValue($callable[0]);
+
+ if ($callable[0] instanceof Reference) {
+ $callable[0] = $this->doGet((string) $callable[0], $callable[0]->getInvalidBehavior(), $inlineServices);
+ } elseif ($callable[0] instanceof Definition) {
+ $callable[0] = $this->createService($callable[0], $inlineServices);
+ }
+ }
+
+ 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);
+ }
+
+ return $service;
+ }
+
+ /**
+ * Replaces service references by the real service instance and evaluates expressions.
+ *
+ * @param mixed $value A value
+ *
+ * @return mixed The same value with all service references replaced by
+ * the real service instances and all expressions evaluated
+ */
+ public function resolveServices($value)
+ {
+ return $this->doResolveServices($value);
+ }
+
+ private function doResolveServices($value, array &$inlineServices = [], $isConstructorArgument = false)
+ {
+ if (\is_array($value)) {
+ foreach ($value as $k => $v) {
+ $value[$k] = $this->doResolveServices($v, $inlineServices, $isConstructorArgument);
+ }
+ } elseif ($value instanceof ServiceClosureArgument) {
+ $reference = $value->getValues()[0];
+ $value = function () use ($reference) {
+ return $this->resolveServices($reference);
+ };
+ } 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)) {
+ continue 2;
+ }
+ }
+ foreach (self::getInitializedConditionals($v) as $s) {
+ if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
+ continue 2;
+ }
+ }
+
+ yield $k => $this->resolveServices($v);
+ }
+ }, function () use ($value) {
+ $count = 0;
+ foreach ($value->getValues() as $v) {
+ foreach (self::getServiceConditionals($v) as $s) {
+ if (!$this->has($s)) {
+ continue 2;
+ }
+ }
+ foreach (self::getInitializedConditionals($v) as $s) {
+ if (!$this->doGet($s, ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE)) {
+ continue 2;
+ }
+ }
+
+ ++$count;
+ }
+
+ return $count;
+ });
+ } elseif ($value instanceof Reference) {
+ $value = $this->doGet((string) $value, $value->getInvalidBehavior(), $inlineServices, $isConstructorArgument);
+ } elseif ($value instanceof Definition) {
+ $value = $this->createService($value, $inlineServices, $isConstructorArgument);
+ } elseif ($value instanceof Parameter) {
+ $value = $this->getParameter((string) $value);
+ } elseif ($value instanceof Expression) {
+ $value = $this->getExpressionLanguage()->evaluate($value, ['container' => $this]);
+ }
+
+ return $value;
+ }
+
+ /**
+ * Returns service ids for a given tag.
+ *
+ * Example:
+ *
+ * $container->register('foo')->addTag('my.tag', ['hello' => 'world']);
+ *
+ * $serviceIds = $container->findTaggedServiceIds('my.tag');
+ * foreach ($serviceIds as $serviceId => $tags) {
+ * foreach ($tags as $tag) {
+ * echo $tag['hello'];
+ * }
+ * }
+ *
+ * @param string $name
+ * @param bool $throwOnAbstract
+ *
+ * @return array An array of tags with the tagged service as key, holding a list of attribute arrays
+ */
+ 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 InvalidArgumentException(sprintf('The service "%s" tagged "%s" must not be abstract.', $id, $name));
+ }
+ $tags[$id] = $definition->getTag($name);
+ }
+ }
+
+ return $tags;
+ }
+
+ /**
+ * Returns all tags the defined services use.
+ *
+ * @return array An array of tags
+ */
+ public function findTags()
+ {
+ $tags = [];
+ foreach ($this->getDefinitions() as $id => $definition) {
+ $tags = array_merge(array_keys($definition->getTags()), $tags);
+ }
+
+ return array_unique($tags);
+ }
+
+ /**
+ * Returns all tags not queried by findTaggedServiceIds.
+ *
+ * @return string[] An array of tags
+ */
+ public function findUnusedTags()
+ {
+ return array_values(array_diff($this->findTags(), $this->usedTags));
+ }
+
+ public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
+ {
+ $this->expressionLanguageProviders[] = $provider;
+ }
+
+ /**
+ * @return ExpressionFunctionProviderInterface[]
+ */
+ public function getExpressionLanguageProviders()
+ {
+ return $this->expressionLanguageProviders;
+ }
+
+ /**
+ * Returns a ChildDefinition that will be used for autoconfiguring the interface/class.
+ *
+ * @param string $interface The class or interface to match
+ *
+ * @return ChildDefinition
+ */
+ public function registerForAutoconfiguration($interface)
+ {
+ if (!isset($this->autoconfiguredInstanceof[$interface])) {
+ $this->autoconfiguredInstanceof[$interface] = new ChildDefinition('');
+ }
+
+ return $this->autoconfiguredInstanceof[$interface];
+ }
+
+ /**
+ * Returns an array of ChildDefinition[] keyed by interface.
+ *
+ * @return ChildDefinition[]
+ */
+ public function getAutoconfiguredInstanceof()
+ {
+ return $this->autoconfiguredInstanceof;
+ }
+
+ /**
+ * Resolves env parameter placeholders in a string or an array.
+ *
+ * @param mixed $value The value to resolve
+ * @param string|true|null $format A sprintf() format returning the replacement for each env var name or
+ * null to resolve back to the original "%env(VAR)%" format or
+ * true to resolve to the actual values of the referenced env vars
+ * @param array &$usedEnvs Env vars found while resolving are added to this array
+ *
+ * @return mixed The value with env parameters resolved if a string or an array is passed
+ */
+ public function resolveEnvPlaceholders($value, $format = null, array &$usedEnvs = null)
+ {
+ if (null === $format) {
+ $format = '%%env(%s)%%';
+ }
+
+ $bag = $this->getParameterBag();
+ if (true === $format) {
+ $value = $bag->resolveValue($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);
+ }
+
+ return $result;
+ }
+
+ if (!\is_string($value) || 38 > \strlen($value)) {
+ return $value;
+ }
+ $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) {
+ $resolved = $bag->escapeValue($this->getEnv($env));
+ } else {
+ $resolved = sprintf($format, $env);
+ }
+ if ($placeholder === $value) {
+ $value = $resolved;
+ $completed = true;
+ } else {
+ 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);
+ }
+ $usedEnvs[$env] = $env;
+ $this->envCounters[$env] = isset($this->envCounters[$env]) ? 1 + $this->envCounters[$env] : 1;
+
+ if ($completed) {
+ break 2;
+ }
+ }
+ }
+ }
+
+ return $value;
+ }
+
+ /**
+ * Get statistics about env usage.
+ *
+ * @return int[] The number of time each env vars has been resolved
+ */
+ public function getEnvCounters()
+ {
+ $bag = $this->getParameterBag();
+ $envPlaceholders = $bag instanceof EnvPlaceholderParameterBag ? $bag->getEnvPlaceholders() : $this->envPlaceholders;
+
+ foreach ($envPlaceholders as $env => $placeholders) {
+ if (!isset($this->envCounters[$env])) {
+ $this->envCounters[$env] = 0;
+ }
+ }
+
+ return $this->envCounters;
+ }
+
+ /**
+ * @internal
+ */
+ public function getNormalizedIds()
+ {
+ $normalizedIds = [];
+
+ foreach ($this->normalizedIds as $k => $v) {
+ if ($v !== (string) $k) {
+ $normalizedIds[$k] = $v;
+ }
+ }
+
+ return $normalizedIds;
+ }
+
+ /**
+ * @final
+ */
+ public function log(CompilerPassInterface $pass, $message)
+ {
+ $this->getCompiler()->log($pass, $this->resolveEnvPlaceholders($message));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function normalizeId($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);
+ }
+
+ /**
+ * Gets removed binding ids.
+ *
+ * @return array
+ *
+ * @internal
+ */
+ public function getRemovedBindingIds()
+ {
+ return $this->removedBindingIds;
+ }
+
+ /**
+ * Removes bindings for a service.
+ *
+ * @param string $id The service identifier
+ *
+ * @internal
+ */
+ 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;
+ }
+ }
+ }
+
+ /**
+ * Returns the Service Conditionals.
+ *
+ * @param mixed $value An array of conditionals to return
+ *
+ * @return array An array of Service conditionals
+ *
+ * @internal since version 3.4
+ */
+ public static function getServiceConditionals($value)
+ {
+ $services = [];
+
+ if (\is_array($value)) {
+ foreach ($value as $v) {
+ $services = array_unique(array_merge($services, self::getServiceConditionals($v)));
+ }
+ } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_INVALID_REFERENCE === $value->getInvalidBehavior()) {
+ $services[] = (string) $value;
+ }
+
+ return $services;
+ }
+
+ /**
+ * Returns the initialized conditionals.
+ *
+ * @param mixed $value An array of conditionals to return
+ *
+ * @return array An array of uninitialized conditionals
+ *
+ * @internal
+ */
+ public static function getInitializedConditionals($value)
+ {
+ $services = [];
+
+ if (\is_array($value)) {
+ foreach ($value as $v) {
+ $services = array_unique(array_merge($services, self::getInitializedConditionals($v)));
+ }
+ } elseif ($value instanceof Reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior()) {
+ $services[] = (string) $value;
+ }
+
+ return $services;
+ }
+
+ /**
+ * Computes a reasonably unique hash of a value.
+ *
+ * @param mixed $value A serializable value
+ *
+ * @return string
+ */
+ public static function hash($value)
+ {
+ $hash = substr(base64_encode(hash('sha256', serialize($value), true)), 0, 7);
+
+ return str_replace(['/', '+'], ['.', '_'], strtolower($hash));
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getEnv($name)
+ {
+ $value = parent::getEnv($name);
+ $bag = $this->getParameterBag();
+
+ if (!\is_string($value) || !$bag instanceof EnvPlaceholderParameterBag) {
+ return $value;
+ }
+
+ foreach ($bag->getEnvPlaceholders() as $env => $placeholders) {
+ if (isset($placeholders[$value])) {
+ $bag = new ParameterBag($bag->all());
+
+ return $bag->unescapeValue($bag->get("env($name)"));
+ }
+ }
+
+ $this->resolving["env($name)"] = true;
+ try {
+ return $bag->unescapeValue($this->resolveEnvPlaceholders($bag->escapeValue($value), true));
+ } finally {
+ unset($this->resolving["env($name)"]);
+ }
+ }
+
+ private function callMethod($service, $call, array &$inlineServices)
+ {
+ foreach (self::getServiceConditionals($call[1]) as $s) {
+ if (!$this->has($s)) {
+ return;
+ }
+ }
+ foreach (self::getInitializedConditionals($call[1]) as $s) {
+ 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));
+ }
+
+ /**
+ * Shares a given service in the container.
+ *
+ * @param mixed $service
+ * @param string|null $id
+ */
+ private function shareService(Definition $definition, $service, $id, array &$inlineServices)
+ {
+ $inlineServices[null !== $id ? $id : spl_object_hash($definition)] = $service;
+
+ if (null !== $id && $definition->isShared()) {
+ $this->services[$id] = $service;
+ unset($this->loading[$id]);
+ }
+ }
+
+ private function getExpressionLanguage()
+ {
+ if (null === $this->expressionLanguage) {
+ if (!class_exists('Symfony\Component\ExpressionLanguage\ExpressionLanguage')) {
+ throw new RuntimeException('Unable to use expressions as the Symfony ExpressionLanguage component is not installed.');
+ }
+ $this->expressionLanguage = new ExpressionLanguage(null, $this->expressionLanguageProviders);
+ }
+
+ return $this->expressionLanguage;
+ }
+
+ private function inVendors($path)
+ {
+ if (null === $this->vendors) {
+ $resource = new ComposerResource();
+ $this->vendors = $resource->getVendors();
+ $this->addResource($resource);
+ }
+ $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;
+ }
+ }
+
+ return false;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerInterface.php
new file mode 100644
index 00000000..c5ab4c2e
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/ContainerInterface.php
@@ -0,0 +1,100 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Psr\Container\ContainerInterface as PsrContainerInterface;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
+
+/**
+ * ContainerInterface is the interface implemented by service container classes.
+ *
+ * @author Fabien Potencier
+ * @author Johannes M. Schmitt
+ */
+interface ContainerInterface extends PsrContainerInterface
+{
+ const EXCEPTION_ON_INVALID_REFERENCE = 1;
+ const NULL_ON_INVALID_REFERENCE = 2;
+ const IGNORE_ON_INVALID_REFERENCE = 3;
+ const IGNORE_ON_UNINITIALIZED_REFERENCE = 4;
+
+ /**
+ * Sets a service.
+ *
+ * @param string $id The service identifier
+ * @param object|null $service The service instance
+ */
+ public function set($id, $service);
+
+ /**
+ * Gets a service.
+ *
+ * @param string $id The service identifier
+ * @param int $invalidBehavior The behavior when the service does not exist
+ *
+ * @return object|null The associated service
+ *
+ * @throws ServiceCircularReferenceException When a circular reference is detected
+ * @throws ServiceNotFoundException When the service is not defined
+ *
+ * @see Reference
+ */
+ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE);
+
+ /**
+ * Returns true if the given service is defined.
+ *
+ * @param string $id The service identifier
+ *
+ * @return bool true if the service is defined, false otherwise
+ */
+ public function has($id);
+
+ /**
+ * Check for whether or not a service has been initialized.
+ *
+ * @param string $id
+ *
+ * @return bool true if the service has been initialized, false otherwise
+ */
+ public function initialized($id);
+
+ /**
+ * Gets a parameter.
+ *
+ * @param string $name The parameter name
+ *
+ * @return mixed The parameter value
+ *
+ * @throws InvalidArgumentException if the parameter is not defined
+ */
+ public function getParameter($name);
+
+ /**
+ * Checks if a parameter exists.
+ *
+ * @param string $name The parameter name
+ *
+ * @return bool The presence of parameter in container
+ */
+ public function hasParameter($name);
+
+ /**
+ * Sets a parameter.
+ *
+ * @param string $name The parameter name
+ * @param mixed $value The parameter value
+ */
+ public function setParameter($name, $value);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Definition.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Definition.php
new file mode 100644
index 00000000..c3a94f5c
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Definition.php
@@ -0,0 +1,973 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\Argument\BoundArgument;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
+
+/**
+ * Definition represents a service definition.
+ *
+ * @author Fabien Potencier
+ */
+class Definition
+{
+ private $class;
+ private $file;
+ private $factory;
+ private $shared = true;
+ private $deprecated = false;
+ private $deprecationTemplate;
+ private $properties = [];
+ private $calls = [];
+ private $instanceof = [];
+ private $autoconfigured = false;
+ private $configurator;
+ private $tags = [];
+ private $public = true;
+ private $private = true;
+ private $synthetic = false;
+ private $abstract = false;
+ private $lazy = false;
+ private $decoratedService;
+ private $autowired = false;
+ private $autowiringTypes = [];
+ private $changes = [];
+ private $bindings = [];
+ private $errors = [];
+
+ protected $arguments = [];
+
+ private static $defaultDeprecationTemplate = 'The "%service_id%" service is deprecated. You should stop using it, as it will soon be removed.';
+
+ /**
+ * @param string|null $class The service class
+ * @param array $arguments An array of arguments to pass to the service constructor
+ */
+ public function __construct($class = null, array $arguments = [])
+ {
+ if (null !== $class) {
+ $this->setClass($class);
+ }
+ $this->arguments = $arguments;
+ }
+
+ /**
+ * Returns all changes tracked for the Definition object.
+ *
+ * @return array An array of changes for this Definition
+ */
+ public function getChanges()
+ {
+ return $this->changes;
+ }
+
+ /**
+ * Sets the tracked changes for the Definition object.
+ *
+ * @param array $changes An array of changes for this Definition
+ *
+ * @return $this
+ */
+ public function setChanges(array $changes)
+ {
+ $this->changes = $changes;
+
+ return $this;
+ }
+
+ /**
+ * Sets a factory.
+ *
+ * @param string|array $factory A PHP function or an array containing a class/Reference and a method to call
+ *
+ * @return $this
+ */
+ public function setFactory($factory)
+ {
+ $this->changes['factory'] = true;
+
+ if (\is_string($factory) && false !== strpos($factory, '::')) {
+ $factory = explode('::', $factory, 2);
+ }
+
+ $this->factory = $factory;
+
+ return $this;
+ }
+
+ /**
+ * Gets the factory.
+ *
+ * @return string|array|null The PHP function or an array containing a class/Reference and a method to call
+ */
+ public function getFactory()
+ {
+ return $this->factory;
+ }
+
+ /**
+ * Sets the service that this service is decorating.
+ *
+ * @param string|null $id The decorated service id, use null to remove decoration
+ * @param string|null $renamedId The new decorated service id
+ * @param int $priority The priority of decoration
+ *
+ * @return $this
+ *
+ * @throws InvalidArgumentException in case the decorated service id and the new decorated service id are equals
+ */
+ public function setDecoratedService($id, $renamedId = null, $priority = 0)
+ {
+ if ($renamedId && $id === $renamedId) {
+ 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;
+
+ if (null === $id) {
+ $this->decoratedService = null;
+ } else {
+ $this->decoratedService = [$id, $renamedId, (int) $priority];
+ }
+
+ return $this;
+ }
+
+ /**
+ * Gets the service that this service is decorating.
+ *
+ * @return array|null An array composed of the decorated service id, the new id for it and the priority of decoration, null if no service is decorated
+ */
+ public function getDecoratedService()
+ {
+ return $this->decoratedService;
+ }
+
+ /**
+ * Sets the service class.
+ *
+ * @param string $class The service class
+ *
+ * @return $this
+ */
+ public function setClass($class)
+ {
+ $this->changes['class'] = true;
+
+ $this->class = $class;
+
+ return $this;
+ }
+
+ /**
+ * Gets the service class.
+ *
+ * @return string|null The service class
+ */
+ public function getClass()
+ {
+ return $this->class;
+ }
+
+ /**
+ * Sets the arguments to pass to the service constructor/factory method.
+ *
+ * @return $this
+ */
+ public function setArguments(array $arguments)
+ {
+ $this->arguments = $arguments;
+
+ return $this;
+ }
+
+ /**
+ * Sets the properties to define when creating the service.
+ *
+ * @return $this
+ */
+ public function setProperties(array $properties)
+ {
+ $this->properties = $properties;
+
+ return $this;
+ }
+
+ /**
+ * Gets the properties to define when creating the service.
+ *
+ * @return array
+ */
+ public function getProperties()
+ {
+ return $this->properties;
+ }
+
+ /**
+ * Sets a specific property.
+ *
+ * @param string $name
+ * @param mixed $value
+ *
+ * @return $this
+ */
+ public function setProperty($name, $value)
+ {
+ $this->properties[$name] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Adds an argument to pass to the service constructor/factory method.
+ *
+ * @param mixed $argument An argument
+ *
+ * @return $this
+ */
+ public function addArgument($argument)
+ {
+ $this->arguments[] = $argument;
+
+ return $this;
+ }
+
+ /**
+ * Replaces a specific argument.
+ *
+ * @param int|string $index
+ * @param mixed $argument
+ *
+ * @return $this
+ *
+ * @throws OutOfBoundsException When the replaced argument does not exist
+ */
+ public function replaceArgument($index, $argument)
+ {
+ 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 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 OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index));
+ }
+
+ $this->arguments[$index] = $argument;
+
+ return $this;
+ }
+
+ /**
+ * Sets a specific argument.
+ *
+ * @param int|string $key
+ * @param mixed $value
+ *
+ * @return $this
+ */
+ public function setArgument($key, $value)
+ {
+ $this->arguments[$key] = $value;
+
+ return $this;
+ }
+
+ /**
+ * Gets the arguments to pass to the service constructor/factory method.
+ *
+ * @return array The array of arguments
+ */
+ public function getArguments()
+ {
+ return $this->arguments;
+ }
+
+ /**
+ * Gets an argument to pass to the service constructor/factory method.
+ *
+ * @param int|string $index
+ *
+ * @return mixed The argument value
+ *
+ * @throws OutOfBoundsException When the argument does not exist
+ */
+ public function getArgument($index)
+ {
+ if (!\array_key_exists($index, $this->arguments)) {
+ throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index));
+ }
+
+ return $this->arguments[$index];
+ }
+
+ /**
+ * Sets the methods to call after service initialization.
+ *
+ * @return $this
+ */
+ public function setMethodCalls(array $calls = [])
+ {
+ $this->calls = [];
+ foreach ($calls as $call) {
+ $this->addMethodCall($call[0], $call[1]);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Adds a method to call after service initialization.
+ *
+ * @param string $method The method name to call
+ * @param array $arguments An array of arguments to pass to the method call
+ *
+ * @return $this
+ *
+ * @throws InvalidArgumentException on empty $method param
+ */
+ public function addMethodCall($method, array $arguments = [])
+ {
+ if (empty($method)) {
+ throw new InvalidArgumentException('Method name cannot be empty.');
+ }
+ $this->calls[] = [$method, $arguments];
+
+ return $this;
+ }
+
+ /**
+ * Removes a method to call after service initialization.
+ *
+ * @param string $method The method name to remove
+ *
+ * @return $this
+ */
+ public function removeMethodCall($method)
+ {
+ foreach ($this->calls as $i => $call) {
+ if ($call[0] === $method) {
+ unset($this->calls[$i]);
+ break;
+ }
+ }
+
+ return $this;
+ }
+
+ /**
+ * Check if the current definition has a given method to call after service initialization.
+ *
+ * @param string $method The method name to search for
+ *
+ * @return bool
+ */
+ public function hasMethodCall($method)
+ {
+ foreach ($this->calls as $call) {
+ if ($call[0] === $method) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Gets the methods to call after service initialization.
+ *
+ * @return array An array of method calls
+ */
+ public function getMethodCalls()
+ {
+ return $this->calls;
+ }
+
+ /**
+ * Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
+ *
+ * @param ChildDefinition[] $instanceof
+ *
+ * @return $this
+ */
+ public function setInstanceofConditionals(array $instanceof)
+ {
+ $this->instanceof = $instanceof;
+
+ return $this;
+ }
+
+ /**
+ * Gets the definition templates to conditionally apply on the current definition, keyed by parent interface/class.
+ *
+ * @return ChildDefinition[]
+ */
+ public function getInstanceofConditionals()
+ {
+ return $this->instanceof;
+ }
+
+ /**
+ * Sets whether or not instanceof conditionals should be prepended with a global set.
+ *
+ * @param bool $autoconfigured
+ *
+ * @return $this
+ */
+ public function setAutoconfigured($autoconfigured)
+ {
+ $this->changes['autoconfigured'] = true;
+
+ $this->autoconfigured = $autoconfigured;
+
+ return $this;
+ }
+
+ /**
+ * @return bool
+ */
+ public function isAutoconfigured()
+ {
+ return $this->autoconfigured;
+ }
+
+ /**
+ * Sets tags for this definition.
+ *
+ * @return $this
+ */
+ public function setTags(array $tags)
+ {
+ $this->tags = $tags;
+
+ return $this;
+ }
+
+ /**
+ * Returns all tags.
+ *
+ * @return array An array of tags
+ */
+ public function getTags()
+ {
+ return $this->tags;
+ }
+
+ /**
+ * Gets a tag by name.
+ *
+ * @param string $name The tag name
+ *
+ * @return array An array of attributes
+ */
+ public function getTag($name)
+ {
+ return isset($this->tags[$name]) ? $this->tags[$name] : [];
+ }
+
+ /**
+ * Adds a tag for this definition.
+ *
+ * @param string $name The tag name
+ * @param array $attributes An array of attributes
+ *
+ * @return $this
+ */
+ public function addTag($name, array $attributes = [])
+ {
+ $this->tags[$name][] = $attributes;
+
+ return $this;
+ }
+
+ /**
+ * Whether this definition has a tag with the given name.
+ *
+ * @param string $name
+ *
+ * @return bool
+ */
+ public function hasTag($name)
+ {
+ return isset($this->tags[$name]);
+ }
+
+ /**
+ * Clears all tags for a given name.
+ *
+ * @param string $name The tag name
+ *
+ * @return $this
+ */
+ public function clearTag($name)
+ {
+ unset($this->tags[$name]);
+
+ return $this;
+ }
+
+ /**
+ * Clears the tags for this definition.
+ *
+ * @return $this
+ */
+ public function clearTags()
+ {
+ $this->tags = [];
+
+ return $this;
+ }
+
+ /**
+ * Sets a file to require before creating the service.
+ *
+ * @param string $file A full pathname to include
+ *
+ * @return $this
+ */
+ public function setFile($file)
+ {
+ $this->changes['file'] = true;
+
+ $this->file = $file;
+
+ return $this;
+ }
+
+ /**
+ * Gets the file to require before creating the service.
+ *
+ * @return string|null The full pathname to include
+ */
+ public function getFile()
+ {
+ return $this->file;
+ }
+
+ /**
+ * Sets if the service must be shared or not.
+ *
+ * @param bool $shared Whether the service must be shared or not
+ *
+ * @return $this
+ */
+ public function setShared($shared)
+ {
+ $this->changes['shared'] = true;
+
+ $this->shared = (bool) $shared;
+
+ return $this;
+ }
+
+ /**
+ * Whether this service is shared.
+ *
+ * @return bool
+ */
+ public function isShared()
+ {
+ return $this->shared;
+ }
+
+ /**
+ * Sets the visibility of this service.
+ *
+ * @param bool $boolean
+ *
+ * @return $this
+ */
+ public function setPublic($boolean)
+ {
+ $this->changes['public'] = true;
+
+ $this->public = (bool) $boolean;
+ $this->private = false;
+
+ return $this;
+ }
+
+ /**
+ * Whether this service is public facing.
+ *
+ * @return bool
+ */
+ public function isPublic()
+ {
+ return $this->public;
+ }
+
+ /**
+ * Sets if this service is private.
+ *
+ * When set, the "private" state has a higher precedence than "public".
+ * In version 3.4, a "private" service always remains publicly accessible,
+ * but triggers a deprecation notice when accessed from the container,
+ * so that the service can be made really private in 4.0.
+ *
+ * @param bool $boolean
+ *
+ * @return $this
+ */
+ public function setPrivate($boolean)
+ {
+ $this->private = (bool) $boolean;
+
+ return $this;
+ }
+
+ /**
+ * Whether this service is private.
+ *
+ * @return bool
+ */
+ public function isPrivate()
+ {
+ return $this->private;
+ }
+
+ /**
+ * Sets the lazy flag of this service.
+ *
+ * @param bool $lazy
+ *
+ * @return $this
+ */
+ public function setLazy($lazy)
+ {
+ $this->changes['lazy'] = true;
+
+ $this->lazy = (bool) $lazy;
+
+ return $this;
+ }
+
+ /**
+ * Whether this service is lazy.
+ *
+ * @return bool
+ */
+ public function isLazy()
+ {
+ return $this->lazy;
+ }
+
+ /**
+ * Sets whether this definition is synthetic, that is not constructed by the
+ * container, but dynamically injected.
+ *
+ * @param bool $boolean
+ *
+ * @return $this
+ */
+ public function setSynthetic($boolean)
+ {
+ $this->synthetic = (bool) $boolean;
+
+ return $this;
+ }
+
+ /**
+ * Whether this definition is synthetic, that is not constructed by the
+ * container, but dynamically injected.
+ *
+ * @return bool
+ */
+ public function isSynthetic()
+ {
+ return $this->synthetic;
+ }
+
+ /**
+ * Whether this definition is abstract, that means it merely serves as a
+ * template for other definitions.
+ *
+ * @param bool $boolean
+ *
+ * @return $this
+ */
+ public function setAbstract($boolean)
+ {
+ $this->abstract = (bool) $boolean;
+
+ return $this;
+ }
+
+ /**
+ * Whether this definition is abstract, that means it merely serves as a
+ * template for other definitions.
+ *
+ * @return bool
+ */
+ public function isAbstract()
+ {
+ return $this->abstract;
+ }
+
+ /**
+ * Whether this definition is deprecated, that means it should not be called
+ * anymore.
+ *
+ * @param bool $status
+ * @param string $template Template message to use if the definition is deprecated
+ *
+ * @return $this
+ *
+ * @throws InvalidArgumentException when the message template is invalid
+ */
+ public function setDeprecated($status = true, $template = null)
+ {
+ if (null !== $template) {
+ if (preg_match('#[\r\n]|\*/#', $template)) {
+ throw new InvalidArgumentException('Invalid characters found in deprecation template.');
+ }
+
+ 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->deprecated = (bool) $status;
+
+ return $this;
+ }
+
+ /**
+ * Whether this definition is deprecated, that means it should not be called
+ * anymore.
+ *
+ * @return bool
+ */
+ public function isDeprecated()
+ {
+ return $this->deprecated;
+ }
+
+ /**
+ * Message to use if this definition is deprecated.
+ *
+ * @param string $id Service id relying on this definition
+ *
+ * @return string
+ */
+ public function getDeprecationMessage($id)
+ {
+ return str_replace('%service_id%', $id, $this->deprecationTemplate ?: self::$defaultDeprecationTemplate);
+ }
+
+ /**
+ * Sets a configurator to call after the service is fully initialized.
+ *
+ * @param string|array $configurator A PHP callable
+ *
+ * @return $this
+ */
+ public function setConfigurator($configurator)
+ {
+ $this->changes['configurator'] = true;
+
+ if (\is_string($configurator) && false !== strpos($configurator, '::')) {
+ $configurator = explode('::', $configurator, 2);
+ }
+
+ $this->configurator = $configurator;
+
+ return $this;
+ }
+
+ /**
+ * Gets the configurator to call after the service is fully initialized.
+ *
+ * @return callable|array|null
+ */
+ public function getConfigurator()
+ {
+ return $this->configurator;
+ }
+
+ /**
+ * Sets types that will default to this definition.
+ *
+ * @param string[] $types
+ *
+ * @return $this
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+ 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);
+
+ $this->autowiringTypes = [];
+
+ foreach ($types as $type) {
+ $this->autowiringTypes[$type] = true;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Is the definition autowired?
+ *
+ * @return bool
+ */
+ public function isAutowired()
+ {
+ return $this->autowired;
+ }
+
+ /**
+ * Enables/disables autowiring.
+ *
+ * @param bool $autowired
+ *
+ * @return $this
+ */
+ public function setAutowired($autowired)
+ {
+ $this->changes['autowired'] = true;
+
+ $this->autowired = (bool) $autowired;
+
+ return $this;
+ }
+
+ /**
+ * Gets autowiring types that will default to this definition.
+ *
+ * @return string[]
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+ public function getAutowiringTypes(/*$triggerDeprecation = true*/)
+ {
+ 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);
+ }
+
+ /**
+ * Adds a type that will default to this definition.
+ *
+ * @param string $type
+ *
+ * @return $this
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+ 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;
+
+ return $this;
+ }
+
+ /**
+ * Removes a type.
+ *
+ * @param string $type
+ *
+ * @return $this
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+ 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);
+
+ unset($this->autowiringTypes[$type]);
+
+ return $this;
+ }
+
+ /**
+ * Will this definition default for the given type?
+ *
+ * @param string $type
+ *
+ * @return bool
+ *
+ * @deprecated since version 3.3, to be removed in 4.0.
+ */
+ 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);
+
+ return isset($this->autowiringTypes[$type]);
+ }
+
+ /**
+ * Gets bindings.
+ *
+ * @return array
+ */
+ public function getBindings()
+ {
+ return $this->bindings;
+ }
+
+ /**
+ * Sets bindings.
+ *
+ * Bindings map $named or FQCN arguments to values that should be
+ * injected in the matching parameters (of the constructor, of methods
+ * called and of controller actions).
+ *
+ * @return $this
+ */
+ public function setBindings(array $bindings)
+ {
+ foreach ($bindings as $key => $binding) {
+ if (!$binding instanceof BoundArgument) {
+ $bindings[$key] = new BoundArgument($binding);
+ }
+ }
+
+ $this->bindings = $bindings;
+
+ return $this;
+ }
+
+ /**
+ * Add an error that occurred when building this Definition.
+ *
+ * @param string $error
+ */
+ public function addError($error)
+ {
+ $this->errors[] = $error;
+ }
+
+ /**
+ * Returns any errors that occurred while building this Definition.
+ *
+ * @return array
+ */
+ public function getErrors()
+ {
+ return $this->errors;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/DefinitionDecorator.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/DefinitionDecorator.php
new file mode 100644
index 00000000..4753c2aa
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/DefinitionDecorator.php
@@ -0,0 +1,29 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace 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(ChildDefinition::class);
+
+if (false) {
+ /**
+ * This definition decorates another definition.
+ *
+ * @author Johannes M. Schmitt
+ *
+ * @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 Definition
+ {
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/Dumper.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/Dumper.php
new file mode 100644
index 00000000..e7407b0e
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/Dumper.php
@@ -0,0 +1,29 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Dumper;
+
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+
+/**
+ * Dumper is the abstract class for all built-in dumpers.
+ *
+ * @author Fabien Potencier
+ */
+abstract class Dumper implements DumperInterface
+{
+ protected $container;
+
+ public function __construct(ContainerBuilder $container)
+ {
+ $this->container = $container;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/DumperInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/DumperInterface.php
new file mode 100644
index 00000000..8abc1925
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/DumperInterface.php
@@ -0,0 +1,27 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Dumper;
+
+/**
+ * DumperInterface is the interface implemented by service container dumper classes.
+ *
+ * @author Fabien Potencier
+ */
+interface DumperInterface
+{
+ /**
+ * Dumps the service container.
+ *
+ * @return string|array The representation of the service container
+ */
+ public function dump(array $options = []);
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
new file mode 100644
index 00000000..0591e024
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php
@@ -0,0 +1,312 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Dumper;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException;
+use Symfony\Component\DependencyInjection\Parameter;
+use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
+use Symfony\Component\DependencyInjection\Reference;
+
+/**
+ * GraphvizDumper dumps a service container as a graphviz file.
+ *
+ * You can convert the generated dot file with the dot utility (http://www.graphviz.org/):
+ *
+ * dot -Tpng container.dot > foo.png
+ *
+ * @author Fabien Potencier
+ */
+class GraphvizDumper extends Dumper
+{
+ private $nodes;
+ private $edges;
+ // All values should be strings
+ private $options = [
+ 'graph' => ['ratio' => 'compress'],
+ 'node' => ['fontsize' => '11', 'fontname' => 'Arial', 'shape' => 'record'],
+ 'edge' => ['fontsize' => '9', 'fontname' => 'Arial', 'color' => 'grey', 'arrowhead' => 'open', 'arrowsize' => '0.5'],
+ 'node.instance' => ['fillcolor' => '#9999ff', 'style' => 'filled'],
+ 'node.definition' => ['fillcolor' => '#eeeeee'],
+ 'node.missing' => ['fillcolor' => '#ff9999', 'style' => 'filled'],
+ ];
+
+ /**
+ * Dumps the service container as a graphviz graph.
+ *
+ * Available options:
+ *
+ * * graph: The default options for the whole graph
+ * * node: The default options for nodes
+ * * edge: The default options for edges
+ * * node.instance: The default options for services that are defined directly by object instances
+ * * node.definition: The default options for services that are defined via service definition instances
+ * * node.missing: The default options for missing services
+ *
+ * @return string The dot representation of the service container
+ */
+ 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->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, '')
+ );
+
+ foreach ($definition->getMethodCalls() as $call) {
+ $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__');
+ }
+
+ /**
+ * Returns all nodes.
+ *
+ * @return string A string representation of all nodes
+ */
+ 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']));
+ }
+
+ return $code;
+ }
+
+ /**
+ * Returns all edges.
+ *
+ * @return string A string representation of all edges
+ */
+ 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"' : '');
+ }
+ }
+
+ return $code;
+ }
+
+ /**
+ * Finds all edges belonging to a specific service id.
+ *
+ * @param string $id The service id used to find edges
+ * @param array $arguments An array of arguments
+ * @param bool $required
+ * @param string $name
+ *
+ * @return array An array of edges
+ */
+ private function findEdges($id, array $arguments, $required, $name, $lazy = false)
+ {
+ $edges = [];
+ foreach ($arguments as $argument) {
+ if ($argument instanceof Parameter) {
+ $argument = $this->container->hasParameter($argument) ? $this->container->getParameter($argument) : null;
+ } elseif (\is_string($argument) && preg_match('/^%([^%]+)%$/', $argument, $match)) {
+ $argument = $this->container->hasParameter($match[1]) ? $this->container->getParameter($match[1]) : null;
+ }
+
+ 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']];
+ } elseif ('service_container' !== (string) $argument) {
+ $lazyEdge = $lazy || $this->container->getDefinition((string) $argument)->isLazy();
+ }
+
+ $edges[] = ['name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge];
+ } 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].'()'));
+ }
+ } elseif (\is_array($argument)) {
+ $edges = array_merge($edges, $this->findEdges($id, $argument, $required, $name, $lazy));
+ }
+ }
+
+ return $edges;
+ }
+
+ /**
+ * Finds all nodes.
+ *
+ * @return array An array of all nodes
+ */
+ private function findNodes()
+ {
+ $nodes = [];
+
+ $container = $this->cloneContainer();
+
+ foreach ($container->getDefinitions() as $id => $definition) {
+ $class = $definition->getClass();
+
+ if ('\\' === substr($class, 0, 1)) {
+ $class = substr($class, 1);
+ }
+
+ try {
+ $class = $this->container->getParameterBag()->resolveValue($class);
+ } 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 Definition('stdClass'));
+ }
+
+ foreach ($container->getServiceIds() as $id) {
+ 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']];
+ }
+ }
+
+ return $nodes;
+ }
+
+ private function cloneContainer()
+ {
+ $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());
+ foreach ($this->container->getExtensions() as $extension) {
+ $container->registerExtension($extension);
+ }
+
+ return $container;
+ }
+
+ /**
+ * Returns the start dot.
+ *
+ * @return string The string representation of a start dot
+ */
+ 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'])
+ );
+ }
+
+ /**
+ * Returns the end dot.
+ *
+ * @return string
+ */
+ private function endDot()
+ {
+ return "}\n";
+ }
+
+ /**
+ * Adds attributes.
+ *
+ * @param array $attributes An array of attributes
+ *
+ * @return string A comma separated list of attributes
+ */
+ private function addAttributes(array $attributes)
+ {
+ $code = [];
+ foreach ($attributes as $k => $v) {
+ $code[] = sprintf('%s="%s"', $k, $v);
+ }
+
+ return $code ? ', '.implode(', ', $code) : '';
+ }
+
+ /**
+ * Adds options.
+ *
+ * @param array $options An array of options
+ *
+ * @return string A space separated list of options
+ */
+ private function addOptions(array $options)
+ {
+ $code = [];
+ foreach ($options as $k => $v) {
+ $code[] = sprintf('%s="%s"', $k, $v);
+ }
+
+ return implode(' ', $code);
+ }
+
+ /**
+ * Dotizes an identifier.
+ *
+ * @param string $id The identifier to dotize
+ *
+ * @return string A dotized string
+ */
+ private function dotize($id)
+ {
+ return strtolower(preg_replace('/\W/i', '_', $id));
+ }
+
+ /**
+ * Compiles an array of aliases for a specified service id.
+ *
+ * @param string $id A service id
+ *
+ * @return array An array of aliases
+ */
+ private function getAliases($id)
+ {
+ $aliases = [];
+ foreach ($this->container->getAliases() as $alias => $origin) {
+ if ($id == $origin) {
+ $aliases[] = $alias;
+ }
+ }
+
+ return $aliases;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
new file mode 100644
index 00000000..8605d755
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/PhpDumper.php
@@ -0,0 +1,2045 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Dumper;
+
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\Compiler\AnalyzeServiceReferencesPass;
+use Symfony\Component\DependencyInjection\Compiler\CheckCircularReferencesPass;
+use Symfony\Component\DependencyInjection\Container;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\EnvParameterException;
+use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
+use Symfony\Component\DependencyInjection\ExpressionLanguage;
+use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface as ProxyDumper;
+use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper;
+use Symfony\Component\DependencyInjection\Parameter;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\DependencyInjection\TypedReference;
+use Symfony\Component\DependencyInjection\Variable;
+use Symfony\Component\ExpressionLanguage\Expression;
+use Symfony\Component\HttpKernel\Kernel;
+
+/**
+ * PhpDumper dumps a service container as a PHP class.
+ *
+ * @author Fabien Potencier
+ * @author Johannes M. Schmitt
+ */
+class PhpDumper extends Dumper
+{
+ /**
+ * Characters that might appear in the generated variable name as first character.
+ */
+ const FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz';
+
+ /**
+ * Characters that might appear in the generated variable name as any but the first character.
+ */
+ const NON_FIRST_CHARS = 'abcdefghijklmnopqrstuvwxyz0123456789_';
+
+ private $definitionVariables;
+ private $referenceVariables;
+ private $variableCount;
+ private $inlinedDefinitions;
+ private $serviceCalls;
+ private $reservedVariables = ['instance', 'class', 'this'];
+ private $expressionLanguage;
+ private $targetDirRegex;
+ private $targetDirMaxMatches;
+ private $docStar;
+ private $serviceIdToMethodNameMap;
+ private $usedMethodNames;
+ private $namespace;
+ private $asFiles;
+ private $hotPathTag;
+ private $inlineRequires;
+ private $inlinedRequires = [];
+ private $circularReferences = [];
+
+ /**
+ * @var ProxyDumper
+ */
+ private $proxyDumper;
+
+ /**
+ * {@inheritdoc}
+ */
+ 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);
+ }
+
+ parent::__construct($container);
+ }
+
+ /**
+ * Sets the dumper to be used when dumping proxies in the generated container.
+ */
+ public function setProxyDumper(ProxyDumper $proxyDumper)
+ {
+ $this->proxyDumper = $proxyDumper;
+ }
+
+ /**
+ * Dumps the service container as a PHP class.
+ *
+ * Available options:
+ *
+ * * class: The class name
+ * * base_class: The base class name
+ * * namespace: The class namespace
+ * * as_files: To split the container in several files
+ *
+ * @return string|array A PHP class representing the service container or an array of PHP files if the "as_files" option is set
+ *
+ * @throws EnvParameterException When an env var exists but has not been dumped
+ */
+ 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);
+
+ $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);
+ $baseClassWithNamespace = $baseClass;
+ } elseif ('Container' === $baseClass) {
+ $baseClassWithNamespace = Container::class;
+ } else {
+ $baseClassWithNamespace = $baseClass;
+ }
+
+ $this->initializeMethodNamesMap('Container' === $baseClass ? Container::class : $baseClass);
+
+ if ($this->getProxyDumper() instanceof NullDumper) {
+ (new AnalyzeServiceReferencesPass(true, false))->process($this->container);
+ try {
+ (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 ServiceCircularReferenceException($e->getServiceId(), $path);
+ }
+ }
+
+ (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 Definition) {
+ continue;
+ }
+ if (!isset($checkedNodes[$id])) {
+ $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes);
+ }
+ }
+ $this->container->getCompiler()->getServiceReferenceGraph()->clear();
+ $checkedNodes = [];
+
+ $this->docStar = $options['debug'] ? '*' : '';
+
+ 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) {
+ $regex = '';
+ $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);
+ }
+
+ do {
+ $regex = preg_quote(\DIRECTORY_SEPARATOR.$dir[$i], '#').$regex;
+ } while (0 < --$i);
+
+ $this->targetDirRegex = '#(^|file://|[:;, \|\r\n])'.preg_quote($dir[0], '#').$regex.'#';
+ }
+ }
+
+ $code =
+ $this->startClass($options['class'], $baseClass, $baseClassWithNamespace).
+ $this->addServices().
+ $this->addDefaultParametersMethod().
+ $this->endClass()
+ ;
+
+ if ($this->asFiles) {
+ $fileStart = <<container->getRemovedIds())) {
+ sort($ids);
+ $c = "doExport($id)." => true,\n";
+ }
+ $files['removed-ids.php'] = $c."];\n";
+ }
+
+ foreach ($this->generateServiceFiles() as $file => $c) {
+ $files[$file] = $fileStart.$c;
+ }
+ foreach ($this->generateProxyClasses() as $file => $c) {
+ $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);
+
+ $code[$options['class'].'.php'] = << '$hash',
+ 'container.build_id' => '$id',
+ 'container.build_time' => $time,
+], __DIR__.\\DIRECTORY_SEPARATOR.'Container{$hash}');
+
+EOF;
+ } else {
+ foreach ($this->generateProxyClasses() as $c) {
+ $code .= $c;
+ }
+ }
+
+ $this->targetDirRegex = null;
+ $this->inlinedRequires = [];
+ $this->circularReferences = [];
+
+ $unusedEnvs = [];
+ foreach ($this->container->getEnvCounters() as $env => $use) {
+ if (!$use) {
+ $unusedEnvs[] = $env;
+ }
+ }
+ if ($unusedEnvs) {
+ throw new EnvParameterException($unusedEnvs, null, 'Environment variables "%s" are never used. Please, check your container\'s configuration.');
+ }
+
+ return $code;
+ }
+
+ /**
+ * Retrieves the currently set proxy dumper or instantiates one.
+ *
+ * @return ProxyDumper
+ */
+ private function getProxyDumper()
+ {
+ if (!$this->proxyDumper) {
+ $this->proxyDumper = new NullDumper();
+ }
+
+ return $this->proxyDumper;
+ }
+
+ private function analyzeCircularReferences($sourceId, array $edges, &$checkedNodes, &$currentPath = [], $byConstructor = true)
+ {
+ $checkedNodes[$sourceId] = true;
+ $currentPath[$sourceId] = $byConstructor;
+
+ foreach ($edges as $edge) {
+ $node = $edge->getDestNode();
+ $id = $node->getId();
+
+ if (!$node->getValue() instanceof Definition || $sourceId === $id || $edge->isLazy() || $edge->isWeak()) {
+ // no-op
+ } elseif (isset($currentPath[$id])) {
+ $this->addCircularReferences($id, $currentPath, $edge->isReferencedByConstructor());
+ } elseif (!isset($checkedNodes[$id])) {
+ $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes, $currentPath, $edge->isReferencedByConstructor());
+ } elseif (isset($this->circularReferences[$id])) {
+ $this->connectCircularReferences($id, $currentPath, $edge->isReferencedByConstructor());
+ }
+ }
+ unset($currentPath[$sourceId]);
+ }
+
+ private function connectCircularReferences($sourceId, &$currentPath, $byConstructor, &$subPath = [])
+ {
+ $currentPath[$sourceId] = $subPath[$sourceId] = $byConstructor;
+
+ foreach ($this->circularReferences[$sourceId] as $id => $byConstructor) {
+ if (isset($currentPath[$id])) {
+ $this->addCircularReferences($id, $currentPath, $byConstructor);
+ } elseif (!isset($subPath[$id]) && isset($this->circularReferences[$id])) {
+ $this->connectCircularReferences($id, $currentPath, $byConstructor, $subPath);
+ }
+ }
+ unset($currentPath[$sourceId], $subPath[$sourceId]);
+ }
+
+ private function addCircularReferences($id, $currentPath, $byConstructor)
+ {
+ $currentPath[$id] = $byConstructor;
+ $circularRefs = [];
+
+ foreach (array_reverse($currentPath) as $parentId => $v) {
+ $byConstructor = $byConstructor && $v;
+ $circularRefs[] = $parentId;
+
+ if ($parentId === $id) {
+ break;
+ }
+ }
+
+ $currentId = $id;
+ foreach ($circularRefs as $parentId) {
+ if (empty($this->circularReferences[$parentId][$currentId])) {
+ $this->circularReferences[$parentId][$currentId] = $byConstructor;
+ }
+
+ $currentId = $parentId;
+ }
+ }
+
+ private function collectLineage($class, array &$lineage)
+ {
+ if (isset($lineage[$class])) {
+ return;
+ }
+ if (!$r = $this->container->getReflectionClass($class, false)) {
+ return;
+ }
+ if ($this->container instanceof $class) {
+ return;
+ }
+ $file = $r->getFileName();
+ if (') : eval()\'d code' === substr($file, -17)) {
+ $file = substr($file, 0, strrpos($file, '(', -17));
+ }
+ if (!$file || $this->doExport($file) === $exportedFile = $this->export($file)) {
+ return;
+ }
+
+ if ($parent = $r->getParentClass()) {
+ $this->collectLineage($parent->name, $lineage);
+ }
+
+ foreach ($r->getInterfaces() as $parent) {
+ $this->collectLineage($parent->name, $lineage);
+ }
+
+ foreach ($r->getTraits() as $parent) {
+ $this->collectLineage($parent->name, $lineage);
+ }
+
+ $lineage[$class] = substr($exportedFile, 1, -1);
+ }
+
+ private function generateProxyClasses()
+ {
+ $alreadyGenerated = [];
+ $definitions = $this->container->getDefinitions();
+ $strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments');
+ $proxyDumper = $this->getProxyDumper();
+ ksort($definitions);
+ foreach ($definitions as $definition) {
+ if (!$proxyDumper->isProxyCandidate($definition)) {
+ continue;
+ }
+ if (isset($alreadyGenerated[$class = $definition->getClass()])) {
+ continue;
+ }
+ $alreadyGenerated[$class] = true;
+ // register class' reflector for resource tracking
+ $this->container->getReflectionClass($class);
+ if ("\n" === $proxyCode = "\n".$proxyDumper->getProxyCode($definition)) {
+ continue;
+ }
+ if ($strip) {
+ $proxyCode = " $proxyCode;
+ }
+ }
+
+ /**
+ * Generates the require_once statement for service includes.
+ *
+ * @return string
+ */
+ 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())) {
+ $this->collectLineage($class, $lineage);
+ }
+ }
+
+ foreach ($this->serviceCalls as $id => list($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 ($this->inlinedDefinitions as $def) {
+ if ($file = $def->getFile()) {
+ $code .= sprintf(" include_once %s;\n", $this->dumpValue($file));
+ }
+ }
+
+ if ('' !== $code) {
+ $code .= "\n";
+ }
+
+ return $code;
+ }
+
+ /**
+ * Generates the service instance.
+ *
+ * @param string $id
+ * @param bool $isSimpleInstance
+ *
+ * @return string
+ *
+ * @throws InvalidArgumentException
+ * @throws RuntimeException
+ */
+ 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 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');
+ } elseif (!$isSimpleInstance) {
+ $instantiation = '$instance';
+ }
+
+ $return = '';
+ if ($isSimpleInstance) {
+ $return = 'return ';
+ } else {
+ $instantiation .= ' = ';
+ }
+
+ return $this->addNewInstance($definition, $return, $instantiation, $id);
+ }
+
+ /**
+ * Checks if the definition is a trivial instance.
+ *
+ * @return bool
+ */
+ private function isTrivialInstance(Definition $definition)
+ {
+ if ($definition->isSynthetic() || $definition->getFile() || $definition->getMethodCalls() || $definition->getProperties() || $definition->getConfigurator()) {
+ return false;
+ }
+ if ($definition->isDeprecated() || $definition->isLazy() || $definition->getFactory() || 3 < \count($definition->getArguments())) {
+ return false;
+ }
+
+ foreach ($definition->getArguments() as $arg) {
+ if (!$arg || $arg instanceof Parameter) {
+ continue;
+ }
+ if (\is_array($arg) && 3 >= \count($arg)) {
+ foreach ($arg as $k => $v) {
+ if ($this->dumpValue($k) !== $this->dumpValue($k, false)) {
+ return false;
+ }
+ if (!$v || $v instanceof Parameter) {
+ continue;
+ }
+ 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;
+ }
+ }
+ } 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;
+ }
+ }
+
+ return true;
+ }
+
+ /**
+ * Adds method calls to a service definition.
+ *
+ * @param string $variableName
+ *
+ * @return string
+ */
+ private function addServiceMethodCalls(Definition $definition, $variableName = 'instance')
+ {
+ $calls = '';
+ foreach ($definition->getMethodCalls() as $call) {
+ $arguments = [];
+ foreach ($call[1] as $value) {
+ $arguments[] = $this->dumpValue($value);
+ }
+
+ $calls .= $this->wrapServiceConditionals($call[1], sprintf(" \$%s->%s(%s);\n", $variableName, $call[0], implode(', ', $arguments)));
+ }
+
+ return $calls;
+ }
+
+ 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));
+ }
+
+ return $code;
+ }
+
+ /**
+ * Adds configurator definition.
+ *
+ * @param string $variableName
+ *
+ * @return string
+ */
+ private function addServiceConfigurator(Definition $definition, $variableName = 'instance')
+ {
+ if (!$callable = $definition->getConfigurator()) {
+ return '';
+ }
+
+ 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, '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(" %s(\$%s);\n", $callable, $variableName);
+ }
+
+ /**
+ * Adds a service.
+ *
+ * @param string $id
+ * @param string &$file
+ *
+ * @return string
+ */
+ private function addService($id, Definition $definition, &$file = null)
+ {
+ $this->definitionVariables = new \SplObjectStorage();
+ $this->referenceVariables = [];
+ $this->variableCount = 0;
+ $this->referenceVariables[$id] = new Variable('instance');
+
+ $return = [];
+
+ if ($class = $definition->getClass()) {
+ $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 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')) {
+ $return[] = '';
+ }
+
+ $return[] = sprintf('@deprecated %s', $definition->getDeprecationMessage($id));
+ }
+
+ $return = str_replace("\n * \n", "\n *\n", implode("\n * ", $return));
+ $return = $this->container->resolveEnvPlaceholders($return);
+
+ $shared = $definition->isShared() ? ' shared' : '';
+ $public = $definition->isPublic() ? 'public' : 'private';
+ $autowired = $definition->isAutowired() ? ' autowired' : '';
+
+ if ($definition->isLazy()) {
+ $lazyInitialization = '$lazyLoad = true';
+ } else {
+ $lazyInitialization = '';
+ }
+
+ $asFile = $this->asFiles && $definition->isShared() && !$this->isHotPath($definition);
+ $methodName = $this->generateMethodName($id);
+ if ($asFile) {
+ $file = $methodName.'.php';
+ $code = " // Returns the $public '$id'$shared$autowired service.\n\n";
+ } else {
+ $code = <<docStar}
+ * Gets the $public '$id'$shared$autowired service.
+ *
+ * $return
+EOF;
+ $code = str_replace('*/', ' ', $code).<<serviceCalls = [];
+ $this->inlinedDefinitions = $this->getDefinitionsFromArguments([$definition], null, $this->serviceCalls);
+
+ $code .= $this->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)));
+ }
+
+ if ($definition->isDeprecated()) {
+ $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)));
+ } else {
+ $code .= " }\n";
+ }
+
+ $this->definitionVariables = $this->inlinedDefinitions = null;
+ $this->referenceVariables = $this->serviceCalls = null;
+
+ return $code;
+ }
+
+ private function addInlineVariables($id, Definition $definition, array $arguments, $forConstructor)
+ {
+ $code = '';
+
+ foreach ($arguments as $argument) {
+ if (\is_array($argument)) {
+ $code .= $this->addInlineVariables($id, $definition, $argument, $forConstructor);
+ } elseif ($argument instanceof Reference) {
+ $code .= $this->addInlineReference($id, $definition, $this->container->normalizeId($argument), $forConstructor);
+ } elseif ($argument instanceof Definition) {
+ $code .= $this->addInlineService($id, $definition, $argument, $forConstructor);
+ }
+ }
+
+ return $code;
+ }
+
+ 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];
+
+ if ($id === $targetId) {
+ return $this->addInlineService($id, $definition, $definition);
+ }
+
+ if ('service_container' === $targetId || isset($this->referenceVariables[$targetId])) {
+ return '';
+ }
+
+ $hasSelfRef = isset($this->circularReferences[$id][$targetId]) && !isset($this->definitionVariables[$definition]);
+
+ if ($hasSelfRef && !$forConstructor && !$forConstructor = !$this->circularReferences[$id][$targetId]) {
+ $code = $this->addInlineService($id, $definition, $definition);
+ } else {
+ $code = '';
+ }
+
+ if (isset($this->referenceVariables[$targetId]) || (2 > $callCount && (!$hasSelfRef || !$forConstructor))) {
+ return $code;
+ }
+
+ $name = $this->getNextVariableName();
+ $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'
+
+ if (isset($this->%s[%s])) {
+ return $this->%1$s[%2$s];
+ }
+
+EOTXT
+ ,
+ 'services',
+ $this->doExport($id)
+ );
+
+ return $code;
+ }
+
+ 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)) {
+ if ($byConstructor && isset($this->circularReferences[$id][$targetId]) && !$this->circularReferences[$id][$targetId]) {
+ $code .= $this->addInlineReference($id, $definition, $targetId, $forConstructor);
+ }
+ }
+ }
+
+ if (isset($this->definitionVariables[$inlineDef = $inlineDef ?: $definition])) {
+ return $code;
+ }
+
+ $arguments = [$inlineDef->getArguments(), $inlineDef->getFactory()];
+
+ $code .= $this->addInlineVariables($id, $definition, $arguments, $forConstructor);
+
+ 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;
+ } else {
+ $name = $definition === $inlineDef ? 'instance' : $this->getNextVariableName();
+ $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)) {
+ $code .= "\n".$inline."\n";
+ } elseif ($arguments && 'instance' === $name) {
+ $code .= "\n";
+ }
+
+ $code .= $this->addServiceProperties($inlineDef, $name);
+ $code .= $this->addServiceMethodCalls($inlineDef, $name);
+ $code .= $this->addServiceConfigurator($inlineDef, $name);
+ }
+
+ if ($isRootInstance && !$isSimpleInstance) {
+ $code .= "\n return \$instance;\n";
+ }
+
+ return $code;
+ }
+
+ /**
+ * Adds multiple services.
+ *
+ * @return string
+ */
+ private function addServices()
+ {
+ $publicServices = $privateServices = '';
+ $definitions = $this->container->getDefinitions();
+ ksort($definitions);
+ foreach ($definitions as $id => $definition) {
+ if ($definition->isSynthetic() || ($this->asFiles && $definition->isShared() && !$this->isHotPath($definition))) {
+ continue;
+ }
+ if ($definition->isPublic()) {
+ $publicServices .= $this->addService($id, $definition);
+ } else {
+ $privateServices .= $this->addService($id, $definition);
+ }
+ }
+
+ return $publicServices.$privateServices;
+ }
+
+ private function generateServiceFiles()
+ {
+ $definitions = $this->container->getDefinitions();
+ ksort($definitions);
+ foreach ($definitions as $id => $definition) {
+ if (!$definition->isSynthetic() && $definition->isShared() && !$this->isHotPath($definition)) {
+ $code = $this->addService($id, $definition, $file);
+ yield $file => $code;
+ }
+ }
+ }
+
+ private function addNewInstance(Definition $definition, $return, $instantiation, $id)
+ {
+ $class = $this->dumpValue($definition->getClass());
+ $return = ' '.$return.$instantiation;
+
+ $arguments = [];
+ foreach ($definition->getArguments() as $value) {
+ $arguments[] = $this->dumpValue($value);
+ }
+
+ 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 RuntimeException(sprintf('Cannot dump definition because of invalid factory method (%s).', $callable[1] ?: 'n/a'));
+ }
+
+ 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 ("''" === $class) {
+ 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) : '');
+ }
+
+ 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("%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));
+ }
+
+ return $return.sprintf("new %s(%s);\n", $this->dumpLiteralClass($class), implode(', ', $arguments));
+ }
+
+ /**
+ * Adds the class headers.
+ *
+ * @param string $class Class name
+ * @param string $baseClass The name of the base class
+ * @param string $baseClassWithNamespace Fully qualified base class name
+ *
+ * @return string
+ */
+ private function startClass($class, $baseClass, $baseClassWithNamespace)
+ {
+ $bagClass = $this->container->isCompiled() ? 'use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;' : 'use Symfony\Component\DependencyInjection\ParameterBag\\ParameterBag;';
+ $namespaceLine = !$this->asFiles && $this->namespace ? "\nnamespace {$this->namespace};\n" : '';
+
+ $code = <<docStar}
+ * This class has been auto-generated
+ * by the Symfony Dependency Injection Component.
+ *
+ * @final since Symfony 3.3
+ */
+class $class extends $baseClass
+{
+ private \$parameters = [];
+ private \$targetDirs = [];
+
+ public function __construct()
+ {
+
+EOF;
+ if (null !== $this->targetDirRegex) {
+ $dir = $this->asFiles ? '$this->targetDirs[0] = \\dirname($containerDir)' : '__DIR__';
+ $code .= <<targetDirMaxMatches}; ++\$i) {
+ \$this->targetDirs[\$i] = \$dir = \\dirname(\$dir);
+ }
+
+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 .= " \$this->buildParameters = \$buildParameters;\n";
+ $code .= " \$this->containerDir = \$containerDir;\n";
+ }
+
+ if ($this->container->isCompiled()) {
+ 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";
+ }
+ }
+
+ if ($this->container->getParameterBag()->all()) {
+ $code .= " \$this->parameters = \$this->getDefaultParameters();\n\n";
+ }
+
+ $code .= " \$this->services = [];\n";
+ } else {
+ $arguments = $this->container->getParameterBag()->all() ? 'new ParameterBag($this->getDefaultParameters())' : null;
+ $code .= " parent::__construct($arguments);\n";
+ }
+
+ $code .= $this->addNormalizedIds();
+ $code .= $this->addSyntheticIds();
+ $code .= $this->addMethodMap();
+ $code .= $this->asFiles ? $this->addFileMap() : '';
+ $code .= $this->addPrivateServices();
+ $code .= $this->addAliases();
+ $code .= $this->addInlineRequires();
+ $code .= <<<'EOF'
+ }
+
+EOF;
+ $code .= $this->addRemovedIds();
+
+ if ($this->container->isCompiled()) {
+ $code .= <<asFiles) {
+ $code .= <<containerDir.\\DIRECTORY_SEPARATOR.\$file;
+ }
+
+EOF;
+ }
+
+ $proxyDumper = $this->getProxyDumper();
+ foreach ($this->container->getDefinitions() as $definition) {
+ if (!$proxyDumper->isProxyCandidate($definition)) {
+ continue;
+ }
+ if ($this->asFiles) {
+ $proxyLoader = '$this->load("{$class}.php")';
+ } elseif ($this->namespace) {
+ $proxyLoader = 'class_alias("'.$this->namespace.'\\\\{$class}", $class, false)';
+ } else {
+ $proxyLoader = '';
+ }
+ if ($proxyLoader) {
+ $proxyLoader = "class_exists(\$class, false) || {$proxyLoader};\n\n ";
+ }
+ $code .= <<container->getNormalizedIds();
+ ksort($normalizedIds);
+ foreach ($normalizedIds as $id => $normalizedId) {
+ if ($this->container->has($normalizedId)) {
+ $code .= ' '.$this->doExport($id).' => '.$this->doExport($normalizedId).",\n";
+ }
+ }
+
+ return $code ? " \$this->normalizedIds = [\n".$code." ];\n" : '';
+ }
+
+ /**
+ * Adds the syntheticIds definition.
+ *
+ * @return string
+ */
+ private function addSyntheticIds()
+ {
+ $code = '';
+ $definitions = $this->container->getDefinitions();
+ ksort($definitions);
+ foreach ($definitions as $id => $definition) {
+ if ($definition->isSynthetic() && 'service_container' !== $id) {
+ $code .= ' '.$this->doExport($id)." => true,\n";
+ }
+ }
+
+ return $code ? " \$this->syntheticIds = [\n{$code} ];\n" : '';
+ }
+
+ /**
+ * Adds the removedIds definition.
+ *
+ * @return string
+ */
+ private function addRemovedIds()
+ {
+ if (!$ids = $this->container->getRemovedIds()) {
+ return '';
+ }
+ if ($this->asFiles) {
+ $code = "require \$this->containerDir.\\DIRECTORY_SEPARATOR.'removed-ids.php'";
+ } else {
+ $code = '';
+ $ids = array_keys($ids);
+ sort($ids);
+ foreach ($ids as $id) {
+ if (preg_match('/^\d+_[^~]++~[._a-zA-Z\d]{7}$/', $id)) {
+ continue;
+ }
+ $code .= ' '.$this->doExport($id)." => true,\n";
+ }
+
+ $code = "[\n{$code} ]";
+ }
+
+ return <<container->getDefinitions();
+ 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";
+ }
+ }
+
+ return $code ? " \$this->methodMap = [\n{$code} ];\n" : '';
+ }
+
+ /**
+ * Adds the fileMap property definition.
+ *
+ * @return string
+ */
+ private function addFileMap()
+ {
+ $code = '';
+ $definitions = $this->container->getDefinitions();
+ 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));
+ }
+ }
+
+ return $code ? " \$this->fileMap = [\n{$code} ];\n" : '';
+ }
+
+ /**
+ * Adds the privates property definition.
+ *
+ * @return string
+ */
+ private function addPrivateServices()
+ {
+ $code = '';
+
+ $aliases = $this->container->getAliases();
+ ksort($aliases);
+ foreach ($aliases as $id => $alias) {
+ if ($alias->isPrivate()) {
+ $code .= ' '.$this->doExport($id)." => true,\n";
+ }
+ }
+
+ $definitions = $this->container->getDefinitions();
+ ksort($definitions);
+ foreach ($definitions as $id => $definition) {
+ if (!$definition->isPublic()) {
+ $code .= ' '.$this->doExport($id)." => true,\n";
+ }
+ }
+
+ if (empty($code)) {
+ return '';
+ }
+
+ $out = " \$this->privates = [\n";
+ $out .= $code;
+ $out .= " ];\n";
+
+ return $out;
+ }
+
+ /**
+ * Adds the aliases property definition.
+ *
+ * @return string
+ */
+ private function addAliases()
+ {
+ if (!$aliases = $this->container->getAliases()) {
+ return $this->container->isCompiled() ? "\n \$this->aliases = [];\n" : '';
+ }
+
+ $code = " \$this->aliases = [\n";
+ ksort($aliases);
+ foreach ($aliases as $alias => $id) {
+ $id = $this->container->normalizeId($id);
+ while (isset($aliases[$id])) {
+ $id = $this->container->normalizeId($aliases[$id]);
+ }
+ $code .= ' '.$this->doExport($alias).' => '.$this->doExport($id).",\n";
+ }
+
+ return $code." ];\n";
+ }
+
+ private function addInlineRequires()
+ {
+ if (!$this->hotPathTag || !$this->inlineRequires) {
+ return '';
+ }
+
+ $lineage = [];
+
+ foreach ($this->container->findTaggedServiceIds($this->hotPathTag) as $id => $tags) {
+ $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())) {
+ $this->collectLineage($class, $lineage);
+ }
+ }
+ }
+
+ $code = '';
+
+ foreach ($lineage as $file) {
+ if (!isset($this->inlinedRequires[$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) : '';
+ }
+
+ /**
+ * Adds default parameters method.
+ *
+ * @return string
+ */
+ private function addDefaultParametersMethod()
+ {
+ if (!$this->container->getParameterBag()->all()) {
+ return '';
+ }
+
+ $php = [];
+ $dynamicPhp = [];
+ $normalizedParams = [];
+
+ foreach ($this->container->getParameterBag()->all() as $key => $value) {
+ if ($key !== $resolvedKey = $this->container->resolveEnvPlaceholders($key)) {
+ 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));
+ }
+ $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]);
+ } else {
+ $php[] = sprintf('%s%s => %s,', $export[0], $this->export($key), $export[1]);
+ }
+ }
+
+ $parameters = sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', 8));
+
+ $code = '';
+ if ($this->container->isCompiled()) {
+ $code .= <<<'EOF'
+
+ public function getParameter($name)
+ {
+ $name = (string) $name;
+ if (isset($this->buildParameters[$name])) {
+ return $this->buildParameters[$name];
+ }
+ 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 InvalidArgumentException(sprintf('The parameter "%s" must be defined.', $name));
+ }
+ }
+ if (isset($this->loadedDynamicParameters[$name])) {
+ return $this->loadedDynamicParameters[$name] ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
+ }
+
+ return $this->parameters[$name];
+ }
+
+ public function hasParameter($name)
+ {
+ $name = (string) $name;
+ if (isset($this->buildParameters[$name])) {
+ return true;
+ }
+ $name = $this->normalizeParameterName($name);
+
+ return isset($this->parameters[$name]) || isset($this->loadedDynamicParameters[$name]) || array_key_exists($name, $this->parameters);
+ }
+
+ public function setParameter($name, $value)
+ {
+ throw new LogicException('Impossible to call set() on a frozen ParameterBag.');
+ }
+
+ public function getParameterBag()
+ {
+ if (null === $this->parameterBag) {
+ $parameters = $this->parameters;
+ foreach ($this->loadedDynamicParameters as $name => $loaded) {
+ $parameters[$name] = $loaded ? $this->dynamicParameters[$name] : $this->getDynamicParameter($name);
+ }
+ foreach ($this->buildParameters as $name => $value) {
+ $parameters[$name] = $value;
+ }
+ $this->parameterBag = new FrozenParameterBag($parameters);
+ }
+
+ return $this->parameterBag;
+ }
+
+EOF;
+ if (!$this->asFiles) {
+ $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);
+ $getDynamicParameter = <<<'EOF'
+ switch ($name) {
+%s
+ default: throw new InvalidArgumentException(sprintf('The dynamic parameter "%%s" must be defined.', $name));
+ }
+ $this->loadedDynamicParameters[$name] = true;
+
+ return $this->dynamicParameters[$name] = $value;
+EOF;
+ $getDynamicParameter = sprintf($getDynamicParameter, implode("\n", $dynamicPhp));
+ } else {
+ $loadedDynamicParameters = '[]';
+ $getDynamicParameter = str_repeat(' ', 8).'throw new InvalidArgumentException(sprintf(\'The dynamic parameter "%s" must be defined.\', $name));';
+ }
+
+ $code .= <<docStar}
+ * Computes a dynamic parameter.
+ *
+ * @param string \$name The name of the dynamic parameter to load
+ *
+ * @return mixed The value of the dynamic parameter
+ *
+ * @throws InvalidArgumentException When the dynamic parameter does not exist
+ */
+ private function getDynamicParameter(\$name)
+ {
+{$getDynamicParameter}
+ }
+
+
+EOF;
+
+ $code .= ' private $normalizedParameterNames = '.($normalizedParams ? sprintf("[\n%s\n ];", implode("\n", $normalizedParams)) : '[];')."\n";
+ $code .= <<<'EOF'
+
+ private function normalizeParameterName($name)
+ {
+ 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);
+ }
+ } else {
+ $normalizedName = $this->normalizedParameterNames[$normalizedName] = (string) $name;
+ }
+
+ return $normalizedName;
+ }
+
+EOF;
+ } elseif ($dynamicPhp) {
+ throw new RuntimeException('You cannot dump a not-frozen container with dynamic parameters.');
+ }
+
+ $code .= <<docStar}
+ * Gets the default parameters.
+ *
+ * @return array An array of the default parameters
+ */
+ protected function getDefaultParameters()
+ {
+ return $parameters;
+ }
+
+EOF;
+
+ return $code;
+ }
+
+ /**
+ * Exports parameters.
+ *
+ * @param string $path
+ * @param int $indent
+ *
+ * @return string
+ *
+ * @throws InvalidArgumentException
+ */
+ private function exportParameters(array $parameters, $path = '', $indent = 12)
+ {
+ $php = [];
+ foreach ($parameters as $key => $value) {
+ if (\is_array($value)) {
+ $value = $this->exportParameters($value, $path.'/'.$key, $indent + 4);
+ } 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);
+ }
+
+ return sprintf("[\n%s\n%s]", implode("\n", $php), str_repeat(' ', $indent - 4));
+ }
+
+ /**
+ * Ends the class definition.
+ *
+ * @return string
+ */
+ private function endClass()
+ {
+ return <<<'EOF'
+}
+
+EOF;
+ }
+
+ /**
+ * Wraps the service conditionals.
+ *
+ * @param string $value
+ * @param string $code
+ *
+ * @return string
+ */
+ private function wrapServiceConditionals($value, $code)
+ {
+ if (!$condition = $this->getServiceConditionals($value)) {
+ return $code;
+ }
+
+ // re-indent the wrapped code
+ $code = implode("\n", array_map(function ($line) { return $line ? ' '.$line : $line; }, explode("\n", $code)));
+
+ return sprintf(" if (%s) {\n%s }\n", $condition, $code);
+ }
+
+ /**
+ * Get the conditions to execute for conditional services.
+ *
+ * @param string $value
+ *
+ * @return string|null
+ */
+ private function getServiceConditionals($value)
+ {
+ $conditions = [];
+ foreach (ContainerBuilder::getInitializedConditionals($value) as $service) {
+ if (!$this->container->hasDefinition($service)) {
+ return 'false';
+ }
+ $conditions[] = sprintf('isset($this->services[%s])', $this->doExport($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));
+ }
+
+ if (!$conditions) {
+ return '';
+ }
+
+ return implode(' && ', $conditions);
+ }
+
+ private function getDefinitionsFromArguments(array $arguments, \SplObjectStorage $definitions = null, array &$calls = [], $byConstructor = null)
+ {
+ if (null === $definitions) {
+ $definitions = new \SplObjectStorage();
+ }
+
+ foreach ($arguments as $argument) {
+ if (\is_array($argument)) {
+ $this->getDefinitionsFromArguments($argument, $definitions, $calls, $byConstructor);
+ } elseif ($argument instanceof Reference) {
+ $id = $this->container->normalizeId($argument);
+
+ while ($this->container->hasAlias($id)) {
+ $id = (string) $this->container->getAlias($id);
+ }
+
+ if (!isset($calls[$id])) {
+ $calls[$id] = [0, $argument->getInvalidBehavior(), $byConstructor];
+ } else {
+ $calls[$id][1] = min($calls[$id][1], $argument->getInvalidBehavior());
+ }
+
+ ++$calls[$id][0];
+ } elseif (!$argument instanceof Definition) {
+ // no-op
+ } elseif (isset($definitions[$argument])) {
+ $definitions[$argument] = 1 + $definitions[$argument];
+ } else {
+ $definitions[$argument] = 1;
+ $arguments = [$argument->getArguments(), $argument->getFactory()];
+ $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null === $byConstructor || $byConstructor);
+ $arguments = [$argument->getProperties(), $argument->getMethodCalls(), $argument->getConfigurator()];
+ $this->getDefinitionsFromArguments($arguments, $definitions, $calls, null !== $byConstructor && $byConstructor);
+ }
+ }
+
+ return $definitions;
+ }
+
+ /**
+ * Dumps values.
+ *
+ * @param mixed $value
+ * @param bool $interpolate
+ *
+ * @return string
+ *
+ * @throws RuntimeException
+ */
+ private function dumpValue($value, $interpolate = 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));
+ }
+
+ return sprintf('[%s]', implode(', ', $code));
+ } elseif ($value instanceof ArgumentInterface) {
+ $scope = [$this->definitionVariables, $this->referenceVariables];
+ $this->definitionVariables = $this->referenceVariables = null;
+
+ try {
+ if ($value instanceof ServiceClosureArgument) {
+ $value = $value->getValues()[0];
+ $code = $this->dumpValue($value, $interpolate);
+
+ 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);
+ }
+
+ return sprintf("function () {\n %s\n }", $code);
+ }
+
+ if ($value instanceof IteratorArgument) {
+ $operands = [0];
+ $code = [];
+ $code[] = 'new RewindableGenerator(function () {';
+
+ if (!$values = $value->getValues()) {
+ $code[] = ' return new \EmptyIterator();';
+ } else {
+ $countCode = [];
+ $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) {
+ if ($v) {
+ $code[] = ' '.$v;
+ }
+ }
+ }
+
+ $countCode[] = sprintf(' return %s;', implode(' + ', $operands));
+ $countCode[] = ' }';
+ }
+
+ $code[] = sprintf(' }, %s)', \count($operands) > 1 ? implode("\n", $countCode) : $operands[0]);
+
+ return implode("\n", $code);
+ }
+ } finally {
+ list($this->definitionVariables, $this->referenceVariables) = $scope;
+ }
+ } elseif ($value instanceof Definition) {
+ if (null !== $this->definitionVariables && $this->definitionVariables->contains($value)) {
+ return $this->dumpValue($this->definitionVariables[$value], $interpolate);
+ }
+ if ($value->getMethodCalls()) {
+ throw new RuntimeException('Cannot dump definitions which have method calls.');
+ }
+ if ($value->getProperties()) {
+ throw new RuntimeException('Cannot dump definitions which have properties.');
+ }
+ if (null !== $value->getConfigurator()) {
+ throw new RuntimeException('Cannot dump definitions which have a configurator.');
+ }
+
+ $arguments = [];
+ foreach ($value->getArguments() as $argument) {
+ $arguments[] = $this->dumpValue($argument);
+ }
+
+ if (null !== $value->getFactory()) {
+ $factory = $value->getFactory();
+
+ 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 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 ($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) : '');
+ }
+
+ if ($factory[0] instanceof Reference) {
+ return sprintf('%s->%s(%s)', $class, $factory[1], implode(', ', $arguments));
+ }
+ }
+
+ throw new RuntimeException('Cannot dump definition because of invalid factory.');
+ }
+
+ $class = $value->getClass();
+ if (null === $class) {
+ 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 Variable) {
+ return '$'.$value;
+ } elseif ($value instanceof Reference) {
+ $id = $this->container->normalizeId($value);
+
+ while ($this->container->hasAlias($id)) {
+ $id = (string) $this->container->getAlias($id);
+ }
+
+ if (null !== $this->referenceVariables && isset($this->referenceVariables[$id])) {
+ return $this->dumpValue($this->referenceVariables[$id], $interpolate);
+ }
+
+ return $this->getServiceCall($id, $value);
+ } elseif ($value instanceof Expression) {
+ return $this->getExpressionLanguage()->compile((string) $value, ['this' => 'container']);
+ } elseif ($value instanceof Parameter) {
+ return $this->dumpParameter($value);
+ } 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]);
+ } else {
+ $replaceParameters = function ($match) {
+ return "'.".$this->dumpParameter($match[2]).".'";
+ };
+
+ $code = str_replace('%%', '%', preg_replace_callback('/(?export($value)));
+
+ return $code;
+ }
+ } 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);
+ }
+
+ /**
+ * Dumps a string to a literal (aka PHP Code) class value.
+ *
+ * @param string $class
+ *
+ * @return string
+ *
+ * @throws RuntimeException
+ */
+ private function dumpLiteralClass($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 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;
+ }
+
+ /**
+ * Dumps a parameter.
+ *
+ * @param string $name
+ *
+ * @return string
+ */
+ 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)) {
+ return $dumpedValue;
+ }
+
+ 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));
+ }
+
+ /**
+ * Gets a service call.
+ *
+ * @param string $id
+ * @param Reference $reference
+ *
+ * @return string
+ */
+ private function getServiceCall($id, Reference $reference = null)
+ {
+ while ($this->container->hasAlias($id)) {
+ $id = (string) $this->container->getAlias($id);
+ }
+ $id = $this->container->normalizeId($id);
+
+ if ('service_container' === $id) {
+ return '$this';
+ }
+
+ 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 && 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);
+ if ($definition->isShared()) {
+ $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));
+ } else {
+ $code = sprintf('$this->%s()', $this->generateMethodName($id));
+ }
+ } elseif (null !== $reference && ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $reference->getInvalidBehavior()) {
+ return 'null';
+ } 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));
+ }
+
+ // 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);
+ }
+
+ /**
+ * Initializes the method names map to avoid conflicts with the Container methods.
+ *
+ * @param string $class the container base class
+ */
+ private function initializeMethodNamesMap($class)
+ {
+ $this->serviceIdToMethodNameMap = [];
+ $this->usedMethodNames = [];
+
+ if ($reflectionClass = $this->container->getReflectionClass($class)) {
+ foreach ($reflectionClass->getMethods() as $method) {
+ $this->usedMethodNames[strtolower($method->getName())] = true;
+ }
+ }
+ }
+
+ /**
+ * Convert a service id to a valid PHP method name.
+ *
+ * @param string $id
+ *
+ * @return string
+ *
+ * @throws InvalidArgumentException
+ */
+ private function generateMethodName($id)
+ {
+ if (isset($this->serviceIdToMethodNameMap[$id])) {
+ return $this->serviceIdToMethodNameMap[$id];
+ }
+
+ $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)])) {
+ ++$suffix;
+ $methodName = 'get'.$name.$suffix.'Service';
+ }
+
+ $this->serviceIdToMethodNameMap[$id] = $methodName;
+ $this->usedMethodNames[strtolower($methodName)] = true;
+
+ return $methodName;
+ }
+
+ /**
+ * Returns the next name to use.
+ *
+ * @return string
+ */
+ private function getNextVariableName()
+ {
+ $firstChars = self::FIRST_CHARS;
+ $firstCharsLength = \strlen($firstChars);
+ $nonFirstChars = self::NON_FIRST_CHARS;
+ $nonFirstCharsLength = \strlen($nonFirstChars);
+
+ while (true) {
+ $name = '';
+ $i = $this->variableCount;
+
+ if ('' === $name) {
+ $name .= $firstChars[$i % $firstCharsLength];
+ $i = (int) ($i / $firstCharsLength);
+ }
+
+ while ($i > 0) {
+ --$i;
+ $name .= $nonFirstChars[$i % $nonFirstCharsLength];
+ $i = (int) ($i / $nonFirstCharsLength);
+ }
+
+ ++$this->variableCount;
+
+ // check that the name is not reserved
+ if (\in_array($name, $this->reservedVariables, true)) {
+ continue;
+ }
+
+ return $name;
+ }
+ }
+
+ private function getExpressionLanguage()
+ {
+ if (null === $this->expressionLanguage) {
+ if (!class_exists('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 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);
+ });
+
+ if ($this->container->isTrackingResources()) {
+ foreach ($providers as $provider) {
+ $this->container->addObjectResource($provider);
+ }
+ }
+ }
+
+ return $this->expressionLanguage;
+ }
+
+ 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)) {
+ $suffix = $matches[0][1] + \strlen($matches[0][0]);
+ $matches[0][1] += \strlen($matches[1][0]);
+ $prefix = $matches[0][1] ? $this->doExport(substr($value, 0, $matches[0][1]), true).'.' : '';
+ $suffix = isset($value[$suffix]) ? '.'.$this->doExport(substr($value, $suffix), true) : '';
+ $dirname = $this->asFiles ? '$this->containerDir' : '__DIR__';
+ $offset = 2 + $this->targetDirMaxMatches - \count($matches);
+
+ if ($this->asFiles || 0 < $offset) {
+ $dirname = sprintf('$this->targetDirs[%d]', $offset);
+ }
+
+ if ($prefix || $suffix) {
+ return sprintf('(%s%s%s)', $prefix, $dirname, $suffix);
+ }
+
+ return $dirname;
+ }
+
+ return $this->doExport($value, true);
+ }
+
+ 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); }, $cleanParts);
+ $export = implode('."\n".', $cleanParts);
+ } else {
+ $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 ("'" === $export[1]) {
+ $export = substr_replace($export, '', 18, 7);
+ }
+ }
+ if ("'" === $export[1]) {
+ $export = substr($export, 3);
+ }
+ }
+
+ return $export;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/XmlDumper.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
new file mode 100644
index 00000000..eff421ec
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/XmlDumper.php
@@ -0,0 +1,366 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Dumper;
+
+use Symfony\Component\DependencyInjection\Alias;
+use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Parameter;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\ExpressionLanguage\Expression;
+
+/**
+ * XmlDumper dumps a service container as an XML string.
+ *
+ * @author Fabien Potencier
+ * @author Martin Hasoň
+ */
+class XmlDumper extends Dumper
+{
+ /**
+ * @var \DOMDocument
+ */
+ private $document;
+
+ /**
+ * Dumps the service container as an XML string.
+ *
+ * @return string An xml string representing of the service container
+ */
+ public function dump(array $options = [])
+ {
+ $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');
+
+ $this->addParameters($container);
+ $this->addServices($container);
+
+ $this->document->appendChild($container);
+ $xml = $this->document->saveXML();
+ $this->document = null;
+
+ return $this->container->resolveEnvPlaceholders($xml);
+ }
+
+ private function addParameters(\DOMElement $parent)
+ {
+ $data = $this->container->getParameterBag()->all();
+ if (!$data) {
+ return;
+ }
+
+ if ($this->container->isCompiled()) {
+ $data = $this->escape($data);
+ }
+
+ $parameters = $this->document->createElement('parameters');
+ $parent->appendChild($parameters);
+ $this->convertParameters($data, 'parameter', $parameters);
+ }
+
+ 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])) {
+ $this->convertParameters($methodcall[1], 'argument', $call);
+ }
+ $parent->appendChild($call);
+ }
+ }
+
+ /**
+ * Adds a service.
+ *
+ * @param Definition $definition
+ * @param string $id
+ */
+ 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);
+ }
+
+ $service->setAttribute('class', $class);
+ }
+ if (!$definition->isShared()) {
+ $service->setAttribute('shared', 'false');
+ }
+ if (!$definition->isPrivate()) {
+ $service->setAttribute('public', $definition->isPublic() ? 'true' : 'false');
+ }
+ if ($definition->isSynthetic()) {
+ $service->setAttribute('synthetic', 'true');
+ }
+ if ($definition->isLazy()) {
+ $service->setAttribute('lazy', 'true');
+ }
+ if (null !== $decorated = $definition->getDecoratedService()) {
+ list($decorated, $renamedId, $priority) = $decorated;
+ $service->setAttribute('decorates', $decorated);
+ if (null !== $renamedId) {
+ $service->setAttribute('decoration-inner-name', $renamedId);
+ }
+ if (0 !== $priority) {
+ $service->setAttribute('decoration-priority', $priority);
+ }
+ }
+
+ foreach ($definition->getTags() as $name => $tags) {
+ foreach ($tags as $attributes) {
+ $tag = $this->document->createElement('tag');
+ $tag->setAttribute('name', $name);
+ foreach ($attributes as $key => $value) {
+ $tag->setAttribute($key, $value);
+ }
+ $service->appendChild($tag);
+ }
+ }
+
+ if ($definition->getFile()) {
+ $file = $this->document->createElement('file');
+ $file->appendChild($this->document->createTextNode($definition->getFile()));
+ $service->appendChild($file);
+ }
+
+ if ($parameters = $definition->getArguments()) {
+ $this->convertParameters($parameters, 'argument', $service);
+ }
+
+ if ($parameters = $definition->getProperties()) {
+ $this->convertParameters($parameters, 'property', $service, 'name');
+ }
+
+ $this->addMethodCalls($definition->getMethodCalls(), $service);
+
+ if ($callable = $definition->getFactory()) {
+ $factory = $this->document->createElement('factory');
+
+ if (\is_array($callable) && $callable[0] instanceof Definition) {
+ $this->addService($callable[0], null, $factory);
+ $factory->setAttribute('method', $callable[1]);
+ } elseif (\is_array($callable)) {
+ if (null !== $callable[0]) {
+ $factory->setAttribute($callable[0] instanceof Reference ? 'service' : 'class', $callable[0]);
+ }
+ $factory->setAttribute('method', $callable[1]);
+ } else {
+ $factory->setAttribute('function', $callable);
+ }
+ $service->appendChild($factory);
+ }
+
+ if ($definition->isDeprecated()) {
+ $deprecated = $this->document->createElement('deprecated');
+ $deprecated->appendChild($this->document->createTextNode($definition->getDeprecationMessage('%service_id%')));
+
+ $service->appendChild($deprecated);
+ }
+
+ if ($definition->isAutowired()) {
+ $service->setAttribute('autowire', 'true');
+ }
+
+ foreach ($definition->getAutowiringTypes(false) as $autowiringTypeValue) {
+ $autowiringType = $this->document->createElement('autowiring-type');
+ $autowiringType->appendChild($this->document->createTextNode($autowiringTypeValue));
+
+ $service->appendChild($autowiringType);
+ }
+
+ if ($definition->isAutoconfigured()) {
+ $service->setAttribute('autoconfigure', 'true');
+ }
+
+ if ($definition->isAbstract()) {
+ $service->setAttribute('abstract', 'true');
+ }
+
+ if ($callable = $definition->getConfigurator()) {
+ $configurator = $this->document->createElement('configurator');
+
+ 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 Reference ? 'service' : 'class', $callable[0]);
+ $configurator->setAttribute('method', $callable[1]);
+ } else {
+ $configurator->setAttribute('function', $callable);
+ }
+ $service->appendChild($configurator);
+ }
+
+ $parent->appendChild($service);
+ }
+
+ /**
+ * Adds a service alias.
+ *
+ * @param string $alias
+ */
+ private function addServiceAlias($alias, Alias $id, \DOMElement $parent)
+ {
+ $service = $this->document->createElement('service');
+ $service->setAttribute('id', $alias);
+ $service->setAttribute('alias', $id);
+ if (!$id->isPrivate()) {
+ $service->setAttribute('public', $id->isPublic() ? 'true' : 'false');
+ }
+ $parent->appendChild($service);
+ }
+
+ private function addServices(\DOMElement $parent)
+ {
+ $definitions = $this->container->getDefinitions();
+ if (!$definitions) {
+ return;
+ }
+
+ $services = $this->document->createElement('services');
+ foreach ($definitions as $id => $definition) {
+ $this->addService($definition, $id, $services);
+ }
+
+ $aliases = $this->container->getAliases();
+ foreach ($aliases as $alias => $id) {
+ while (isset($aliases[(string) $id])) {
+ $id = $aliases[(string) $id];
+ }
+ $this->addServiceAlias($alias, $id, $services);
+ }
+ $parent->appendChild($services);
+ }
+
+ /**
+ * Converts parameters.
+ *
+ * @param string $type
+ * @param string $keyAttribute
+ */
+ private function convertParameters(array $parameters, $type, \DOMElement $parent, $keyAttribute = 'key')
+ {
+ $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 ServiceClosureArgument) {
+ $value = $value->getValues()[0];
+ }
+ if (\is_array($value)) {
+ $element->setAttribute('type', 'collection');
+ $this->convertParameters($value, $type, $element, 'key');
+ } elseif ($value instanceof TaggedIteratorArgument) {
+ $element->setAttribute('type', 'tagged');
+ $element->setAttribute('tag', $value->getTag());
+ } elseif ($value instanceof IteratorArgument) {
+ $element->setAttribute('type', 'iterator');
+ $this->convertParameters($value->getValues(), $type, $element, 'key');
+ } elseif ($value instanceof Reference) {
+ $element->setAttribute('type', 'service');
+ $element->setAttribute('id', (string) $value);
+ $behavior = $value->getInvalidBehavior();
+ if (ContainerInterface::NULL_ON_INVALID_REFERENCE == $behavior) {
+ $element->setAttribute('on-invalid', 'null');
+ } elseif (ContainerInterface::IGNORE_ON_INVALID_REFERENCE == $behavior) {
+ $element->setAttribute('on-invalid', 'ignore');
+ } elseif (ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE == $behavior) {
+ $element->setAttribute('on-invalid', 'ignore_uninitialized');
+ }
+ } elseif ($value instanceof Definition) {
+ $element->setAttribute('type', 'service');
+ $this->addService($value, null, $element);
+ } 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)) {
+ $element->setAttribute('type', 'string');
+ }
+
+ 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));
+ $element->appendChild($text);
+ }
+ $parent->appendChild($element);
+ }
+ }
+
+ /**
+ * Escapes arguments.
+ *
+ * @return array
+ */
+ private function escape(array $arguments)
+ {
+ $args = [];
+ foreach ($arguments as $k => $v) {
+ if (\is_array($v)) {
+ $args[$k] = $this->escape($v);
+ } elseif (\is_string($v)) {
+ $args[$k] = str_replace('%', '%%', $v);
+ } else {
+ $args[$k] = $v;
+ }
+ }
+
+ return $args;
+ }
+
+ /**
+ * Converts php types to xml types.
+ *
+ * @param mixed $value Value to convert
+ *
+ * @return string
+ *
+ * @throws RuntimeException When trying to dump object or resource
+ */
+ public static function phpToXml($value)
+ {
+ switch (true) {
+ case null === $value:
+ return 'null';
+ case true === $value:
+ return 'true';
+ case false === $value:
+ return 'false';
+ case $value instanceof Parameter:
+ return '%'.$value.'%';
+ 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/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/YamlDumper.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
new file mode 100644
index 00000000..1e795c7d
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Dumper/YamlDumper.php
@@ -0,0 +1,376 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Dumper;
+
+use Symfony\Component\DependencyInjection\Alias;
+use Symfony\Component\DependencyInjection\Argument\ArgumentInterface;
+use Symfony\Component\DependencyInjection\Argument\IteratorArgument;
+use Symfony\Component\DependencyInjection\Argument\ServiceClosureArgument;
+use Symfony\Component\DependencyInjection\Argument\TaggedIteratorArgument;
+use Symfony\Component\DependencyInjection\ContainerInterface;
+use Symfony\Component\DependencyInjection\Definition;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+use Symfony\Component\DependencyInjection\Parameter;
+use Symfony\Component\DependencyInjection\Reference;
+use Symfony\Component\ExpressionLanguage\Expression;
+use Symfony\Component\Yaml\Dumper as YmlDumper;
+use Symfony\Component\Yaml\Parser;
+use Symfony\Component\Yaml\Tag\TaggedValue;
+use Symfony\Component\Yaml\Yaml;
+
+/**
+ * YamlDumper dumps a service container as a YAML string.
+ *
+ * @author Fabien Potencier
+ */
+class YamlDumper extends Dumper
+{
+ private $dumper;
+
+ /**
+ * Dumps the service container as an YAML string.
+ *
+ * @return string A YAML string representing of the service container
+ */
+ public function dump(array $options = [])
+ {
+ if (!class_exists('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 YmlDumper();
+ }
+
+ return $this->container->resolveEnvPlaceholders($this->addParameters()."\n".$this->addServices());
+ }
+
+ /**
+ * Adds a service.
+ *
+ * @param string $id
+ *
+ * @return string
+ */
+ private function addService($id, Definition $definition)
+ {
+ $code = " $id:\n";
+ if ($class = $definition->getClass()) {
+ if ('\\' === substr($class, 0, 1)) {
+ $class = substr($class, 1);
+ }
+
+ $code .= sprintf(" class: %s\n", $this->dumper->dump($class));
+ }
+
+ if (!$definition->isPrivate()) {
+ $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 = $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()));
+ }
+
+ if ($definition->isSynthetic()) {
+ $code .= " synthetic: true\n";
+ }
+
+ if ($definition->isDeprecated()) {
+ $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));
+ }
+ if ($autowiringTypesCode) {
+ $code .= sprintf(" autowiring_types:\n%s", $autowiringTypesCode);
+ }
+
+ if ($definition->isAutoconfigured()) {
+ $code .= " autoconfigure: true\n";
+ }
+
+ if ($definition->isAbstract()) {
+ $code .= " abstract: true\n";
+ }
+
+ if ($definition->isLazy()) {
+ $code .= " lazy: true\n";
+ }
+
+ if ($definition->getArguments()) {
+ $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));
+ }
+
+ if ($definition->getMethodCalls()) {
+ $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);
+ if (null !== $renamedId) {
+ $code .= sprintf(" decoration_inner_name: %s\n", $renamedId);
+ }
+ if (0 !== $priority) {
+ $code .= sprintf(" decoration_priority: %s\n", $priority);
+ }
+ }
+
+ if ($callable = $definition->getFactory()) {
+ $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));
+ }
+
+ return $code;
+ }
+
+ /**
+ * Adds a service alias.
+ *
+ * @param string $alias
+ *
+ * @return string
+ */
+ private function addServiceAlias($alias, Alias $id)
+ {
+ if ($id->isPrivate()) {
+ return sprintf(" %s: '@%s'\n", $alias, $id);
+ }
+
+ return sprintf(" %s:\n alias: %s\n public: %s\n", $alias, $id, $id->isPublic() ? 'true' : 'false');
+ }
+
+ /**
+ * Adds services.
+ *
+ * @return string
+ */
+ private function addServices()
+ {
+ if (!$this->container->getDefinitions()) {
+ return '';
+ }
+
+ $code = "services:\n";
+ foreach ($this->container->getDefinitions() as $id => $definition) {
+ $code .= $this->addService($id, $definition);
+ }
+
+ $aliases = $this->container->getAliases();
+ foreach ($aliases as $alias => $id) {
+ while (isset($aliases[(string) $id])) {
+ $id = $aliases[(string) $id];
+ }
+ $code .= $this->addServiceAlias($alias, $id);
+ }
+
+ return $code;
+ }
+
+ /**
+ * Adds parameters.
+ *
+ * @return string
+ */
+ private function addParameters()
+ {
+ if (!$this->container->getParameterBag()->all()) {
+ return '';
+ }
+
+ $parameters = $this->prepareParameters($this->container->getParameterBag()->all(), $this->container->isCompiled());
+
+ return $this->dumper->dump(['parameters' => $parameters], 2);
+ }
+
+ /**
+ * Dumps callable to YAML format.
+ *
+ * @param mixed $callable
+ */
+ private function dumpCallable($callable)
+ {
+ 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]];
+ }
+ }
+
+ return $callable;
+ }
+
+ /**
+ * Dumps the value to YAML format.
+ *
+ * @param mixed $value
+ *
+ * @return mixed
+ *
+ * @throws RuntimeException When trying to dump object or resource
+ */
+ private function dumpValue($value)
+ {
+ if ($value instanceof ServiceClosureArgument) {
+ $value = $value->getValues()[0];
+ }
+ if ($value instanceof ArgumentInterface) {
+ if ($value instanceof TaggedIteratorArgument) {
+ return new TaggedValue('tagged', $value->getTag());
+ }
+ if ($value instanceof IteratorArgument) {
+ $tag = 'iterator';
+ } else {
+ throw new RuntimeException(sprintf('Unspecified Yaml tag for type "%s".', \get_class($value)));
+ }
+
+ return new TaggedValue($tag, $this->dumpValue($value->getValues()));
+ }
+
+ if (\is_array($value)) {
+ $code = [];
+ foreach ($value as $k => $v) {
+ $code[$k] = $this->dumpValue($v);
+ }
+
+ return $code;
+ } elseif ($value instanceof Reference) {
+ return $this->getServiceCall((string) $value, $value);
+ } elseif ($value instanceof Parameter) {
+ return $this->getParameterCall((string) $value);
+ } elseif ($value instanceof Expression) {
+ return $this->getExpressionCall((string) $value);
+ } 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;
+ }
+
+ /**
+ * Gets the service call.
+ *
+ * @param string $id
+ * @param Reference $reference
+ *
+ * @return string
+ */
+ private function getServiceCall($id, Reference $reference = null)
+ {
+ if (null !== $reference) {
+ switch ($reference->getInvalidBehavior()) {
+ case ContainerInterface::EXCEPTION_ON_INVALID_REFERENCE: break;
+ case ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE: return sprintf('@!%s', $id);
+ default: return sprintf('@?%s', $id);
+ }
+ }
+
+ return sprintf('@%s', $id);
+ }
+
+ /**
+ * Gets parameter call.
+ *
+ * @param string $id
+ *
+ * @return string
+ */
+ private function getParameterCall($id)
+ {
+ return sprintf('%%%s%%', $id);
+ }
+
+ private function getExpressionCall($expression)
+ {
+ return sprintf('@=%s', $expression);
+ }
+
+ /**
+ * Prepares parameters.
+ *
+ * @param bool $escape
+ *
+ * @return array
+ */
+ private function prepareParameters(array $parameters, $escape = true)
+ {
+ $filtered = [];
+ foreach ($parameters as $key => $value) {
+ if (\is_array($value)) {
+ $value = $this->prepareParameters($value, $escape);
+ } elseif ($value instanceof Reference || \is_string($value) && 0 === strpos($value, '@')) {
+ $value = '@'.$value;
+ }
+
+ $filtered[$key] = $value;
+ }
+
+ return $escape ? $this->escape($filtered) : $filtered;
+ }
+
+ /**
+ * Escapes arguments.
+ *
+ * @return array
+ */
+ private function escape(array $arguments)
+ {
+ $args = [];
+ foreach ($arguments as $k => $v) {
+ if (\is_array($v)) {
+ $args[$k] = $this->escape($v);
+ } elseif (\is_string($v)) {
+ $args[$k] = str_replace('%', '%%', $v);
+ } else {
+ $args[$k] = $v;
+ }
+ }
+
+ return $args;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/EnvVarProcessor.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/EnvVarProcessor.php
new file mode 100644
index 00000000..065673dc
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/EnvVarProcessor.php
@@ -0,0 +1,163 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Symfony\Component\Config\Util\XmlUtils;
+use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+
+/**
+ * @author Nicolas Grekas
+ */
+class EnvVarProcessor implements EnvVarProcessorInterface
+{
+ private $container;
+
+ public function __construct(ContainerInterface $container)
+ {
+ $this->container = $container;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public static function getProvidedTypes()
+ {
+ return [
+ 'base64' => 'string',
+ 'bool' => 'bool',
+ 'const' => 'bool|int|float|string|array',
+ 'file' => 'string',
+ 'float' => 'float',
+ 'int' => 'int',
+ 'json' => 'array',
+ 'resolve' => 'string',
+ 'string' => 'string',
+ ];
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getEnv($prefix, $name, \Closure $getEnv)
+ {
+ $i = strpos($name, ':');
+
+ if ('file' === $prefix) {
+ 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 RuntimeException(sprintf('Env "file:%s" not found: "%s" does not exist.', $name, $file));
+ }
+
+ return file_get_contents($file);
+ }
+
+ 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_')) {
+ $env = $_SERVER[$name];
+ } 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 EnvNotFoundException($name);
+ }
+
+ if (null === $env = $this->container->getParameter("env($name)")) {
+ return null;
+ }
+ }
+
+ 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;
+ }
+
+ if ('bool' === $prefix) {
+ return (bool) self::phpize($env);
+ }
+
+ if ('int' === $prefix) {
+ 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 RuntimeException(sprintf('Non-numeric env var "%s" cannot be cast to float.', $name));
+ }
+
+ return (float) $env;
+ }
+
+ if ('const' === $prefix) {
+ if (!\defined($env)) {
+ throw new RuntimeException(sprintf('Env var "%s" maps to undefined constant "%s".', $name, $env));
+ }
+
+ return \constant($env);
+ }
+
+ if ('base64' === $prefix) {
+ return base64_decode($env);
+ }
+
+ if ('json' === $prefix) {
+ $env = json_decode($env, true);
+
+ if (\JSON_ERROR_NONE !== json_last_error()) {
+ throw new RuntimeException(sprintf('Invalid JSON in env var "%s": ', $name).json_last_error_msg());
+ }
+
+ 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) {
+ if (!isset($match[1])) {
+ return '%';
+ }
+ $value = $this->container->getParameter($match[1]);
+ 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 RuntimeException(sprintf('Unsupported env var prefix "%s".', $prefix));
+ }
+
+ private static function phpize($value)
+ {
+ if (!class_exists(XmlUtils::class)) {
+ throw new RuntimeException('The Symfony Config component is required to cast env vars to "bool", "int" or "float".');
+ }
+
+ return XmlUtils::phpize($value);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
new file mode 100644
index 00000000..654fe55e
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/EnvVarProcessorInterface.php
@@ -0,0 +1,40 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection;
+
+use Symfony\Component\DependencyInjection\Exception\RuntimeException;
+
+/**
+ * The EnvVarProcessorInterface is implemented by objects that manage environment-like variables.
+ *
+ * @author Nicolas Grekas
+ */
+interface EnvVarProcessorInterface
+{
+ /**
+ * Returns the value of the given variable as managed by the current instance.
+ *
+ * @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
+ *
+ * @return mixed
+ *
+ * @throws RuntimeException on error
+ */
+ public function getEnv($prefix, $name, \Closure $getEnv);
+
+ /**
+ * @return string[] The PHP-types managed by getEnv(), keyed by prefixes
+ */
+ public static function getProvidedTypes();
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
new file mode 100644
index 00000000..145cd8cb
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/AutowiringFailedException.php
@@ -0,0 +1,32 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Thrown when a definition cannot be autowired.
+ */
+class AutowiringFailedException extends RuntimeException
+{
+ private $serviceId;
+
+ public function __construct($serviceId, $message = '', $code = 0, \Exception $previous = null)
+ {
+ $this->serviceId = $serviceId;
+
+ parent::__construct($message, $code, $previous);
+ }
+
+ public function getServiceId()
+ {
+ return $this->serviceId;
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
new file mode 100644
index 00000000..959238e9
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/BadMethodCallException.php
@@ -0,0 +1,19 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base BadMethodCallException for Dependency Injection component.
+ */
+class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
new file mode 100644
index 00000000..577095e8
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/EnvNotFoundException.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * This exception is thrown when an environment variable is not found.
+ *
+ * @author Nicolas Grekas
+ */
+class EnvNotFoundException extends InvalidArgumentException
+{
+ public function __construct($name)
+ {
+ parent::__construct(sprintf('Environment variable not found: "%s".', $name));
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/EnvParameterException.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
new file mode 100644
index 00000000..3839a463
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/EnvParameterException.php
@@ -0,0 +1,25 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * This exception wraps exceptions whose messages contain a reference to an env parameter.
+ *
+ * @author Nicolas Grekas
+ */
+class EnvParameterException extends InvalidArgumentException
+{
+ 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);
+ }
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
new file mode 100644
index 00000000..5bec4786
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/ExceptionInterface.php
@@ -0,0 +1,24 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+use Psr\Container\ContainerExceptionInterface;
+
+/**
+ * Base ExceptionInterface for Dependency Injection component.
+ *
+ * @author Fabien Potencier
+ * @author Bulat Shakirzyanov
+ */
+interface ExceptionInterface extends ContainerExceptionInterface
+{
+}
diff --git a/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
new file mode 100644
index 00000000..119bb7d1
--- /dev/null
+++ b/modules/empikmarketplace/vendor/symfony/dependency-injection/Exception/InvalidArgumentException.php
@@ -0,0 +1,21 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+namespace Symfony\Component\DependencyInjection\Exception;
+
+/**
+ * Base InvalidArgumentException for Dependency Injection component.
+ *
+ * @author Bulat Shakirzyanov