-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
T13655 DI::getServices unit tests #14176
Conversation
As I thought there is a problem with zephir and Di::remove() doesn't work as expected |
Here the Zephir bug zephir-lang/zephir#1259 |
@emiliodeg Try again after #14191 |
# Conflicts: # tests/unit/Di/GetServicesCest.php
Declaration of: Phalcon\Validation\ValidatorComposite::validate(Phalcon\Validation\Validation $validation, $field): bool must be compatible with Phalcon\Validation\Validator::validate(Phalcon\Validation $validation, $field): bool Declaration of Phalcon\Validation\Validator\File::getValidators() must be compatible with Phalcon\Validation\ValidatorCompositeInterface::getValidators(): array Declaration of: Phalcon\Validation\Validator\StringLength::getValidators() must be compatible with Phalcon\Validation\ValidatorCompositeInterface::getValidators(): array and so on |
@emiliodeg can you rebase this please? |
Yes I'm working on it |
Well the |
I did'n see any segfault. Are you sure about unset bug? |
I've been making some tests but I still getting problems namespace Phalcon;
class Test {
public function __construct()
{
var a, key;
array b = [];
// a like a var
let a["key"] = 1234;
var_dump(a, count(a)); // get UNKNOWN and 1
unset a["key"];
var_dump(a, count(a)); // get UNKNOWN and 1 <<< must be 0
let key = "other";
let a[key] = "bar";
var_dump(a, count(a)); // get UNKNOWN and 1
unset a[key];
var_dump(a, count(a)); // get UNKNOWN and 1 <<< must be 0
// b like an array
var_dump(b, count(b)); // get UNKNOWN and 1 <<< must be 0
let b["key"] = 1234;
var_dump(b, count(b));// get UNKNOWN and 1
unset b["key"];
var_dump(b, count(b));// get UNKNOWN and 1 <<< must be 0
let key = "other";
let b[key] = "bar";
var_dump(b, count(b));// get UNKNOWN and 1 <<< must be 0
unset b[key];
var_dump(b, count(b)); // get UNKNOWN and 1 <<< must be 0
}
} I don't know maybe is a problem with |
@emiliodeg Could you please open an issue at Zephir with simple steps to reproduce (not a whole framework)? |
@emiliodeg Did you already tested this with the latest Zephir? |
I'm so sorry but I didn't have time yet. I'll try this weekend |
@emiliodeg closing this pull in favour of #14396. I included your tests, fix will be in soon. Thnx! |
Hello!
In raising this pull request, I confirm the following:
Small description of change:
I just added DI::getServices unit tests
Thanks