Improve safe Flickr SDK performance#1
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Aligns the SDK’s method-registry metadata and repository workflow with the DTO package conventions, emphasizing conservative cache defaults and a single Composer-driven CI gate.
Changes:
- Marked legacy auth methods and
flickr.photos.upload.checkTicketsas non-cacheable; added a unit test to enforce conservative cache defaults (auth/authenticated/mutations). - Simplified GitHub Actions to run
composer checkand scoped CI triggers tomaster/develop. - Expanded developer/maintenance documentation, added an
ai/skillsentry point, and refreshedcomposer.lock.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
tests/Unit/OfficialMethodCoverageTest.php |
Adds assertions preventing sensitive/authenticated/mutation methods from being cacheable by default. |
src/Metadata/methods.php |
Hardens cacheability flags for flickr.auth.* and upload-ticket polling. |
docs/README.md |
Extends docs index with new development/security pages. |
docs/05-maintenance/02-docs-changelog.md |
Records documentation expansion date and scope. |
docs/05-maintenance/01-risks-legacy-and-gaps.md |
Adds DTO-first roadmap guidance and priorities. |
docs/04-development/09-secret-scanning.md |
Adds secret-handling and scanning guidance for contributors. |
docs/04-development/08-ai-contributor-workflow.md |
Documents AI-assisted contribution workflow and boundaries (framework-agnostic). |
docs/04-development/07-ci-cd.md |
Documents CI gate and composer check as the PR validation contract. |
docs/04-development/06-repository-metadata.md |
Updates suggested GitHub About description/topics for repo identity. |
docs/04-development/05-method-registry.md |
Documents registry verification sources, local workflows, and cache-safety expectations. |
docs/04-development/04-release.md |
Clarifies Git flow and release steps around master/develop. |
docs/04-development/02-testing.md |
Expands local testing guidance and safety notes. |
docs/04-development/01-code-style.md |
Clarifies formatting authority and DTO/raw-fallback conventions. |
composer.lock |
Updates locked dependency set (includes at least one downgrade that should be confirmed). |
ai/skills/README.md |
Adds lightweight AI “skills” entry point consistent with repo docs. |
AGENTS.md |
Adds Git flow guidance for contributors/agents. |
.github/workflows/ci.yml |
Runs composer check and removes main from CI triggers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $this->assertFalse($definition->cacheable, "{$method} must not be cacheable."); | ||
| } | ||
|
|
||
| if ($definition->httpMethod->value === 'POST') { |
Summary
Align the Flickr SDK with DTO package standards and add safe, practical performance improvements without changing package scope or adding framework-specific integrations.
Performance changes
photos()->searchPages()pagination withPaginationOptionsData.Cache safety policy
Caching is bypassed for auth/OAuth methods, auth-required methods,
authenticated=truerequests, POST/mutation/write/delete/permissioned calls, upload/replace, upload ticket checks, unknown methods, and Flickrstat=failresponses.DTO / docs alignment
composer checkonmasteranddevelop.ai/skillsentry point.composer.lockdependency set.Upload/replace audit result
Upload and replace already used a readable file stream via multipart
fopen($path, 'rb'). This PR adds explicit file-handle cleanup after the transport request completes.GitHub metadata
Updated the repository description and topics to include REST API, caching,
framework-agnostic, andapi-client.Validation
composer validate --strictpassedcomposer installpassedcomposer lint:allpassedcomposer testpassed: 37 tests, 2227 assertions, 2 skipped opt-in real Flickr testscomposer checkpassedcomposer cipassed with PCOV coverage outputphp tools/verify-method-registry.phppassed: 224 official Flickr REST method definitionsClientAndParserTest|ServiceTest|OfficialMethodCoverageTestRisks / rollback
Runtime caching is opt-in and limited to public cacheable GET calls. Pagination is limited to
photos()->searchPages()to avoid a broad framework. Rollback is reverting this PR.