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

[User] Change user bundle configuration to be able to support multipl… #5539

Merged
merged 23 commits into from
Aug 12, 2016

Conversation

Arminek
Copy link
Contributor

@Arminek Arminek commented Jul 19, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? yes
Related tickets #5547
License MIT

@Arminek Arminek changed the title [User] Change user bundle configuration to be able to support multipl… [WIP][User] Change user bundle configuration to be able to support multipl… Jul 19, 2016
@@ -55,7 +55,7 @@ public function load(array $config, ContainerBuilder $container)
->getDefinition('sylius.form.type.customer')
->addArgument(new Reference('sylius.form.event_subscriber.add_user_type'))
;

Copy link
Contributor

Choose a reason for hiding this comment

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

😢

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@Arminek Arminek force-pushed the support-multiple-user-entity branch from c768685 to 97de80a Compare July 19, 2016 14:30
@liverbool
Copy link
Contributor

What's the detail of this PR, I think I don't know the main idea of this.

@Arminek
Copy link
Contributor Author

Arminek commented Jul 20, 2016

The main idea of this PR is to generate services per defined users. And have configuration similar to this

sylius_user:
    resources:
        admin:
            user:
                classes:
                    model: Sylius\Component\Core\Model\User
                    form:
                        default: Sylius\Bundle\CoreBundle\Form\Type\UserType
        shop:
            user:
                classes:
                    model: Sylius\Component\Core\Model\Customer
                    controller: Sylius\Bundle\CoreBundle\Controller\CustomerController

@pamil
Copy link
Contributor

pamil commented Jul 20, 2016

Btw. should customer be a user?

@michalmarcinkowski
Copy link
Contributor

I believe @Arminek meant:

sylius_user:
    resources:
        admin:
            user:
                classes:
                    model: Sylius\Component\Core\Model\AdminUser
        shop:
            user:
                classes:
                    model: Sylius\Component\Core\Model\ShopUser

😉

@pamil
Copy link
Contributor

pamil commented Jul 20, 2016

That makes sense :)

@Arminek Arminek force-pushed the support-multiple-user-entity branch 2 times, most recently from 242db22 to a43572c Compare August 2, 2016 08:27
@Arminek Arminek force-pushed the support-multiple-user-entity branch 3 times, most recently from 46189ba to 7d3530b Compare August 4, 2016 15:50
@Arminek Arminek changed the title [WIP][User] Change user bundle configuration to be able to support multipl… [User] Change user bundle configuration to be able to support multipl… Aug 9, 2016
@@ -46,7 +47,7 @@ function it_should_extend_user_provider()

function it_supports_sylius_user_model()
{
$this->supportsClass(UserInterface::class)->shouldReturn(true);
$this->supportsClass(User::class)->shouldReturn(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

  • it does not support some other model

@Arminek Arminek force-pushed the support-multiple-user-entity branch from fcc3450 to 63e8c65 Compare August 9, 2016 14:00
@@ -9,7 +9,7 @@ Feature: Editing an administrator
And there is an administrator "Gareth Bale" identified by an email "bale@example.com" and a password "bale11"
And I am logged in as "bale@example.com"

@ui @javascript
@todo
Copy link
Member

Choose a reason for hiding this comment

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

💨

Copy link
Contributor Author

@Arminek Arminek Aug 11, 2016

Choose a reason for hiding this comment

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

This feature is no longer supported 😉 but in near feature it will be 💃

@Arminek Arminek force-pushed the support-multiple-user-entity branch 2 times, most recently from 90f7bb3 to 8a463a2 Compare August 11, 2016 17:44
@Arminek Arminek force-pushed the support-multiple-user-entity branch from 8a463a2 to 4b538a7 Compare August 11, 2016 18:25
@pjedrzejewski pjedrzejewski merged commit 6ad017e into Sylius:master Aug 12, 2016
@pjedrzejewski
Copy link
Member

Really great work Arek, thanks a lot! :)

pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[User] Change user bundle configuration to be able to support multipl…
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[User] Change user bundle configuration to be able to support multipl…
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
[User] Change user bundle configuration to be able to support multipl…
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.

None yet

8 participants