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

PHPLIB-1218 Remove deprecated fields from GridFS files #1398

Merged
merged 7 commits into from
Sep 16, 2024

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Sep 13, 2024

Fix PHPLIB-1218

Remove fields md5, contentType and aliases.

@GromNaN GromNaN requested a review from a team as a code owner September 13, 2024 12:27
@GromNaN GromNaN marked this pull request as draft September 13, 2024 12:27
Comment on lines -137 to -138
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
'upload' => ['filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
Copy link
Member Author

Choose a reason for hiding this comment

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

Spec tests should be updated to remove this options.

Copy link
Member

Choose a reason for hiding this comment

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

Removing them here presumably makes the spec tests fail due to unrecognized fields. Should those tests be skipped in the meantime? That can be done by additions to UnifiedSpecTest::$incompleteTests (using the test file's base name and test name).

You can open a DRIVERS ticket to propose updating/deleting the spec tests. Additionally, it looks like many of the spec tests fill in the corresponding deprecated fields when populating fs.files. The ticket can also propose removing those.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the directions. The failing test is now skipped and I created DRIVERS-2976

src/GridFS/Bucket.php Show resolved Hide resolved
src/GridFS/WritableStream.php Show resolved Hide resolved
Comment on lines -137 to -138
'uploadWithId' => ['id', 'filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
'upload' => ['filename', 'source', 'chunkSizeBytes', 'disableMD5', 'contentType', 'metadata'],
Copy link
Member

Choose a reason for hiding this comment

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

Removing them here presumably makes the spec tests fail due to unrecognized fields. Should those tests be skipped in the meantime? That can be done by additions to UnifiedSpecTest::$incompleteTests (using the test file's base name and test name).

You can open a DRIVERS ticket to propose updating/deleting the spec tests. Additionally, it looks like many of the spec tests fill in the corresponding deprecated fields when populating fs.files. The ticket can also propose removing those.

tests/UnifiedSpecTests/gridfs/upload.json Outdated Show resolved Hide resolved
@GromNaN GromNaN marked this pull request as ready for review September 13, 2024 21:21
tests/UnifiedSpecTests/UnifiedSpecTest.php Show resolved Hide resolved
UPGRADE-2.0.md Outdated Show resolved Hide resolved
@GromNaN GromNaN merged commit 0552779 into mongodb:v2.x Sep 16, 2024
31 checks passed
@GromNaN GromNaN deleted the PHPLIB-1218 branch September 16, 2024 14:35
alcaeus added a commit that referenced this pull request Sep 25, 2024
* v2.x:
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
alcaeus added a commit that referenced this pull request Sep 25, 2024
* v2.x:
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
alcaeus added a commit that referenced this pull request Sep 25, 2024
* v2.x:
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
alcaeus added a commit that referenced this pull request Sep 30, 2024
* v2.x:
  PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454)
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
alcaeus added a commit that referenced this pull request Oct 16, 2024
* v2.x:
  PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478)
  PHPLIB-1227 Use void return types for operations without meaningful result document (#1468)
  Remove deprecated functionality (#1439)
  PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454)
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
alcaeus added a commit that referenced this pull request Oct 29, 2024
* v2.x:
  PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478)
  PHPLIB-1227 Use void return types for operations without meaningful result document (#1468)
  Remove deprecated functionality (#1439)
  PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454)
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
alcaeus added a commit that referenced this pull request Nov 4, 2024
* v2.x:
  Regenerate evergreen configuration (#1503)
  PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478)
  PHPLIB-1227 Use void return types for operations without meaningful result document (#1468)
  Remove deprecated functionality (#1439)
  PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454)
  PHPLIB-954: Add return types to all methods (#1391)
  PHPLIB-797: Remove unused methods in UnsupportedException (#1436)
  Revert "Add final annotations to non-internal Operation classes (#1410)"
  PHPLIB-953 Make internal classes and Operation classes final (#1392)
  PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
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.

2 participants