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

Deprecate functionality to be removed #1441

Merged
merged 3 commits into from
Sep 25, 2024

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Sep 23, 2024

This PR deprecates the Collection::mapReduce method (PHPLIB-1533). Duplicated deprecation notices for deprecated query options have been removed.

@alcaeus alcaeus requested a review from a team as a code owner September 23, 2024 14:34
Copy link
Member

@GromNaN GromNaN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

src/Collection.php Outdated Show resolved Hide resolved

if (isset($options['oplogReplay'])) {
@trigger_error('The "oplogReplay" option is deprecated and will be removed in a future release', E_USER_DEPRECATED);
}
Copy link
Member

@jmikola jmikola Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excluding modifiers, PHPC raises its own E_DEPRECATED notice these options in the Query constructor. Does that mean users would see two deprecation notices?

As for modifiers, that seems like something we should add in PHPC 1.x before we remove the option entirely in 2.0 (PHPC-2440). I created PHPC-2452 and opened mongodb/mongo-php-driver#1680 to address that.

Copy link
Member Author

@alcaeus alcaeus Sep 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would cause duplicate deprecation notices, so we probably should remove the extra notices thrown in PHPLIB. I'll comment on mongodb/mongo-php-driver#1680 regarding the modifier deprecations, but I'll remove the query option deprecations entirely in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I repurposed this PR to remove the existing deprecation notices for query options instead of adding new ones, as PHPC already emits deprecation notices for deprecated options. The mapReduce deprecation was left in place.

@alcaeus alcaeus changed the base branch from v1.20 to v1.x September 24, 2024 11:33
@alcaeus alcaeus force-pushed the deprecate-mapReduce-query-options branch from 8c6988e to 09c78e3 Compare September 24, 2024 11:34
@alcaeus alcaeus merged commit 1837a75 into mongodb:v1.x Sep 25, 2024
31 checks passed
@alcaeus alcaeus deleted the deprecate-mapReduce-query-options branch September 25, 2024 14:01
alcaeus added a commit that referenced this pull request Sep 30, 2024
* v1.x: (95 commits)
  PHPLIB-1369 Upgrade to PHPUnit 10 (#1412)
  Higher phpunit version required (#1463)
  Fix deprecations in tests (#1458)
  Deprecate functionality to be removed (#1441)
  Expect BulkWriteException (#1455)
  Merge v1.20 into v1.x (#1447)
  PHPLIB-1525 Removes dependency to Symfony PHPUnit bridge (#1413)
  Change deprecated assertObjectHasAttribute to assertObjectHasProperty (#1432)
  Performance: Keep collections and indexes between GridFS tests (#1421)
  Add final annotations to non-internal Operation classes (#1410)
  Fix types accepted by $round (#1401)
  Replace arrayHasKey with assertArrayHasKey in tests (#1403)
  PHPLIB-1514 Make data providers static (#1404)
  PHPLIB-1515 Replace assertObjectHasAttribute with assertObjectHasProperty (#1405)
  Restore Prose22_RangeExplicitEncryptionTest (#1400)
  Remove Prose22_RangeExplicitEncryptionTest that requires ext-mongodb < 1.20 (#1394)
  Use `match` instead of `switch` when a simple value is returned (#1393)
  Remove PHPUnit functions polyfill (#1395)
  Update branch names for GHA workflows (#1390)
  PHPLIB-1419 Encode Agg builder objects in Collection methods (#1383)
  ...
alcaeus added a commit that referenced this pull request Oct 16, 2024
* v1.x: (101 commits)
  PHPLIB-1541: Include specs repository as a submodule (#1429)
  PHPLIB-1548 Inherit `typeMap` option in `Collection::listSearchIndexes()` (#1482)
  Fix array shape for `Collection::listSearchIndex($options)` (#1480)
  PHPLIB-1545: Deprecate CreateCollection flags option and related constants (#1477)
  Fix junit logging (#1475)
  Deprecate typeMap on operations without meaningful result (#1473)
  PHPLIB-1369 Upgrade to PHPUnit 10 (#1412)
  Higher phpunit version required (#1463)
  Fix deprecations in tests (#1458)
  Deprecate functionality to be removed (#1441)
  Expect BulkWriteException (#1455)
  Merge v1.20 into v1.x (#1447)
  PHPLIB-1525 Removes dependency to Symfony PHPUnit bridge (#1413)
  Change deprecated assertObjectHasAttribute to assertObjectHasProperty (#1432)
  Performance: Keep collections and indexes between GridFS tests (#1421)
  Add final annotations to non-internal Operation classes (#1410)
  Fix types accepted by $round (#1401)
  Replace arrayHasKey with assertArrayHasKey in tests (#1403)
  PHPLIB-1514 Make data providers static (#1404)
  PHPLIB-1515 Replace assertObjectHasAttribute with assertObjectHasProperty (#1405)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants