symfony-cmf / sandbox
Demo Sandbox for the Symfony Content Management Framework
Installs: 5 918
Dependents: 0
Suggesters: 0
Security: 0
Stars: 364
Watchers: 25
Forks: 144
Open Issues: 20
Requires
- php: ^5.6|^7.0
- burgov/key-value-form-bundle: ^1.4
- doctrine/data-fixtures: ^1.0
- doctrine/doctrine-bundle: ^1.6
- doctrine/doctrine-cache-bundle: ^1.2
- doctrine/phpcr-odm: ^1.4
- egeloen/ckeditor-bundle: ^4.0
- eko/feedbundle: ^1.2.7
- friendsofsymfony/rest-bundle: ~1.7
- incenteev/composer-parameter-handler: ^2.0
- jackalope/jackalope-doctrine-dbal: 1.2.*
- jackalope/jackalope-jackrabbit: 1.2.*
- jms/serializer-bundle: ^1.1
- lunetics/locale-bundle: ^2.5
- sensio/distribution-bundle: ^5.0
- sensio/framework-extra-bundle: ^3.0.2
- sonata-project/cache-bundle: ^2.1
- sonata-project/doctrine-phpcr-admin-bundle: ^2.0
- sonata-project/translation-bundle: 2.1.0
- symfony-cmf/routing: ^2.0
- symfony-cmf/routing-auto-bundle: ^2.0
- symfony-cmf/seo-bundle: ^2.0
- symfony-cmf/sonata-phpcr-admin-integration-bundle: ^1.0
- symfony-cmf/symfony-cmf: ^2.0
- symfony/assetic-bundle: ^2.8
- symfony/monolog-bundle: ^3.0.2
- symfony/polyfill-apcu: ^1.0
- symfony/swiftmailer-bundle: ^2.3.10
- symfony/symfony: ^3.3
Requires (Dev)
- liip/functional-test-bundle: ^1.3
- sensio/generator-bundle: ^3.0
- symfony-cmf/testing: ^2.0
- symfony/phpunit-bridge: ^3.2
- 2.0.x-dev
- dev-master / 2.0.x-dev
- 2.0.0
- 2.0.0-RC6
- 2.0.0-RC5
- 2.0.0-RC4
- 2.0.0-RC3
- 2.0.0-RC2
- 2.0.0-RC1
- 1.3.0
- 1.3.0-RC3
- 1.3.0-RC2
- 1.3.0-RC1
- 1.2.x-dev
- 1.2.1
- 1.2.0
- 1.2.0-RC4
- 1.2.0-RC3
- 1.2.0-RC2
- 1.2.0-RC1
- 1.1.x-dev
- 1.1.2
- 1.1.1
- 1.1.0
- 1.1.0-RC2
- 1.1.0-RC1
- 1.0.x-dev
- 1.0.0
- 1.0.0-RC6
- 1.0.0-RC5
- 1.0.0-RC4
- 1.0.0-RC3
- 1.0.0-RC2
- 1.0.0-RC1
- 1.0.0-beta3
- 1.0.0-beta2
- 1.0.0-beta1
- 1.0.0-alpha1
- dev-dependabot/composer/twig/twig-1.42.5
- dev-dependabot/composer/symfony/phpunit-bridge-3.4.26
- dev-dependabot/composer/symfony/symfony-3.4.35
- dev-next_version_new_structure
- dev-try_grapesjs
- dev-analysis-qrl7Eg
- dev-container_block
- dev-seo_sitemap_and_error_handling
- dev-issue-342/remove-vagrant
This package is auto-updated.
Last update: 2022-03-26 00:32:29 UTC
README
Due to lack of interest, we had to decide to discontinue this repository. The CMF project focusses on the Routing component and RoutingBundle, which are still in active use by other projects.
This repository will no longer be upgraded and marked as abandoned, but will be kept available for legacy projects or if somebody wants to experiment with the CMF.
You can contact us in the #symfony_cmf channel of the Symfony devs slack.
Symfony Content Management Framework Sandbox
This sandbox is a testing ground for the cmf bundles being developed.
It is based on the Symfony Standard edition and adds all cmf related bundles on top of the standard edition bundles.
Link to the live demo
Getting started
You can run the sandbox on your system, or in a virtualbox VM using Vagrant. For the latter, see "Getting started using Vagrant"
You will need:
- PHP 5.3.9+ (with intl extension)
- PHPUnit 3.6+ (optional)
- Composer
Initial setup and configuration
git clone git://github.com/symfony-cmf/cmf-sandbox.git
cd cmf-sandbox
curl -s http://getcomposer.org/installer | php --
php composer.phar install
At the end of the installation you will be interactively asked several configuration questions. Note that by default you will end up with a configuration using SQLite and Doctrine DBAL for storage. If you want to adjust the configuration to use Jackrabbit please look at the following section.
Install and run Apache JackRabbit
Follow the guide in the Jackalope Wiki. You can also use a different PHPCR implementation but this is the most solid implementation.
Once you have that, copy the default jackalope-jackrabbit configuration file, adjust it as needed and install the dependencies with composer:
cp app/config/phpcr_jackrabbit.yml.dist app/config/phpcr.yml
The last command will fetch the main project and all its dependencies (CMF
Bundles, Symfony, Doctrine\PHPCR, Jackalope ... ). You might want to have a look
at the app/config/parameters.yml
and adjust as needed.
Install the Doctrine DBAL provider (optional)
Instead of phpcr_jackrabbit.yml.dist
, use the phpcr_doctrine_dbal*.yml.dist
files and create the database accordingly. If you have the PHP sqlite extension
available, this is the simplest to quickly try out the CMF. Copy the file
and then install the dependencies:
cp app/config/phpcr_doctrine_dbal.yml.dist app/config/phpcr.yml
The Doctrine DBAL implementation is installed by default already along side the Jackrabbit implementation.
To disable the meta data and node cache for debugging comment the caches
settings in the phpcr.yml
.
Then, create the database and tables and set up the default workspace using:
php bin/console doctrine:database:create
php bin/console doctrine:phpcr:init:dbal --force
Prepare the PHPCR repository
First you need to create a workspace that will hold the data for the sandbox. The default parameters.yml defines the workspace to be 'default'. You can change this of course. If you do, f.e. to 'sandbox, also run the following command:
php bin/console doctrine:phpcr:workspace:create sandbox
Once your workspace is set up, you need to register the node types for PHPCR-ODM:
php bin/console doctrine:phpcr:repository:init
Import the fixtures
The admin backend is still in an early stage. Until it improves, the easiest is to programmatically create data. The best way to do that is with the doctrine data fixtures. The DoctrinePHPCRBundle included in the symfony-cmf repository provides a command to load fixtures:
php bin/console -v doctrine:phpcr:fixtures:load
Run this to load the fixtures from the Sandbox AppBundle.
Setup filesystem permissions
As with any Symfony2 installation, you need to set up some filesystem permissions.
A good guide is in the Symfony2 installation guide.
If you use the default setup, an sqlite database will be created at app/app.sqlite
.
You need to set up permissions for this file and the app/ folder with the method
you chose from the installation guide.
If you just want to move on and try out the sandbox for now, you can run:
sudo chmod -R 777 app/
Access by web browser
Create an apache virtual host entry along the lines of:
<Virtualhost *:80>
Servername cmf.lo
DocumentRoot /path/to/symfony-cmf/cmf-sandbox/web
<Directory /path/to/symfony-cmf/cmf-sandbox>
AllowOverride All
</Directory>
</Virtualhost>
And add an entry to your hosts file for cmf.lo
If you are running Symfony2 for the first time, run http://cmf.lo/config.php to ensure your system settings have been setup inline with the expected behaviour of the Symfony2 framework.
Note however that "Configure your Symfony Application online" is not supported in the sandbox.
Then point your browser to http://cmf.lo/app_dev.php
Production environment
In order to run the sandbox in production mode at http://cmf.lo/ you need to generate the doctrine proxies and dump the assetic assets:
php bin/console cache:warmup --env=prod --no-debug
php bin/console assetic:dump --env=prod --no-debug
Getting started using Vagrant
please checkout the README.md in the vagrant/ folder of the project
Other hints
Console
The PHPCR ODM Bundle provides a couple of useful commands in the doctrine:phpcr namespace. Type bin/console to see them all.
Admin interface
There is a proof-of-concept admin interface using the SonataPhpcrAdminBundle at http://cmf.lo/app_dev.php/admin/dashboard
Basically you have paginated lists for two types of documents. You create new documents, edit and delete them. Some filtering is available in the list. This bundle is an implementation of Sonata Admin Bundle
At the moment there is no notion of parents and sons in the admin bundle.
Run the test suite
Functional tests are written with PHPUnit. Note that Bundles and Components are tested independently:
php bin/console doctrine:phpcr:workspace:create sandbox_test
phpunit -c app
Remove demo configuration
If you start a project from the sandbox, remove .sensiolabs.yml
as its not a good example for production use.