{"id":544,"date":"2023-10-29T20:34:18","date_gmt":"2023-10-29T20:34:18","guid":{"rendered":"https:\/\/wp-yoda.com\/en\/?post_type=notices&#038;p=544"},"modified":"2023-10-29T20:36:30","modified_gmt":"2023-10-29T20:36:30","slug":"composer-features","status":"publish","type":"notices","link":"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/","title":{"rendered":"Composer features"},"content":{"rendered":"\n\n\n<h2 class=\"wp-block-heading\">The <code>conflict<\/code> key in a Composer <code>composer.json<\/code><\/h2>\n\n\n\n<p>The <code>conflict<\/code> key in a Composer <code>composer.json<\/code> file is used to declare packages that your project cannot work with. It&#8217;s a way to prevent the installation of certain versions of packages that you know would cause problems with your project.<\/p>\n\n\n\n<p>Example:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\n&quot;conflict&quot;: {\n    &quot;cocur\/slugify&quot;: &quot;4.5.0&quot;\n}\n<\/pre><\/div>\n\n\n<p>This configuration means that your project cannot be installed or updated if the version 4.5.0 of the <code>cocur\/slugify<\/code> package is also required. If another dependency in your project requires <code>cocur\/slugify<\/code> version 4.5.0, or if you try to require that version directly, Composer will throw a conflict error and prevent the installation or update.<\/p>\n\n\n\n<p>The <code>conflict<\/code> key is useful when you know that a particular version of a package has a bug or a breaking change that affects your project, and you want to ensure that Composer does not install that version.<\/p>\n\n\n\n<p>In summary, this configuration tells Composer: &#8220;My project cannot work with version 4.5.0 of the <code>cocur\/slugify<\/code> package, so please do not install that version.&#8221;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The conflict key in a Composer composer.json The conflict key in a Composer composer.json file is used to declare packages [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"tags":[25,44],"notice_category":[45],"class_list":["post-544","notices","type-notices","status-publish","format-standard","hentry","tag-composer","tag-php","notice_category-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Composer features - WP Yoda<\/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:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Composer features - WP Yoda\" \/>\n<meta property=\"og:description\" content=\"The conflict key in a Composer composer.json The conflict key in a Composer composer.json file is used to declare packages [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Yoda\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-29T20:36:30+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/notices\\\/php\\\/composer-features\\\/\",\"url\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/notices\\\/php\\\/composer-features\\\/\",\"name\":\"Composer features - WP Yoda\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/#website\"},\"datePublished\":\"2023-10-29T20:34:18+00:00\",\"dateModified\":\"2023-10-29T20:36:30+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/notices\\\/php\\\/composer-features\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wp-yoda.com\\\/en\\\/notices\\\/php\\\/composer-features\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/notices\\\/php\\\/composer-features\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Notices\",\"item\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/notices\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Composer features\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/\",\"name\":\"WP Yoda\",\"description\":\"Notes about PHP, WordPress and IT\",\"publisher\":{\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/#organization\",\"name\":\"WP Yoda\",\"url\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/05\\\/Andrew_222_Master_Yoda__WordPress_plain_background_763a84a4-5042-4fac-9bdb-4562c05563e7.png\",\"contentUrl\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/05\\\/Andrew_222_Master_Yoda__WordPress_plain_background_763a84a4-5042-4fac-9bdb-4562c05563e7.png\",\"width\":1024,\"height\":1024,\"caption\":\"WP Yoda\"},\"image\":{\"@id\":\"https:\\\/\\\/wp-yoda.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Composer features - WP Yoda","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:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/","og_locale":"en_US","og_type":"article","og_title":"Composer features - WP Yoda","og_description":"The conflict key in a Composer composer.json The conflict key in a Composer composer.json file is used to declare packages [&hellip;]","og_url":"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/","og_site_name":"WP Yoda","article_modified_time":"2023-10-29T20:36:30+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/","url":"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/","name":"Composer features - WP Yoda","isPartOf":{"@id":"https:\/\/wp-yoda.com\/en\/#website"},"datePublished":"2023-10-29T20:34:18+00:00","dateModified":"2023-10-29T20:36:30+00:00","breadcrumb":{"@id":"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wp-yoda.com\/en\/notices\/php\/composer-features\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wp-yoda.com\/en\/"},{"@type":"ListItem","position":2,"name":"Notices","item":"https:\/\/wp-yoda.com\/en\/notices\/"},{"@type":"ListItem","position":3,"name":"Composer features"}]},{"@type":"WebSite","@id":"https:\/\/wp-yoda.com\/en\/#website","url":"https:\/\/wp-yoda.com\/en\/","name":"WP Yoda","description":"Notes about PHP, WordPress and IT","publisher":{"@id":"https:\/\/wp-yoda.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wp-yoda.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/wp-yoda.com\/en\/#organization","name":"WP Yoda","url":"https:\/\/wp-yoda.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wp-yoda.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/wp-yoda.com\/en\/wp-content\/uploads\/sites\/2\/2023\/05\/Andrew_222_Master_Yoda__WordPress_plain_background_763a84a4-5042-4fac-9bdb-4562c05563e7.png","contentUrl":"https:\/\/wp-yoda.com\/en\/wp-content\/uploads\/sites\/2\/2023\/05\/Andrew_222_Master_Yoda__WordPress_plain_background_763a84a4-5042-4fac-9bdb-4562c05563e7.png","width":1024,"height":1024,"caption":"WP Yoda"},"image":{"@id":"https:\/\/wp-yoda.com\/en\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/notices\/544","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/notices"}],"about":[{"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/types\/notices"}],"author":[{"embeddable":true,"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/comments?post=544"}],"version-history":[{"count":0,"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/notices\/544\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/media?parent=544"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/tags?post=544"},{"taxonomy":"notice_category","embeddable":true,"href":"https:\/\/wp-yoda.com\/en\/wp-json\/wp\/v2\/notice_category?post=544"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}