Skip to content

Commit 67602ba

Browse files
committed
Moved Mongodb and Solr to their own extensions
1 parent 11281ff commit 67602ba

21 files changed

+34
-1477
lines changed

.github/ISSUE_TEMPLATE/bug-report-extension.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ body:
2828
attributes:
2929
label: Which extension is this issue about ?
3030
options:
31+
- Arangodb
3132
- Couchbasev4
33+
- Couchdb
34+
- Mongodb
35+
- Solr
3236
validations:
3337
required: true
3438
- type: dropdown
@@ -68,7 +72,7 @@ body:
6872
The connector and/or SDK version + the database version if applicable, ex:
6973
- Couchbase 7.1.0 + PECL Extension 3.2.2
7074
- Redis 7.0.0 + PECL Extension 5.3.7
71-
- MongoDB 5.0.2 Community + mongodb/mongodb
75+
- MongoDB 5.0.2 Community + mongodb/mongodb version x.x.x
7276
- etc
7377
7478
**Be as much detailed as you can be !**

.github/workflows/testsv2.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Phpfastcache Tests
22
on: [push, pull_request]
33
jobs:
44
run:
5+
environment: github-ci
56
runs-on: ${{ matrix.operating-system }}
67
timeout-minutes: 60
78
strategy:

.scrutinizer.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
build:
1313
dependencies:
1414
override:
15-
- "composer require -W --ignore-platform-reqs phpfastcache/phpssdb:~1.1 predis/predis:~1.1 mongodb/mongodb:~1.9 aws/aws-sdk-php:~3.2 google/cloud-firestore:~1.20 solarium/solarium:~6.1"
15+
- "composer require -W --ignore-platform-reqs phpfastcache/phpssdb:~1.1 predis/predis:~1.1 aws/aws-sdk-php:~3.2 google/cloud-firestore:~1.20 solarium/solarium:~6.1"
1616
nodes:
1717
analysis:
1818
project_setup:

.travis.yml

-5
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ language: php
1515
services:
1616
- memcached
1717
- redis
18-
- mongodb
19-
- docker
2018
cache:
2119
directories:
2220
- $HOME/pecl_cache
@@ -40,15 +38,12 @@ before_install:
4038
- phpenv config-rm xdebug.ini
4139
- composer install
4240
- composer require phwoolcon/ci-pecl-cacher -n
43-
- "./bin/ci/scripts/install_solr.sh || echo \"Solr install failed\""
4441
- "./bin/ci/scripts/install_ssdb.sh || echo \"SSDB install failed\""
4542
- "./bin/ci/scripts/install_couchbase.sh || echo \"Couchbase install failed\""
46-
- "./bin/ci/scripts/setup_mongodb.sh || echo \"Setup Mongodb failed\""
4743
- "./bin/ci/scripts/setup_gcp.sh || echo \"GCP setup failed\""
4844
- "pecl channel-update pecl.php.net || echo \"PECL Channel update failed\""
4945
# - 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
5046
- "yes | ./vendor/bin/ci-pecl-install grpc | grep -v --line-buffered \"/tmp/pear/install/grpc\" || echo \"PECL GRPC install failed\""
51-
#- "yes | (./vendor/bin/ci-pecl-install mongodb) || echo \"PECL Mongodb install failed\"" # Mongodb seems to be provided In Bionic: https://docs.travis-ci.com/user/reference/bionic/#php-support
5247
# - "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
5348
- "yes | ./vendor/bin/ci-pecl-install memcache || echo \"PECL Memcache install failed\""
5449
- "yes | ./vendor/bin/ci-pecl-install memcached || echo \"PECL Memcached install failed\""

CHANGELOG.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
- __API__
44
- Upgraded Phpfastcache API to `4.3.0` ([see changes](CHANGELOG_API.md))
55
- __Extensions__ (💡 New in 9.2)
6-
- Created an extension mechanism to allow future driver to be loaded independently, see [README.md](README.md)
7-
- Created first extension for `Couchbasev4` support which will be moved to a [sub-repository](https://github.com/PHPSocialNetwork/couchbasev4-extension).
8-
- **IMPORTANT**: *AS OF V10* the following drivers will be **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.
6+
- Created an extension mechanism to allow some drivers to be loaded independently, see [README.md](README.md)
7+
- 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.
9+
- **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.
910
- __Events__
1011
- 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).
1112
- `EventManagerInterface::on()` now also accepts a single `string $events`.

EXTENSIONS.MD

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The 9.2 make the beginning of a new external extensions:
1111
- `Dynamodb`
1212
- `Firestore`
1313
- `Mongodb`
14+
- `Solr`
1415

1516
There's only 2 steps:
1617

README.md

+18-17
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,28 @@ 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 | Cluster-Aggregated drivers |
19-
|------------------------------------------------------------------------|------------------------------------------------------------------------------------------|--------------------------------------------|---------------------------------|
20-
| `Apcu` <br>_(APC support removed)_ | `Arangodb` | `Devnull` | `FullReplicationCluster` |
21-
| `Dynamodb` (AWS) | `Cassandra` | `Devrandom` | `SemiReplicationCluster` |
22-
| `Files` | `CouchBasev3`<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` | `Couchdb` | | |
25-
| `Memcache(d)` | `Mongodb` | | |
26-
| `Solr` _(Via [Solarium 6.x](https://github.com/solariumphp/solarium))_ | `Predis` | | |
27-
| `Sqlite` | `Redis`/`RedisCluster` | | |
28-
| `Wincache` <br>(Deprecated as of v9.2, will be removed as of v10) | `Ssdb` | | |
29-
| `Zend Disk Cache` | `Zend Memory Cache` | | |
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` (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+
| | | | |
3131

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

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

36-
This new extension **is the beginning of a new era** for Phpfastcache:\
37-
As of the v10 many drivers will be moved from the core to their own sub-repository as a standalone extension: `Arangodb`, `Couchdb`, `Cassandra`, `Dynamodb`, `Firestore`, `Mongodb`, `Solr`.\
38-
However `Couchbasev3` will stay in the core for compatibility reasons but will be deprecated.
36+
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`.\
38+
They can be easily added through composer, ex: `composer install phpfastcache/couchbasev4-extension`
39+
However `Couchbasev3` **will stay in the core** for compatibility reasons but will be deprecated.
3940

4041
---------------------------
4142
Because caching does not mean weaken your code

bin/ci/scripts/install_dependencies.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ composer install
66
#####
77
# Travis CI have php mongodb extension locked to 1.10, so we must set the mongodb/mongodb minimum version to 1.9 :(
88
#####
9-
composer require -W phpfastcache/phpssdb:~1.2 predis/predis:~1.1 mongodb/mongodb:~1.9 triagens/arangodb:~3.8 aws/aws-sdk-php:~3.2 google/cloud-firestore:~1.39 solarium/solarium:~6.1
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

bin/ci/scripts/install_solr.sh

-55
This file was deleted.

bin/ci/scripts/setup_mongodb.sh

-4
This file was deleted.

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
"google/cloud-firestore": "^1.20",
6464
"aws/aws-sdk-php": "~3.0",
6565
"phpfastcache/arangodb-extension": "^9.2",
66-
"phpfastcache/couchdb-extension": "^9.2"
66+
"phpfastcache/couchdb-extension": "^9.2",
67+
"phpfastcache/solr-extension": "^9.2"
6768
},
6869
"conflict": {
6970
"solarium/solarium": "<6.1"

docs/EVENTS.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -328,12 +328,4 @@ See [Couchdb extension event documentation](https://github.com/PHPSocialNetwork/
328328
- **Risky Circular Methods**: None
329329

330330
#### Solr
331-
- onSolrBuildEndpoint(*Callable* **$callback**)
332-
- **Callback arguments**
333-
- *ExtendedCacheItemPoolInterface* **$itemPool**
334-
- *EventReferenceParameter($params)* **$endpoints** _via EventReferenceParameter object_ **(type modification forbidden)**
335-
- **Scope**
336-
- Solr Driver
337-
- **Description**
338-
- Allow you to alter the endpoints built used to connect to Solr server
339-
- **Risky Circular Methods**: None
331+
See [Solr extension event documentation](https://github.com/PHPSocialNetwork/solr-extension#events).

0 commit comments

Comments
 (0)