[Contracts] fine tune composer.json declarations for suggest/provide
This commit is contained in:
parent
a1ca55beea
commit
8a11e76c14
@ -18,7 +18,7 @@
|
||||
"provide": {
|
||||
"psr/cache-implementation": "1.0",
|
||||
"psr/simple-cache-implementation": "1.0",
|
||||
"symfony/cache-contracts": "1.0"
|
||||
"symfony/cache-contracts-implementation": "1.0"
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
|
@ -40,7 +40,7 @@
|
||||
},
|
||||
"provide": {
|
||||
"psr/container-implementation": "1.0",
|
||||
"symfony/service-contracts": "1.0"
|
||||
"symfony/service-contracts-implementation": "1.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Component\\DependencyInjection\\": "" },
|
||||
|
@ -35,7 +35,7 @@
|
||||
"symfony/yaml": "<3.4"
|
||||
},
|
||||
"provide": {
|
||||
"symfony/translation-contracts": "1.0"
|
||||
"symfony/translation-contracts-implementation": "1.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/config": "",
|
||||
|
@ -25,6 +25,7 @@ use Psr\Cache\InvalidArgumentException;
|
||||
interface CacheInterface
|
||||
{
|
||||
/**
|
||||
* @param string $key The key of the item to retrieve from the cache
|
||||
* @param callable(ItemInterface):mixed $callback Should return the computed value for the given key/item
|
||||
* @param float|null $beta A float that, as it grows, controls the likeliness of triggering
|
||||
* early expiration. 0 disables it, INF forces immediate expiration.
|
||||
|
@ -16,8 +16,8 @@ Design Principles
|
||||
* they must be backward compatible with existing Symfony components.
|
||||
|
||||
Packages that implement specific contracts should list them in the "provide"
|
||||
section of their "composer.json" file, using the `symfony/*-contracts`
|
||||
convention (e.g. `"provide": { "symfony/cache-contracts": "1.0" }`).
|
||||
section of their "composer.json" file, using the `symfony/*-contracts-implementation`
|
||||
convention (e.g. `"provide": { "symfony/cache-contracts-implementation": "1.0" }`).
|
||||
|
||||
FAQ
|
||||
---
|
||||
|
@ -24,7 +24,10 @@
|
||||
},
|
||||
"suggest": {
|
||||
"psr/cache": "When using the Cache contracts",
|
||||
"psr/container": "When using the Service contracts"
|
||||
"psr/container": "When using the Service contracts",
|
||||
"symfony/cache-contracts-implementation": "",
|
||||
"symfony/service-contracts-implementation": "",
|
||||
"symfony/translation-contracts-implementation": ""
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Contracts\\": "" },
|
||||
|
Reference in New Issue
Block a user