Skip to content

Add PHPStan static analysis setup#35

Merged
francescobianco merged 2 commits into
openapi:mainfrom
Seraphim200001:main
May 27, 2026
Merged

Add PHPStan static analysis setup#35
francescobianco merged 2 commits into
openapi:mainfrom
Seraphim200001:main

Conversation

@Seraphim200001
Copy link
Copy Markdown
Contributor

@Seraphim200001 Seraphim200001 commented May 18, 2026

#21 Add PHPStan as a Composer dev dependency, configure phpstan.neon at level 6, add the Composer analyse script, and fix reported iterable type issues across the SDK and tests. Integration tests requiring valid tokens remain skipped.

📋 Description

Brief description of the changes made in this PR.

✨ Type of Change

  • 🐛 Bug fix (fixes an issue)
  • ✨ New feature (adds functionality)
  • 🔧 Refactoring (code restructuring without functional changes)
  • 📚 Documentation (updates to documentation)
  • 🧪 Tests (adding or modifying tests)
  • 🔒 Security (security-related fixes)
  • ⚡ Performance (performance improvements)
  • 🎨 Style (formatting changes, no logic changes)

🔍 Main Changes

Add PHPStan static analysis setup

  • Add PHPStan as a Composer dev dependency
  • Add phpstan.neon configuration with level 6
  • Add Composer analyse script
  • Fix PHPStan iterable type issues across the SDK and tests
  • Keep integration tests skipped when valid tokens are required

🧪 Testing

  • I have tested the changes locally
  • I have added/updated unit tests
  • All tests pass (./vendor/bin/phpunit)
  • I have verified PHP 8.0+ compatibility

📝 Additional Notes

Any additional information, considerations, or important context for reviewers.

🔗 Related Issue

Closes #21 (if applicable)

📸 Screenshots (if applicable)

If changes affect the interface or visible behavior, include screenshots.

✅ Checklist

  • My code follows the project conventions
  • I have performed a self-review of my code
  • I have commented complex code where necessary
  • Documentation has been updated (if needed)
  • I have not introduced breaking changes (or documented them)
  • I have verified no sensitive information is in the code

Add PHPStan as a Composer dev dependency, configure phpstan.neon at level 6, add the Composer analyse script, and fix reported iterable type issues across the SDK and tests. Integration tests requiring valid tokens remain skipped.
@francescobianco
Copy link
Copy Markdown
Member

We’re happy to accept this contribution — thanks again @Seraphim200001 for your work and for the thoughtful improvements you proposed.

We also really appreciate the care you put into the discussion and the overall contribution experience.

Additionally, we’d be very happy if you would like to share your experience contributing to the project, either in a blog post or on LinkedIn. If you decide to write something about your experience and contribution, it would be a real pleasure for us.

@francescobianco francescobianco merged commit 91f4792 into openapi:main May 27, 2026
1 check passed
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.

Add PHPStan at level 6 for static analysis

3 participants