Skip to content

Commit

Permalink
Merge branch 'katsuren-add_finished_directive' into 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Nov 10, 2016
2 parents 59f8404 + ebd8c78 commit 104bea8
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 9 deletions.
4 changes: 2 additions & 2 deletions envoy.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ If you would like to be prompted for confirmation before running a given task on

Envoy also supports sending notifications to [Slack](https://slack.com) after each task is executed. The `@slack` directive accepts a Slack hook URL and a channel name. You may retrieve your webhook URL by creating an "Incoming WebHooks" integration in your Slack control panel. You should pass the entire webhook URL into the `@slack` directive:

@after
@finished
@slack('webhook-url', '#bots')
@endafter
@endfinished

You may provide one of the following as the channel argument:

Expand Down
4 changes: 3 additions & 1 deletion migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ Before modifying a column, be sure to add the `doctrine/dbal` dependency to your

#### Updating Column Attributes

The `change` method allows you to modify an existing column to a new type or modify the column's attributes. For example, you may wish to increase the size of a string column. To see the `change` method in action, let's increase the size of the `name` column from 25 to 50:
The `change` method allows you to modify some existing column types to a new type or modify the column's attributes. For example, you may wish to increase the size of a string column. To see the `change` method in action, let's increase the size of the `name` column from 25 to 50:

Schema::table('users', function ($table) {
$table->string('name', 50)->change();
Expand All @@ -295,6 +295,8 @@ We could also modify a column to be nullable:
$table->string('name', 50)->nullable()->change();
});

> {note} The following column types can not be "changed": char, double, enum, mediumInteger, timestamp, tinyInteger, ipAddress, json, jsonb, macAddress, mediumIncrements, morphs, nullableTimestamps, softDeletes, timeTz, timestampTz, timestamps, timestampsTz, unsignedMediumInteger, unsignedTinyInteger, uuid.
> {note} Modifying any column in a table that also has a column of type `enum` is not currently supported.
<a name="renaming-columns"></a>
Expand Down
52 changes: 46 additions & 6 deletions redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,38 @@

- [Introduction](#introduction)
- [Configuration](#configuration)
- [Predis](#predis)
- [PhpRedis](#phpredis)
- [Interacting With Redis](#interacting-with-redis)
- [Pipelining Commands](#pipelining-commands)
- [Pub / Sub](#pubsub)

<a name="introduction"></a>
## Introduction

[Redis](http://redis.io) is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain [strings](http://redis.io/topics/data-types#strings), [hashes](http://redis.io/topics/data-types#hashes), [lists](http://redis.io/topics/data-types#lists), [sets](http://redis.io/topics/data-types#sets), and [sorted sets](http://redis.io/topics/data-types#sorted-sets). Before using Redis with Laravel, you will need to install the `predis/predis` package via Composer:
[Redis](http://redis.io) is an open source, advanced key-value store. It is often referred to as a data structure server since keys can contain [strings](http://redis.io/topics/data-types#strings), [hashes](http://redis.io/topics/data-types#hashes), [lists](http://redis.io/topics/data-types#lists), [sets](http://redis.io/topics/data-types#sets), and [sorted sets](http://redis.io/topics/data-types#sorted-sets).

Before using Redis with Laravel, you will either need to install the `predis/predis` package via Composer:

composer require predis/predis

Alternatively, you may install the [PhpRedis](https://github.com/phpredis/phpredis) PHP extension via PECL. The extension is more complex to install but may yield better performance for applications that make heavy use of Redis.

<a name="configuration"></a>
### Configuration

The Redis configuration for your application is located in the `config/database.php` configuration file. Within this file, you will see a `redis` array containing the Redis servers utilized by your application:

'redis' => [

'client' => 'predis',

'cluster' => false,

'default' => [
'host' => '127.0.0.1',
'port' => 6379,
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
],

Expand All @@ -34,11 +43,42 @@ The default server configuration should suffice for development. However, you ar

The `cluster` option will instruct the Laravel Redis client to perform client-side sharding across your Redis nodes, allowing you to pool nodes and create a large amount of available RAM. However, note that client-side sharding does not handle failover; therefore, is primarily suited for cached data that is available from another primary data store.

Additionally, you may define an `options` array value in your Redis connection definition, allowing you to specify a set of Predis [client options](https://github.com/nrk/predis/wiki/Client-Options).
<a name="predis"></a>
### Predis

In addition to the default `host`, `port`, `database`, and `password` server configuration options, Predis supports additional [connection parameters](https://github.com/nrk/predis/wiki/Connection-Parameters) that may be defined for each of your Redis servers. To utilize these additional configuration options, simply add them to your Redis server configuration in the `config/database.php` configuration file:

'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_write_timeout' => 60,
],

<a name="phpredis"></a>
### PhpRedis

> {note} If you have the PhpRedis PHP extension installed via PECL, you will need to rename the `Redis` alias in your `config/app.php` configuration file.
If your Redis server requires authentication, you may supply a password by adding a `password` configuration item to your Redis server configuration array.
To utilize the PhpRedix extension, you should change the `client` option of your Redis configuration to `phpredis`. This option is found in your `config/database.php` configuration file:

> {note} If you have the Redis PHP extension installed via PECL, you will need to rename the alias for Redis in your `config/app.php` file.
'redis' => [

'client' => 'phpredis',

// Rest of Redis configuration...
],

In addition to the default `host`, `port`, `database`, and `password` server configuration options, PhpRedis supports the following additional connection parameters: `persistent`, `prefix`, `read_timeout` and `timeout`. You may add any of these options to your Redis server configuration in the `config/database.php` configuration file:

'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'read_timeout' => 60,
],

<a name="interacting-with-redis"></a>
## Interacting With Redis
Expand Down
31 changes: 31 additions & 0 deletions upgrade.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Upgrade Guide

- [Upgrading To 5.4.0 From 5.3](#upgrade-5.4.0)
- [Upgrading To 5.3.0 From 5.2](#upgrade-5.3.0)
- [Upgrading To 5.2.0 From 5.1](#upgrade-5.2.0)
- [Upgrading To 5.1.11](#upgrade-5.1.11)
Expand All @@ -11,6 +12,36 @@
- [Upgrading To 4.1.26 From <= 4.1.25](#upgrade-4.1.26)
- [Upgrading To 4.1 From 4.0](#upgrade-4.1)

<a name="upgrade-5.4.0"></a>
## Upgrading To 5.4.0 From 5.3

#### Estimated Upgrade Time: 10 Minutes

### Authorization

#### Policy Class Determination

Policies may now be bound to an interface or parent class. When determining which policy to use for a given object, a policy bound to the object's exact

<div class="content-list" markdown="1">
- Each class has its own policy, as policies bound to exactly the given class will be found before looking for subtypes
- Or, bind your policy to the root of the inheritance tree
</div>

#### The `getPolicyFor` Method

Previous, when calling the `Gate::getPolicyFor($class)` method, an exception was thrown if no policy could be found. Now, the method will return `null` if no policy is found for the given class. If you call this method directly, make sure you refactor your `try / catch` to a check for `null`:

```php
$policy = Gate::getPolicyFor($class);

if ($policy) {
// code that was previously in the try block
} else {
// code that was previously in the catch block
}
```

<a name="upgrade-5.3.0"></a>
## Upgrading To 5.3.0 From 5.2

Expand Down

0 comments on commit 104bea8

Please sign in to comment.