Skip to content

feat(php): add iterator helper methods #936

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 7 commits into from
Aug 23, 2022

Conversation

damcou
Copy link
Contributor

@damcou damcou commented Aug 18, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-599

Changes included:

⚠️
I know that this is not exactly what was done for the javascript client, but I think it was faster and more efficient to take inspiration of the current PHP client for this task since we have an already working solution (+ the way it's done for js is probably not as friendly for PHP)

  • Imported existing iterators from the current PHP client: https://github.com/algolia/algoliasearch-client-php/tree/master/src/Iterators (instead of making the API calls directly in the iterators, we now pass the SearchClient in the constructor so we only use the generated methods in the client)
  • Added browseObjects, browseRules and browseSynonyms in the Helper class, they call the iterators directly.
  • Updated PHP search playground
  • Updated migration guide related to these methods.

🧪 Test

  • yarn docker cts run php
  • yarn docker playground php search
  • Netlify preview for the guide.

@damcou damcou requested review from millotp and shortcuts August 18, 2022 14:53
@netlify
Copy link

netlify bot commented Aug 18, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit 2190fab
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/630489afaea65000085e4e71

millotp
millotp previously approved these changes Aug 18, 2022
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

Looks good ! I didn't test it but if it comes from the previous client there should be no issue :)

@algolia-bot
Copy link
Collaborator

algolia-bot commented Aug 22, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

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

Looks great!

@damcou damcou enabled auto-merge (squash) August 23, 2022 08:03
@damcou damcou merged commit 1a24f33 into main Aug 23, 2022
@damcou damcou deleted the feat/APIC-599/add-helper-methods-php branch August 23, 2022 08:07
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.

4 participants