Skip to content

Fix phpstan and bump Psalm#1421

Merged
VincentLanglet merged 20 commits into
sonata-project:masterfrom
VincentLanglet:psalm
May 2, 2021
Merged

Fix phpstan and bump Psalm#1421
VincentLanglet merged 20 commits into
sonata-project:masterfrom
VincentLanglet:psalm

Conversation

@VincentLanglet
Copy link
Copy Markdown
Member

@VincentLanglet VincentLanglet commented Apr 19, 2021

Changelog

### Changed
- Use `FilterData` instead of `array` in filters.

@VincentLanglet VincentLanglet marked this pull request as draft April 19, 2021 11:21
Comment thread composer.json
"doctrine/orm": "^2.5",
"doctrine/persistence": "^2.0",
"sonata-project/admin-bundle": "^4.0@alpha",
"sonata-project/admin-bundle": "^4.0@dev",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you will also need to conflict with previous alphas

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"sonata-project/admin-bundle": "<=4.0.0-alpha-1" ?

@VincentLanglet
Copy link
Copy Markdown
Member Author

Works with sonata-project/SonataAdminBundle#7092

VincentLanglet and others added 3 commits April 19, 2021 23:57
* documentation for custom DataSource

* satisfy rst linter

* added data_source to index tree

* fixed indention
@VincentLanglet VincentLanglet mentioned this pull request Apr 27, 2021
@VincentLanglet
Copy link
Copy Markdown
Member Author

I'll wait for #1425 since I use Paginator as return type in the last commit.

@VincentLanglet VincentLanglet marked this pull request as ready for review May 1, 2021 12:22
@VincentLanglet VincentLanglet added this to the 4.0 milestone May 1, 2021
@VincentLanglet VincentLanglet requested a review from a team May 1, 2021 12:22
VincentLanglet and others added 4 commits May 2, 2021 14:45
* Stop using SonataAdmin config in doctrineORMAdmin

* Fix deprecation
`FilterData` will be introduced in version 4.0 as type declaration
of argument 4 of `Filter::apply()`.

This commit adds an upgrade path when using `CallbackFilter` which
receives a `callable` instance in order to filter.

If this `callable` does not use a type declaration for argument
4 or uses `array` (current type), it triggers a deprecation.
It checks that the number of results from Pager must be the same as
using Simple Pager
@VincentLanglet
Copy link
Copy Markdown
Member Author

This is ready to be merged @sonata-project/contributors

@jordisala1991
Copy link
Copy Markdown
Member

Probably a changelog would be needed.

@VincentLanglet
Copy link
Copy Markdown
Member Author

Probably a changelog would be needed.

For which change ?

@jordisala1991
Copy link
Copy Markdown
Member

For the Array to class change for instance.

IMO you should list what you did in this PR in the body of the initial message first. This Pr is not only about bumping psalm and phpstan

@jordisala1991
Copy link
Copy Markdown
Member

This Pr also overrides another one from @franmomu , should be nice to link them too.

@VincentLanglet
Copy link
Copy Markdown
Member Author

### Changed
- Use `FilterData` instead of `array` in filters.

Is this enough ?

@VincentLanglet
Copy link
Copy Markdown
Member Author

IMO you should list what you did in this PR in the body of the initial message first. This Pr is not only about bumping psalm and phpstan

The PR was initially bumping psalm/phpstan but since it was opened too much time, I had to

  • Add the FilterData support in order to be compatible with the latest SonataAdmin commits, I added the changelog.
  • Merge 3.x into this branch in order to take some bugfix, this doesn't require a changelog.

@VincentLanglet VincentLanglet merged commit 3677ecc into sonata-project:master May 2, 2021
@VincentLanglet VincentLanglet deleted the psalm branch May 2, 2021 15:14
@franmomu franmomu mentioned this pull request May 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants