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

Add recipe for FOSUserBundle #270

Merged
9 commits merged into from
Apr 6, 2019
Merged

Add recipe for FOSUserBundle #270

9 commits merged into from
Apr 6, 2019

Conversation

tattali
Copy link
Contributor

@tattali tattali commented Feb 1, 2018

Q A
License MIT

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request does not pass validation.

…fsymfony/user-bundle/2.1.x-dev/post-install.txt
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request does not pass validation.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request does not pass validation.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Looks good. Ping me when 2.1 is released and I'll be happy to merge.

@tattali
Copy link
Contributor Author

tattali commented Feb 5, 2018

Thanks I will

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

user_class: App\Entity\User
from_email:
address: "address"
sender_name: "name"
Copy link
Contributor

@covex-nn covex-nn Feb 5, 2018

Choose a reason for hiding this comment

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

@tattali FOSUserBundle can be used without templating service. Add this to use twig directly:

fos_user:
    service:
        mailer: fos_user.mailer.twig_swift

It can be used even without mailer service, if a bug will be fixed (PR is not accepted/merged yet). See FriendsOfSymfony/FOSUserBundle#2707 and FriendsOfSymfony/FOSUserBundle#2704

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok sorry when I did the search I did not see your recipe. If you want we can use yours that looks more accomplished.

Copy link
Contributor

@covex-nn covex-nn Feb 6, 2018

Choose a reason for hiding this comment

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

There is no my recipe as there is no v2.1 release yet =) And it is not possible to create recipe right now, because even with new fos_user.service.mailer parameter, FOSUB will require doctrine-bundle for fos_user.db_driver: orm. I've created PR FriendsOfSymfony/FOSUserBundle#2708 ~~~but they ignore me =)~~~

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you for this PR. Can you make sure Travis is happy?

@tattali
Copy link
Contributor Author

tattali commented Feb 26, 2018

For now it's impossible to create a recipe for this bundle because it's necessary to install an orm (that you choose) and swiftmailer separately.
As long as these two problems are not resolved the travis test will make it wrong.

This was referenced Apr 12, 2018
patrickbussmann added a commit to patrickbussmann/recipes-contrib that referenced this pull request May 16, 2018
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

@Nyholm
Copy link
Member

Nyholm commented Jun 22, 2018

Can you make sure travis is happy?

@tattali
Copy link
Contributor Author

tattali commented Jul 1, 2018

This recipe work only on symfony/website-skeleton and not on symfony/skeleton.
Travis can't be happy from now.
A mailer is needed at the installation of the bundle.
But they won't choose between available mailer or make us disable the needs of the mailer if no one are installed.

@tattali
Copy link
Contributor Author

tattali commented Jul 3, 2018

If you want to see a recipe for FOSUserBundle take a look and show your support by 👍 on :
FriendsOfSymfony/FOSUserBundle#2708 (comment)

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request does not pass validation.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Contributor

@maxhelias maxhelias left a comment

Choose a reason for hiding this comment

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

Just a little change but it looks good while waiting for compatibility so that Travis is happy.

By the way, could you update the post-install.txt file accordingly

mailer: fos_user.mailer.noop
firewall_name: main
user_class: App\Entity\User
from_email:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use that :

from_email:
        address: '%env(MAILER_SENDER_ADDRESS)%'
        sender_name: '%env(MAILER_SENDER_NAME)%'

@@ -0,0 +1,18 @@
fos_user_security:
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you didn't load the routes like that ?

fos_user:
    resource: '@FOSUserBundle/Resources/config/routing/all.xml'

Copy link
Contributor Author

@tattali tattali Aug 16, 2018

Choose a reason for hiding this comment

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

People may not need every routes

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right, it seems good to me 👍
I can not wait to see this merged

Copy link
Contributor Author

Choose a reason for hiding this comment

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

me too I hope this PR FriendsOfSymfony/FOSUserBundle#2708 will be merged soon

"copy-from-recipe": {
"config/": "%CONFIG_DIR%/",
"src/": "%SRC_DIR%/"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the env var

,
"env": {
    "MAILER_SENDER_ADDRESS": "[email protected]",
    "MAILER_SENDER_NAME": "John Doe"
}

@@ -0,0 +1,9 @@
fos_user:
db_driver: orm
service:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move service block between user_class and from_email for more readability please?

{
/**
* @ORM\Column(type="integer")
* @ORM\Id
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you switch order with line above please

Copy link
Contributor Author

@tattali tattali Aug 16, 2018

Choose a reason for hiding this comment

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

This entity is maybe going to disappear because it's a doctrine orm entity and not mongo or couchdb

@maxhelias maxhelias mentioned this pull request Aug 15, 2018
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Pull request passes validation.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you. This looks good.

#eu-fossa

@ghost ghost merged commit 9bd9382 into symfony:master Apr 6, 2019
ghost pushed a commit that referenced this pull request Apr 6, 2019
@Devolicious
Copy link
Contributor

@Nyholm @tattali The build failed for this PR. It includes config that is not supported (yet) by FOSUserBundle and now results in an error when you install the package. The PR for support of the no_driver is still ongoing at FriendsOfSymfony/FOSUserBundle#2708. This should not have been merged imho.

@Nyholm
Copy link
Member

Nyholm commented Apr 9, 2019

Oh, @Devolicious, you might be correct. Do you want to "correct" this PR or what is the status on the no_driver?

@Devolicious
Copy link
Contributor

@Nyholm For the time being I don't think there is any good solution except reverting this PR because the driver needs to be set and if you choose one of the supported drivers you need to have the corresponding packages as well which also breaks the build/install process if you do not have it installed. That's the main reason why they created the no_driver option but it is heavily debated it seems. Not sure why the discussion halted somewhere in august as the PR is approved but not merged.

@Devolicious
Copy link
Contributor

@maxhelias Can you give some more insight into this problem?

@maxhelias
Copy link
Contributor

maxhelias commented Apr 9, 2019

@Devolicious In fact, FOSUserbundle does not depend on DoctrinBundle, but the db_driver option in the recipe requires another recipe to work properly as orm or mongodb.
The solution would be to revert the merge and wait for the merger of no_driver

@Devolicious
Copy link
Contributor

@Nyholm can you revert this PR?

Nyholm added a commit to Nyholm/recipes-contrib that referenced this pull request Apr 11, 2019
It was merge prematurely. Reverting symfony#270
@Nyholm
Copy link
Member

Nyholm commented Apr 11, 2019

@Devolicious, See #655

Nyholm added a commit to Nyholm/recipes-contrib that referenced this pull request Apr 11, 2019
Initially added in symfony#270 and reverted in symfony#655
Nyholm added a commit to Nyholm/recipes-contrib that referenced this pull request Apr 11, 2019
Initially added in symfony#270 and reverted in symfony#655
This pull request was closed.
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