This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/composer.json

207 lines
7.7 KiB
JSON
Raw Normal View History

2011-09-24 18:13:35 +01:00
{
"name": "symfony/symfony",
"type": "library",
"description": "The Symfony PHP framework",
"keywords": ["framework"],
"homepage": "https://symfony.com",
2011-09-24 18:13:35 +01:00
"license": "MIT",
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
2011-09-24 18:13:35 +01:00
}
],
"provide": {
"php-http/async-client-implementation": "*",
"php-http/client-implementation": "*",
"psr/cache-implementation": "2.0|3.0",
"psr/container-implementation": "1.1|2.0",
"psr/event-dispatcher-implementation": "1.0",
"psr/http-client-implementation": "1.0",
2021-09-24 15:10:07 +01:00
"psr/link-implementation": "1.0|2.0",
"psr/log-implementation": "1.0|2.0|3.0",
"psr/simple-cache-implementation": "1.0|2.0|3.0",
"symfony/cache-implementation": "1.1|2.0|3.0",
"symfony/event-dispatcher-implementation": "2.0|3.0",
2021-09-30 16:00:15 +01:00
"symfony/http-client-implementation": "3.0",
"symfony/service-implementation": "1.1|2.0|3.0",
"symfony/translation-implementation": "2.3|3.0"
},
2011-09-24 18:13:35 +01:00
"require": {
2021-05-19 14:18:37 +01:00
"php": ">=8.0.2",
"composer-runtime-api": ">=2.1",
2017-07-06 08:10:09 +01:00
"ext-xml": "*",
2021-01-04 11:30:20 +00:00
"friendsofphp/proxy-manager-lts": "^1.0.2",
"doctrine/event-manager": "~1.0",
"doctrine/persistence": "^2",
"twig/twig": "^2.13|^3.0.4",
"psr/cache": "^2.0|^3.0",
"psr/container": "^1.1|^2.0",
"psr/event-dispatcher": "^1.0",
2021-09-24 15:10:07 +01:00
"psr/link": "^1.1|^2.0",
"psr/log": "^1|^2|^3",
"symfony/contracts": "^2.5|^3.0",
"symfony/polyfill-ctype": "~1.8",
"symfony/polyfill-intl-grapheme": "~1.0",
2015-10-14 15:40:43 +01:00
"symfony/polyfill-intl-icu": "~1.0",
"symfony/polyfill-intl-idn": "^1.10",
"symfony/polyfill-intl-normalizer": "~1.0",
"symfony/polyfill-mbstring": "~1.0",
"symfony/polyfill-php81": "^1.23",
"symfony/polyfill-uuid": "^1.15"
2011-09-24 18:13:35 +01:00
},
"replace": {
2014-12-28 18:57:17 +00:00
"symfony/asset": "self.version",
"symfony/browser-kit": "self.version",
2016-01-18 14:59:30 +00:00
"symfony/cache": "self.version",
"symfony/config": "self.version",
"symfony/console": "self.version",
"symfony/css-selector": "self.version",
"symfony/dependency-injection": "self.version",
"symfony/debug-bundle": "self.version",
"symfony/doctrine-bridge": "self.version",
"symfony/dom-crawler": "self.version",
2017-01-11 00:13:23 +00:00
"symfony/dotenv": "self.version",
2019-07-18 11:43:22 +01:00
"symfony/error-handler": "self.version",
"symfony/event-dispatcher": "self.version",
"symfony/expression-language": "self.version",
"symfony/filesystem": "self.version",
"symfony/finder": "self.version",
"symfony/form": "self.version",
"symfony/framework-bundle": "self.version",
2019-01-27 20:00:39 +00:00
"symfony/http-client": "self.version",
"symfony/http-foundation": "self.version",
"symfony/http-kernel": "self.version",
"symfony/intl": "self.version",
"symfony/ldap": "self.version",
"symfony/lock": "self.version",
"symfony/mailer": "self.version",
"symfony/messenger": "self.version",
2019-01-14 18:00:11 +00:00
"symfony/mime": "self.version",
"symfony/monolog-bridge": "self.version",
2019-08-23 21:48:48 +01:00
"symfony/notifier": "self.version",
"symfony/options-resolver": "self.version",
"symfony/password-hasher": "self.version",
"symfony/process": "self.version",
2013-01-23 13:09:35 +00:00
"symfony/property-access": "self.version",
2015-09-23 11:26:27 +01:00
"symfony/property-info": "self.version",
"symfony/proxy-manager-bridge": "self.version",
"symfony/rate-limiter": "self.version",
"symfony/routing": "self.version",
[Semaphore] Added the component Few years ago, we have introduced the Lock component. This is a very nice component, but sometime it is not enough. Sometime you need semaphore. This is why I'm introducing this new component. From wikipedia: > In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system. A semaphore is simply a variable. This variable is used to solve critical section problems and to achieve process synchronization in the multi processing environment. A trivial semaphore is a plain variable that is changed (for example, incremented or decremented, or toggled) depending on programmer-defined conditions. This new component is more than a variable. This is an abstraction on top of different storage. To make a quick comparison with a lock: * A lock allows only 1 process to access a resource; * A semaphore allow N process to access a resource. Basically, a lock is a semaphore where `N = 1`. PHP exposes some `sem_*` functions like [`sem_acquire`](http://php.net/sem_acquire). This module provides wrappers for the System V IPC family of functions. It includes semaphores, shared memory and inter-process messaging (IPC). The Lock component has a storage that works with theses functions. It uses it with `N = 1`. Wikipedia has some [examples](https://en.wikipedia.org/wiki/Semaphore_(programming)#Examples) But I can add one more commun use case. If you are building an async system that process user data, you may want to priorise all jobs. You can achieve that by running at maximum N jobs per user at the same time. If the user has more resources, you give him more concurrent jobs (so a bigger `N`). Thanks to semaphores, it's pretty easy to know if a new job can be run. I'm not saying the following services are using semaphore, but they may solve the previous problematic with semaphores. Here is some examples: * services like testing platform where a user can test N projects concurrently (travis, circle, appveyor, insight, ...) * services that ingest lots of data (newrelic, datadog, blackfire, segment.io, ...)) * services that send email in batch (campaign monitor, mailchimp, ...) * etc... To do so, since PHP is mono-threaded, you run M PHP workers. And in each worker, you look for for the next job. When you grab a job, you try to acquires a semaphore. If you got it, you process the job. If not you try another job. FTR in other language, like Go, there are no need to run M workers, one is enough. ```php <?php use Symfony\Component\Lock\LockFactory; use Symfony\Component\Lock\Store\RedisStore as LockRedisStore; use Symfony\Component\Semaphore\SemaphoreFactory; use Symfony\Component\Semaphore\Store\RedisStore; require __DIR__.'/vendor/autoload.php'; $redis = new Redis(); $redis->connect('172.17.0.2'); // Internally, Semaphore needs a lock $lock = (new LockFactory(new LockRedisStore($redis)))->createLock('test:lock', 1); // Create a semaphore: // * name = test // * limit = 3 (it means only 3 process are allowed) // * ttl = 10 seconds : Maximum expected semaphore duration in seconds $semaphore = (new SemaphoreFactory($lock, new RedisStore($redis)))->createSemaphore('test', 3, 10); if (!$semaphore->acquire()) { echo "Could not acquire the semaphore\n"; exit(1); } // The semaphore has been acquired // Do the heavy job for ($i = 0; $i < 100; ++$i) { sleep(1); // Before the expiration, refresh the semaphore if the job is not finished yet if ($i % 9 === 0) { $semaphore->refresh(); } } // Release it when finished $semaphore->release(); ``` I looked at [packagist](https://packagist.org/?query=semaphore) and: * most of packages are using a semaphore storage for creating a lock. So there are not relevant here; * some packages need an async framework to be used (amphp for example); * the only packages really implementing a semaphore, has a really low code quality and some bugs. 1. I initially copied the Lock component since the external API is quite similar; 1. I simplified it a lot for the current use case; 1. I implemented the RedisStorage according the [redis book](https://redislabs.com/ebook/part-2-core-concepts/chapter-6-application-components-in-redis/6-3-counting-semaphores/;) 1. I forced a TTL on the storage.
2020-02-14 18:27:06 +00:00
"symfony/security-bundle": "self.version",
"symfony/security-core": "self.version",
2013-09-27 08:05:52 +01:00
"symfony/security-csrf": "self.version",
"symfony/security-guard": "self.version",
"symfony/security-http": "self.version",
[Semaphore] Added the component Few years ago, we have introduced the Lock component. This is a very nice component, but sometime it is not enough. Sometime you need semaphore. This is why I'm introducing this new component. From wikipedia: > In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system. A semaphore is simply a variable. This variable is used to solve critical section problems and to achieve process synchronization in the multi processing environment. A trivial semaphore is a plain variable that is changed (for example, incremented or decremented, or toggled) depending on programmer-defined conditions. This new component is more than a variable. This is an abstraction on top of different storage. To make a quick comparison with a lock: * A lock allows only 1 process to access a resource; * A semaphore allow N process to access a resource. Basically, a lock is a semaphore where `N = 1`. PHP exposes some `sem_*` functions like [`sem_acquire`](http://php.net/sem_acquire). This module provides wrappers for the System V IPC family of functions. It includes semaphores, shared memory and inter-process messaging (IPC). The Lock component has a storage that works with theses functions. It uses it with `N = 1`. Wikipedia has some [examples](https://en.wikipedia.org/wiki/Semaphore_(programming)#Examples) But I can add one more commun use case. If you are building an async system that process user data, you may want to priorise all jobs. You can achieve that by running at maximum N jobs per user at the same time. If the user has more resources, you give him more concurrent jobs (so a bigger `N`). Thanks to semaphores, it's pretty easy to know if a new job can be run. I'm not saying the following services are using semaphore, but they may solve the previous problematic with semaphores. Here is some examples: * services like testing platform where a user can test N projects concurrently (travis, circle, appveyor, insight, ...) * services that ingest lots of data (newrelic, datadog, blackfire, segment.io, ...)) * services that send email in batch (campaign monitor, mailchimp, ...) * etc... To do so, since PHP is mono-threaded, you run M PHP workers. And in each worker, you look for for the next job. When you grab a job, you try to acquires a semaphore. If you got it, you process the job. If not you try another job. FTR in other language, like Go, there are no need to run M workers, one is enough. ```php <?php use Symfony\Component\Lock\LockFactory; use Symfony\Component\Lock\Store\RedisStore as LockRedisStore; use Symfony\Component\Semaphore\SemaphoreFactory; use Symfony\Component\Semaphore\Store\RedisStore; require __DIR__.'/vendor/autoload.php'; $redis = new Redis(); $redis->connect('172.17.0.2'); // Internally, Semaphore needs a lock $lock = (new LockFactory(new LockRedisStore($redis)))->createLock('test:lock', 1); // Create a semaphore: // * name = test // * limit = 3 (it means only 3 process are allowed) // * ttl = 10 seconds : Maximum expected semaphore duration in seconds $semaphore = (new SemaphoreFactory($lock, new RedisStore($redis)))->createSemaphore('test', 3, 10); if (!$semaphore->acquire()) { echo "Could not acquire the semaphore\n"; exit(1); } // The semaphore has been acquired // Do the heavy job for ($i = 0; $i < 100; ++$i) { sleep(1); // Before the expiration, refresh the semaphore if the job is not finished yet if ($i % 9 === 0) { $semaphore->refresh(); } } // Release it when finished $semaphore->release(); ``` I looked at [packagist](https://packagist.org/?query=semaphore) and: * most of packages are using a semaphore storage for creating a lock. So there are not relevant here; * some packages need an async framework to be used (amphp for example); * the only packages really implementing a semaphore, has a really low code quality and some bugs. 1. I initially copied the Lock component since the external API is quite similar; 1. I simplified it a lot for the current use case; 1. I implemented the RedisStorage according the [redis book](https://redislabs.com/ebook/part-2-core-concepts/chapter-6-application-components-in-redis/6-3-counting-semaphores/;) 1. I forced a TTL on the storage.
2020-02-14 18:27:06 +00:00
"symfony/semaphore": "self.version",
"symfony/serializer": "self.version",
"symfony/stopwatch": "self.version",
"symfony/string": "self.version",
"symfony/templating": "self.version",
"symfony/translation": "self.version",
"symfony/twig-bridge": "self.version",
"symfony/twig-bundle": "self.version",
"symfony/uid": "self.version",
"symfony/validator": "self.version",
"symfony/var-dumper": "self.version",
"symfony/var-exporter": "self.version",
2017-04-04 12:58:36 +01:00
"symfony/web-link": "self.version",
"symfony/web-profiler-bundle": "self.version",
2016-03-25 15:43:30 +00:00
"symfony/workflow": "self.version",
"symfony/yaml": "self.version"
},
2012-04-18 10:16:34 +01:00
"require-dev": {
2020-07-14 22:03:35 +01:00
"amphp/amp": "^2.5",
"amphp/http-client": "^4.2.1",
"amphp/http-tunnel": "^1.0",
"async-aws/ses": "^1.0",
"async-aws/sqs": "^1.0",
2020-11-19 22:18:39 +00:00
"async-aws/sns": "^1.0",
"cache/integration-tests": "dev-master",
"doctrine/annotations": "^1.13.1",
"doctrine/collections": "~1.0",
"doctrine/data-fixtures": "^1.1",
"doctrine/dbal": "^2.13.1|^3.0",
"doctrine/orm": "^2.7.4",
"guzzlehttp/promises": "^1.4",
"masterminds/html5": "^2.6",
"monolog/monolog": "^1.25.1|^2",
"nyholm/psr7": "^1.0",
2019-10-22 09:22:13 +01:00
"paragonie/sodium_compat": "^1.8",
2020-04-25 20:39:02 +01:00
"pda/pheanstalk": "^4.0",
"php-http/httplug": "^1.0|^2.0",
"phpstan/phpdoc-parser": "^1.0",
"predis/predis": "~1.1",
"psr/http-client": "^1.0",
"psr/simple-cache": "^1.0|^2.0|^3.0",
2021-01-02 19:44:30 +00:00
"egulias/email-validator": "^2.1.10|^3.1",
2021-04-01 12:18:02 +01:00
"symfony/mercure-bundle": "^0.3",
2021-05-20 13:59:02 +01:00
"symfony/phpunit-bridge": "^5.4|^6.0",
"symfony/runtime": "self.version",
"symfony/security-acl": "~2.8|~3.0",
"phpdocumentor/reflection-docblock": "^5.2",
"twig/cssinliner-extra": "^2.12|^3",
"twig/inky-extra": "^2.12|^3",
"twig/markdown-extra": "^2.12|^3"
2015-09-23 11:26:27 +01:00
},
"conflict": {
"ext-psr": "<1.1|>=2",
"async-aws/core": "<1.5",
"doctrine/annotations": "<1.13.1",
"doctrine/dbal": "<2.13.1",
2021-01-02 19:44:30 +00:00
"egulias/email-validator": "~3.0.0",
"masterminds/html5": "<2.6",
"phpdocumentor/reflection-docblock": "<5.2",
"phpdocumentor/type-resolver": "<1.4.0",
"ocramius/proxy-manager": "<2.1",
"phpunit/phpunit": "<5.4.3"
},
"config": {
"allow-plugins": {
"composer/package-versions-deprecated": true,
"symfony/runtime": true
}
},
"autoload": {
2014-06-20 20:32:40 +01:00
"psr-4": {
"Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/",
"Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/",
"Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/",
"Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/",
2014-06-20 20:32:40 +01:00
"Symfony\\Bundle\\": "src/Symfony/Bundle/",
2018-08-22 07:18:58 +01:00
"Symfony\\Component\\": "src/Symfony/Component/"
},
"files": [
"src/Symfony/Component/String/Resources/functions.php"
],
"exclude-from-classmap": [
"**/Tests/"
2015-10-14 15:40:43 +01:00
]
2012-02-25 02:26:20 +00:00
},
2017-02-01 12:47:47 +00:00
"autoload-dev": {
"files": [
"src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
2017-02-01 12:47:47 +00:00
},
"repositories": [
{
"type": "path",
"url": "src/Symfony/Contracts",
"options": {
"versions": {
"symfony/contracts": "3.0.x-dev"
}
}
},
{
"type": "path",
"url": "src/Symfony/Component/Runtime"
}
],
"minimum-stability": "dev"
2011-09-24 18:13:35 +01:00
}