Skip to content

Commit 4f39a29

Browse files
committed
BC BREAK: remove deprecated method legacy support, use getFrameworkBundleClient instead
1 parent 4493a62 commit 4f39a29

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
3.0.0 (unreleased)
55
------------------
66

7+
* **2019-07-26**: [BC-BREAK] Remove deprecated `BaseTestCase::getClient`, use `BaseTestCase::getFrameworkBundleClient` instead.
78
* **2019-02-28**: [BC-BREAK] Remove `DatabaseTestListener`, use scripts in `bin/make/` to ramp up your testing environment for several test suites
89
* **2019-02-28**: [BC-BREAK] Introduce PHPUnit 6 Support, Remove PHPUnit 5.7.
910
* **2019-02-28**: Add testing scenarios for Symfony 4.2 and 4.3 (allowed to fail for now)

src/Functional/BaseTestCase.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,6 @@ protected function getKernelConfiguration()
5454
return [];
5555
}
5656

57-
public function __call($name, $arguments)
58-
{
59-
if ('getClient' === $name) {
60-
@trigger_error(sprintf(
61-
'"%s::getClient()" is deprecated in favor of getFrameworkBundleClient() since symfony-cmf/testing 2.1 and will no longer be callable in 3.0',
62-
__CLASS__
63-
), E_USER_DEPRECATED);
64-
65-
return $this->getFrameworkBundleClient();
66-
}
67-
68-
return parent::$name(...$arguments);
69-
}
70-
7157
/**
7258
* Gets the Client.
7359
*
@@ -76,7 +62,7 @@ public function __call($name, $arguments)
7662
public function getFrameworkBundleClient()
7763
{
7864
if (null === $this->client) {
79-
$this->client = $this->createClient($this->getKernelConfiguration());
65+
$this->client = self::createClient($this->getKernelConfiguration());
8066
}
8167

8268
return $this->client;

tests/Functional/BaseTestCaseTest.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,6 @@ public function provideTestDb()
7777
];
7878
}
7979

80-
/**
81-
* @group legacy
82-
* @expectedDeprecation "Symfony\Cmf\Component\Testing\Functional\BaseTestCase::getClient()" is deprecated in favor of getFrameworkBundleClient() since symfony-cmf/testing 2.1 and will no longer be callable in 3.0
83-
*/
84-
public function testItTriggersADeprecationErrorWhenCallingGetClient()
85-
{
86-
$this->assertInstanceOf(Client::class, $this->testCase->getClient());
87-
}
88-
8980
public function testItCanProvideAFrameworkBundleClient()
9081
{
9182
$this->assertInstanceOf(Client::class, $this->testCase->getFrameworkBundleClient());

0 commit comments

Comments
 (0)