| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Updates this PHP client library’s developer/test/documentation surfaces to use a less ambiguous environment variable name (SERPAPI_KEY) for the SerpApi secret key, aligning with naming used in other SerpApi client libraries.
Changes:
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/SerpApiTestCase.php | Resolves API key from SERPAPI_KEY and updates the skip message accordingly. |
| README.md.erb | Updates all generated snippets/examples to use getenv('SERPAPI_KEY') and export instructions. |
| README.md | Regenerated documentation reflecting SERPAPI_KEY usage throughout examples and test setup. |
| .github/workflows/serpapi-php.yml | Renames workflow and updates test job env var to SERPAPI_KEY secret. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Renames the environment variable used for the SerpApi secret key from API_KEY to SERPAPI_KEY, aligning this library with serpapi-ruby, which uses ENV['SERPAPI_KEY'].
The generic API_KEY name is ambiguous in projects that integrate multiple APIs; SERPAPI_KEY is explicit and consistent across our client libraries.
Changes
Client itself is unchanged: the key is still passed explicitly to the constructor or via setApiKey(), matching serpapi-ruby's behavior. No auto-reading of the environment was added.