Skip to content

Commit

Permalink
Merge 4.x into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
SonataCI committed May 14, 2023
2 parents 269942b + e6caf62 commit b56c8b7
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
dependencies: lowest
allowed-to-fail: false
variant: normal
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
variant: sonata-project/form-extensions:"2.0.0-alpha-1"
- php-version: '8.2'
dependencies: highest
allowed-to-fail: false
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [4.9.0](https://github.com/sonata-project/SonataMediaBundle/compare/4.8.1...4.9.0) - 2023-05-13
### Added
- [[#2393](https://github.com/sonata-project/SonataMediaBundle/pull/2393)] Support for `sonata-project/form-extensions` 2.0 ([@jordisala1991](https://github.com/jordisala1991))

## [4.8.1](https://github.com/sonata-project/SonataMediaBundle/compare/4.8.0...4.8.1) - 2023-04-25
### Fixed
- [[#2384](https://github.com/sonata-project/SonataMediaBundle/pull/2384)] `sonata.media.metadata.amazon` is removed from the container if the configuration for S3 is not enabled ([@jordisala1991](https://github.com/jordisala1991))
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"psr/http-message": "^1.0",
"psr/log": "^2.0 || ^3.0",
"sonata-project/doctrine-extensions": "^1.13 || ^2.0",
"sonata-project/form-extensions": "^1.4",
"sonata-project/form-extensions": "^1.4 || ^2.0",
"sonata-project/twig-extensions": "^1.3 || ^2.0",
"symfony/asset": "^5.4 || ^6.2",
"symfony/config": "^5.4 || ^6.2",
Expand Down
22 changes: 16 additions & 6 deletions tests/Provider/FileProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Gaufrette\File as GaufretteFile;
use Gaufrette\Filesystem;
use PHPUnit\Framework\MockObject\MockObject;
use Sonata\Form\Twig\CanonicalizeRuntime;
use Sonata\Form\Validator\ErrorElement;
use Sonata\MediaBundle\CDN\Server;
use Sonata\MediaBundle\Filesystem\Local;
Expand Down Expand Up @@ -448,14 +449,23 @@ public function testMetadata(): void
static::assertSame('SonataMediaBundle', $this->provider->getProviderMetadata()->getDomain());
}

/**
* @psalm-suppress TooFewArguments, InvalidArgument
*/
private function createErrorElement(ExecutionContextInterface $executionContext): ErrorElement
{
return new ErrorElement(
'',
$this->createStub(ConstraintValidatorFactoryInterface::class),
$executionContext,
'group'
);
// TODO: Remove if when dropping support for `sonata-project/form-extensions` 2.0.
if (class_exists(CanonicalizeRuntime::class)) {
return new ErrorElement(
'',
$this->createStub(ConstraintValidatorFactoryInterface::class),
$executionContext,
'group'
);
}

// @phpstan-ignore-next-line
return new ErrorElement('', $executionContext, 'group');
}

/**
Expand Down

0 comments on commit b56c8b7

Please sign in to comment.