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 Dec 10, 2021
2 parents 5e16306 + 96690e5 commit f2362a0
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
#
# It's auto-generated by sonata-project/dev-kit package.

github: [greg0ire, OskarStark, core23, wbloszyk]
github: [greg0ire, OskarStark, core23, VincentLanglet]
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
coverage: none
tools: composer:v2, composer-normalize:2
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/qa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
coverage: none
tools: composer:v2
extensions: mongodb, gd
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
php-version: '8.1'
coverage: none
tools: composer:v2
extensions: mongodb, gd
Expand All @@ -62,4 +62,4 @@ jobs:
composer-options: --prefer-dist --prefer-stable

- name: Psalm
run: vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --shepherd --php-version=8.0
run: vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --shepherd --php-version=8.1
9 changes: 5 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
php-version:
- '7.4'
- '8.0'
- '8.1'
dependencies: [highest]
allowed-to-fail: [false]
symfony-require: ['']
Expand All @@ -43,22 +44,22 @@ jobs:
dependencies: lowest
allowed-to-fail: false
variant: normal
- php-version: '8.0'
- php-version: '8.1'
dependencies: highest
allowed-to-fail: false
symfony-require: 4.4.*
variant: symfony/symfony:"4.4.*"
- php-version: '8.0'
- php-version: '8.1'
dependencies: highest
allowed-to-fail: false
symfony-require: 5.3.*
variant: symfony/symfony:"5.3.*"
- php-version: '8.0'
- php-version: '8.1'
dependencies: highest
allowed-to-fail: false
symfony-require: 5.4.*
variant: symfony/symfony:"5.4.*"
- php-version: '8.0'
- php-version: '8.1'
dependencies: highest
allowed-to-fail: false
symfony-require: 6.0.*
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- [[#2214](https://github.com/sonata-project/SonataMediaBundle/pull/2214)] Fix block service registration ([@core23](https://github.com/core23))

## [4.0.0-alpha1](https://github.com/sonata-project/SonataMediaBundle/compare/3.35.1...4.0.0-alpha1) - 2021-10-21

## [3.37.1](https://github.com/sonata-project/SonataMediaBundle/compare/3.37.0...3.37.1) - 2021-12-09
### Fixed
- [[#2245](https://github.com/sonata-project/SonataMediaBundle/pull/2245)] `src/Resources/views/MediaAdmin/inner_row_media.html.twig` ([@cezar77](https://github.com/cezar77))

## [3.37.0](https://github.com/sonata-project/SonataMediaBundle/compare/3.356...3.37.0) - 2021-11-17
### Added
- [[#2164](https://github.com/sonata-project/SonataMediaBundle/pull/2164)] Added property type hints ([@jordisala1991](https://github.com/jordisala1991))

Expand Down
5 changes: 1 addition & 4 deletions src/DependencyInjection/SonataMediaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,9 @@ public function configureProviders(ContainerBuilder $container, array $config):
*/
public function configureParameterClass(ContainerBuilder $container, array $config): void
{
$container->setParameter('sonata.media.admin.media.entity', $config['class']['media']);
$container->setParameter('sonata.media.admin.gallery.entity', $config['class']['gallery']);
$container->setParameter('sonata.media.admin.gallery_item.entity', $config['class']['gallery_item']);

$container->setParameter('sonata.media.media.class', $config['class']['media']);
$container->setParameter('sonata.media.gallery.class', $config['class']['gallery']);
$container->setParameter('sonata.media.gallery_item.class', $config['class']['gallery_item']);

$container->getDefinition('sonata.media.form.type.media')->replaceArgument(1, $config['class']['media']);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/config/doctrine_mongodb_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
])
->args([
'',
'%sonata.media.admin.media.entity%',
'%sonata.media.media.class%',
'sonata.media.controller.media.admin',
new ReferenceConfigurator('sonata.media.pool'),
(new ReferenceConfigurator('sonata.media.manager.category'))->nullOnInvalid(),
Expand All @@ -61,7 +61,7 @@
])
->args([
'',
'%sonata.media.admin.gallery.entity%',
'%sonata.media.gallery.class%',
'sonata.media.controller.gallery.admin',
new ReferenceConfigurator('sonata.media.pool'),
])
Expand All @@ -82,7 +82,7 @@
])
->args([
'',
'%sonata.media.admin.gallery_item.entity%',
'%sonata.media.gallery_item.class%',
'%sonata.admin.configuration.default_controller%',
])
->call('setTranslationDomain', ['SonataMediaBundle']);
Expand Down
6 changes: 3 additions & 3 deletions src/Resources/config/doctrine_orm_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
])
->args([
'',
'%sonata.media.admin.media.entity%',
'%sonata.media.media.class%',
'sonata.media.controller.media.admin',
new ReferenceConfigurator('sonata.media.pool'),
(new ReferenceConfigurator('sonata.media.manager.category'))->nullOnInvalid(),
Expand All @@ -62,7 +62,7 @@
])
->args([
'',
'%sonata.media.admin.gallery.entity%',
'%sonata.media.gallery.class%',
'sonata.media.controller.gallery.admin',
new ReferenceConfigurator('sonata.media.pool'),
])
Expand All @@ -83,7 +83,7 @@
])
->args([
'',
'%sonata.media.admin.gallery_item.entity%',
'%sonata.media.gallery_item.class%',
'%sonata.admin.configuration.default_controller%',
])
->call('setTranslationDomain', ['SonataMediaBundle']);
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/views/MediaAdmin/inner_row_media.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ file that was distributed with this source code.
<div class="col-sm-12">
<div class="pull-left">
{% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
<a href="{{ admin.generateObjectUrl('edit', object) }) }}" style="float: left; margin-right: 6px;">
<a href="{{ admin.generateObjectUrl('edit', object) }}" style="float: left; margin-right: 6px;">
{{ sonata_thumbnail(object, 'admin', {'width': 90}) }}
</a>
{% else %}
Expand All @@ -24,7 +24,7 @@ file that was distributed with this source code.
</div>
<span class="badge pull-right">{{ object.providerName|trans({}, 'SonataMediaBundle') }}</span>
{% if admin.isGranted('EDIT', object) and admin.hasRoute('edit') %}
<a href="{{ admin.generateObjectUrl('edit', object }) }}"><strong>{{ object.name }}</strong></a>
<a href="{{ admin.generateObjectUrl('edit', object) }}"><strong>{{ object.name }}</strong></a>
{% else %}
<strong>{{ object.name }}</strong>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ private function mockImage(int $width, int $height): object
/**
* @return Stub&MediaInterface
*/
private function mockMedia(): object
private function mockMedia(): Stub
{
$binaryContent = $this->createStub(UploadedFile::class);
$binaryContent->method('getPathname')->willReturn(tmpfile());
$binaryContent->method('getPathname')->willReturn('pathname');

$media = $this->createStub(MediaInterface::class);
$media->method('getContext')->willReturn(self::TEST_CONTEXT);
Expand Down

0 comments on commit f2362a0

Please sign in to comment.