Skip to content

PHPLIB-954: Add return types to all methods #1391

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

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 18 additions & 18 deletions .evergreen/config/generated/build/build-extension.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions .evergreen/config/templates/build/build-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
vars:
PHP_VERSION: "%phpVersion%"
- func: "compile extension"
# TODO: remove once 1.20.0 is released
# TODO: remove once 2.0.0 is released
vars:
EXTENSION_BRANCH: "v1.20"
EXTENSION_BRANCH: "v2.x"
- func: "upload extension"
# TODO: re-enable once 1.20.0 is released
# TODO: re-enable once 2.0.0 is released
# - name: "build-php-%phpVersion%-lowest"
# tags: ["build", "php%phpVersion%", "lowest", "pr", "tag"]
# commands:
Expand All @@ -18,7 +18,7 @@
# PHP_VERSION: "%phpVersion%"
# - func: "compile extension"
# vars:
# EXTENSION_VERSION: "1.20.0"
# EXTENSION_VERSION: "2.0.0"
# - func: "upload extension"
# - name: "build-php-%phpVersion%-next-stable"
# tags: ["build", "php%phpVersion%", "next-stable", "pr", "tag"]
Expand All @@ -28,7 +28,7 @@
# PHP_VERSION: "%phpVersion%"
# - func: "compile extension"
# vars:
# EXTENSION_BRANCH: "v1.20.0"
# EXTENSION_BRANCH: "v2.0"
# - func: "upload extension"
# - name: "build-php-%phpVersion%-next-minor"
# tags: ["build", "php%phpVersion%", "next-minor"]
Expand All @@ -38,5 +38,5 @@
# PHP_VERSION: "%phpVersion%"
# - func: "compile extension"
# vars:
# EXTENSION_BRANCH: "master"
# EXTENSION_BRANCH: "v2.x"
# - func: "upload extension"
4 changes: 2 additions & 2 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:

env:
PHP_VERSION: "8.2"
# TODO: change to "stable" once 1.20.0 is released
# TODO: change to "stable" once 2.0.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20"
DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x"

jobs:
phpcs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ on:

env:
PHP_VERSION: "8.2"
# TODO: change to "stable" once 1.20.0 is released
# TODO: change to "stable" once 2.0.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20"
DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x"

jobs:
psalm:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ on:

env:
PHP_VERSION: "8.2"
# TODO: change to "stable" once 1.20.0 is released
# TODO: change to "stable" once 2.0.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20"
DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x"

jobs:
psalm:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
- "feature/*"

env:
# TODO: change to "stable" once 1.20.0 is released
# TODO: change to "stable" once 2.0.0 is released
# DRIVER_VERSION: "stable"
DRIVER_VERSION: "mongodb/mongo-php-driver@v1.20"
DRIVER_VERSION: "mongodb/mongo-php-driver@v2.x"

jobs:
phpunit:
Expand Down
1 change: 1 addition & 0 deletions UPGRADE-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ UPGRADE FROM 1.x to 2.0
========================

* Classes in the namespace `MongoDB\Operation\` are `final`.
* All methods in interfaces and classes now define a return type.

GridFS
------
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"require": {
"php": "^8.1",
"ext-json": "*",
"ext-mongodb": "^1.20.0",
"ext-mongodb": "^2.0",
"composer-runtime-api": "^2.0",
"psr/log": "^1.1.4|^2|^3",
"symfony/polyfill-php80": "^1.27",
Expand Down
8 changes: 0 additions & 8 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@
</rule>


<!-- *********************************************************** -->
<!-- Require native type hints for all code without a BC promise -->
<!-- *********************************************************** -->
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingNativeTypeHint">
<exclude-pattern>src</exclude-pattern>
</rule>


<!-- ************************************************************* -->
<!-- Ignore errors for certain files where this is part of the API -->
<!-- ************************************************************* -->
Expand Down
Loading