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

Upgrade Sonatablock and SonataSeo #1448

Closed
wants to merge 1 commit into from

Conversation

Daric971
Copy link
Contributor

Subject

I am targeting this branch, because I updated to allow version 3 of sonataSeo

Closes #{put_issue_number_here}.

Changelog

### Added
- Added some `Class::newMethod()` to do great stuff.

### Changed
- Config flies (block and admin)
- Admin class
- BlockService classes
- FormType classes
- PageService classes
- Listeners
- mapper
- Tests

### Deprecated

### Removed

### Fixed

### Security

composer.json Outdated Show resolved Hide resolved
src/Block/ContainerBlockService.php Outdated Show resolved Hide resolved
src/Block/BreadcrumbBlockService.php Outdated Show resolved Hide resolved
src/Block/BlockContextManager.php Outdated Show resolved Hide resolved
src/Block/BlockContextManager.php Outdated Show resolved Hide resolved
@VincentLanglet VincentLanglet mentioned this pull request Jul 13, 2022
17 tasks
@Daric971 Daric971 force-pushed the upgrade-sonata-block branch from 7525b01 to 8bc6056 Compare July 13, 2022 12:08
src/Block/ContainerBlockService.php Outdated Show resolved Hide resolved
src/Block/PageListBlockService.php Show resolved Hide resolved
@Daric971 Daric971 force-pushed the upgrade-sonata-block branch from 8bc6056 to 541fa4b Compare July 13, 2022 15:10
VincentLanglet
VincentLanglet previously approved these changes Jul 13, 2022
src/DependencyInjection/SonataPageExtension.php Outdated Show resolved Hide resolved
src/Form/Type/PageSelectorType.php Outdated Show resolved Hide resolved
src/Form/Type/PageTypeChoiceType.php Outdated Show resolved Hide resolved
src/Form/Type/TemplateChoiceType.php Outdated Show resolved Hide resolved
src/Resources/config/admin.xml Outdated Show resolved Hide resolved
<argument>sonata.page.block.breadcrumb</argument>
<argument type="service" id="sonata.templating"/>
<argument type="service" id="knp_menu.menu_provider"/>
<argument type="service" id="twig"/>
Copy link
Member

Choose a reason for hiding this comment

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

Are all those changes correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ContainerBlockService from SonataBlockBundle is a final, I have to decorate, so give it in argurment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seo has been updated, BaseBreadcrumbMenuBlockService need twig and FactoryInterface(KNP). Plus, sonata.templating disappear from the project

Copy link
Contributor

Choose a reason for hiding this comment

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

where are you decorating the "SonataBlockBundle"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

BlockContextManager & ContainerBlockService

src/Block/BlockContextManager.php Outdated Show resolved Hide resolved
src/Block/BlockContextManager.php Outdated Show resolved Hide resolved
@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

composer.json Show resolved Hide resolved
composer.json Show resolved Hide resolved
src/Block/BlockContextManager.php Outdated Show resolved Hide resolved
src/Block/BreadcrumbBlockService.php Outdated Show resolved Hide resolved
@eerison
Copy link
Contributor

eerison commented Jul 15, 2022

should be good provide a list of things, pages or commands that was changed! with this we can check when we going to test 4.x branch.

well I'm a bit afraid to say that it's fine to merge, because I can see too much changes and any new test created and if you see, block and admin folder are with low test coverage, then I don't know :/

@Daric971 after you made all those changes every thing works as expected?

@VincentLanglet
Copy link
Member

should be good provide a list of things, pages or commands that was changed! with this we can check when we going to test 4.x branch.

well I'm a bit afraid to say that it's fine to merge, because I can see too much changes and any new test created and if you see, block and admin folder are with low test coverage, then I don't know :/

@Daric971 after you made all those changes every thing works as expected?

Maybe the first things to do would be to open a PR on 4.x to improve the coverage then

@eerison
Copy link
Contributor

eerison commented Jul 15, 2022

should be good provide a list of things, pages or commands that was changed! with this we can check when we going to test 4.x branch.
well I'm a bit afraid to say that it's fine to merge, because I can see too much changes and any new test created and if you see, block and admin folder are with low test coverage, then I don't know :/
@Daric971 after you made all those changes every thing works as expected?

Maybe the first things to do would be to open a PR on 4.x to improve the coverage then

maybe just cover the code that will be changed before change is reasonable. specially when you are not sure how everything works!

and probably we can find code that is not necessary, and leads to create a simple solution.

@jordisala1991
Copy link
Member

Increasing phpstan and psalm also gives confidence

@Daric971
Copy link
Contributor Author

I'm gonna try this change in my project

@VincentLanglet
Copy link
Member

There is also some conflitct on the pr

Copy link
Member

@jordisala1991 jordisala1991 left a comment

Choose a reason for hiding this comment

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

Changes on the Form folder should be reverted (they should be handlded on another PR)

@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@Daric971 Daric971 force-pushed the upgrade-sonata-block branch 2 times, most recently from 2904e7e to a0f473d Compare July 19, 2022 15:34
@VincentLanglet
Copy link
Member

Can you revert the change done in the Form folder @Daric971 ?

We'll add all the typehint in another PR.

$this->optionsResolver = new OptionsResolver();
}

public function getOptionsResolver(): OptionsResolver
Copy link
Member

Choose a reason for hiding this comment

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

This method is not part of the interface

@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@SonataCI
Copy link
Collaborator

Could you please rebase your PR and fix merge conflicts?

@Daric971 Daric971 force-pushed the upgrade-sonata-block branch from 280d63f to dee879a Compare July 20, 2022 13:24
Copy link
Member

@jordisala1991 jordisala1991 left a comment

Choose a reason for hiding this comment

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

We are almost there.

return 'sonata.page.block.pagelist';
}

public function buildEditForm(AdminFormMapper $form, BlockInterface $block): void
Copy link
Member

Choose a reason for hiding this comment

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

the code inside this method should go to the configureEditForm instead right?

@jordisala1991
Copy link
Member

Do you mind if I start a PR on top of your commits to move this faster? currently we are blocked because we need this PR merged.

@jordisala1991
Copy link
Member

This continues here: #1483

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants