-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Update installation documentation for Symfony Flex #1006
Update installation documentation for Symfony Flex #1006
Conversation
There are some problems I encountered while installing and I need your suggestion on how to proceed and should this be added to docs: 1. When installing SonataAdmin there is an error:
Solution is:
As there are PRs on all bundles and Sonata is moving away from templating, I am not sure if this should be added? 2. When installing SonataUser there is an error:
There still is no release of FOSUserBundle. Solution:
3. After installing FOSUser like I did in 2. because there is no recipe the bundle is added to
Solution: Add configuration for FOSUser, I mean we know what to do and error is clear, but I am thinking about people that are installing this, this is connected to 2. with recipe in contrib repo this goes away. 4. The last error I encountered was this issue #942 (comment) and that comment is the solution by @jordisala1991 Did not get into details so not sure about that one at all I just added that config and it worked. Next things are not issues but questions: Do we still need the mention all the bundles in
Should I add
from the ACL configuration to that new part? This is it, for now, will wait for your feedback and hopefully this gets merged soon so people can install it without problems. |
@covex-nn please answer 1. |
docs/reference/installation.rst
Outdated
|
||
ACL Configuration | ||
~~~~~~~~~~~~~~~~~ | ||
When using ACL, the ``UserBundle`` can prevent `normal` user to change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
users
docs/reference/installation.rst
Outdated
ACL Configuration | ||
~~~~~~~~~~~~~~~~~ | ||
When using ACL, the ``UserBundle`` can prevent `normal` user to change | ||
settings of `super-admin` users, to enable this add to the configuration: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"use the following configuration"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
docs/reference/installation.rst
Outdated
php composer.phar require nelmio/api-doc-bundle --no-update # optional when using api | ||
php composer.phar require sonata-project/google-authenticator --no-update # optional | ||
php composer.phar update | ||
php composer require sonata-project/user-bundle --no-update |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could remove php
as well
@kunicmarko20 this error will go away if sonata-project/SonataDoctrineORMAdminBundle#794, sonata-project/SonataAdminBundle#4897 and #1000 will be released (newest BlockBundle already does not use With a recipe AdminBundle could be installed and configured by this commands:
Also, for |
Also with FriendsOfSymfony/FOSUserBundle#2708 and FriendsOfSymfony/FOSUserBundle#2707 it will be possible to create a recipe for FOSUserBundle |
Thank you for info @covex-nn. So I won't add 1., 2. and 3. to docs. The only issue that is left is number 4. and my question about |
@kunicmarko20 i'm waiting for a PRs reviews in FOSUserBundle already 15 days =) and may be we will wait a month (or even more) for a Anyway here is how FOSUserBundle could be configured in the future with Flex FriendsOfSymfony/FOSUserBundle#2704 (comment). The main part is: fos_user:
service:
mailer: fos_user.mailer.twig_swift This parameter will not require |
docs/reference/installation.rst
Outdated
@@ -7,7 +7,8 @@ Installation | |||
Prerequisites | |||
------------- | |||
|
|||
PHP 7 and Symfony 2.8 or 3 are needed to make this bundle work; there are also some Sonata dependencies that need to be installed and configured beforehand: | |||
PHP 7 and Symfony 2.8 or 3 are needed to make this bundle work, there are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7.1. Symfony 2.8, >=3.2 or 4 right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.2 support is ending next week, should I mark it as 3.3 instead?
docs/reference/installation.rst
Outdated
|
||
Next, be sure to enable the bundles in your and ``AppKernel.php`` file: | ||
Next, be sure to enable the bundles in your ``bundles.php`` file if they |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we explain for sf 3 and sf 4?
on Sf 2/3 it should be AppKernel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As flex is now the default way of creating new projects I though that should only be documented or am I wrong? @greg0ire I remember we talked about this on slack WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We MUST assume everyone is using sf 4 and flex. We CAN add sf 2/3 instructions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means I would need to add a note or something like but if you are using symfony 3, do it this way
? so SHOULD I?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's really up to you. Personally, I think people that don't know how to register a bundle and also don't start with sf 4 might be quite rare, so it's probably not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with that because current Symfony doc points to 4.0 and if you are using 3.4 you probably went with flex, if not then you know what you are doing. I do not mind adding docs for 3. If rest of the people think it should be added.
002d043
to
a374dcf
Compare
I added docs for non-flex but I do not really like all the notes with |
271cf38
to
fdf4f90
Compare
docs/reference/installation.rst
Outdated
Sonata\CoreBundle\SonataCoreBundle::class => ['all' => true], | ||
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true], | ||
Sonata\EasyExtendsBundle\SonataEasyExtendsBundle::class => ['all' => true], | ||
FOS\UserBundle\FOSUserBundl::class => ['all' => true], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundle
fdf4f90
to
379b0f6
Compare
docs/reference/installation.rst
Outdated
|
||
If you specify no parameter, the files are generated in ``app/Application/SonataUserBundle`` but you can specify the path with ``--dest=src`` | ||
With provided parameters, the files are generated in ``src/Application/SonataUserBundle``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong, it should be src/Application/Sonata/UserBundle
379b0f6
to
6477e8c
Compare
docs/reference/installation.rst
Outdated
new Sonata\UserBundle\SonataUserBundle(), | ||
// ... | ||
); | ||
return array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add an extra space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't see it, will be fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and you can use short array syntax here, too
docs/reference/installation.rst
Outdated
#... | ||
sonata.user.block.menu: # used to display the menu in profile pages | ||
sonata.user.block.account: # used to display menu option (login option) | ||
sonata.block.service.text: # used to if you plan to use Sonata user routes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the comment looks strange
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that block is not connected to user bundle at all, also all the other blocks are removed in 4.x (not sure if intentionally /cc @jordisala1991 ), I think I will just remove this section.
6477e8c
to
2d5360f
Compare
Thanks @kunicmarko20 ! |
I am targeting this branch, because I am updating documentation for 4.x
Subject
I did a fresh install of SonataUser and docs weren't really ready for use with the new structure of Symfony Flex. Basically, with current documentation, someone that has never used Sonata packages would have a problem getting SonataUser working.