Skip to content

Commit

Permalink
Updating from base repo (#4)
Browse files Browse the repository at this point in the history
*      catch errors as well (laravel#21047)

* return  from Validator::setCustomMessages (laravel#21046)

*       show exception class in JSON (laravel#21043)

* [5.5] Removed listener listensFor (laravel#21039)

* remove listensFor

* remove listensFor

* Specify lower case `column_name` (fixes laravel#20190) (laravel#21037)

* [5.5] Add policies method to Gate (laravel#21036)
  • Loading branch information
gonzahce authored Sep 6, 2017
1 parent 2d21801 commit 6b99b8b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
10 changes: 10 additions & 0 deletions src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,4 +532,14 @@ public function abilities()
{
return $this->abilities;
}

/**
* Get all of the defined policies.
*
* @return array
*/
public function policies()
{
return $this->policies;
}
}
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function compileTableExists()
*/
public function compileColumnListing()
{
return 'select column_name from information_schema.columns where table_schema = ? and table_name = ?';
return 'select column_name as `column_name` from information_schema.columns where table_schema = ? and table_name = ?';
}

/**
Expand Down
9 changes: 0 additions & 9 deletions src/Illuminate/Foundation/Console/stubs/listener-duck.stub
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ use Illuminate\Contracts\Queue\ShouldQueue;

class DummyClass
{
/**
* The events handled by the listener.
*
* @var array
*/
public static $listensFor = [
//
];

/**
* Create the event listener.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,7 @@ use Illuminate\Contracts\Queue\ShouldQueue;
class DummyClass implements ShouldQueue
{
use InteractsWithQueue;

/**
* The events handled by the listener.
*
* @var array
*/
public static $listensFor = [
//
];


/**
* Create the event listener.
*
Expand Down
4 changes: 3 additions & 1 deletion src/Illuminate/Foundation/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Illuminate\Foundation\Exceptions;

use Exception;
use Throwable;
use Whoops\Run as Whoops;
use Illuminate\Support\Arr;
use Psr\Log\LoggerInterface;
Expand Down Expand Up @@ -151,7 +152,7 @@ protected function context()
'userId' => Auth::id(),
'email' => Auth::user() ? Auth::user()->email : null,
]);
} catch (Exception $e) {
} catch (Throwable $e) {
return [];
}
}
Expand Down Expand Up @@ -445,6 +446,7 @@ protected function convertExceptionToArray(Exception $e)
{
return config('app.debug') ? [
'message' => $e->getMessage(),
'exception' => get_class($e),
'file' => $e->getFile(),
'line' => $e->getLine(),
'trace' => $e->getTrace(),
Expand Down
4 changes: 3 additions & 1 deletion src/Illuminate/Validation/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -942,11 +942,13 @@ public function addReplacer($rule, $replacer)
* Set the custom messages for the validator.
*
* @param array $messages
* @return void
* @return $this
*/
public function setCustomMessages(array $messages)
{
$this->customMessages = array_merge($this->customMessages, $messages);

return $this;
}

/**
Expand Down

0 comments on commit 6b99b8b

Please sign in to comment.