Skip to content
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

request service should be removed before changing his definition #7

Merged
merged 3 commits into from Apr 13, 2021

Conversation

Druid33
Copy link
Contributor

@Druid33 Druid33 commented Jun 3, 2020

Without this change its not possible fill content to request body using _request() method.

I add some more info:

I had problem set json content to _request() method. After some research, diging into code i realize, it is not possible replace shared service with other shared service. One can replace shared service only with non-shared service.

$di->set('service', {some_definition}, true);
// this line does not change service.
$di->set('service', {some_other_definition}, true);
// this line change service
$di->set('service', {some_other_definition}, false);

Its not possible change shared service with "array' notation like this:

$di->set('service', {some_definition}, true);
// this line does not change service.
$di['service'] =  {some_other_definition};

Using "array" notation you only change service definition. but if shared service is resolved before, changing definition has not effect on next geting service

@Druid33 Druid33 changed the title request server should be removed before changing his definition request service should be removed before changing his definition Jun 3, 2020
@ruudboon
Copy link
Collaborator

ruudboon commented Jun 5, 2020

Thnx @Druid33
Can you add a few tests for this as well?

Related to: phalcon/cphalcon#14834

@Druid33
Copy link
Contributor Author

Druid33 commented Jun 7, 2020

ok, I try to find some time :)

@Druid33
Copy link
Contributor Author

Druid33 commented Apr 13, 2021

Thnx @Druid33
Can you add a few tests for this as well?

Related to: phalcon/cphalcon#14834

Hi, finally i write test i promise a year ago...hope it will be enough.

@Jeckerson
Copy link
Collaborator

@Druid33 Thanks!

@Jeckerson Jeckerson merged commit bd1d991 into Codeception:master Apr 13, 2021
@Jeckerson
Copy link
Collaborator

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.

None yet

3 participants