From 712ac268d2268a41a62fc72df90002f8468a5220 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 28 Dec 2022 17:06:32 +0000 Subject: [PATCH] updated dependencies --- Config.php | 281 --- Configuration.php | 321 ---- RouteCollector.php | 292 --- composer.json | 6 +- composer.lock | 1579 ----------------- src/Command/ClearCacheCommand.php | 0 .../Minifier/Adapters/AdapterInterface.php | 0 .../Minifier/Adapters/Css/MinifyAdapter.php | 0 .../Minifier/Adapters/Js/MinifyAdapter.php | 0 src/Command/Minifier/Commands/MinifyAll.php | 0 src/Command/Minifier/Commands/MinifyCss.php | 0 src/Command/Minifier/Commands/MinifyJs.php | 0 .../Exceptions/ExceptionInterface.php | 0 .../Minifier/Exceptions/MinifierException.php | 0 src/Command/Minifier/Language/en/Minifier.php | 0 src/Command/Minifier/Minifier.php | 0 src/Config.php | 0 src/Configuration.php | 0 src/Controller/BaseController.php | 0 src/Exception/AuthenticationException.php | 0 src/Exception/BaseException.php | 0 src/Exception/ConfigException.php | 0 src/Exception/CoreException.php | 0 src/Exception/DataObjectManagerException.php | 0 src/Exception/InvalidContextException.php | 0 src/Exception/InvalidFileException.php | 0 src/Exception/NoSuchEntityException.php | 0 src/Exception/ThrottleException.php | 0 src/Exception/ValidationException.php | 0 src/Extension/DateExtension.php | 0 src/Factory/AppFactory.php | 0 src/Factory/DataObjectManagerFactory.php | 0 src/Handler/ErrorHandler.php | 0 src/Helper/LocaleHelper.php | 0 src/Interfaces/ConfigInterface.php | 0 .../CustomResponseCodeInterface.php | 0 src/Interfaces/CustomResponseInterface.php | 0 src/Interfaces/HttpResponseCodeInterface.php | 0 src/Interfaces/Loadable.php | 0 src/Loader/Directory.php | 0 src/Loader/Ini.php | 0 src/Loader/Json.php | 0 src/Loader/Loader.php | 0 src/Loader/Php.php | 0 src/Loader/Toml.php | 0 src/Loader/Xml.php | 0 src/Loader/Yaml.php | 0 src/Mapping/Annotation/ArgumentTrait.php | 0 src/Mapping/Annotation/Group.php | 0 src/Mapping/Annotation/MiddlewareTrait.php | 0 src/Mapping/Annotation/PathTrait.php | 0 src/Mapping/Annotation/Route.php | 0 src/Mapping/Annotation/Router.php | 0 src/Mapping/Driver/AnnotationDriver.php | 0 src/Mapping/Driver/DriverFactory.php | 0 src/Mapping/Driver/JsonDriver.php | 0 src/Mapping/Driver/MappingTrait.php | 0 src/Mapping/Driver/PhpDriver.php | 0 src/Mapping/Driver/XmlDriver.php | 0 src/Mapping/Driver/YamlDriver.php | 0 src/Mapping/Metadata/AbstractMetadata.php | 0 src/Mapping/Metadata/GroupMetadata.php | 0 src/Mapping/Metadata/RouteMetadata.php | 0 src/Middleware/AuthMiddleware.php | 0 src/Middleware/BodyParserMiddleware.php | 0 src/Middleware/ClaimMiddleware.php | 38 +- src/Middleware/LocaleMiddleware.php | 0 src/Middleware/ThrottleMiddleware.php | 0 src/Model/CustomResponse.php | 0 src/Model/DataObject.php | 0 src/Model/Locale.php | 0 src/Model/Query/Collection.php | 0 src/Model/Query/DataBuilder.php | 0 src/Model/Query/DataObjectManager.php | 0 src/Model/Query/PaginatedCollection.php | 0 src/Naming/CamelCase.php | 0 src/Naming/Dot.php | 0 src/Naming/SnakeCase.php | 0 src/Naming/Strategy.php | 0 src/Provider/AppServiceProvider.php | 0 src/Provider/CacheServiceProvider.php | 0 src/Provider/ConfigServiceProvider.php | 0 src/Provider/LocaleServiceProvider.php | 0 src/Provider/LoggingServiceProvider.php | 0 .../RouteCollectorServiceProvider.php | 0 src/Provider/RouteServiceProvider.php | 0 src/Provider/SessionServiceProvider.php | 0 src/Provider/SlugServiceProvider.php | 0 src/Provider/ThrottleServiceProvider.php | 0 src/Provider/TwigServiceProvider.php | 0 src/Provider/ValidationServiceProvider.php | 0 src/Proxy/App.php | 0 src/Repository/BaseRepository.php | 0 src/Response/AbstractResponse.php | 0 .../Handler/AbstractResponseHandler.php | 0 src/Response/Handler/JsonResponseHandler.php | 0 src/Response/Handler/ResponseTypeHandler.php | 0 .../Handler/TwigViewResponseHandler.php | 0 src/Response/Handler/XmlResponseHandler.php | 0 src/Response/PayloadResponse.php | 0 src/Response/ResponseType.php | 0 src/Response/ViewResponse.php | 0 src/Route/Route.php | 0 src/Route/RouteResolver.php | 0 src/RouteCollector.php | 0 src/Service/CacheService.php | 0 src/Service/LocaleService.php | 0 src/Service/TokenService.php | 0 src/Service/ValidationService.php | 0 src/Strategy/RequestHandler.php | 0 src/Strategy/RequestResponse.php | 0 src/Strategy/RequestResponseArgs.php | 0 src/Strategy/ResponseTypeStrategyTrait.php | 0 src/Trait/Arrayable.php | 0 src/Transformer/AbstractTransformer.php | 0 src/Transformer/ParameterTransformer.php | 0 116 files changed, 29 insertions(+), 2488 deletions(-) delete mode 100755 Config.php delete mode 100755 Configuration.php delete mode 100755 RouteCollector.php delete mode 100755 composer.lock mode change 100755 => 100644 src/Command/ClearCacheCommand.php mode change 100755 => 100644 src/Command/Minifier/Adapters/AdapterInterface.php mode change 100755 => 100644 src/Command/Minifier/Adapters/Css/MinifyAdapter.php mode change 100755 => 100644 src/Command/Minifier/Adapters/Js/MinifyAdapter.php mode change 100755 => 100644 src/Command/Minifier/Commands/MinifyAll.php mode change 100755 => 100644 src/Command/Minifier/Commands/MinifyCss.php mode change 100755 => 100644 src/Command/Minifier/Commands/MinifyJs.php mode change 100755 => 100644 src/Command/Minifier/Exceptions/ExceptionInterface.php mode change 100755 => 100644 src/Command/Minifier/Exceptions/MinifierException.php mode change 100755 => 100644 src/Command/Minifier/Language/en/Minifier.php mode change 100755 => 100644 src/Command/Minifier/Minifier.php mode change 100755 => 100644 src/Config.php mode change 100755 => 100644 src/Configuration.php mode change 100755 => 100644 src/Controller/BaseController.php mode change 100755 => 100644 src/Exception/AuthenticationException.php mode change 100755 => 100644 src/Exception/BaseException.php mode change 100755 => 100644 src/Exception/ConfigException.php mode change 100755 => 100644 src/Exception/CoreException.php mode change 100755 => 100644 src/Exception/DataObjectManagerException.php mode change 100755 => 100644 src/Exception/InvalidContextException.php mode change 100755 => 100644 src/Exception/InvalidFileException.php mode change 100755 => 100644 src/Exception/NoSuchEntityException.php mode change 100755 => 100644 src/Exception/ThrottleException.php mode change 100755 => 100644 src/Exception/ValidationException.php mode change 100755 => 100644 src/Extension/DateExtension.php mode change 100755 => 100644 src/Factory/AppFactory.php mode change 100755 => 100644 src/Factory/DataObjectManagerFactory.php mode change 100755 => 100644 src/Handler/ErrorHandler.php mode change 100755 => 100644 src/Helper/LocaleHelper.php mode change 100755 => 100644 src/Interfaces/ConfigInterface.php mode change 100755 => 100644 src/Interfaces/CustomResponseCodeInterface.php mode change 100755 => 100644 src/Interfaces/CustomResponseInterface.php mode change 100755 => 100644 src/Interfaces/HttpResponseCodeInterface.php mode change 100755 => 100644 src/Interfaces/Loadable.php mode change 100755 => 100644 src/Loader/Directory.php mode change 100755 => 100644 src/Loader/Ini.php mode change 100755 => 100644 src/Loader/Json.php mode change 100755 => 100644 src/Loader/Loader.php mode change 100755 => 100644 src/Loader/Php.php mode change 100755 => 100644 src/Loader/Toml.php mode change 100755 => 100644 src/Loader/Xml.php mode change 100755 => 100644 src/Loader/Yaml.php mode change 100755 => 100644 src/Mapping/Annotation/ArgumentTrait.php mode change 100755 => 100644 src/Mapping/Annotation/Group.php mode change 100755 => 100644 src/Mapping/Annotation/MiddlewareTrait.php mode change 100755 => 100644 src/Mapping/Annotation/PathTrait.php mode change 100755 => 100644 src/Mapping/Annotation/Route.php mode change 100755 => 100644 src/Mapping/Annotation/Router.php mode change 100755 => 100644 src/Mapping/Driver/AnnotationDriver.php mode change 100755 => 100644 src/Mapping/Driver/DriverFactory.php mode change 100755 => 100644 src/Mapping/Driver/JsonDriver.php mode change 100755 => 100644 src/Mapping/Driver/MappingTrait.php mode change 100755 => 100644 src/Mapping/Driver/PhpDriver.php mode change 100755 => 100644 src/Mapping/Driver/XmlDriver.php mode change 100755 => 100644 src/Mapping/Driver/YamlDriver.php mode change 100755 => 100644 src/Mapping/Metadata/AbstractMetadata.php mode change 100755 => 100644 src/Mapping/Metadata/GroupMetadata.php mode change 100755 => 100644 src/Mapping/Metadata/RouteMetadata.php mode change 100755 => 100644 src/Middleware/AuthMiddleware.php mode change 100755 => 100644 src/Middleware/BodyParserMiddleware.php mode change 100755 => 100644 src/Middleware/ClaimMiddleware.php mode change 100755 => 100644 src/Middleware/LocaleMiddleware.php mode change 100755 => 100644 src/Middleware/ThrottleMiddleware.php mode change 100755 => 100644 src/Model/CustomResponse.php mode change 100755 => 100644 src/Model/DataObject.php mode change 100755 => 100644 src/Model/Locale.php mode change 100755 => 100644 src/Model/Query/Collection.php mode change 100755 => 100644 src/Model/Query/DataBuilder.php mode change 100755 => 100644 src/Model/Query/DataObjectManager.php mode change 100755 => 100644 src/Model/Query/PaginatedCollection.php mode change 100755 => 100644 src/Naming/CamelCase.php mode change 100755 => 100644 src/Naming/Dot.php mode change 100755 => 100644 src/Naming/SnakeCase.php mode change 100755 => 100644 src/Naming/Strategy.php mode change 100755 => 100644 src/Provider/AppServiceProvider.php mode change 100755 => 100644 src/Provider/CacheServiceProvider.php mode change 100755 => 100644 src/Provider/ConfigServiceProvider.php mode change 100755 => 100644 src/Provider/LocaleServiceProvider.php mode change 100755 => 100644 src/Provider/LoggingServiceProvider.php mode change 100755 => 100644 src/Provider/RouteCollectorServiceProvider.php mode change 100755 => 100644 src/Provider/RouteServiceProvider.php mode change 100755 => 100644 src/Provider/SessionServiceProvider.php mode change 100755 => 100644 src/Provider/SlugServiceProvider.php mode change 100755 => 100644 src/Provider/ThrottleServiceProvider.php mode change 100755 => 100644 src/Provider/TwigServiceProvider.php mode change 100755 => 100644 src/Provider/ValidationServiceProvider.php mode change 100755 => 100644 src/Proxy/App.php mode change 100755 => 100644 src/Repository/BaseRepository.php mode change 100755 => 100644 src/Response/AbstractResponse.php mode change 100755 => 100644 src/Response/Handler/AbstractResponseHandler.php mode change 100755 => 100644 src/Response/Handler/JsonResponseHandler.php mode change 100755 => 100644 src/Response/Handler/ResponseTypeHandler.php mode change 100755 => 100644 src/Response/Handler/TwigViewResponseHandler.php mode change 100755 => 100644 src/Response/Handler/XmlResponseHandler.php mode change 100755 => 100644 src/Response/PayloadResponse.php mode change 100755 => 100644 src/Response/ResponseType.php mode change 100755 => 100644 src/Response/ViewResponse.php mode change 100755 => 100644 src/Route/Route.php mode change 100755 => 100644 src/Route/RouteResolver.php mode change 100755 => 100644 src/RouteCollector.php mode change 100755 => 100644 src/Service/CacheService.php mode change 100755 => 100644 src/Service/LocaleService.php mode change 100755 => 100644 src/Service/TokenService.php mode change 100755 => 100644 src/Service/ValidationService.php mode change 100755 => 100644 src/Strategy/RequestHandler.php mode change 100755 => 100644 src/Strategy/RequestResponse.php mode change 100755 => 100644 src/Strategy/RequestResponseArgs.php mode change 100755 => 100644 src/Strategy/ResponseTypeStrategyTrait.php mode change 100755 => 100644 src/Trait/Arrayable.php mode change 100755 => 100644 src/Transformer/AbstractTransformer.php mode change 100755 => 100644 src/Transformer/ParameterTransformer.php diff --git a/Config.php b/Config.php deleted file mode 100755 index 76a7c64..0000000 --- a/Config.php +++ /dev/null @@ -1,281 +0,0 @@ -config = $prefix ? [$prefix => $context] : $context; - - break; - case 'string': - $this->load($context, $prefix); - - break; - default: - throw new InvalidContextException('Failed to initialize config'); - } - } - - /** - * Create a new Config object from a directory with prefixed entries by file. - * - * @param string $path A path to a directory of configuration files - * - * @return \Ares\Framework\Interfaces\ConfigInterface A new ConfigInterface object - */ - public static function fromDirectory(string $path): ConfigInterface - { - $config = new self(); - - foreach (new DirectoryIterator($path) as $file) { - if ($file->isFile()) { - $config->load( - $file->getRealPath(), - pathinfo($file->getBasename(), PATHINFO_FILENAME) - ); - } - } - - return $config; - } - - /** - * Store a config value with a specified key. - * - * @param string $key Unique configuration option key - * @param mixed $value Config item value - * - * @return bool True on success, otherwise false - */ - public function set(string $key, $value): bool - { - $config = &$this->config; - - foreach (explode('.', $key) as $k) { - $config = &$config[$k]; - } - - $config = $value; - - return true; - } - - /** - * Retrieve a configuration option via a provided key. - * - * @param string $key Unique configuration option key - * @param mixed $default Default value to return if option does not exist - * - * @return mixed Stored config item or $default value - */ - public function get(string $key, mixed $default = null): mixed - { - $config = $this->config; - - foreach (explode('.', $key) as $k) { - if (! isset($config[$k])) { - return $default; - } - $config = $config[$k]; - } - - return $config; - } - - /** - * Check for the existence of a configuration item. - * - * @param string $key Unique configuration option key - * - * @return bool True if item existst, otherwise false - */ - public function has(string $key): bool - { - $config = $this->config; - - foreach (explode('.', $key) as $k) { - if (! isset($config[$k])) { - return false; - } - $config = $config[$k]; - } - - return true; - } - - /** - * Append a value onto an existing array configuration option. - * - * @param string $key Unique configuration option key - * @param mixed $value Config item value - * - * @throws RuntimeException - * - * @return true - */ - public function append(string $key, $value): bool - { - $config = &$this->config; - - foreach (explode('.', $key) as $k) { - $config = &$config[$k]; - } - - if (! is_array($config)) { - throw new RuntimeException("Config item '{$key}' is not an array"); - } - - $config = array_merge($config, (array) $value); - - return true; - } - - /** - * Prepend a value onto an existing array configuration option. - * - * @param string $key Unique configuration option key - * @param mixed $value Config item value - * - * @throws RuntimeException - * - * @return true - */ - public function prepend(string $key, $value): bool - { - $config = &$this->config; - - foreach (explode('.', $key) as $k) { - $config = &$config[$k]; - } - - if (! is_array($config)) { - throw new RuntimeException("Config item '{$key}' is not an array"); - } - - $config = array_merge((array) $value, $config); - - return true; - } - - /** - * Unset a configuration option via a provided key. - * - * @param string $key Unique configuration option key - * - * @return bool True on success, otherwise false - */ - public function unset(string $key): bool - { - if (! $this->has($key)) { - return false; - } - - return $this->set($key, null); - } - - /** - * Load configuration options from a file or directory. - * - * @param string $path Path to configuration file or directory - * @param string $prefix A key under which the loaded config will be nested - * @param bool $override Whether or not to override existing options with - * values from the loaded file - * - * @return \Ares\Framework\Interfaces\ConfigInterface This Config object - */ - public function load(string $path, string $prefix = null, bool $override = true): ConfigInterface - { - $file = new SplFileInfo($path); - - $className = $file->isDir() ? 'Directory' : ucfirst(strtolower($file->getExtension())); - $classPath = 'Ares\\Framework\\Loader\\' . $className; - - $loader = new $classPath($file->getRealPath()); - - $newConfig = $prefix ? [$prefix => $loader->getArray()] : $loader->getArray(); - - if ($override) { - $this->config = array_replace_recursive($this->config, $newConfig); - } else { - $this->config = array_replace_recursive($newConfig, $this->config); - } - - return $this; - } - - /** - * Merge another Config object into this one. - * - * @param \Ares\Framework\Interfaces\ConfigInterface $config Instance of Config - * @param bool $override Whether or not to override existing options with - * values from the merged config object - * - * @return \Ares\Framework\Interfaces\ConfigInterface This Config object - */ - public function merge(ConfigInterface $config, bool $override = true): ConfigInterface - { - if ($override) { - $this->config = array_replace_recursive($this->config, $config->toArray()); - } else { - $this->config = array_replace_recursive($config->toArray(), $this->config); - } - - return $this; - } - - /** - * Split a sub-array of configuration options into it's own config. - * - * @param string $key Unique configuration option key - * - * @return \Ares\Framework\Interfaces\ConfigInterface A new ConfigInterface object - */ - public function split(string $key): ConfigInterface - { - return new self($this->get($key)); - } - - /** - * Return the entire configuration as an array. - * - * @return array The configuration array - */ - public function toArray(): array - { - return $this->config; - } -} diff --git a/Configuration.php b/Configuration.php deleted file mode 100755 index 8ea996a..0000000 --- a/Configuration.php +++ /dev/null @@ -1,321 +0,0 @@ - - */ - protected $placeholderAliases = [ - 'any' => '[^}]+', - 'numeric' => '[0-9]+', - 'number' => '[0-9]+', - 'alpha' => '[a-zA-Z]+', - 'word' => '[a-zA-Z]+', - 'alnum' => '[a-zA-Z0-9]+', - 'slug' => '[a-zA-Z0-9-]+', - 'uuid' => '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', - 'mongoid' => '[0-9a-f]{24}', - ]; - - /** - * Metadata resolver. - * - * @var MetadataResolver - */ - protected $metadataResolver; - - /** - * Route resolver. - * - * @var RouteResolver - */ - protected $routeResolver; - - /** - * Naming strategy. - * - * @var Strategy - */ - protected $namingStrategy; - - /** - * Configuration constructor. - * - * @param mixed $configurations - * - * @throws \InvalidArgumentException - */ - public function __construct($configurations = []) - { - if (!\is_array($configurations) && !$configurations instanceof \Traversable) { - throw new \InvalidArgumentException('Configurations must be an iterable'); - } - if ($configurations instanceof \Traversable) { - $configurations = \iterator_to_array($configurations); - } - - $configs = \array_keys(\get_object_vars($this)); - - $unknownParameters = \array_diff(\array_keys($configurations), $configs); - if (\count($unknownParameters) > 0) { - throw new \InvalidArgumentException( - \sprintf( - 'The following configuration parameters are not recognized: %s', - \implode(', ', $unknownParameters) - ) - ); - } - - foreach ($configs as $config) { - if (isset($configurations[$config])) { - $callback = [ - $this, - $config === 'placeholderAliases' ? 'addPlaceholderAliases' : 'set' . \ucfirst($config), - ]; - - if (\is_callable($callback)) { - \call_user_func($callback, $configurations[$config]); - } - } - } - } - - /** - * Get routing paths. - * - * @return mixed[] - */ - public function getSources(): array - { - return $this->sources; - } - - /** - * Set routing paths. - * - * @param mixed[] $sources - * - * @return self - */ - public function setSources(array $sources): self - { - $this->sources = []; - - foreach ($sources as $source) { - $this->addSource($source); - } - - return $this; - } - - /** - * Add mapping source. - * - * @param mixed $source - * - * @throws \InvalidArgumentException - * - * @return self - */ - public function addSource($source): self - { - if (!\is_string($source) && !\is_array($source) && !$source instanceof DriverInterface) { - throw new \InvalidArgumentException(\sprintf( - 'Mapping source must be a string, array or %s, %s given', - DriverInterface::class, - \is_object($source) ? \get_class($source) : \gettype($source) - )); - } - - $this->sources[] = $source; - - return $this; - } - - /** - * Should routes have trailing slash. - * - * @return bool - */ - public function hasTrailingSlash(): bool - { - return $this->trailingSlash; - } - - /** - * Set route trailing slash selector. - * - * @param bool $trailingSlash - * - * @return $this - */ - public function setTrailingSlash(bool $trailingSlash): self - { - $this->trailingSlash = $trailingSlash; - - return $this; - } - - /** - * Get placeholder aliases. - * - * @return array - */ - public function getPlaceholderAliases(): array - { - return $this->placeholderAliases; - } - - /** - * Add placeholder aliases. - * - * @param array $aliases - * - * @throws \InvalidArgumentException - * - * @return self - */ - public function addPlaceholderAliases(array $aliases): self - { - foreach ($aliases as $alias => $patter) { - $this->addPlaceholderAlias($alias, $patter); - } - - return $this; - } - - /** - * Add placeholder alias. - * - * @param string $alias - * @param string $pattern - * - * @throws \InvalidArgumentException - * - * @return self - */ - public function addPlaceholderAlias(string $alias, string $pattern): self - { - if (@\preg_match('~^' . $pattern . '$~', '') === false) { - throw new \InvalidArgumentException( - \sprintf('Placeholder pattern "%s" is not a valid regex', $pattern) - ); - } - - $this->placeholderAliases[$alias] = $pattern; - - return $this; - } - - /** - * Get metadata resolver. - * - * @return MetadataResolver - */ - public function getMetadataResolver(): MetadataResolver - { - if ($this->metadataResolver === null) { - $this->metadataResolver = new MetadataResolver(new DriverFactory()); - } - - return $this->metadataResolver; - } - - /** - * Set metadata resolver. - * - * @param MetadataResolver $metadataResolver - * - * @return self - */ - public function setMetadataResolver(MetadataResolver $metadataResolver): self - { - $this->metadataResolver = $metadataResolver; - - return $this; - } - - /** - * Get route resolver. - * - * @return RouteResolver - */ - public function getRouteResolver(): RouteResolver - { - if ($this->routeResolver === null) { - $this->routeResolver = new RouteResolver($this); - } - - return $this->routeResolver; - } - - /** - * Set route resolver. - * - * @param RouteResolver $routeResolver - * - * @return self - */ - public function setRouteResolver(RouteResolver $routeResolver): self - { - $this->routeResolver = $routeResolver; - - return $this; - } - - /** - * Get naming strategy. - * - * @return Strategy - */ - public function getNamingStrategy(): Strategy - { - if ($this->namingStrategy === null) { - $this->namingStrategy = new SnakeCase(); - } - - return $this->namingStrategy; - } - - /** - * Set naming strategy. - * - * @param Strategy $namingStrategy - * - * @return self - */ - public function setNamingStrategy(Strategy $namingStrategy): self - { - $this->namingStrategy = $namingStrategy; - - return $this; - } -} \ No newline at end of file diff --git a/RouteCollector.php b/RouteCollector.php deleted file mode 100755 index d0dd295..0000000 --- a/RouteCollector.php +++ /dev/null @@ -1,292 +0,0 @@ -configuration = $configuration; - } - - /** - * Set metadata cache. - * - * @param CacheInterface $cache - */ - public function setCache(CacheInterface $cache): void - { - $this->cache = $cache; - } - - /** - * Set metadata cache prefix. - * - * @param string $cachePrefix - */ - public function setCachePrefix(string $cachePrefix): void - { - $this->cachePrefix = $cachePrefix; - } - - /** - * {@inheritdoc} - */ - public function getRoutes(): array - { - if ($this->routesRegistered === false) { - $this->registerRoutes(); - } - - return $this->routes; - } - - /** - * {@inheritdoc} - */ - public function lookupRoute(string $identifier): RouteInterface - { - if ($this->routesRegistered === false) { - $this->registerRoutes(); - } - - return parent::lookupRoute($identifier); - } - - /** - * Register routes. - * - * @throws \InvalidArgumentException - * @throws \RuntimeException - */ - final public function registerRoutes(): void - { - $routes = $this->routes; - $this->routes = []; - - $resolver = $this->configuration->getRouteResolver(); - - foreach ($this->getRoutesMetadata() as $routeMetadata) { - $route = $this->mapMetadataRoute($routeMetadata, $resolver); - - $name = $resolver->getName($routeMetadata); - if ($name !== null) { - $route->setName($name); - } - $arguments = $resolver->getArguments($routeMetadata); - if (\count($arguments) !== 0) { - $route->setArguments($arguments); - } - - foreach ($resolver->getMiddleware($routeMetadata) as $middleware) { - $route->add($middleware); - } - } - - $this->routes = \array_merge($this->routes, $routes); - - $this->routesRegistered = true; - } - - /** - * Get routes metadata. - * - * @return RouteMetadata[] - */ - protected function getRoutesMetadata(): array - { - $mappingSources = $this->configuration->getSources(); - $cacheKey = $this->getCacheKey($mappingSources); - - if ($this->cache !== null && $this->cache->has($cacheKey)) { - return $this->cache->get($cacheKey); - } - - /** @var RouteMetadata[] $routes */ - $routes = $this->configuration->getMetadataResolver()->getMetadata($mappingSources); - - $routeResolver = $this->configuration->getRouteResolver(); - $routeResolver->checkDuplicatedRoutes($routes); - - $routes = $routeResolver->sort($routes); - - if ($this->cache !== null) { - $this->cache->set($cacheKey, $routes); - } - - return $routes; - } - - /** - * Map new metadata route. - * - * @param RouteMetadata $metadata - * @param RouteResolver $resolver - * - * @return Route - */ - protected function mapMetadataRoute(RouteMetadata $metadata, RouteResolver $resolver): Route - { - $route = $this->createMetadataRoute( - $metadata->getMethods(), - $resolver->getPattern($metadata), - $metadata->getInvokable(), - $metadata - ); - - $this->routes[$route->getIdentifier()] = $route; - $this->routeCounter++; - - return $route; - } - - /** - * @param mixed[] $methods - * @param string $pattern - * @param mixed $handler - * - * @return RouteInterface - */ - final protected function createRoute(array $methods, string $pattern, $handler): RouteInterface - { - return $this->createMetadataRoute($methods, $pattern, $handler); - } - - /** - * Create new metadata aware route. - * - * @param string[] $methods - * @param string $pattern - * @param mixed $callable - * @param RouteMetadata|null $metadata - * - * @return Route - */ - protected function createMetadataRoute( - array $methods, - string $pattern, - $callable, - ?RouteMetadata $metadata = null - ): RouteInterface { - return new Route( - $methods, - $pattern, - $callable, - $this->responseFactory, - $this->callableResolver, - $metadata, - $this->container, - $this->defaultInvocationStrategy, - $this->routeGroups, - $this->routeCounter - ); - } - - /** - * Get cache key. - * - * @param mixed[] $mappingSources - * - * @return string - */ - protected function getCacheKey(array $mappingSources): string - { - $key = \implode( - '.', - \array_map( - function ($mappingSource): string { - if (!\is_array($mappingSource)) { - $mappingSource = [ - 'type' => DriverFactoryInterface::DRIVER_ANNOTATION, - 'path' => $mappingSource, - ]; - } - - $path = \is_array($mappingSource['path']) - ? \implode('', $mappingSource['path']) - : $mappingSource['path']; - - return $mappingSource['type'] . '.' . $path; - }, - $mappingSources - ) - ); - - return $this->cachePrefix . \sha1($key); - } -} \ No newline at end of file diff --git a/composer.json b/composer.json index 572bb37..6adc40c 100755 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Cosmic-Core designed for Ares Habbo Framework", "keywords": [ - "slim4", "twig", "ares", "cosmic", "core" + "slim4", "twig", "cosmic", "core" ], "homepage": "https://github.com/raizdev/cosmic-core", "authors": @@ -13,9 +13,9 @@ "homepage": "https://github.com/raizdev", "role": "Developer" } - ],t + ], "license": "MIT", - "require":t + "require": { "matthiasmullie/minify": "^1.3", "slim/twig-view": "^3.0", diff --git a/composer.lock b/composer.lock deleted file mode 100755 index b2c228f..0000000 --- a/composer.lock +++ /dev/null @@ -1,1579 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "b693ef904e4ec549f74a86b7d3de76b9", - "packages": [ - { - "name": "doctrine/annotations", - "version": "1.13.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2021-08-05T19:00:23+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "reference": "c268e882d4dbdd85e36e4ad69e02dc284f89d229", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^1.3", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.11" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2022-02-28T11:07:21+00:00" - }, - { - "name": "juliangut/mapping", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/juliangut/mapping.git", - "reference": "8bbed342a180a6f2da9306ca9c1f6f18934ac187" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/juliangut/mapping/zipball/8bbed342a180a6f2da9306ca9c1f6f18934ac187", - "reference": "8bbed342a180a6f2da9306ca9c1f6f18934ac187", - "shasum": "" - }, - "require": { - "php": "^7.4|^8.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "~0.7", - "doctrine/annotations": "^1.10.3", - "ext-json": "*", - "ext-libxml": "*", - "grifart/phpstan-oneline": "~0.4", - "infection/infection": "~0.24", - "juliangut/php-cs-fixer-config": "^1.0", - "overtrue/phplint": "^3.0|^4.0", - "phpcompatibility/php-compatibility": "^9.3", - "phpmd/phpmd": "^2.10", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.0", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-strict-rules": "^1.0", - "phpunit/phpunit": "^9.5", - "povils/phpmnd": "^2.5", - "roave/security-advisories": "dev-master", - "sebastian/phpcpd": "^6.0", - "squizlabs/php_codesniffer": "^3.6", - "symfony/yaml": "^5.0.10", - "thecodingmachine/phpstan-strict-rules": "^1.0" - }, - "suggest": { - "doctrine/annotations": "(^1.4) In order to load mappings from class annotations", - "symfony/yaml": "(^3.1) In order to load mappings from YAML files" - }, - "type": "library", - "autoload": { - "psr-4": { - "Jgut\\Mapping\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Julián Gutiérrez", - "email": "juliangut@gmail.com", - "homepage": "http://juliangut.com", - "role": "Developer" - } - ], - "description": "Base for mapping support", - "homepage": "https://github.com/juliangut/mapping", - "keywords": [ - "annotations", - "attributes", - "doctrine", - "json", - "mapping", - "php", - "xml", - "yaml" - ], - "funding": [ - { - "url": "https://github.com/juliangut", - "type": "github" - } - ], - "time": "2022-02-04T23:35:54+00:00" - }, - { - "name": "matthiasmullie/minify", - "version": "1.3.66", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/minify.git", - "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", - "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.1", - "php": ">=5.3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "matthiasmullie/scrapbook": "dev-master", - "phpunit/phpunit": ">=4.8" - }, - "suggest": { - "psr/cache-implementation": "Cache implementation to use with Minify::cache" - }, - "bin": [ - "bin/minifycss", - "bin/minifyjs" - ], - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\Minify\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "minify@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "http://www.minifier.org", - "keywords": [ - "JS", - "css", - "javascript", - "minifier", - "minify" - ], - "funding": [ - { - "url": "https://github.com/[user1", - "type": "github" - }, - { - "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", - "type": "github" - }, - { - "url": "https://github.com/user2", - "type": "github" - } - ], - "time": "2021-01-06T15:18:10+00:00" - }, - { - "name": "matthiasmullie/path-converter", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\PathConverter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "pathconverter@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "Relative path converter", - "homepage": "http://github.com/matthiasmullie/path-converter", - "keywords": [ - "converter", - "path", - "paths", - "relative" - ], - "time": "2019-02-05T23:41:09+00:00" - }, - { - "name": "nikic/fast-route", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/nikic/FastRoute.git", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/FastRoute/zipball/181d480e08d9476e61381e04a71b34dc0432e812", - "reference": "181d480e08d9476e61381e04a71b34dc0432e812", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35|~5.7" - }, - "type": "library", - "autoload": { - "files": [ - "src/functions.php" - ], - "psr-4": { - "FastRoute\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov", - "email": "nikic@php.net" - } - ], - "description": "Fast request router for PHP", - "keywords": [ - "router", - "routing" - ], - "time": "2018-02-13T20:26:39+00:00" - }, - { - "name": "odan/session", - "version": "5.1.0", - "source": { - "type": "git", - "url": "https://github.com/odan/session.git", - "reference": "df95aeee04dec466172d4c4e0e3ac9245e8182b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/odan/session/zipball/df95aeee04dec466172d4c4e0e3ac9245e8182b0", - "reference": "df95aeee04dec466172d4c4e0e3ac9245e8182b0", - "shasum": "" - }, - "require": { - "php": "^7.3 || ^8.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "middlewares/utils": "^3.1", - "overtrue/phplint": "^1.1 || ^2.0", - "phpstan/phpstan": "0.*", - "phpunit/phpunit": "^7 || ^8 || ^9", - "slim/psr7": "^1.1", - "squizlabs/php_codesniffer": "^3.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Odan\\Session\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A Slim session handler", - "homepage": "https://github.com/odan/session", - "keywords": [ - "session", - "slim" - ], - "time": "2020-12-23T18:09:07+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "time": "2019-04-30T12:38:16+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/http-server-handler", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-handler.git", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-handler/zipball/aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "reference": "aff2f80e33b7f026ec96bb42f63242dc50ffcae7", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side request handler", - "keywords": [ - "handler", - "http", - "http-interop", - "psr", - "psr-15", - "psr-7", - "request", - "response", - "server" - ], - "time": "2018-10-30T16:46:14+00:00" - }, - { - "name": "psr/http-server-middleware", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-server-middleware.git", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-server-middleware/zipball/2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "reference": "2296f45510945530b9dceb8bcedb5cb84d40c5f5", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Server\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP server-side middleware", - "keywords": [ - "http", - "http-interop", - "middleware", - "psr", - "psr-15", - "psr-7", - "request", - "response" - ], - "time": "2018-10-30T17:12:04+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "slim/csrf", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim-Csrf.git", - "reference": "ee811a258ecee807846aefc51aabc1963ae0a400" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim-Csrf/zipball/ee811a258ecee807846aefc51aabc1963ae0a400", - "reference": "ee811a258ecee807846aefc51aabc1963ae0a400", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0" - }, - "require-dev": { - "phpspec/prophecy": "^1.12", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.5.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\Csrf\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "http://joshlockhart.com" - } - ], - "description": "Slim Framework 4 CSRF protection PSR-15 middleware", - "homepage": "http://slimframework.com", - "keywords": [ - "csrf", - "framework", - "middleware", - "slim" - ], - "time": "2021-02-04T15:37:21+00:00" - }, - { - "name": "slim/slim", - "version": "4.10.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Slim.git", - "reference": "0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0", - "reference": "0dfc7d2fdf2553b361d864d51af3fe8a6ad168b0", - "shasum": "" - }, - "require": { - "ext-json": "*", - "nikic/fast-route": "^1.3", - "php": "^7.4 || ^8.0", - "psr/container": "^1.0 || ^2.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "psr/http-server-handler": "^1.0", - "psr/http-server-middleware": "^1.0", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "require-dev": { - "adriansuter/php-autoload-override": "^1.2", - "ext-simplexml": "*", - "guzzlehttp/psr7": "^2.1", - "httpsoft/http-message": "^1.0", - "httpsoft/http-server-request": "^1.0", - "laminas/laminas-diactoros": "^2.8", - "nyholm/psr7": "^1.5", - "nyholm/psr7-server": "^1.0", - "phpspec/prophecy": "^1.15", - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^1.4", - "phpunit/phpunit": "^9.5", - "slim/http": "^1.2", - "slim/psr7": "^1.5", - "squizlabs/php_codesniffer": "^3.6" - }, - "suggest": { - "ext-simplexml": "Needed to support XML format in BodyParsingMiddleware", - "ext-xml": "Needed to support XML format in BodyParsingMiddleware", - "php-di/php-di": "PHP-DI is the recommended container library to be used with Slim", - "slim/psr7": "Slim PSR-7 implementation. See https://www.slimframework.com/docs/v4/start/installation.html for more information." - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\": "Slim" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "https://joshlockhart.com" - }, - { - "name": "Andrew Smith", - "email": "a.smith@silentworks.co.uk", - "homepage": "http://silentworks.co.uk" - }, - { - "name": "Rob Allen", - "email": "rob@akrabat.com", - "homepage": "http://akrabat.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - }, - { - "name": "Gabriel Manricks", - "email": "gmanricks@me.com", - "homepage": "http://gabrielmanricks.com" - } - ], - "description": "Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs", - "homepage": "https://www.slimframework.com", - "keywords": [ - "api", - "framework", - "micro", - "router" - ], - "funding": [ - { - "url": "https://opencollective.com/slimphp", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/slim/slim", - "type": "tidelift" - } - ], - "time": "2022-03-14T14:18:23+00:00" - }, - { - "name": "slim/twig-view", - "version": "3.3.0", - "source": { - "type": "git", - "url": "https://github.com/slimphp/Twig-View.git", - "reference": "df6dd6af6bbe28041be49c9fb8470c2e9b70cd98" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/slimphp/Twig-View/zipball/df6dd6af6bbe28041be49c9fb8470c2e9b70cd98", - "reference": "df6dd6af6bbe28041be49c9fb8470c2e9b70cd98", - "shasum": "" - }, - "require": { - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0", - "slim/slim": "^4.9", - "symfony/polyfill-php81": "^1.23", - "twig/twig": "^3.3" - }, - "require-dev": { - "phpspec/prophecy-phpunit": "^2.0", - "phpstan/phpstan": "^1.3.0", - "phpunit/phpunit": "^9.5", - "psr/http-factory": "^1.0", - "squizlabs/php_codesniffer": "^3.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "Slim\\Views\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josh Lockhart", - "email": "hello@joshlockhart.com", - "homepage": "http://joshlockhart.com" - }, - { - "name": "Pierre Berube", - "email": "pierre@lgse.com", - "homepage": "http://www.lgse.com" - } - ], - "description": "Slim Framework 4 view helper built on top of the Twig 3 templating component", - "homepage": "https://www.slimframework.com", - "keywords": [ - "framework", - "slim", - "template", - "twig", - "view" - ], - "time": "2022-01-02T05:14:45+00:00" - }, - { - "name": "spatie/array-to-xml", - "version": "2.16.0", - "source": { - "type": "git", - "url": "https://github.com/spatie/array-to-xml.git", - "reference": "db39308c5236b69b89cadc3f44f191704814eae2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/db39308c5236b69b89cadc3f44f191704814eae2", - "reference": "db39308c5236b69b89cadc3f44f191704814eae2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "php": "^7.4|^8.0" - }, - "require-dev": { - "mockery/mockery": "^1.2", - "phpunit/phpunit": "^9.0", - "spatie/phpunit-snapshot-assertions": "^4.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Spatie\\ArrayToXml\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://freek.dev", - "role": "Developer" - } - ], - "description": "Convert an array to xml", - "homepage": "https://github.com/spatie/array-to-xml", - "keywords": [ - "array", - "convert", - "xml" - ], - "funding": [ - { - "url": "https://spatie.be/open-source/support-us", - "type": "custom" - }, - { - "url": "https://github.com/spatie", - "type": "github" - } - ], - "time": "2020-11-18T22:03:17+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.5.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-07-12T14:48:14+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-10-20T20:35:02+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", - "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-11-30T18:21:41+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.25.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "reference": "5de4ba2d41b15f9bd0e19b2ab9674135813ec98f", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-09-13T13:58:11+00:00" - }, - { - "name": "symfony/yaml", - "version": "v5.4.3", - "source": { - "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "symfony/console": "<5.3" - }, - "require-dev": { - "symfony/console": "^5.3|^6.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, - "bin": [ - "Resources/bin/yaml-lint" - ], - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Yaml\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Loads and dumps YAML files", - "homepage": "https://symfony.com", - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-01-26T16:32:32+00:00" - }, - { - "name": "twig/twig", - "version": "v3.3.9", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/6ff9b0e440fa66f97f207e181c41340ddfa5683d", - "reference": "6ff9b0e440fa66f97f207e181c41340ddfa5683d", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-03-25T09:37:52+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": [], - "prefer-stable": false, - "prefer-lowest": false, - "platform": [], - "platform-dev": [], - "plugin-api-version": "1.1.0" -} diff --git a/src/Command/ClearCacheCommand.php b/src/Command/ClearCacheCommand.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Adapters/AdapterInterface.php b/src/Command/Minifier/Adapters/AdapterInterface.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Adapters/Css/MinifyAdapter.php b/src/Command/Minifier/Adapters/Css/MinifyAdapter.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Adapters/Js/MinifyAdapter.php b/src/Command/Minifier/Adapters/Js/MinifyAdapter.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Commands/MinifyAll.php b/src/Command/Minifier/Commands/MinifyAll.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Commands/MinifyCss.php b/src/Command/Minifier/Commands/MinifyCss.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Commands/MinifyJs.php b/src/Command/Minifier/Commands/MinifyJs.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Exceptions/ExceptionInterface.php b/src/Command/Minifier/Exceptions/ExceptionInterface.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Exceptions/MinifierException.php b/src/Command/Minifier/Exceptions/MinifierException.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Language/en/Minifier.php b/src/Command/Minifier/Language/en/Minifier.php old mode 100755 new mode 100644 diff --git a/src/Command/Minifier/Minifier.php b/src/Command/Minifier/Minifier.php old mode 100755 new mode 100644 diff --git a/src/Config.php b/src/Config.php old mode 100755 new mode 100644 diff --git a/src/Configuration.php b/src/Configuration.php old mode 100755 new mode 100644 diff --git a/src/Controller/BaseController.php b/src/Controller/BaseController.php old mode 100755 new mode 100644 diff --git a/src/Exception/AuthenticationException.php b/src/Exception/AuthenticationException.php old mode 100755 new mode 100644 diff --git a/src/Exception/BaseException.php b/src/Exception/BaseException.php old mode 100755 new mode 100644 diff --git a/src/Exception/ConfigException.php b/src/Exception/ConfigException.php old mode 100755 new mode 100644 diff --git a/src/Exception/CoreException.php b/src/Exception/CoreException.php old mode 100755 new mode 100644 diff --git a/src/Exception/DataObjectManagerException.php b/src/Exception/DataObjectManagerException.php old mode 100755 new mode 100644 diff --git a/src/Exception/InvalidContextException.php b/src/Exception/InvalidContextException.php old mode 100755 new mode 100644 diff --git a/src/Exception/InvalidFileException.php b/src/Exception/InvalidFileException.php old mode 100755 new mode 100644 diff --git a/src/Exception/NoSuchEntityException.php b/src/Exception/NoSuchEntityException.php old mode 100755 new mode 100644 diff --git a/src/Exception/ThrottleException.php b/src/Exception/ThrottleException.php old mode 100755 new mode 100644 diff --git a/src/Exception/ValidationException.php b/src/Exception/ValidationException.php old mode 100755 new mode 100644 diff --git a/src/Extension/DateExtension.php b/src/Extension/DateExtension.php old mode 100755 new mode 100644 diff --git a/src/Factory/AppFactory.php b/src/Factory/AppFactory.php old mode 100755 new mode 100644 diff --git a/src/Factory/DataObjectManagerFactory.php b/src/Factory/DataObjectManagerFactory.php old mode 100755 new mode 100644 diff --git a/src/Handler/ErrorHandler.php b/src/Handler/ErrorHandler.php old mode 100755 new mode 100644 diff --git a/src/Helper/LocaleHelper.php b/src/Helper/LocaleHelper.php old mode 100755 new mode 100644 diff --git a/src/Interfaces/ConfigInterface.php b/src/Interfaces/ConfigInterface.php old mode 100755 new mode 100644 diff --git a/src/Interfaces/CustomResponseCodeInterface.php b/src/Interfaces/CustomResponseCodeInterface.php old mode 100755 new mode 100644 diff --git a/src/Interfaces/CustomResponseInterface.php b/src/Interfaces/CustomResponseInterface.php old mode 100755 new mode 100644 diff --git a/src/Interfaces/HttpResponseCodeInterface.php b/src/Interfaces/HttpResponseCodeInterface.php old mode 100755 new mode 100644 diff --git a/src/Interfaces/Loadable.php b/src/Interfaces/Loadable.php old mode 100755 new mode 100644 diff --git a/src/Loader/Directory.php b/src/Loader/Directory.php old mode 100755 new mode 100644 diff --git a/src/Loader/Ini.php b/src/Loader/Ini.php old mode 100755 new mode 100644 diff --git a/src/Loader/Json.php b/src/Loader/Json.php old mode 100755 new mode 100644 diff --git a/src/Loader/Loader.php b/src/Loader/Loader.php old mode 100755 new mode 100644 diff --git a/src/Loader/Php.php b/src/Loader/Php.php old mode 100755 new mode 100644 diff --git a/src/Loader/Toml.php b/src/Loader/Toml.php old mode 100755 new mode 100644 diff --git a/src/Loader/Xml.php b/src/Loader/Xml.php old mode 100755 new mode 100644 diff --git a/src/Loader/Yaml.php b/src/Loader/Yaml.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Annotation/ArgumentTrait.php b/src/Mapping/Annotation/ArgumentTrait.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Annotation/Group.php b/src/Mapping/Annotation/Group.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Annotation/MiddlewareTrait.php b/src/Mapping/Annotation/MiddlewareTrait.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Annotation/PathTrait.php b/src/Mapping/Annotation/PathTrait.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Annotation/Route.php b/src/Mapping/Annotation/Route.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Annotation/Router.php b/src/Mapping/Annotation/Router.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/AnnotationDriver.php b/src/Mapping/Driver/AnnotationDriver.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/DriverFactory.php b/src/Mapping/Driver/DriverFactory.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/JsonDriver.php b/src/Mapping/Driver/JsonDriver.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/MappingTrait.php b/src/Mapping/Driver/MappingTrait.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/PhpDriver.php b/src/Mapping/Driver/PhpDriver.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/XmlDriver.php b/src/Mapping/Driver/XmlDriver.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Driver/YamlDriver.php b/src/Mapping/Driver/YamlDriver.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Metadata/AbstractMetadata.php b/src/Mapping/Metadata/AbstractMetadata.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Metadata/GroupMetadata.php b/src/Mapping/Metadata/GroupMetadata.php old mode 100755 new mode 100644 diff --git a/src/Mapping/Metadata/RouteMetadata.php b/src/Mapping/Metadata/RouteMetadata.php old mode 100755 new mode 100644 diff --git a/src/Middleware/AuthMiddleware.php b/src/Middleware/AuthMiddleware.php old mode 100755 new mode 100644 diff --git a/src/Middleware/BodyParserMiddleware.php b/src/Middleware/BodyParserMiddleware.php old mode 100755 new mode 100644 diff --git a/src/Middleware/ClaimMiddleware.php b/src/Middleware/ClaimMiddleware.php old mode 100755 new mode 100644 index 8e2cc41..243d469 --- a/src/Middleware/ClaimMiddleware.php +++ b/src/Middleware/ClaimMiddleware.php @@ -1,6 +1,10 @@ getHeaderLine('Authorization')); - $type = $authorization[0] ?? ''; - $credentials = $authorization[1] ?? ''; + $authorization = explode(' ', (string) $this->session->get('token')); + $credentials = $authorization[0] ?? ''; $secret = $_ENV['TOKEN_SECRET']; - if ($type === 'Bearer' && Token::validate($credentials, $secret)) { + if ($this->session->has('token') && Token::validate($credentials, $secret)) { + // Append valid token $parsedToken = Token::parser($credentials, $secret); $request = $request->withAttribute('token', $parsedToken); // Append the user id as request attribute - $request = $request->withAttribute('ares_uid', Token::getPayload($credentials, $secret)['uid']); + $request = $request->withAttribute('cosmic_uid', Token::getPayload($credentials, $secret)['uid']); + $this->session->set('user', user($request)); + } return $handler->handle($request); } -} +} \ No newline at end of file diff --git a/src/Middleware/LocaleMiddleware.php b/src/Middleware/LocaleMiddleware.php old mode 100755 new mode 100644 diff --git a/src/Middleware/ThrottleMiddleware.php b/src/Middleware/ThrottleMiddleware.php old mode 100755 new mode 100644 diff --git a/src/Model/CustomResponse.php b/src/Model/CustomResponse.php old mode 100755 new mode 100644 diff --git a/src/Model/DataObject.php b/src/Model/DataObject.php old mode 100755 new mode 100644 diff --git a/src/Model/Locale.php b/src/Model/Locale.php old mode 100755 new mode 100644 diff --git a/src/Model/Query/Collection.php b/src/Model/Query/Collection.php old mode 100755 new mode 100644 diff --git a/src/Model/Query/DataBuilder.php b/src/Model/Query/DataBuilder.php old mode 100755 new mode 100644 diff --git a/src/Model/Query/DataObjectManager.php b/src/Model/Query/DataObjectManager.php old mode 100755 new mode 100644 diff --git a/src/Model/Query/PaginatedCollection.php b/src/Model/Query/PaginatedCollection.php old mode 100755 new mode 100644 diff --git a/src/Naming/CamelCase.php b/src/Naming/CamelCase.php old mode 100755 new mode 100644 diff --git a/src/Naming/Dot.php b/src/Naming/Dot.php old mode 100755 new mode 100644 diff --git a/src/Naming/SnakeCase.php b/src/Naming/SnakeCase.php old mode 100755 new mode 100644 diff --git a/src/Naming/Strategy.php b/src/Naming/Strategy.php old mode 100755 new mode 100644 diff --git a/src/Provider/AppServiceProvider.php b/src/Provider/AppServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/CacheServiceProvider.php b/src/Provider/CacheServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/ConfigServiceProvider.php b/src/Provider/ConfigServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/LocaleServiceProvider.php b/src/Provider/LocaleServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/LoggingServiceProvider.php b/src/Provider/LoggingServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/RouteCollectorServiceProvider.php b/src/Provider/RouteCollectorServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/RouteServiceProvider.php b/src/Provider/RouteServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/SessionServiceProvider.php b/src/Provider/SessionServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/SlugServiceProvider.php b/src/Provider/SlugServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/ThrottleServiceProvider.php b/src/Provider/ThrottleServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/TwigServiceProvider.php b/src/Provider/TwigServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Provider/ValidationServiceProvider.php b/src/Provider/ValidationServiceProvider.php old mode 100755 new mode 100644 diff --git a/src/Proxy/App.php b/src/Proxy/App.php old mode 100755 new mode 100644 diff --git a/src/Repository/BaseRepository.php b/src/Repository/BaseRepository.php old mode 100755 new mode 100644 diff --git a/src/Response/AbstractResponse.php b/src/Response/AbstractResponse.php old mode 100755 new mode 100644 diff --git a/src/Response/Handler/AbstractResponseHandler.php b/src/Response/Handler/AbstractResponseHandler.php old mode 100755 new mode 100644 diff --git a/src/Response/Handler/JsonResponseHandler.php b/src/Response/Handler/JsonResponseHandler.php old mode 100755 new mode 100644 diff --git a/src/Response/Handler/ResponseTypeHandler.php b/src/Response/Handler/ResponseTypeHandler.php old mode 100755 new mode 100644 diff --git a/src/Response/Handler/TwigViewResponseHandler.php b/src/Response/Handler/TwigViewResponseHandler.php old mode 100755 new mode 100644 diff --git a/src/Response/Handler/XmlResponseHandler.php b/src/Response/Handler/XmlResponseHandler.php old mode 100755 new mode 100644 diff --git a/src/Response/PayloadResponse.php b/src/Response/PayloadResponse.php old mode 100755 new mode 100644 diff --git a/src/Response/ResponseType.php b/src/Response/ResponseType.php old mode 100755 new mode 100644 diff --git a/src/Response/ViewResponse.php b/src/Response/ViewResponse.php old mode 100755 new mode 100644 diff --git a/src/Route/Route.php b/src/Route/Route.php old mode 100755 new mode 100644 diff --git a/src/Route/RouteResolver.php b/src/Route/RouteResolver.php old mode 100755 new mode 100644 diff --git a/src/RouteCollector.php b/src/RouteCollector.php old mode 100755 new mode 100644 diff --git a/src/Service/CacheService.php b/src/Service/CacheService.php old mode 100755 new mode 100644 diff --git a/src/Service/LocaleService.php b/src/Service/LocaleService.php old mode 100755 new mode 100644 diff --git a/src/Service/TokenService.php b/src/Service/TokenService.php old mode 100755 new mode 100644 diff --git a/src/Service/ValidationService.php b/src/Service/ValidationService.php old mode 100755 new mode 100644 diff --git a/src/Strategy/RequestHandler.php b/src/Strategy/RequestHandler.php old mode 100755 new mode 100644 diff --git a/src/Strategy/RequestResponse.php b/src/Strategy/RequestResponse.php old mode 100755 new mode 100644 diff --git a/src/Strategy/RequestResponseArgs.php b/src/Strategy/RequestResponseArgs.php old mode 100755 new mode 100644 diff --git a/src/Strategy/ResponseTypeStrategyTrait.php b/src/Strategy/ResponseTypeStrategyTrait.php old mode 100755 new mode 100644 diff --git a/src/Trait/Arrayable.php b/src/Trait/Arrayable.php old mode 100755 new mode 100644 diff --git a/src/Transformer/AbstractTransformer.php b/src/Transformer/AbstractTransformer.php old mode 100755 new mode 100644 diff --git a/src/Transformer/ParameterTransformer.php b/src/Transformer/ParameterTransformer.php old mode 100755 new mode 100644