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
Update Symfony2 framework module and connector, fix client generation… #2968
Conversation
} | ||
|
||
/** | ||
* @param array $services | ||
* Reboot kernel | ||
* |
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.
Whitespace found at end of line
064a2ae
to
b16142e
Compare
$result = null; | ||
if (property_exists($this, $property)) { | ||
switch ($property) { | ||
case 'container': |
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.
Whitespace found at end of line
b16142e
to
6036c00
Compare
You have removed my lasts commit, one that deprecated |
How your modifications behave with current situation:
|
There is no need to deprecate We have persistent Entity Manager and Unit Of Work and in described situation all |
Rename of |
6036c00
to
4d7a3b6
Compare
Updated, please review. |
4d7a3b6
to
9cdae22
Compare
*/ | ||
public $container; | ||
private $container; |
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.
This var is not used, and is a breaking change.
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.
We can make $container
a read-only property and retrieve it with magic method __get($property)
without breaking BC
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.
Ok, you can do it to handle the BC on 2.1.x. We should remove this 'magic' in a future release, maybe 3.0, and have only _getContainer
.
9cdae22
to
892ee93
Compare
@@ -67,11 +70,11 @@ | |||
* * container - dependency injection container instance |
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.
One last change: As this property no longer exists as is, please remove it from documentation.
bb34fbe
to
74621f5
Compare
…, update Doctrine EM retrieval. Improve memory usage. Unify service retrieval.
74621f5
to
7d96ebd
Compare
👍 |
Thanks, awesome work! |
Updated changelog adding changes made by #2968
…, update Doctrine EM retrieval. Improve memory usage. Unify service retrieval.
This PR provides solution for #2938, #2954.
This PR proposes the following model of Symfony2 framework module and client:
$container
is a read-only property. It returns active client's service container during test execution or self service container between tests when accessed externally.$persistentServices
array which contains services to persist between requests (kernel reboots) in a test.$permanentServices
array which contains services to persist between tests.persistService(...)
/unpersistService(...)
).$I->rebootClientKernel()
during test execution.Test results of Codeception's Symfony2 framework test app (https://github.com/Codeception/symfony-demo):
Test results of modified version of https://github.com/AlexStansfield/codeception-test - an application used to reproduce #2025:
Modifications to this test app include:
sendPOST(...)
requests to check correct work and measure performance of a solution.Performing tests with modified version of Codeception on my Symfony2 app showed memory consumption was around 190 Mb's (previously tests failed due to insufficient memory with a 3GB's configuration) and execution time became around 19 minutes (and even lower - 11 minutes - with
config['cached_router'] = true
)This PR also includes: