Skip to content

Commit 000d16d

Browse files
committed
Moved Dynamodb and Firestore to their own extensions
1 parent 67602ba commit 000d16d

23 files changed

+37
-1243
lines changed

.github/workflows/testsv2.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
php-versions: ['8.0', '8.1', '8.2', '8.3']
1212
name: PHP ${{ matrix.php-versions }} quality/tests on ${{ matrix.operating-system }}
1313
env:
14-
extensions: mbstring, intl, pdo_sqlite, json, redis, grpc, couchbase-3.2.2
14+
extensions: mbstring, intl, pdo_sqlite, json, redis, couchbase-3.2.2
1515
key: cache-v1
1616
steps:
1717
- name: Checkout
@@ -63,22 +63,11 @@ jobs:
6363
restore-keys: |
6464
${{ runner.os }}-php-
6565
66-
- name: Setup GCP environment
67-
run: "./bin/ci/scripts/setup_gcp.sh || echo \"GCP setup failed (maybe due to fork limitation)\""
68-
env:
69-
BASE64_GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.BASE64_GOOGLE_APPLICATION_CREDENTIALS }}
70-
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
71-
7266
- name: Install dependencies
7367
run: ./bin/ci/scripts/install_dependencies.sh
7468

7569
- name: Run quality tools
7670
run: composer run-script quality
7771

7872
- name: Run tests
79-
env:
80-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
81-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
82-
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
83-
GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
8473
run: composer run-script tests

.travis.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ jobs:
3030
before_install:
3131
- sudo apt remove cmake
3232
- pip install cmake --upgrade
33-
# Memcached is not yet available for PHP8 (hasn't been updated since 2019): https://pecl.php.net/package/memcached
34-
# Memcache however seems to be compatible with PHP 7 and 8: https://pecl.php.net/package/memcache
35-
#
36-
# - ./bin/ci/scripts/install_arangodb.sh;
3733
- phpenv config-add bin/ci/php_common.ini
3834
- phpenv config-rm xdebug.ini
3935
- composer install
@@ -42,14 +38,11 @@ before_install:
4238
- "./bin/ci/scripts/install_couchbase.sh || echo \"Couchbase install failed\""
4339
- "./bin/ci/scripts/setup_gcp.sh || echo \"GCP setup failed\""
4440
- "pecl channel-update pecl.php.net || echo \"PECL Channel update failed\""
45-
# - yes | pecl install -f grpc-stable | grep -v --line-buffered "/tmp/pear/install/grpc"; # This pecl install is partially muted due to too much output written
46-
- "yes | ./vendor/bin/ci-pecl-install grpc | grep -v --line-buffered \"/tmp/pear/install/grpc\" || echo \"PECL GRPC install failed\""
47-
# - "yes | ./vendor/bin/ci-pecl-install apcu || echo \"PECL Apcu install failed\"" # Apcu seems to be provided In Bionic: https://docs.travis-ci.com/user/reference/bionic/#php-support
4841
- "yes | ./vendor/bin/ci-pecl-install memcache || echo \"PECL Memcache install failed\""
4942
- "yes | ./vendor/bin/ci-pecl-install memcached || echo \"PECL Memcached install failed\""
5043
- "yes | ./vendor/bin/ci-pecl-install couchbase-3.2.2 couchbase || echo \"PECL Couchbase install failed\"" # @todo UPGRADE TO COUCHBASE 4.x.x once we upgraded from Bionic to Focal
5144
install:
52-
- "[[ $TRAVIS_PHP_VERSION != \"nightly\" ]] && ./bin/ci/scripts/install_dependencies.sh || ./bin/ci/scripts/install_dependencies_lite.sh"
45+
- ./bin/ci/scripts/install_dependencies.sh
5346

5447
script:
5548
- composer run-script quality

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- __Extensions__ (💡 New in 9.2)
66
- Created an extension mechanism to allow some drivers to be loaded independently, see [README.md](README.md)
77
- Created extension for `Couchbasev4` support to its own [sub-repository](https://github.com/PHPSocialNetwork/couchbasev4-extension).
8-
- **IMPORTANT**: *AS OF v9.2* the following drivers has been **MOVED** to their own sub-repositories as a standalone extension: `Arangodb`, `Couchdb`, `Cassandra`, `Dynamodb`, `Firestore`, `Mongodb`, `Solr`. However `Couchbasev3` will stay in the core for compatibility reasons but will be deprecated.
8+
- **IMPORTANT**: *AS OF v9.2* the following drivers has been **MOVED** to their own sub-repositories as a standalone extension: `Arangodb`, `Couchdb`, `Dynamodb`, `Firestore`, `Mongodb`, `Solr`. However `Couchbasev3` will stay in the core for compatibility reasons but will be deprecated.
99
- **IMPORTANT**: *AS OF v10* extensions will have their namespaces permanently moved from `Phpfastcache\Drivers\EXT_NAME\{Config, Driver, Event, Item}` to `Phpfastcache\Extensions\Drivers\EXT_NAME\{Config, Driver, Event, Item}`. For now an alias is ensuring compatibility.
1010
- __Events__
1111
- EventManager is now scoped to its own poll if retrieved through `ExtendedCacheItemPoolTrait::->getEventManager()`. Global EventManager `EventManager::getInstance()` remains unchanged, see [EVENTS.md](./docs/EVENTS.md).

EXTENSIONS.MD

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ The 9.2 make the beginning of a new external extensions:
77
- `Arangodb`
88
- `Couchbasev4`
99
- `Couchdb`
10-
- `Cassandra`
1110
- `Dynamodb`
1211
- `Firestore`
1312
- `Mongodb`

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ The simplicity of abstraction: One class for many backend cache. You don't need
1515
### Supported drivers at this day *
1616
:bulb: Feel free to propose a driver by making a new **[Pull Request](https://github.com/PHPSocialNetwork/phpfastcache/compare)**, they are welcome !
1717

18-
| Regular drivers | High performances drivers | Development drivers _(Core)_ | Cluster-Aggregated drivers _(Core)_ |
19-
|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|--------------------------------------------|---------------------------------------|
20-
| `Apcu` _(Core)_ <br>_(APC support removed)_ | `Arangodb` _([Extension](https://github.com/PHPSocialNetwork/arangodb-extension))_ | `Devnull` | `FullReplicationCluster` |
21-
| `Dynamodb` (AWS) | `Cassandra` | `Devrandom` | `SemiReplicationCluster` |
22-
| `Files` _(Core)_ | `CouchBasev3` _(Core)_<br>_(Will be deprecated as of v10)_ | `Memory`<br>(Previously named `Memstatic`) | `MasterSlaveReplicationCluster` |
23-
| `Firestore` (GCP) | `CouchBasev4` _([Extension](https://github.com/PHPSocialNetwork/couchbasev4-extension))_ | | `RandomReplicationCluster` |
24-
| `Leveldb` _(Core)_ | `Couchdb` _([Extension](https://github.com/PHPSocialNetwork/couchdb-extension))_ | | |
25-
| `Memcache(d)` _(Core)_ | `Mongodb` _([Extension](https://github.com/PHPSocialNetwork/mongodb-extension))_ | | |
26-
| `Solr` _([Extension](https://github.com/PHPSocialNetwork/solr-extension))_ | `Predis` _(Core)_ | | |
27-
| `Sqlite` _(Core)_ | `Redis`/`RedisCluster` _(Core)_ | | |
28-
| `Wincache` _(Core)_ <br>(**Deprecated** as of v9.2, will be removed as of v10) | `Ssdb` _(Core)_ | | |
29-
| `Zend Disk Cache` _(Core)_ | `Zend Memory Cache` _(Core)_ | | |
30-
| | | | |
18+
| Regular drivers | High performances drivers | Development drivers _(Core)_ | Cluster-Aggregated drivers _(Core)_ |
19+
|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|--------------------------------------------|---------------------------------------|
20+
| `Apcu` _(Core)_ <br>_(APC support removed)_ | `Arangodb` _([Extension](https://github.com/PHPSocialNetwork/arangodb-extension))_ | `Devnull` | `FullReplicationCluster` |
21+
| `Dynamodb` _([Extension](https://github.com/PHPSocialNetwork/dynamodb-extension))_ | `Cassandra` <br> _(PHP extension is no more maintained by Datastax, might be deprecated in v10)_ | `Devrandom` | `SemiReplicationCluster` |
22+
| `Files` _(Core)_ | `CouchBasev3` _(Core)_<br>_(Will be deprecated as of v10)_ | `Memory`<br>(Previously named `Memstatic`) | `MasterSlaveReplicationCluster` |
23+
| `Firestore` _([Extension](https://github.com/PHPSocialNetwork/firestore-extension))_ | `CouchBasev4` _([Extension](https://github.com/PHPSocialNetwork/couchbasev4-extension))_ | | `RandomReplicationCluster` |
24+
| `Leveldb` _(Core)_ | `Couchdb` _([Extension](https://github.com/PHPSocialNetwork/couchdb-extension))_ | | |
25+
| `Memcache(d)` _(Core)_ | `Mongodb` _([Extension](https://github.com/PHPSocialNetwork/mongodb-extension))_ | | |
26+
| `Solr` _([Extension](https://github.com/PHPSocialNetwork/solr-extension))_ | `Predis` _(Core)_ | | |
27+
| `Sqlite` _(Core)_ | `Redis`/`RedisCluster` _(Core)_ | | |
28+
| `Wincache` _(Core)_ <br>(**Deprecated** as of v9.2, will be removed as of v10) | `Ssdb` _(Core)_ | | |
29+
| `Zend Disk Cache` _(Core)_ | `Zend Memory Cache` _(Core)_ | | |
30+
| | | | |
3131

3232
\* Driver descriptions available in [DOCS/DRIVERS.md](./docs/DRIVERS.md)
3333

3434
:new: As of v9.2 a new Couchbase extension has been released: [Couchbasev4](https://github.com/PHPSocialNetwork/couchbasev4-extension)
3535

3636
This new extension **is the beginning of a new era** for Phpfastcache along with some others:\
37-
Many drivers has been moved from the core to their own sub-repository as a standalone extension: `Arangodb`, `Couchdb`, `Cassandra`, `Dynamodb`, `Firestore`, `Mongodb`, `Solr`.\
37+
Many drivers has been moved from the core to their own sub-repository as a standalone extension: `Arangodb`, `Couchdb`, `Dynamodb`, `Firestore`, `Mongodb`, `Solr`.\
3838
They can be easily added through composer, ex: `composer install phpfastcache/couchbasev4-extension`
3939
However `Couchbasev3` **will stay in the core** for compatibility reasons but will be deprecated.
4040

bin/ci/scripts/install_dependencies.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@
33
composer self-update
44
composer validate
55
composer install
6-
#####
7-
# Travis CI have php mongodb extension locked to 1.10, so we must set the mongodb/mongodb minimum version to 1.9 :(
8-
#####
9-
composer require -W phpfastcache/phpssdb:~1.2 predis/predis:~1.1 mongodb/mongodb:~1.9 aws/aws-sdk-php:~3.2 google/cloud-firestore:~1.39
6+
composer require -W phpfastcache/phpssdb:~1.2 predis/predis:~1.1

bin/ci/scripts/install_dependencies_lite.sh

-5
This file was deleted.

bin/ci/scripts/setup_gcp.sh

-7
This file was deleted.

composer.json

+6-11
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"ext-gettext": "*",
3636
"phpmd/phpmd": "@stable",
3737
"squizlabs/php_codesniffer": "@stable",
38-
"phpstan/phpstan": "^1.5",
38+
"phpstan/phpstan": "@stable",
3939
"jetbrains/phpstorm-stubs": "dev-master",
4040
"phpfastcache/phpfastcache-devtools": "^9.2"
4141
},
@@ -45,25 +45,20 @@
4545
"ext-intl": "*",
4646
"ext-memcached": "*",
4747
"ext-cassandra": "*",
48-
"ext-grpc": "*",
4948
"ext-memcache": "*",
50-
"ext-mongodb": "*",
5149
"ext-redis": "*",
52-
"ext-xcache": "*",
5350
"ext-sqlite": "*",
5451
"ext-wincache": "*",
5552
"ext-leveldb": "*",
56-
"ext-couchbase": "*",
57-
"ext-couchbase_v3": "*",
53+
"ext-couchbase": "^3.0",
5854
"predis/predis": "^1.1",
59-
"mongodb/mongodb": "^1.9",
6055
"phpfastcache/phpssdb": "~1.1.0",
61-
"solarium/solarium": "~6.1",
62-
"doctrine/couchdb": "^dev-master#9eeb9e5",
63-
"google/cloud-firestore": "^1.20",
64-
"aws/aws-sdk-php": "~3.0",
6556
"phpfastcache/arangodb-extension": "^9.2",
57+
"phpfastcache/couchbasev4-extension": "^9.2",
6658
"phpfastcache/couchdb-extension": "^9.2",
59+
"phpfastcache/dynamodb-extension": "^9.2",
60+
"phpfastcache/firestore-extension": "^9.2",
61+
"phpfastcache/mongodb-extension": "^9.2",
6762
"phpfastcache/solr-extension": "^9.2"
6863
},
6964
"conflict": {

docs/DRIVERS.md

+7
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
* The Alternative Php User Cache (APCU) driver. A memory cache for regular performances.
66
* Arangodb **(Added in v9)**
77
* A very high-performance NoSQL driver using a key-value pair system.
8+
* :new: Is now a composer extension separated from the Phpfastcache core as of v9.2: `phpfastcache/arangodb-extension`
89
* Cassandra
910
* A very high-performance NoSQL driver using a key-value pair system. Please note that the Driver rely on php's Datastax extension: https://github.com/datastax/php-driver
11+
* As of PHP an unofficial fork has been launched due to Datastax lack of maintenance: https://github.com/he4rt/scylladb-php-driver
1012
* Cookie **(REMOVED in v9)**
1113
* A cookie driver to store non-sensitive scalar (only) data. Limited storage up to 4Ko.
1214
* Couchbase **(REMOVED in v9)**
@@ -19,6 +21,7 @@
1921
* :new: It is now a [separated extension](https://github.com/PHPSocialNetwork/couchbasev4-extension) which is no longer part of the Phpfastcache's core.
2022
* Couchdb
2123
* A very high-performance NoSQL driver using a key-value pair system.
24+
* :new: Is now a composer extension separated from the Phpfastcache core as of v9.2: `phpfastcache/couchdb-extension`
2225
* Devfalse **(REMOVED in v9)**
2326
* A development driver that return false for everything except driverCheck().
2427
* Devnull
@@ -29,10 +32,12 @@
2932
* A development driver with configurable factor chance and data length.
3033
* Dynamodb **(Added in v9)**
3134
* An AWS cloud NoSQL driver using a key-value pair system. Be careful when flushing the table as it will delete and recreate the table due to a Dynamodb limitation.
35+
* :new: Is now a composer extension separated from the Phpfastcache core as of v9.2: `phpfastcache/dynamodb-extension`
3236
* Files
3337
* A file driver that use serialization for storing data for regular performances. A _$path_ config must be specified, else the system temporary directory will be used.
3438
* Firestore **(Added in v9)**
3539
* A GCP cloud NoSQL driver using a key-value pair system. Collections are created automatically on-the-fly.
40+
* :new: Is now a composer extension separated from the Phpfastcache core as of v9.2: `phpfastcache/firestore-extension`
3641
* Leveldb
3742
* A NoSQL driver using a key-value pair system. A _$path_ config must be specified, else the system temporary directory will be used.
3843
* Memcache
@@ -43,6 +48,7 @@
4348
* The Memstatic driver is a memory static driver that expires when the script execution ends.
4449
* Mongodb
4550
* A very high-performance NoSQL driver using a key-value pair system.
51+
* :new: Is now a composer extension separated from the Phpfastcache core as of v9.2: `phpfastcache/mongodb-extension`
4652
* Predis
4753
* A high-performance memory driver using a in-memory data structure storage. Less efficient than Redis driver as it is an embedded library.
4854
* Redis/Rediscluster
@@ -52,6 +58,7 @@
5258
* A very high-performance NoSQL driver using a key-value pair system.
5359
* Solr **(Added in v9.1)**
5460
* A Solr driver that use Solarium as PHP client for good performances.
61+
* :new: Is now a composer extension separated from the Phpfastcache core as of v9.2: `phpfastcache/solr-extension`
5562
* Sqlite
5663
* A Sqlite driver that use serialization for storing data for regular performances. A _$path_ config must be specified, else the system temporary directory will be used.
5764
* Ssdb

docs/EVENTS.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -317,15 +317,7 @@ See [Arangodb extension event documentation](https://github.com/PHPSocialNetwork
317317
See [Couchdb extension event documentation](https://github.com/PHPSocialNetwork/couchdb-extension#events).
318318

319319
#### Dynamodb
320-
- onDynamodbCreateTable(*Callable* **$callback**)
321-
- **Callback arguments**
322-
- *ExtendedCacheItemPoolInterface* **$itemPool**
323-
- *EventReferenceParameter($params)* **$params** _via EventReferenceParameter object_ **(type modification forbidden)**
324-
- **Scope**
325-
- Dynamodb Driver
326-
- **Description**
327-
- Allow you to alter the parameters built used to create the table
328-
- **Risky Circular Methods**: None
320+
See [Dynamodb extension event documentation](https://github.com/PHPSocialNetwork/dynamodb-extension#events).
329321

330322
#### Solr
331323
See [Solr extension event documentation](https://github.com/PHPSocialNetwork/solr-extension#events).

0 commit comments

Comments
 (0)