Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #5349
Closed
Open
Issue created Feb 17, 2020 by Administrator@rootContributor

[REQ] PHP Client/Server class property types

Created by: xvilo

Is your feature request related to a problem? Please describe.

Currently, PHP 7.4 has support for typed properties (see this RFC: https://wiki.php.net/rfc/typed_properties_v2). I think we should support this behind a feature flag.

Describe the solution you'd like

Add types to class properties, as we have them already as method arguments.

Additional context

This could be added for the following generators:

  • clients
    • php (Guzzle)
  • servers
    • PHP Laravel
    • PHP Lumen
    • PHP Slim
    • PHP Symfony
    • PHP Zend Expressive (with Path Handler)

I could create this functionality for the Symfony Server if this is wanted, for the others I would hope others could contribute to this.

As an example, the current model output for the PHP Symfony server is: Screenshot 2020-02-17 at 16 37 37

What it could become afterward: Screenshot 2020-02-17 at 16 37 53

Assignee
Assign to
Time tracking