8000 minor #44114 Remove more dynamic properties (nicolas-grekas) · symfony/symfony@22e688b · GitHub
[go: up one dir, main page]

Skip to content

Commit 22e688b

Browse files
minor #44114 Remove more dynamic properties (nicolas-grekas)
This PR was merged into the 5.3 branch. Discussion ---------- Remove more dynamic properties | Q | A | ------------- | --- | Branch? | 5.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - Commits ------- 9c3cca1 Remove more dynamic properties
2 parents 4c5286b + 9c3cca1 commit 22e688b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Command/CacheClearCommand/CacheClearCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ function () use ($file) {
7474
$containerRef = new \ReflectionClass($containerClass);
7575
$containerFile = \dirname($containerRef->getFileName(), 2).'/'.$containerClass.'.php';
7676
$containerMetaFile = $containerFile.'.meta';
77-
$this->kernelRef = new \ReflectionObject($this->kernel);
78-
$this->kernelFile = $this->kernelRef->getFileName();
77+
$kernelRef = new \ReflectionObject($this->kernel);
78+
$kernelFile = $kernelRef->getFileName();
7979
/** @var ResourceInterface[] $meta */
8080
$meta = unserialize(file_get_contents($containerMetaFile));
8181
$found = false;
8282
foreach ($meta as $resource) {
83-
if ((string) $resource === $this->kernelFile) {
83+
if ((string) $resource === $kernelFile) {
8484
$found = true;
8585
break;
8686
}

src/Symfony/Component/HttpClient/Internal/AmpBody.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
class AmpBody implements RequestBody, InputStream
2727
{
2828
private $body;
29+
private $info;
2930
private $onProgress;
3031
private $offset = 0;
3132
private $length = -1;

src/Symfony/Component/HttpClient/RetryableHttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function request(string $method, string $url, array $options = []): Respo
7272
if ('' !== $context->getInfo('primary_ip')) {
7373
$shouldRetry = $this->strategy->shouldRetry($context, null, $exception);
7474
if (null === $shouldRetry) {
75-
throw new \LogicException(sprintf('The "%s::shouldRetry()" method must not return null when called with an exception.', \get_class($this->decider)));
75+
throw new \LogicException(sprintf('The "%s::shouldRetry()" method must not return null when called with an exception.', \get_class($this->strategy)));
7676
}
7777

7878
if (false === $shouldRetry) {

src/Symfony/Component/RateLimiter/Policy/TokenBucket.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222
final class TokenBucket implements LimiterStateInterface
2323
{
24+
private $stringRate;
2425
private $id;
2526
private $rate;
2627

@@ -47,6 +48,8 @@ final class TokenBucket implements LimiterStateInterface
4748
*/
4849
public function __construct(string $id, int $initialTokens, Rate $rate, float $timer = null)
4950
{
51+
unset($this->stringRate);
52+
5053
if ($initialTokens < 1) {
5154
throw new \InvalidArgumentException(sprintf('Cannot set the limit of "%s" to 0, as that would never accept any hit.', TokenBucketLimiter::class));
5255
}

0 commit comments

Comments
 (0)
0