-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add type annotations #30
base: master
Are you sure you want to change the base?
Conversation
Tests are failing, we could remove support for PHP 7.4 if that helps? |
Ugh, of course I just ran the tests locally and didn't think of CI and older PHP's! @mnapoli What's a sensibel schedule to drop support for older language versions in the PHP community? I can't help, I'm new :) |
7.4 is ancient, no problem at all to remove support from it. 8.0 is possible too. |
@mnapoli Could you rerun tests with PHP 8 to check? I tested with PHP 8.2 and 8.3 |
Yeah looks like an odd timeout? WDYT about a php-8 branch, then I change the merge target to that? Dropping PHP 7.x support, one can probably make other changes while at it |
This wasn't a timeout, this is normal the job was cancelled because teh 7.4 job failed. So we just need to remove 7.4. Can be in another PR or here. |
This PR adds type annotations esp. to the
Document
type so that in apps, tools have an easier time figuring out that$document->getYAML() ?? []
is valid.At least in some cases -- I was surprised that
string
is also possible! So good to know, need to work around that.void
were added to comply with tools to check consistency (phpstan) mostly; I don't feel strongly about adding or keeeping them out either way. Can revert that commit if you want.