Skip to content

Conversation

@rapkis
Copy link
Contributor

@rapkis rapkis commented May 14, 2024

Description

Accept a new array $headers = [] argument for every method used in repositories (default to an empty array for backward compatibility). Then forward those arguments to the underlying DocumentClient class, which already accepts them.

Motivation and context

Closes #102

How has this been tested?

Tested the headers inputs in RepositoryTest

Screenshots (if appropriate)

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your tests and code style pass.

  • I have read the CONTRIBUTING document.
  • My pull request addresses exactly one patch/feature.
  • I have created a branch for this patch/feature.
  • Each individual commit in the pull request is meaningful.
  • I have added tests to cover my changes.
  • If my change requires a change to the documentation, I have updated it accordingly.

If you're unsure about any of these, don't hesitate to ask. We're here to help!

@rapkis
Copy link
Contributor Author

rapkis commented May 14, 2024

By the way, I've noticed that there's an unrelated styling issue in UtilTest.php (caught by composer check-style), but didn't want to make any unrelated changes. Let me know if you'd like me to, or if that should be solved separately.

@bbrala
Copy link
Member

bbrala commented May 14, 2024

Thanks for the pr. A thought, shouldn't there be a test with and without a header?

@JaZo JaZo self-requested a review May 15, 2024 07:02
Copy link
Member

@JaZo JaZo left a comment

Choose a reason for hiding this comment

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

By the way, I've noticed that there's an unrelated styling issue in UtilTest.php (caught by composer check-style), but didn't want to make any unrelated changes. Let me know if you'd like me to, or if that should be solved separately.

I'll fix the code style issues separately, thanks!

Thanks for the pr. A thought, shouldn't there be a test with and without a header?

Good point, but since there are currently no tests without the $parameters argument, I think it's fine for this PR.

@JaZo JaZo merged commit 5d20c38 into swisnl:master May 15, 2024
@rapkis rapkis deleted the feature/request-headers-in-repositories branch May 15, 2024 19:29
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.

Feature request: ability to send headers dynamically through repositories

3 participants