code-lts / doctum

A php API documentation generator, fork of Sami
https://doctum.long-term.support/
MIT License
300 stars 32 forks source link

Array types support #56

Open tillkruss opened 1 year ago

tillkruss commented 1 year ago

Our builds fails because:

Error: The hint on "getBytes" at @return is invalid: "array{int, int}"
Error: The hint on "bytes" at @return is invalid: "array{int, int}"

Is this something you're looking to support?

williamdes commented 1 year ago

Sure, see #51 Can you try the -dev phar? I am waiting on some final action upstream to finalize this But since it's phpstan based it should unlock a lof of awesomeness

williamdes commented 1 year ago

/cc @jaapio do you need help to finish the implementation?

tillkruss commented 1 year ago

@williamdes, can I use the dev version somewhat reliably?

williamdes commented 1 year ago

@williamdes, can I use the dev version somewhat reliably?

If it runs fine, yes There is nothing very different, just some changes a bit unstable But if it works it's worth trying it until this gets better

jaapio commented 1 year ago

Some of my PR's are rejected on phpstan. So I need to find a solution. Also the nullable types are not fully supported yet.

If you have time to have a look, that would be great. Mine is currently very limited

williamdes commented 1 year ago

Can you link them here?

jaapio commented 1 year ago

Still under discussion? https://github.com/phpstan/phpdoc-parser/pull/166 https://github.com/phpstan/phpdoc-parser/pull/165

jaapio commented 1 year ago

https://github.com/phpDocumentor/TypeResolver/issues/180 would be nice to be resolved. And https://github.com/symfony/symfony/issues/48211#issuecomment-1320970367 seems to be a bc break that needs to be addressed.

tillkruss commented 1 year ago

@williamdes works great, thanks! Feel free to close.