Skip to content
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

PHP - doc comments with */ lead to invalid code #5635

Open
baywet opened this issue Oct 18, 2024 · 0 comments
Open

PHP - doc comments with */ lead to invalid code #5635

baywet opened this issue Oct 18, 2024 · 0 comments
Assignees
Labels
PHP type:bug A broken experience type:regression A bug from previous release

Comments

@baywet
Copy link
Member

baywet commented Oct 18, 2024

kiota generate -d https://raw.githubusercontent.com/APIs-guru/openapi-directory/gh-pages/v2/specs/github.com/api.github.com/1.1.4/openapi.json -l PHP

and attempting to build the client leads to

 ------ ------------------------------------------------------------ 
  Line   client/Models/CodeScanningAlertDismissedReason.php          
 ------ ------------------------------------------------------------ 
  9      Syntax error, unexpected T_STRING, expecting ';' on line 9  
 ------ ------------------------------------------------------------ 

 ------ ----------------------------------------------------- 
  Line   client/Models/DeploymentBranchPolicyNamePattern.php  
 ------ ----------------------------------------------------- 
  18     Syntax error, unexpected '*' on line 18              
  83     Syntax error, unexpected '*' on line 83              
 ------ ----------------------------------------------------- 

This is caused by the presence of */ in the doc comment. Removing the value fixes the problem. It should be escaped.

@baywet baywet added PHP type:bug A broken experience type:regression A bug from previous release labels Oct 18, 2024
@timayabi2020 timayabi2020 self-assigned this Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP type:bug A broken experience type:regression A bug from previous release
Projects
Status: Todo 📃
Development

No branches or pull requests

2 participants