Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit fe3a61c

Browse files
committed
Merge branch 'master' into dev
Conflicts: bundles/phpcr_odm.rst cookbook/creating_a_cms/getting-started.rst cookbook/creating_a_cms/make-homepage.rst
2 parents af995a3 + 8fe5842 commit fe3a61c

File tree

16 files changed

+186
-49
lines changed

16 files changed

+186
-49
lines changed

book/static_content.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ It also specifies the translation strategy:
5050
use Doctrine\ODM\PHPCR\Mapping\Annotations as PHPCR;
5151
5252
/**
53-
* @PHPCRODM\Document(translator="child", referenceable=true)
53+
* @PHPCR\Document(translator="child", referenceable=true)
5454
*/
5555
5656
For information on the available translation strategies, refer to the Doctrine

bundles/map.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ library or they introduce a complete new concept.
5656

5757
* :doc:`search/index`
5858

59-
* :doc:`search/introduction`
59+
* :doc:`search/introduction`
6060

6161
* :doc:`tree_browser/index`
6262

bundles/media/adapters/elfinder.rst

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ implementing the MediaBundle interfaces.
1313
Installation
1414
~~~~~~~~~~~~
1515

16-
1. *FMElfinderBundle* - Follow the installation instructions from the
17-
`FMElfinderBundle documentation`_.
18-
2. *FMElfinderBundle* - Use the MediaBundle adapter:
16+
1. Install the FMElfinderBundle according to the `FMElfinderBundle documentation`_.
17+
2. Configure the FMElfinderBundle to use the MediaBundle adapter:
1918

2019
.. configuration-block::
2120

@@ -74,8 +73,15 @@ Installation
7473
),
7574
));
7675
77-
3. *LiipImagineBundle* - When using LiipImagineBundle, add an imagine filter
78-
for the thumbnails:
76+
.. note::
77+
78+
The driver service depends on your storage layer. For now, the MediaBundle
79+
only provides a PHPCR driver. To make the above configuration work, you
80+
need to enable PHPCR either globally on ``cmf_core.persistence:phpcr`` or,
81+
if you only use the MediaBundle, directly on the bundle at
82+
``cmf_media.persistence.phpcr``.
83+
84+
3. When using the LiipImagineBundle, add an imagine filter for the thumbnails:
7985

8086
.. configuration-block::
8187

@@ -131,7 +137,7 @@ Installation
131137
),
132138
));
133139
134-
4. Test the elFinder browser by navigating to: http://localhost:8000/app_dev.php/elfinder
140+
4. Test the elFinder browser by navigating to: http://<yoursite>/app_dev.php/elfinder
135141

136142
.. _`elFinder`: http://elfinder.org
137143
.. _`FMElfinderBundle`: https://github.com/helios-ag/FMElfinderBundle

bundles/media/introduction.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,14 @@ Installation
8787
8888
return $collection;
8989
90-
3. Run the ``doctrine:phpcr:repository:init`` command, it runs all tagged
91-
:ref:`phpcr-odm-repository-initializers` including the MediaBundle
92-
initializer.
90+
3. For now, the only supported persistence layer is PHPCR. If you enabled PHPCR
91+
on the CoreBundle, you need to do nothing here. If you do not have the
92+
CMF CoreBundle in your project, you need to configure
93+
``cmf_media.persistence.phpcr.enabled: true``.
94+
95+
4. For PHPCR, run the ``doctrine:phpcr:repository:init`` command, to have the
96+
base paths initialized, using the
97+
:ref:`repository initializers <phpcr-odm-repository-initializers>`.
9398

9499
Interfaces
95100
----------

bundles/menu/sonata_admin.rst

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ select the menu node target.
2424
2525
# app/config/config.yml
2626
cmf_menu:
27-
dynamic:
28-
persistence:
29-
phpcr:
30-
# use true/false to force using / not using sonata admin
31-
use_sonata_admin: auto
27+
persistence:
28+
phpcr:
29+
# use true/false to force using / not using sonata admin
30+
use_sonata_admin: auto
3231
33-
# used with Sonata Admin to manage content; defaults to %cmf_core.basepath%/content
34-
content_basepath: ~
32+
# used with Sonata Admin to manage content; defaults to %cmf_core.basepath%/content
33+
content_basepath: ~
3534
3635
.. code-block:: xml
3736
@@ -42,33 +41,29 @@ select the menu node target.
4241
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
4342
4443
<config xmlns="http://cmf.symfony.com/schema/dic/menu">
45-
<dynamic>
46-
<persistence>
47-
<!-- use-sonata-admin: use true/false to force using / not using sonata admin -->
48-
<!-- content-basepath: used with Sonata Admin to manage content;
49-
defaults to %cmf_core.basepath%/content -->
50-
<phpcr
51-
use-sonata-admin="auto"
52-
content-basepath="null"
53-
/>
54-
</persistence>
55-
</dynamic>
44+
<persistence>
45+
<!-- use-sonata-admin: use true/false to force using / not using sonata admin -->
46+
<!-- content-basepath: used with Sonata Admin to manage content;
47+
defaults to %cmf_core.basepath%/content -->
48+
<phpcr
49+
use-sonata-admin="auto"
50+
content-basepath="null"
51+
/>
52+
</persistence>
5653
</config>
5754
</container>
5855
5956
.. code-block:: php
6057
6158
// app/config/config.php
6259
$container->loadFromExtension('cmf_menu', array(
63-
'dynamic' => array(
64-
'persistence' => array(
65-
'phpcr' => array(
66-
// use true/false to force using / not using sonata admin
67-
'use_sonata_admin' => 'auto',
68-
69-
// used with Sonata Admin to manage content; defaults to %cmf_core.basepath%/content
70-
'content_basepath' => null,
71-
),
60+
'persistence' => array(
61+
'phpcr' => array(
62+
// use true/false to force using / not using sonata admin
63+
'use_sonata_admin' => 'auto',
64+
65+
// used with Sonata Admin to manage content; defaults to %cmf_core.basepath%/content
66+
'content_basepath' => null,
7267
),
7368
),
7469
));

bundles/phpcr_odm.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,6 +1244,11 @@ Form Types
12441244
The bundle provides a couple of handy form types for PHPCR and PHPCR-ODM
12451245
specific cases, along with form type guessers.
12461246

1247+
.. tip::
1248+
1249+
When editing associative multivalue fields, have a look at the
1250+
`BurgovKeyValueFormBundle`_.
1251+
12471252
phpcr_document
12481253
~~~~~~~~~~~~~~
12491254

@@ -1370,7 +1375,7 @@ A service to use the generic initializer looks like this:
13701375
arguments:
13711376
- AcmeContentBundle Basepaths
13721377
- { "%acme.content_basepath%", "%acme.menu_basepath%" }
1373-
- { "%acme.cnd%" }
1378+
- "%acme.cnd%"
13741379
tags:
13751380
- { name: "doctrine_phpcr.initializer" }
13761381
@@ -1693,3 +1698,4 @@ Dumping nodes under ``/cms/simple`` including their properties:
16931698
.. _`SQL2 queries`: http://www.h2database.com/jcr/grammar.html
16941699
.. _`DoctrineCacheBundle`: https://github.com/doctrine/DoctrineCacheBundle/
16951700
.. _`last modified listener cookbook entry`: http://docs.doctrine-project.org/projects/doctrine-phpcr-odm/en/latest/cookbook/last-modified.html
1701+
.. _`BurgovKeyValueFormBundle`: https://github.com/Burgov/KeyValueFormBundle

components/routing/chain.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ add the default Symfony2 router::
4040
$chainRouter->match('/foo/bar');
4141

4242
Now, when the ``ChainRouter`` matches a request, it will ask the Symfony2
43-
``Router`` to match see if it matches. If there is no match, it will throw a
43+
``Router`` to see if the request matches. If there is no match, it will throw a
4444
:class:`Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException`.
4545

4646
If you add a new router, for instance the ``DynamicRouter``, it will be

contributing/code.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ Contributing
44
The Symfony2 CMF team follows all the rules and guidelines of the core
55
Symfony2 `development process`_.
66

7-
When creating Pull Requests, please follow the Symfony `Submitting a Patch`_ guidlines.
7+
When creating Pull Requests, please follow the Symfony `Submitting a Patch`_
8+
guidelines.
9+
10+
.. tip::
11+
12+
See :doc:`commits` for the commit conventions used by the Symfony CMF
13+
team.
814

915
Resources / Links
1016
-----------------
@@ -25,4 +31,4 @@ Resources / Links
2531
.. _`IRC channel`: irc://freenode/#symfony-cmf
2632
.. _`Users mailing list`: http://groups.google.com/group/symfony-cmf-users
2733
.. _`Devs mailing list`: http://groups.google.com/group/symfony-cmf-devs
28-
.. _`Submitting a Patch`: http://symfony.com/doc/current/contributing/code/patches.html
34+
.. _`Submitting a Patch`: http://symfony.com/doc/current/contributing/code/patches.html

contributing/commits.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
Commit Conventions
2+
==================
3+
4+
The Symfony CMF uses a convention for the commits. This isn't a requirement
5+
when contributing to the CMF, but it is created to have meaningfull commits
6+
for big new features.
7+
8+
Squashing
9+
---------
10+
11+
Before a Pull Request is merged, the commits should be squashed (i.e. there
12+
should be a single commit in the Pull Request with all your work in it).
13+
14+
You can easily squash a commit using `git rebase` as follows:
15+
16+
.. code-block:: bash
17+
18+
$ git rebase --interactive HEAD~<number of commits in your pull request>
19+
20+
For example, if your pull request on github has 4 commits:
21+
22+
.. code-block:: bash
23+
24+
$ git rebase --interactive HEAD~4
25+
26+
You will then be presented with a screen in your editor which looks something
27+
like this:
28+
29+
.. code-block:: bash
30+
31+
pick 5d4530b port features from simple cms into routing bundle to simplify things
32+
pick 1a0eea3 cs fixes and cleanups according to feedback
33+
pick 8cbab56 convert settings to options
34+
pick 8f3e4f9 cleanups for the options refactoring
35+
36+
Tell github to pick the first one and squash the rest as follows:
37+
38+
.. code-block:: bash
39+
40+
pick 5d4530b port features from simple cms into routing bundle to simplify things
41+
s 1a0eea3 cs fixes and cleanups according to feedback
42+
s 8cbab56 convert settings to options
43+
s 8f3e4f9 cleanups for the options refactoring
44+
45+
Save the file and quit. GIT should now squash all your commits and ask you
46+
for a new commit message.
47+
48+
Commit Message
49+
--------------
50+
51+
The commit message should be formatted as follows:
52+
53+
.. code-block:: text
54+
55+
[<scope>] <short description>
56+
57+
Fixes: <list of issues fixed>
58+
59+
<long description>
60+
61+
BC Breaks (as required)
62+
---------
63+
64+
<list of BC breaks and required migrations>
65+
66+
Deprecations (as required)
67+
------------
68+
69+
<list of deprecations>
70+
71+
For example, the commit message of a PR fixing 2 issues and adding 2 BC breaks
72+
would be:
73+
74+
.. code-block:: text
75+
76+
[Initializer] Initializers use ManagerRegistry
77+
78+
Fixes: #1234, #4321
79+
80+
Initializers are now passed an instance of `ManagerRegistry` instead
81+
of the `Phpcr\Session`. This means that initializers can retrieve both
82+
the PHPCR session and the `DocumentManager`.
83+
84+
This PR also introduces a requirement that all initializers provide a name
85+
which can be used in diagnostics.
86+
87+
BC Breaks
88+
---------
89+
90+
- The `init` method of the InitializerInterface now accepts a
91+
`ManagerResistry` instead of a `PhpcrSession`. The PHPCR session can
92+
be retrieved using `$registry->getConnection` and the manager with
93+
`$registry->getManager()`;
94+
95+
- The first argument to the `GenericInitializer` constructor is now the
96+
name of the initializer.
97+
98+
Short Commit Message
99+
~~~~~~~~~~~~~~~~~~~~
100+
101+
Not all Pull Requests require this much information for the commit. In most
102+
cases, a more simpler commit convention is enough:
103+
104+
.. code-block:: text
105+
106+
<bug|feature|minor> [<scope>] <short description>
107+
108+
Where ``bug`` refers to a commit fixing bugs, ``feature`` to a commit adding
109+
features and ``minor`` to commits adding less relevant things (fixing code
110+
standard, adding comments, fixing typos, etc.).

contributing/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Contributing
55
:hidden:
66

77
code
8+
commits
89
bundles
910
releases
1011
license

0 commit comments

Comments
 (0)