{"id":613,"date":"2020-06-21T15:42:07","date_gmt":"2020-06-21T13:42:07","guid":{"rendered":"https:\/\/www.mher.de\/?p=613"},"modified":"2020-07-28T12:38:57","modified_gmt":"2020-07-28T10:38:57","slug":"symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations","status":"publish","type":"post","link":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/","title":{"rendered":"Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;."},"content":{"rendered":"\n<p>At my recent update from Symfony 5.1.0 to Symfony 5.1.2 I got surprised by this error message:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Unrecognized options \"dir_name, namespace\" under \"doctrine_migrations\". Available options are \"all_or_nothing\", \"check_database_platform\", \"connection\", \"custom_template\", \"em\", \"migrations\", \"migrations_paths\", \"name\", \"organize_migrations\", \"services\", \"storage\"<\/code><\/pre>\n\n\n\n<p>And it took me quite some time to find out what went wrong&#8230;<\/p>\n\n\n\n<p>&#8230; since one should assume that a clean bugfix-update won&#8217;t produce such an error.<\/p>\n\n\n\n<p>Well, the problem was, that I still hat doctrine installed as symfony\/orm-pack, and within this pack the actual doctrine-modules are enclosed. And when I then executed<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer update symfony\/* --with-all-dependencies<\/code><\/pre>\n\n\n\n<p>of course the symfony\/orm-pack (and the enclosed doctrine-modules as well) was updated to the newest version&#8230; The problem with that is, that in the meantime doctrine 3.0 has been published and this version does not seem to be as compatible with the doctrine 2.x versions as it would be necessary to be to simply update it. Actually, you might expect such incompatabilities on a major version change.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The Solution<\/h2>\n\n\n\n<p>Via discussions on <a href=\"https:\/\/github.com\/doctrine\/DoctrineMigrationsBundle\/issues\/301\">github<\/a> with various suggested solutions &#8211; which all didn&#8217;t work for me &#8211; I came across this article <a href=\"http:\/\/fabien.potencier.org\/symfony4-unpack-the-packs.html\">Symfony 4: Unpack the Packs<\/a> which &#8211; among other things &#8211; urged to &#8220;unpack&#8221; the originally oh so comfortable installed symfony\/&#8230;-packs and by doing so replacing the symfony\/&#8230;-pack with the original modules in the composer.json list.<br>This prevents any unintended updates of these modules, i.e. here the doctrine-modules<\/p>\n\n\n\n<p>And, voila: a succeeding<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer update symfony\/* --with-all-dependencies<\/code><\/pre>\n\n\n\n<p>updated everything smoothly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update<\/h3>\n\n\n\n<p>But the problem is still not 100% solved with that, since a simple<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composer update<\/code><\/pre>\n\n\n\n<p>still produces the same error. The only remedy here is a manual intervention in the composer.json: the (still) unlimited version restriction for the doctrine bundles<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        \"doctrine\/doctrine-bundle\": \"*\",\n        \"doctrine\/doctrine-migrations-bundle\": \"*\",\n        \"doctrine\/orm\": \"*\",\n<\/code><\/pre>\n\n\n\n<p>has to be limited to version 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>        \"doctrine\/doctrine-bundle\": \"~2\",\n        \"doctrine\/doctrine-migrations-bundle\": \"~2\",\n        \"doctrine\/orm\": \"~2\",\n<\/code><\/pre>\n\n\n\n<p>The exact syntax explanation you can find in the <a aria-label=\"undefined (opens in a new tab)\" href=\"https:\/\/getcomposer.org\/doc\/articles\/versions.md#hyphenated-version-range-\" target=\"_blank\" rel=\"noreferrer noopener\">composer documentation<\/a> about versions and constraints.<\/p>\n\n\n\n<p>Please, let me know if this helped you or how you got the problem under control.<\/p>\n\n\n\n<p>P.S.: of course, this is also still true for all updates from &#8220;pre Symfony 5.1.2&#8221; to Symfony 5.1.3)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At my recent update from Symfony 5.1.0 to Symfony 5.1.2 I got surprised by this error message: And it took me quite some time to find out what went wrong&#8230; &#8230; since one should assume that a clean bugfix-update won&#8217;t produce such an error. Well, the problem was, that I still hat doctrine installed as &#8230; <a title=\"Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;.\" class=\"read-more\" href=\"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/\" aria-label=\"Read more about Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;.\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":106,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-613","post","type-post","status-publish","format-standard","hentry","category-symfony-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Symfony 5.1.2 Unrecognized options &quot;dir_name, namespace&quot; under &quot;doctrine_migrations&quot;. - mher consulting<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Symfony 5.1.2 Unrecognized options &quot;dir_name, namespace&quot; under &quot;doctrine_migrations&quot;. - mher consulting\" \/>\n<meta property=\"og:description\" content=\"At my recent update from Symfony 5.1.0 to Symfony 5.1.2 I got surprised by this error message: And it took me quite some time to find out what went wrong&#8230; &#8230; since one should assume that a clean bugfix-update won&#8217;t produce such an error. Well, the problem was, that I still hat doctrine installed as ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/\" \/>\n<meta property=\"og:site_name\" content=\"mher consulting\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-21T13:42:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-07-28T10:38:57+00:00\" \/>\n<meta name=\"author\" content=\"Michael H.E. Roth\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael H.E. Roth\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/\"},\"author\":{\"name\":\"Michael H.E. Roth\",\"@id\":\"https:\\\/\\\/www.mher.de\\\/#\\\/schema\\\/person\\\/239ec7070cb781d59940d3f895b285f7\"},\"headline\":\"Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;.\",\"datePublished\":\"2020-06-21T13:42:07+00:00\",\"dateModified\":\"2020-07-28T10:38:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/\"},\"wordCount\":320,\"commentCount\":1,\"articleSection\":[\"Symfony\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/\",\"url\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/\",\"name\":\"Symfony 5.1.2 Unrecognized options \\\"dir_name, namespace\\\" under \\\"doctrine_migrations\\\". - mher consulting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mher.de\\\/#website\"},\"datePublished\":\"2020-06-21T13:42:07+00:00\",\"dateModified\":\"2020-07-28T10:38:57+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.mher.de\\\/#\\\/schema\\\/person\\\/239ec7070cb781d59940d3f895b285f7\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mher.de\\\/en\\\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/www.mher.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mher.de\\\/#website\",\"url\":\"https:\\\/\\\/www.mher.de\\\/\",\"name\":\"mher consulting\",\"description\":\"Website-Consulting, Wordpress-Hosting, SEO Searchengineoptimization, Online Marketing\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mher.de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mher.de\\\/#\\\/schema\\\/person\\\/239ec7070cb781d59940d3f895b285f7\",\"name\":\"Michael H.E. Roth\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7fcf8a987882ef6069cc992d8b43429ac9af464049330f3d130f659b7b0e1110?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7fcf8a987882ef6069cc992d8b43429ac9af464049330f3d130f659b7b0e1110?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/7fcf8a987882ef6069cc992d8b43429ac9af464049330f3d130f659b7b0e1110?s=96&d=mm&r=g\",\"caption\":\"Michael H.E. Roth\"},\"url\":\"https:\\\/\\\/www.mher.de\\\/en\\\/author\\\/mher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Symfony 5.1.2 Unrecognized options \"dir_name, namespace\" under \"doctrine_migrations\". - mher consulting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/","og_locale":"en_US","og_type":"article","og_title":"Symfony 5.1.2 Unrecognized options \"dir_name, namespace\" under \"doctrine_migrations\". - mher consulting","og_description":"At my recent update from Symfony 5.1.0 to Symfony 5.1.2 I got surprised by this error message: And it took me quite some time to find out what went wrong&#8230; &#8230; since one should assume that a clean bugfix-update won&#8217;t produce such an error. Well, the problem was, that I still hat doctrine installed as ... Read more","og_url":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/","og_site_name":"mher consulting","article_published_time":"2020-06-21T13:42:07+00:00","article_modified_time":"2020-07-28T10:38:57+00:00","author":"Michael H.E. Roth","twitter_misc":{"Written by":"Michael H.E. Roth","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/#article","isPartOf":{"@id":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/"},"author":{"name":"Michael H.E. Roth","@id":"https:\/\/www.mher.de\/#\/schema\/person\/239ec7070cb781d59940d3f895b285f7"},"headline":"Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;.","datePublished":"2020-06-21T13:42:07+00:00","dateModified":"2020-07-28T10:38:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/"},"wordCount":320,"commentCount":1,"articleSection":["Symfony"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/","url":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/","name":"Symfony 5.1.2 Unrecognized options \"dir_name, namespace\" under \"doctrine_migrations\". - mher consulting","isPartOf":{"@id":"https:\/\/www.mher.de\/#website"},"datePublished":"2020-06-21T13:42:07+00:00","dateModified":"2020-07-28T10:38:57+00:00","author":{"@id":"https:\/\/www.mher.de\/#\/schema\/person\/239ec7070cb781d59940d3f895b285f7"},"breadcrumb":{"@id":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.mher.de\/en\/symfony-5-1-2-unrecognized-options-dir_name-namespace-under-doctrine_migrations\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/www.mher.de\/en\/"},{"@type":"ListItem","position":2,"name":"Symfony 5.1.2 Unrecognized options &#8220;dir_name, namespace&#8221; under &#8220;doctrine_migrations&#8221;."}]},{"@type":"WebSite","@id":"https:\/\/www.mher.de\/#website","url":"https:\/\/www.mher.de\/","name":"mher consulting","description":"Website-Consulting, Wordpress-Hosting, SEO Searchengineoptimization, Online Marketing","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mher.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.mher.de\/#\/schema\/person\/239ec7070cb781d59940d3f895b285f7","name":"Michael H.E. Roth","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/7fcf8a987882ef6069cc992d8b43429ac9af464049330f3d130f659b7b0e1110?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/7fcf8a987882ef6069cc992d8b43429ac9af464049330f3d130f659b7b0e1110?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7fcf8a987882ef6069cc992d8b43429ac9af464049330f3d130f659b7b0e1110?s=96&d=mm&r=g","caption":"Michael H.E. Roth"},"url":"https:\/\/www.mher.de\/en\/author\/mher\/"}]}},"_links":{"self":[{"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/posts\/613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/comments?post=613"}],"version-history":[{"count":4,"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/posts\/613\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/posts\/613\/revisions\/635"}],"wp:attachment":[{"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/media?parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/categories?post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mher.de\/en\/wp-json\/wp\/v2\/tags?post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}