Skip to content

Conversation

@letrunghieu
Copy link

After version v3.0.0-alpha.3 was release, there is still a bug on displaying scalar return type. Not nullable types (int, bool, ...) is missing from the output HTML while the nullable types (?int, ?bool, ...) is displayed incorrectly as int, bool, ...

For example, this is a test input file:

<?php

class Foo {
	public function getInt(): int {return 1;}
	public function getOptionalInt(): ?int {return null;}
}

With the v3.0.0-alpha.3 release, the output document is:
screenshot_2018-10-23 my docs

With this PR, the output document is
screenshot_2018-10-23 my docs 1

This PR also fixes #2020

Add the $ character before variables names and correct the argument types appearance to the methods/functions signatures.
@letrunghieu letrunghieu changed the title Always return a string from the route filter Fix the functions/methods signatures Oct 23, 2018
@jaapio
Copy link
Member

jaapio commented Oct 29, 2018

Thanks for this PR. Before I can merge this I need to update the other templates and add a note for other template developers that the need to update their templates.

@jaapio
Copy link
Member

jaapio commented Mar 4, 2019

I checked the code that should provided the types. But I think we discovered a bc break here.
Thanks for pointing us on this break. We fixed it in the code so templates don't need changes right now.

The current version in develop should not have this issue any more.

@jaapio jaapio closed this Mar 4, 2019
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.

Unable to parse scalar return type declarations

2 participants