pax_global_header00006660000000000000000000000064141635525530014523gustar00rootroot0000000000000052 comment=b062b1d735357da50edf8387f7a8696f3027d328 tag-interop-1.1.0/000077500000000000000000000000001416355255300137535ustar00rootroot00000000000000tag-interop-1.1.0/.github/000077500000000000000000000000001416355255300153135ustar00rootroot00000000000000tag-interop-1.1.0/.github/PULL_REQUEST_TEMPLATE.md000066400000000000000000000002041416355255300211100ustar00rootroot00000000000000This is a READ ONLY repository. Please make your pull request to https://github.com/php-cache/cache Thank you for contributing. tag-interop-1.1.0/.gitignore000066400000000000000000000000251416355255300157400ustar00rootroot00000000000000composer.lock vendor tag-interop-1.1.0/.travis.yml000066400000000000000000000005301416355255300160620ustar00rootroot00000000000000language: php sudo: false matrix: include: - php: 7.1 cache: directories: - "$HOME/.composer/cache" install: - composer update --prefer-dist --prefer-stable script: - ./vendor/bin/phpunit --coverage-clover=coverage.xml after_success: - pip install --user codecov && codecov notifications: email: false tag-interop-1.1.0/Changelog.md000066400000000000000000000003361416355255300161660ustar00rootroot00000000000000# Change Log The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. ## 1.1.0 * Support PHP 8.1 * Support for psr/cache v2 ## 1.0.1 * Support PHP 8 ## 1.0.0 * First release tag-interop-1.1.0/LICENSE000066400000000000000000000021101416355255300147520ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2015 Aaron Scherer, Tobias Nyholm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. tag-interop-1.1.0/README.md000066400000000000000000000023051416355255300152320ustar00rootroot00000000000000# Tag support for PSR-6 Cache [![Gitter](https://badges.gitter.im/php-cache/cache.svg)](https://gitter.im/php-cache/cache?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Latest Stable Version](https://poser.pugx.org/cache/tag-interop/v/stable)](https://packagist.org/packages/cache/tag-interop) [![Total Downloads](https://poser.pugx.org/cache/tag-interop/downloads)](https://packagist.org/packages/cache/tag-interop) [![Monthly Downloads](https://poser.pugx.org/cache/tag-interop/d/monthly.png)](https://packagist.org/packages/cache/tag-interop) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) This repository holds two interfaces for tagging. These interfaces will make their way into PHP Fig. Representatives from Symfony, PHP-cache and Drupal has worked together to agree on these interfaces. ### Install ```bash composer require cache/tag-interop ``` ### Use Read the [documentation on usage](http://www.php-cache.com/). ### Contribute Contributions are very welcome! Send a pull request to the [main repository](https://github.com/php-cache/cache) or report any issues you find on the [issue tracker](http://issues.php-cache.com). tag-interop-1.1.0/TaggableCacheItemInterface.php000066400000000000000000000020771416355255300215640ustar00rootroot00000000000000, Tobias Nyholm * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Cache\TagInterop; use Psr\Cache\CacheItemInterface; use Psr\Cache\InvalidArgumentException; /** * An item that supports tags. This interface is a soon-to-be-PSR. * * @author Tobias Nyholm * @author Nicolas Grekas */ interface TaggableCacheItemInterface extends CacheItemInterface { /** * Get all existing tags. These are the tags the item has when the item is * returned from the pool. * * @return array */ public function getPreviousTags(); /** * Overwrite all tags with a new set of tags. * * @param string[] $tags An array of tags * * @throws InvalidArgumentException When a tag is not valid. * * @return TaggableCacheItemInterface */ public function setTags(array $tags); } tag-interop-1.1.0/TaggableCacheItemPoolInterface.php000066400000000000000000000027171416355255300224170ustar00rootroot00000000000000, Tobias Nyholm * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Cache\TagInterop; use Psr\Cache\CacheItemPoolInterface; use Psr\Cache\InvalidArgumentException; /** * Interface for invalidating cached items using tags. This interface is a soon-to-be-PSR. * * @author Tobias Nyholm * @author Nicolas Grekas */ interface TaggableCacheItemPoolInterface extends CacheItemPoolInterface { /** * Invalidates cached items using a tag. * * @param string $tag The tag to invalidate * * @throws InvalidArgumentException When $tags is not valid * * @return bool True on success */ public function invalidateTag($tag); /** * Invalidates cached items using tags. * * @param string[] $tags An array of tags to invalidate * * @throws InvalidArgumentException When $tags is not valid * * @return bool True on success */ public function invalidateTags(array $tags); /** * {@inheritdoc} * * @return TaggableCacheItemInterface */ public function getItem($key); /** * {@inheritdoc} * * @return array|\Traversable|TaggableCacheItemInterface[] */ public function getItems(array $keys = []); } tag-interop-1.1.0/composer.json000066400000000000000000000016221416355255300164760ustar00rootroot00000000000000{ "name": "cache/tag-interop", "description": "Framework interoperable interfaces for tags", "license": "MIT", "type": "library", "keywords": [ "cache", "psr6", "tag", "psr" ], "authors": [ { "name": "Tobias Nyholm", "email": "tobias.nyholm@gmail.com", "homepage": "https://github.com/nyholm" }, { "name": "Nicolas Grekas ", "email": "p@tchwork.com", "homepage": "https://github.com/nicolas-grekas" } ], "homepage": "https://www.php-cache.com/en/latest/", "require": { "php": "^5.5 || ^7.0 || ^8.0", "psr/cache": "^1.0 || ^2.0" }, "autoload": { "psr-4": { "Cache\\TagInterop\\": "" } }, "extra": { "branch-alias": { "dev-master": "1.1-dev" } } }