Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Add profile to CustomerBundle #634

Merged
merged 1 commit into from
Jan 3, 2020

Conversation

wbloszyk
Copy link
Member

Subject

This PR copy part of profile functionality from SonataUserBundle, becouse it was drop in 4.0 version. I changed some code and added extra configuration like template and menu_builder. This change will fix #547 issue and allow easy intagrate with other profile.

I am targeting this branch, because this PR add features.

Closes #547

Changelog

### Added
- Added configurable profile to CustomerBundle

@wbloszyk
Copy link
Member Author

@salamichel @greg0ire @core23 It is ready to review.

tests/CustomerBundle/Menu/ProfileMenuBuilderTest.php Outdated Show resolved Hide resolved
src/CustomerBundle/Twig/GlobalVariables.php Outdated Show resolved Hide resolved
src/CustomerBundle/Menu/ProfileMenuBuilder.php Outdated Show resolved Hide resolved
src/CustomerBundle/DependencyInjection/Configuration.php Outdated Show resolved Hide resolved
src/CustomerBundle/Controller/CustomerController.php Outdated Show resolved Hide resolved
@wbloszyk wbloszyk requested a review from core23 January 2, 2020 11:54
@wbloszyk
Copy link
Member Author

wbloszyk commented Jan 2, 2020

@core23 thanks, for you are patient for me. I just get to know how to write good, public code.

@wbloszyk
Copy link
Member Author

wbloszyk commented Jan 2, 2020

I add action_with_user_menu.html.twig to easy integrate with the same profile in UserBundle. See SonataUserBundle#916

core23
core23 previously approved these changes Jan 2, 2020
UPGRADE-3.x.md Outdated Show resolved Hide resolved
docs/reference/bundles/customer.rst Outdated Show resolved Hide resolved
src/CustomerBundle/Block/ProfileMenuBlockService.php Outdated Show resolved Hide resolved
src/CustomerBundle/Block/ProfileMenuBlockService.php Outdated Show resolved Hide resolved
src/CustomerBundle/Block/ProfileMenuBlockService.php Outdated Show resolved Hide resolved
src/CustomerBundle/Menu/ProfileMenuBuilder.php Outdated Show resolved Hide resolved
tests/CustomerBundle/Controller/CustomerControllerTest.php Outdated Show resolved Hide resolved
tests/CustomerBundle/Menu/ProfileMenuBuilderTest.php Outdated Show resolved Hide resolved
@greg0ire
Copy link
Contributor

greg0ire commented Jan 2, 2020

Please kindly squash your commits together. If you don't, we'll try to remember to do it for you but it's best if you save us this trouble.

How to do that?

  1. git rebase -i origin/3.x, assuming origin is a git remote that points to this repository, and not your fork. If you're not sure what your remotes are, run git remote -vvv, there should be your fork and the holy/reference/base/origin/whatever-you-call-it repository.
  2. A window will show up with many lines, replace pick with fixup on every line but the first one
  3. Close your editor, git should do its magic, and you should end up with one commit
  4. Use git push --force to overwrite what you already push. Don't forget the --force option otherwise git will try to merge both things together.

@wbloszyk
Copy link
Member Author

wbloszyk commented Jan 2, 2020

@greg0ire thanks for rebase example.

greg0ire
greg0ire previously approved these changes Jan 2, 2020
Update UPGRADE-3.x.md

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update src/CustomerBundle/Block/ProfileMenuBlockService.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update src/CustomerBundle/Block/ProfileMenuBlockService.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update src/CustomerBundle/Block/ProfileMenuBlockService.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update src/CustomerBundle/Menu/ProfileMenuBuilder.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update tests/CustomerBundle/Menu/ProfileMenuBuilderTest.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update tests/CustomerBundle/Controller/CustomerControllerTest.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update profile descriptions

Update src/CustomerBundle/DependencyInjection/Configuration.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update src/CustomerBundle/DependencyInjection/Configuration.php

Co-Authored-By: Grégoire Paris <postmaster@greg0ire.fr>

Update src/CustomerBundle/Twig/GlobalVariables.php

Co-Authored-By: Fran Moreno <franmomu@gmail.com>

Update test
@greg0ire greg0ire merged commit c5cad47 into sonata-project:3.x Jan 3, 2020
@greg0ire
Copy link
Contributor

greg0ire commented Jan 3, 2020

Thanks @wbloszyk !

@wbloszyk wbloszyk deleted the profile_feature branch January 3, 2020 14:48
@wbloszyk wbloszyk mentioned this pull request Feb 5, 2020
20 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unrecognized option "menu" under "sonata_user.profile"
4 participants