Skip to content

Commit 95226de

Browse files
authored
Merge pull request #838 from Geolim4/master
Released v9
2 parents 3d22dfb + a93a152 commit 95226de

File tree

406 files changed

+7871
-14632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

406 files changed

+7871
-14632
lines changed

.codeclimate.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# For full copyright and license information, please see the docs/CREDITS.txt file.
77
#
8-
# @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> https://www.phpfastcache.com
98
# @author Georges.L (Geolim4) <contact@geolim4.com>
9+
# @author Contributors https://github.com/PHPSocialNetwork/phpfastcache/graphs/contributors
1010
#
1111

1212
engines:
@@ -29,19 +29,11 @@ engines:
2929
enabled: true
3030
phpmd:
3131
enabled: true
32-
checks:
33-
CleanCode/ElseExpression:
34-
enabled: false
35-
CleanCode/BooleanArgumentFlag:
36-
enabled: false
37-
Controversial/Superglobals:
38-
enabled: false
39-
Controversial/CamelCaseVariableName:
40-
enabled: false
41-
Design/TooManyPublicMethods:
42-
enabled: false
43-
Design/NpathComplexity:
44-
enabled: false
32+
config:
33+
file_extensions:
34+
- php
35+
- inc
36+
rulesets: "phpmd.xml"
4537
ratings:
4638
paths:
4739
- "**.inc"
@@ -55,4 +47,4 @@ exclude_paths:
5547
- "bin/**"
5648
- "examples/**"
5749
- "docs/**"
58-
- "tests/**"
50+
- "tests/**"

.gitattributes

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/tests export-ignore
22
/docs/examples export-ignore
3-
/bin/ci export-ignore
4-
/bin/stubs export-ignore
3+
/bin export-ignore
54
/.github export-ignore
65
.gitattributes export-ignore
76
.gitignore export-ignore
@@ -15,4 +14,9 @@ CODING_GUIDELINE.md export-ignore
1514
phpunit.xml.dist export-ignore
1615
phpcs.xml.dist export-ignore
1716
composer.lock export-ignore
17+
quality.bat export-ignore
18+
phpstan.neon export-ignore
19+
phpstan_lite.neon export-ignore
20+
phpcs.xml export-ignore
21+
phpmd.xml export-ignore
1822
CNAME export-ignore

.github/workflows/tests.yml

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ jobs:
44
build:
55
name: Github CI - Branch
66
runs-on: ubuntu-latest
7+
environment: github-ci
78
steps:
8-
- name: Setup PHP 7.3
9+
- name: Setup PHP 8.0
910
uses: shivammathur/setup-php@v2
1011
with:
11-
php-version: '7.3'
12+
php-version: '8.0'
1213
coverage: none
13-
extensions: mbstring, intl, pdo_sqlite
14+
extensions: mbstring, intl, pdo_sqlite, json, redis, grpc
1415
ini-values: apc.enabled=1, apc.shm_size=32M, apc.ttl=7200, apc.enable_cli=1, apc.serializer=php
16+
1517
- name: Setup Memcached server
1618
uses: niden/actions-memcached@v7
1719
- name: Setup Redis server
@@ -23,32 +25,28 @@ jobs:
2325
- name: Validate composer.json and composer.lock
2426
run: composer validate
2527

28+
- name: Setup GCP environment
29+
run: "./bin/ci/scripts/setup_gcp.sh || echo \"GCP setup failed (maybe due to fork limitation)\""
30+
env:
31+
BASE64_GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.BASE64_GOOGLE_APPLICATION_CREDENTIALS }}
32+
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
33+
2634
- name: Install dependencies
27-
run: composer install --prefer-dist --no-progress --no-suggest
35+
run: ./bin/ci/scripts/install_dependencies.sh
2836

29-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
30-
# Docs: https://getcomposer.org/doc/articles/scripts.md
31-
- name: Run tests on PHP 7.3
32-
run: php -f ./bin/ci/run_tests.php
33-
- name: Setup PHP 7.4
34-
uses: shivammathur/setup-php@v2
35-
with:
36-
php-version: '7.4'
37-
coverage: none
38-
extensions: mbstring, intl, pdo_sqlite, json
39-
ini-values: apc.enabled=1, apc.shm_size=32M, apc.ttl=7200, apc.enable_cli=1, apc.serializer=php
40-
- name: Run tests on PHP 7.4
41-
run: php -f ./bin/ci/run_tests.php
42-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
43-
# Docs: https://getcomposer.org/doc/articles/scripts.md
44-
- name: Run tests on PHP 8.0
45-
run: php -f ./bin/ci/run_tests.php
46-
- name: Setup PHP 8.0
47-
uses: shivammathur/setup-php@v2
48-
with:
49-
php-version: '8.0'
50-
coverage: none
51-
extensions: mbstring, intl, pdo_sqlite, json
52-
ini-values: apc.enabled=1, apc.shm_size=32M, apc.ttl=7200, apc.enable_cli=1, apc.serializer=php
53-
- name: Run tests on PHP 8.0
37+
- name: Run PHPCS
38+
run: ./vendor/bin/phpcs lib/ --report=summary
39+
40+
- name: Run PHPMD
41+
run: ./vendor/bin/phpmd lib/ ansi phpmd.xml
42+
43+
- name: Run PHPSTAN (lite)
44+
run: ./vendor/bin/phpstan analyse lib/ -l 2 -c phpstan_lite.neon 2>&1
45+
46+
- name: Run TESTS
47+
env:
48+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
49+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
50+
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
51+
GOOGLE_CLOUD_PROJECT: ${{ secrets.GOOGLE_CLOUD_PROJECT }}
5452
run: php -f ./bin/ci/run_tests.php

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,3 +232,4 @@ vendor/
232232
# composer.lock
233233
composer.phar
234234
/cache/
235+
/composer.lock

.scrutinizer.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55
#
66
# For full copyright and license information, please see the docs/CREDITS.txt file.
77
#
8-
# @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> https://www.phpfastcache.com
98
# @author Georges.L (Geolim4) <contact@geolim4.com>
9+
# @author Contributors https://github.com/PHPSocialNetwork/phpfastcache/graphs/contributors
1010
#
1111

1212
before_commands:
13-
- "composer install --no-dev --prefer-source"
14-
- "composer require predis/predis \"~1.1.0\""
15-
- "composer require mongodb/mongodb \"^1.1\""
16-
- "composer require phpfastcache/phpssdb ~1.0.0\""
17-
- "composer require phpfastcache/couchdb \"~1.0.0\""
13+
- "./bin/ci/scripts/install_dependencies.sh"
1814
build:
1915
nodes:
2016
analysis:
@@ -24,7 +20,7 @@ build:
2420
override: [php-scrutinizer-run]
2521
environment:
2622
php:
27-
version: 7.0.0
23+
version: 8.0.0
2824
checks:
2925
php: true
3026
coding_style:
@@ -46,7 +42,7 @@ tools:
4642
php_code_coverage: true
4743
php_code_sniffer:
4844
config:
49-
standard: PSR2
45+
standard: PSR12
5046
enabled: true
5147
filter:
5248
paths:
@@ -55,4 +51,4 @@ tools:
5551
enabled: true
5652
filter:
5753
paths:
58-
- lib/*
54+
- lib/*

.travis.yml

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
#
66
# For full copyright and license information, please see the docs/CREDITS.txt file.
77
#
8-
# @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> https://www.phpfastcache.com
98
# @author Georges.L (Geolim4) <contact@geolim4.com>
9+
# @author Contributors https://github.com/PHPSocialNetwork/phpfastcache/graphs/contributors
1010
#
1111
os: linux
1212
dist: bionic
@@ -17,12 +17,13 @@ services:
1717
- redis
1818
- mongodb
1919
- docker
20-
20+
cache:
21+
directories:
22+
- $HOME/pecl_cache
2123
php:
22-
- 7.3
23-
- 7.4
2424
- 8.0
25-
- nightly
25+
# - 8.1 # Uncomment this when 8.1 will be released
26+
# - nightly # nightly is currently too much unstable many bundled extension are not available...
2627
jobs:
2728
fast_finish: true
2829
allow_failures:
@@ -32,25 +33,29 @@ before_install:
3233
# Memcached is not yet available for PHP8 (hasn't been updated since 2019): https://pecl.php.net/package/memcached
3334
# Memcache however seems to be compatible with PHP 7 and 8: https://pecl.php.net/package/memcache
3435
#
35-
- |
36-
./bin/ci/scripts/setup_couchdb.sh;
37-
./bin/ci/scripts/setup_mongodb.sh
38-
./bin/ci/scripts/setup_couchbase.sh;
39-
pecl channel-update pecl.php.net;
40-
yes | pecl install -f mongodb-stable;
41-
yes | pecl install -f apcu-stable || true;
42-
yes | pecl install -f memcache;
43-
yes | pecl install -f couchbase-stable;
44-
- |
45-
if [[ $TRAVIS_PHP_VERSION == "8."* || $TRAVIS_PHP_VERSION == "nightly" ]]; then
46-
phpenv config-add bin/ci/php8_phpfastcache.ini;
47-
else
48-
phpenv config-add bin/ci/php7_phpfastcache.ini;
49-
fi
50-
- phpenv config-add bin/ci/php_common.ini;
36+
# - ./bin/ci/scripts/install_arangodb.sh;
37+
- composer install
38+
- composer require phwoolcon/ci-pecl-cacher -n
39+
- "./bin/ci/scripts/install_arangodb.sh || echo \"Arangodb install failed\""
40+
- "./bin/ci/scripts/install_ssdb.sh || echo \"SSDB install failed\""
41+
- "./bin/ci/scripts/install_couchdb.sh || echo \"Couchdb install failed\""
42+
- "./bin/ci/scripts/install_couchbase.sh || echo \"Couchbase install failed\""
43+
- "./bin/ci/scripts/setup_mongodb.sh || echo \"Setup Mongodb failed\""
44+
- "./bin/ci/scripts/setup_gcp.sh || echo \"GCP setup failed\""
45+
- "pecl channel-update pecl.php.net || echo \"PECL Channel update failed\""
46+
# - 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
47+
- "yes | ./vendor/bin/ci-pecl-install grpc | grep -v --line-buffered \"/tmp/pear/install/grpc\" || echo \"PECL GRPC install failed\""
48+
#- "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
49+
# - "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
50+
- "yes | ./vendor/bin/ci-pecl-install memcache || echo \"PECL Memcache install failed\""
51+
- "yes | ./vendor/bin/ci-pecl-install couchbase || echo \"PECL Couchbase install failed\""
52+
- phpenv config-add bin/ci/php_common.ini
5153
- phpenv config-rm xdebug.ini
52-
5354
install:
54-
- ./bin/ci/scripts/install_dependencies.sh
55+
- "[[ $TRAVIS_PHP_VERSION != \"nightly\" ]] && ./bin/ci/scripts/install_dependencies.sh || ./bin/ci/scripts/install_dependencies_lite.sh"
56+
5557
script:
58+
- ./vendor/bin/phpcs lib/ --report=summary
59+
- ./vendor/bin/phpmd lib/ ansi phpmd.xml
60+
- "[[ $TRAVIS_PHP_VERSION != \"nightly\" ]] && ./vendor/bin/phpstan analyse lib/ -l 2 -c phpstan.neon 2>&1 || ./vendor/bin/phpstan analyse lib/ -l 2 -c phpstan_lite.neon 2>&1"
5661
- php -f ./bin/ci/run_tests.php

0 commit comments

Comments
 (0)