{"id":168,"date":"2021-06-08T12:41:34","date_gmt":"2021-06-08T10:41:34","guid":{"rendered":"https:\/\/www.bsdpro.se\/?p=168"},"modified":"2022-09-04T13:03:16","modified_gmt":"2022-09-04T11:03:16","slug":"freebsd-upgrade-php-7-4-to-8-0-in-one-line","status":"publish","type":"post","link":"https:\/\/www.bsdpro.se\/?p=168","title":{"rendered":"FreeBSD &#8211; Upgrade PHP 7.4 to 8.0 in one line"},"content":{"rendered":"\n<p>This is more of a note to myself but if you want to upgrade PHP 7.4 in one go in FreeBSD, run the following command: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pkg install `pkg query %n-%v | grep php|grep --invert json | sed 's\/74\/80\/; s\/-7.*\/\/'`<\/pre>\n\n\n\n<p>Note: The above command excludes anything with json, the reason is because the json extension is enabled in PHP 8 by default, so there&#8217;s no such package for it. If you have other PHP json packages installed, those will be excluded too.<br><br>To check what packages the command will replace, run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">pkg query %n-%v | grep php |grep --invert json | echo `sed 's\/74\/80\/; s\/-7.*\/\/'`<\/pre>\n\n\n\n<p>If you know what you&#8217;re doing you can edit the command for other PHP versions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is more of a note to myself but if you want to upgrade PHP 7.4 in one go in FreeBSD, run the following command: pkg install `pkg query %n-%v | grep php|grep &#8211;invert json | sed &#8216;s\/74\/80\/; s\/-7.*\/\/&#8217;` Note: &hellip; <a href=\"https:\/\/www.bsdpro.se\/?p=168\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-168","post","type-post","status-publish","format-standard","hentry","category-freebsd"],"_links":{"self":[{"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=168"}],"version-history":[{"count":8,"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=\/wp\/v2\/posts\/168\/revisions"}],"predecessor-version":[{"id":178,"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=\/wp\/v2\/posts\/168\/revisions\/178"}],"wp:attachment":[{"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bsdpro.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}