Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.x into Master #6712

Merged
merged 33 commits into from
Jan 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6596b2d
Use sonata_config instead of admin_pool (#6677)
franmomu Dec 15, 2020
bcc06ac
Improve NEXT_MAJOR comment for export
VincentLanglet Nov 22, 2020
ca03072
Prefer usage of getter
VincentLanglet Nov 22, 2020
36bd245
Improve AddDependencyCallsCompilerPass
VincentLanglet Nov 22, 2020
18dfcc4
Introduce AdminTag class and interface
VincentLanglet Nov 22, 2020
1578ead
Backport bugfix from master
VincentLanglet Nov 22, 2020
61caba0
Avoid to translate an empty admin label
VincentLanglet Nov 22, 2020
3984b80
Prevent passing a null label to createItem
VincentLanglet Nov 22, 2020
ec80870
Split AbstractAdmin in order to use AbstractAdminTag
VincentLanglet Nov 22, 2020
6945b5a
Fix tests
VincentLanglet Nov 22, 2020
3f4bb99
Improve construct signature
VincentLanglet Nov 28, 2020
50606da
Move AdminTag into DependencyInjection directory
VincentLanglet Dec 1, 2020
a341743
Rename AdminTag to TaggedAdmin
VincentLanglet Dec 4, 2020
3f991f0
Fix conflict
VincentLanglet Dec 5, 2020
94b4fae
Add some methods, coming from AbstractPager and used in twig to Pager…
VincentLanglet Dec 16, 2020
8d49890
Merge branch '3.x'
VincentLanglet Dec 16, 2020
d4f8f03
Fix
VincentLanglet Dec 16, 2020
2cd0803
DevKit updates (#6714)
SonataCI Dec 18, 2020
2882754
Improves getting of first array element (#6722)
JanStorm Dec 21, 2020
811b8e3
Deprecate field name setter from FieldDescriptionInterface (#6720)
VincentLanglet Dec 23, 2020
3ed173b
Check for _per_page existence (#6702)
VincentLanglet Dec 23, 2020
aeb396e
Remove passing admin_pool to twig templates in next major version
franmomu Dec 11, 2020
434b1c3
Add RouteCollectionInterface (#6699)
franmomu Dec 24, 2020
cdb43e9
Merge branch 'master' of github.com:sonata-project/SonataAdminBundle
VincentLanglet Dec 24, 2020
3a68fcc
Fix form label in next major (#6718)
VincentLanglet Dec 31, 2020
9dfe863
Remove public access for getFieldValue (#6716)
VincentLanglet Jan 1, 2021
1bcbbca
Move getListModes into TaggedAdminInterface
VincentLanglet Dec 16, 2020
a4f187f
Update 3.x comments
VincentLanglet Dec 16, 2020
f8a95bf
Fix signature
VincentLanglet Dec 16, 2020
f155604
Minor improvements
VincentLanglet Dec 16, 2020
2d59176
Remove useless template
VincentLanglet Dec 29, 2020
5f8d438
Fix psalm issue
VincentLanglet Dec 29, 2020
fa47670
Merge branch '3.x'
VincentLanglet Jan 2, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v2

- name: Run PHP-CS-Fixer
uses: docker://oskarstark/php-cs-fixer-ga:2.17.1
uses: docker://oskarstark/php-cs-fixer-ga:2.17.2
with:
args: --ansi --verbose --diff --dry-run

Expand Down
59 changes: 59 additions & 0 deletions UPGRADE-3.x.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,65 @@
UPGRADE 3.x
===========

UPGRADE FROM 3.xx to 3.xx
=========================

### Deprecated `FieldDescriptionInterface::getFieldValue()`

`BaseFieldDescription::getFieldValue()` will become protected.

### `RouteCollection` now implements `RouteCollectionInterface`

In 4.0, `AbstractAdmin::configureRoutes` and `AdminExtensionInterface::configureRoutes` will receive a
`RouteCollectionInterface` instance instead of a `RouteCollection` instance, you can update your code before ugprading
to 4.0.

Before:
```php
use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Route\RouteCollection;

final class MyAdmin extends AbstractAdmin
{
protected function configureRoutes(RouteCollection $collection): void
{
$collection->add('my_route');
}
}
```

After:
```php
use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Route\RouteCollectionInterface;

final class MyAdmin extends AbstractAdmin
{
protected function configureRoutes(RouteCollectionInterface $collection): void
{
$collection->add('my_route');
}
}
```
This only will work with PHP >= 7.4, where fully support to contravariance was added.

### Sonata\AdminBundle\Admin\BaseFieldDescription

Method `__construct()` has been updated to receive the field name as argument 6:

```php
public function __construct(
?string $name = null,
array $options = [],
array $fieldMapping = [],
array $associationMapping = [],
array $parentAssociationMappings = [],
?string $fieldName = null
) {
```

Deprecated `Sonata\AdminBundle\Admin\BaseFieldDescription::setFieldName()`.

UPGRADE FROM 3.82 to 3.83
=========================

Expand Down
1 change: 1 addition & 0 deletions src/Action/DashboardAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function __invoke(Request $request): Response
'base_template' => $request->isXmlHttpRequest() ?
$this->templateRegistry->getTemplate('ajax') :
$this->templateRegistry->getTemplate('layout'),
// NEXT_MAJOR: Remove next line.
'admin_pool' => $this->pool,
'blocks' => $blocks,
];
Expand Down
1 change: 1 addition & 0 deletions src/Action/SearchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public function __invoke(Request $request): Response
$this->templateRegistry->getTemplate('ajax') :
$this->templateRegistry->getTemplate('layout'),
'breadcrumbs_builder' => $this->breadcrumbsBuilder,
// NEXT_MAJOR: Remove next line.
'admin_pool' => $this->pool,
'query' => $request->get('q'),
'groups' => $this->pool->getDashboardGroups(),
Expand Down
Loading