Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Wilbur Powery
Wilbur Powery

Posted on

     

Easily Upgrade to PHP 7.3

Thumbnail

First published on mywebsite.

PHP 7.3 has been out for a couple of weeks now and if you're interested in upgrading, the process is super simple.

Note: This small guide if meant for Mac OS users. If you're a Windows user, a quick google search should help you out!

Let's update everything

To pull install or update any applications or services, I use a Mac OS package manager calledHomebrew. Before we go about upgrading our PHP installation, lets' quickly run a Homebrew commands to update our formulae and Homebrew itself.

$brew update
Enter fullscreen modeExit fullscreen mode

Upgrading PHP

Now that our formulae is updated, we can proceed to upgrade our PHP installation with the latest version available on Homebrew.

$brew upgrade php
Enter fullscreen modeExit fullscreen mode

After the upgrade completes, you can open a new tab in your terminal and check your PHP version withphp -v. If all went well, you should see something like this:

PHP 7.3.0(cli)(built: Dec  7 2018 11:00:11)( NTS)Copyright(c) 1997-2018 The PHP GroupZend Engine v3.3.0-dev, Copyright(c) 1998-2018 Zend Technologies    with Zend OPcache v7.3.0, Copyright(c) 1999-2018, by Zend Technologies
Enter fullscreen modeExit fullscreen mode

In only a couple of minutes, you're already upgraded to the latest version of PHP. Keep in mind that some packages or services you're using in your system or applications might not be updated just yet to work on PHP 7.3.

Bonus for Laravel users

If you're a Laravel user you're more than likely using Laravel Valet. In order to get Valet working on PHP 7.3, you simply need to update it to the latest version released. Just do acomposer global update to update all your globally installed Composer packages and then just do avalet install.

Runningvalet install again is necesarry to configure the installation to work with your new PHP version.

Warning: There are some known bugs with PHP 7.3 and Opcache when queueing emails in the Laravel framework so I encourage you to keep an eye on the issues in the Laravel repository onGithub.

Top comments(7)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
sergeytelpuk profile image
Sergey
  • Joined

Easily Upgrade is to install via DOCKER.

CollapseExpand
 
wilburpowery profile image
Wilbur Powery
  • Joined

Not a big Docker fan myself.

CollapseExpand
 
sergey_telpuk profile image
Sergey Telpuk
Experienced PHP/NodeJS/Golang Developer with a demonstrated history of working in the information technology and services industry.
• Edited on• Edited

So, It doesn't make sense to write this article because of local-environment is past way of making Dev environment

Thread Thread
 
wilburpowery profile image
Wilbur Powery
  • Joined

Are you saying that everyone should be using Docker now for their local environment?

Thread Thread
 
sergey_telpuk profile image
Sergey Telpuk
Experienced PHP/NodeJS/Golang Developer with a demonstrated history of working in the information technology and services industry.

Exactly, Docker is silver bullet for team work and the faster roll out projects

Thread Thread
 
wilburpowery profile image
Wilbur Powery
  • Joined

Although I see the benefit of Docker, I don't think it's meant for every team. if you're deploying to a Docker container, sure, work on a docker container locally. But if you have zero docker containers on production, why work with Docker locally?

Laravel Valet is super light, fast and reliable and I don't ever need Docker for most of the projects I'm working on.

CollapseExpand
 
andrewdaluz profile image
André
  • Location
    Blumenau, SC
  • Work
    Magento 2 Engineer at Above The Fray Inc.
  • Joined

Thank you! It worked like a charm.
If you need upgrade only valet php version you can try:

brew upgradevalet-php@7.3

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More fromWilbur Powery

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp