Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to php8 #1

Open
wants to merge 92 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
28e296e
Switch to build stages in travis config
alcaeus Dec 23, 2017
f919da0
Merge pull request #212 from alcaeus/travis-build-stages
alcaeus Dec 23, 2017
341546f
Run phpcs in builds
alcaeus Dec 23, 2017
63f8ed6
Fix checkstyles
alcaeus Dec 23, 2017
1817d00
Fix global env
alcaeus Dec 23, 2017
b165b28
Merge pull request #213 from alcaeus/php-cs-fix
alcaeus Dec 23, 2017
b728fa8
Fix write batch execution broken with w=0
NoiseByNorthwest Jan 12, 2018
866583d
Remove reference to HHVM
derickr Jan 23, 2018
f63243f
Merge pull request #215 from derickr/patch-1
alcaeus Jan 23, 2018
1388fcb
Merge pull request #214 from SoCloz/handle-write-batch-execution-with…
alcaeus Jan 24, 2018
45ba115
Add changelog for 1.1.4
alcaeus Jan 24, 2018
4b01802
Allow using PHPUnit 7
alcaeus Mar 5, 2018
b8ac62e
Merge pull request #223 from alcaeus/bump-phpunit
alcaeus Mar 5, 2018
5507f8f
Allow mongodb+srv:// protocol
malarzm Mar 2, 2018
3e2ec06
Merge pull request #222 from malarzm/uri-prepend
alcaeus Mar 5, 2018
2fc244e
Test against 1.3 version of mongodb driver
alcaeus Mar 5, 2018
661971c
Merge pull request #224 from alcaeus/test-all-driver-versions
alcaeus Mar 5, 2018
4f21e1f
Add changelog for 1.1.5 release
alcaeus Mar 5, 2018
b2b8c62
Fix access to non-existing write results
alcaeus Jul 7, 2018
067541b
Remove unsupported phpunit config attribute
alcaeus Jul 7, 2018
838e236
Merge pull request #233 from alcaeus/fix-undefined-write-error-access
alcaeus Jul 7, 2018
3ef59fb
Merge pull request #234 from alcaeus/remove-unsupported-phpunit-confi…
alcaeus Jul 8, 2018
3222d2b
Allow "0" to be used as a key
gergderkson Jun 26, 2018
8a35d41
Add test to show keys can have "0" as a string
gergderkson Jul 9, 2018
ae806ac
Merge pull request #236 from alcaeus/allow-zero-key
alcaeus Aug 6, 2018
7ddd747
Fix typo in tests
stephanedelprat Nov 19, 2018
88a3022
Merge pull request #242 from stephanedelprat/patch-1
alcaeus Nov 25, 2018
ed75539
Test against PHP 7.3
alcaeus Dec 10, 2018
e3dad0f
Merge pull request #243 from alcaeus/test-php-7.3
alcaeus Dec 21, 2018
3de2ef7
Prevent null access when handling write results
Jan 17, 2019
e8eda20
Merge pull request #244 from Ampisoft/master
alcaeus Feb 8, 2019
6111fb9
Add changelog for 1.1.6
alcaeus Feb 8, 2019
1fe220e
Ensure options in mongo uri of integer type to be integers after extr…
kevindh89 Mar 22, 2019
e7b4b3c
Added ext-ctype as extension dependency and removed skipping of test
kevindh89 Mar 29, 2019
eae6393
Merge pull request #250 from kevindh89/master
alcaeus Apr 6, 2019
b4c2f0d
Add changelog entry for 1.1.7
alcaeus Apr 6, 2019
e41f814
Fix inserts with array objects
alcaeus Jul 14, 2019
2add900
Add changelog entry for 1.1.8
alcaeus Jul 14, 2019
b230e1f
Merge pull request #253 from alcaeus/fix-array-object-inserts
alcaeus Jul 14, 2019
8e57644
Support inserting documents with identifiers considered empty by PHP
Aug 7, 2019
0e9bc24
Add changelog entry for 1.1.9
alcaeus Aug 7, 2019
93b81eb
Merge pull request #255 from CordialExperience/allow_zero_id
alcaeus Aug 7, 2019
9d7ce40
Fix aggregate commands requiring cursor option in tests
alcaeus Nov 5, 2019
46e9830
Correctly handle index creation errors
alcaeus Nov 5, 2019
c98412e
Fix error in handling featureCompatibilityVersion response
alcaeus Nov 5, 2019
b7c11b7
Fix conversion of BulkWriteExceptions wrapping another exception
alcaeus Nov 5, 2019
09cd072
Skip test relying on removed group command
alcaeus Nov 5, 2019
2ec0bc2
Don't assert against changing validate response
alcaeus Nov 5, 2019
7cb43c9
Don't rely on document order when asserting results
alcaeus Nov 5, 2019
a14a8aa
Don't assert against full command response
alcaeus Nov 5, 2019
80abc69
Merge pull request #260 from alcaeus/fix-tests
alcaeus Nov 5, 2019
680bf9d
Implement Countable in MongoCursor
marcinrosinski Nov 3, 2019
cd2393e
Merge pull request #259 from marcinrosinski/patch-1
alcaeus Nov 5, 2019
00ee947
Implement MongoCursorInterface in MongoCursor
alcaeus Nov 6, 2019
a5650c1
Implement Countable in MongoGridFSCursor
alcaeus Nov 6, 2019
1bfccc6
Add test to ensure MongoCommandCursor implements MongoCursorInterface
alcaeus Nov 6, 2019
289478a
Merge pull request #261 from alcaeus/fix-cursorinterface-inheritance
alcaeus Nov 6, 2019
d949a7b
Add changelog for 1.1.10
alcaeus Nov 6, 2019
9f06836
Remove reference to generators on cursor destruction
alcaeus Nov 7, 2019
97b0508
Replace generators with a custom iterator
alcaeus Nov 11, 2019
15ba371
Merge pull request #262 from alcaeus/fix-generator-memory-leak
alcaeus Nov 11, 2019
159b53b
Test on PHP 7.4
alcaeus Nov 11, 2019
6a5bee2
Fix assertions that no longer work
alcaeus Nov 11, 2019
b987035
Fix tests failing due to newer MongoDB version
alcaeus Nov 11, 2019
9df482f
Only test latest driver version
alcaeus Nov 11, 2019
8fc6fb4
Merge pull request #263 from alcaeus/php-7.4-support
alcaeus Nov 11, 2019
43b6add
Add changelog for 1.1.11
alcaeus Nov 11, 2019
6206f3f
Fix typo in package description
guilliamxavier Jun 17, 2020
6605643
Merge pull request #268 from guilliamxavier/patch-1
alcaeus Jun 18, 2020
c46e6a7
Always return 1 for health in MongoClient::getHosts
alcaeus Sep 22, 2020
0f17df6
Use PHP 5.6 compatible driver release
alcaeus Sep 22, 2020
17f31ff
Merge pull request #271 from alcaeus/fix-missing-ok-field
alcaeus Oct 16, 2020
84008b0
Use PHPUnit-bridge to test on multiple PHP versions
alcaeus Oct 16, 2020
2c9d198
Test against PHP 7.4 stable
alcaeus Oct 16, 2020
5808354
Get tests to run on various PHPUnit versions
alcaeus Oct 16, 2020
3e1d2b0
Merge pull request #272 from alcaeus/phpunit-bridge
alcaeus Oct 16, 2020
da37f7f
Fix wrong handling of timezones when converting UTCDateTime
alcaeus Oct 28, 2020
cdc54b0
Merge pull request #274 from alcaeus/fix-dst-shenanigans
alcaeus Oct 30, 2020
cdf0f34
Merge branch '1.1.x' into 1.x
alcaeus Oct 30, 2020
59e32f2
Support PHP 8 (#275)
alcaeus Nov 11, 2020
b828ebc
Replace branch-alias with branch-version in composer.json
alcaeus Nov 11, 2020
a0c060d
Move continuous integration from travis-ci to GitHub Actions (#279)
alcaeus Jan 18, 2021
9c57038
Removing unused namespaces for all PHP files (#280)
alcaeus Jan 18, 2021
ed0176f
Fix PHPUnit issues (#283)
alcaeus Jul 8, 2021
e9f2cb6
Fix converting DateTimeInterface to BSON in php 7.4 (#281)
nonameffh Jul 8, 2021
0e99bf5
Provide compatibility with PHP 8.1 (#290)
alcaeus Jan 11, 2022
248d60e
Improve testing (#293)
alcaeus Aug 26, 2022
37fcd80
Add instrumentation when connecting
alcaeus Jul 20, 2023
a18be0b
Use Ubuntu 20.04 for tests (#302)
alcaeus Sep 29, 2023
7d488cc
Use internal class instead of now-removed internal function (#301)
alcaeus Sep 29, 2023
016ec62
PHP 8.2 compatibility - deprecation notice fix (#306)
stevan-tosic Nov 29, 2023
561496f
Avoid using private API to fix regression (#307)
alcaeus Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "Coding Standards"

on:
pull_request:
branches:
- "*.x"
push:
branches:
- "*.x"
schedule:
# Run workflow on every Sunday
- cron: '25 5 * * 0'

jobs:
coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "7.2"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-version }}
extensions: "mongodb"
key: "extcache-v1"

- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "mongodb"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Show driver information"
run: "php --ri mongodb"

- name: "Cache dependencies installed with Composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.json') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-normal-"

- name: "Install dependencies with Composer"
run: "composer install --no-interaction --no-progress --no-suggest"

# The -q option is required until phpcs v4 is released
- name: "Run PHP_CodeSniffer"
run: "vendor/bin/phpcs -q --no-colors --report=checkstyle | cs2pr"
171 changes: 171 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: "Tests"

on:
pull_request:
branches:
- "*.x"
push:
branches:
- "*.x"
schedule:
# Run workflow on every Sunday
- cron: '25 5 * * 0'

jobs:
verification:
name: "Verification tests"
runs-on: "ubuntu-20.04"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: "5.6"
extensions: "mongodb-1.7.5, mongo-1.6.14"
key: "extcache-v1"

- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "5.6"
tools: "pecl"
extensions: "mongodb-1.7.5, mongo-1.6.14"
coverage: "none"
ini-values: "zend.assertions=1"

- name: "Show legacy driver information"
run: "php --ri mongo"

- name: "Show driver information"
run: "php --ri mongodb"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-5.6-composer-locked-${{ hashFiles('composer.json') }}"
restore-keys: "php-5.6-composer-normal-"

- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"

- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: "3.0"

- name: "Run PHPUnit"
run: "vendor/bin/simple-phpunit -v"
env:
SYMFONY_DEPRECATIONS_HELPER: 999999
MONGODB_URI: ${{ steps.setup-mongodb.outputs.cluster-uri }}

phpunit:
name: "PHPUnit tests"
runs-on: "${{ matrix.os }}"

strategy:
fail-fast: true
matrix:
os:
- "ubuntu-20.04"
php-version:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
mongodb-version:
- "4.4"
driver-version:
- "stable"
deps:
- "normal"
include:
- deps: "low"
os: "ubuntu-20.04"
php-version: "5.6"
mongodb-version: "3.0"
driver-version: "1.2.0"
- deps: "normal"
os: "ubuntu-20.04"
php-version: "7.0"
mongodb-version: "4.4"
driver-version: "1.9.2"
- deps: "normal"
os: "ubuntu-20.04"
php-version: "7.1"
mongodb-version: "4.4"
driver-version: "1.11.1"

steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2

- name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php-version }}
extensions: "mongodb-${{ matrix.driver-version }}"
key: "extcache-v1"

- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
tools: "pecl"
extensions: "mongodb-${{ matrix.driver-version }}"
coverage: "none"
ini-values: "zend.assertions=1"

- name: "Show driver information"
run: "php --ri mongodb"

- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
with:
path: "~/.composer/cache"
key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.json') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.deps }}-"

- name: "Install dependencies with composer"
run: "composer update --no-interaction --no-progress"
if: "${{ matrix.deps == 'normal' }}"

- name: "Install lowest possible dependencies with composer"
run: "composer update --no-interaction --no-progress --prefer-dist --prefer-lowest"
if: "${{ matrix.deps == 'low' }}"

- id: setup-mongodb
uses: mongodb-labs/drivers-evergreen-tools@master
with:
version: ${{ matrix.mongodb-version }}

- name: "Run PHPUnit"
run: "vendor/bin/simple-phpunit -v"
env:
SYMFONY_DEPRECATIONS_HELPER: 999999
MONGODB_URI: ${{ steps.setup-mongodb.outputs.cluster-uri }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
composer.lock
.phpcs-cache
.phpunit.result.cache
vendor/
tests/scripts/
6 changes: 0 additions & 6 deletions .scrutinizer.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

Loading