Skip to content

Add declare(strict_types=1); to all PHP template files #21186

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gosling-dude
Copy link

📝 Description:

This PR introduces strict type declaration (declare(strict_types=1);) at the top of all relevant PHP template files generated by OpenAPI Generator.

Changes include:

  • Added strict type declarations to all PHP model and API classes.
  • Ensured generated code aligns with modern PHP best practices.
  • Regenerated the Petstore PHP client to reflect this change and verified no runtime issues.

This enhancement improves type safety and helps developers catch potential type-related bugs early during development.

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.

1 participant