Upgrade symfony 2.3 LTS to 2.6 - symfony

I would like upgrade my symfony app which is based on symfony 2.3. I want to use the new feature with the bootstrap theme for forms.
I never make an symfony upgrade before so I read this chapter from symfony cookbook.
http://symfony.com/doc/current/cookbook/upgrading.html
After that, I have made changes in my "composer.json" and type "composer update symfony/symfony", but I get the following error messages
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- don't install symfony/event-dispatcher 2.6.x-dev|don't install symfony/symfony v2.6.3
- don't install symfony/symfony v2.6.3|remove symfony/event-dispatcher 2.6.x-dev
- Installation request for symfony/symfony 2.6.3 -> satisfiable by symfony/symfony[v2.6.3].
- Installation request for symfony/event-dispatcher == 2.6.9999999.9999999-dev -> satisfiable by symfony/event-dispatcher[2.6.x-dev].
My "composer.json":
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"kriswallsmith/assetic": "1.1.2",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.4.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"knplabs/knp-menu": "2.0.*#dev",
"knplabs/knp-menu-bundle": "2.0.*#dev",
"symfony/event-dispatcher": "2.6.*#dev",
"knplabs/doctrine-behaviors": "dev-master",
"a2lix/translation-form-bundle": "dev-master",
"knplabs/knp-paginator-bundle": "~2.4",
"jms/serializer-bundle": "~0.13"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
Can someone give me a tip?

You shouldn't have to manually specify the event dispatcher at all. Remove that, then take a look at this file:
https://github.com/symfony/symfony-standard/blob/2.6/composer.json
Make sure your composer dependencies match everything. Also make sure you have "dev-master": "2.6-dev" under branch-alias

Related

Why has Composer installed a version of a package that seems to conflict with the requirements?

This looks like a simple issue, but I can't explain what's happening.
In composer.json for my Symfony project the twig version is specified as <2.0, to avoid breaking changes between v1 and v2. However, Composer installs the latest Twig version (2.4.3) anyway.
php c:\php\composer\composer.phar depends -t "twig/twig"
twig/twig v2.4.3 Twig, the flexible, fast, and secure template language for PHP
|--symfony/framework-standard-edition dev-develop (requires twig/twig <2.0)
|--symfony/symfony v2.8.24 (requires twig/twig ~1.34|~2.4)
| `--symfony/framework-standard-edition dev-develop (requires symfony/symfony 2.8.*)
`--twig/extensions v1.5.1 (requires twig/twig ~1.27|~2.0)
`--symfony/framework-standard-edition dev-develop (requires twig/extensions ^1.3)
Relevant chunk of composer.json:
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.8.*",
"doctrine/dbal": "2.5.*",
"doctrine/orm": "2.5.*",
"doctrine/doctrine-bundle": "~1.2",
"twig/twig": "<2.0",
"twig/extensions": "^1.3",
etc
}
It looks to me like the requirements of the symfony/symfony and twig/extensions packages, combined with those of the project, would result in the highest possible 1.x version of Twig, 1.34.4, but that's not what happens. Why?
EDIT:
Composer 1.4.2
Full composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.8.*",
"doctrine/dbal": "2.5.*",
"doctrine/orm": "2.5.*",
"doctrine/doctrine-bundle": "~1.2",
"twig/twig": "<2.0",
"twig/extensions": "^1.3",
"symfony/assetic-bundle": "^2.8",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.0",
"beberlei/DoctrineExtensions": "^1.0",
"royopa/fpdf-symfony2": "^1.0",
"liuggio/excelbundle": "^2.0",
"patchwork/jsqueeze": "^2.0",
"leafo/scssphp": "^0.6.5",
"doctrine/doctrine-migrations-bundle": "^1.0",
"ocramius/proxy-manager": "~2.0.0",
"aws/aws-sdk-php-symfony": "^1.2"
},
"require-dev": {
"sensio/generator-bundle": "~2.3",
"symfony/phpunit-bridge": "^3.1",
"deployer/deployer": "^3.3"
},
"scripts": {
"post-root-package-install": [
"SymfonyStandard\\Composer::hookRootPackageInstall"
],
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.5-dev"
}
}
}
EDIT 2:
Deleting composer.lock and completely updating and reinstalling gives me what I thought I should get!
What version of composer are you using?
I tested that json file on a Linux Mint 17, with php 5.5 and composer 1.3.2 and the twig version installed is the right one (twig/twig - v1.34.4).
Can you try to paste your complete composer.json file?
Also, I suggest removing the composer.lock file and all the contents of the vendor folder and try the install again.

Install Moltin cart to Symfony 2

I can not get Moltin Cart plugin to install for symfony 2.7. I get following issues when I try to install.
Problem 1
- Installation request for moltin/cart dev-master -> satisfiable by moltin/c
art[dev-master].
- moltin/cart dev-master requires moltin/tax dev-master -> no matching packa
ge found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your min
imum-stability setting
This is my composr.lock
.....
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.3"
},
.....
And this is my composer.json complete file
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/", "SymfonyStandard": "app/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.5.*",
"doctrine/orm": "~2.2,>=2.2.3,<2.5",
"doctrine/dbal": "<2.5",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0,>=3.0.12",
"sensio/framework-extra-bundle": "~3.0,>=3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"symfony/var-dumper": "^2.7",
"jms/serializer-bundle": "^1.0",
"symfony/finder": "^2.7",
"moltin/cart": "dev-master"
},
"require-dev": {
"sensio/generator-bundle": "~2.3"
},
"scripts": {
"post-root-package-install": [
"SymfonyStandard\\Composer::hookRootPackageInstall"
],
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.5-dev"
}
}
}
This is Moltin/cart site page link. It would be great help if someone can look into it.
If you want to install a package that depends on non-stable packages, you will to explicitly require those packages too or lower the minimum stability setting in your project's Composer configuration.

Symfony2: problems with highchartsbundle

I have a problem while running
composer require ob/highcharts-bundle
Errors:
Problem 1
zendframework/zend-cache 2.3.3 requires
zendframework/zend-stdlib 2.3.3 -> satisfiable by
zendframework/zend-stdlib[2.3.3].
zendframework/zend-cache 2.3.3 requires zendframework
/zend-stdlib 2.3.3 -> satisfiable by zendframework/zend-stdlib[2.3.3].
Can only install one of: zendframework/zend-stdlib[2.3.3, 2.3.0].
zendframework/zend-json 2.3.0 requires zendframework
/zend-stdlib 2.3.0 -> satisfiable by zendframework/zend-stdlib[2.3.0].
ob/highcharts-bundle 1.2 requires zendframework/
zend-json 2.3.0 -> satisfiable by zendframework/zend-json[2.3.0].
Installation request for ob/highcharts-bundle ~1.2 ->
satisfiable by ob/highcharts-bundle[1.2].
Installation request for zendframework/zend-cache == 2.3.3.0
-> satisfiable by zendframework/zend-cache[2.3.3].
composer.json
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"knplabs/knp-paginator-bundle": "~2.4",
"psliwa/pdf-bundle": "~1.0",
"lexik/form-filter-bundle": "~3.0"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
Any idea for solve?
regards

Installing symfony2 cmf composer issues

Pretty new to Symfony, I want to get the CMF to work but I'm having issues installing it using composer
When running the code in terminal I get this
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for symfony/icu 1.2.x-dev -> satisfiable by symfony/icu[1.2.x-dev].
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from
your system, make sure to have the extension providing it.
Problem 2
- symfony/icu 1.2.x-dev requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from
your system, make sure to have the extension providing it.
- symfony/symfony 2.3.x-dev requires symfony/icu ~1.0 -> satisfiable by symfony/icu[1.2.x-dev].
- Installation request for symfony/symfony 2.3.x-dev -> satisfiable by symfony/symfony[2.3.x-dev].
As requested my composer.json looks like this...
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"incenteev/composer-parameter-handler": "~2.0",
"knplabs/knp-paginator-bundle": "2.3.*#dev" },
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "stable",
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
I have run
composer.phar update
And get no errors but the other problems are a bit of a mystery to me
Any help would be appreciated...
Have a look at this comment: https://github.com/composer/composer/issues/1939#issuecomment-18510052 . You have to install php5-intl.

Upgrading Symfony 2.2 to 2.3 causes silent 500 errors

I just upgraded my Symfony 2.2 installation to Symfony 2.3. I was abe to get "composer update" to run with no errors, but this has caused every route in my application to return a blank page. If I check the network tab on my JavaScript console, I see that a 500 Internal Server Error is being thrown, but have no insight as to what might be causing it. Any ideas? Here's my composer.json file:
{
"name": "symfony/framework-standard-edition",
"license": "MIT",
"type": "project",
"description": "The \"Symfony Standard Edition\" distribution",
"autoload": {
"psr-0": { "": "src/" }
},
"require": {
"php": ">=5.3.3",
"symfony/symfony": "2.3.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.2.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.3.*",
"symfony/swiftmailer-bundle": "2.3.*",
"symfony/monolog-bundle": "2.3.*",
"sensio/distribution-bundle": "2.3.*",
"sensio/framework-extra-bundle": "2.3.*",
"sensio/generator-bundle": "2.3.*",
"jms/security-extra-bundle": "1.5.*",
"jms/di-extra-bundle": "1.4.*",
"incenteev/composer-parameter-handler": "~2.0",
"friendsofsymfony/jsrouting-bundle": "*",
"sandeepshetty/shopify_api": "dev-master#dev"
},
"scripts": {
"post-install-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
]
},
"config": {
"bin-dir": "bin"
},
"minimum-stability": "dev",
"prefer-stable": true,
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.3-dev"
}
}
}
You need to enable it manually in 2.3.
Debug::enable();
See: https://github.com/symfony/symfony-standard/blob/2.3/UPGRADE-2.3.md
Inspect your logifles in order to find the exception... app/logs/dev.log or app/logs/prod.log depending on which environment you are trying to access.
And clear your cache :-)
app/console cache:clear
Update those lines from your composer.json thouse versions are not supported by symfony >= 2.3
Before
"jms/security-extra-bundle": "1.5.*",
"jms/di-extra-bundle": "1.4.*",
After
"jms/di-extra-bundle": "dev-master",
"jms/security-extra-bundle": "dev-master",
Regards.

Resources