422,904 Members | 1,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 422,904 IT Pros & Developers. It's quick & easy.

Symfony, instaling CMF Core Bundles does not work.

100+
P: 103
I am trying to make symfony project cms1 and install CMS bundles to it:
cd to folder where the symfony is installed
create project: c:\> php symfony.phar new cmf1
run the project: $ cd .\cmf1
$php app/console server:run
GO TO : http://127.0.0.1:8000
or go to URL: http://localhost:8000/
To this point everything is working

According
http://symfony.com/doc/current/cmf/cookbook/editions/cmf_core.html

i add line to :
C:\Bitnami\wampstack-5.4.38-0\sym_prog\cms1\composer.json
Expand|Select|Wrap|Line Numbers
  1. "require": {
  2.     ...
  3.     "symfony-cmf/symfony-cmf": "1.2.*"
  4. }
I am getting the ERROR:
Expand|Select|Wrap|Line Numbers
  1. c:\Bitnami\wampstack-5.4.38-0\sym_prog\cms1>composer update
  2. Loading composer repositories with package information
  3. Updating dependencies (including require-dev)
  4. Your requirements could not be resolved to an installable set of packages.
  5.  
  6.   Problem 1
  7.     - doctrine/phpcr-bundle 1.2.4 requires phpcr/phpcr-implementation 2.1.* -> n
  8. o matching package found.
  9.     - doctrine/phpcr-bundle 1.2.3 requires phpcr/phpcr-implementation 2.1.* -> n
  10. o matching package found.
  11.     - doctrine/phpcr-bundle 1.2.2 requires phpcr/phpcr-implementation 2.1.* -> n
  12. o matching package found.
  13.     - doctrine/phpcr-bundle 1.2.1 requires phpcr/phpcr-implementation 2.1.* -> n
  14. o matching package found.
  15.     - doctrine/phpcr-bundle 1.2.0 requires phpcr/phpcr-implementation 2.1.* -> n
  16. o matching package found.
  17.     - symfony-cmf/symfony-cmf 1.2.0 requires doctrine/phpcr-bundle 1.2.* -> sati
  18. sfiable by doctrine/phpcr-bundle[1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4].
  19.     - Installation request for symfony-cmf/symfony-cmf 1.2.* -> satisfiable by s
  20. ymfony-cmf/symfony-cmf[1.2.0].
  21.  
  22. Potential causes:
  23.  - A typo in the package name
  24.  - The package is not available in a stable-enough version according to your min
  25. imum-stability setting
  26.    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
  27. or more details.
  28.  
  29. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further commo
  30. n problems.
Solution 1. Added line to composer.json – does not work
C:\Bitnami\wampstack-5.4.38-0\sym_prog\cms1\composer.json
Expand|Select|Wrap|Line Numbers
  1.    "require": {
  2.         "doctrine/phpcr-bundle": "~2.4",
  3.         "symfony-cmf/symfony-cmf": "1.2.*",
There is coming an error, that package “doctrine/phpcr-bundle" does not exists.

Expand|Select|Wrap|Line Numbers
  1. c:\Bitnami\wampstack-5.4.38-0\sym_prog\cms1>composer update
  2. Loading composer repositories with package information
  3. Updating dependencies (including require-dev)
  4. Your requirements could not be resolved to an installable set of packages.
  5.  
  6.   Problem 1
  7.     - The requested package doctrine/phpcr-bundle could not be found in any vers
  8. ion, there may be a typo in the package name.
  9.   Problem 2
  10.     - Installation request for symfony-cmf/symfony-cmf 1.2.* -> satisfiable by s
  11. ymfony-cmf/symfony-cmf[1.2.0].
  12.     - symfony-cmf/symfony-cmf 1.2.0 requires doctrine/phpcr-bundle 1.2.* -> no m
  13. atching package found.
  14.  
  15. Potential causes:
  16.  - A typo in the package name
  17.  - The package is not available in a stable-enough version according to your min
  18. imum-stability setting
  19.    see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> f
  20. or more details.
  21.  
  22. Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further commo
  23. n problems.
  24.  
Solution: i added many bundles:
Budles for symfony-cmf according https://packagist.org/packages/symfony-cmf/symfony-cmf
"doctrine/phpcr-bundle": "~1.2",
"doctrine/phpcr-odm": "1.2.*",
"symfony-cmf/core-bundle": "1.2.*",
"symfony-cmf/content-bundle": "1.2.*",
"symfony-cmf/menu-bundle": "1.2.*",
"symfony-cmf/block-bundle": "1.2.*",
"symfony-cmf/routing-bundle": "1.3.*",
"symfony-cmf/media-bundle": "1.2.*",
"symfony-cmf/symfony-cmf": "1.2.*",
"symfony-cmf/symfony-cmf": "1.2.*",

Budles for doctrine/phpcr-bundle according
https://packagist.org/packages/doctrine/phpcr-bundle:
https://packagist.org/packages/jackalope/jackalope
"symfony/doctrine-bridge": "~2.3",
"phpcr/phpcr-implementation": "2.1.*", // it is not a separate bundle it comes with jakalope
"phpcr/phpcr-utils": "~1.2.*",
"phpcr/phpcr": "~2.1",
"jackalope/jackalope-doctrine-dbal": "~1.2.2",
"jackalope/jackalope": "1.2.3", //requires “jacalope/jakapole-transport”, which is part of “jackalope/jackalope-doctrine-dbal” and requires "doctrine/dbal"
"doctrine/dbal": "~2.4.5",
"doctrine/phpcr-bundle": "~1.3",
"doctrine/phpcr-bundle": "~1.3", //instead of 2.4


Finally my composer.json looks like this:
Expand|Select|Wrap|Line Numbers
  1.  {
  2.     "name": "gintare/cms1",
  3.     "license": "proprietary",
  4.     "type": "project",
  5.     "autoload": {
  6.         "psr-4": {
  7.             "": "src/"
  8.         }
  9.     },
  10.     "require": {
  11.         "php": ">=5.3.9",
  12.         "symfony/symfony": "2.7.*",
  13.         "doctrine/orm": "^2.4.8",
  14.         "doctrine/doctrine-bundle": "~1.2",
  15.         "doctrine/dbal": "~2.4.5",
  16.         "doctrine/data-fixtures": "~1.0",
  17.         "symfony/assetic-bundle": "~2.3",
  18.         "symfony/swiftmailer-bundle": "~2.3",
  19.         "symfony/monolog-bundle": "~2.4",
  20.         "symfony/doctrine-bridge": "~2.3",
  21.         "phpcr/phpcr-utils": "~1.2",
  22.         "phpcr/phpcr": "~2.1",
  23.         "jackalope/jackalope-doctrine-dbal": "~1.2.2",
  24.         "jackalope/jackalope": "1.2.3",
  25.         "doctrine/phpcr-bundle": "~1.2",
  26.         "doctrine/phpcr-odm": "1.2.*",
  27.         "symfony-cmf/core-bundle": "1.2.*",
  28.         "symfony-cmf/content-bundle": "1.2.*",
  29.         "symfony-cmf/menu-bundle": "1.2.*",
  30.         "symfony-cmf/block-bundle": "1.2.*",
  31.         "symfony-cmf/routing-bundle": "1.3.*",
  32.         "symfony-cmf/media-bundle": "1.2.*",        
  33.         "symfony-cmf/symfony-cmf": "1.2.*",
  34.         "sensio/distribution-bundle": "~4.0",
  35.         "sensio/framework-extra-bundle": "^3.0.2",
  36.         "incenteev/composer-parameter-handler": "~2.0"
  37.     },
  38.     "require-dev": {
  39.         "sensio/generator-bundle": "~2.3"
  40.     },
  41.     "scripts": {
  42.         "post-install-cmd": [
  43.             "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
  44.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
  45.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
  46.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
  47.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
  48.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
  49.         ],
  50.         "post-update-cmd": [
  51.             "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
  52.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
  53.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
  54.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
  55.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
  56.             "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
  57.         ]
  58.     },
  59.     "config": {
  60.         "bin-dir": "bin"
  61.     },
  62.     "extra": {
  63.         "symfony-app-dir": "app",
  64.         "symfony-web-dir": "web",
  65.         "symfony-assets-install": "relative",
  66.         "incenteev-parameters": {
  67.             "file": "app/config/parameters.yml"
  68.         }
  69.     }
  70. }
  71.  
I am still getting an error that:
Expand|Select|Wrap|Line Numbers
  1.     - jackalope/jackalope 1.2.3 requires jackalope/jackalope-transport * -> no matching package found.
As it is described above "jackalope/jackalope" “jacalope/jakapole-transport”, which is part of “jackalope/jackalope-doctrine-dbal” and requires "doctrine/dbal". All these packages are added to the composer.json

What packages i need to install symfony-cmf, better with development mode?
http://symfony.com/doc/current/cmf/cookbook/editions/cmf_core.html
Oct 12 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.