-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Introduce native type-hints and pass-by-reference values #295
Conversation
This contains all changes of #294 as well. |
b31c578
to
05720c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only managed to look at very superficial level: test changes OK, only change that is a bit weird is callable|string
types, which I think is wrong 🤔
Will double check that again. Problem is that it was "callable" beforehand and I am unsure if it allows strings pointing to functions. |
<?php
function useCallable($input, callable $cb): mixed {
return $cb($input);
}
var_dump(useCallable('123', 'intval'));
var_dump(useCallable('', 'intval'));
var_dump(useCallable('foo', 'intval'));
var_dump(useCallable(123.456, 'intval')); |
79ca364
to
b07e369
Compare
…reference values Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
b07e369
to
5f31f26
Compare
Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com>
Description
This introduces almost all native type-hints. Those which are missing are either related to
laminas-eventmanager
orlaminas-servicemanager
. The latter will be updated in one of the next PRs.This fixes #15