Skip to content

Commit

Permalink
Remove XCache and ZendDataCache support (#19904)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Mtangoo <stefano@hosannahighertech.co.tz>
  • Loading branch information
mtangoo and Stefano Mtangoo authored Jul 24, 2023
1 parent 6119515 commit c9917f2
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 305 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ before_test:

test_script:
- cd C:\projects\yii2
- vendor\bin\phpunit --exclude-group db,wincache,xcache,zenddata
- vendor\bin\phpunit --exclude-group db,wincache
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
env:
DEFAULT_COMPOSER_FLAGS: "--prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi"
EXTENSIONS: apcu, curl, dom, imagick, intl, mbstring, mcrypt, memcached, pdo, pdo_sqlite, sqlite
PHPUNIT_EXCLUDE_GROUP: db,wincache,xcache,zenddata
PHPUNIT_EXCLUDE_GROUP: db,wincache

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ composer.phar
phpunit.phar
# local phpunit config
/phpunit.xml
#phpunit cache
.phpunit.result.cache

# ignore dev installed apps and extensions
/apps
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ travis:
- docker-compose up --build -d
# wait for dbs ...
- sleep 10
- docker-compose run --rm php vendor/bin/phpunit -v --exclude mssql,oci,wincache,xcache,zenddata
- docker-compose run --rm php vendor/bin/phpunit -v --exclude mssql,oci,wincache

2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ build:
- sudo locale-gen fr_FR.UTF-8

override:
- command: ./vendor/bin/phpunit --verbose --exclude-group db,wincache,xcache,zenddata --colors=always --coverage-clover ./coverage.xml
- command: ./vendor/bin/phpunit --verbose --exclude-group db,wincache --colors=always --coverage-clover ./coverage.xml
on_node: 1
coverage:
file: coverage.xml
Expand Down
2 changes: 0 additions & 2 deletions docs/guide-es/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ se muestra un listado con los componentes de caché disponibles:
* [[yii\caching\MemCache]]: utiliza las extensiones de PHP [memcache](https://www.php.net/manual/es/book.memcache.php) y [memcached](https://www.php.net/manual/es/book.memcached.php). Esta opción puede ser considerada como la más rápida cuando la caché es manejada en una aplicación distribuida (ej. con varios servidores, con balance de carga, etc..)
* [[yii\redis\Cache]]: implementa un componente de caché basado en [Redis](https://redis.io/) que almacenan pares clave-valor (requiere la versión 2.6.12 de redis).
* [[yii\caching\WinCache]]: utiliza la extensión de PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension) ([ver también](https://www.php.net/manual/es/book.wincache.php)).
* [[yii\caching\XCache]] _(deprecated)_: utiliza la extensión de PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache).
* [[yii\caching\ZendDataCache]] _(deprecated)_: utiliza [Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm) como el medio fundamental de caché.

> Tip: Puedes utilizar diferentes tipos de almacenamiento de caché en la misma aplicación. Una estrategia común es la de usar almacenamiento de caché en memoria para almacenar datos que son pequeños pero que son utilizados constantemente (ej. datos estadísticos), y utilizar el almacenamiento de caché en archivos o en base de datos para guardar datos que son grandes y utilizados con menor frecuencia (ej. contenido de página).
Expand Down
4 changes: 0 additions & 4 deletions docs/guide-fr/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ Yii prend en charge un large panel de supports de stockage pour cache. Ce qui su
(une version de redis égale ou supérieure à 2.6.12 est nécessaire).
* [[yii\caching\WinCache]]: utilise le [WinCache](https://iis.net/downloads/microsoft/wincache-extension) PHP
([voir aussi l'extension](https://www.php.net/manual/fr/book.wincache.php)).
* [[yii\caching\XCache]] _(deprecated)_: utilise l'extension PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache).
* [[yii\caching\ZendDataCache]] _(deprecated)_: utilise le
[cache de données Zend](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm)
en tant que médium de cache sous-jacent.


> Tip: vous pouvez utiliser différents supports de stockage pour cache dans la même application. Une stratégie courante est d'utiliser un support de stockage pour cache basé sur la mémoire pour stocker des données de petite taille mais d'usage constant (p. ex. des données statistiques), et d'utiliser des supports de stockage pour cache basés sur des fichiers ou des bases de données pour stocker des données volumineuses et utilisées moins souvent (p. ex. des contenus de pages).
Expand Down
5 changes: 0 additions & 5 deletions docs/guide-ja/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ Yii はさまざまなキャッシュ・ストレージをサポートしてい
(Redis の バージョン 2.6.12 以降が必要とされます) 。
* [[yii\caching\WinCache]]: PHP の [WinCache](https://iis.net/downloads/microsoft/wincache-extension) エクステンションを使用します。
([参照リンク](https://www.php.net/manual/ja/book.wincache.php))
* [[yii\caching\XCache]] _(非推奨)_: PHP の [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache) 拡張モジュールを使用します。
* [[yii\caching\ZendDataCache]] _(非推奨)_:
キャッシュ・メディアとして [Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm)
を使用します。


> Tip: 同じアプリケーション内で異なるキャッシュを使用することもできます。
一般的なやり方として、小さくとも常に使用されるデータ (例えば、統計データ) を格納する場合はメモリ・ベースのキャッシュ・ストレージを使用し、
Expand Down
4 changes: 0 additions & 4 deletions docs/guide-pt-BR/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ Yii suporta uma ampla gama de sistemas de cache. A seguir um resumo:
[Redis](https://redis.io/) (requer redis versão 2.6.12 ou mais recente).
* [[yii\caching\WinCache]]: usa a extensão PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension)
([veja também](https://www.php.net/manual/pt_BR/book.wincache.php)).
* [[yii\caching\XCache]] _(deprecated)_: usa a extensão PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache).
* [[yii\caching\ZendDataCache]] _(deprecated)_: usa
[Cache de Dados Zend](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm)
como o meio de cache subjacente.


> Dica: Você pode usar vários tipos de cache na mesma aplicação. Uma estratégia comum é usar caches baseados
Expand Down
2 changes: 0 additions & 2 deletions docs/guide-ru/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ Yii поддерживает множество хранилищ кэша:
* [[yii\caching\MemCache]]: использует расширения PHP [memcache](https://www.php.net/manual/ru/book.memcache.php) и [memcached](https://www.php.net/manual/ru/book.memcached.php). Этот вариант может рассматриваться как самый быстрый при работе в распределенных приложениях (например, с несколькими серверами, балансировкой нагрузки и так далее);
* [[yii\redis\Cache]]: реализует компонент кэша на основе [Redis](https://redis.io/), хранилища ключ-значение (требуется Redis версии 2.6.12 или выше);
* [[yii\caching\WinCache]]: использует расширение PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension) ([смотрите также](https://www.php.net/manual/ru/book.wincache.php));
* [[yii\caching\XCache]] _(deprecated)_: использует расширение PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache);
* [[yii\caching\ZendDataCache]] _(deprecated)_: использует [Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm).

> Tip: Вы можете использовать разные способы хранения кэша в одном приложении. Общая стратегия заключается в использовании памяти под хранение небольших часто используемых данных (например, статистические данные). Для больших и реже используемых данных (например, содержимое страницы) лучше использовать файлы или базу данных.
Expand Down
4 changes: 0 additions & 4 deletions docs/guide-zh-CN/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ Yii 支持一系列缓存存储器,概况如下:
(需要 redis 2.6.12 及以上版本的支持 )。
* [[yii\caching\WinCache]]:使用 PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension)
[另可参考](https://www.php.net/manual/zh/book.wincache.php))扩展.
* [[yii\caching\XCache]]:使用 PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache)扩展。
* [[yii\caching\ZendDataCache]]:使用
[Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend- server.htm#data_cache_component.htm)
作为底层缓存媒介。


> Tip: 你可以在同一个应用程序中使用不同的缓存存储器。一个常见的策略是使用基于内存的缓存存储器
Expand Down
4 changes: 0 additions & 4 deletions docs/guide/caching-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ Yii supports a wide range of cache storage. The following is a summary:
(redis version 2.6.12 or higher is required).
* [[yii\caching\WinCache]]: uses PHP [WinCache](https://iis.net/downloads/microsoft/wincache-extension)
([see also](https://www.php.net/manual/en/book.wincache.php)) extension.
* [[yii\caching\XCache]] _(deprecated)_: uses PHP [XCache](https://en.wikipedia.org/wiki/List_of_PHP_accelerators#XCache) extension.
* [[yii\caching\ZendDataCache]] _(deprecated)_: uses
[Zend Data Cache](https://files.zend.com/help/Zend-Server-6/zend-server.htm#data_cache_component.htm)
as the underlying caching medium.


> Tip: You may use different cache storage in the same application. A common strategy is to use memory-based
Expand Down
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Yii Framework 2 Change Log
------------------------

- Chg #19902: Remove support for CUBRID (mtangoo)
- Chg #19891: Remove XCache and ZendDataCache support (mtangoo)


2.0.49 under development
Expand Down
1 change: 0 additions & 1 deletion framework/UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ Upgrade from Yii 2.0.13
- Replace usages of `yii\base\InvalidParamException` with `yii\base\InvalidArgumentException`.
- Replace calls to `Yii::trace()` with `Yii::debug()`.
- Remove calls to `yii\BaseYii::powered()`.
- If you are using XCache or Zend data cache, those are going away in 2.1 so you might want to start looking for an alternative.

* In case you aren't using CSRF cookies (REST APIs etc.) you should turn them off explicitly by setting
`\yii\web\Request::$enableCsrfCookie` to `false` in your config file.
Expand Down
111 changes: 0 additions & 111 deletions framework/caching/XCache.php

This file was deleted.

89 changes: 0 additions & 89 deletions framework/caching/ZendDataCache.php

This file was deleted.

2 changes: 0 additions & 2 deletions framework/classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@
'yii\caching\MemCacheServer' => YII2_PATH . '/caching/MemCacheServer.php',
'yii\caching\TagDependency' => YII2_PATH . '/caching/TagDependency.php',
'yii\caching\WinCache' => YII2_PATH . '/caching/WinCache.php',
'yii\caching\XCache' => YII2_PATH . '/caching/XCache.php',
'yii\caching\ZendDataCache' => YII2_PATH . '/caching/ZendDataCache.php',
'yii\captcha\Captcha' => YII2_PATH . '/captcha/Captcha.php',
'yii\captcha\CaptchaAction' => YII2_PATH . '/captcha/CaptchaAction.php',
'yii\captcha\CaptchaAsset' => YII2_PATH . '/captcha/CaptchaAsset.php',
Expand Down
2 changes: 1 addition & 1 deletion tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Run a group of unit tests

docker-compose run php vendor/bin/phpunit -v --group caching,db
docker-compose run php vendor/bin/phpunit -v --exclude base,caching,db,i18n,log,mutex,rbac,validators,web
docker-compose run php vendor/bin/phpunit -v --exclude mssql,oci,wincache,xcache,zenddata
docker-compose run php vendor/bin/phpunit -v --exclude mssql,oci,wincache

> Note: Documentation about [installing additional extensions](https://github.com/yiisoft/yii2-docker/blob/master/docs/install-extensions.md) can be found at `yiisoft/yii2-docker`.
Expand Down
36 changes: 0 additions & 36 deletions tests/framework/caching/XCacheTest.php

This file was deleted.

Loading

0 comments on commit c9917f2

Please sign in to comment.