Skip to content

Commit

Permalink
merge master
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieupetrini committed Aug 26, 2020
2 parents c533f9b + 9b63eee commit f27b6e2
Show file tree
Hide file tree
Showing 83 changed files with 726 additions and 605 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
@@ -1,3 +1,7 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

root = true

[*]
Expand Down
4 changes: 4 additions & 0 deletions .flintci.yml
@@ -1,3 +1,7 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

services:
composernormalize: true
phpcsfixer: true
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
@@ -1,3 +1,7 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

.* export-ignore
*.md export-ignore
tests export-ignore
Expand Down
52 changes: 0 additions & 52 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

7 changes: 0 additions & 7 deletions .github/ISSUE_TEMPLATE/Question.md

This file was deleted.

12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,12 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

blank_issues_enabled: false
contact_links:
- name: StackOverflow
url: https://stackoverflow.com/questions/tagged/sonata
about: 'Questions tagged with "sonata" on StackOverflow'
- name: Slack
url: https://symfony-devs.slack.com/archives/C3GC7MKM5
about: '#sonata channel on Symfony Devs Slack'
4 changes: 4 additions & 0 deletions .github/workflows/lint.yaml
@@ -1,3 +1,7 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

on: [push, pull_request]

name: Lint
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/qa.yaml
Expand Up @@ -12,3 +12,11 @@ jobs:
REQUIRE_DEV: true
with:
args: analyse
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Psalm
uses: docker://vimeo/psalm-github-actions
4 changes: 4 additions & 0 deletions .github/workflows/stale.yaml
@@ -1,3 +1,7 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

# https://github.com/actions/stale

name: "Stale"
Expand Down
2 changes: 1 addition & 1 deletion .php_cs.dist
@@ -1,6 +1,6 @@
<?php

/**
/*
* DO NOT EDIT THIS FILE!
*
* It's auto-generated by sonata-project/dev-kit package.
Expand Down
5 changes: 5 additions & 0 deletions .travis/after_success_test.sh
@@ -1,4 +1,9 @@
#!/usr/bin/env sh

# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

set -ev

coveralls -v
5 changes: 5 additions & 0 deletions .travis/before_install_test.sh
@@ -1,4 +1,9 @@
#!/usr/bin/env bash

# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

set -ev

PHP_INI_DIR="$HOME/.phpenv/versions/$(phpenv version-name)/etc/conf.d/"
Expand Down
5 changes: 5 additions & 0 deletions .travis/before_script_test.sh
@@ -1,4 +1,9 @@
#!/usr/bin/env bash

# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

set -ev

if [ -f .travis/before_script_test.local.sh ]
Expand Down
5 changes: 5 additions & 0 deletions .travis/check_relevant_test.sh
@@ -1,4 +1,9 @@
#!/usr/bin/env bash

# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

set -ev

RELEVANT_FILES=$(git diff --name-only HEAD upstream/${TRAVIS_BRANCH} -- '*.php' '*.yml' '*.xml' '*.twig' '*.js' '*.css' '*.json')
Expand Down
5 changes: 5 additions & 0 deletions .travis/install_test.sh
@@ -1,4 +1,9 @@
#!/usr/bin/env sh

# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

set -ev

mkdir --parents "${HOME}/bin"
Expand Down
4 changes: 4 additions & 0 deletions .yamllint
@@ -1,3 +1,7 @@
# DO NOT EDIT THIS FILE!
#
# It's auto-generated by sonata-project/dev-kit package.

extends: default

rules:
Expand Down
34 changes: 34 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,40 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.74.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.73.0...3.74.0) - 2020-08-22
### Added
- [[#6299](https://github.com/sonata-project/SonataAdminBundle/pull/6299)] Added support for symfony/expression-language:^5.1 ([@phansys](https://github.com/phansys))
- [[#6299](https://github.com/sonata-project/SonataAdminBundle/pull/6299)] Added support for symfony/options-resolver:^5.1 ([@phansys](https://github.com/phansys))
- [[#6299](https://github.com/sonata-project/SonataAdminBundle/pull/6299)] Added support for symfony/property-access:^5.1 ([@phansys](https://github.com/phansys))
- [[#6127](https://github.com/sonata-project/SonataAdminBundle/pull/6127)] Added support for `doctrine/common` 3 ([@jaikdean](https://github.com/jaikdean))
- [[#6256](https://github.com/sonata-project/SonataAdminBundle/pull/6256)] Added compatibility with Twig 3 ([@franmomu](https://github.com/franmomu))
- [[#6252](https://github.com/sonata-project/SonataAdminBundle/pull/6252)] Support for 'label_translation_parameters' in filter form types ([@tkuska](https://github.com/tkuska))
- [[#6212](https://github.com/sonata-project/SonataAdminBundle/pull/6212)] Add support for SonataBlockBundle 4.0 ([@jordisala1991](https://github.com/jordisala1991))

### Changed
- [[#6251](https://github.com/sonata-project/SonataAdminBundle/pull/6251)] Cast $allItems to an boolean to prevent typehint error ([@nieuwenhuisen](https://github.com/nieuwenhuisen))

### Deprecated
- [[#6308](https://github.com/sonata-project/SonataAdminBundle/pull/6308)] Passing a Pool to SearchHandler class ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#6291](https://github.com/sonata-project/SonataAdminBundle/pull/6291)] Deprecated `Sonata\AdminBundle\Datagrid\ProxyQueryInterface::getSingleScalarResult` ([@VincentLanglet](https://github.com/VincentLanglet))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `base_filter_field.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `base_inline_edit_field.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `base_standard_edit_field.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_array.html.twig ` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_boolean.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_file.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_integer.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_sonata_type_immutable_array.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_string.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6238](https://github.com/sonata-project/SonataAdminBundle/pull/6238)] Deprecated `edit_text.html.twig` template ([@franmomu](https://github.com/franmomu))
- [[#6215](https://github.com/sonata-project/SonataAdminBundle/pull/6215)] Deprecated `BaseFieldDescription::setHelp()` and `BaseFieldDescription::getHelp()` ([@franmomu](https://github.com/franmomu))
- [[#6215](https://github.com/sonata-project/SonataAdminBundle/pull/6215)] Deprecated passing `help` option to `BaseFieldDescription::setOptions()` ([@franmomu](https://github.com/franmomu))
- [[#6215](https://github.com/sonata-project/SonataAdminBundle/pull/6215)] Deprecated `FormMapper::setHelps()` and `FormMapper:: addHelp()` ([@franmomu](https://github.com/franmomu))
- [[#6215](https://github.com/sonata-project/SonataAdminBundle/pull/6215)] Deprecated passing `help` option to `FormMapper::add()` third argument containing HTML code without also passing `help_html` with `true` value ([@franmomu](https://github.com/franmomu))

### Fixed
- [[#6297](https://github.com/sonata-project/SonataAdminBundle/pull/6297)] ObjectManipulator::setObject does not throw an error anymore for DoctrineODM Embedded collections ([@VincentLanglet](https://github.com/VincentLanglet))

## [3.73.0](https://github.com/sonata-project/SonataAdminBundle/compare/3.72.0...3.73.0) - 2020-07-31
### Added
- [[#6200](https://github.com/sonata-project/SonataAdminBundle/pull/6200)] Added support for columns not belonging to the model to the list view. ([@jorrit](https://github.com/jorrit))
Expand Down
37 changes: 27 additions & 10 deletions CONTRIBUTING.md
@@ -1,3 +1,9 @@
<!--
DO NOT EDIT THIS FILE!
It's auto-generated by sonata-project/dev-kit package.
-->

# Sonata project contribution

Thanks for your interest in Sonata projects!
Expand Down Expand Up @@ -266,15 +272,17 @@ The deprecated minor version **MUST NOT** be provided. Use `x` instead. It will
Any deprecation **MUST** be documented in the corresponding `UPGRADE-[0-9].x.md`.
The documentation **MUST** be filled inside the top **unreleased** section with a sub title.

The `NEXT_MAJOR` tag SHOULD not be used for deprecation.
The `@deprecated` and `E_USER_DEPRECATED` key will be searched for before releasing the next major version.
The `NEXT_MAJOR` tag SHOULD also be used for deprecations, it will be searched for before releasing the next major version.

You have three ways to deprecate things.

For class definitions, methods (or first level functions) and properties, use the `@deprecated` tag:
For class definitions and properties, use the `@deprecated` tag.
For methods, use the `@deprecated` tag and trigger a deprecation with `@trigger_error('...', E_USER_DEPRECATED)`:

```php
/**
* NEXT_MAJOR: Remove this class.
*
* @deprecated since sonata-project/foo-lib 42.x, to be removed in 43.0. Use Shiny\New\ClassOfTheMonth instead.
*/
final class IAmOldAndUseless
Expand All @@ -284,15 +292,24 @@ final class IAmOldAndUseless
final class StillUsedClass
{
/**
* NEXT_MAJOR: Remove this property.
*
* @deprecated since sonata-project/foo-lib 42.x, to be removed in 43.0.
*/
public $butNotThisProperty;

/**
* NEXT_MAJOR: Remove this method.
*
* @deprecated since sonata-project/foo-lib 42.x, to be removed in 43.0.
*/
public function iAmBatman()
{
@trigger_error(sprintf(
'Method %s() is deprecated since sonata-project/foo-lib 42.x and will be removed in version 43.0.',
__METHOD__
), E_USER_DEPRECATED);

echo "But this is not Gotham here.";
}
}
Expand All @@ -301,6 +318,7 @@ final class StillUsedClass
If the deprecated thing is a service, you **MUST** specify it on the service definition:

```xml
<!-- NEXT_MAJOR: Remove this service -->
<service id="sonata.block.old" class="Sonata\Block\Old">
<argument type="service" id="security.token_storage" />
<deprecated>The "%service_id%" service is deprecated since sonata-project/bar-bundle 42.x and will be removed in 43.0.</deprecated>
Expand All @@ -309,26 +327,25 @@ If the deprecated thing is a service, you **MUST** specify it on the service def

More info: http://symfony.com/blog/new-in-symfony-2-8-deprecated-service-definitions

For everything else, not managed by the `@deprecated` tag, you **MUST** trigger a deprecation message.
For everything else, not managed by the `@deprecated` tag,
you **MUST** still trigger a deprecation message (and add a `NEXT_MAJOR` comment).

```php
<?php
// NEXT_MAJOR: Remove this condition.
if (/* some condition showing the user is using the legacy way */) {
@trigger_error(
'The '.__METHOD__.' method is deprecated since sonata-project/bar-bundle 42.x, to be removed in 43.0. '.
'Use FooClass::barMethod() instead.',
'This is deprecated since sonata-project/bar-bundle 42.x and will not be supported in version 43.0.',
E_USER_DEPRECATED
);
} else {
// new way of doing things
}
```

Note that the `trigger_error` usage is not necessary if the `@deprecated` tag is used.

In the case of a deprecation, unit tests might show your deprecation notice.
You **MUST** mark such tests with the `@group legacy` annotation and if need be,
isolate them in a new test method that can simply be removed in the non-BC PR.
You **MUST** mark such tests with the `@group legacy` annotation and add a `NEXT_MAJOR` comment to explain
how to deal with them in the next major (with a removal or some changes).

Be aware that pull requests with BC breaks could be rejected
or postponed to next major release **only** if BC is not possible.
Expand Down
6 changes: 6 additions & 0 deletions README.md
@@ -1,3 +1,9 @@
<!--
DO NOT EDIT THIS FILE!
It's auto-generated by sonata-project/dev-kit package.
-->

# Sonata Admin Bundle

The missing Symfony Admin Generator
Expand Down
13 changes: 0 additions & 13 deletions UPGRADE-2.1.md

This file was deleted.

10 changes: 0 additions & 10 deletions UPGRADE-2.2.md

This file was deleted.

19 changes: 0 additions & 19 deletions UPGRADE-2.3.md

This file was deleted.

0 comments on commit f27b6e2

Please sign in to comment.