Giter Club home page Giter Club logo

valet-plus's Introduction

Introduction

Valet+ is a development environment for macOS. No Vagrant, no Docker, no /etc/hosts file. This project uses laravel/valet as a dependency.

Installation

⚠️ Valet+ requires macOS and Homebrew. Before installation, you should make sure that no other programs such as Apache or Nginx are binding to your local machine's port 80.

⚠️ Valet+ requires Composer to be installed.

To get started, you first need to ensure that Homebrew is up-to-date using the update command:

brew update

Next, you should use Homebrew to install PHP 8.1 (using shivammathur/php):

brew tap shivammathur/php
brew install shivammathur/php/[email protected]
brew link [email protected] --force
brew services restart [email protected]

Install Valet+ 3.x-dev with composer:

composer global require weprovide/valet-plus:3.x-dev

Finally, you may execute the Valet+ install command. This will configure and install Valet+, Nginx, DnsMasq and other services. In addition, use --help to see all installation options.

valet-plus install

The daemons Valet+ depends on will be configured to launch when your system starts. Once Valet+ is installed, try pinging any *.test domain on your terminal using a command such as ping foobar.test. If Valet+ is installed correctly you should see this domain responding on 127.0.0.1.

Valet+ features

Here are a few key differences compared to the original Valet:

  • Nginx config optimization
  • PHP extensions (mcrypt, intl, opcache, yaml, apcu, ds, imagick)
  • MySQL ([email protected], [email protected], [email protected], mariadb)
    • DB commands (list, create, drop, reset, (re)import, export, open)
  • Mailhog (on/off mode)
  • Varnish (on/off mode)
  • Redis (on/off mode)
  • Rabbitmq (on/off mode)
  • Xdebug (on/off mode)
  • Memcache (on/off mode)
  • Elasticsearch v6, v7, v8 (on/off mode) using Docker
  • Opensearch (on/off mode)
  • Ioncube
  • Rewrite/unrewrite public domain to local environment
  • DevTools
  • Binaries (magerun, magerun2, drush, wp-cli, shopware-cli)

Changes vs Valet+ 2

  • Use command valet-plus instead of valet.
  • Rename .env.valet to .valet-env.php.
  • Use command valet-plus elasticsearch|es use <version> instead of valet-plus use elasticsearch|es <version>.
  • Use 127.0.0.1 as Redis host instead of /tmp/redis.sock.
  • Choose which binaries to install (default all) and self-update on valet-plus install command.
  • Adds dependency on Docker for Elasticsearch, see https://docs.docker.com/desktop/install/mac-install/

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

valet-plus's People

Contributors

aaemnnosttv avatar adamwathan avatar antonioribeiro avatar drbyte avatar ehlovader avatar frankhoutappels avatar gounlaf avatar grusch-it avatar henkrehorst avatar igorpan avatar jasonvarga avatar jerguslejko avatar kapersoft avatar kennedytedesco avatar korvinszanto avatar lewisvoncken avatar lucasmichot avatar mezzle avatar mischabraam avatar mystix avatar nateritter avatar neodork avatar samgranger avatar samweprovide avatar sanderatom avatar sanderjp avatar taylorotwell avatar timneutkens avatar vicdelfant avatar vinkla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

valet-plus's Issues

apc.shm_size too high?

Hi, it seems that the apc.shm_size is too high for my setup. Having it set to 2048M I get the following error when using PHP (e.g. php -v)

PHP Fatal error: PHP Startup: apc_mmap: ftruncate failed: in Unknown on line 0

When I set it lower, to say 512M, PHP works perfectly with APCU.

Would there be a way to set this dynamically somehow from a config? Now I need to manually change the cli/stubs/z-performance.ini for PHP version switches to work properly. Or I need to set the value in /usr/local/etc/php/x.y/conf.d/z-performance.ini manually each time.

Needs a new name

I'm not a part of the Valet project, but I care about people handling things well, so I'm going to say something.

This project should have a new and unique name. In my totally-un-asked-for opinion, Valet+ is not an appropriate name for something that's not run by the people who created the original Valet. It's akin to forking Laravel and naming it Laravel$$$, or forking Drupal and naming it Drupal*.

--

As an aside, I'd also suggest burying the fact that the core of this code is Valet--that this project is Valet, with some modifications--a wee bit less. That's a bit of a separate issue, but again goes to the healthy and respectful relationship to the originator of code you forked.

❤️

Created scripts to automate the install valet-plus by first checking to see if any other web server is running

Created scripts to automate the install valet-plus by first checking to see if any other web server is running, and kill them.

https://campfirepixels.com/automated-way-to-install-valet-plus-by-weprovide/

valet-plus-list
[email protected]:ca96e5face7cd1f02ce62aad490cfe2d.git
valet-plus-destroy
[email protected]:5b74ba708d7bf8621c1cb6b959ece99f.git
valet-plus-install
[email protected]:ccaa9712cb5bdc73e43276a63643366b.git

Elasticsearch version

valet elasticsearch install installs Elasticsearch 2.4.

I started digging into this because I have some issues with fielddata on bin/console fos:elastica:populate:

[Elastica\Exception\ResponseException]                                                                                                    
  fielddata should be a hash but was of type: class java.lang.Boolean [reason: Failed to parse mapping [text]: fielddata should be a hash   
  but was of type: class java.lang.Boolean]   

This used to work when I had simply run brew install elasticsearch && brew services start elasticsearch. To be clear, I'm not 100 % sure about this, as I haven't troubleshooted it for fear of messing up my brand new Valet Plus (and macOS) install.

brew info elasticsearch gives the following result:

elasticsearch: stable 5.5.2, HEAD
…

I have two questions:

  1. Why does Valet Plus use Elasticsearch 2.4?
  2. Is there a way to undo valet elasticsearch install?

MySQL breaks when exporting

I'm trying to export a Magento2 DB via SequelPro, but the export always stops around table number 32-35 because the MySQL server just stops working. After running a valet restart the server is back online, but restarting the export breaks it again.

This is rather a pressing issue, because I use MySQL exports frequently via SequelPro

FR: 'valet reimport [file]' or create db when using import on non-existing db

When you use 'valet db import [file]' but the database doesn't exist yet, you get the error ERROR 1049 (42000): Unknown database 'project'. It would be nice if the database is created if it doesn't exist.
Also I use 'valet db drop && valet db create && db import [file]' as a one-liner for re-installing a database, if that could be 'valet db reimport [file]', that would be awesome!

Warnings and errors in the output of `valet db ls`

Hello,

I have just set up Valet+ (and WP-CLI Valet Command). Great time saver! I am able to create sites just fine.

There are a couple of problems though:

  1. The documentation says that default mysql root user's password is root. But in my case, it doesn't work. Only empty/blank password works.

  2. There are warnings and errors appearing when I run valet db ls:

PHP Warning:  mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php on line 172

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php on line 172
Failed to connect to database
PHP Warning:  mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php on line 233

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, boolean given in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php on line 233
PHP Fatal error:  Uncaught Error: Call to a member function query() on boolean in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php:234
Stack trace:
#0 /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php(256): Valet\Mysql->getDatabases()
#1 /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/includes/facades.php(28): Valet\Mysql->listDatabases()
#2 /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/valet.php(428): Facade::__callStatic('listDatabases', Array)
#3 [internal function]: Silly\Application->{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'ls', NULL, NULL)
#4 /Users/sridharkatakam/.composer/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array(Object(Closure), Array)
#5 /Users/sridharkatakam/.composer/vendor/mnapoli/silly/src/Application.php(95): Invoker\Invoker->call(Object(Closure), Array)
#6 [internal function]: Silly\Application->Silly\{closure}(Object(Sy in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php on line 234

Fatal error: Uncaught Error: Call to a member function query() on boolean in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php:234
Stack trace:
#0 /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php(256): Valet\Mysql->getDatabases()
#1 /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/includes/facades.php(28): Valet\Mysql->listDatabases()
#2 /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/valet.php(428): Facade::__callStatic('listDatabases', Array)
#3 [internal function]: Silly\Application->{closure}(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput), 'ls', NULL, NULL)
#4 /Users/sridharkatakam/.composer/vendor/php-di/invoker/src/Invoker.php(82): call_user_func_array(Object(Closure), Array)
#5 /Users/sridharkatakam/.composer/vendor/mnapoli/silly/src/Application.php(95): Invoker\Invoker->call(Object(Closure), Array)
#6 [internal function]: Silly\Application->Silly\{closure}(Object(Sy in /Users/sridharkatakam/.composer/vendor/weprovide/valet-plus/cli/Valet/Mysql.php on line 234

Could this be because I did not install Composer using Homebrew? I already had Composer installed globally using https://getcomposer.org/doc/00-intro.md#globally prior to installing Valet+. So I skipped that step during Valet+ installation.

Any help is appreciated.

Composer global update does not update Valet+

Not sure if this is my configuration but when I ran composer global update, Valet+ was not updated.
In fact it was downgrading some dependencies as if it couldn't find Valet+. I saw the Valet+ require in ~/.composer/composer.json with version "^0.2.3".
Als running composer global show shows:
weprovide/valet-plus 0.2.3 Blazing fast macOS PHP development environment

I had to use composer global require weprovide/valet-plus:0.4.0 to install the latest version.

Drupal 7 not working

Not sure if it's my local setup but I can't seem to get a Drupal 7 site working, any idea?

image

Also drush cc all is giving me:

No Drupal site found, only 'drush' cache was cleared.  

Even though I have a settings.php with (I think) the right db settings:

$databases['default']['default'] = array(
  'driver' => 'mysql',
  'database' => 'project',
  'username' => 'root',
  'password' => 'root',
  'host' => 'localhost',
  'prefix' => '',
  'collation' => 'utf8_general_ci',
);

Problem with connecting to db

I tried to setup the valet web server and it's okay because and I can try like "example.dev". However, I can't connect to the db or do anything relating the db.
This is the screenshot of my error: link
Any ideas about this problem?
Thanks in adance.

Valet db export

  1. You can use valet db export inside the right directory and it'll export the database of that directory to [name].sql. If you want to change the name of the file, you have to use valet db export [db] [filename] which makes you retype the current directory. If the directory and filename parameters are reversed you can use valet db export [filename], which uses the current directory if omitted.

  2. I keep typing valet db export dir filename.sql so I end up with filename.sql.sql, I expect to have to type in the full filename.

  3. If you can add a date (or date-time) format to the default sql name, I probably don't have to use the full command as much to change the name, since I usually add the date of the export.

Update readme

Hey,
i wanted to try out valet-plus, but there is missing stuff in readme.

Problem with database:

  • What is user and pass for database?
  • How to import database without git repository? I can always do mysql -u root -proot DBNAME < database.sql

So far looking good keep it up! 🚀

xDebug

Add xdebug on/off switch

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?

Update error message: Error creating database

Sander-mc:m2_22rc sander$ valet db create
Error creating database

I got this error thinking it was something wrong with the directory name, until I read the documentation and figured out the database name is based on the git repo name, and there was none. Maybe update the error message to read: 'Error creating database, no git repo found.' ?
Or even have a fallback to the directory name if there is no git yet.

Documentation not clear about how to update from valet

The documentation gives no hint what I should do when I have already valet installed - is there an upgrade path? Should I remove valet?
This seems to be a very common situation: user found valet, then after some while, looking for more features, she finds valet+ so some words about how to upgrade / convert should address many people.

BTW: very nice project! Thank you for your efforts!

cURL error 51: SSL: certificate verification failed (result: 5)

I am using mainwp to locally to connect to a host on the same machine, and when I do I get the following notice:

Server self connect | The HTTP response test get an error "cURL error 51: SSL: certificate verification failed (result: 5)"Not expected HTTP response body:

I have removed and resured the local hosts and still get the same issue. I went into Keychain access and remove all of the certificates and started again. Still no joy.

Error when installing

Parse error: syntax error, unexpected '' - dlopen(/usr/local/opt/php7' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ')' in Command line code on line 3/cli/valet.php
Got this error on calling valet install.
I have installed php71, on a 2016 macbook pro, latest updates.

Redis already declared

Getting already declared error for Redis when installing Valet-plus valet install:

PHP Fatal error:  Cannot declare class Redis, because the name is already in use in /Users/aek/.composer/vendor/weprovide/valet-plus/cli/includes/facades.php on line 35
PHP Stack trace:
PHP   1. {main}() /Users/aek/.composer/vendor/weprovide/valet-plus/cli/valet.php:0
PHP   2. require() /Users/aek/.composer/vendor/weprovide/valet-plus/cli/valet.php:10
PHP   3. ComposerAutoloaderInit41a7cc1ebcee16e4d84f7173b844eaac::getLoader() /Users/aek/.composer/vendor/autoload.php:7
PHP   4. composerRequire41a7cc1ebcee16e4d84f7173b844eaac() /Users/aek/.composer/vendor/composer/autoload_real.php:56

Class Redis is already declared in cli/Valet/Redis.php so...
I have cleared cache and removed all global composer requirement except for valet-plus.

Routing issues

Before, when I was using Ampps, I had setup a .htaccess file in my public folder (next to my index.php file).
Now, none of my routes do anything anymore.
My .htaccess file looked like this:

Options -MultiViews
RewriteEngine On

RewriteBase /project-name
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

Since the url was something annoying like localhost/project-name/public/(users, etc.), I wanted to switch to something better.
My project is almost 100% my own code, since it is mostly a learning platform for me, where I can learn setting up a basic framework and work up from there, gaining more front-end and back-end experience.

My Router.php contains the following, please bear in mind I created this in one go, and did not refactor a lot etc.

<?php

namespace App\Core\Routing;

/**
 * Class Router.
 */
class Router
{
    /**
     * @throws \Exception
     */
    public static function init()
    {
        if (!Route::isValidRoute() && !Route::isAssetRoute()) {
            throw new \RuntimeException('404: Route does not exist');
        }

        $url = get('url') ?: '';
        if (Route::isAssetRoute()) {
            if (stripos($url, '.js') >= 0) {
                header("Content-Type: Application/Javascript");
            } elseif (stripos($url, '.css') >= 0) {
                header("Content-Type: text/css");
            }

            echo \File::get(APP_PATH . '/' . $url);
            exit;
        }

        Route::executeCallback();
        exit;
    }
}

The routes I create in my routes.php file use a Route class, which look like this (same warning)

<?php

namespace App\Core\Routing;

use Closure;

/**
 * Class Route.
 */
class Route
{
    /**
     * @var array
     */
    private static $routes = [];

    /**
     * @param $route
     * @param $method
     */
    public static function get($route, $method)
    {
        self::setRoutes('GET', $route, $method);
    }

    /**
     * @param $route
     * @param $method
     */
    public static function post($route, $method)
    {
        self::setRoutes('POST', $route, $method);
    }

    /**
     * @return array
     */
    public static function getRoutes(): array
    {
        return self::$routes;
    }

    /**
     * @param $requestMethod
     * @param $route
     * @param $method
     *
     * @internal param array $routes
     */
    public static function setRoutes($requestMethod, $route, $method)
    {
        self::$routes[$requestMethod][$route] = $method;
    }

    /**
     * @return bool
     */
    public static function isValidRoute(): bool
    {
        $url = get('url');
        return empty(get()) ?: array_key_exists($url, self::getRoutes()[$_SERVER['REQUEST_METHOD']]);
    }

    /**
     * @return bool
     */
    public static function isAssetRoute(): bool
    {
        $url = get('url');
        return !empty(get()) && stripos($url, 'public/assets') !== false;
    }

    /**
     * @throws \BadMethodCallException
     */
    public static function executeCallback()
    {
        $callback = self::getIfExists();
        if ($callback instanceof Closure) {
            $callback->__invoke();

            return;
        }

        if (
            is_string($callback)
            && (strpos($callback, '@') !== false
                || strpos($callback, '::') !== false)
        ) {
            $parts = explode('@', $callback);
            if (count($parts) > 1) {
                //Todo: automatically get the namespace
                $class = 'App\\Controllers\\' . $parts[0];
                $class = new $class();
                $method = $parts[1];
                $class->$method();

                return;
            }

            //Todo: do this and simplify check;
            return;
        }

        if (!$callback) {
            //Callback could not be found or does not exist
            return;
        }

        throw new \BadMethodCallException('Callback is not supported');
    }

    /**
     * @return bool|Closure
     */
    public static function getIfExists()
    {
        $requestMethod = $_SERVER['REQUEST_METHOD'];
        $url = get('url');
        $routes = self::getRoutes();

        if (empty($url)) {
            $url = '/';
        }

        return (
            array_key_exists($requestMethod, $routes)
            && array_key_exists($url, $routes[$requestMethod])
        ) ? $routes[$requestMethod][$url] : false;
    }
}

Am I doing something wrong? Am I missing something?
My routes worked (mostly, only a single level route worked) in Ampps, but now only the homepage works.

Invalid datetime zone?

When I cloned my project in ~/sites/project-name, I saw many warnings related to the timezone.
Europe/Amsterdam is perfect, as I am from the Netherlands, but it appears to be set incorrectly?
I've tried setting it in my own script, (not even using DateTime btw, only using Nesbot's Carbon package) but that still shows the errors.
After scrolling down a bit, I can also see an exception is thrown. These errors and exception are even showing up if I do the following on the first line of my script: phpinfo();die;.
Here is a (full) screenshot of my phpinfo: link

Parked folders are also being served

Hello,

I have a folder called clients inside my ~/Sites.

I have parked both Sites and clients folders using the valet park command.

However, in the browser, it shows that clients.dev is also available.

screenshot

Any idea what's wrong?

Installation fails with mariadb already installed

The installation process fails when mariadb was already installed with brew:

Error: Cannot install mysql because conflicting formulae are installed.
  mariadb: because mysql, mariadb, and percona install the same binaries.
...

The flexibility of valet+ is what makes it a plus for me - that should include using it with mariadb.

Error in Readme example

In general the Readme is excellent. I found one typo, however that is a quick fix.

Where it reads:

  1. echo "<?php echo 'Valet+ at your service'" > index.php

It should read

  1. echo "<?php echo 'Valet+ at your service';" > index.php

The only difference is the semicolon after service'.

As it is now, the command results in a PHP error.

Error: The `brew link` step did not complete successfully

Installation was simple, easy and no problems, but it installed 7.1 by default. So when using valet use 7.0 I get the following error:

...
Error: The 'brew link' step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/apc.h
Target /usr/local/include/apc.h
...

Switching back to 7.1 and once more to 7.0 fixed it. Seems after the first time switching it can remove the symlinks properly. Here's the full log:

Sander-mc:sk2k sander$ valet use 7.0
Stopping php70...
Password:
Stopping php71...
Stopping nginx....
Unlinking /usr/local/Cellar/php71/7.1.6_18... 17 symlinks removed
Linking /usr/local/Cellar/php70/7.0.18_10... 17 symlinks created
Stopping nginx....
Stopping php70...
Stopping php71...
Stopping mysql....
Stopping redis....
Installing developer tools...
wp-cli already installed
n98-magerun already installed
n98-magerun2 already installed
pv already installed
Installing nginx configuration...
Installing nginx directory...
Updating PHP configuration...
Install PHP extensions...
Installing php70-apcu...
[php70-apcu] is not installed, installing it now via Brew... 🍻
==> Installing php70-apcu from homebrew/php
==> Installing dependencies for homebrew/php/php70-apcu: php70
==> Installing homebrew/php/php70-apcu dependency: php70
==> Downloading https://homebrew.bintray.com/bottles-php/php70-7.0.20_12.sierra.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/fe/fe50ba13b4c532cfbfae91e69739d5117d141a5182fde5dcaf54ea3666f0c45e?__gda__=exp=1499181807~hmac=4e3586acbad6658a6caca2d1108e373907c5f48163ab213042dab68273d9d540&response-content-disposition=attachment%3Bfilename%3D%22php70-7.0.20_12.sierra.bottle.tar.gz%22&response-content-type=application%2Fgzip&requestInfo=U2FsdGVkX18V8s0BUHvQDH0QMKo3V3q75GaRrXYkd8pMbLiXtXlgyF3JjvAa7TWV8G6TJM20N0LHPWJGwdSEy2_fbD4IOlmolp4JOCs96alvE54VmQaqTwvc-ftxaMqRYH9SWEl-LAyUcREF8L_vxA
==> Pouring php70-7.0.20_12.sierra.bottle.tar.gz
==> Caveats
The php.ini file can be found in:
    /usr/local/etc/php/7.0/php.ini

✩✩✩✩ Extensions ✩✩✩✩

If you are having issues with custom extension compiling, ensure that you are using the brew version, by placing /usr/local/bin before /usr/sbin in your PATH:

      PATH="/usr/local/bin:$PATH"

PHP70 Extensions will always be compiled against this PHP. Please install them using --without-homebrew-php to enable compiling against system PHP.

✩✩✩✩ PHP CLI ✩✩✩✩

If you wish to swap the PHP you use on the command line, you should add the following to ~/.bashrc, ~/.zshrc, ~/.profile or your shell's equivalent configuration file:
  export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"

✩✩✩✩ FPM ✩✩✩✩

To launch php-fpm on startup:
    mkdir -p ~/Library/LaunchAgents
    cp /usr/local/opt/php70/homebrew.mxcl.php70.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homebrew.mxcl.php70.plist

The control script is located at /usr/local/opt/php70/sbin/php70-fpm

OS X 10.8 and newer come with php-fpm pre-installed, to ensure you are using the brew version you need to make sure /usr/local/sbin is before /usr/sbin in your PATH:

  PATH="/usr/local/sbin:$PATH"

You may also need to edit the plist to use the correct "UserName".

Please note that the plist was called 'homebrew-php.josegonzalez.php70.plist' in old versions of this formula.

With the release of macOS Sierra the Apache module is now not built by default. If you want to build it on your system you have to install php with the --with-httpd24 option. See  brew options php70 for more details.

To have launchd start homebrew/php/php70 now and restart at login:
  brew services start homebrew/php/php70
==> Summary
🍺  /usr/local/Cellar/php70/7.0.20_12: 337 files, 38.6MB
==> Installing homebrew/php/php70-apcu
==> Downloading https://homebrew.bintray.com/bottles-php/php70-apcu-5.1.8.sierra.bottle.tar.gz
==> Pouring php70-apcu-5.1.8.sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink include/apc.h
Target /usr/local/include/apc.h
is a symlink belonging to php71-apcu. You can unlink it:
  brew unlink php71-apcu

To force the link and overwrite all conflicting files:
  brew link --overwrite php70-apcu

To list all files that would be deleted:
  brew link --overwrite --dry-run php70-apcu

Possible conflicting files are:
/usr/local/include/apc.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc.h
/usr/local/include/apc_arginfo.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_arginfo.h
/usr/local/include/apc_cache.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_cache.h
/usr/local/include/apc_cache_api.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_cache_api.h
/usr/local/include/apc_globals.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_globals.h
/usr/local/include/apc_iterator.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_iterator.h
/usr/local/include/apc_lock.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_lock.h
/usr/local/include/apc_lock_api.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_lock_api.h
/usr/local/include/apc_pool.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/
                                            
  [DomainException]                         
  Brew was unable to install [php70-apcu].  
                                            

install

apc_pool.h
/usr/local/include/apc_pool_api.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_pool_api.h
/usr/local/include/apc_sma.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_sma.h
/usr/local/include/apc_sma_api.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_sma_api.h
/usr/local/include/apc_stack.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/apc_stack.h
/usr/local/include/php_apc.h -> /usr/local/Cellar/php71-apcu/5.1.8/include/php_apc.h
==> Caveats
To finish installing apcu for PHP 7.0:
  * /usr/local/etc/php/7.0/conf.d/ext-apcu.ini was created,
    do not forget to remove it upon extension removal.
  * Validate installation via one of the following methods:
  *
  * Using PHP from a webserver:
  * - Restart your webserver.
  * - Write a PHP page that calls "phpinfo();"
  * - Load it in a browser and look for the info on the apcu module.
  * - If you see it, you have been successful!
  *
  * Using PHP from the command line:
  * - Run `php -i "(command-line 'phpinfo()')"`
  * - Look for the info on the apcu module.
  * - If you see it, you have been successful!
==> Summary
🍺  /usr/local/Cellar/php70-apcu/5.1.8: 23 files, 160.3KB

Restarting php70...
Restarting nginx...
Valet is now using php7.0.

FR: use gzip for sql files

He, I could have a look to make this myself but I'm not sure about other platform compatibility and what gzip progs to use etc, but it would be great if the db export/dump can directly pipe the sql into a .gz file. Also reading a .gz file on import/reimport would be awesome! Space is valuable ;)

Magento 1 cannot load core javascript file

I've installed a Magento 1 webshop and everything works except when I go to the admin forget password form (http://project.dev/index.php/admin/index/forgotpassword/). It's trying to dynamically load javascript files through the following URL:
http://project.dev/js/index.php/x.js?f=prototype/prototype.js,prototype/validation.js,mage/adminhtml/events.js,mage/adminhtml/form.js,scriptaculous/effects.js but this gives a 404.
index.php has logic to deal with the /x.js but I think Valet+ is trying to read index.php as a directory or something.
Any idea's ?

Why PHP 7.0?

First of all, thanks a lot for making and open sourcing Valet Plus.

In the installation instructions, step 2 says

Install PHP 7.0 using Homebrew via brew install homebrew/php/php70.

I used PHP 7.1 instead, and it seems to work fine. I'm curious, why does the documentation specify PHP 7.0?

Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so'

I tried switching to 5.6 and got the following errors:

Sander-mc:project sander$ valet use 5.6
Stopping php70...
Password:
Stopping php71...
Stopping nginx....
Unlinking /usr/local/Cellar/php70/7.0.20_12... 17 symlinks removed
Installing php56...
[php56] is not installed, installing it now via Brew... 🍻
Warning: Already linked: /usr/local/Cellar/php56/5.6.30_6
To relink: brew unlink php56 && brew link php56
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
PHP Parse error:  syntax error, unexpected '' - dlopen(/usr/local/opt/php5' (T_CONSTANT_ENCAPSED_STRING) in Command line code on line 3
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
PHP Parse error:  syntax error, unexpected '' - dlopen(/usr/local/opt/php5' (T_CONSTANT_ENCAPSED_STRING) in Command line code on line 3
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
Could not open input file: 
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0

Parse error: syntax error, unexpected '' - dlopen(/usr/local/opt/php5' (T_CONSTANT_ENCAPSED_STRING) in Command line code on line 3/cli/valet.php
Restarting php56...
Restarting nginx...
Valet is now using php5.6.
Sander-mc:project sander$ brew unlink php56 && brew link php56
Unlinking /usr/local/Cellar/php56/5.6.30_6... 17 symlinks removed
Linking /usr/local/Cellar/php56/5.6.30_6... 17 symlinks created
Sander-mc:project sander$ valet use 5.6
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
PHP Parse error:  syntax error, unexpected '' - dlopen(/usr/local/opt/php5' (T_CONSTANT_ENCAPSED_STRING) in Command line code on line 3
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0
Could not open input file: 
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php56-ssh2/ssh2.so' - dlopen(/usr/local/opt/php56-ssh2/ssh2.so, 9): image not found in Unknown on line 0

Parse error: syntax error, unexpected '' - dlopen(/usr/local/opt/php5' (T_CONSTANT_ENCAPSED_STRING) in Command line code on line 3/cli/valet.php
Sander-mc:project sander$ valet use 7
[... same errors ...]
Sander-mc:project sander$ valet install
[... same errors ...]

Eventually I fixed it by reinstalling ssh2 manually through homebrew: brew reinstall php56-ssh2 --build-from-source, switching to 7.0 and back to 5.6 then succeeded. I'm not sure if this is due to my local setup as I might have had some form of php already installed.

Undefined index: USER

I have installed https://github.com/aaemnnosttv/wp-cli-valet-command and was adding a user, and when I ran it I get the following error:

Don't go anywhere, this should only take a second...
Success: sample ready! https://sample.Notice: Undefined index: USER in /Users/riskiii/.composer/vendor/weprovide/valet-plus/cli/includes/helpers.php on line 175

Notice: Undefined index: USER in /Users/riskiii/.composer/vendor/weprovide/valet-plus/cli/includes/helpers.php on line 175
dev

I suspect the error is on this side, since USER is not declared before it is returned, but if not, I can file it with wp-cli-valet-command.

Allow Magento 2 setup from local.dev/setup

Right now Magento 2 can only be installed through the command line with bin/magento setup:install ... or n98-magerun2 install. Is it possible to allow through local.dev/setup as well?
I have not tested this but I imagine similar problems with other packages like Wordpress?

This would make it a lot more accessible to people with less experience with the command line.
It might be useful to add some short installation instruction for Magento(2) using n98-magerun(2) install or even add a valet magerun2 install command or something like that ;)

Docs: no hint about how to set different password for valet to use

I can not set a different password for valet to use - I looked into .valet but did not find any hint about where valet might be looking for passwords. Please add some info in the docs about how to change the used password.

Please note: I know how to change the mysql / mariadb root password. I do not know where to set the mysql password valet uses.

Thank you very much for your attention!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.