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
f3894d09f6ed1fea4e97f6c4e4b11e0b2fdbd8d9.json
Use packages file to cache package providers
tests/Foundation/fixtures/vendor/package_c/package_b/composer.json
@@ -1,8 +0,0 @@ -{ - "extra": { - "providers": [ - "bar", - "baz" - ] - } -}
true
Other
laravel
framework
92ffcb35f2e863984aff235f7d094f8b5ae1a3af.json
Apply fixes from StyleCI (#19398)
src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -102,7 +102,7 @@ public function get($path) */ public function put($path, $contents, $options = []) { - $options = is_string($options) + $options = is_string($options) ? ['visibility' => $options] : (array) $options;
false
Other
laravel
framework
1509e58ad15fc1a59b44d7804f29be00024e3eff.json
Return entire string if search is not found.
src/Illuminate/Support/Str.php
@@ -39,7 +39,7 @@ class Str public static function after($subject, $search) { if (! static::contains($subject, $search)) { - return ''; + return $subject; } $searchEndPos = strpos($subject, $search) + static::length($search);
true
Other
laravel
framework
1509e58ad15fc1a59b44d7804f29be00024e3eff.json
Return entire string if search is not found.
tests/Support/SupportHelpersTest.php
@@ -256,7 +256,7 @@ public function testStrAfter() { $this->assertEquals('nah', str_after('hannah', 'han')); $this->assertEquals('nah', str_after('hannah', 'n')); - $this->assertEmpty(str_after('hannah', 'xxxx')); + $this->assertEquals('hannah', str_after('hannah', 'xxxx')); } ...
true
Other
laravel
framework
1509e58ad15fc1a59b44d7804f29be00024e3eff.json
Return entire string if search is not found.
tests/Support/SupportStrTest.php
@@ -80,7 +80,7 @@ public function testStrAfter() { $this->assertEquals('nah', Str::after('hannah', 'han')); $this->assertEquals('nah', Str::after('hannah', 'n')); - $this->assertEmpty(Str::after('hannah', 'xxxx')); + $this->assertEquals('hannah', Str::after('hannah', 'xxxx')); ...
true
Other
laravel
framework
4c4810a4192d764cea26f150b49d2a1c828488dd.json
Return entire string if search is not found.
src/Illuminate/Support/Str.php
@@ -39,7 +39,7 @@ class Str public static function after($subject, $search) { if (! static::contains($subject, $search)) { - return ''; + return $subject; } $searchEndPos = strpos($subject, $search) + static::length($search);
true
Other
laravel
framework
4c4810a4192d764cea26f150b49d2a1c828488dd.json
Return entire string if search is not found.
tests/Support/SupportHelpersTest.php
@@ -256,7 +256,7 @@ public function testStrAfter() { $this->assertEquals('nah', str_after('hannah', 'han')); $this->assertEquals('nah', str_after('hannah', 'n')); - $this->assertEmpty(str_after('hannah', 'xxxx')); + $this->assertEquals('hannah', str_after('hannah', 'xxxx')); } ...
true
Other
laravel
framework
4c4810a4192d764cea26f150b49d2a1c828488dd.json
Return entire string if search is not found.
tests/Support/SupportStrTest.php
@@ -80,7 +80,7 @@ public function testStrAfter() { $this->assertEquals('nah', Str::after('hannah', 'han')); $this->assertEquals('nah', Str::after('hannah', 'n')); - $this->assertEmpty(Str::after('hannah', 'xxxx')); + $this->assertEquals('hannah', Str::after('hannah', 'xxxx')); ...
true
Other
laravel
framework
bec5df0410516ceb62d5d4acd7db6927dbdca675.json
Add hasAny() method to Request (#19367)
src/Illuminate/Http/Concerns/InteractsWithInput.php
@@ -91,6 +91,25 @@ public function has($key) return true; } + /** + * Determine if the request contains any of the given inputs. + * + * @param dynamic $key + * @return bool + */ + public function hasAny(...$keys) + { + $input = $this->all(); + + foreach ($ke...
true
Other
laravel
framework
bec5df0410516ceb62d5d4acd7db6927dbdca675.json
Add hasAny() method to Request (#19367)
tests/Http/HttpRequestTest.php
@@ -233,6 +233,25 @@ public function testHasMethod() $this->assertTrue($request->has('foo.baz')); } + public function testHasAnyMethod() + { + $request = Request::create('/', 'GET', ['name' => 'Taylor', 'age' => '', 'city' => null]); + $this->assertTrue($request->hasAny('name')); + ...
true
Other
laravel
framework
eee8c84f5d8be26d7acef2292a97ff391e2de320.json
Apply fixes from StyleCI (#19355)
tests/Integration/Notifications/SendingMailNotificationsTest.php
@@ -4,8 +4,8 @@ use Orchestra\Testbench\TestCase; use Illuminate\Contracts\Mail\Mailer; use Illuminate\Support\Facades\Schema; -use Illuminate\Database\Eloquent\Model; use Illuminate\Contracts\Mail\Mailable; +use Illuminate\Database\Eloquent\Model; use Illuminate\Notifications\Notifiable; use Illuminate\Notificat...
false
Other
laravel
framework
653dc3db32a09797797e788d879367f9de67d52d.json
Fix method description leftovers (#19348)
src/Illuminate/Validation/Factory.php
@@ -211,7 +211,7 @@ public function extendImplicit($rule, $extension, $message = null) } /** - * Register a custom implicit validator extension. + * Register a custom dependent validator extension. * * @param string $rule * @param \Closure|string $extension @@ -228,7 +228,7 @@...
false
Other
laravel
framework
0f5337f854ecdd722e7e289ff58cc252337e7a9d.json
specify method. rename conjoin
src/Illuminate/Support/Collection.php
@@ -181,23 +181,6 @@ public function collapse() return new static(Arr::collapse($this->items)); } - /** - * Conjoin all values of a collection with those of another, regardless of keys. - * - * @param \Traversable $source - * @return self - */ - public function conjoin($sourc...
true
Other
laravel
framework
0f5337f854ecdd722e7e289ff58cc252337e7a9d.json
specify method. rename conjoin
tests/Database/DatabaseEloquentHasOneTest.php
@@ -76,7 +76,7 @@ public function testHasOneWithArrayDefault() public function testMakeMethodDoesNotSaveNewModel() { $relation = $this->getRelation(); - $instance = $this->getMockBuilder('Illuminate\Database\Eloquent\Model')->setMethods(['newInstance', 'setAttribute'])->getMock(); + $in...
true
Other
laravel
framework
0f5337f854ecdd722e7e289ff58cc252337e7a9d.json
specify method. rename conjoin
tests/Support/SupportCollectionTest.php
@@ -1722,7 +1722,7 @@ public function testCombineWithCollection() $this->assertSame($expected, $actual); } - public function testConJoinWithArray() + public function testConcatWithArray() { $expected = [ 0 => 4, @@ -1740,14 +1740,14 @@ public function testConJoinWithArra...
true
Other
laravel
framework
85fed0e37227f4fe85c362e7535455e461d0757b.json
Resolve paginators from the container (#19328)
src/Illuminate/Database/Concerns/BuildsQueries.php
@@ -2,6 +2,10 @@ namespace Illuminate\Database\Concerns; +use Illuminate\Container\Container; +use Illuminate\Pagination\Paginator; +use Illuminate\Pagination\LengthAwarePaginator; + trait BuildsQueries { /** @@ -89,4 +93,38 @@ public function when($value, $callback, $default = null) return $this...
true
Other
laravel
framework
85fed0e37227f4fe85c362e7535455e461d0757b.json
Resolve paginators from the container (#19328)
src/Illuminate/Database/Eloquent/Builder.php
@@ -9,7 +9,6 @@ use Illuminate\Pagination\Paginator; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Database\Concerns\BuildsQueries; -use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Database\Eloquent\Relations\Relation; use Illuminate\Database\Query\Builder as QueryBuilder; @@ -691,7 +...
true
Other
laravel
framework
85fed0e37227f4fe85c362e7535455e461d0757b.json
Resolve paginators from the container (#19328)
src/Illuminate/Database/Query/Builder.php
@@ -15,7 +15,6 @@ use Illuminate\Database\ConnectionInterface; use Illuminate\Database\Concerns\BuildsQueries; use Illuminate\Database\Query\Grammars\Grammar; -use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Database\Query\Processors\Processor; class Builder @@ -1729,7 +1728,7 @@ public function p...
true
Other
laravel
framework
ccb64d163da0af16774e710b5218b0846d0b8e4a.json
Ignore jetbrains IDE folder (#19323)
.gitignore
@@ -4,4 +4,5 @@ composer.lock .php_cs.cache .DS_Store Thumbs.db -/phpunit.xml \ No newline at end of file +/phpunit.xml +/.idea
false
Other
laravel
framework
5b6ba5acb3961b809148fca234f0285d4cb22891.json
Add new `conJoin()` method to collection
src/Illuminate/Support/Collection.php
@@ -181,6 +181,21 @@ public function collapse() return new static(Arr::collapse($this->items)); } + /** + * Conjoin all values of a collection with those of another, regardless of keys. + * + * @param \Traversable $source + * @return self + */ + public function conJoin($sourc...
true
Other
laravel
framework
5b6ba5acb3961b809148fca234f0285d4cb22891.json
Add new `conJoin()` method to collection
tests/Support/SupportCollectionTest.php
@@ -1722,6 +1722,41 @@ public function testCombineWithCollection() $this->assertSame($expected, $actual); } + public function testConJoinWithArray() + { + $expected = [ + 0 => 4, + 1 => 5, + 2 => 6, + 3 => 'a', + 4 => 'b', + ...
true
Other
laravel
framework
9abdb287ba4a577c53fe8fccdf2305ce45fbdb81.json
Apply fixes from StyleCI (#19305)
src/Illuminate/Support/Collection.php
@@ -659,7 +659,7 @@ public function intersect($items) } /** - * Intersect the collection with the given items by key + * Intersect the collection with the given items by key. * * @param mixed $items * @return static
false
Other
laravel
framework
4fc0ea5389424876bdbd858bbb3df97e9adc0b28.json
add intersect by keys method to collections
src/Illuminate/Support/Collection.php
@@ -658,6 +658,17 @@ public function intersect($items) return new static(array_intersect($this->items, $this->getArrayableItems($items))); } + /** + * Intersect the collection with the given items by key + * + * @param mixed $items + * @return static + */ + public function i...
true
Other
laravel
framework
4fc0ea5389424876bdbd858bbb3df97e9adc0b28.json
add intersect by keys method to collections
tests/Support/SupportCollectionTest.php
@@ -570,6 +570,18 @@ public function testIntersectCollection() $this->assertEquals(['first_word' => 'Hello'], $c->intersect(new Collection(['first_world' => 'Hello', 'last_word' => 'World']))->all()); } + public function testIntersectByKeysNull() + { + $c = new Collection(['name' => 'Mateus...
true
Other
laravel
framework
3429b61dbed141e8b22542f4babd26372a52dee0.json
add assertViewIs() to TestResponse (#19291)
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -405,6 +405,21 @@ public function json() return $this->decodeResponseJson(); } + /** + * Assert that the response view equals the given value. + * + * @param string $value + * @return $this + */ + public function assertViewIs($value) + { + $this->ensureResponseHas...
true
Other
laravel
framework
3429b61dbed141e8b22542f4babd26372a52dee0.json
add assertViewIs() to TestResponse (#19291)
tests/Foundation/FoundationTestResponseTest.php
@@ -12,6 +12,21 @@ class FoundationTestResponseTest extends TestCase { + public function testAssertViewIs() + { + $baseResponse = tap(new Response, function ($response) { + $response->setContent(\Mockery::mock(View::class, [ + 'render' => 'hello world', + 'getDa...
true
Other
laravel
framework
88ecd387f62bd8a083ec1998d39d9b5d881e2b35.json
Use blade comments (#19289)
src/Illuminate/Notifications/resources/views/email.blade.php
@@ -41,14 +41,14 @@ @endforeach -<!-- Salutation --> +{{-- Salutation --}} @if (! empty($salutation)) {{ $salutation }} @else Regards,<br>{{ config('app.name') }} @endif -<!-- Subcopy --> +{{-- Subcopy --}} @isset($actionText) @component('mail::subcopy') If you’re having trouble clicking the "{{ $actionT...
false
Other
laravel
framework
650f74cf5e5c0e3b1d85ce3315eb0496bc2560a1.json
Fix Timeoutless Job (#19266)
src/Illuminate/Queue/Worker.php
@@ -131,15 +131,17 @@ public function daemon($connectionName, $queue, WorkerOptions $options) */ protected function registerTimeoutHandler($job, WorkerOptions $options) { - if ($options->timeout > 0 && $this->supportsAsyncSignals()) { + $timeout = $this->timeoutForJob($job, $options); + + ...
false
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseEloquentBelongsToManyTest.php
@@ -357,7 +357,7 @@ public function testFindManyMethod() $result = $relation->findMany(['foo', 'bar']); - $this->assertEquals(2, count($result)); + $this->assertCount(2, $result); $this->assertInstanceOf(StdClass::class, $result->first()); }
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseEloquentIntegrationTest.php
@@ -479,7 +479,7 @@ public function testHasOnSelfReferencingBelongsToManyRelationship() $results = EloquentTestUser::has('friends')->get(); - $this->assertEquals(1, count($results)); + $this->assertCount(1, $results); $this->assertEquals('taylorotwell@gmail.com', $results->first()->e...
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseEloquentModelTest.php
@@ -617,7 +617,7 @@ public function testPushManyRelation() $this->assertTrue($model->push()); $this->assertEquals(1, $model->id); $this->assertTrue($model->exists); - $this->assertEquals(2, count($model->relationMany)); + $this->assertCount(2, $model->relationMany); $th...
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php
@@ -395,34 +395,34 @@ public function testWhereHasWithDeletedRelationship() $post = $abigail->posts()->create(['title' => 'First Title']); $users = SoftDeletesTestUser::where('email', 'taylorotwell@gmail.com')->has('posts')->get(); - $this->assertEquals(0, count($users)); + $this->asse...
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseMySqlSchemaGrammarTest.php
@@ -27,7 +27,7 @@ public function testBasicCreateTable() $statements = $blueprint->toSql($conn, $this->getGrammar()); - $this->assertEquals(1, count($statements)); + $this->assertCount(1, $statements); $this->assertEquals('create table `users` (`id` int unsigned not null auto_increme...
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabasePostgresSchemaGrammarTest.php
@@ -21,15 +21,15 @@ public function testBasicCreateTable() $blueprint->string('email'); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); - $this->assertEquals(1, count($statements)); + $this->assertCount(1, $statements); $this->assertEquals('create...
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseSQLiteSchemaGrammarTest.php
@@ -21,15 +21,15 @@ public function testBasicCreateTable() $blueprint->string('email'); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); - $this->assertEquals(1, count($statements)); + $this->assertCount(1, $statements); $this->assertEquals('create...
true
Other
laravel
framework
872be61fb64b5d63da92134b216cdf36657e860f.json
Use assertCount assertion (#19284)
tests/Database/DatabaseSqlServerSchemaGrammarTest.php
@@ -21,15 +21,15 @@ public function testBasicCreateTable() $blueprint->string('email'); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); - $this->assertEquals(1, count($statements)); + $this->assertCount(1, $statements); $this->assertEquals('create...
true
Other
laravel
framework
f09fa862dc5b1ff37fc856782141e543962ebf8e.json
Add brackets again, no passing tests without it
src/Illuminate/Http/Request.php
@@ -199,7 +199,7 @@ public function is() */ public function routeIs() { - if (! $route = $this->route() || ! $routeName = $route->getName()) { + if (! ($route = $this->route()) || ! $routeName = $route->getName()) { return false; }
false
Other
laravel
framework
57a6c06ade7bc329316c44c3938888936018a5bb.json
Remove extra brackets
src/Illuminate/Http/Request.php
@@ -199,7 +199,7 @@ public function is() */ public function routeIs() { - if ((! $route = $this->route()) || ! $routeName = $route->getName()) { + if (! $route = $this->route() || ! $routeName = $route->getName()) { return false; }
false
Other
laravel
framework
315f43b55c3f9cb7f33e0b421493b519e117fc8b.json
Add patterns to routeIs method
src/Illuminate/Http/Request.php
@@ -193,14 +193,23 @@ public function is() } /** - * Check if the route name matches the given string. + * Determine if the route name matches a pattern. * - * @param string $name * @return bool */ - public function routeIs($name) + public function routeIs() { - ...
true
Other
laravel
framework
315f43b55c3f9cb7f33e0b421493b519e117fc8b.json
Add patterns to routeIs method
tests/Http/HttpRequestTest.php
@@ -169,6 +169,7 @@ public function testRouteIsMethod() }); $this->assertTrue($request->routeIs('foo.bar')); + $this->assertTrue($request->routeIs('foo*', '*bar')); $this->assertFalse($request->routeIs('foo.foo')); }
true
Other
laravel
framework
b880ad19282db768718cfd1629ebbc41054daadc.json
keep chain going on explicit delete. add tests.
src/Illuminate/Queue/CallQueuedHandler.php
@@ -42,9 +42,11 @@ public function call(Job $job, array $data) $command, $handler = $this->resolveHandler($job, $command) ); - if (! $job->isDeletedOrReleased()) { - $this->ensureNextJobIsChainIsDispatched($command); + if (! $job->hasFailed() && ! $job->isReleased()) { +...
true
Other
laravel
framework
b880ad19282db768718cfd1629ebbc41054daadc.json
keep chain going on explicit delete. add tests.
tests/Integration/Queue/JobChainingTest.php
@@ -29,6 +29,16 @@ public function test_jobs_can_be_chained_on_success() $this->assertTrue(JobChainingTestSecondJob::$ran); } + public function test_jobs_chained_on_explicit_delete() + { + JobChainingTestDeletingJob::dispatch()->chain([ + new JobChainingTestSecondJob, + ])...
true
Other
laravel
framework
bba04a1598c44a892e918c4f308407b0d297f217.json
fix formattting and make getter
src/Illuminate/Routing/Route.php
@@ -523,27 +523,31 @@ public function secure() } /** - * Get the domain defined for the route. + * Get or set the domain for the route. * - * @return string|null + * @param string|null $domain + * @return $this */ - public function getDomain() + public function domain...
false
Other
laravel
framework
72ef859df410d685101c8389eebb0cb8940ebbcd.json
add another test
tests/Integration/Queue/JobChainingTest.php
@@ -69,6 +69,17 @@ public function test_second_job_is_not_fired_if_first_was_already_deleted() $this->assertFalse(JobChainingTestSecondJob::$ran); } + + public function test_third_job_is_not_fired_if_second_fails() + { + Queue::connection('sync')->push((new JobChainingTestFirstJob)->chain([...
false
Other
laravel
framework
434245f73e694f90476437da8554b58d54ced25c.json
fix bug with chaining
src/Illuminate/Bus/Queueable.php
@@ -94,7 +94,9 @@ public function chain($chain) public function dispatchNextJobInChain() { if (! empty($this->chained)) { - dispatch(unserialize(array_shift($this->chained))->chain($this->chained)); + dispatch(tap(unserialize(array_shift($this->chained)), function ($next) { + ...
true
Other
laravel
framework
434245f73e694f90476437da8554b58d54ced25c.json
fix bug with chaining
tests/Integration/Queue/JobChainingTest.php
@@ -16,6 +16,7 @@ public function tearDown() { JobChainingTestFirstJob::$ran = false; JobChainingTestSecondJob::$ran = false; + JobChainingTestThirdJob::$ran = false; } public function test_jobs_can_be_chained_on_success() @@ -28,6 +29,18 @@ public function test_jobs_can_be_cha...
true
Other
laravel
framework
4eb16f030d00f34d5086aac4a6f42d00f035b5e5.json
Create a new "crossJoin" method (#19236)
src/Illuminate/Support/Arr.php
@@ -60,6 +60,23 @@ public static function collapse($array) return $results; } + /** + * Cross join the given arrays, returning all possible permutations. + * + * @param array ...$arrays + * @return array + */ + public static function crossJoin(...$arrays) + { + retu...
true
Other
laravel
framework
4eb16f030d00f34d5086aac4a6f42d00f035b5e5.json
Create a new "crossJoin" method (#19236)
src/Illuminate/Support/Collection.php
@@ -226,6 +226,19 @@ public function containsStrict($key, $value = null) return in_array($key, $this->items, true); } + /** + * Cross join with the given lists, returning all possible permutations. + * + * @param mixed ...$lists + * @return static + */ + public function cross...
true
Other
laravel
framework
4eb16f030d00f34d5086aac4a6f42d00f035b5e5.json
Create a new "crossJoin" method (#19236)
tests/Support/SupportArrTest.php
@@ -35,6 +35,41 @@ public function testCollapse() $this->assertEquals(['foo', 'bar', 'baz'], Arr::collapse($data)); } + public function testCrossJoin() + { + // Single dimension + $this->assertEquals( + [[1, 'a'], [1, 'b'], [1, 'c']], + Arr::crossJoin([1], ['a',...
true
Other
laravel
framework
4eb16f030d00f34d5086aac4a6f42d00f035b5e5.json
Create a new "crossJoin" method (#19236)
tests/Support/SupportCollectionTest.php
@@ -665,6 +665,35 @@ public function testCollapseWithNestedCollactions() $this->assertEquals([1, 2, 3, 4, 5, 6], $data->collapse()->all()); } + public function testCrossJoin() + { + // Cross join with an array + $this->assertEquals( + [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b'...
true
Other
laravel
framework
f4a509a38edbbe6908685ee22e06b9d2159fb3f5.json
Use Str:: class. (#19221)
src/Illuminate/Console/GeneratorCommand.php
@@ -123,7 +123,7 @@ protected function alreadyExists($rawName) */ protected function getPath($name) { - $name = str_replace_first($this->rootNamespace(), '', $name); + $name = Str::replaceFirst($this->rootNamespace(), '', $name); return $this->laravel['path'].'/'.str_replace('\\...
true
Other
laravel
framework
f4a509a38edbbe6908685ee22e06b9d2159fb3f5.json
Use Str:: class. (#19221)
src/Illuminate/Routing/ImplicitRouteBinding.php
@@ -2,6 +2,7 @@ namespace Illuminate\Routing; +use Illuminate\Support\Str; use Illuminate\Database\Eloquent\Model; class ImplicitRouteBinding @@ -49,9 +50,7 @@ protected static function getParameterName($name, $parameters) return $name; } - $snakedName = snake_case($name); - - ...
true
Other
laravel
framework
f4a509a38edbbe6908685ee22e06b9d2159fb3f5.json
Use Str:: class. (#19221)
tests/Database/DatabaseMigratorIntegrationTest.php
@@ -2,6 +2,7 @@ namespace Illuminate\Tests\Database; +use Illuminate\Support\Str; use PHPUnit\Framework\TestCase; use Illuminate\Filesystem\Filesystem; use Illuminate\Database\Migrations\Migrator; @@ -56,8 +57,8 @@ public function testBasicMigrationOfSingleFolder() $this->assertTrue($this->db->schema()...
true
Other
laravel
framework
f4a509a38edbbe6908685ee22e06b9d2159fb3f5.json
Use Str:: class. (#19221)
tests/Mail/MailSesTransportTest.php
@@ -3,6 +3,7 @@ namespace Illuminate\Tests\Mail; use Aws\Ses\SesClient; +use Illuminate\Support\Str; use PHPUnit\Framework\TestCase; use Illuminate\Support\Collection; use Illuminate\Mail\TransportManager; @@ -50,7 +51,7 @@ public function testSend() // Generate a messageId for our mock to return to e...
true
Other
laravel
framework
f4a509a38edbbe6908685ee22e06b9d2159fb3f5.json
Use Str:: class. (#19221)
tests/Routing/RoutingRouteTest.php
@@ -3,6 +3,7 @@ namespace Illuminate\Tests\Routing; use stdClass; +use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Routing\Route; use UnexpectedValueException; @@ -408,37 +409,37 @@ public function testControllerCallActionMethodParameters() // Has one argument but receives two ...
true
Other
laravel
framework
f4a509a38edbbe6908685ee22e06b9d2159fb3f5.json
Use Str:: class. (#19221)
tests/Support/SupportHelpersTest.php
@@ -290,11 +290,11 @@ public function testStrLimit() public function testCamelCase() { - $this->assertEquals('fooBar', camel_case('FooBar')); - $this->assertEquals('fooBar', camel_case('foo_bar')); - $this->assertEquals('fooBar', camel_case('foo_bar')); // test cache - $this->ass...
true
Other
laravel
framework
bdf5e28af01cd974bce37e73bcbf8c0244373e2c.json
use ruby coc
CODE_OF_CONDUCT.md
@@ -1,74 +1,9 @@ -# Contributor Covenant Code of Conduct +The Laravel code of conduct is derived from the Ruby code of conduct. Any violations of the code of conduct may be reported to Taylor Otwell (taylor@laravel.com). -## Our Pledge +- Participants will be tolerant of opposing views. -In the interest of fosterin...
false
Other
laravel
framework
8a66ecab0c45700140fffe26640bcc03119e34c6.json
Add link to COC in Readme.md
README.md
@@ -32,6 +32,10 @@ If you're not in the mood to read, [Laracasts](https://laracasts.com) contains o Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). +## Code of Conduct + +In order to ensure t...
false
Other
laravel
framework
0fd48de10a7d6b9c35d9710fffa1d52166d96862.json
Add Contributor Covenant Code of Conduct.
CODE_OF_CONDUCT.md
@@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disa...
false
Other
laravel
framework
d36101c68f43e22fbe69e61eb2d9b68d9d698d15.json
Add a PasswordReset event. (#19188)
src/Illuminate/Auth/Events/PasswordReset.php
@@ -0,0 +1,28 @@ +<?php + +namespace Illuminate\Auth\Events; + +use Illuminate\Queue\SerializesModels; + +class PasswordReset +{ + use SerializesModels; + + /** + * The user. + * + * @var \Illuminate\Contracts\Auth\Authenticatable + */ + public $user; + + /** + * Create a new event insta...
true
Other
laravel
framework
d36101c68f43e22fbe69e61eb2d9b68d9d698d15.json
Add a PasswordReset event. (#19188)
src/Illuminate/Foundation/Auth/ResetsPasswords.php
@@ -6,6 +6,7 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Password; +use Illuminate\Auth\Events\PasswordReset; trait ResetsPasswords { @@ -106,6 +107,8 @@ protected function resetPassword($user, $password) $user->save(); + event(new Passw...
true
Other
laravel
framework
dbc13686fcdcab624dcef057c455ab37e1258990.json
Fix typo in pagination (#19205)
src/Illuminate/Pagination/AbstractPaginator.php
@@ -60,7 +60,7 @@ abstract class AbstractPaginator implements Htmlable protected $pageName = 'page'; /** - * The current page resolver callback. + * The current path resolver callback. * * @var \Closure */
false
Other
laravel
framework
4287ebc76025cd31e0ba6730481a95aeb471e305.json
add method for easier error bag checking
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -550,6 +550,19 @@ public function assertSessionHasErrors($keys = [], $format = null, $errorBag = ' return $this; } + /** + * Assert that the session has the given errors. + * + * @param string $errorBag + * @param string|array $keys + * @param mixed $format + * @retur...
false
Other
laravel
framework
f7fa463291a72f69aba8c03123078fddd5d039d1.json
add `abilities` method to Gate contract (#19173)
src/Illuminate/Contracts/Auth/Access/Gate.php
@@ -101,4 +101,11 @@ public function getPolicyFor($class); * @return static */ public function forUser($user); + + /** + * Get all of the defined abilities. + * + * @return array + */ + public function abilities(); }
false
Other
laravel
framework
b787ac38e70b33e567bd82dd8c086f203141f89d.json
Apply fixes from StyleCI (#19170)
src/Illuminate/Routing/Controller.php
@@ -3,7 +3,6 @@ namespace Illuminate\Routing; use BadMethodCallException; -use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; abstract class Controller {
false
Other
laravel
framework
bf5d221037d9857a74020f2623839e282035a420.json
remove old missingMethod action
src/Illuminate/Routing/Controller.php
@@ -55,19 +55,6 @@ public function callAction($method, $parameters) return call_user_func_array([$this, $method], $parameters); } - /** - * Handle calls to missing methods on the controller. - * - * @param array $parameters - * @return mixed - * - * @throws \Symfony\Compone...
false
Other
laravel
framework
0b934bc68237a208534d1480cdb268f53ef99c42.json
fix container build and add tests
src/Illuminate/Container/Container.php
@@ -715,7 +715,7 @@ public function build($concrete) // hand back the results of the functions, which allows functions to be // used as resolvers for more fine-tuned resolution of these objects. if ($concrete instanceof Closure) { - return $concrete($this, end($this->with)); + ...
true
Other
laravel
framework
0b934bc68237a208534d1480cdb268f53ef99c42.json
fix container build and add tests
tests/Container/ContainerTest.php
@@ -838,6 +838,19 @@ public function testSingletonBindingsNotRespectedWithMakeParameters() $this->assertEquals(['name' => 'taylor'], $container->makeWith('foo', ['name' => 'taylor'])); $this->assertEquals(['name' => 'abigail'], $container->makeWith('foo', ['name' => 'abigail'])); } + + public ...
true
Other
laravel
framework
418137f61e5a57d122145c301224564f7f5a4727.json
Send optional fields to unfurl links and media
src/Illuminate/Notifications/Channels/SlackWebhookChannel.php
@@ -59,6 +59,8 @@ protected function buildJsonPayload(SlackMessage $message) 'icon_emoji' => data_get($message, 'icon'), 'icon_url' => data_get($message, 'image'), 'link_names' => data_get($message, 'linkNames'), + 'unfurl_links' => data_get($message, 'unfurlLinks'), + ...
false
Other
laravel
framework
d923504dc66a3f88759cab2023abfaf715596d28.json
Add methods to change unfurl options
src/Illuminate/Notifications/Messages/SlackMessage.php
@@ -55,6 +55,20 @@ class SlackMessage */ public $linkNames = 0; + /** + * Indicates if you want a preview of links inlined in the message. + * + * @var bool + */ + public $unfurlLinks = true; + + /** + * Indicates if you want a preview of links to media inlined in the message. ...
false
Other
laravel
framework
8f1a966925e28cf32274727013c7efa72868c96a.json
Move empty key detection above starts_with check
src/Illuminate/Encryption/EncryptionServiceProvider.php
@@ -18,19 +18,21 @@ public function register() $this->app->singleton('encrypter', function ($app) { $config = $app->make('config')->get('app'); - // If the key starts with "base64:", we will need to decode the key before handing - // it off to the encrypter. Keys may be bas...
false
Other
laravel
framework
3a4fdd041c226c0299f0de8047d23ac3d1fbe675.json
Add better error message for missing app key
src/Illuminate/Encryption/EncryptionServiceProvider.php
@@ -2,6 +2,7 @@ namespace Illuminate\Encryption; +use RuntimeException; use Illuminate\Support\Str; use Illuminate\Support\ServiceProvider; @@ -24,6 +25,12 @@ public function register() $key = base64_decode(substr($key, 7)); } + if (is_null($key) || $key === '') { + ...
false
Other
laravel
framework
452d7e0afb5740d204b6e078a24a14fb7270c4f3.json
Update FilesystemAdapter.php (#19131) putFile-method accepts both \Illuminate\Http\File and \Illuminate\Http\UploadedFile
src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -123,7 +123,7 @@ public function put($path, $contents, $options = []) * Store the uploaded file on the disk. * * @param string $path - * @param \Illuminate\Http\UploadedFile $file + * @param \Illuminate\Http\File|\Illuminate\Http\UploadedFile $file * @param array $options ...
false
Other
laravel
framework
79c28d6aaedda60b8ecf69ca71763f4239c4b789.json
add tests for default and custom resource gates
tests/Auth/AuthAccessGateTest.php
@@ -35,6 +35,35 @@ public function test_basic_closures_can_be_defined() $this->assertFalse($gate->check('bar')); } + public function test_resource_gates_can_be_defined() + { + $gate = $this->getBasicGate(); + + $gate->resource('test', AccessGateTestResource::class); + + $dummy...
false
Other
laravel
framework
a6ff272c54677a9f52718292fc0938ffb1871832.json
make request helper and __get consistent
src/Illuminate/Foundation/helpers.php
@@ -695,7 +695,9 @@ function request($key = null, $default = null) return app('request')->only($key); } - return data_get(app('request')->all(), $key, $default); + $value = app('request')->__get($key); + + return is_null($value) ? value($default) : $value; } }
true
Other
laravel
framework
a6ff272c54677a9f52718292fc0938ffb1871832.json
make request helper and __get consistent
src/Illuminate/Http/Request.php
@@ -530,7 +530,9 @@ public function toArray() */ public function offsetExists($offset) { - return array_key_exists($offset, $this->all()); + return array_key_exists( + $offset, $this->all() + $this->route()->parameters() + ); } /** @@ -541,7 +543,7 @@ public f...
true
Other
laravel
framework
a6ff272c54677a9f52718292fc0938ffb1871832.json
make request helper and __get consistent
tests/Http/HttpRequestTest.php
@@ -693,8 +693,8 @@ public function testMagicMethods() // Parameter 'empty' is '', then it ISSET and is EMPTY. $this->assertEquals($request->empty, ''); - $this->assertEquals(isset($request->empty), true); - $this->assertEquals(empty($request->empty), true); + $this->assertTrue(...
true
Other
laravel
framework
0eb361727446990d437d538c6a908574a4019fe7.json
prevent policies from being too greedy - return `false` on `resolvePolicyCallback` if the ability/method is not callable - if no policy callback is found, allow the gate to try and resolve the ability before defaulting to `false`. - add test to make sure policies defer to the gate if method does not exist on policy - ...
src/Illuminate/Auth/Access/Gate.php
@@ -332,7 +332,9 @@ protected function resolveAuthCallback($user, $ability, array $arguments) { if (isset($arguments[0])) { if (! is_null($policy = $this->getPolicyFor($arguments[0]))) { - return $this->resolvePolicyCallback($user, $ability, $arguments, $policy); + ...
true
Other
laravel
framework
0eb361727446990d437d538c6a908574a4019fe7.json
prevent policies from being too greedy - return `false` on `resolvePolicyCallback` if the ability/method is not callable - if no policy callback is found, allow the gate to try and resolve the ability before defaulting to `false`. - add test to make sure policies defer to the gate if method does not exist on policy - ...
tests/Auth/AuthAccessGateTest.php
@@ -178,7 +178,7 @@ public function test_policy_converts_dash_to_camel() $this->assertTrue($gate->check('update-dash', new AccessGateTestDummy)); } - public function test_policy_default_to_false_if_method_does_not_exist() + public function test_policy_default_to_false_if_method_does_not_exist_and_...
true
Other
laravel
framework
eb02670211fb8eec7aaf84679301565089cbd95f.json
Add a "validated" method to the form request
src/Illuminate/Foundation/Http/FormRequest.php
@@ -102,6 +102,16 @@ protected function createDefaultValidator(ValidationFactory $factory) ); } + /** + * Get the validated data from the request. + * + * @return array + */ + public function validated() + { + return $this->only(array_keys($this->container->call([$this, '...
true
Other
laravel
framework
eb02670211fb8eec7aaf84679301565089cbd95f.json
Add a "validated" method to the form request
tests/Foundation/FoundationFormRequestTest.php
@@ -26,6 +26,15 @@ public function tearDown() $this->mocks = []; } + public function test_validated_method_returns_the_validated_data() + { + $request = $this->createRequest(['name' => 'specified', 'with' => 'extras']); + + $request->validate(); + + $this->assertEquals(['name'...
true
Other
laravel
framework
757be73cafd0d9afc86143db3241495bd5517d82.json
Add a second local key to HasManyThrough (#19114)
src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php
@@ -236,9 +236,10 @@ public function hasMany($related, $foreignKey = null, $localKey = null) * @param string|null $firstKey * @param string|null $secondKey * @param string|null $localKey + * @param string|null $secondLocalKey * @return \Illuminate\Database\Eloquent\Relations\HasManyT...
true
Other
laravel
framework
757be73cafd0d9afc86143db3241495bd5517d82.json
Add a second local key to HasManyThrough (#19114)
src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
@@ -45,6 +45,13 @@ class HasManyThrough extends Relation */ protected $localKey; + /** + * The local key on the intermediary model. + * + * @var string + */ + protected $secondLocalKey; + /** * Create a new has many through relationship instance. * @@ -54,15 +61,17 @@...
true
Other
laravel
framework
757be73cafd0d9afc86143db3241495bd5517d82.json
Add a second local key to HasManyThrough (#19114)
tests/Database/DatabaseEloquentHasManyThroughIntegrationTest.php
@@ -0,0 +1,413 @@ +<?php + +namespace Illuminate\Tests\Database; + +use PHPUnit\Framework\TestCase; +use Illuminate\Database\Connection; +use Illuminate\Database\Eloquent\SoftDeletes; +use Illuminate\Database\Capsule\Manager as DB; +use Illuminate\Database\Eloquent\Model as Eloquent; + +class DatabaseEloquentHasManyThr...
true
Other
laravel
framework
757be73cafd0d9afc86143db3241495bd5517d82.json
Add a second local key to HasManyThrough (#19114)
tests/Database/DatabaseEloquentHasManyThroughTest.php
@@ -1,326 +0,0 @@ -<?php - -namespace Illuminate\Tests\Database; - -use stdClass; -use Mockery as m; -use PHPUnit\Framework\TestCase; -use Illuminate\Database\Eloquent\Collection; -use Illuminate\Database\Eloquent\SoftDeletes; -use Illuminate\Database\Eloquent\Relations\HasManyThrough; - -class DatabaseEloquentHasManyT...
true
Other
laravel
framework
841b36cc005ee5c400f1276175db9e2692d1e167.json
move exceptions into internal array
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -41,6 +41,21 @@ class Handler implements ExceptionHandlerContract */ protected $dontReport = []; + /** + * A list of the internal exception types that should not be reported. + * + * @var array + */ + protected $internalDontReport = [ + \Illuminate\Auth\AuthenticationExcepti...
false
Other
laravel
framework
d44c091acf6c01dbd202e39a21a8a2f2724b2441.json
Avoid unneeded function call (#19079)
src/Illuminate/Support/Str.php
@@ -152,7 +152,11 @@ public static function kebab($value) */ public static function length($value, $encoding = null) { - return mb_strlen($value, $encoding ?: mb_internal_encoding()); + if ($encoding) { + return mb_strlen($value, $encoding); + } + + return mb_strle...
false
Other
laravel
framework
5b7d0373d379634bdf1662d4c9313072d1c5231b.json
Add a validate method onto the request (#19063)
src/Illuminate/Foundation/Providers/FoundationServiceProvider.php
@@ -2,6 +2,7 @@ namespace Illuminate\Foundation\Providers; +use Illuminate\Http\Request; use Illuminate\Support\AggregateServiceProvider; class FoundationServiceProvider extends AggregateServiceProvider @@ -14,4 +15,30 @@ class FoundationServiceProvider extends AggregateServiceProvider protected $provider...
false
Other
laravel
framework
0e16770a54e63541dcd9686f4f7fa23edc1b4d95.json
Apply fixes from StyleCI (#19017)
tests/Database/DatabaseEloquentBuilderTest.php
@@ -647,7 +647,8 @@ public function testWithCountAndGlobalScope() $builder = $model->select('id')->withCount(['foo']); // Remove the global scope so it doesn't interfere with any other tests - EloquentBuilderTestModelCloseRelatedStub::addGlobalScope('withCount', function ($query) {}); + ...
false
Other
laravel
framework
deefa1f96df1f21de36e40ebe1ef61b997d8e098.json
Add language to str_slug helper (#19011)
src/Illuminate/Support/helpers.php
@@ -845,11 +845,12 @@ function str_singular($value) * * @param string $title * @param string $separator + * @param string $language * @return string */ - function str_slug($title, $separator = '-') + function str_slug($title, $separator = '-', $language = 'en') { - ...
false
Other
laravel
framework
64d335590debd0a79ff2d30ecaea4883ea86f527.json
Apply fixes from StyleCI (#18988)
tests/Queue/QueueManagerTest.php
@@ -4,7 +4,6 @@ use Mockery as m; use PHPUnit\Framework\TestCase; -use Illuminate\Config\Repository; use Illuminate\Queue\QueueManager; class QueueManagerTest extends TestCase
false
Other
laravel
framework
7a871be756f4e3aee28109fbafe6edfe31bcf052.json
Return null if cache value is not found (#18984)
src/Illuminate/Cache/RedisStore.php
@@ -73,7 +73,7 @@ public function many(array $keys) }, $keys)); foreach ($values as $index => $value) { - $results[$keys[$index]] = $this->unserialize($value); + $results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null; } return $resul...
true
Other
laravel
framework
7a871be756f4e3aee28109fbafe6edfe31bcf052.json
Return null if cache value is not found (#18984)
tests/Cache/CacheRedisStoreTest.php
@@ -32,19 +32,20 @@ public function testRedisMultipleValuesAreReturned() { $redis = $this->getRedis(); $redis->getRedis()->shouldReceive('connection')->once()->with('default')->andReturn($redis->getRedis()); - $redis->getRedis()->shouldReceive('mget')->once()->with(['prefix:foo', 'prefix:f...
true
Other
laravel
framework
d1ea2e232299eba8572c213091772190be129b18.json
Create a mapToGroups method (#18949)
src/Illuminate/Support/Collection.php
@@ -704,6 +704,25 @@ public function map(callable $callback) return new static(array_combine($keys, $items)); } + /** + * Run a grouping map over the items. + * + * The callback should return an associative array with a single key/value pair. + * + * @param callable $callback + ...
true
Other
laravel
framework
d1ea2e232299eba8572c213091772190be129b18.json
Create a mapToGroups method (#18949)
tests/Support/SupportCollectionTest.php
@@ -1049,6 +1049,35 @@ public function testFlatMap() $this->assertEquals(['programming', 'basketball', 'music', 'powerlifting'], $data->all()); } + public function testMapToGroups() + { + $data = new Collection([ + ['id' => 1, 'name' => 'A'], + ['id' => 2, 'name' => 'B...
true
Other
laravel
framework
f74b33a7e2983778f8855449f390d829d123dc24.json
add name to home route (#18942)
src/Illuminate/Auth/Console/stubs/make/routes.stub
@@ -1,4 +1,4 @@ Auth::routes(); -Route::get('/home', 'HomeController@index'); +Route::get('/home', 'HomeController@index')->name('home');
false
Other
laravel
framework
befcfbcf1b0ed79e5d585b443fa06b88686d782a.json
Apply fixes from StyleCI (#18900)
tests/Validation/ValidationValidatorTest.php
@@ -432,7 +432,7 @@ public function testDisplayableAttributesAreReplacedInCustomReplacers() $v->addExtension('alliteration', function ($attribute, $value, $parameters, $validator) { $other = array_get($validator->getData(), $parameters[0]); - return $value{0} == $other{0}; + ...
false
Other
laravel
framework
1c40e8f5289ee46edb8ca1a1c6ff488d53e3d8ec.json
revert new methods on contract it was pointed out to me that we can’t change contracts on 5.4, so we’ll set it back to the original here. these 2 methods can be targeted to 5.5, however.
src/Illuminate/Contracts/Queue/Queue.php
@@ -96,19 +96,4 @@ public function getConnectionName(); * @return $this */ public function setConnectionName($name); - - /** - * Set the queue prefix. - * - * @param string $prefix - * @return $this - */ - public function setQueuePrefix($prefix = null); - - /** - * Ge...
false
Other
laravel
framework
206aae2a7a5c97a7e0af3bed8e842635504de306.json
add tests, update changelog, increase readability
CHANGELOG-5.5.md
@@ -53,6 +53,9 @@ ### Events - ⚠️ Removed calling queue method on handlers ([0360cb1](https://github.com/laravel/framework/commit/0360cb1c6b71ec89d406517b19d1508511e98fb5), [ec96979](https://github.com/laravel/framework/commit/ec969797878f2c731034455af2397110732d14c4), [d9be4bf](https://github.com/laravel/framework/c...
true
Other
laravel
framework
206aae2a7a5c97a7e0af3bed8e842635504de306.json
add tests, update changelog, increase readability
src/Illuminate/Filesystem/Filesystem.php
@@ -370,23 +370,30 @@ public function glob($pattern, $flags = 0) * Get an array of all files in a directory. * * @param string $directory + * @param bool $ignoreDotFiles * @return array */ - public function files($directory, $hidden = false) + public function files($directory...
true