language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
laravel
framework
75e8cf11296c8754fc16ed118ef7aac7dbbdfcf9.json
Handle array keys with dots, fixes #14384 (#14388)
tests/Validation/ValidationValidatorTest.php
@@ -2425,6 +2425,23 @@ public function testValidateImplicitEachWithAsterisksForRequiredNonExistingKey() $this->assertFalse($v->passes()); } + public function testParsingArrayKeysWithDot() + { + $trans = $this->getRealTranslator(); + + $v = new Validator($trans, ['foo' => ['bar' => ''...
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Foundation/Http/FormRequest.php
@@ -156,7 +156,7 @@ public function response(array $errors) /** * Get the response for a forbidden operation. * - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response */ public function forbiddenResponse() {
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
@@ -125,8 +125,8 @@ protected function tokensMatch($request) * Add the CSRF token to the response cookies. * * @param \Illuminate\Http\Request $request - * @param \Illuminate\Http\Response $response - * @return \Illuminate\Http\Response + * @param \Symfony\Component\HttpFoundation\Res...
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Foundation/Validation/ValidatesRequests.php
@@ -96,7 +96,7 @@ protected function throwValidationException(Request $request, $validator) * * @param \Illuminate\Http\Request $request * @param array $errors - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response */ protected function buil...
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Http/Middleware/FrameGuard.php
@@ -11,7 +11,7 @@ class FrameGuard * * @param \Illuminate\Http\Request $request * @param \Closure $next - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response */ public function handle($request, Closure $next) {
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Http/ResponseTrait.php
@@ -30,13 +30,13 @@ public function content() * Set a header on the Response. * * @param string $key - * @param string $value + * @param array|string $values * @param bool $replace * @return $this */ - public function header($key, $value, $replace = true) + pu...
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Routing/Middleware/ThrottleRequests.php
@@ -69,7 +69,7 @@ protected function resolveRequestSignature($request) * * @param string $key * @param int $maxAttempts - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response */ protected function buildResponse($key, $maxAttempts) { @@ ...
true
Other
laravel
framework
9dabd7ffab9c45d7558d2fe88dbf740fcc85d43b.json
Fix PHPDoc blocks for responses (#14369)
src/Illuminate/Validation/ValidationException.php
@@ -16,15 +16,15 @@ class ValidationException extends Exception /** * The recommended response to send to the client. * - * @var \Illuminate\Http\Response|null + * @var \Symfony\Component\HttpFoundation\Response|null */ public $response; /** * Create a new exception inst...
true
Other
laravel
framework
d059f904aaacf9cf7486c7f8d8443aa07f084709.json
Remove un-needed method overwrites (#14372)
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
@@ -49,42 +49,6 @@ protected function whereDate(Builder $query, $where) return $this->wrap($where['column']).'::date '.$where['operator'].' '.$value; } - /** - * Compile a "where day" clause. - * - * @param \Illuminate\Database\Query\Builder $query - * @param array $where - * ...
false
Other
laravel
framework
0ca99db6739195971a76df6efd7dc5621698ed4e.json
Add support for testing eloquent model events
src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
@@ -4,6 +4,7 @@ use Mockery; use Exception; +use Illuminate\Database\Eloquent\Model; use Illuminate\Contracts\Notifications\Dispatcher as NotificationDispatcher; trait MocksApplicationServices @@ -15,6 +16,13 @@ trait MocksApplicationServices */ protected $firedEvents = []; + /** + * All of ...
true
Other
laravel
framework
0ca99db6739195971a76df6efd7dc5621698ed4e.json
Add support for testing eloquent model events
src/Illuminate/Foundation/Testing/TestCase.php
@@ -4,6 +4,7 @@ use Mockery; use PHPUnit_Framework_TestCase; +use Illuminate\Database\Eloquent\Model; abstract class TestCase extends PHPUnit_Framework_TestCase { @@ -83,6 +84,7 @@ protected function refreshApplication() putenv('APP_ENV=testing'); $this->app = $this->createApplication(); + ...
true
Other
laravel
framework
0ca99db6739195971a76df6efd7dc5621698ed4e.json
Add support for testing eloquent model events
tests/Foundation/FoundationExpectsModelEventsTest.php
@@ -0,0 +1,139 @@ +<?php + +use Illuminate\Events\Dispatcher; +use Mockery\MockInterface as Mock; +use Illuminate\Foundation\Application; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Foundation\Testing\TestCase; +use Illuminate\Database\Capsule\Manager as DB; +use Illuminate\Database\Eloquent\Model as Eloqu...
true
Other
laravel
framework
85249beed1e4512d71f7ae52474b9a59a80381d2.json
fix console bug, fix redirect response
src/Illuminate/Cache/Console/ClearCommand.php
@@ -50,7 +50,7 @@ public function __construct(CacheManager $cache) */ public function handle() { - $tags = (array) explode(',', $this->option('tags')); + $tags = array_filter(explode(',', $this->option('tags'))); $cache = $this->cache->store($store = $this->argument('store'));
true
Other
laravel
framework
85249beed1e4512d71f7ae52474b9a59a80381d2.json
fix console bug, fix redirect response
src/Illuminate/Http/RedirectResponse.php
@@ -72,15 +72,30 @@ public function withInput(array $input = null) { $input = $input ?: $this->request->input(); - $this->session->flashInput($data = array_filter($input, $callback = function (&$value) use (&$callback) { + $this->session->flashInput($this->removeFilesFromInput($input)); + ...
true
Other
laravel
framework
5ae802f5f2cc37506a68b29eae6b99f16e495d2c.json
Improve Filesystem sharedGet performance (#14319)
src/Illuminate/Filesystem/Filesystem.php
@@ -51,14 +51,16 @@ public function sharedGet($path) { $contents = ''; - $handle = fopen($path, 'r'); + $handle = fopen($path, 'rb'); if ($handle) { try { if (flock($handle, LOCK_SH)) { - while (! feof($handle)) { - ...
false
Other
laravel
framework
b68603797a57e89f6bd486129e9043503c960e6c.json
Use spread operators (#14348)
src/Illuminate/Auth/Access/Gate.php
@@ -118,7 +118,7 @@ protected function buildAbilityCallback($callback) return function () use ($callback) { list($class, $method) = explode('@', $callback); - return call_user_func_array([$this->resolvePolicy($class), $method], func_get_args()); + return $this->resolvePolic...
true
Other
laravel
framework
b68603797a57e89f6bd486129e9043503c960e6c.json
Use spread operators (#14348)
src/Illuminate/Auth/AuthManager.php
@@ -291,6 +291,6 @@ public function provider($name, Closure $callback) */ public function __call($method, $parameters) { - return call_user_func_array([$this->guard(), $method], $parameters); + return $this->guard()->{$method}(...$parameters); } }
true
Other
laravel
framework
b68603797a57e89f6bd486129e9043503c960e6c.json
Use spread operators (#14348)
src/Illuminate/Auth/Passwords/PasswordBroker.php
@@ -96,7 +96,7 @@ public function reset(array $credentials, Closure $callback) // Once we have called this callback, we will remove this token row from the // table and return the response from this callback so the user gets sent // to the destination given by the developers from the callback...
true
Other
laravel
framework
b68603797a57e89f6bd486129e9043503c960e6c.json
Use spread operators (#14348)
src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
@@ -138,6 +138,6 @@ public function setDefaultDriver($name) */ public function __call($method, $parameters) { - return call_user_func_array([$this->broker(), $method], $parameters); + return $this->broker()->{$method}(...$parameters); } }
true
Other
laravel
framework
a4d02365f63b3e99c1fb652218c4864de3d5ae41.json
remove some words
src/Illuminate/Foundation/Console/stubs/policy.stub
@@ -11,7 +11,7 @@ class DummyClass use HandlesAuthorization; /** - * Determine whether the given user can view dummyPluralModelName. + * Determine whether the user can view dummyPluralModelName. * * @param DummyRootNamespaceUser $user * @return mixed @@ -22,7 +22,7 @@ class Dummy...
false
Other
laravel
framework
8fe1ff6804330d92bae2c376eb8e18e9205c4ca3.json
Fix auth stub.
src/Illuminate/Auth/Console/MakeAuthCommand.php
@@ -60,7 +60,7 @@ public function fire() $this->info('Updated Routes File.'); file_put_contents( - app_path('Http/routes.php'), + base_path('routes/web.php'), file_get_contents(__DIR__.'/stubs/make/routes.stub'), FILE_APPEND ...
false
Other
laravel
framework
a4c39aa5f36f02604c64fdcced139b3f73612528.json
Add mode function
src/Illuminate/Support/Collection.php
@@ -111,6 +111,36 @@ public function median($key = null) return (new static([$start, $end]))->average(); } + /** + * Get the mode of a given key. + * + * @param null $key + * @return static|null + */ + public function mode($key = null) + { + $count = $this->count(); ...
true
Other
laravel
framework
a4c39aa5f36f02604c64fdcced139b3f73612528.json
Add mode function
tests/Support/SupportCollectionTest.php
@@ -1315,6 +1315,35 @@ public function testMedianOnEmptyCollectionReturnsNull() $collection = new Collection(); $this->assertNull($collection->median()); } + + public function testModeOnNullCollection() + { + $collection = new Collection(); + $this->assertNull($collection->mod...
true
Other
laravel
framework
e011ca3761653d8de194441d4f5e6f6a68f9fc08.json
Add median function
src/Illuminate/Support/Collection.php
@@ -80,6 +80,37 @@ public function average($key = null) return $this->avg($key); } + /** + * Get the median of a given key. + * + * @param null $key + * @return mixed|null + */ + public function median($key = null) + { + $count = $this->count(); + if ($count =...
true
Other
laravel
framework
e011ca3761653d8de194441d4f5e6f6a68f9fc08.json
Add median function
tests/Support/SupportCollectionTest.php
@@ -1282,6 +1282,39 @@ public function testPipe() return $collection->sum(); })); } + + public function testMedianValueWithArrayCollection() + { + $collection = new Collection([1, 2, 2, 4]); + + $this->assertEquals(2, $collection->median()); + } + + public function t...
true
Other
laravel
framework
87a982916a1d8b90fb5f4f1ef92944a3d1c3664d.json
change flash data key
src/Illuminate/Session/Store.php
@@ -298,11 +298,11 @@ protected function addBagDataToSession() */ public function ageFlashData() { - $this->forget($this->get('flash.old', [])); + $this->forget($this->get('_flash.old', [])); - $this->put('flash.old', $this->get('flash.new', [])); + $this->put('_flash.old',...
true
Other
laravel
framework
87a982916a1d8b90fb5f4f1ef92944a3d1c3664d.json
change flash data key
tests/Session/EncryptedSessionStoreTest.php
@@ -22,7 +22,7 @@ public function testSessionIsProperlyEncrypted() '_token' => $session->token(), 'foo' => 'bar', 'baz' => 'boom', - 'flash' => [ + '_flash' => [ 'new' => [], 'old' => ['baz'], ],
true
Other
laravel
framework
87a982916a1d8b90fb5f4f1ef92944a3d1c3664d.json
change flash data key
tests/Session/SessionStoreTest.php
@@ -108,7 +108,7 @@ public function testSessionIsProperlySaved() '_token' => $session->token(), 'foo' => 'bar', 'baz' => 'boom', - 'flash' => [ + '_flash' => [ 'new' => [], 'old' => ['baz'], ...
true
Other
laravel
framework
87c4e23d2d48d0a487432bb9a91e45b8de75dec9.json
Add a withCallback method.
src/Illuminate/Http/JsonResponse.php
@@ -27,6 +27,19 @@ public function __construct($data = null, $status = 200, $headers = [], $options parent::__construct($data, $status, $headers); } + /** + * Sets the JSONP callback. + * + * @param string|null $callback + * @return $this + * + * @throws \InvalidArgumentExce...
false
Other
laravel
framework
591adba3d00bdd2188a101870ce0acb76757f601.json
Add Eloquent is() method (#14281)
src/Illuminate/Database/Eloquent/Model.php
@@ -3037,6 +3037,17 @@ public function replicate(array $except = null) return $instance->setRelations($this->relations); } + /** + * Determine if the model matches the model passed in. + * + * @param \Illuminate\Database\Eloquent\Model $model + * @return bool + */ + public fu...
true
Other
laravel
framework
591adba3d00bdd2188a101870ce0acb76757f601.json
Add Eloquent is() method (#14281)
tests/Database/DatabaseEloquentModelTest.php
@@ -1349,6 +1349,31 @@ public function testScopesMethod() $this->assertSame($scopes, $model->scopesCalled); } + public function testIsWithTheSameModelInstance() + { + $firstInstance = new EloquentModelStub(['id' => 1]); + $secondInstance = new EloquentModelStub(['id' => 1]); + ...
true
Other
laravel
framework
1dc956d1674f264f7c8f06f33d1f06b601a04e58.json
allow dynamic arguments
src/Illuminate/Routing/Route.php
@@ -289,7 +289,7 @@ public function middleware($middleware = null) } if (is_string($middleware)) { - $middleware = [$middleware]; + $middleware = func_get_args(); } $this->action['middleware'] = array_merge(
false
Other
laravel
framework
e3fbfc1910b34532308c4203b8fc2cbe11100bd1.json
remove old email
src/Illuminate/Auth/Console/MakeAuthCommand.php
@@ -33,7 +33,6 @@ class MakeAuthCommand extends Command 'auth/register.stub' => 'auth/register.blade.php', 'auth/passwords/email.stub' => 'auth/passwords/email.blade.php', 'auth/passwords/reset.stub' => 'auth/passwords/reset.blade.php', - 'auth/emails/password.stub' => 'auth/emails/pas...
true
Other
laravel
framework
e3fbfc1910b34532308c4203b8fc2cbe11100bd1.json
remove old email
src/Illuminate/Auth/Console/stubs/make/views/auth/emails/password.stub
@@ -1 +0,0 @@ -Click here to reset your password: <a href="{{ $link = url('password/reset', $token).'?email='.urlencode($user->getEmailForPasswordReset()) }}"> {{ $link }} </a>
true
Other
laravel
framework
256382ffe4a7a84175cde5fe7ba10d2c6959ef59.json
remove font awesome icons
src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub
@@ -51,7 +51,7 @@ <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <button type="submit" class="btn btn-primary"> - <i class="fa fa-btn fa-sign-in"></i> Login + ...
true
Other
laravel
framework
256382ffe4a7a84175cde5fe7ba10d2c6959ef59.json
remove font awesome icons
src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/email.stub
@@ -34,7 +34,7 @@ <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <button type="submit" class="btn btn-primary"> - <i class="fa fa-btn fa-envelope"></i> Send Password Reset Link + ...
true
Other
laravel
framework
256382ffe4a7a84175cde5fe7ba10d2c6959ef59.json
remove font awesome icons
src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub
@@ -57,7 +57,7 @@ <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <button type="submit" class="btn btn-primary"> - <i class="fa fa-btn fa-refresh"></i> Reset Password + ...
true
Other
laravel
framework
256382ffe4a7a84175cde5fe7ba10d2c6959ef59.json
remove font awesome icons
src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub
@@ -69,7 +69,7 @@ <div class="form-group"> <div class="col-md-6 col-md-offset-4"> <button type="submit" class="btn btn-primary"> - <i class="fa fa-btn fa-user"></i> Register + ...
true
Other
laravel
framework
0b4f7985745702fc2e303765a056dd352a7b539c.json
add pipe function (#13899)
src/Illuminate/Support/Collection.php
@@ -604,6 +604,17 @@ public function forPage($page, $perPage) return $this->slice(($page - 1) * $perPage, $perPage); } + /** + * Pass the collection to the given callback and return the result. + * + * @param callable $callback + * @return mixed + */ + public function pipe(cal...
true
Other
laravel
framework
0b4f7985745702fc2e303765a056dd352a7b539c.json
add pipe function (#13899)
tests/Support/SupportCollectionTest.php
@@ -1273,6 +1273,15 @@ public function testRandomThrowsAnExceptionUsingAmountBiggerThanCollectionSize() $data = new Collection([1, 2, 3]); $data->random(4); } + + public function testPipe() + { + $collection = new Collection([1, 2, 3]); + + $this->assertEquals(6, $collection->...
true
Other
laravel
framework
d54500eb013d23ada07b563420e55e3712ef88ae.json
Fix MySQL multiple-table DELETE error (#14179) http://dev.mysql.com/doc/refman/5.7/en/delete.html "You cannot use ORDER BY or LIMIT in a multiple-table DELETE."
src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
@@ -111,14 +111,14 @@ public function compileDelete(Builder $query) $sql = trim("delete $table from {$table}{$joins} $where"); } else { $sql = trim("delete from $table $where"); - } - if (isset($query->orders)) { - $sql .= ' '.$this->compileOrders($query, $q...
true
Other
laravel
framework
d54500eb013d23ada07b563420e55e3712ef88ae.json
Fix MySQL multiple-table DELETE error (#14179) http://dev.mysql.com/doc/refman/5.7/en/delete.html "You cannot use ORDER BY or LIMIT in a multiple-table DELETE."
tests/Database/DatabaseQueryBuilderTest.php
@@ -1094,18 +1094,23 @@ public function testDeleteMethod() $builder->getConnection()->shouldReceive('delete')->once()->with('delete from "users" where "id" = ?', [1])->andReturn(1); $result = $builder->from('users')->delete(1); $this->assertEquals(1, $result); + + $builder = $this->get...
true
Other
laravel
framework
741f29d4693156192d7dee6f30670e989bdf8a9d.json
Make getConnectionName Overridable (#14194) Use function call in newFromBuilder instead of class variable to allow for override of getConnectionName function
src/Illuminate/Database/Eloquent/Model.php
@@ -521,7 +521,7 @@ public function newFromBuilder($attributes = [], $connection = null) $model->setRawAttributes((array) $attributes, true); - $model->setConnection($connection ?: $this->connection); + $model->setConnection($connection ?: $this->getConnectionName()); return $model...
false
Other
laravel
framework
68a4993372525cb154201ed02592e0086dc70877.json
Allow easy addition of custom drivers.
src/Illuminate/Notifications/ChannelManager.php
@@ -2,6 +2,7 @@ namespace Illuminate\Notifications; +use InvalidArgumentException; use Illuminate\Support\Manager; use Nexmo\Client as NexmoClient; use GuzzleHttp\Client as HttpClient; @@ -158,6 +159,27 @@ protected function createSlackDriver() return new Channels\SlackWebhookChannel(new HttpClient); ...
false
Other
laravel
framework
08cde109bfc94098fb79bc2b505de6497867c291.json
Fix method name.
tests/Notifications/NotificationSlackChannelTest.php
@@ -9,7 +9,7 @@ public function tearDown() Mockery::close(); } - public function testSmsIsSentViaNexmo() + public function testCorrectPayloadIsSentToSlack() { $notification = new Notification([ $notifiable = new NotificationSlackChannelTestNotifiable,
false
Other
laravel
framework
be61e3e3c86f69cb7713d3af54396c8ee2fa931f.json
Remove test code.
tests/Notifications/NotificationSlackChannelTest.php
@@ -26,10 +26,6 @@ public function testSmsIsSentViaNexmo() $http = Mockery::mock('GuzzleHttp\Client') ); - // $http->shouldReceive('post')->andReturnUsing(function (...$args) { - // dd($args); - // }); - $http->shouldReceive('post')->with('url', [ '...
false
Other
laravel
framework
8ef07aaab3b34bc804434e1dbf53c23f3382d877.json
Add another test.
tests/Notifications/NotificationChannelManagerTest.php
@@ -3,6 +3,7 @@ use Illuminate\Container\Container; use Illuminate\Notifications\Notification; use Illuminate\Notifications\ChannelManager; +use Illuminate\Contracts\Bus\Dispatcher as Bus; class NotificationChannelManagerTest extends PHPUnit_Framework_TestCase { @@ -32,6 +33,18 @@ public function testNotificatio...
false
Other
laravel
framework
8f5c8c4bd2513248133fb95d06c450b9cb4e5a59.json
Improve notification testability.
src/Illuminate/Contracts/Notifications/Factory.php
@@ -5,10 +5,12 @@ interface Factory { /** - * Create a new notification for the given notifiable entities. + * Dispatch the given notification instance to the given notifiable. * - * @param array $notifiables - * @return \Illuminate\Notifications\Notification + * @param mixed $notif...
true
Other
laravel
framework
8f5c8c4bd2513248133fb95d06c450b9cb4e5a59.json
Improve notification testability.
src/Illuminate/Foundation/Testing/Concerns/MocksApplicationServices.php
@@ -4,6 +4,7 @@ use Mockery; use Exception; +use Illuminate\Contracts\Notifications\Factory as NotificationFactory; trait MocksApplicationServices { @@ -21,6 +22,13 @@ trait MocksApplicationServices */ protected $dispatchedJobs = []; + /** + * All of the dispatched notifications. + * + ...
true
Other
laravel
framework
8f5c8c4bd2513248133fb95d06c450b9cb4e5a59.json
Improve notification testability.
src/Illuminate/Notifications/ChannelManager.php
@@ -4,6 +4,8 @@ use Illuminate\Support\Manager; use Nexmo\Client as NexmoClient; +use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Contracts\Bus\Dispatcher as Bus; use Nexmo\Client\Credentials\Basic as NexmoCredentials; use Illuminate\Contracts\Notifications\Factory as FactoryContract; @@ -27,6 +29,5...
true
Other
laravel
framework
8f5c8c4bd2513248133fb95d06c450b9cb4e5a59.json
Improve notification testability.
src/Illuminate/Notifications/RoutesNotifications.php
@@ -3,7 +3,7 @@ namespace Illuminate\Notifications; use Illuminate\Support\Str; -use Illuminate\Contracts\Queue\ShouldQueue; +use Illuminate\Contracts\Notifications\Factory as NotificationFactory; trait RoutesNotifications { @@ -15,19 +15,7 @@ trait RoutesNotifications */ public function notify($inst...
true
Other
laravel
framework
f50be03c8ea7cc9c675aa594fc9392fad1eb38e1.json
Replace actual view. Signed-off-by: crynobone <crynobone@gmail.com>
src/Illuminate/Notifications/Channels/MailChannel.php
@@ -55,7 +55,7 @@ public function send(Notification $notification) $view = data_get($notification, 'options.view', 'notifications::email'); - $this->mailer->send('notifications::email', $data, function ($m) use ($notification, $emails) { + $this->mailer->send($view, $data, function ($m) use (...
false
Other
laravel
framework
1a4c410edfe723ab7d873392eab165e37fd65e33.json
create factory modifiers
src/Illuminate/Database/Eloquent/Factory.php
@@ -33,6 +33,13 @@ public function __construct(Faker $faker) */ protected $definitions = []; + /** + * The model modifiers in the container. + * + * @var array + */ + protected $modifiers = []; + /** * Create a new factory container. * @@ -73,6 +80,19 @@ public functi...
true
Other
laravel
framework
1a4c410edfe723ab7d873392eab165e37fd65e33.json
create factory modifiers
src/Illuminate/Database/Eloquent/FactoryBuilder.php
@@ -15,6 +15,13 @@ class FactoryBuilder */ protected $definitions; + /** + * The model modifiers in the container. + * + * @var array + */ + protected $modifiers; + /** * The model being built. * @@ -36,6 +43,13 @@ class FactoryBuilder */ protected $amount ...
true
Other
laravel
framework
b0b042018c326982e6410852c7a757802f1bf650.json
add method to paginator
src/Illuminate/Pagination/Paginator.php
@@ -81,6 +81,18 @@ public function nextPageUrl() } } + /** + * Manually indicate that the paginator does have more pages. + * + * @return $this + */ + public function doesHaveMorePages() + { + $this->hasMore = true; + + return $this; + } + /** * Deter...
false
Other
laravel
framework
c12e8bfff9958e2c6c5f71737ec3d8600a40e26c.json
Remove optional parameters $true and $false
src/Illuminate/Support/MessageBag.php
@@ -110,38 +110,34 @@ public function has($key = null) * Determine if messages exist for all given keys. * * @param array $keys - * @param mixed $true - * @param mixed $false * @return bool */ - public function hasAll($keys = [], $true = true, $false = false) + public f...
false
Other
laravel
framework
a0142e9745f68e3853a26675a5580cb6e63152ac.json
Fix missing space after foreach
src/Illuminate/Support/MessageBag.php
@@ -116,7 +116,7 @@ public function has($key = null) */ public function hasAll($keys = [], $true = true, $false = false) { - foreach($keys as $key) { + foreach ($keys as $key) { if ($this->first($key) === '') { return $false; } @@ -135,7 +135,7 @@...
false
Other
laravel
framework
9074b557305da710435fe377df6e8c55919bf7ea.json
Add tests for hasAny and hasAll
tests/Support/SupportMessageBagTest.php
@@ -74,6 +74,30 @@ public function testHasIndicatesExistence() $this->assertFalse($container->has('bar')); } + public function testHasAnyIndicatesExistence() + { + $container = new MessageBag; + $container->setFormat(':message'); + $container->add('foo', 'bar'); + $cont...
false
Other
laravel
framework
7194f9c5ff6ea6b8f6e794a219ea5902d11f4411.json
Use File::link in storage:link command
src/Illuminate/Foundation/Console/StorageLinkCommand.php
@@ -31,7 +31,7 @@ public function fire() return $this->error('The "public/storage" directory already exists.'); } - symlink(storage_path('app/public'), public_path('storage')); + $this->laravel->make('files')->link(storage_path('app/public'), public_path('storage')); $th...
false
Other
laravel
framework
e742751f6bad291e0cf714528768e1f120314da2.json
Add tightenco/collect to replace section (#14118) Since tightenco/collect is just standalone illuminate collections from support, this replace should be added.
composer.json
@@ -68,7 +68,8 @@ "illuminate/support": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version" + "illuminate/view": "self.version", + "tightenco/collect": "self.version" }, "require-...
false
Other
laravel
framework
cc3c2366579710c01bbe3ed1caae27a7587c550d.json
Add missing @throws (#14107)
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -50,6 +50,7 @@ public function __construct(Container $container) * Report or log an exception. * * @param \Exception $e + * @throws \Exception $e * @return void */ public function report(Exception $e)
false
Other
laravel
framework
946edc91f77160c0d24d0278a142fbc9de84af01.json
Remove extra method (#14103)
src/Illuminate/Routing/ControllerDispatcher.php
@@ -15,19 +15,6 @@ class ControllerDispatcher * @return mixed */ public function dispatch(Route $route, $controller, $method) - { - return $this->call($route, $controller, $method); - } - - /** - * Call the given controller instance method. - * - * @param \Illuminate\Routin...
false
Other
laravel
framework
bb83eeb94759803685813daf7436b3013f6b767d.json
Remove duplicate call to prepareResponse
src/Illuminate/Routing/Router.php
@@ -592,9 +592,7 @@ public function dispatch(Request $request) { $this->currentRequest = $request; - $response = $this->dispatchToRoute($request); - - return $this->prepareResponse($request, $response); + return $this->dispatchToRoute($request); } /**
false
Other
laravel
framework
4e7d69f90e5bdf4e1336566a53b33ca48d85e1bb.json
add notifyVia method
src/Illuminate/Notifications/RoutesNotifications.php
@@ -30,6 +30,34 @@ public function notify($instance) } } + /** + * Send the given notification via the given channels. + * + * @param array|string $channels + * @param mixed $instance + * @return void + */ + public function notifyVia($channels, $instance) + { + ...
false
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Auth/Notifications/ResetPassword.php
@@ -0,0 +1,50 @@ +<?php + +namespace Illuminate\Auth\Notifications; + +use Illuminate\Notifications\Notification; + +class ResetPassword extends Notification +{ + /** + * The password reset token. + * + * @var string + */ + public $token; + + /** + * Create a notification instance. + * ...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Auth/Passwords/PasswordBroker.php
@@ -6,9 +6,9 @@ use Illuminate\Support\Arr; use UnexpectedValueException; use Illuminate\Contracts\Auth\UserProvider; -use Illuminate\Contracts\Mail\Mailer as MailerContract; use Illuminate\Contracts\Auth\PasswordBroker as PasswordBrokerContract; use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordCo...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Auth/Passwords/PasswordBrokerManager.php
@@ -69,9 +69,7 @@ protected function resolve($name) // aggregate service of sorts providing a convenient interface for resets. return new PasswordBroker( $this->createTokenRepository($config), - $this->app['auth']->createUserProvider($config['provider']), - $this->ap...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Contracts/Notifications/Factory.php
@@ -0,0 +1,14 @@ +<?php + +namespace Illuminate\Contracts\Notifications; + +interface Factory +{ + /** + * Create a new notification for the given notifiable entities. + * + * @param array $notifiables + * @return \Illuminate\Notifications\Notification + */ + public function to($notifiables)...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Foundation/Auth/ResetsPasswords.php
@@ -77,7 +77,7 @@ public function sendResetLinkEmail(Request $request) $response = Password::broker($broker)->sendResetLink( $this->getSendResetLinkEmailCredentials($request), - $this->resetEmailBuilder() + $this->resetNotifier() ); switch ($response) { ...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Notifications/ChannelManager.php
@@ -5,8 +5,9 @@ use Illuminate\Support\Manager; use Nexmo\Client as NexmoClient; use Nexmo\Client\Credentials\Basic as NexmoCredentials; +use Illuminate\Contracts\Notifications\Factory as FactoryContract; -class ChannelManager extends Manager +class ChannelManager extends Manager implements FactoryContract { ...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Notifications/Channels/Notification.php
@@ -251,7 +251,7 @@ public static function notificationsFromInstance($notifiable, $instance, $channe $method = static::messageMethod($instance, $channel); - foreach ($instance->{$method}()->elements as $element) { + foreach ($instance->{$method}($notifiable)->elements as $element)...
true
Other
laravel
framework
e23e05e9f949e0d21ad7d39f4e028e826e0328ef.json
convert password reminders to notifications
src/Illuminate/Notifications/NotificationServiceProvider.php
@@ -3,6 +3,7 @@ namespace Illuminate\Notifications; use Illuminate\Support\ServiceProvider; +use Illuminate\Contracts\Notifications\Factory as FactoryContract; class NotificationServiceProvider extends ServiceProvider { @@ -39,6 +40,10 @@ public function register() $this->app->singleton(ChannelManager:...
true
Other
laravel
framework
838a5bd3b85bcaebd1781e319faa53dc3c73689b.json
Fix scopes methods and add test (#14078)
src/Illuminate/Database/Eloquent/Builder.php
@@ -1158,7 +1158,7 @@ public function scopes(array $scopes) } $builder = $builder->callScope( - 'scope'.ucfirst($scope), (array) $parameters + [$this->model, 'scope'.ucfirst($scope)], (array) $parameters ); }
true
Other
laravel
framework
838a5bd3b85bcaebd1781e319faa53dc3c73689b.json
Fix scopes methods and add test (#14078)
tests/Database/DatabaseEloquentModelTest.php
@@ -2,6 +2,7 @@ use Mockery as m; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Relations\Relation; class DatabaseEloquentModelTest extends PHPUnit_Framework_TestCase @@ -1348,6 +1349,22 @@ public function testStringIdTypePreserved() ...
true
Other
laravel
framework
3c3de796070760abdab101d0d68d690438e75bbe.json
fix policy generator
src/Illuminate/Foundation/Console/PolicyMakeCommand.php
@@ -53,6 +53,16 @@ protected function buildClass($name) */ protected function replaceModel($stub, $model) { + $model = str_replace('/', '\\', $model); + + if (Str::startsWith($model, '\\')) { + $stub = str_replace('NamespacedDummyModel', trim($model, '\\'), $stub); + } el...
true
Other
laravel
framework
3c3de796070760abdab101d0d68d690438e75bbe.json
fix policy generator
src/Illuminate/Foundation/Console/stubs/policy.stub
@@ -3,7 +3,7 @@ namespace DummyNamespace; use DummyRootNamespaceUser; -use DummyRootNamespaceDummyModel; +use NamespacedDummyModel; use Illuminate\Auth\Access\HandlesAuthorization; class DummyClass
true
Other
laravel
framework
76a2f466aff6997f3381f888ba91f8d35ff4fc8f.json
Add full stubbing to policy generator (#13922)
src/Illuminate/Foundation/Console/PolicyMakeCommand.php
@@ -2,7 +2,9 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Support\Str; use Illuminate\Console\GeneratorCommand; +use Symfony\Component\Console\Input\InputOption; class PolicyMakeCommand extends GeneratorCommand { @@ -27,14 +29,49 @@ class PolicyMakeCommand extends GeneratorCommand */ ...
true
Other
laravel
framework
76a2f466aff6997f3381f888ba91f8d35ff4fc8f.json
Add full stubbing to policy generator (#13922)
src/Illuminate/Foundation/Console/stubs/policy.plain.stub
@@ -0,0 +1,21 @@ +<?php + +namespace DummyNamespace; + +use DummyRootNamespaceUser; +use Illuminate\Auth\Access\HandlesAuthorization; + +class DummyClass +{ + use HandlesAuthorization; + + /** + * Create a new policy instance. + * + * @return void + */ + public function __construct() + { + ...
true
Other
laravel
framework
76a2f466aff6997f3381f888ba91f8d35ff4fc8f.json
Add full stubbing to policy generator (#13922)
src/Illuminate/Foundation/Console/stubs/policy.stub
@@ -2,18 +2,79 @@ namespace DummyNamespace; +use DummyRootNamespaceUser; +use DummyRootNamespaceDummyModel; use Illuminate\Auth\Access\HandlesAuthorization; class DummyClass { use HandlesAuthorization; /** - * Create a new policy instance. + * Determine whether the given user can view dumm...
true
Other
laravel
framework
881c6582c58a3bcea69bf4f16e6f1c1539d94661.json
Fix two typos (#14055)
src/Illuminate/Database/Capsule/Manager.php
@@ -33,7 +33,7 @@ public function __construct(Container $container = null) // Once we have the container setup, we will setup the default configuration // options in the container "config" binding. This will make the database - // manager behave correctly since all the correct binding are in ...
false
Other
laravel
framework
093409654608daa7b28d7c30933bda6f92935014.json
remove unnecessary else (#14036)
src/Illuminate/Queue/Queue.php
@@ -73,7 +73,9 @@ protected function createPayload($job, $data = '', $queue = null) { if ($job instanceof Closure) { return json_encode($this->createClosurePayload($job, $data)); - } elseif (is_object($job)) { + } + + if (is_object($job)) { return json_encode...
false
Other
laravel
framework
5c4595a6727ab9f7b1a8993978a11cdf9de7aacc.json
change method to protected
src/Illuminate/Queue/Queue.php
@@ -222,7 +222,7 @@ public function setEncrypter(EncrypterContract $crypt) * * @throws EncryptException */ - public function getEncrypter() + protected function getEncrypter() { if (null === $this->crypt) { throw new EncryptException('No encrypter set for Queue');
false
Other
laravel
framework
c57765d206c68ef76465f54dd3fe0414f08b0e34.json
ensure encrypter exists
src/Illuminate/Queue/Queue.php
@@ -4,6 +4,7 @@ use Closure; use DateTime; +use Illuminate\Contracts\Encryption\EncryptException; use Illuminate\Support\Arr; use SuperClosure\Serializer; use Illuminate\Container\Container; @@ -19,6 +20,11 @@ abstract class Queue */ protected $container; + /** + * @var \Illuminate\Contracts\...
false
Other
laravel
framework
658d1dfb2af301f6c8b02dfd3b6b9dec6e5bee12.json
change comment wording
src/Illuminate/Foundation/Http/FormRequest.php
@@ -85,7 +85,7 @@ protected function getValidatorInstance() } /** - * Get validation data from request. + * Get data to be validated from the request. * * @return array */
false
Other
laravel
framework
acc0c963414c73c264029283cd143218cef63c35.json
Confirm Ajax request is not Pjax (#14024)
src/Illuminate/Foundation/Http/FormRequest.php
@@ -133,7 +133,7 @@ protected function failedAuthorization() */ public function response(array $errors) { - if ($this->ajax() || $this->wantsJson()) { + if (($this->ajax() && ! $this->pjax()) || $this->wantsJson()) { return new JsonResponse($errors, 422); }
false
Other
laravel
framework
997c74052c860a5e41e833a4079d4aeb5c48046d.json
resolve default driver in shouldUse
src/Illuminate/Auth/AuthManager.php
@@ -193,6 +193,8 @@ public function getDefaultDriver() */ public function shouldUse($name) { + $name = $name ?: $this->getDefaultDriver(); + $this->setDefaultDriver($name); $this->userResolver = function ($name = null) {
false
Other
laravel
framework
661bf1413a2fe5c613d4ca8121850d9b029001ff.json
put methods in alpha order... *cough* jeffrey
src/Illuminate/Foundation/helpers.php
@@ -191,6 +191,39 @@ function bcrypt($value, $options = []) } } +if (! function_exists('cache')) { + /** + * Get / set the specified cache value. + * + * If an array is passed, we'll assume you want to put to the cache. + * + * @param dynamic key|key,default|data,expiration|null + *...
false
Other
laravel
framework
f53291b2b6e2d3032b4254e83ca03708dae1ec26.json
Add cache global helper
src/Illuminate/Foundation/helpers.php
@@ -668,6 +668,39 @@ function session($key = null, $default = null) } } +if (! function_exists('cache')) { + /** + * Get / set the specified cache value. + * + * If an array is passed, we'll assume you want to put to the cache. + * + * @param dynamic key|key,default|data,expiration|null...
true
Other
laravel
framework
f53291b2b6e2d3032b4254e83ca03708dae1ec26.json
Add cache global helper
tests/Foundation/FoundationHelpersTest.php
@@ -0,0 +1,40 @@ +<?php + +use Mockery as m; +use Illuminate\Foundation\Application; + +class FoundationHelpersTest extends PHPUnit_Framework_TestCase +{ + public function tearDown() + { + m::close(); + } + + public function testCache() + { + $app = new Application; + $app['cache'] =...
true
Other
laravel
framework
daa49838d9557c526e28abd75f1825f8c05dd998.json
rewrite redis job to one json_decode()
src/Illuminate/Queue/Jobs/RedisJob.php
@@ -17,12 +17,19 @@ class RedisJob extends Job implements JobContract protected $redis; /** - * The Redis job payload. + * The Redis raw job payload. * * @var string */ protected $job; + /** + * The Redis decoded job payload. + * + * @var array + */ + p...
true
Other
laravel
framework
daa49838d9557c526e28abd75f1825f8c05dd998.json
rewrite redis job to one json_decode()
tests/Queue/RedisQueueIntegrationTest.php
@@ -77,7 +77,7 @@ public function testPopProperlyPopsJobOffOfRedis() $redisJob = $this->queue->pop(); $after = time(); - $this->assertEquals($job, unserialize(json_decode($redisJob->getRedisJob())->data->command)); + $this->assertEquals($job, unserialize(json_decode($redisJob->getRawBo...
true
Other
laravel
framework
0831312aec47d904a65039e07574f41ab7492418.json
Fix session expiration on several drivers.
src/Illuminate/Session/CookieSessionHandler.php
@@ -2,6 +2,7 @@ namespace Illuminate\Session; +use Carbon\Carbon; use SessionHandlerInterface; use Symfony\Component\HttpFoundation\Request; use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar; @@ -56,15 +57,26 @@ public function close() */ public function read($sessionId) { - re...
true
Other
laravel
framework
0831312aec47d904a65039e07574f41ab7492418.json
Fix session expiration on several drivers.
src/Illuminate/Session/DatabaseSessionHandler.php
@@ -2,6 +2,7 @@ namespace Illuminate\Session; +use Carbon\Carbon; use SessionHandlerInterface; use Illuminate\Database\ConnectionInterface; @@ -21,6 +22,13 @@ class DatabaseSessionHandler implements SessionHandlerInterface, ExistenceAwareI */ protected $table; + /** + * The number of minute...
true
Other
laravel
framework
0831312aec47d904a65039e07574f41ab7492418.json
Fix session expiration on several drivers.
src/Illuminate/Session/FileSessionHandler.php
@@ -2,6 +2,7 @@ namespace Illuminate\Session; +use Carbon\Carbon; use SessionHandlerInterface; use Symfony\Component\Finder\Finder; use Illuminate\Filesystem\Filesystem; @@ -22,17 +23,26 @@ class FileSessionHandler implements SessionHandlerInterface */ protected $path; + /** + * The number o...
true
Other
laravel
framework
0831312aec47d904a65039e07574f41ab7492418.json
Fix session expiration on several drivers.
src/Illuminate/Session/SessionManager.php
@@ -59,7 +59,9 @@ protected function createNativeDriver() { $path = $this->app['config']['session.files']; - return $this->buildSession(new FileSessionHandler($this->app['files'], $path)); + $lifetime = $this->app['config']['session.lifetime']; + + return $this->buildSession(new Fil...
true
Other
laravel
framework
453f504c449af9aa77b8b5a13fb065a7d7f06952.json
fix expiration on cookie sessions
src/Illuminate/Session/CookieSessionHandler.php
@@ -2,6 +2,7 @@ namespace Illuminate\Session; +use Carbon\Carbon; use SessionHandlerInterface; use Symfony\Component\HttpFoundation\Request; use Illuminate\Contracts\Cookie\QueueingFactory as CookieJar; @@ -56,15 +57,26 @@ public function close() */ public function read($sessionId) { - re...
false
Other
laravel
framework
0b8f550419baa95c32f5d0f3005023f1cd58a47c.json
add storage:link command.
src/Illuminate/Foundation/Console/StorageLinkCommand.php
@@ -0,0 +1,38 @@ +<?php + +namespace Illuminate\Foundation\Console; + +use Illuminate\Console\Command; + +class StorageLinkCommand extends Command +{ + /** + * The console command signature. + * + * @var string + */ + protected $signature = 'storage:link'; + + /** + * The console command de...
true
Other
laravel
framework
0b8f550419baa95c32f5d0f3005023f1cd58a47c.json
add storage:link command.
src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
@@ -24,6 +24,7 @@ use Illuminate\Foundation\Console\PolicyMakeCommand; use Illuminate\Foundation\Console\RouteCacheCommand; use Illuminate\Foundation\Console\RouteClearCommand; +use Illuminate\Foundation\Console\StorageLinkCommand; use Illuminate\Routing\Console\ControllerMakeCommand; use Illuminate\Routing\Consol...
true
Other
laravel
framework
bc656ad451d99a83432d02b165beb70da51e68c5.json
Add logo support to notification email. Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
src/Illuminate/Notifications/RoutesNotifications.php
@@ -21,7 +21,9 @@ public function notify($instance) ); foreach ($notifications as $notification) { - $manager->send($notification->application(config('app.name'))); + $manager->send($notification->application( + config('app.name'), config('app.logo') + ...
true
Other
laravel
framework
bc656ad451d99a83432d02b165beb70da51e68c5.json
Add logo support to notification email. Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
src/Illuminate/Notifications/TransportManager.php
@@ -17,7 +17,8 @@ class TransportManager extends Manager public function to($notifiables) { return (new Transports\Notification($this, $notifiables))->application( - $this->app['config']['app.name'] + $this->app['config']['app.name'], + $this->app['config']['app.logo'...
true