Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [Process] remove fixing of legacy bug, when PTS functionality is enabled
  DX: re-apply self_accessor and phpdoc_types_order by PHP CS Fixer
  [HttpClient] Psr18Client: parse HTTP Reason Phrase for Response
  fix test
  Fix wrong yaml parse null test
  [AssetMapper] Fixing merge from multiple PR's
  Bump Symfony version to 5.4.31
  Update VERSION for 5.4.30
  Update CONTRIBUTORS for 5.4.30
  Update CHANGELOG for 5.4.30
  Fix wrong merge
  [AssetMapper] Allowing circular references in JavaScriptImportPathCompiler
  [AssetMapper] Fix file deleting errors & remove nullable MappedAsset on JS import
  [Lock] Fix mongodb extension requirement in tests
  [Yaml] Remove dead code
  [AssetMapper] Fix in-file imports to resolve via filesystem
  throw better exception in TranslatableNormalizer, add to changelog
  Passing null to Inline::parse is not allowed
  Fix passing null to trim()
  • Loading branch information
nicolas-grekas committed Oct 29, 2023
2 parents 82d93b2 + ead3202 commit 25229e8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@ public function prepare(Request $request): static
/**
* Sends HTTP headers.
*
* @param positive-int|null $statusCode The status code to use, override the statusCode property if set and not null
*
* @return $this
*/
public function sendHeaders(int $statusCode = null): static
Expand Down
2 changes: 2 additions & 0 deletions StreamedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ public function getCallback(): ?\Closure
/**
* This method only sends the headers once.
*
* @param positive-int|null $statusCode The status code to use, override the statusCode property if set and not null
*
* @return $this
*/
public function sendHeaders(int $statusCode = null): static
Expand Down
12 changes: 8 additions & 4 deletions Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

use MongoDB\Client;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\SkippedTestSuiteError;
use PHPUnit\Framework\TestCase;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler;

Expand All @@ -29,13 +30,16 @@ class MongoDbSessionHandlerTest extends TestCase
private MockObject&Client $mongo;
private MongoDbSessionHandler $storage;

protected function setUp(): void
public static function setUpBeforeClass(): void
{
parent::setUp();

if (!class_exists(Client::class)) {
$this->markTestSkipped('The mongodb/mongodb package is required.');
throw new SkippedTestSuiteError('The mongodb/mongodb package is required.');
}
}

protected function setUp(): void
{
parent::setUp();

$this->mongo = $this->getMockBuilder(Client::class)
->disableOriginalConstructor()
Expand Down

0 comments on commit 25229e8

Please sign in to comment.