Blazing fast macOS PHP development environment

Last update: May 24, 2022

Introduction

Valet+ is a development environment for macOS. No Vagrant, no Docker, no /etc/hosts file.

Go here for the valet+ documentation.

Credits

This project is a fork of laravel/valet. Thanks to all of the contributors, especially the original authors:

Valet+ Authors

Valet+ Contributors

  • Lou van der Laarse (@Neodork)
  • Sander Pott (@Sander Valet+ slack channel)
  • Mischa Braam (@mischabraam)

Get in touch

slack

We have a slack workspace available which you can join.

Yes, we have a Valet+ fan page https://www.weprovide.com/valet-plus

GitHub

https://github.com/weprovide/valet-plus
Comments
  • 1. Homebrew/php is deprecated in favor of homebrew/core

    What is the problem? Homebrew/php is deprecated in favor of homebrew/core which now has support for php formulae. Homebrew/core supports the following php versions: 5.6, 7.0, 7.1, 7.2. When people use some valet or brew commands which trigger an update they will brick their valet+ installation. Due to PHP not being able to find the missing extensions which are now managed by PECL.

    The new homebrew/core php packages have several extensions prepackaged like: mcrypt and intl. Packages should now be managed using the PHP package manager PECL.

    What to do?

    • [X] Fix Brew.php to support the new [email protected]{version} formulae
    • [X] Fix PhpFpm.php to support new [email protected]{version} formulae
    • [X] Refactor package management from homebrew/php to PECL
    • [X] Fix xdebug on/off switch
    • [X] Fix Ioncube loader extension (PhpFpm --> PECL) 5.6, 7.0, 7.1, 7.2
    • [x] Provide user friendly switch from old php installation
    • [X] Fix n98-magerun, n98-magerun2 and drush. Custom Binary Manager.

    Pecl manager supported versions

    • [X] PHP 7.2 support: apcu, intl, mcrypt, opcache, geoip
    • [X] PHP 7.1 support: apcu, intl, mcrypt, opcache, geoip
    • [X] PHP 7.0 support: apcu, intl, mcrypt, opcache, geoip
    • [X] PHP 5.6 support: apcu, intl, mcrypt, opcache, geoip

    ~~Current progress can be followed at https://github.com/tamtamnl/valet-plus/tree/hotfix/homebrew-core-php and will soon be followed up by a PR for the community to judge.~~

    Edit: Merged.

    Reviewed by Neodork at 2018-04-02 20:43
  • 2. Fatal error: Call to undefined function apcu_fetch()

    Hello everyone,

    Valet works for me on php 7.1, but when i will change php(7.1 to 5.6) - (valet use 5.6)

    image

    when i ran app, return: image

    Fatal error: Call to undefined function apcu_fetch() in /Users/maxalexandre/.composer/vendor/weprovide/valet-plus/server.php on line 37

    Reviewed by MaxSouza at 2018-04-11 01:00
  • 3. Install - Setting password for root user failed

    After using Valet-plus for months on my MAC, it stopped working properly. I cannot connect to the MySQL database. I have been working to fix for the last few days but am now at a block.

    Valet install always finishes with: "Setting password for root user failed."

    Any help would be appreciated. I have followed 246 but it has been no help.

    screen shot 2018-12-04 at 1 04 30 pm

    Reviewed by eclectic-coding at 2018-12-04 18:02
  • 4. Added support for m1 macs

    • [/] There is an issue ticket which accompanies my PR: #568
    • [/] I have followed the guidelines for contributing.
    • [/] I have checked that there aren't other open pull requests for the same issue ticket.
    • [/] I have formatted my code with the PSR-2 coding style before submitting my PR.

    **I have read the contribution guidelines and am targeting the branch 2.x: Because this is a Feature which is Backwards Compatible.

    Changelog entry:

    Added

    • Added new flag --brew-opt for install command which tells valet to look in /opt/homebrew
    • Added new flag --brew-opt for fix command which tells valet to look in /opt/homebrew

    Removed

    • GEOIP is not installed as proved problematic due to brew path changes and installing via pecl

    Note

    If using php 7.3 and greater you need the following for a successful install of apcu

    export LDFLAGS="-L/opt/homebrew/opt/pcre2/lib"
    export CPPFLAGS="-I/opt/homebrew/opt/pcre2/include"
    export PKG_CONFIG_PATH="/opt/homebrew/opt/pcre2/lib/pkgconfig"
    
    Reviewed by Adam2Marsh at 2021-04-08 19:43
  • 5. Valet plus broken after switching to any version

    I reinstalled Macos on my macbook pro a few days ago. Since then I tried to install valet-plus. It works fine, but when I try to switch php version it crashes, the error is different for various php versions.

    It works on php 7.1

    On php 7.2 I get the following error: Fatal error: Uncaught Error: Call to undefined function apcu_fetch() in /Users/mikehendriks/.composer/vendor/weprovide/valet-plus/server.php:37 Stack trace: #0 {main} thrown in /Users/mike/.composer/vendor/weprovide/valet-plus/server.php on line 37

    On php 5.6 I get the following error: 502 Bad Gateway nginx/1.15.5

    Fortunately I don't need php 7.2 right now, but I do really need 5.6, I hope someone can help me, I've tried everything.

    Reviewed by mike-hendriks at 2018-10-04 11:29
  • 6. How to handle multiple stores in Magento site?

    What's the recommended way of handling multiple stores with Valet+?

    Usually I'd just add a line in my nginx.conf file so the MAGE_RUN_CODE or MAGE_RUN_TYPE server variables change depending on the domain name, is it possible to do something like this with Valet+? Should I use a custom driver?

    Thanks.

    Reviewed by jahvi at 2017-10-03 11:12
  • 7. Some operations cause Valet+ to hang completely

    It's hard to pinpoint what is going on, but after certain actions involving Ajax calls (I think), Valet+ becomes completely unresponsive. There is minor php-fpm usage when I open a page, but very short then nothing and eventually it times out with a 504 Gateway Timeout. Very rarely it started working again after a few minutes without doing anything. Mostly I have to restart php and it works again. Sometimes it hangs again on the same Ajax call immediately after, but mostly the Ajax call is handled quickly and without problems after restarting php. Until I open some other pages, save something and try the Ajax call again, it breaks. This happens with a Drupal 8 project.

    ~/.valet/Log/nginx-error.log:

    2017/08/22 10:15:50 [error] 5708#0: *5648 upstream timed out (60: Operation timed out) while reading response header from upstream, client: 127.0.0.1, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "fastcgi://unix:/Users/sander/.valet/valet.sock", host: "project.dev", referrer: "http://project.dev/"
    

    Nothing in ~/.valet/Log/php.log

    I see this in /var/log/system.log, but I think it's just a warning because php is always running:

    Aug 22 10:07:14 nm2d-02345 com.apple.xpc.launchd[1] (homebrew.mxcl.php70): This service is defined to be constantly running and is inherently inefficient.
    

    Does anyone have any idea which php/nginx settings I can try to solve this?

    Reviewed by SanderAtom at 2017-08-22 08:25
  • 8. Bug: Switching to and from 7.2 to 7.3 requires me to switch icu4c version

    When I try to switch to 7.3 (valet use 7.3) PHP isn't usable. I have to run brew switch icu4c 64.2 to make it work again. And then when switching back to 7.2 I have to run brew switch icu4c 63.1.

    This is what happens...

    $ valet use 7.3
    
    [[email protected]] Unlinking
    Unlinking /usr/local/Cellar/[email protected]/7.2.13... 25 symlinks removed
    
    [libjpeg] Relinking
    [[email protected]] Linking
    Linking /usr/local/Cellar/[email protected]/7.3.9_2... 25 symlinks created
    
    [[email protected]] Stopping
    [[email protected]] Stopping
    [[email protected]] Stopping
    [[email protected]] Stopping
    [BREW TAP] henkrehorst/php already installed
    
    In Process.php line 434:
                                                      
      The process has been signaled with signal "6".  
                                                      
    
    use [<service>] [<targetVersion>]
    

    So then I do the following to fix it...

    $ brew switch icu4c 64.2
    
    Cleaning /usr/local/Cellar/icu4c/64.2
    Cleaning /usr/local/Cellar/icu4c/63.1
    Opt link created for /usr/local/Cellar/icu4c/64.2
    
    $ php -v
    
    PHP 7.3.9 (cli) (built: Sep  9 2019 13:05:01) ( NTS )
    Copyright (c) 1997-2018 The PHP Group
    Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
        with Zend OPcache v7.3.9, Copyright (c) 1999-2018, by Zend Technologies
    
    

    How can I prevent this error when switching versions?

    Reviewed by glennjacobs at 2019-09-12 13:35
  • 9. Cannot find installation path for: apcu_bc

    New error occurred when I ran valet install --with-maria-db after updating composer to the latest version of valet-plus 1.0.26

    In Pecl.php line 134:
    Could not find installation path for: apcu_bc
    sudo: pecl: command not found
    

    Do I just ignore this?

    Reviewed by kupoback at 2019-01-25 14:17
  • 10. Ability to disable redis, mailhog, rabbitmq and varnish

    Would love to see options to (temporarily) disable redis, mailhog, rabbitmq and varnish. Starting and running these only use up time and memory when not always needed.

    Reviewed by regularlabs at 2018-07-02 21:48
  • 11. Fix for Brew 2.7.0: brew list command without arguments is deprecated

    This issues caused a complete mallfunction of Valet plus after updating my brew to version: 2.7.0

    This issues prevents Valet plus from starting services and installing packages.

    • [x] There is an issue ticket which accompanies my PR: https://github.com/weprovide/valet-plus/issues/553
    Reviewed by peterkeijsers at 2020-12-23 08:14
  • 12. Added support for PHP 8.1 and improved switching between versions

    • [x] There is an issue ticket which accompanies my PR: #600.
    • [x] I have followed the guidelines for contributing.
    • [ ] I have checked that there aren't other open pull requests for the same issue ticket.
    • [x] I have formatted my code with the PSR-2 coding style before submitting my PR.

    I have read the contribution guidelines and am targeting the branch release/2.4:
    Because this PR depends on code only available in that branch.

    Changelog entry:

    Added

    • Support for PHP 8.1
    • Used a few existing methods from Laravel Valet fork

    Changed

    • Improved switching between PHP versions after changes in Brew taps.
    • Take into account different formula names like php or [email protected].
    • Check if PHP is linked before trying to unlink.

    I am not very happy with my changes made inside \Valet\Brew::installed method. Maybe there is a better option for checking if a formula is installed. And maybe it would be easier not to use the full PHP formula name like 'shivammathur/php/[email protected]'.

    Reviewed by Davie82 at 2022-04-22 06:49
  • 13. Feature request: Per-Site PHP Versions

    • [x] I've checked the issue queue and could not find anything similar to my feature.
    • [x] I'm on the latest version of valet-plus (valet --version): Valet+ 2.3.1

    Why implement this feature?
    By default, Valet+ uses your chosen PHP installation to serve your sites. However, if you need to support multiple PHP versions across various sites this is not possible.

    In Laravel Valet this is possible with the isolate command: https://laravel.com/docs/9.x/valet#per-site-php-versions. It would be nice if this could also be implemented in Valet+.

    Sources https://laravel.com/docs/9.x/valet#per-site-php-versions

    Reviewed by jbclaudio at 2022-04-14 09:16
  • 14. Add support for PHP 8.1

    • [x] There is an issue ticket which accompanies my PR: https://github.com/weprovide/valet-plus/issues/600
    • [x] I have followed the guidelines for contributing.
    • [x] I have checked that there aren't other open pull requests for the same issue ticket.
    • [x] I have formatted my code with the PSR-2 coding style before submitting my PR.

    I have read the contribution guidelines and am targeting the branch <YOUR_TARGET_BRANCH>:
    Because this is a Bug Fix which is Backwards Compatible.
    Because this is a Feature which is not Backwards Compatible.
    Because this is a Deprecation which is Backwards Compatible.
    etc...

    Changelog entry:
    Short description of your work as explained by: Keep A Changelog.

    Reviewed by osrecio at 2022-03-31 15:47
  • 15. Feature request: choose DBMS to Open Database

    • [x] I've checked the issue queue and could not find anything similar to my feature.
    • [x] I'm on the latest version of valet-plus (valet --version): 2.3.1

    Why implement this feature?

    • Check if DBMS is installed
    • If not installed install it as option
    • Open Database in 2 DBMS commonly used: Sequel PRO and TablePlus

    What will be required for this feature?

    • Choice to select DBMS you want to use Sequel or Tableplus (Sequel as default) image

    • If not installed ask if want to install it image

    • Open Database in right DBMS image

    Sources

    • External Sources: Sequel Pro, TablePlust

    If you think can be a good feature I had the development working of my copy of valet :)

    Reviewed by osrecio at 2022-02-10 15:37
  • 16. Feature request: Support For PHP 8.1

    • [x] I've checked the issue queue and could not find anything similar to my feature.
    • [x] I'm on the latest version of valet-plus (valet --version): 2.3.1

    Why implement this feature?
    PHP 8.1 was released in 25th of Nov. and some projects support it. I think is important to be added

    What will be required for this feature?
    After this PR merging: https://github.com/henkrehorst/homebrew-php/issues/155 can we add a Support for PHP 8.1, that I will be help on this when the PR merging :)

    Sources https://www.php.net/supported-versions.php https://www.php.net/downloads.php#v8.1.2

    Reviewed by osrecio at 2022-02-10 11:14
DDEV-Local: a local PHP development environment system
DDEV-Local: a local PHP development environment system

ddev ddev is an open source tool that makes it simple to get local PHP development environments up and running in minutes. It's powerful and flexible

May 26, 2022
Stacker - The environment for local web development, ready for use.
Stacker - The environment for local web development, ready for use.

Introduction English 简体中文 Why stacker? Stacker - This is a local environment for web development with everything you need. What is its benefit? You do

Apr 11, 2022
Valet WSL is an advanced development environment for Windows Subsystem for Linux
Valet WSL is an advanced development environment for Windows Subsystem for Linux

Introduction Valet WSL is an advanced development environment for Windows Subsystem for Linux. No Vagrant, no hosts file manual management. You can ev

Mar 24, 2022
A development tool for all your projects that is fast, easy, powerful and liberating
A development tool for all your projects that is fast, easy, powerful and liberating

Lando A Liberating Dev Tool For All Your Projects The local development and DevOps tool trusted by professional developers across the galaxy. Free you

May 25, 2022
Oxygen Builder's better workflow and environment

Oxygen Builder's better workflow and environment Built with ❤️ Official Website | Documentation | Change Log Supporting Artifact is an open source pro

Mar 27, 2022
Shopware 6 app boilerplate + Symfony backend + Dockware docker dev environment 💙

Shopware 6 app boilerplate with Symfony backend This boilerplate template can be used to get up and running with a docker-based dev setup for Shopware

Nov 14, 2021
This is a dockerized environment for testing and developing things on the fatfree-core.
This is a dockerized environment for testing and developing things on the fatfree-core.

F3 development bench This is a dockerized environment for testing and developing things on the fatfree-core. It uses Docker to spin up multiple contai

Mar 29, 2022
Vagrant is a tool for building and distributing development environments.

Vagrant Website: https://www.vagrantup.com/ Source: https://github.com/hashicorp/vagrant HashiCorp Discuss: https://discuss.hashicorp.com/c/vagrant/24

May 20, 2022
A modern Docker LAMP stack and MEAN stack for local development
A modern Docker LAMP stack and MEAN stack for local development

The Devilbox Usage | Architecture | Community | Features | Intranet | Screenshots | Contributing | Logos | License Support for valid https out of the

May 26, 2022
🎲Neard is a portable WAMP software stack involving useful binaries, tools and applications for your web development.
🎲Neard is a portable WAMP software stack involving useful binaries, tools and applications for your web development.

About Neard is a portable WAMP software stack involving useful binaries, tools and applications for your web development. It also offers several versi

May 11, 2022
Docker Containers for simple Laravel development.
Docker Containers for simple Laravel development.

Docker containers of Laravel development. Docker Containers for simple Laravel development. Prerequisites This package only works for Linux users righ

May 19, 2022
A package that allows you to generate simple and fast Docker configurations for your Laravel application!

A package that allows you to generate simple and fast Docker configurations for your Laravel application!

Dec 23, 2021
Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP
Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP

Brew PHP switcher is a simple shell script to switch your apache and CLI quickly between major versions of PHP. If you support multiple products/projects that are built using either brand new or old legacy PHP functionality. For users of Homebrew (or brew for short) currently only.

May 23, 2022
Phansible - generate Vagrant + Ansible dev environments for PHP

Phansible Phansible is a simple generator for Vagrant projects, targeting PHP development environments, using Ansible as Provisioner. It was inspired

May 14, 2022
Monitor for any changes in your php application and automatically restart it (suitable for async apps).
Monitor for any changes in your php application and automatically restart it (suitable for async apps).

PHP-watcher PHP-watcher helps develop long-running PHP applications by automatically restarting them when file changes in the directory are detected.

May 13, 2022
Laravel 5 with Dockerized Gulp, PHP-FPM, MySQL and nginx using docker-compose

docker-laravel Laravel 5 with Dockerized PHP-FPM, MySQL and nginx using docker-compose Usage Get Composer docker-compose run --rm phpnginx curl -O htt

Feb 8, 2022
Docker with PHP 7.4 fpm, Nginx, Composer, PhpUnit and MaridaDB

Clean Docker with PHP Docker with PHP 7.4 fpm, Nginx, Composer, PhpUnit and MariaDB Starting app docker-compose up -d Main page

Apr 26, 2022
Runs a PHP-based startpage in Docker
Runs a PHP-based startpage in Docker

docker-php-startpage Runs a PHP-based startpage in Docker Source code: GitHub Docker container: Docker Hub Image base: PHP Init system: N/A Applicatio

May 15, 2022
Lamp Docker skeleton PHP + Nginx + Mysql + Redis

Stop installing the entire development stack on your local machine. This project will allow you to quickly start working with php. To install, you need to install docker locally.

May 2, 2022