chore (Symfony) use Symfony 5 + strict typing

Update Symfony version to 5
Use strict typing
This commit is contained in:
Olaf 2019-12-30 00:27:20 +01:00
parent eeb01bdca5
commit 5515c25872
11 changed files with 2433 additions and 188 deletions

View File

@ -1,10 +1,13 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\Controller;
use Gregwar\CaptchaBundle\Generator\CaptchaGenerator;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Generates a captcha via a URL
@ -13,20 +16,22 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*/
class CaptchaController extends AbstractController
{
/**
* Action that is used to generate the captcha, save its code, and stream the image
*
* @param string $key
*
* @return Response
*
* @throws NotFoundHttpException
*/
public function generateCaptchaAction($key)
/** @var CaptchaGenerator */
private $captchaGenerator;
/** @var array */
private $config;
public function __construct(CaptchaGenerator $captchaGenerator, array $config)
{
$options = $this->container->getParameter('gregwar_captcha.config');
$session = $this->get('session');
$whitelistKey = $options['whitelist_key'];
$this->captchaGenerator = $captchaGenerator;
$this->config = $config;
}
public function generateCaptchaAction(Request $request, string $key): Response
{
$session = $request->getSession();
$whitelistKey = $this->config['whitelist_key'];
$isOk = false;
if ($session->has($whitelistKey)) {
@ -37,21 +42,18 @@ class CaptchaController extends AbstractController
}
if (!$isOk) {
return $this->error($options);
return $this->error($this->config);
}
/* @var \Gregwar\CaptchaBundle\Generator\CaptchaGenerator $generator */
$generator = $this->container->get('gregwar_captcha.generator');
$persistedOptions = $session->get($key, array());
$options = array_merge($options, $persistedOptions);
$options = array_merge($this->config, $persistedOptions);
$phrase = $generator->getPhrase($options);
$generator->setPhrase($phrase);
$phrase = $this->captchaGenerator->getPhrase($options);
$this->captchaGenerator->setPhrase($phrase);
$persistedOptions['phrase'] = $phrase;
$session->set($key, $persistedOptions);
$response = new Response($generator->generate($options));
$response = new Response($this->captchaGenerator->generate($options));
$response->headers->set('Content-type', 'image/jpeg');
$response->headers->set('Pragma', 'no-cache');
$response->headers->set('Cache-Control', 'no-cache');
@ -59,20 +61,11 @@ class CaptchaController extends AbstractController
return $response;
}
/**
* Returns an empty image with status code 428 Precondition Required
*
* @param array $options
*
* @return Response
*/
protected function error($options)
private function error(array $options): Response
{
/* @var \Gregwar\CaptchaBundle\Generator\CaptchaGenerator $generator */
$generator = $this->container->get('gregwar_captcha.generator');
$generator->setPhrase('');
$this->captchaGenerator->setPhrase('');
$response = new Response($generator->generate($options));
$response = new Response($this->captchaGenerator->generate($options));
$response->setStatusCode(428);
$response->headers->set('Content-type', 'image/jpeg');
$response->headers->set('Pragma', 'no-cache');

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@ -7,21 +9,10 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
/**
* Generates the configuration tree.
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('gregwar_captcha');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC for symfony/config <= 4.1
$rootNode = $treeBuilder->root('gregwar_captcha');
}
$rootNode = $treeBuilder->getRootNode();
$rootNode
->addDefaultsIfNotSet()

View File

@ -1,7 +1,10 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\DependencyInjection;
use Exception;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
@ -17,8 +20,9 @@ class GregwarCaptchaExtension extends Extension
/**
* @param array $configs
* @param ContainerBuilder $container
* @throws Exception
*/
public function load(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container): void
{
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');

View File

@ -1,10 +1,11 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\Generator;
use Gregwar\Captcha\CaptchaBuilder;
use Gregwar\Captcha\PhraseBuilder;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\RouterInterface;
use Gregwar\Captcha\CaptchaBuilderInterface;
@ -18,24 +19,16 @@ use Gregwar\Captcha\PhraseBuilderInterface;
*/
class CaptchaGenerator
{
/**
* @var RouterInterface
*/
/** @var RouterInterface */
protected $router;
/**
* @var CaptchaBuilder
*/
/** @var CaptchaBuilder */
protected $builder;
/**
* @var PhraseBuilder
*/
/** @var PhraseBuilder */
protected $phraseBuilder;
/**
* @var ImageFileHandler
*/
/** @var ImageFileHandler */
protected $imageFileHandler;
/**
@ -56,14 +49,7 @@ class CaptchaGenerator
$this->imageFileHandler = $imageFileHandler;
}
/**
* Get the captcha URL, stream, or filename that will go in the image's src attribute
*
* @param array $options
*
* @return array
*/
public function getCaptchaCode(array &$options)
public function getCaptchaCode(array &$options): string
{
$this->builder->setPhrase($this->getPhrase($options));
@ -83,20 +69,12 @@ class CaptchaGenerator
return 'data:image/jpeg;base64,' . base64_encode($this->generate($options));
}
/**
* Sets the phrase to the builder
*/
public function setPhrase($phrase)
public function setPhrase(string $phrase): void
{
$this->builder->setPhrase($phrase);
}
/**
* @param array $options
*
* @return string
*/
public function generate(array &$options)
public function generate(array &$options): string
{
$this->builder->setDistortion($options['distortion']);
@ -149,12 +127,7 @@ class CaptchaGenerator
return $this->imageFileHandler->saveAsFile($content);
}
/**
* @param array $options
*
* @return string
*/
public function getPhrase(array &$options)
public function getPhrase(array &$options): string
{
// Get the phrase that we'll use for this image
if ($options['keep_value'] && isset($options['phrase'])) {

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\Generator;
use Symfony\Component\Finder\Finder;
@ -37,27 +39,20 @@ class ImageFileHandler
protected $expiration;
/**
* @param $imageFolder
* @param $webPath
* @param $gcFreq
* @param $expiration
* @param string $imageFolder
* @param string $webPath
* @param string $gcFreq
* @param string $expiration
*/
public function __construct($imageFolder, $webPath, $gcFreq, $expiration)
public function __construct(string $imageFolder, string $webPath, string $gcFreq, string $expiration)
{
$this->imageFolder = $imageFolder;
$this->webPath = $webPath;
$this->gcFreq = $gcFreq;
$this->expiration = $expiration;
$this->imageFolder = $imageFolder;
$this->webPath= $webPath;
$this->gcFreq = $gcFreq;
$this->expiration = $expiration;
}
/**
* Saves the provided image content as a file
*
* @param string $contents
*
* @return string
*/
public function saveAsFile($contents)
public function saveAsFile($contents):string
{
$this->createFolderIfMissing();
@ -68,12 +63,7 @@ class ImageFileHandler
return '/' . $this->imageFolder . '/' . $filename;
}
/**
* Randomly runs garbage collection on the image directory
*
* @return bool
*/
public function collectGarbage()
public function collectGarbage(): bool
{
if (!mt_rand(1, $this->gcFreq) == 1) {
return false;
@ -93,10 +83,7 @@ class ImageFileHandler
return true;
}
/**
* Creates the folder if it doesn't exist
*/
protected function createFolderIfMissing()
protected function createFolderIfMissing(): void
{
if (!file_exists($this->webPath . '/' . $this->imageFolder)) {
mkdir($this->webPath . '/' . $this->imageFolder, 0755);

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;

View File

@ -1,4 +1,5 @@
parameters:
gregwar_captcha.controller.class: Gregwar\CaptchaBundle\Controller\CaptchaController
gregwar_captcha.captcha_type.class: Gregwar\CaptchaBundle\Type\CaptchaType
gregwar_captcha.captcha_generator.class: Gregwar\CaptchaBundle\Generator\CaptchaGenerator
gregwar_captcha.image_file_handler.class: Gregwar\CaptchaBundle\Generator\ImageFileHandler
@ -6,7 +7,15 @@ parameters:
gregwar_captcha.phrase_builder.class: Gregwar\Captcha\PhraseBuilder
services:
captcha.type:
gregwar_captcha.controller:
class: '%gregwar_captcha.controller.class%'
public: true
arguments:
- '@gregwar_captcha.generator'
- '%gregwar_captcha.config%'
# captcha.type:
gregwar_captcha.type:
class: '%gregwar_captcha.captcha_type.class%'
public: true
arguments:

View File

@ -1,17 +1,18 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\Type;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Form\FormView;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Gregwar\CaptchaBundle\Validator\CaptchaValidator;
use Gregwar\CaptchaBundle\Generator\CaptchaGenerator;
@ -24,25 +25,16 @@ class CaptchaType extends AbstractType
{
const SESSION_KEY_PREFIX = '_captcha_';
/**
* @var SessionInterface
*/
/** @var SessionInterface */
protected $session;
/**
* @var CaptchaGenerator
*/
/** @var CaptchaGenerator */
protected $generator;
/**
* @var TranslatorInterface
*/
/** @var TranslatorInterface */
protected $translator;
/**
* Options
* @var array
*/
/** @var array */
private $options = array();
/**
@ -53,10 +45,10 @@ class CaptchaType extends AbstractType
*/
public function __construct(SessionInterface $session, CaptchaGenerator $generator, TranslatorInterface $translator, $options)
{
$this->session = $session;
$this->generator = $generator;
$this->translator = $translator;
$this->options = $options;
$this->session = $session;
$this->generator = $generator;
$this->translator = $translator;
$this->options = $options;
}
/**
@ -72,8 +64,8 @@ class CaptchaType extends AbstractType
$options['bypass_code'],
$options['humanity']
);
$event = \Symfony\Component\HttpKernel\Kernel::VERSION >= 2.3 ? FormEvents::POST_SUBMIT : FormEvents::POST_BIND;
$builder->addEventListener($event, array($validator, 'validate'));
$builder->addEventListener(FormEvents::POST_SUBMIT, array($validator, 'validate'));
}
/**
@ -132,36 +124,17 @@ class CaptchaType extends AbstractType
$resolver->setDefaults($this->options);
}
/**
* {@inheritdoc}
* BC for SF < 2.7
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
public function getParent(): string
{
$this->configureOptions($resolver);
return TextType::class;
}
/**
* @return string
*/
public function getParent()
{
// Not using ::class to support Symfony 2.8 w/ php>=5.3.9
return 'Symfony\Component\Form\Extension\Core\Type\TextType';
}
/**
* @return string
*/
public function getName()
public function getName(): string
{
return $this->getBlockPrefix();
}
/**
* @return string
*/
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'captcha';
}

View File

@ -1,11 +1,13 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\Validator;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Form\FormError;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Translation\TranslatorInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
/**
* Captcha validator
@ -14,23 +16,24 @@ use Symfony\Component\Translation\TranslatorInterface;
*/
class CaptchaValidator
{
/**
* @var SessionInterface
*/
/** @var SessionInterface */
private $session;
/**
* Session key to store the code
* @var string
*/
private $key;
/**
* Error message text for non-matching submissions
* @var string
*/
private $invalidMessage;
/**
* Configuration parameter used to bypass a required code match
* @var string
*/
private $bypassCode;
@ -54,20 +57,23 @@ class CaptchaValidator
* @param string $bypassCode
* @param int $humanity
*/
public function __construct(TranslatorInterface $translator, SessionInterface $session, $key, $invalidMessage, $bypassCode, $humanity)
{
public function __construct(
TranslatorInterface $translator,
SessionInterface $session,
string $key,
string $invalidMessage,
string $bypassCode,
int $humanity
) {
$this->translator = $translator;
$this->session = $session;
$this->key = $key;
$this->invalidMessage = $invalidMessage;
$this->bypassCode = (string)$bypassCode;
$this->bypassCode = $bypassCode;
$this->humanity = $humanity;
}
/**
* @param FormEvent $event
*/
public function validate(FormEvent $event)
public function validate(FormEvent $event): void
{
$form = $event->getForm();
@ -123,28 +129,16 @@ class CaptchaValidator
return $this->session->get($this->key . '_humanity', 0);
}
/**
* Updates the humanity
*/
protected function updateHumanity($newValue)
protected function updateHumanity(int $newValue): void
{
if ($newValue > 0) {
$this->session->set($this->key . '_humanity', $newValue);
} else {
$this->session->remove($this->key . '_humanity');
}
return null;
}
/**
* Process the codes
*
* @param $code
*
* @return string
*/
protected function niceize($code)
protected function niceize(string $code): string
{
return strtr(strtolower($code), 'oil', '01l');
}
@ -157,7 +151,7 @@ class CaptchaValidator
*
* @return bool
*/
protected function compare($code, $expectedCode)
protected function compare($code, $expectedCode): bool
{
return ($expectedCode !== null && is_string($expectedCode) && $this->niceize($code) == $this->niceize($expectedCode));
}

View File

@ -17,15 +17,20 @@
}
],
"require": {
"php": ">=5.3.9",
"php": "^7.2.5",
"ext-gd": "*",
"gregwar/captcha": "~1.1",
"symfony/framework-bundle": "~3.0|~4.0|~5.0",
"symfony/form": "~3.0|~4.0|~5.0",
"twig/twig": "^1.40|^2.9|^3"
"symfony/form": "~5.0",
"symfony/framework-bundle": "~5.0",
"symfony/translation": "^5.0",
"twig/twig": "^2.10|^3.0"
},
"autoload": {
"psr-4": {
"Gregwar\\CaptchaBundle\\": "/"
}
},
"config": {
"sort-packages": true
}
}

2314
composer.lock generated Normal file
View File

@ -0,0 +1,2314 @@
{
"_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#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"content-hash": "9f686195a59641f539e75c34e3d2e1b2",
"packages": [
{
"name": "gregwar/captcha",
"version": "v1.1.7",
"source": {
"type": "git",
"url": "https://github.com/Gregwar/Captcha.git",
"reference": "cf953dd79748406e0292cea8c565399681e4d345"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Gregwar/Captcha/zipball/cf953dd79748406e0292cea8c565399681e4d345",
"reference": "cf953dd79748406e0292cea8c565399681e4d345",
"shasum": ""
},
"require": {
"ext-gd": "*",
"ext-mbstring": "*",
"php": ">=5.3.0",
"symfony/finder": "*"
},
"require-dev": {
"phpunit/phpunit": "^6.4"
},
"type": "captcha",
"autoload": {
"psr-4": {
"Gregwar\\": "src/Gregwar"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Grégoire Passault",
"email": "g.passault@gmail.com",
"homepage": "http://www.gregwar.com/"
},
{
"name": "Jeremy Livingston",
"email": "jeremy.j.livingston@gmail.com"
}
],
"description": "Captcha generator",
"homepage": "https://github.com/Gregwar/Captcha",
"keywords": [
"bot",
"captcha",
"spam"
],
"time": "2018-08-17T22:57:28+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": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://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": "2017-02-14T16:28:37+00:00"
},
{
"name": "psr/event-dispatcher",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/php-fig/event-dispatcher.git",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
"shasum": ""
},
"require": {
"php": ">=7.2.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\EventDispatcher\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Standard interfaces for event handling.",
"keywords": [
"events",
"psr",
"psr-14"
],
"time": "2019-01-08T18:20:26+00:00"
},
{
"name": "psr/log",
"version": "1.1.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/log.git",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
"reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
"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": "http://www.php-fig.org/"
}
],
"description": "Common interface for logging libraries",
"homepage": "https://github.com/php-fig/log",
"keywords": [
"log",
"psr",
"psr-3"
],
"time": "2019-11-01T11:05:21+00:00"
},
{
"name": "symfony/cache",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
"reference": "6e8d978878ae5de705ec9fabbb6011cc18776bc9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/6e8d978878ae5de705ec9fabbb6011cc18776bc9",
"reference": "6e8d978878ae5de705ec9fabbb6011cc18776bc9",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/cache": "~1.0",
"psr/log": "~1.0",
"symfony/cache-contracts": "^1.1.7|^2",
"symfony/service-contracts": "^1.1|^2",
"symfony/var-exporter": "^4.4|^5.0"
},
"conflict": {
"doctrine/dbal": "<2.5",
"symfony/dependency-injection": "<4.4",
"symfony/http-kernel": "<4.4",
"symfony/var-dumper": "<4.4"
},
"provide": {
"psr/cache-implementation": "1.0",
"psr/simple-cache-implementation": "1.0",
"symfony/cache-implementation": "1.0"
},
"require-dev": {
"cache/integration-tests": "dev-master",
"doctrine/cache": "~1.6",
"doctrine/dbal": "~2.5",
"predis/predis": "~1.1",
"psr/simple-cache": "^1.0",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/var-dumper": "^4.4|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Cache\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"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 Cache component with PSR-6, PSR-16, and tags",
"homepage": "https://symfony.com",
"keywords": [
"caching",
"psr6"
],
"time": "2019-12-12T13:03:32+00:00"
},
{
"name": "symfony/cache-contracts",
"version": "v2.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache-contracts.git",
"reference": "23ed8bfc1a4115feca942cb5f1aacdf3dcdf3c16"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/cache-contracts/zipball/23ed8bfc1a4115feca942cb5f1aacdf3dcdf3c16",
"reference": "23ed8bfc1a4115feca942cb5f1aacdf3dcdf3c16",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/cache": "^1.0"
},
"suggest": {
"symfony/cache-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\Cache\\": ""
}
},
"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": "Generic abstractions related to caching",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"time": "2019-11-18T17:27:11+00:00"
},
{
"name": "symfony/config",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "7f930484966350906185ba0a604728f7898b7ba0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/7f930484966350906185ba0a604728f7898b7ba0",
"reference": "7f930484966350906185ba0a604728f7898b7ba0",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"symfony/filesystem": "^4.4|^5.0",
"symfony/polyfill-ctype": "~1.8"
},
"conflict": {
"symfony/finder": "<4.4"
},
"require-dev": {
"symfony/event-dispatcher": "^4.4|^5.0",
"symfony/finder": "^4.4|^5.0",
"symfony/messenger": "^4.4|^5.0",
"symfony/service-contracts": "^1.1|^2",
"symfony/yaml": "^4.4|^5.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
},
"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": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2019-12-18T13:50:31+00:00"
},
{
"name": "symfony/dependency-injection",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "f9dbfbf487d08f60b1c83220edcd16559d1e40a2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/f9dbfbf487d08f60b1c83220edcd16559d1e40a2",
"reference": "f9dbfbf487d08f60b1c83220edcd16559d1e40a2",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/container": "^1.0",
"symfony/service-contracts": "^1.1.6|^2"
},
"conflict": {
"symfony/config": "<5.0",
"symfony/finder": "<4.4",
"symfony/proxy-manager-bridge": "<4.4",
"symfony/yaml": "<4.4"
},
"provide": {
"psr/container-implementation": "1.0",
"symfony/service-implementation": "1.0"
},
"require-dev": {
"symfony/config": "^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/yaml": "^4.4|^5.0"
},
"suggest": {
"symfony/config": "",
"symfony/expression-language": "For using expressions in service container configuration",
"symfony/finder": "For using double-star glob patterns or when GLOB_BRACE portability is required",
"symfony/proxy-manager-bridge": "Generate service proxies to lazy load them",
"symfony/yaml": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\DependencyInjection\\": ""
},
"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": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com",
"time": "2019-12-19T16:01:11+00:00"
},
{
"name": "symfony/error-handler",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/error-handler.git",
"reference": "460863313bd3212d7c38e1b40602cbcfeeeea4a5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/error-handler/zipball/460863313bd3212d7c38e1b40602cbcfeeeea4a5",
"reference": "460863313bd3212d7c38e1b40602cbcfeeeea4a5",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/log": "^1.0",
"symfony/var-dumper": "^4.4|^5.0"
},
"require-dev": {
"symfony/http-kernel": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\ErrorHandler\\": ""
},
"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": "Symfony ErrorHandler Component",
"homepage": "https://symfony.com",
"time": "2019-12-16T14:48:47+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "7b738a51645e10f864cc25c24d232fb03f37b475"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7b738a51645e10f864cc25c24d232fb03f37b475",
"reference": "7b738a51645e10f864cc25c24d232fb03f37b475",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"symfony/event-dispatcher-contracts": "^2"
},
"conflict": {
"symfony/dependency-injection": "<4.4"
},
"provide": {
"psr/event-dispatcher-implementation": "1.0",
"symfony/event-dispatcher-implementation": "2.0"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/service-contracts": "^1.1|^2",
"symfony/stopwatch": "^4.4|^5.0"
},
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
},
"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": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2019-11-18T17:27:11+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
"version": "v2.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
"reference": "af23c2584d4577d54661c434446fb8fbed6025dd"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/af23c2584d4577d54661c434446fb8fbed6025dd",
"reference": "af23c2584d4577d54661c434446fb8fbed6025dd",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"psr/event-dispatcher": "^1"
},
"suggest": {
"symfony/event-dispatcher-implementation": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Contracts\\EventDispatcher\\": ""
}
},
"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": "Generic abstractions related to dispatching event",
"homepage": "https://symfony.com",
"keywords": [
"abstractions",
"contracts",
"decoupling",
"interfaces",
"interoperability",
"standards"
],
"time": "2019-11-18T17:27:11+00:00"
},
{
"name": "symfony/filesystem",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "1d71f670bc5a07b9ccc97dc44f932177a322d4e6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/1d71f670bc5a07b9ccc97dc44f932177a322d4e6",
"reference": "1d71f670bc5a07b9ccc97dc44f932177a322d4e6",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"symfony/polyfill-ctype": "~1.8"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"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": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2019-11-26T23:25:11+00:00"
},
{
"name": "symfony/finder",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "17874dd8ab9a19422028ad56172fb294287a701b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/17874dd8ab9a19422028ad56172fb294287a701b",
"reference": "17874dd8ab9a19422028ad56172fb294287a701b",
"shasum": ""
},
"require": {
"php": "^7.2.5"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Finder\\": ""
},
"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": "Symfony Finder Component",
"homepage": "https://symfony.com",
"time": "2019-11-18T17:27:11+00:00"
},
{
"name": "symfony/form",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/form.git",
"reference": "c57a9fe108cc7747d4e8dfb770a8066b4e906acc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/form/zipball/c57a9fe108cc7747d4e8dfb770a8066b4e906acc",
"reference": "c57a9fe108cc7747d4e8dfb770a8066b4e906acc",
"shasum": ""
},
"require": {
"php": "^7.2.5",
"symfony/event-dispatcher": "^4.4|^5.0",
"symfony/intl": "^4.4|^5.0",
"symfony/options-resolver": "^5.0",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-mbstring": "~1.0",
"symfony/property-access": "^5.0",
"symfony/service-contracts": "^1.1|^2"
},
"conflict": {
"phpunit/phpunit": "<5.4.3",
"symfony/console": "<4.4",
"symfony/dependency-injection": "<4.4",
"symfony/doctrine-bridge": "<4.4",
"symfony/framework-bundle": "<4.4",
"symfony/http-kernel": "<4.4",
"symfony/intl": "<4.4",
"symfony/translation": "<4.4",
"symfony/twig-bridge": "<4.4"
},
"require-dev": {
"doctrine/collections": "~1.0",
"symfony/config": "^4.4|^5.0",
"symfony/console": "^4.4|^5.0",
"symfony/dependency-injection": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/http-kernel": "^4.4|^5.0",
"symfony/security-csrf": "^4.4|^5.0",
"symfony/translation": "^4.4|^5.0",
"symfony/validator": "^4.4|^5.0",
"symfony/var-dumper": "^4.4|^5.0"
},
"suggest": {
"symfony/security-csrf": "For protecting forms against CSRF attacks.",
"symfony/twig-bridge": "For templating with Twig.",
"symfony/validator": "For form validation."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Form\\": ""
},
"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": "Symfony Form Component",
"homepage": "https://symfony.com",
"time": "2019-12-16T11:08:25+00:00"
},
{
"name": "symfony/framework-bundle",
"version": "v5.0.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/framework-bundle.git",
"reference": "36e51776b231d8e224da4ce4c60079540acd1c55"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/framework-bundle/zipball/36e51776b231d8e224da4ce4c60079540acd1c55",
"reference": "36e51776b231d8e224da4ce4c60079540acd1c55",
"shasum": ""
},
"require": {
"ext-xml": "*",
"php": "^7.2.5",
"symfony/cache": "^4.4|^5.0",
"symfony/config": "^5.0",
"symfony/dependency-injection": "^5.0.1",
"symfony/error-handler": "^4.4.1|^5.0.1",
"symfony/filesystem": "^4.4|^5.0",
"symfony/finder": "^4.4|^5.0",
"symfony/http-foundation": "^4.4|^5.0",
"symfony/http-kernel": "^5.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/routing": "^5.0"
},
"conflict": {
"doctrine/persistence": "<1.3",
"phpdocumentor/reflection-docblock": "<3.0",
"phpdocumentor/type-resolver": "<0.2.1",
"phpunit/phpunit": "<5.4.3",
"symfony/asset": "<4.4",
"symfony/browser-kit": "<4.4",
"symfony/console": "<4.4",
"symfony/dom-crawler": "<4.4",
"symfony/dotenv": "<4.4",
"symfony/form": "<4.4",
"symfony/http-client": "<4.4",
"symfony/lock": "<4.4",
"symfony/mailer": "<4.4",
"symfony/messenger": "<4.4",
"symfony/mime": "<4.4",
"symfony/property-info": "<4.4",
"symfony/serializer": "<4.4",
"symfony/stopwatch": "<4.4",
"symfony/translation": "<5.0",
"symfony/twig-bridge": "<4.4",
"symfony/twig-bundle": "<4.4",
"symfony/validator": "<4.4",
"symfony/web-profiler-bundle": "<4.4",
"symfony/workflow": "<4.4"
},
"require-dev": {
"doctrine/annotations": "~1.7",
"doctrine/cache": "~1.0",
"paragonie/sodium_compat": "^1.8",
"phpdocumentor/reflection-docblock": "^3.0|^4.0",
"symfony/asset": "^4.4|^5.0",
"symfony/browser-kit": "^4.4|^5.0",
"symfony/console": "^4.4|^5.0",
"symfony/css-selector": "^4.4|^5.0",
"symfony/dom-crawler": "^4.4|^5.0",
"symfony/dotenv": "^4.4|^5.0",
"symfony/expression-language": "^4.4|^5.0",
"symfony/form": "^4.4|^5.0",
"symfony/http-client": "^4.4|^5.0",
"symfony/lock": "^4.4|^5.0",
"symfony/mailer": "^4.4|^5.0",
"symfony/messenger": "^4.4|^5.0",
"symfony/mime": "^4.4|^5.0",
"symfony/polyfill-intl-icu": "~1.0",
"symfony/process": "^4.4|^5.0",
"symfony/property-info": "^4.4|^5.0",
"symfony/security-csrf": "^4.4|^5.0",
"symfony/security-http": "^4.4|^5.0",
"symfony/serializer": "^4.4|^5.0",
"symfony/stopwatch": "^4.4|^5.0",
"symfony/string": "~5.0.0",
"symfony/translation": "^5.0",
"symfony/twig-bundle": "^4.4|^5.0",
"symfony/validator": "^4.4|^5.0",
"symfony/web-link": "^4.4|^5.0",
"symfony/workflow": "^4.4|^5.0",
"symfony/yaml": "^4.4|^5.0",
"twig/twig": "^2.10|^3.0"
},
"suggest": {
"ext-apcu": "For best performance of the system caches",
"symfony/console": "For using the console commands",
"symfony/form": "For using forms",
"symfony/property-info": "For using the property_info service",
"symfony/serializer": "For using the serializer service",
"symfony/validator": "For using validation",
"symfony/web-link": "For using web links, features such as preloading, prefetching or prerendering",
"symfony/yaml": "For using the debug:config and lint:yaml commands"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "5.0-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Bundle\\FrameworkBundle\\": ""
},
"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"