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
a7a0c65b3d2ee1eae68d3d7e749ba41aba7caa72.json
Apply fixes from StyleCI (#27127)
tests/Integration/Cache/DynamoDbStoreTest.php
@@ -2,9 +2,7 @@ namespace Illuminate\Tests\Integration\Cache; -use Memcached; use Illuminate\Support\Str; -use Illuminate\Support\Carbon; use Orchestra\Testbench\TestCase; use Illuminate\Support\Facades\Cache;
true
Other
laravel
framework
5475631046088ff7fe5c5f8e5c83fe54f9c84893.json
Add Test for removeColumn
tests/Database/DatabaseSchemaBlueprintTest.php
@@ -134,4 +134,19 @@ public function testUnsignedDecimalTable() $blueprint = clone $base; $this->assertEquals(['alter table `users` add `money` decimal(10, 2) unsigned not null'], $blueprint->toSql($connection, new MySqlGrammar)); } + + public function testRemoveColumn() + { + $base ...
false
Other
laravel
framework
be70858192281f00006adc1a76c5e136476063f4.json
Stop email re-verification with same link If a user reopen the given email verification link, the `email_verified_at` column is being updated. While in should not be updated when the email is verified before (by same provided link).
src/Illuminate/Foundation/Auth/VerifiesEmails.php
@@ -35,7 +35,7 @@ public function verify(Request $request) if ($request->route('id') != $request->user()->getKey()) { throw new AuthorizationException; } - + if ($request->user()->hasVerifiedEmail()) { return redirect($this->redirectPath()); }
false
Other
laravel
framework
f7b6362c6e46e759859a048cef02ff59a172329b.json
Stop email reverification with same link If a user reopen the given email verification link, the `email_verified_at` column is being updated. While in should not be updated when the email is verified before (by same provided link).
src/Illuminate/Foundation/Auth/VerifiesEmails.php
@@ -35,6 +35,10 @@ public function verify(Request $request) if ($request->route('id') != $request->user()->getKey()) { throw new AuthorizationException; } + + if ($request->user()->hasVerifiedEmail()) { + return redirect($this->redirectPath()); + } ...
false
Other
laravel
framework
4c3b4664c1d860425d6d9d06d1bdd1eb009cdc73.json
Fix style ci
tests/Integration/Http/ResourceTest.php
@@ -695,7 +695,7 @@ public function work() 'id' => 1, 'title' => 'Test Title 1', ])); - + return $this->filter([ new MergeValue($postResource), 'user' => 'test user',
false
Other
laravel
framework
e5bf6463cf3debfed29efe879a7a4ff3455cc1f9.json
Add 'deprecated' docblock to 'defer' property
src/Illuminate/Support/ServiceProvider.php
@@ -17,6 +17,8 @@ abstract class ServiceProvider /** * Indicates if loading of the provider is deferred. * + * @deprecated 5.8 Implement the \Illuminate\Contracts\Support\Deferred interface instead. + * * @var bool */ protected $defer = false;
false
Other
laravel
framework
36f7df7d589d095cea44d856a597e44d8eeccdf6.json
Add Deferred interface for service providers
src/Illuminate/Contracts/Support/Deferred.php
@@ -0,0 +1,13 @@ +<?php + +namespace Illuminate\Contracts\Support; + +interface Deferred +{ + /** + * Get the services provided by the provider. + * + * @return array + */ + public function provides(); +}
true
Other
laravel
framework
36f7df7d589d095cea44d856a597e44d8eeccdf6.json
Add Deferred interface for service providers
src/Illuminate/Support/ServiceProvider.php
@@ -3,6 +3,7 @@ namespace Illuminate\Support; use Illuminate\Console\Application as Artisan; +use Illuminate\Contracts\Support\Deferred; abstract class ServiceProvider { @@ -297,6 +298,6 @@ public function when() */ public function isDeferred() { - return $this->defer; + return $th...
true
Other
laravel
framework
14b1b506d3cb14bf7aa70e8134f32416c9ef0f0f.json
Add original parameters to Route
src/Illuminate/Routing/Route.php
@@ -98,6 +98,13 @@ class Route */ public $compiled; + /** + * The matched parameters' original state. + * + * @var array + */ + protected $originalParameters; + /** * The router instance used by the route. * @@ -300,6 +307,8 @@ public function bind(Request $request) ...
false
Other
laravel
framework
50a69b7a5e94ea187a4c689087e659d85eedb456.json
Introduce restoreLock function
src/Illuminate/Cache/MemcachedStore.php
@@ -198,6 +198,18 @@ public function lock($name, $seconds = 0, $owner = null) return new MemcachedLock($this->memcached, $this->prefix.$name, $seconds, $owner); } + /** + * Restore a lock instance using the owner identifier. + * + * @param string $name + * @param string $owner + ...
true
Other
laravel
framework
50a69b7a5e94ea187a4c689087e659d85eedb456.json
Introduce restoreLock function
src/Illuminate/Cache/RedisStore.php
@@ -178,6 +178,18 @@ public function lock($name, $seconds = 0, $owner = null) return new RedisLock($this->connection(), $this->prefix.$name, $seconds, $owner); } + /** + * Restore a lock instance using the owner identifier. + * + * @param string $name + * @param string $owner + ...
true
Other
laravel
framework
50a69b7a5e94ea187a4c689087e659d85eedb456.json
Introduce restoreLock function
src/Illuminate/Contracts/Cache/LockProvider.php
@@ -9,7 +9,17 @@ interface LockProvider * * @param string $name * @param int $seconds + * @param string|null $owner * @return \Illuminate\Contracts\Cache\Lock */ - public function lock($name, $seconds = 0); + public function lock($name, $seconds = 0, $owner = null); + + ...
true
Other
laravel
framework
50a69b7a5e94ea187a4c689087e659d85eedb456.json
Introduce restoreLock function
tests/Integration/Cache/MemcachedCacheLockTest.php
@@ -105,7 +105,7 @@ public function test_memcached_locks_can_be_released_using_owner_token() $this->assertTrue($firstLock->get()); $owner = $firstLock->getOwner(); - $secondLock = Cache::store('memcached')->lock('foo', 10, $owner); + $secondLock = Cache::store('memcached')->restoreLock...
true
Other
laravel
framework
50a69b7a5e94ea187a4c689087e659d85eedb456.json
Introduce restoreLock function
tests/Integration/Cache/RedisCacheLockTest.php
@@ -80,7 +80,7 @@ public function test_redis_locks_can_be_released_using_owner_token() $this->assertTrue($firstLock->get()); $owner = $firstLock->getOwner(); - $secondLock = Cache::store('redis')->lock('foo', 10, $owner); + $secondLock = Cache::store('redis')->restoreLock('foo', $owner...
true
Other
laravel
framework
8c7e45305c2f83089b2a47f63d95e051531a1221.json
Write the dotenv to stderr rather than stdout
src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
@@ -6,6 +6,7 @@ use Dotenv\Exception\InvalidFileException; use Symfony\Component\Console\Input\ArgvInput; use Illuminate\Contracts\Foundation\Application; +use Symfony\Component\Console\Output\ConsoleOutput; class LoadEnvironmentVariables { @@ -26,8 +27,7 @@ public function bootstrap(Application $app) t...
false
Other
laravel
framework
ab06a52f31f40583bf831ef8402b072c41f6c38f.json
Apply fixes from StyleCI (#27033)
src/Illuminate/Console/Command.php
@@ -243,7 +243,7 @@ protected function context() 'no-ansi', 'no-interaction', 'quiet', - 'verbose' + 'verbose', ]))->mapWithKeys(function ($value, $key) { return ["--{$key}" => $value]; })->filter()->all();
false
Other
laravel
framework
0db883741e948c472d8b1fc8448658fad0587e9f.json
Apply fixes from StyleCI (#27011)
src/Illuminate/Console/Command.php
@@ -239,7 +239,7 @@ protected function createInputFromArguments(array $arguments) protected function context() { $options = Arr::only($this->option(), ['no-interaction', 'ansi', 'no-ansi', 'quiet', 'verbose']); - + collect($options)->mapWithKeys(function ($value, $key) { ...
false
Other
laravel
framework
54f002434adc0f800d500c204aa0f524fc7a96ea.json
remove brittle message check
src/Illuminate/Database/Query/Builder.php
@@ -1793,8 +1793,9 @@ public function orHavingRaw($sql, array $bindings = []) public function orderBy($column, $direction = 'asc') { $direction = strtolower($direction); + if (! in_array($direction, ['asc', 'desc'], true)) { - throw new InvalidArgumentException('Invalid value of d...
true
Other
laravel
framework
54f002434adc0f800d500c204aa0f524fc7a96ea.json
remove brittle message check
tests/Database/DatabaseQueryBuilderTest.php
@@ -985,7 +985,6 @@ public function testOrderBys() public function testOrderByInvalidDirectionParam() { $this->expectException(InvalidArgumentException::class); - $this->expectExceptionMessage('Invalid value of direction.'); $builder = $this->getBuilder(); $builder->select(...
true
Other
laravel
framework
6bbb0bc1f41cd35bb82dae5e28ca24853311f9e3.json
fix style in orderBy
src/Illuminate/Database/Query/Builder.php
@@ -1792,7 +1792,7 @@ public function orHavingRaw($sql, array $bindings = []) */ public function orderBy($column, $direction = 'asc') { - if (!in_array(strtolower($direction), ['asc', 'desc'], true)) { + if (! in_array(strtolower($direction), ['asc', 'desc'], true)) { throw ne...
false
Other
laravel
framework
87cf8f1b38b6e9c3e99048e0956b5f622434d0d9.json
Fix style ci
tests/Support/SupportCollectionTest.php
@@ -558,7 +558,7 @@ public function testWhereNotBetween() $c = new Collection([['v' => 1], ['v' => 2], ['v' => 3], ['v' => '3'], ['v' => 4]]); $this->assertEquals([['v' => 1]], $c->whereNotBetween('v', [2, 4])->values()->all()); - $this->assertEquals([['v' => 2], ['v' => 3], ['v' => 3], ['v' ...
false
Other
laravel
framework
1663b4ff2b1a530ec6002f1467d1541b8b0d732c.json
Add whereNotBetween method to Collection object
src/Illuminate/Support/Collection.php
@@ -690,6 +690,20 @@ public function whereBetween($key, $values) return $this->where($key, '>=', reset($values))->where($key, '<=', end($values)); } + /** + * Filter items where the given key not between values. + * + * @param string $key + * @param array $values + * @return s...
true
Other
laravel
framework
1663b4ff2b1a530ec6002f1467d1541b8b0d732c.json
Add whereNotBetween method to Collection object
tests/Support/SupportCollectionTest.php
@@ -553,6 +553,15 @@ public function testBetween() $this->assertEquals([['v' => 3], ['v' => '3']], $c->whereBetween('v', [3, 3])->values()->all()); } + public function testWhereNotBetween() + { + $c = new Collection([['v' => 1], ['v' => 2], ['v' => 3], ['v' => '3'], ['v' => 4]]); + + ...
true
Other
laravel
framework
66d8568d3dd69e468abaaf66d58018c15d0b4dda.json
Apply fixes from StyleCI (#27027)
src/Illuminate/Database/Eloquent/Builder.php
@@ -853,7 +853,7 @@ public function decrement($column, $amount = 1, array $extra = []) */ protected function addUpdatedAtColumn(array $values) { - if (! $this->model->usesTimestamps() || + if (! $this->model->usesTimestamps() || is_null($this->model->getUpdatedAtColumn())) { ...
false
Other
laravel
framework
09f9596a482a8789ecfa5b04de6e8d609b903251.json
Remove duplicate code
src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -310,21 +310,6 @@ protected function setForeignAttributesForCreate(Model $model) $model->setAttribute($this->getForeignKeyName(), $this->getParentKey()); } - /** - * Perform an update on all the related models. - * - * @param array $attributes - * @return int - */ - public...
true
Other
laravel
framework
09f9596a482a8789ecfa5b04de6e8d609b903251.json
Remove duplicate code
tests/Database/DatabaseEloquentHasManyTest.php
@@ -163,27 +163,6 @@ public function testUpdateOrCreateMethodCreatesNewModelWithForeignKeySet() $this->assertInstanceOf(Model::class, $relation->updateOrCreate(['foo'], ['bar'])); } - public function testUpdateMethodUpdatesModelsWithTimestamps() - { - $relation = $this->getRelation(); - ...
true
Other
laravel
framework
09f9596a482a8789ecfa5b04de6e8d609b903251.json
Remove duplicate code
tests/Database/DatabaseEloquentHasOneTest.php
@@ -129,27 +129,6 @@ public function testCreateMethodProperlyCreatesNewModel() $this->assertEquals($created, $relation->create(['name' => 'taylor'])); } - public function testUpdateMethodUpdatesModelsWithTimestamps() - { - $relation = $this->getRelation(); - $relation->getRelated()->...
true
Other
laravel
framework
e1e4c0ddaaef1fb9af117b877eb408fd9b5fa784.json
Fix broken db command code
src/Illuminate/Database/Console/Migrations/FreshCommand.php
@@ -47,13 +47,13 @@ public function handle() $this->info('Dropped all tables successfully.'); - $this->call('migrate', [ + $this->call('migrate', array_filter([ '--database' => $database, '--path' => $this->input->getOption('path'), '--realpath' => $this...
true
Other
laravel
framework
e1e4c0ddaaef1fb9af117b877eb408fd9b5fa784.json
Fix broken db command code
src/Illuminate/Database/Console/Migrations/MigrateCommand.php
@@ -89,9 +89,9 @@ protected function prepareDatabase() $this->migrator->setConnection($this->option('database')); if (! $this->migrator->repositoryExists()) { - $this->call( - 'migrate:install', ['--database' => $this->option('database')] - ); + $this-...
true
Other
laravel
framework
e1e4c0ddaaef1fb9af117b877eb408fd9b5fa784.json
Fix broken db command code
src/Illuminate/Database/Console/Migrations/RefreshCommand.php
@@ -42,28 +42,26 @@ public function handle() $path = $this->input->getOption('path'); - $force = $this->input->getOption('force'); - // If the "step" option is specified it means we only want to rollback a small // number of migrations before migrating again. For example, the user ...
true
Other
laravel
framework
e1e4c0ddaaef1fb9af117b877eb408fd9b5fa784.json
Fix broken db command code
tests/Database/DatabaseMigrationMigrateCommandTest.php
@@ -45,7 +45,7 @@ public function testMigrationRepositoryCreatedWhenNecessary() $migrator->shouldReceive('setOutput')->once()->andReturn($migrator); $migrator->shouldReceive('run')->once()->with([__DIR__.DIRECTORY_SEPARATOR.'migrations'], ['pretend' => false, 'step' => false]); $migrator->sho...
true
Other
laravel
framework
e1e4c0ddaaef1fb9af117b877eb408fd9b5fa784.json
Fix broken db command code
tests/Database/DatabaseMigrationRefreshCommandTest.php
@@ -38,8 +38,8 @@ public function testRefreshCommandCallsCommandsWithProperArguments() $console->shouldReceive('find')->with('migrate')->andReturn($migrateCommand); $quote = DIRECTORY_SEPARATOR == '\\' ? '"' : "'"; - $resetCommand->shouldReceive('run')->with(new InputMatcher("--database --pat...
true
Other
laravel
framework
8f2aeb345a4ce88f0515ae0bdef477d40380f17e.json
Use the Str::lower method directly
src/Illuminate/Support/Str.php
@@ -428,7 +428,7 @@ public static function slug($title, $separator = '-', $language = 'en') $title = str_replace('@', $separator.'at'.$separator, $title); // Remove all characters that are not the separator, letters, numbers, or whitespace. - $title = preg_replace('![^'.preg_quote($separator)...
false
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/401.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') -@section('code', '401') @section('title', __('Unauthorized')) - -@section('image') -<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center"> -</div> -@end...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/403.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') -@section('code', '403') @section('title', __('Forbidden')) - -@section('image') -<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center"> -</div> -@endsec...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/404.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') +@section('title', __('Not Found')) @section('code', '404') -@section('title', __('Page Not Found')) - -@section('image') -<div style="background-image: url({{ asset('/svg/404.svg') }});" class="absolute pin bg-cover bg-no-repeat m...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/419.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') -@section('code', '419') @section('title', __('Page Expired')) - -@section('image') -<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center"> -</div> -@end...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/429.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') -@section('code', '429') @section('title', __('Too Many Requests')) - -@section('image') -<div style="background-image: url({{ asset('/svg/403.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center"> -</div> ...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/500.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') +@section('title', __('Server Error')) @section('code', '500') -@section('title', __('Error')) - -@section('image') -<div style="background-image: url({{ asset('/svg/500.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-l...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/503.blade.php
@@ -1,11 +1,5 @@ -@extends('errors::illustrated-layout') +@extends('errors::minimal') -@section('code', '503') @section('title', __('Service Unavailable')) - -@section('image') -<div style="background-image: url({{ asset('/svg/503.svg') }});" class="absolute pin bg-cover bg-no-repeat md:bg-left lg:bg-center"> -</div...
true
Other
laravel
framework
83ca9a7706a8091de9da17cb687a0852c9ef1960.json
use minimal error layout
src/Illuminate/Foundation/Exceptions/views/minimal.blade.php
@@ -0,0 +1,62 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + + <title>@yield('title')</title> + + <!-- Fonts --> + <link rel="dns-prefetch" href="//fonts.gstatic.com"> + <link h...
true
Other
laravel
framework
b81c4cef61996a579ee172c3fefe4f6ec663bb19.json
Replace deprecated phpunit methods
tests/Database/DatabaseEloquentModelTest.php
@@ -732,7 +732,7 @@ public function testToArray() $model->setRelation('multi', new BaseCollection); $array = $model->toArray(); - $this->assertInternalType('array', $array); + $this->assertIsArray($array); $this->assertEquals('foo', $array['name']); $this->assertEqual...
true
Other
laravel
framework
b81c4cef61996a579ee172c3fefe4f6ec663bb19.json
Replace deprecated phpunit methods
tests/Http/HttpMimeTypeTest.php
@@ -29,7 +29,7 @@ public function testMimeTypeFromExtensionExistsFalse() public function testGetAllMimeTypes() { - $this->assertInternalType('array', MimeType::get()); + $this->assertIsArray(MimeType::get()); $this->assertArraySubset(['jpg' => 'image/jpeg'], MimeType::get()); }
true
Other
laravel
framework
b81c4cef61996a579ee172c3fefe4f6ec663bb19.json
Replace deprecated phpunit methods
tests/Mail/MailableQueuedTest.php
@@ -49,7 +49,7 @@ public function testQueuedMailableWithAttachmentSent() $mailable = new MailableQueableStub; $attachmentOption = ['mime' => 'image/jpeg', 'as' => 'bar.jpg']; $mailable->attach('foo.jpg', $attachmentOption); - $this->assertInternalType('array', $mailable->attachments); ...
true
Other
laravel
framework
b81c4cef61996a579ee172c3fefe4f6ec663bb19.json
Replace deprecated phpunit methods
tests/Routing/RoutingRouteTest.php
@@ -309,7 +309,7 @@ public function testRouteGetAction() return 'foo'; })->name('foo'); - $this->assertInternalType('array', $route->getAction()); + $this->assertIsArray($route->getAction()); $this->assertArrayHasKey('as', $route->getAction()); $this->assertEquals...
true
Other
laravel
framework
b81c4cef61996a579ee172c3fefe4f6ec663bb19.json
Replace deprecated phpunit methods
tests/Support/SupportArrTest.php
@@ -436,31 +436,31 @@ public function testRandom() $this->assertContains($random, ['foo', 'bar', 'baz']); $random = Arr::random(['foo', 'bar', 'baz'], 0); - $this->assertInternalType('array', $random); + $this->assertIsArray($random); $this->assertCount(0, $random); ...
true
Other
laravel
framework
b81c4cef61996a579ee172c3fefe4f6ec663bb19.json
Replace deprecated phpunit methods
tests/Support/SupportCollectionTest.php
@@ -1453,7 +1453,7 @@ public function testMapToDictionary() $this->assertInstanceOf(Collection::class, $groups); $this->assertEquals(['A' => [1], 'B' => [2, 4], 'C' => [3]], $groups->toArray()); - $this->assertInternalType('array', $groups['A']); + $this->assertIsArray($groups['A']); ...
true
Other
laravel
framework
b310b1ec45d0097ac1cee30b26c7bdd2e139090d.json
use arr class
src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -4,6 +4,7 @@ use RuntimeException; use Illuminate\Http\File; +use Illuminate\Support\Arr; use Illuminate\Support\Str; use InvalidArgumentException; use Illuminate\Support\Carbon; @@ -55,7 +56,7 @@ public function __construct(FilesystemInterface $driver) */ public function assertExists($path) {...
false
Other
laravel
framework
7c699802c00e798f8f9f2874d19eea6e4ea0124c.json
Fix tests for windows environments
tests/Integration/Mail/RenderingMailWithLocaleTest.php
@@ -31,14 +31,14 @@ public function testMailableRendersInDefaultLocale() { $mail = new RenderedTestMail; - $this->assertEquals("name\n", $mail->render()); + $this->assertEquals('name'.PHP_EOL, $mail->render()); } public function testMailableRendersInSelectedLocale() { ...
false
Other
laravel
framework
627ce3458eeaa02e47793756cbf4e9498648e8cf.json
Remove sudo configuration from Travis CI This will became not available in the future: https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
.travis.yml
@@ -18,8 +18,6 @@ matrix: - php: 7.3 env: setup=lowest -sudo: false - cache: directories: - $HOME/.composer/cache
false
Other
laravel
framework
6fad0fbe62235a070d1ed7248c73bfbc11932656.json
Use Ubuntu 16.04
.travis.yml
@@ -1,3 +1,4 @@ +dist: xenial language: php env:
false
Other
laravel
framework
c7cbd6d24443d7da7fc81ec56935f21b40f45229.json
Add method 'isReleased' to queue job contract
src/Illuminate/Contracts/Queue/Job.php
@@ -33,6 +33,13 @@ public function fire(); */ public function release($delay = 0); + /** + * Determine if the job was released back into the queue. + * + * @return bool + */ + public function isReleased(); + /** * Delete the job from the queue. *
true
Other
laravel
framework
c7cbd6d24443d7da7fc81ec56935f21b40f45229.json
Add method 'isReleased' to queue job contract
tests/Queue/QueueWorkerTest.php
@@ -416,6 +416,11 @@ public function release($delay = 0) $this->releaseAfter = $delay; } + public function isReleased() + { + return $this->released; + } + public function isDeletedOrReleased() { return $this->deleted || $this->released;
true
Other
laravel
framework
2f01bd8862f8d65e49836a1039f668ee0aeb0e10.json
Add method 'hasFailed' to queue job contract
src/Illuminate/Contracts/Queue/Job.php
@@ -61,6 +61,13 @@ public function isDeletedOrReleased(); */ public function attempts(); + /** + * Determine if the job has been marked as a failure. + * + * @return bool + */ + public function hasFailed(); + /** * Mark the job as "failed". *
true
Other
laravel
framework
2f01bd8862f8d65e49836a1039f668ee0aeb0e10.json
Add method 'hasFailed' to queue job contract
tests/Queue/QueueWorkerTest.php
@@ -438,6 +438,11 @@ public function failed($e) $this->failedWith = $e; } + public function hasFailed() + { + return $this->failed; + } + public function getName() { return 'WorkerFakeJob';
true
Other
laravel
framework
a31bb681c53fe9f0b9eec68afbaff903691a625c.json
Add method 'markAsFailed' to queue job contract
src/Illuminate/Contracts/Queue/Job.php
@@ -61,6 +61,13 @@ public function isDeletedOrReleased(); */ public function attempts(); + /** + * Mark the job as "failed". + * + * @return void + */ + public function markAsFailed(); + /** * Process an exception that caused the job to fail. *
true
Other
laravel
framework
a31bb681c53fe9f0b9eec68afbaff903691a625c.json
Add method 'markAsFailed' to queue job contract
tests/Queue/QueueWorkerTest.php
@@ -426,6 +426,11 @@ public function attempts() return $this->attempts; } + public function markAsFailed() + { + $this->failed = true; + } + public function failed($e) { $this->markAsFailed();
true
Other
laravel
framework
fae67da8ad12017ac592c774fb88419d489ba816.json
Remove unnecessary code (#26903)
src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
@@ -132,13 +132,6 @@ protected function getEagerModelKeys(array $models) } } - // If there are no keys that were not null we will just return an array with null - // so this query wont fail plus returns zero results, which should be what the - // developer expects to happen ...
true
Other
laravel
framework
fae67da8ad12017ac592c774fb88419d489ba816.json
Remove unnecessary code (#26903)
tests/Database/DatabaseEloquentBelongsToTest.php
@@ -160,15 +160,15 @@ public function testDefaultEagerConstraintsWhenIncrementing() $relation = $this->getRelation(); $relation->getRelated()->shouldReceive('getKeyName')->andReturn('id'); $relation->getRelated()->shouldReceive('getKeyType')->andReturn('int'); - $relation->getQuery()->...
true
Other
laravel
framework
3913c10a54a967d1a6b4e0fc3b162da4054121fb.json
Fix doc-blocks (#26869)
src/Illuminate/Translation/Translator.php
@@ -94,7 +94,7 @@ public function has($key, $locale = null, $fallback = true) * @param string $key * @param array $replace * @param string $locale - * @return string|array|null + * @return string|array */ public function trans($key, array $replace = [], $locale = null) {...
false
Other
laravel
framework
d4de66f78e30519cf5f03e177efc8fb25c2e26bd.json
Fix container docblock (#26856)
src/Illuminate/Container/Container.php
@@ -602,6 +602,8 @@ public function makeWith($abstract, array $parameters = []) * @param string $abstract * @param array $parameters * @return mixed + * + * @throws \Illuminate\Contracts\Container\BindingResolutionException */ public function make($abstract, array $parameters = ...
false
Other
laravel
framework
9aea079a6c6ed15dd5f764d05dd75c7325fdd50f.json
remove extra alias the `Swift_SendmailTransport` is aliased to both `MailTransport` and `SendmailTransport`. We can have both the 'mail' and 'sendmail' drivers build up the same class, and remove the need for the extra alias. I think this also makes it more obvious to the reader that the 'mail' driver doesn't reall...
src/Illuminate/Mail/TransportManager.php
@@ -11,7 +11,6 @@ use Illuminate\Mail\Transport\LogTransport; use Illuminate\Mail\Transport\SesTransport; use Illuminate\Mail\Transport\ArrayTransport; -use Swift_SendmailTransport as MailTransport; use Illuminate\Mail\Transport\MailgunTransport; use Illuminate\Mail\Transport\MandrillTransport; use Illuminate\Mai...
false
Other
laravel
framework
4dd5ff245b9c7ac93816adb1e6e577cb9cac0204.json
Update docblock with correct spacing
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
@@ -473,10 +473,10 @@ protected function replaceDimensions($message, $attribute, $rule, $parameters) /** * Replace all place-holders for the starts_with rule. * - * @param string $message - * @param string $attribute - * @param string $rule - * @param array $parameters + * @param ...
false
Other
laravel
framework
f5f900b2bac0b14c4256dcf8beb28f0450531bd5.json
Apply fixes from StyleCI (#26835)
tests/Console/ConsoleEventSchedulerTest.php
@@ -6,7 +6,6 @@ use Illuminate\Console\Command; use PHPUnit\Framework\TestCase; use Illuminate\Container\Container; -use Illuminate\Config\Repository as Config; use Illuminate\Console\Scheduling\Schedule; use Illuminate\Console\Scheduling\EventMutex; use Illuminate\Console\Scheduling\CacheEventMutex;
false
Other
laravel
framework
ddd7e2e26edc19cd45d83d9b48832f8165297607.json
Fix typehint in auth stub (#26830) * Fix typehint in auth stub * Update HomeController.stub
src/Illuminate/Auth/Console/stubs/make/controllers/HomeController.stub
@@ -19,7 +19,7 @@ class HomeController extends Controller /** * Show the application dashboard. * - * @return \Illuminate\Http\Response + * @return \Illuminate\Contracts\Support\Renderable */ public function index() {
false
Other
laravel
framework
ab50ddc42ce8177cbce03d43cbe22b7f9445326e.json
Improve comments (#26804)
src/Illuminate/Database/Eloquent/Builder.php
@@ -1114,9 +1114,9 @@ protected function parseWithRelations(array $relations) $results = []; foreach ($relations as $name => $constraints) { - // If the "relation" value is actually a numeric key, we can assume that no - // constraints have been specified for the eager load and...
false
Other
laravel
framework
0f9886d0cb17c9d756068e09743f871003cf1b45.json
Fix hidden commands
src/Illuminate/Console/Command.php
@@ -116,6 +116,14 @@ public function __construct() } } + /** + * {@inheritdoc} + */ + public function isHidden() + { + return $this->hidden; + } + /** * Configure the console command using a fluent definition. *
false
Other
laravel
framework
49dad6f80092711af5e72a04c0f480feadd26a91.json
Use two spaces for DocBlock params
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -795,7 +795,7 @@ public function compileInsertGetId(Builder $query, $values, $sequence) * Compile an insert statement with subquery into SQL. * * @param \Illuminate\Database\Query\Builder $query - * @param array $columns + * @param array $columns * @param string $sql * ...
false
Other
laravel
framework
d5d50a85262480feeff29de00bcc68a08dc883a1.json
Allow 7.3 failures (#26739)
.travis.yml
@@ -16,8 +16,6 @@ matrix: - php: 7.3 - php: 7.3 env: setup=lowest - allow_failures: - - php: 7.3 sudo: false
false
Other
laravel
framework
da09db73f3c3b4ecf788870896d84c73cd574107.json
add return type into phpDoc
src/Illuminate/Database/Query/Builder.php
@@ -2563,6 +2563,7 @@ public function insertGetId(array $values, $sequence = null) * * @param array $columns * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @return bool */ public function insertSub(array $columns, $query) {
false
Other
laravel
framework
d50b93d7d1e18fafe7b99c03206d5c4c989f74bb.json
add implementation of Builder::insertSub()
src/Illuminate/Database/Query/Builder.php
@@ -2566,6 +2566,12 @@ public function insertGetId(array $values, $sequence = null) */ public function insertSub(array $columns, $query) { + [$sql, $bindings] = $this->createSub($query); + + return $this->connection->insert( + $this->grammar->compileInsertSub($this, $columns, $s...
true
Other
laravel
framework
d50b93d7d1e18fafe7b99c03206d5c4c989f74bb.json
add implementation of Builder::insertSub()
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -791,6 +791,15 @@ public function compileInsertGetId(Builder $query, $values, $sequence) return $this->compileInsert($query, $values); } + public function compileInsertSub(Builder $query, array $columns, string $sql) + { + $table = $this->wrapTable($query->from); + + $columns_stri...
true
Other
laravel
framework
d50b93d7d1e18fafe7b99c03206d5c4c989f74bb.json
add implementation of Builder::insertSub()
tests/Database/DatabaseQueryBuilderTest.php
@@ -1678,11 +1678,11 @@ public function testInsertMethod() public function testInsertSubMethod() { $builder = $this->getBuilder(); - $builder->getConnection()->shouldReceive('insert')->once()->with('insert into "users" ("email") select "address" from "emails" where "created_at" > ?', ['2018-01...
true
Other
laravel
framework
cf188c7fb6cadbd53c3971f56e6fd3252281d87e.json
Fix return type in Cache contract
src/Illuminate/Cache/RedisTaggedCache.php
@@ -23,13 +23,13 @@ class RedisTaggedCache extends TaggedCache * @param string $key * @param mixed $value * @param \DateTime|float|int|null $minutes - * @return void + * @return bool */ public function put($key, $value, $minutes = null) { $this->pushStandardKeys...
true
Other
laravel
framework
cf188c7fb6cadbd53c3971f56e6fd3252281d87e.json
Fix return type in Cache contract
src/Illuminate/Contracts/Cache/Repository.php
@@ -39,7 +39,7 @@ public function pull($key, $default = null); * @param string $key * @param mixed $value * @param \DateTimeInterface|\DateInterval|float|int $minutes - * @return void + * @return bool */ public function put($key, $value, $minutes); @@ -76,7 +76,7 @@ public ...
true
Other
laravel
framework
7f0b1836a93b7b7ffe285bd8e46b5159fbc62b43.json
Add TestResponse to return type (#26722) It can both return a Response or TestResponse based on the return type.
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -434,7 +434,7 @@ protected function extractFilesFromDataArray(&$data) * Follow a redirect chain until a non-redirect is received. * * @param \Illuminate\Http\Response $response - * @return \Illuminate\Http\Response + * @return \Illuminate\Http\Response|\Illuminate\Foundation\Testing\TestR...
false
Other
laravel
framework
2b9e8215a460f406c691fd25d172d4dcd436d3f3.json
Use Str::random instead of uniqid
src/Illuminate/Cache/Lock.php
@@ -5,6 +5,7 @@ use Illuminate\Support\InteractsWithTime; use Illuminate\Contracts\Cache\Lock as LockContract; use Illuminate\Contracts\Cache\LockTimeoutException; +use Illuminate\Support\Str; abstract class Lock implements LockContract { @@ -123,7 +124,7 @@ public function block($seconds, $callback = null) ...
false
Other
laravel
framework
28b8cb91251f0643f2aa61072c0554edeabce21b.json
Add option for scoped Cache locks Before this change out of order releases of the same cache lock could lead to situation where client A acquired the lock, took longer than the timeout, which made client B successfully acquire the lock. If A now finishes while B is still holding the lock A will release the lock that d...
src/Illuminate/Cache/Lock.php
@@ -24,6 +24,13 @@ abstract class Lock implements LockContract */ protected $seconds; + /** + * A (usually) random string that acts as scope identifier of this lock. + * + * @var string + */ + protected $scope; + /** * Create a new lock instance. * @@ -51,6 +58,13 @@ ...
true
Other
laravel
framework
28b8cb91251f0643f2aa61072c0554edeabce21b.json
Add option for scoped Cache locks Before this change out of order releases of the same cache lock could lead to situation where client A acquired the lock, took longer than the timeout, which made client B successfully acquire the lock. If A now finishes while B is still holding the lock A will release the lock that d...
src/Illuminate/Cache/MemcachedLock.php
@@ -34,7 +34,7 @@ public function __construct($memcached, $name, $seconds) public function acquire() { return $this->memcached->add( - $this->name, 1, $this->seconds + $this->name, $this->value(), $this->seconds ); } @@ -45,6 +45,18 @@ public function acquire() ...
true
Other
laravel
framework
28b8cb91251f0643f2aa61072c0554edeabce21b.json
Add option for scoped Cache locks Before this change out of order releases of the same cache lock could lead to situation where client A acquired the lock, took longer than the timeout, which made client B successfully acquire the lock. If A now finishes while B is still holding the lock A will release the lock that d...
src/Illuminate/Cache/RedisLock.php
@@ -33,7 +33,7 @@ public function __construct($redis, $name, $seconds) */ public function acquire() { - $result = $this->redis->setnx($this->name, 1); + $result = $this->redis->setnx($this->name, $this->value()); if ($result === 1 && $this->seconds > 0) { $this->red...
true
Other
laravel
framework
28b8cb91251f0643f2aa61072c0554edeabce21b.json
Add option for scoped Cache locks Before this change out of order releases of the same cache lock could lead to situation where client A acquired the lock, took longer than the timeout, which made client B successfully acquire the lock. If A now finishes while B is still holding the lock A will release the lock that d...
src/Illuminate/Contracts/Cache/Lock.php
@@ -27,4 +27,11 @@ public function block($seconds, $callback = null); * @return void */ public function release(); + + /** + * Secures this lock against out of order releases of expired clients. + * + * @return mixed + */ + public function safe(); }
true
Other
laravel
framework
28b8cb91251f0643f2aa61072c0554edeabce21b.json
Add option for scoped Cache locks Before this change out of order releases of the same cache lock could lead to situation where client A acquired the lock, took longer than the timeout, which made client B successfully acquire the lock. If A now finishes while B is still holding the lock A will release the lock that d...
tests/Integration/Cache/MemcachedCacheLockTest.php
@@ -80,4 +80,45 @@ public function test_locks_throw_timeout_if_block_expires() return 'taylor'; })); } + + public function test_memcached_locks_are_released_safely() + { + Cache::store('memcached')->lock('bar')->release(); + + $firstLock = Cache::store('memcached')->lock('...
true
Other
laravel
framework
28b8cb91251f0643f2aa61072c0554edeabce21b.json
Add option for scoped Cache locks Before this change out of order releases of the same cache lock could lead to situation where client A acquired the lock, took longer than the timeout, which made client B successfully acquire the lock. If A now finishes while B is still holding the lock A will release the lock that d...
tests/Integration/Cache/RedisCacheLockTest.php
@@ -51,4 +51,45 @@ public function test_redis_locks_can_block_for_seconds() Cache::store('redis')->lock('foo')->release(); $this->assertTrue(Cache::store('redis')->lock('foo', 10)->block(1)); } + + public function test_redis_locks_are_released_safely() + { + Cache::store('redis')->lo...
true
Other
laravel
framework
76dd0c70cac9bdc575b1738fd6a3609a02c0ad51.json
Release cache lock if callback fails (#26654)
src/Illuminate/Cache/Lock.php
@@ -62,9 +62,11 @@ public function get($callback = null) $result = $this->acquire(); if ($result && is_callable($callback)) { - return tap($callback(), function () { + try { + return $callback(); + } finally { $this->release(); - ...
false
Other
laravel
framework
a3965d1007f7493c3e31dc34af9a109408addaa4.json
Use FQCN in sync methods DocBlocks (#26639)
src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithPivotTable.php
@@ -64,7 +64,7 @@ public function toggle($ids, $touch = true) /** * Sync the intermediate tables with a list of IDs without detaching. * - * @param \Illuminate\Database\Eloquent\Collection|\Illuminate\Support\Collection|array|Model $ids + * @param \Illuminate\Support\Collection|\Illuminate\D...
false
Other
laravel
framework
f2e14602e9601e2ddce3d597a72a2bcfb445b587.json
Fix return type
src/Illuminate/Auth/Access/Gate.php
@@ -451,7 +451,7 @@ protected function callBeforeCallbacks($user, $ability, array $arguments) * @param string $ability * @param array $arguments * @param bool $result - * @return void + * @return bool|null */ protected function callAfterCallbacks($user, $ability, array $argume...
false
Other
laravel
framework
1ca55a1e5c2c0d3ba853998f1781cfa23bb9a646.json
Add relationship getters (#26607)
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -1021,6 +1021,16 @@ public function getQualifiedRelatedPivotKeyName() return $this->table.'.'.$this->relatedPivotKey; } + /** + * Get the parent key for the relationship. + * + * @return string + */ + public function getParentKeyName() + { + return $this->parentKey; + ...
true
Other
laravel
framework
1ca55a1e5c2c0d3ba853998f1781cfa23bb9a646.json
Add relationship getters (#26607)
src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
@@ -536,6 +536,16 @@ public function getQualifiedFarKeyName() return $this->getQualifiedForeignKeyName(); } + /** + * Get the foreign key on the "through" model. + * + * @return string + */ + public function getFirstKeyName() + { + return $this->firstKey; + } + /*...
true
Other
laravel
framework
1ca55a1e5c2c0d3ba853998f1781cfa23bb9a646.json
Add relationship getters (#26607)
src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -422,4 +422,14 @@ public function getQualifiedForeignKeyName() { return $this->foreignKey; } + + /** + * Get the local key for the relationship. + * + * @return string + */ + public function getLocalKeyName() + { + return $this->localKey; + } }
true
Other
laravel
framework
1ca55a1e5c2c0d3ba853998f1781cfa23bb9a646.json
Add relationship getters (#26607)
src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
@@ -181,4 +181,14 @@ public function getMorphClass() { return $this->morphClass; } + + /** + * Get the indicator for a reverse relationship. + * + * @return bool + */ + public function getInverse() + { + return $this->inverse; + } }
true
Other
laravel
framework
5f6d9a431c4fcedcbae969ba95d266604be54060.json
add starts with validation (#26612)
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
@@ -1504,6 +1504,19 @@ public function validateSometimes() return true; } + /** + * Validate the attribute starts with a given substring. + * + * @param string $attribute + * @param mixed $value + * @param array $parameters + * @return bool + */ + public functio...
true
Other
laravel
framework
5f6d9a431c4fcedcbae969ba95d266604be54060.json
add starts with validation (#26612)
tests/Validation/ValidationValidatorTest.php
@@ -1198,6 +1198,21 @@ public function testValidateAccepted() $this->assertTrue($v->passes()); } + public function testValidateStartsWith() + { + $trans = $this->getIlluminateArrayTranslator(); + $v = new Validator($trans, ['x' => 'hello world'], ['x' => 'starts_with:hello']); + ...
true
Other
laravel
framework
a64a900607f110bd365a0265dddd8278badfbed8.json
Fix duplicate validation issue (#26604) This will prevent validation from happening twice. Fixes https://github.com/laravel/framework/issues/25736
src/Illuminate/Foundation/Http/FormRequest.php
@@ -172,7 +172,7 @@ protected function failedAuthorization() */ public function validated() { - return $this->getValidatorInstance()->validate(); + return $this->getValidatorInstance()->validated(); } /**
true
Other
laravel
framework
a64a900607f110bd365a0265dddd8278badfbed8.json
Fix duplicate validation issue (#26604) This will prevent validation from happening twice. Fixes https://github.com/laravel/framework/issues/25736
src/Illuminate/Validation/Validator.php
@@ -315,6 +315,22 @@ public function validate() throw new ValidationException($this); } + return $this->validated(); + } + + /** + * Return validated value. + * + * @return array + * + * @throws \Illuminate\Validation\ValidationException + */ + public func...
true
Other
laravel
framework
a64a900607f110bd365a0265dddd8278badfbed8.json
Fix duplicate validation issue (#26604) This will prevent validation from happening twice. Fixes https://github.com/laravel/framework/issues/25736
tests/Validation/ValidationValidatorTest.php
@@ -4265,6 +4265,37 @@ public function testValidateReturnsValidatedDataNestedArrayRules() $this->assertEquals(['nested' => [['bar' => 'baz'], ['bar' => 'baz2']]], $data); } + public function testValidateAndValidatedData() + { + $post = ['first' => 'john', 'preferred'=>'john', 'last' => 'do...
true
Other
laravel
framework
ef89ad7dd1890206f2ab6f28ab6331619990edbc.json
Add date_equals validation message (#26584)
src/Illuminate/Validation/Concerns/ReplacesAttributes.php
@@ -434,6 +434,20 @@ protected function replaceAfterOrEqual($message, $attribute, $rule, $parameters) return $this->replaceBefore($message, $attribute, $rule, $parameters); } + /** + * Replace all place-holders for the date_equals rule. + * + * @param string $message + * @param str...
false
Other
laravel
framework
19f2245c6d7c87daf784f94b169f0dd4d98f0ca4.json
use env super global
src/Illuminate/Foundation/Application.php
@@ -515,10 +515,11 @@ public function detectEnvironment(Closure $callback) */ public function runningInConsole() { - return env( - 'LARAVEL_RUNNING_IN_CONSOLE', - php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg' - ); + if (isset($_ENV['APP_RUNNING_IN_C...
false
Other
laravel
framework
a36906ab8a141f1f497a0667196935e41970ae51.json
add env override for running in console
src/Illuminate/Foundation/Application.php
@@ -515,7 +515,10 @@ public function detectEnvironment(Closure $callback) */ public function runningInConsole() { - return php_sapi_name() === 'cli' || php_sapi_name() === 'phpdbg'; + return env( + 'LARAVEL_RUNNING_IN_CONSOLE', + php_sapi_name() === 'cli' || php_sapi_...
false
Other
laravel
framework
315c291b954c6bcd113d7fd3a66c3f9ce37d480d.json
Fix StyleCI failures
src/Illuminate/Foundation/Auth/VerifiesEmails.php
@@ -23,13 +23,13 @@ public function show(Request $request) : view('auth.verify'); } - /** - * Mark the authenticated user's email address as verified. - * - * @param \Illuminate\Http\Request $request - * @return \Illuminate\Http\Response - * @throws AuthorizationException - */ + ...
false
Other
laravel
framework
9a2912403435c0ffd6a8648dcbf84f9bccbb56f7.json
Move comment to correct line (#26520) The comment is meant for the if statement and not the dropStaleInstances call above it. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Container/Container.php
@@ -221,11 +221,11 @@ public function isAlias($name) */ public function bind($abstract, $concrete = null, $shared = false) { + $this->dropStaleInstances($abstract); + // If no concrete type was given, we will simply set the concrete type to the // abstract type. After that, the ...
false