Skip to content

Commit 0060aec

Browse files
committed
cleanup README
1 parent 427f3cf commit 0060aec

File tree

1 file changed

+37
-19
lines changed

1 file changed

+37
-19
lines changed

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,33 @@ You can run the sandbox on your system, or in a virtualbox VM using Vagrant. For
2626
cd cmf-sandbox
2727
# copy parameters template and edit as needed
2828
cp app/config/parameters.yml.dist app/config/parameters.yml
29-
cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml
3029
curl -s http://getcomposer.org/installer | php --
3130

3231
### Install and run Apache JackRabbit
3332

3433
Follow the guide in the [Jackalope Wiki](https://github.com/jackalope/jackalope/wiki/Running-a-jackrabbit-server).
35-
You can also use a different PHPCR implementation but this is what is most tested.
34+
You can also use a different PHPCR implementation but this is the most solid
35+
implementation.
36+
37+
Once you have that, copy the default jackalope-jackrabbit configuration file,
38+
adjust it as needed and install the dependencies with composer:
3639

40+
cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml
3741
php composer.phar install
3842

39-
This will fetch the main project and all it's dependencies ( CMF Bundles, Symfony, Doctrine\PHPCR, Jackalope ... )
40-
Please also adjust the ``app/config/parameters.yml`` as needed.
43+
The last command will fetch the main project and all its dependencies (CMF
44+
Bundles, Symfony, Doctrine\PHPCR, Jackalope ... ). You might want to have a look
45+
at the ``app/config/parameters.yml`` and adjust as needed.
4146

4247
### Install the Doctrine DBAL provider (optional)
4348

4449
Instead of `phpcr_jackrabbit.yml.dist`, use the `phpcr_doctrine_dbal*.yml.dist`
45-
files and create the database accordingly.
50+
files and create the database accordingly. If you have the PHP sqlite extension
51+
available, this is the simplest to quickly try out the CMF. Copy one of the files
52+
and then install the dependencies:
53+
54+
cp app/config/phpcr_doctrine_dbal_<type>.yml.dist app/config/phpcr.yml
55+
php composer.phar install
4656

4757
The Doctrine DBAL implementation is installed by default already along side the Jackrabbit implementation.
4858

@@ -63,7 +73,7 @@ If you fail to do this you might receive:
6373
[Symfony\Component\Filesystem\Exception\IOException]
6474
Unable to create symlink due to error code 1314: 'A required privilege is not held by the client'. Do you have the required Administrator-rights?
6575

66-
Then, create the database and tables and set up the default workspace using
76+
Then, create the database and tables and set up the default workspace using:
6777

6878
app/console doctrine:database:create
6979
app/console doctrine:phpcr:init:dbal
@@ -80,14 +90,18 @@ and [`midgard_namespace_registry.xml`](https://github.com/midgardproject/phpcr-m
8090
schema files, and place them into `/usr/share/midgard2/schema` (note: this path may be different if you built Midgard2 yourself. It is
8191
basically `$PREFIX/share/midgard2/schema`).
8292

83-
To have the midgard phpcr implementation installed run the following additional command
93+
Then chose the storage layer you want to use, copy the corresponding configuration file
94+
and adjust as needed, and install the project dependencies:
95+
96+
cp app/config/phpcr_midgard_<type>.yml.dist app/config/phpcr.yml
97+
php composer.phar install
98+
99+
To have the midgard PHPCR implementation installed run the following additional command
84100

85101
php composer.phar require midgard/phpcr:dev-master --no-update
86102
php composer.phar update midgard/phpcr
87103

88-
Finally, instead of `phpcr_jackrabbit.yml.dist`, use one of the `phpcr_midgard_*.yml.dist` files.
89-
90-
## Prepare the phpcr repository
104+
## Prepare the PHPCR repository
91105

92106
First you need to create a workspace that will hold the data for the sandbox.
93107
The default parameters.yml defines the workspace to be 'default'. You can
@@ -96,7 +110,7 @@ change this of course. If you do, f.e. to 'sandbox, also run the following comma
96110
app/console doctrine:phpcr:workspace:create sandbox
97111

98112
Once your workspace is set up, you need to [register the node types](https://github.com/doctrine/phpcr-odm/wiki/Custom-node-type-phpcr%3Amanaged)
99-
for phpcr-odm:
113+
for PHPCR-ODM:
100114

101115
app/console doctrine:phpcr:repository:init
102116

@@ -105,24 +119,28 @@ for phpcr-odm:
105119
The admin backend is still in an early stage. Until it improves, the easiest is
106120
to programmatically create data. The best way to do that is with the doctrine
107121
data fixtures. The DoctrinePHPCRBundle included in the symfony-cmf repository
108-
provides a command to load fixtures.
122+
provides a command to load fixtures:
109123

110124
app/console -v doctrine:phpcr:fixtures:load
111125

112126
Run this to load the fixtures from the Sandbox MainBundle.
113127

114-
## Setup permissions
128+
## Setup filesystem permissions
115129

116-
As with any Symfony, you need to set up permissions.
117-
A good guide is at [Symfony2 installation guide](http://symfony.com/doc/current/book/installation.html#configuration-and-setup).
130+
As with any Symfony2 installation, you need to set up some filesystem permissions.
131+
A good guide is in the [Symfony2 installation guide](http://symfony.com/doc/current/book/installation.html#configuration-and-setup).
118132
If you use the default setup, an sqlite database will be created at `app/app.sqlite`.
119-
You need to set up permissions for this file and app/ folder as well.
133+
You need to set up permissions for this file and the app/ folder with the method
134+
you chose from the installation guide.
135+
136+
If you just want to move on and try out the sandbox for now, you can
137+
run:
120138

121-
But if you are just want to move on for now run sudo chmod -R 777 on app/ folder.
139+
sudo chmod -R 777 app/
122140

123141
## Access by web browser
124142

125-
Create an apache virtual host entry along the lines of
143+
Create an apache virtual host entry along the lines of:
126144

127145
<Virtualhost *:80>
128146
Servername cmf.lo
@@ -173,7 +191,7 @@ At the moment there is no notion of parents and sons in the admin bundle.
173191

174192
## Run the test suite
175193

176-
Functional tests are written with PHPUnit. Note that Bundles and Components are tested independently.
194+
Functional tests are written with PHPUnit. Note that Bundles and Components are tested independently:
177195

178196
app/console doctrine:phpcr:workspace:create sandbox_test
179197
phpunit -c app

0 commit comments

Comments
 (0)