Errors while updating symfony 2.8 to symfony 3.4












0















I am updating symfony version from 2.8 to symfony 3.4 here is my composer.json



 "require": {
"php": ">=5.3.3",
"symfony/symfony": "3.4.*",
"doctrine/orm": "~2.5.0",
"doctrine/doctrine-bundle": "~1.3",
"twig/extensions": "~1",
"symfony/assetic-bundle": "~2.1",
"symfony/swiftmailer-bundle": "~2.1",
"symfony/monolog-bundle": "^2.1",
"sensio/distribution-bundle": "^2.1",
"sensio/framework-extra-bundle": "^2.1",
"twig/twig": "^1.0||^2.0",
"sensio/generator-bundle": "~2.1",
"jms/security-extra-bundle": "~1.2",
"jms/di-extra-bundle": "~1.1",
"friendsofsymfony/user-bundle": "~1.3",
"friendsofsymfony/jsrouting-bundle": "~1.0",
"gregwar/captcha-bundle": "~1.1",
"liuggio/excelbundle": "~2.0",
"knplabs/knp-menu-bundle": "~2.0.0",
"avalanche123/imagine-bundle": "~2.1",
"knplabs/knp-paginator-bundle": "~2.3",
"knplabs/knp-components": "~1.2.1",
"kbsali/redmine-api": "~1.0",
"exercise/htmlpurifier-bundle": "^0.2.2",
"doctrine/migrations": "^1",
"beberlei/DoctrineExtensions": "^1.0",
"swiftmailer/swiftmailer": "^5.4",
"react/zmq": "0.3.*",
"cboden/ratchet": "0.4.*",
"symfony/framework-bundle": "~2.8.9",
"symfony/translation": "~2.8",
"symfony/templating": "~3.0.9",
"symfony/stopwatch": "~3.0.9",
"symfony/security-csrf": "~3.0.9",
"symfony/security-core": "~3.0.9",
"symfony/routing": "~3.0.9",
"symfony/http-kernel": "~2.8.9",
"symfony/finder": "~2.1",
"symfony/http-foundation": "~2.7",
"symfony/options-resolver": "~2.8.9",
"symfony/event-dispatcher": "~2.1",
"symfony/debug": "~2.8.9",
"symfony/filesystem": "~3.0.9",
"symfony/dependency-injection": "~2.8.9",
"symfony/config": "~2.8.9",
"symfony/class-loader": "~3.0.9",
"symfony/asset": "~3.0.9",
"symfony/form": "~2.1",
"symfony/property-access": "~3.0.9",
"symfony/serializer": "~2.8.9",
"symfony/console": "~2.8.9",
"symfony/security-bundle": "~2.8.9",
"symfony/monolog-bridge": "~2.8.9",
"symfony/yaml": "~2.8.9",
"symfony/process": "~2.8.9",
"symfony/security": "~2.8",
"symfony/doctrine-bridge": "~2.8.9",
"symfony/intl": "~3.2.9"
}


I have an error, when i am updating




[SymfonyComponentDependencyInjectionExceptionInvalidArgumentException



  Unable to parse file "vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/../Resources/config/templating.xml".

[InvalidArgumentException]
[ERROR 1871] Element '{http://symfony.com/schema/dic/services}defaults': This element is


not expected. Expected is (
{http://symfony.com/schema/dic/services}service )



Script SensioBundleDistributionBundleComposerScriptHandler::clearCache


handling the post-update-cmd event terminated with an exception



  [RuntimeException]                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command.



I moved logs and cache folders to new directory var.
Moved console to bin directory and replace require_once _DIR__.'/bootstrap.php.cache'; with require _DIR__.'/../app/autoload.php';



Changed version of symfony in composer and run this command



composer update symfony/symfony --with-dependencies


Please help to solve it.










share|improve this question

























  • How are you performing the upgrade? Can you describe the changes you made/commands being executed? From what it looks like TwigBundle uses a new feature not yet supported by your Symfony/DependencyInjection component. Either temporarily downgrading TwigBundle or updating the DI-component could help

    – dbrumann
    Nov 19 '18 at 6:15











  • @dbrumann Thank you for replay, edited my question

    – DoctorDo
    Nov 19 '18 at 8:40











  • Your Symfony components are limited to 2.8 maybe you want to replace the entries with: ^2.8.9 || ^3.4 for all the symfony components. Instead of manually changing this and then running update you could also try to use composer require symfony/symfony:^3.4 --update-with-all-dependencies instead. This will try to update the version and also write this version constraint to your composer.json for you.

    – dbrumann
    Nov 19 '18 at 9:44











  • Your composer.json files seems to have some serious issues starting with the php version. Start a fresh 3.4 project then add your additional dependencies one by one. Assuming there are 3.4 compatible versions available of all your dependencies, then you will end at least up with a more or less clean composer.json file you can start with.

    – Cerad
    Nov 19 '18 at 14:07
















0















I am updating symfony version from 2.8 to symfony 3.4 here is my composer.json



 "require": {
"php": ">=5.3.3",
"symfony/symfony": "3.4.*",
"doctrine/orm": "~2.5.0",
"doctrine/doctrine-bundle": "~1.3",
"twig/extensions": "~1",
"symfony/assetic-bundle": "~2.1",
"symfony/swiftmailer-bundle": "~2.1",
"symfony/monolog-bundle": "^2.1",
"sensio/distribution-bundle": "^2.1",
"sensio/framework-extra-bundle": "^2.1",
"twig/twig": "^1.0||^2.0",
"sensio/generator-bundle": "~2.1",
"jms/security-extra-bundle": "~1.2",
"jms/di-extra-bundle": "~1.1",
"friendsofsymfony/user-bundle": "~1.3",
"friendsofsymfony/jsrouting-bundle": "~1.0",
"gregwar/captcha-bundle": "~1.1",
"liuggio/excelbundle": "~2.0",
"knplabs/knp-menu-bundle": "~2.0.0",
"avalanche123/imagine-bundle": "~2.1",
"knplabs/knp-paginator-bundle": "~2.3",
"knplabs/knp-components": "~1.2.1",
"kbsali/redmine-api": "~1.0",
"exercise/htmlpurifier-bundle": "^0.2.2",
"doctrine/migrations": "^1",
"beberlei/DoctrineExtensions": "^1.0",
"swiftmailer/swiftmailer": "^5.4",
"react/zmq": "0.3.*",
"cboden/ratchet": "0.4.*",
"symfony/framework-bundle": "~2.8.9",
"symfony/translation": "~2.8",
"symfony/templating": "~3.0.9",
"symfony/stopwatch": "~3.0.9",
"symfony/security-csrf": "~3.0.9",
"symfony/security-core": "~3.0.9",
"symfony/routing": "~3.0.9",
"symfony/http-kernel": "~2.8.9",
"symfony/finder": "~2.1",
"symfony/http-foundation": "~2.7",
"symfony/options-resolver": "~2.8.9",
"symfony/event-dispatcher": "~2.1",
"symfony/debug": "~2.8.9",
"symfony/filesystem": "~3.0.9",
"symfony/dependency-injection": "~2.8.9",
"symfony/config": "~2.8.9",
"symfony/class-loader": "~3.0.9",
"symfony/asset": "~3.0.9",
"symfony/form": "~2.1",
"symfony/property-access": "~3.0.9",
"symfony/serializer": "~2.8.9",
"symfony/console": "~2.8.9",
"symfony/security-bundle": "~2.8.9",
"symfony/monolog-bridge": "~2.8.9",
"symfony/yaml": "~2.8.9",
"symfony/process": "~2.8.9",
"symfony/security": "~2.8",
"symfony/doctrine-bridge": "~2.8.9",
"symfony/intl": "~3.2.9"
}


I have an error, when i am updating




[SymfonyComponentDependencyInjectionExceptionInvalidArgumentException



  Unable to parse file "vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/../Resources/config/templating.xml".

[InvalidArgumentException]
[ERROR 1871] Element '{http://symfony.com/schema/dic/services}defaults': This element is


not expected. Expected is (
{http://symfony.com/schema/dic/services}service )



Script SensioBundleDistributionBundleComposerScriptHandler::clearCache


handling the post-update-cmd event terminated with an exception



  [RuntimeException]                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command.



I moved logs and cache folders to new directory var.
Moved console to bin directory and replace require_once _DIR__.'/bootstrap.php.cache'; with require _DIR__.'/../app/autoload.php';



Changed version of symfony in composer and run this command



composer update symfony/symfony --with-dependencies


Please help to solve it.










share|improve this question

























  • How are you performing the upgrade? Can you describe the changes you made/commands being executed? From what it looks like TwigBundle uses a new feature not yet supported by your Symfony/DependencyInjection component. Either temporarily downgrading TwigBundle or updating the DI-component could help

    – dbrumann
    Nov 19 '18 at 6:15











  • @dbrumann Thank you for replay, edited my question

    – DoctorDo
    Nov 19 '18 at 8:40











  • Your Symfony components are limited to 2.8 maybe you want to replace the entries with: ^2.8.9 || ^3.4 for all the symfony components. Instead of manually changing this and then running update you could also try to use composer require symfony/symfony:^3.4 --update-with-all-dependencies instead. This will try to update the version and also write this version constraint to your composer.json for you.

    – dbrumann
    Nov 19 '18 at 9:44











  • Your composer.json files seems to have some serious issues starting with the php version. Start a fresh 3.4 project then add your additional dependencies one by one. Assuming there are 3.4 compatible versions available of all your dependencies, then you will end at least up with a more or less clean composer.json file you can start with.

    – Cerad
    Nov 19 '18 at 14:07














0












0








0








I am updating symfony version from 2.8 to symfony 3.4 here is my composer.json



 "require": {
"php": ">=5.3.3",
"symfony/symfony": "3.4.*",
"doctrine/orm": "~2.5.0",
"doctrine/doctrine-bundle": "~1.3",
"twig/extensions": "~1",
"symfony/assetic-bundle": "~2.1",
"symfony/swiftmailer-bundle": "~2.1",
"symfony/monolog-bundle": "^2.1",
"sensio/distribution-bundle": "^2.1",
"sensio/framework-extra-bundle": "^2.1",
"twig/twig": "^1.0||^2.0",
"sensio/generator-bundle": "~2.1",
"jms/security-extra-bundle": "~1.2",
"jms/di-extra-bundle": "~1.1",
"friendsofsymfony/user-bundle": "~1.3",
"friendsofsymfony/jsrouting-bundle": "~1.0",
"gregwar/captcha-bundle": "~1.1",
"liuggio/excelbundle": "~2.0",
"knplabs/knp-menu-bundle": "~2.0.0",
"avalanche123/imagine-bundle": "~2.1",
"knplabs/knp-paginator-bundle": "~2.3",
"knplabs/knp-components": "~1.2.1",
"kbsali/redmine-api": "~1.0",
"exercise/htmlpurifier-bundle": "^0.2.2",
"doctrine/migrations": "^1",
"beberlei/DoctrineExtensions": "^1.0",
"swiftmailer/swiftmailer": "^5.4",
"react/zmq": "0.3.*",
"cboden/ratchet": "0.4.*",
"symfony/framework-bundle": "~2.8.9",
"symfony/translation": "~2.8",
"symfony/templating": "~3.0.9",
"symfony/stopwatch": "~3.0.9",
"symfony/security-csrf": "~3.0.9",
"symfony/security-core": "~3.0.9",
"symfony/routing": "~3.0.9",
"symfony/http-kernel": "~2.8.9",
"symfony/finder": "~2.1",
"symfony/http-foundation": "~2.7",
"symfony/options-resolver": "~2.8.9",
"symfony/event-dispatcher": "~2.1",
"symfony/debug": "~2.8.9",
"symfony/filesystem": "~3.0.9",
"symfony/dependency-injection": "~2.8.9",
"symfony/config": "~2.8.9",
"symfony/class-loader": "~3.0.9",
"symfony/asset": "~3.0.9",
"symfony/form": "~2.1",
"symfony/property-access": "~3.0.9",
"symfony/serializer": "~2.8.9",
"symfony/console": "~2.8.9",
"symfony/security-bundle": "~2.8.9",
"symfony/monolog-bridge": "~2.8.9",
"symfony/yaml": "~2.8.9",
"symfony/process": "~2.8.9",
"symfony/security": "~2.8",
"symfony/doctrine-bridge": "~2.8.9",
"symfony/intl": "~3.2.9"
}


I have an error, when i am updating




[SymfonyComponentDependencyInjectionExceptionInvalidArgumentException



  Unable to parse file "vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/../Resources/config/templating.xml".

[InvalidArgumentException]
[ERROR 1871] Element '{http://symfony.com/schema/dic/services}defaults': This element is


not expected. Expected is (
{http://symfony.com/schema/dic/services}service )



Script SensioBundleDistributionBundleComposerScriptHandler::clearCache


handling the post-update-cmd event terminated with an exception



  [RuntimeException]                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command.



I moved logs and cache folders to new directory var.
Moved console to bin directory and replace require_once _DIR__.'/bootstrap.php.cache'; with require _DIR__.'/../app/autoload.php';



Changed version of symfony in composer and run this command



composer update symfony/symfony --with-dependencies


Please help to solve it.










share|improve this question
















I am updating symfony version from 2.8 to symfony 3.4 here is my composer.json



 "require": {
"php": ">=5.3.3",
"symfony/symfony": "3.4.*",
"doctrine/orm": "~2.5.0",
"doctrine/doctrine-bundle": "~1.3",
"twig/extensions": "~1",
"symfony/assetic-bundle": "~2.1",
"symfony/swiftmailer-bundle": "~2.1",
"symfony/monolog-bundle": "^2.1",
"sensio/distribution-bundle": "^2.1",
"sensio/framework-extra-bundle": "^2.1",
"twig/twig": "^1.0||^2.0",
"sensio/generator-bundle": "~2.1",
"jms/security-extra-bundle": "~1.2",
"jms/di-extra-bundle": "~1.1",
"friendsofsymfony/user-bundle": "~1.3",
"friendsofsymfony/jsrouting-bundle": "~1.0",
"gregwar/captcha-bundle": "~1.1",
"liuggio/excelbundle": "~2.0",
"knplabs/knp-menu-bundle": "~2.0.0",
"avalanche123/imagine-bundle": "~2.1",
"knplabs/knp-paginator-bundle": "~2.3",
"knplabs/knp-components": "~1.2.1",
"kbsali/redmine-api": "~1.0",
"exercise/htmlpurifier-bundle": "^0.2.2",
"doctrine/migrations": "^1",
"beberlei/DoctrineExtensions": "^1.0",
"swiftmailer/swiftmailer": "^5.4",
"react/zmq": "0.3.*",
"cboden/ratchet": "0.4.*",
"symfony/framework-bundle": "~2.8.9",
"symfony/translation": "~2.8",
"symfony/templating": "~3.0.9",
"symfony/stopwatch": "~3.0.9",
"symfony/security-csrf": "~3.0.9",
"symfony/security-core": "~3.0.9",
"symfony/routing": "~3.0.9",
"symfony/http-kernel": "~2.8.9",
"symfony/finder": "~2.1",
"symfony/http-foundation": "~2.7",
"symfony/options-resolver": "~2.8.9",
"symfony/event-dispatcher": "~2.1",
"symfony/debug": "~2.8.9",
"symfony/filesystem": "~3.0.9",
"symfony/dependency-injection": "~2.8.9",
"symfony/config": "~2.8.9",
"symfony/class-loader": "~3.0.9",
"symfony/asset": "~3.0.9",
"symfony/form": "~2.1",
"symfony/property-access": "~3.0.9",
"symfony/serializer": "~2.8.9",
"symfony/console": "~2.8.9",
"symfony/security-bundle": "~2.8.9",
"symfony/monolog-bridge": "~2.8.9",
"symfony/yaml": "~2.8.9",
"symfony/process": "~2.8.9",
"symfony/security": "~2.8",
"symfony/doctrine-bridge": "~2.8.9",
"symfony/intl": "~3.2.9"
}


I have an error, when i am updating




[SymfonyComponentDependencyInjectionExceptionInvalidArgumentException



  Unable to parse file "vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/DependencyInjection/../Resources/config/templating.xml".

[InvalidArgumentException]
[ERROR 1871] Element '{http://symfony.com/schema/dic/services}defaults': This element is


not expected. Expected is (
{http://symfony.com/schema/dic/services}service )



Script SensioBundleDistributionBundleComposerScriptHandler::clearCache


handling the post-update-cmd event terminated with an exception



  [RuntimeException]                                                         
An error occurred when executing the "'cache:clear --no-warmup'" command.



I moved logs and cache folders to new directory var.
Moved console to bin directory and replace require_once _DIR__.'/bootstrap.php.cache'; with require _DIR__.'/../app/autoload.php';



Changed version of symfony in composer and run this command



composer update symfony/symfony --with-dependencies


Please help to solve it.







php symfony symfony3.4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 19 '18 at 8:39







DoctorDo

















asked Nov 19 '18 at 5:29









DoctorDoDoctorDo

5028




5028













  • How are you performing the upgrade? Can you describe the changes you made/commands being executed? From what it looks like TwigBundle uses a new feature not yet supported by your Symfony/DependencyInjection component. Either temporarily downgrading TwigBundle or updating the DI-component could help

    – dbrumann
    Nov 19 '18 at 6:15











  • @dbrumann Thank you for replay, edited my question

    – DoctorDo
    Nov 19 '18 at 8:40











  • Your Symfony components are limited to 2.8 maybe you want to replace the entries with: ^2.8.9 || ^3.4 for all the symfony components. Instead of manually changing this and then running update you could also try to use composer require symfony/symfony:^3.4 --update-with-all-dependencies instead. This will try to update the version and also write this version constraint to your composer.json for you.

    – dbrumann
    Nov 19 '18 at 9:44











  • Your composer.json files seems to have some serious issues starting with the php version. Start a fresh 3.4 project then add your additional dependencies one by one. Assuming there are 3.4 compatible versions available of all your dependencies, then you will end at least up with a more or less clean composer.json file you can start with.

    – Cerad
    Nov 19 '18 at 14:07



















  • How are you performing the upgrade? Can you describe the changes you made/commands being executed? From what it looks like TwigBundle uses a new feature not yet supported by your Symfony/DependencyInjection component. Either temporarily downgrading TwigBundle or updating the DI-component could help

    – dbrumann
    Nov 19 '18 at 6:15











  • @dbrumann Thank you for replay, edited my question

    – DoctorDo
    Nov 19 '18 at 8:40











  • Your Symfony components are limited to 2.8 maybe you want to replace the entries with: ^2.8.9 || ^3.4 for all the symfony components. Instead of manually changing this and then running update you could also try to use composer require symfony/symfony:^3.4 --update-with-all-dependencies instead. This will try to update the version and also write this version constraint to your composer.json for you.

    – dbrumann
    Nov 19 '18 at 9:44











  • Your composer.json files seems to have some serious issues starting with the php version. Start a fresh 3.4 project then add your additional dependencies one by one. Assuming there are 3.4 compatible versions available of all your dependencies, then you will end at least up with a more or less clean composer.json file you can start with.

    – Cerad
    Nov 19 '18 at 14:07

















How are you performing the upgrade? Can you describe the changes you made/commands being executed? From what it looks like TwigBundle uses a new feature not yet supported by your Symfony/DependencyInjection component. Either temporarily downgrading TwigBundle or updating the DI-component could help

– dbrumann
Nov 19 '18 at 6:15





How are you performing the upgrade? Can you describe the changes you made/commands being executed? From what it looks like TwigBundle uses a new feature not yet supported by your Symfony/DependencyInjection component. Either temporarily downgrading TwigBundle or updating the DI-component could help

– dbrumann
Nov 19 '18 at 6:15













@dbrumann Thank you for replay, edited my question

– DoctorDo
Nov 19 '18 at 8:40





@dbrumann Thank you for replay, edited my question

– DoctorDo
Nov 19 '18 at 8:40













Your Symfony components are limited to 2.8 maybe you want to replace the entries with: ^2.8.9 || ^3.4 for all the symfony components. Instead of manually changing this and then running update you could also try to use composer require symfony/symfony:^3.4 --update-with-all-dependencies instead. This will try to update the version and also write this version constraint to your composer.json for you.

– dbrumann
Nov 19 '18 at 9:44





Your Symfony components are limited to 2.8 maybe you want to replace the entries with: ^2.8.9 || ^3.4 for all the symfony components. Instead of manually changing this and then running update you could also try to use composer require symfony/symfony:^3.4 --update-with-all-dependencies instead. This will try to update the version and also write this version constraint to your composer.json for you.

– dbrumann
Nov 19 '18 at 9:44













Your composer.json files seems to have some serious issues starting with the php version. Start a fresh 3.4 project then add your additional dependencies one by one. Assuming there are 3.4 compatible versions available of all your dependencies, then you will end at least up with a more or less clean composer.json file you can start with.

– Cerad
Nov 19 '18 at 14:07





Your composer.json files seems to have some serious issues starting with the php version. Start a fresh 3.4 project then add your additional dependencies one by one. Assuming there are 3.4 compatible versions available of all your dependencies, then you will end at least up with a more or less clean composer.json file you can start with.

– Cerad
Nov 19 '18 at 14:07












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53368794%2ferrors-while-updating-symfony-2-8-to-symfony-3-4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53368794%2ferrors-while-updating-symfony-2-8-to-symfony-3-4%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini