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
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Support/SupportTestingMailFakeTest.php
@@ -23,7 +23,7 @@ class SupportTestingMailFakeTest extends TestCase */ private $mailable; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->fake = new MailFake;
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Support/SupportTestingNotificationFakeTest.php
@@ -27,7 +27,7 @@ class SupportTestingNotificationFakeTest extends TestCase */ private $user; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->fake = new NotificationFake;
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Support/SupportTestingQueueFakeTest.php
@@ -21,7 +21,7 @@ class SupportTestingQueueFakeTest extends TestCase */ private $job; - protected function setUp() + protected function setUp(): void { parent::setUp(); $this->fake = new QueueFake(new Application);
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Translation/TranslationFileLoaderTest.php
@@ -9,7 +9,7 @@ class TranslationFileLoaderTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Translation/TranslationTranslatorTest.php
@@ -11,7 +11,7 @@ class TranslationTranslatorTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Validation/ValidationDatabasePresenceVerifierTest.php
@@ -11,7 +11,7 @@ class ValidationDatabasePresenceVerifierTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Validation/ValidationExistsRuleTest.php
@@ -18,7 +18,7 @@ class ValidationExistsRuleTest extends TestCase * * @return void */ - public function setUp() + public function setUp(): void { $db = new DB; @@ -159,7 +159,7 @@ protected function getConnectionResolver() * * @return void */ - public functio...
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Validation/ValidationFactoryTest.php
@@ -11,7 +11,7 @@ class ValidationFactoryTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/Validation/ValidationValidatorTest.php
@@ -24,7 +24,7 @@ class ValidationValidatorTest extends TestCase { - public function tearDown() + public function tearDown(): void { Carbon::setTestNow(); m::close();
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/Blade/AbstractBladeTestCase.php
@@ -11,13 +11,13 @@ abstract class AbstractBladeTestCase extends TestCase { protected $compiler; - public function setUp() + public function setUp(): void { $this->compiler = new BladeCompiler(m::mock(Filesystem::class), __DIR__); parent::setUp(); } - public function tearD...
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/Blade/BladeElseAuthStatementsTest.php
@@ -9,7 +9,7 @@ class BladeElseAuthStatementsTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/Blade/BladeElseGuestStatementsTest.php
@@ -9,7 +9,7 @@ class BladeElseGuestStatementsTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/Blade/BladeIfAuthStatementsTest.php
@@ -9,7 +9,7 @@ class BladeIfAuthStatementsTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/Blade/BladeIfGuestStatementsTest.php
@@ -9,7 +9,7 @@ class BladeIfGuestStatementsTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/ViewBladeCompilerTest.php
@@ -9,7 +9,7 @@ class ViewBladeCompilerTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/ViewCompilerEngineTest.php
@@ -9,7 +9,7 @@ class ViewCompilerEngineTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/ViewFactoryTest.php
@@ -22,7 +22,7 @@ class ViewFactoryTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/ViewFileViewFinderTest.php
@@ -9,7 +9,7 @@ class ViewFileViewFinderTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/ViewPhpEngineTest.php
@@ -8,7 +8,7 @@ class ViewPhpEngineTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
8fc3a75b413267a30e41464d358c1d0714a6a186.json
Add void return type to setUp and tearDown methods
tests/View/ViewTest.php
@@ -15,7 +15,7 @@ class ViewTest extends TestCase { - public function tearDown() + public function tearDown(): void { m::close(); }
true
Other
laravel
framework
afd4da5a782f02b9b82427b50a4fcc292bf787a2.json
Allow install of PHPUnit 8
composer.json
@@ -85,7 +85,7 @@ "moontoast/math": "^1.1", "orchestra/testbench-core": "3.8.*", "pda/pheanstalk": "^3.0", - "phpunit/phpunit": "^7.5", + "phpunit/phpunit": "^7.5|^8.0", "predis/predis": "^1.1.1", "symfony/css-selector": "^4.2", "symfony/dom-crawler": ...
false
Other
laravel
framework
a309e88344add6f47d8e2dac84feaff1a0deddcb.json
Make ENV variable uppercase in Travis config It's a convention to make ENV variables uppercase so let's also do this here.
.travis.yml
@@ -3,20 +3,20 @@ language: php env: global: - - setup=stable + - SETUP=stable matrix: fast_finish: true include: - php: 7.1 - php: 7.1 - env: setup=lowest + env: SETUP=lowest - php: 7.2 - php: 7.2 - env: setup=lowest + env: SETUP=lowest - php: 7.3 ...
false
Other
laravel
framework
8cb5ae73b8ecb649abd38f2548362f0145dc1da5.json
Indicate defer property removal This property was deprecated by an alternative implementation in https://github.com/laravel/framework/pull/27067 and should be removed in the next major release.
src/Illuminate/Support/ServiceProvider.php
@@ -17,7 +17,7 @@ abstract class ServiceProvider /** * Indicates if loading of the provider is deferred. * - * @deprecated 5.8 Implement the \Illuminate\Contracts\Support\DeferrableProvider interface instead. + * @deprecated Implement the \Illuminate\Contracts\Support\DeferrableProvider interfa...
false
Other
laravel
framework
44cccf2b27350ad41e93496ba435d1e255b9b8d6.json
Fix event fake dispatch method not returning
src/Illuminate/Support/Testing/Fakes/EventFake.php
@@ -211,7 +211,7 @@ public function dispatch($event, $payload = [], $halt = false) if ($this->shouldFakeEvent($name, $payload)) { $this->events[$name][] = func_get_args(); } else { - $this->dispatcher->dispatch($event, $payload, $halt); + return $this->dispatcher->di...
true
Other
laravel
framework
44cccf2b27350ad41e93496ba435d1e255b9b8d6.json
Fix event fake dispatch method not returning
tests/Integration/Events/EventFakeTest.php
@@ -73,6 +73,24 @@ public function testNonFakedEventGetsProperlyDispatched() Event::assertNotDispatched(NonImportantEvent::class); } + + public function testNonFakedHaltedEventGetsProperlyDispatchedAndReturnsResponse() + { + Event::fake(NonImportantEvent::class); + Event::listen('tes...
true
Other
laravel
framework
d261f9fc75e888fd15895f1354b7ac338638dc47.json
add thenReturn helper method to Pipeline
src/Illuminate/Pipeline/Pipeline.php
@@ -104,6 +104,18 @@ public function then(Closure $destination) return $pipeline($this->passable); } + /** + * Run the pipeline and return the result. + * + * @return mixed + */ + public function thenReturn() + { + return $this->then(function ($passable) { + re...
true
Other
laravel
framework
d261f9fc75e888fd15895f1354b7ac338638dc47.json
add thenReturn helper method to Pipeline
tests/Pipeline/PipelineTest.php
@@ -162,6 +162,19 @@ public function testPipelineThrowsExceptionOnResolveWithoutContainer() return $piped; }); } + + public function testPipelineThenReturnMethodRunsPipelineThenReturnsPassable() + { + $result = (new Pipeline(new Container)) + ->send('fo...
true
Other
laravel
framework
e9952e5a07d4cbd664fdac743ede25f10b7abb1c.json
Remove forgotten echo statement
src/Illuminate/Foundation/Console/ServeCommand.php
@@ -51,8 +51,6 @@ public function handle() return $this->handle(); } - echo $status; - return $status; }
false
Other
laravel
framework
a10c50239a6f57e15100e88ed2441f2a1d1911a8.json
Apply fixes from StyleCI (#27423)
src/Illuminate/Foundation/Console/ServeCommand.php
@@ -92,7 +92,7 @@ protected function port() } /** - * Check if command has reached its max amount of port tries + * Check if command has reached its max amount of port tries. * * @return bool */
false
Other
laravel
framework
04b751f3f274d7ae454cb703482ca38911947f81.json
Remove unnecessary temporary variable
src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
@@ -365,13 +365,11 @@ public static function withoutEventDispatcher(callable $callback) static::unsetEventDispatcher(); try { - $result = $callback(); + return $callback(); } finally { if ($dispatcher) { static::setEventDispatcher($dispatc...
false
Other
laravel
framework
3c907066923823ff8e3f6079f8f49bf4eb9a6c26.json
Fix style violation
tests/Database/DatabaseEloquentModelTest.php
@@ -1338,6 +1338,7 @@ public function testWithoutEventDispatcher() $model = EloquentModelSaveStub::withoutEventDispatcher(function () { $model = new EloquentModelSaveStub; $model->save(); + return $model; });
false
Other
laravel
framework
645e622a519f5bc8a52ddabf1cd6507fd5d57d39.json
Add Model::withoutEventDispatcher() method It is sometimes desirable to bypass model events temporarily. For example, when seeding. While it is already possible to do this, the code is verbose. This aims to simplify that by creating an intuitively named helper method to execute a callback with the event dispatcher tem...
src/Illuminate/Database/Eloquent/Concerns/HasEvents.php
@@ -351,4 +351,27 @@ public static function unsetEventDispatcher() { static::$dispatcher = null; } + + /** + * Execute a callback without the event dispatcher. + * + * @param callable $callback + * @return mixed + */ + public static function withoutEventDispatcher(callable...
true
Other
laravel
framework
645e622a519f5bc8a52ddabf1cd6507fd5d57d39.json
Add Model::withoutEventDispatcher() method It is sometimes desirable to bypass model events temporarily. For example, when seeding. While it is already possible to do this, the code is verbose. This aims to simplify that by creating an intuitively named helper method to execute a callback with the event dispatcher tem...
tests/Database/DatabaseEloquentModelTest.php
@@ -1325,6 +1325,30 @@ public function testModelObserversCanBeAttachedToModelsThroughCallingObserveMeth EloquentModelStub::flushEventListeners(); } + public function testWithoutEventDispatcher() + { + EloquentModelSaveStub::setEventDispatcher($events = m::mock(Dispatcher::class)); + ...
true
Other
laravel
framework
7376daca412c5ff99d9807e7d27159221ef959d8.json
Add 2 test cases for negative pad size
tests/Support/SupportCollectionTest.php
@@ -2157,6 +2157,14 @@ public function testPadPadsArrayWithValue() $c = new Collection([1, 2, 3, 4, 5]); $c = $c->pad(4, 0); $this->assertEquals([1, 2, 3, 4, 5], $c->all()); + + $c = new Collection([1, 2, 3]); + $c = $c->pad(-4, 0); + $this->assertEquals([0, 1, 2, 3], $c-...
false
Other
laravel
framework
a464b5c70cdb12b1eaab5fb84be1d24b71bec804.json
Add test for change
src/Illuminate/Foundation/Application.php
@@ -970,7 +970,7 @@ public function abort($code, $message = '', array $headers = []) /** * Register a terminating callback with the application. * - * @param mixed $callback + * @param callable|string $callback * @return $this */ public function terminating($callback)
true
Other
laravel
framework
a464b5c70cdb12b1eaab5fb84be1d24b71bec804.json
Add test for change
tests/Foundation/FoundationApplicationTest.php
@@ -218,6 +218,16 @@ public function testAfterBootstrappingAddsClosure() $app->afterBootstrapping(RegisterFacades::class, $closure); $this->assertArrayHasKey(0, $app['events']->getListeners('bootstrapped: Illuminate\Foundation\Bootstrap\RegisterFacades')); } + + public function testTermination...
true
Other
laravel
framework
6c2892f04dcbbd0c294cf60f2b82e4351d3231cc.json
remove the type hint from the signature
src/Illuminate/Foundation/Application.php
@@ -970,10 +970,10 @@ public function abort($code, $message = '', array $headers = []) /** * Register a terminating callback with the application. * - * @param \Closure $callback + * @param mixed $callback * @return $this */ - public function terminating(Closure $callback) + ...
false
Other
laravel
framework
5b2bc35ecd271eaf7d4dc8f37f1399811edd2a37.json
Add missing tests
tests/Foundation/FoundationApplicationTest.php
@@ -209,6 +209,32 @@ public function testBeforeBootstrappingAddsClosure() $this->assertArrayHasKey(0, $app['events']->getListeners('bootstrapping: Illuminate\Foundation\Bootstrap\RegisterFacades')); } + public function testTerminationTests() + { + $app = new Application; + + $counter...
false
Other
laravel
framework
c1984c9715e980e7f545fe70db0f997c87a70bd7.json
apply suggestions from @staudenmeir
src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php
@@ -79,14 +79,13 @@ protected function removeMissingValues($data) $value->resource instanceof PotentiallyMissing && $value->isMissing())) { unset($data[$key]); + } else { + $numericKeys = $numericKeys && is_numeric($key); } - ...
true
Other
laravel
framework
c1984c9715e980e7f545fe70db0f997c87a70bd7.json
apply suggestions from @staudenmeir
tests/Integration/Http/ResourceTest.php
@@ -878,6 +878,27 @@ public function test_the_resource_can_be_an_array() ]); } + public function test_it_will_return_as_an_array_when_string_keys_are_stripped() + { + $this->assertJsonResourceResponse([ + 1 => 'John', + 2 => 'Hank', + 'foo' => new MissingVal...
true
Other
laravel
framework
e689ae9869bf264b9fcc8aac4b006a256798f693.json
Add missing type to param in docblock
src/Illuminate/Http/Resources/MergeValue.php
@@ -17,7 +17,7 @@ class MergeValue /** * Create new merge value instance. * - * @param \Illuminate\Support\Collection|array $data + * @param \Illuminate\Support\Collection|JsonSerializable|array $data * @return void */ public function __construct($data)
false
Other
laravel
framework
b02b368a732aefbcdc2a739800880334ed247d11.json
fix unauthenticated return docblock
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -212,7 +212,7 @@ protected function prepareException(Exception $e) * * @param \Illuminate\Http\Request $request * @param \Illuminate\Auth\AuthenticationException $exception - * @return \Illuminate\Http\Response + * @return \Symfony\Component\HttpFoundation\Response */ protect...
false
Other
laravel
framework
1d7fafc50ec24e4506054abfcb9b384fb2aa7382.json
Add period to end of sentence
tests/Integration/Queue/ModelSerializationTest.php
@@ -187,7 +187,7 @@ public function test_it_reloads_nested_relationships() } /** - * Regression test for https://github.com/laravel/framework/issues/23068 + * Regression test for https://github.com/laravel/framework/issues/23068. */ public function test_it_can_unserialize_nested_relations...
false
Other
laravel
framework
5138a5ccce405751988934eacc627bb4f3cc7bed.json
Add tests for SQL Server computed support
tests/Database/DatabaseSqlServerSchemaGrammarTest.php
@@ -770,6 +770,17 @@ public function testAddingMultiPolygon() $this->assertEquals('alter table "geo" add "coordinates" geography not null', $statements[0]); } + public function testAddingGeneratedColumn() + { + $blueprint = new Blueprint('products'); + $blueprint->integer('price'); +...
false
Other
laravel
framework
0fc4965f052b19fbd572afa69c0882bbcc0f9dc2.json
Add computed support to SQL Server schema grammar [SQL Server also supports computed columns (Azure & 2016+)](https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-table), but as a type; not a modifier. Add virtual column type Document persisted (SQL Server) column modifier
src/Illuminate/Database/Schema/Blueprint.php
@@ -822,6 +822,18 @@ public function unsignedDecimal($column, $total = 8, $places = 2) ]); } + /** + * Create a new generated virtual column on the table. + * + * @param string $column + * @param string $formula + * @return \Illuminate\Database\Schema\ColumnDefinition + */...
true
Other
laravel
framework
0fc4965f052b19fbd572afa69c0882bbcc0f9dc2.json
Add computed support to SQL Server schema grammar [SQL Server also supports computed columns (Azure & 2016+)](https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-table), but as a type; not a modifier. Add virtual column type Document persisted (SQL Server) column modifier
src/Illuminate/Database/Schema/ColumnDefinition.php
@@ -24,6 +24,7 @@ * @method ColumnDefinition unsigned() Set the INTEGER column as UNSIGNED (MySQL) * @method ColumnDefinition useCurrent() Set the TIMESTAMP column to use CURRENT_TIMESTAMP as default value * @method ColumnDefinition virtualAs(string $expression) Create a virtual generated column (MySQL) + * @meth...
true
Other
laravel
framework
0fc4965f052b19fbd572afa69c0882bbcc0f9dc2.json
Add computed support to SQL Server schema grammar [SQL Server also supports computed columns (Azure & 2016+)](https://docs.microsoft.com/en-us/sql/relational-databases/tables/specify-computed-columns-in-a-table), but as a type; not a modifier. Add virtual column type Document persisted (SQL Server) column modifier
src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php
@@ -19,7 +19,7 @@ class SqlServerGrammar extends Grammar * * @var array */ - protected $modifiers = ['Increment', 'Collate', 'Nullable', 'Default']; + protected $modifiers = ['Increment', 'Collate', 'Nullable', 'Default', 'Persisted']; /** * The columns available as serials. @@ -733...
true
Other
laravel
framework
8999f5eebadee2433c8ad1ef8837a90de111fcc9.json
Allow lenient log stacks
src/Illuminate/Log/LogManager.php
@@ -15,6 +15,7 @@ use Monolog\Handler\HandlerInterface; use Monolog\Handler\RotatingFileHandler; use Monolog\Handler\SlackWebhookHandler; +use Monolog\Handler\WhatFailureGroupHandler; class LogManager implements LoggerInterface { @@ -216,6 +217,10 @@ protected function createStackDriver(array $config) ...
false
Other
laravel
framework
1730fa0ea30c83a7ee5e85ef616d7b5bf0de498e.json
Add Azure SQL Server "connection lost" message
src/Illuminate/Database/DetectsLostConnections.php
@@ -38,6 +38,7 @@ protected function causedByLostConnection(Throwable $e) 'ORA-03114', 'Packets out of order. Expected', 'Adaptive Server connection failed', + 'Communication link failure', ]); } }
false
Other
laravel
framework
4c6849dbab40e585097db3124eae6fa01cd9e322.json
Apply fixes from StyleCI (#27294)
src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
@@ -2,8 +2,6 @@ namespace Illuminate\Database\Eloquent; -use Illuminate\Database\Eloquent\Builder; - /** * @mixin \Illuminate\Database\Eloquent\Builder */
false
Other
laravel
framework
d9ea96e554abc6db534b0454a77dc063123256aa.json
Apply fixes from StyleCI (#27293)
src/Illuminate/Database/Eloquent/HigherOrderBuilderProxy.php
@@ -2,8 +2,6 @@ namespace Illuminate\Database\Eloquent; -use Illuminate\Database\Eloquent\Builder; - /** * @mixin \Illuminate\Database\Eloquent\Builder */
false
Other
laravel
framework
6fc5d25e2314a24c02ce1bdf6fa11b6cf7bddb2d.json
Add file method to ResponseFactory contract
src/Illuminate/Contracts/Routing/ResponseFactory.php
@@ -89,6 +89,15 @@ public function streamDownload($callback, $name = null, array $headers = [], $di */ public function download($file, $name = null, array $headers = [], $disposition = 'attachment'); + /** + * Return the raw contents of a binary file. + * + * @param \SplFileInfo|string $fi...
false
Other
laravel
framework
f2cba5f6af47f7a220eb39195752b5be37a16e7f.json
Add comments to the Lua scripts
src/Illuminate/Queue/LuaScripts.php
@@ -95,6 +95,7 @@ public static function migrateExpiredJobs() for i = 1, #val, 100 do redis.call('rpush', KEYS[2], unpack(val, i, math.min(i+99, #val))) + -- Push a notification for every job that was migrated... if KEYS[3] ~= nil then for j = 1, math.min(i+99, #val) do ...
false
Other
laravel
framework
d3cd5d9b75a11cc4172929e7585635d8360a592f.json
Remove unused bootstrap class This class isn't available in Bootstrap 4.
src/Illuminate/Foundation/Console/Presets/vue-stubs/ExampleComponent.vue
@@ -2,7 +2,7 @@ <div class="container"> <div class="row justify-content-center"> <div class="col-md-8"> - <div class="card card-default"> + <div class="card"> <div class="card-header">Example Component</div> <div class=...
false
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
src/Illuminate/Console/Scheduling/CacheEventMutex.php
@@ -40,7 +40,7 @@ public function __construct(Cache $cache) public function create(Event $event) { return $this->cache->store($this->store)->add( - $event->mutexName(), true, $event->expiresAt + $event->mutexName(), true, $event->expiresAt * 60 ); }
true
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php
@@ -42,7 +42,7 @@ public function __construct(Cache $cache) public function create(Event $event, DateTimeInterface $time) { return $this->cache->store($this->store)->add( - $event->mutexName().$time->format('Hi'), true, 60 + $event->mutexName().$time->format('Hi'), true, 3600 ...
true
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
src/Illuminate/Filesystem/Cache.php
@@ -22,9 +22,9 @@ class Cache extends AbstractCache protected $key; /** - * The cache expiration time in minutes. + * The cache expiration time in seconds. * - * @var int + * @var int|null */ protected $expire; @@ -39,10 +39,7 @@ public function __construct(Repository $rep...
true
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
src/Illuminate/Foundation/Auth/ThrottlesLogins.php
@@ -33,7 +33,7 @@ protected function hasTooManyLoginAttempts(Request $request) protected function incrementLoginAttempts(Request $request) { $this->limiter()->hit( - $this->throttleKey($request), $this->decayMinutes() + $this->throttleKey($request), $this->decayMinutes() * 60 ...
true
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
src/Illuminate/Routing/Middleware/ThrottleRequests.php
@@ -53,7 +53,7 @@ public function handle($request, Closure $next, $maxAttempts = 60, $decayMinutes throw $this->buildException($key, $maxAttempts); } - $this->limiter->hit($key, $decayMinutes); + $this->limiter->hit($key, $decayMinutes * 60); $response = $next($request);...
true
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
src/Illuminate/Session/CacheBasedSessionHandler.php
@@ -63,7 +63,7 @@ public function read($sessionId) */ public function write($sessionId, $data) { - return $this->cache->put($sessionId, $data, $this->minutes); + return $this->cache->put($sessionId, $data, $this->minutes * 60); } /**
true
Other
laravel
framework
c537be971fb0c2da051d4c35438dca327ab9efca.json
Update components with new cache TTL
tests/Console/Scheduling/CacheSchedulingMutexTest.php
@@ -52,23 +52,23 @@ public function setUp() public function testMutexReceivesCorrectCreate() { - $this->cacheRepository->shouldReceive('add')->once()->with($this->event->mutexName().$this->time->format('Hi'), true, 60)->andReturn(true); + $this->cacheRepository->shouldReceive('add')->once()->w...
true
Other
laravel
framework
a091aec8add9f7a603918e60873a242cc7e84cdc.json
Add missing fallback to put method
src/Illuminate/Contracts/Cache/Repository.php
@@ -24,7 +24,7 @@ public function pull($key, $default = null); * @param \DateTimeInterface|\DateInterval|float|int|null $minutes * @return bool */ - public function put($key, $value, $minutes); + public function put($key, $value, $minutes = null); /** * Store an item in the cache ...
false
Other
laravel
framework
33eff6c5ed4e48e79eb36811fb6246e7c35dfda2.json
Implement higher order orWhere for simpler scopes
src/Illuminate/Database/Eloquent/Builder.php
@@ -3,17 +3,20 @@ namespace Illuminate\Database\Eloquent; use Closure; +use Exception; use BadMethodCallException; use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Pagination\Paginator; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Support\Traits\ForwardsCalls; use Illumina...
true
Other
laravel
framework
33eff6c5ed4e48e79eb36811fb6246e7c35dfda2.json
Implement higher order orWhere for simpler scopes
src/Illuminate/Support/HigherOrderBuilderProxy.php
@@ -0,0 +1,51 @@ +<?php + +namespace Illuminate\Support; + +use Illuminate\Database\Eloquent\Builder; + +/** + * @mixin \Illuminate\Database\Eloquent\Builder + */ +class HigherOrderBuilderProxy +{ + /** + * The collection being operated on. + * + * @var \Illuminate\Database\Eloquent\Builder + */ + ...
true
Other
laravel
framework
33eff6c5ed4e48e79eb36811fb6246e7c35dfda2.json
Implement higher order orWhere for simpler scopes
tests/Database/DatabaseEloquentBuilderTest.php
@@ -628,6 +628,22 @@ public function testRealNestedWhereWithMultipleScopesAndOneDeadScope() $this->assertEquals(['bar', 9000], $query->getBindings()); } + public function testRealQueryHigherOrderOrWhereScopes() + { + $model = new EloquentBuilderTestHigherOrderWhereScopeStub; + $this-...
true
Other
laravel
framework
df153ce876e644c74357dd1310dedd983dc40446.json
Use config for verification expiry time
src/Illuminate/Auth/Notifications/VerifyEmail.php
@@ -59,7 +59,7 @@ public function toMail($notifiable) protected function verificationUrl($notifiable) { return URL::temporarySignedRoute( - 'verification.verify', Carbon::now()->addMinutes(60), ['id' => $notifiable->getKey()] + 'verification.verify', Carbon::now()->addMinutes(co...
false
Other
laravel
framework
0e7e8e52e9925662774e67ed24dd4f98ffd53cbd.json
Fix return type
src/Illuminate/Cache/CacheManager.php
@@ -222,7 +222,7 @@ protected function createDatabaseDriver(array $config) * Create an instance of the DynamoDB cache driver. * * @param array $config - * @return \Illuminate\Cache\DynamoDbStore + * @return \Illuminate\Cache\Repository */ protected function createDynamodbDriver(ar...
false
Other
laravel
framework
83510499970ca402c0a97d7fb3e310c4cf801cbe.json
Fix method signature in DocBlock
src/Illuminate/Support/Facades/URL.php
@@ -12,8 +12,8 @@ * @method static string route(string $name, $parameters = [], bool $absolute = true) * @method static string action(string $action, $parameters = [], bool $absolute = true) * @method static \Illuminate\Contracts\Routing\UrlGenerator setRootControllerNamespace(string $rootNamespace) - * @method s...
false
Other
laravel
framework
e89a7bfb7f5dcf322bf9a2ea2f20a849122d4bdb.json
Rename the test functions.
tests/Pagination/LengthAwarePaginatorTest.php
@@ -104,7 +104,7 @@ public function testLengthAwarePaginatorCorrectlyGenerateUrlsWithQueryAndSpaces( $this->p->url($this->p->currentPage())); } - public function testItRetrievesPaginatorOptions() + public function testItRetrievesThePaginatorOptions() { $this->asse...
true
Other
laravel
framework
e89a7bfb7f5dcf322bf9a2ea2f20a849122d4bdb.json
Rename the test functions.
tests/Pagination/PaginatorTest.php
@@ -47,7 +47,7 @@ public function testPaginatorGeneratesUrlsWithoutTrailingSlash() $this->assertEquals('http://website.com/test?page=1', $p->previousPageUrl()); } - public function testItRetrievesPaginatorOptions() + public function testItRetrievesThePaginatorOptions() { $p = new Pag...
true
Other
laravel
framework
9e25f7d21721a0c13d04679fa59a68a8c788fdbc.json
Apply parameters to entire localization array When calling ```php __('foobar', ['foo' => 'bar']); ``` to retrieve an entire localization array, the parameters are not applied. This minor change applies parameters to all lines retrieved.
src/Illuminate/Translation/Translator.php
@@ -244,6 +244,9 @@ protected function getLine($namespace, $group, $locale, $item, array $replace) if (is_string($line)) { return $this->makeReplacements($line, $replace); } elseif (is_array($line) && count($line) > 0) { + foreach($line as $key => $val) { + $line...
false
Other
laravel
framework
3c5fd2873f7225d884e1c88fb5877ae69ce8b644.json
Fix return types in CacheManager The current return types aren't correct as an instance of a repository is returned each time instead of the store itself.
src/Illuminate/Cache/CacheManager.php
@@ -124,7 +124,7 @@ protected function callCustomCreator(array $config) * Create an instance of the APC cache driver. * * @param array $config - * @return \Illuminate\Cache\ApcStore + * @return \Illuminate\Cache\Repository */ protected function createApcDriver(array $config) ...
false
Other
laravel
framework
5a6a46bcb8dfd556c1e84e47df77cee8fc108ad7.json
Fix some docblocks and smaller things
src/Illuminate/Cache/DynamoDbStore.php
@@ -31,21 +31,21 @@ class DynamoDbStore implements Store /** * The name of the attribute that should hold the key. * - * @var string + * @var string */ protected $keyAttribute; /** * The name of the attribute that should hold the value. * - * @var string + ...
false
Other
laravel
framework
1a43d7dbfc98f45841f817b0b6f45f2781275817.json
Use config to resolve database value.
src/Illuminate/Foundation/Testing/RefreshDatabase.php
@@ -25,9 +25,9 @@ public function refreshDatabase() */ protected function usingInMemoryDatabase() { - return config('database.connections')[ - config('database.default') - ]['database'] === ':memory:'; + $default = config('database.default'); + + return config("dat...
false
Other
laravel
framework
0a0442bf3d3516562c8f8e15a97cf69e0dfaece5.json
Use a Lua script for RedisQueue::push
src/Illuminate/Queue/LuaScripts.php
@@ -104,6 +104,26 @@ public static function migrateExpiredJobs() end return val +LUA; + } + + /** + * Get the Lua script for pushing jobs onto the queue. + * + * KEYS[1] - The queue to push the job onto, for example: queues:foo + * KEYS[2] - The notification list fot the queue we are pushing j...
true
Other
laravel
framework
0a0442bf3d3516562c8f8e15a97cf69e0dfaece5.json
Use a Lua script for RedisQueue::push
src/Illuminate/Queue/RedisQueue.php
@@ -88,16 +88,7 @@ public function size($queue = null) */ public function push($job, $data = '', $queue = null) { - if (is_null($this->blockFor)) { - return $this->pushRaw($this->createPayload($job, $this->getQueue($queue), $data), $queue); - } - - $this->getConnection()-...
true
Other
laravel
framework
0a0442bf3d3516562c8f8e15a97cf69e0dfaece5.json
Use a Lua script for RedisQueue::push
tests/Queue/QueueRedisQueueTest.php
@@ -6,6 +6,7 @@ use Illuminate\Queue\Queue; use Illuminate\Support\Carbon; use PHPUnit\Framework\TestCase; +use Illuminate\Queue\LuaScripts; use Illuminate\Queue\RedisQueue; use Illuminate\Contracts\Redis\Factory; @@ -21,7 +22,7 @@ public function testPushProperlyPushesJobOntoRedis() $queue = $this->get...
true
Other
laravel
framework
b15236fb5c6557eab73282bbf4ba84d5ad2d116b.json
Apply fixes from StyleCI (#27232)
tests/Integration/Cache/MemcachedCacheLockTest.php
@@ -4,7 +4,6 @@ use Memcached; use Illuminate\Support\Carbon; -use Orchestra\Testbench\TestCase; use Illuminate\Support\Facades\Cache; /**
true
Other
laravel
framework
b15236fb5c6557eab73282bbf4ba84d5ad2d116b.json
Apply fixes from StyleCI (#27232)
tests/Integration/Cache/MemcachedIntegrationTest.php
@@ -3,9 +3,7 @@ namespace Illuminate\Tests\Integration\Cache; use Memcached; -use Illuminate\Support\Carbon; use Orchestra\Testbench\TestCase; -use Illuminate\Support\Facades\Cache; /** * @group integration
true
Other
laravel
framework
b15236fb5c6557eab73282bbf4ba84d5ad2d116b.json
Apply fixes from StyleCI (#27232)
tests/Integration/Cache/MemcachedTaggedCacheTest.php
@@ -3,8 +3,6 @@ namespace Illuminate\Tests\Integration\Cache; use Memcached; -use Illuminate\Support\Carbon; -use Orchestra\Testbench\TestCase; use Illuminate\Support\Facades\Cache; /** @@ -35,7 +33,6 @@ public function test_memcached_can_store_and_retrieve_tagged_cache_items() $this->assertNull($store...
true
Other
laravel
framework
b0a087370c9595efd426506439f52967b1711eaa.json
Simplify file cache Thanks to the changes of the cache repository we can simplify this call.
src/Illuminate/Filesystem/Cache.php
@@ -68,10 +68,6 @@ public function save() { $contents = $this->getForStorage(); - if (! is_null($this->expire)) { - $this->repository->put($this->key, $contents, $this->expire); - } else { - $this->repository->forever($this->key, $contents); - } + $this-...
false
Other
laravel
framework
eb6087c370a3584a1f1e232d564194e551694349.json
Fix PSR-16 TTL conformity These changes to the Cache Repository interface and implementation will make our cache implementation compliant with the PSR-16 standard's TTL requirements. It contains some significant changes in how we handle and store cache values. The main change that was done is that now a TTL with a va...
src/Illuminate/Cache/RedisTaggedCache.php
@@ -22,11 +22,15 @@ class RedisTaggedCache extends TaggedCache * * @param string $key * @param mixed $value - * @param \DateTime|float|int|null $minutes + * @param \DateTimeInterface|\DateInterval|float|int|null $minutes * @return bool */ public function put($key, $va...
true
Other
laravel
framework
eb6087c370a3584a1f1e232d564194e551694349.json
Fix PSR-16 TTL conformity These changes to the Cache Repository interface and implementation will make our cache implementation compliant with the PSR-16 standard's TTL requirements. It contains some significant changes in how we handle and store cache values. The main change that was done is that now a TTL with a va...
src/Illuminate/Cache/Repository.php
@@ -44,7 +44,7 @@ class Repository implements CacheContract, ArrayAccess /** * The default number of minutes to store items. * - * @var float|int + * @var float|int|null */ protected $default = 60; @@ -199,22 +199,26 @@ public function pull($key, $default = null) public functi...
true
Other
laravel
framework
eb6087c370a3584a1f1e232d564194e551694349.json
Fix PSR-16 TTL conformity These changes to the Cache Repository interface and implementation will make our cache implementation compliant with the PSR-16 standard's TTL requirements. It contains some significant changes in how we handle and store cache values. The main change that was done is that now a TTL with a va...
src/Illuminate/Cache/TaggedCache.php
@@ -6,7 +6,9 @@ class TaggedCache extends Repository { - use RetrievesMultipleKeys; + use RetrievesMultipleKeys { + putMany as putManyAlias; + } /** * The tag set instance. @@ -29,6 +31,22 @@ public function __construct(Store $store, TagSet $tags) $this->tags = $tags; } ...
true
Other
laravel
framework
eb6087c370a3584a1f1e232d564194e551694349.json
Fix PSR-16 TTL conformity These changes to the Cache Repository interface and implementation will make our cache implementation compliant with the PSR-16 standard's TTL requirements. It contains some significant changes in how we handle and store cache values. The main change that was done is that now a TTL with a va...
src/Illuminate/Contracts/Cache/Repository.php
@@ -21,7 +21,7 @@ public function pull($key, $default = null); * * @param string $key * @param mixed $value - * @param \DateTimeInterface|\DateInterval|float|int $minutes + * @param \DateTimeInterface|\DateInterval|float|int|null $minutes * @return bool */ public func...
true
Other
laravel
framework
eb6087c370a3584a1f1e232d564194e551694349.json
Fix PSR-16 TTL conformity These changes to the Cache Repository interface and implementation will make our cache implementation compliant with the PSR-16 standard's TTL requirements. It contains some significant changes in how we handle and store cache values. The main change that was done is that now a TTL with a va...
tests/Cache/CacheRepositoryTest.php
@@ -137,24 +137,30 @@ public function testSettingMultipleItemsInCache() $this->assertTrue($result); } - public function testPutWithDatetimeInPastOrZeroSecondsDoesntSaveItem() + public function testPutWithNullTTLRemembersItemForever() + { + $repo = $this->getRepository(); + $repo->...
true
Other
laravel
framework
eb6087c370a3584a1f1e232d564194e551694349.json
Fix PSR-16 TTL conformity These changes to the Cache Repository interface and implementation will make our cache implementation compliant with the PSR-16 standard's TTL requirements. It contains some significant changes in how we handle and store cache values. The main change that was done is that now a TTL with a va...
tests/Cache/CacheTaggedCacheTest.php
@@ -111,6 +111,23 @@ public function testRedisCacheTagsPushStandardKeysCorrectly() $conn->shouldReceive('sadd')->once()->with('prefix:foo:standard_ref', 'prefix:'.sha1('foo|bar').':key1'); $conn->shouldReceive('sadd')->once()->with('prefix:bar:standard_ref', 'prefix:'.sha1('foo|bar').':key1'); ...
true
Other
laravel
framework
8aa403ebafde3fd51048e427aaf2ae8081c2ff9d.json
update dynamo store
src/Illuminate/Cache/DynamoDbStore.php
@@ -172,7 +172,7 @@ protected function isExpired(array $item, $expiration = null) * @param string $key * @param mixed $value * @param float|int $minutes - * @return void + * @return bool */ public function put($key, $value, $minutes) { @@ -190,6 +190,8 @@ public function...
false
Other
laravel
framework
cf8238d45e6c037566619e9ca0c01a91e8816f69.json
Fix return of add method in Cache Repository The success should depend on the result of the put method call.
src/Illuminate/Cache/Repository.php
@@ -284,9 +284,7 @@ public function add($key, $value, $minutes) // so it exists for subsequent requests. Then, we will return true so it is // easy to know if the value gets added. Otherwise, we will return false. if (is_null($this->get($key))) { - $this->put($key, $value, $minutes...
true
Other
laravel
framework
cf8238d45e6c037566619e9ca0c01a91e8816f69.json
Fix return of add method in Cache Repository The success should depend on the result of the put method call.
tests/Cache/CacheRepositoryTest.php
@@ -157,6 +157,15 @@ public function testAddWithDatetimeInPastOrZeroSecondsReturnsImmediately() $this->assertFalse($result); } + public function testAddWithStoreFailureReturnsFalse() + { + $repo = $this->getRepository(); + $repo->getStore()->shouldReceive('add')->never(); + $r...
true
Other
laravel
framework
ac09aa395d0f05842e5bf37e8aaeecf639e08bb6.json
Simplify booleans in RedisStore
src/Illuminate/Cache/RedisStore.php
@@ -89,11 +89,9 @@ public function many(array $keys) */ public function put($key, $value, $minutes) { - $result = $this->connection()->setex( + return (bool) $this->connection()->setex( $this->prefix.$key, (int) max(1, $minutes * 60), $this->serialize($value) ); - - ...
false
Other
laravel
framework
51c6bb8e6430dcf5479565a02ceca52884393daf.json
Remove overwritten methods on Repository interface These methods are already defined on the PSR contract and it's unnecessary to define them twice.
src/Illuminate/Contracts/Cache/Repository.php
@@ -7,23 +7,6 @@ interface Repository extends CacheInterface { - /** - * Determine if an item exists in the cache. - * - * @param string $key - * @return bool - */ - public function has($key); - - /** - * Retrieve an item from the cache by key. - * - * @param string $key...
false
Other
laravel
framework
3f62df631e480dd253fb6f2a5dec8cc5fa94ebf6.json
Adjust Cache::remember() to work with ArrayStore
src/Illuminate/Cache/ArrayStore.php
@@ -2,9 +2,11 @@ namespace Illuminate\Cache; +use Illuminate\Support\InteractsWithTime; + class ArrayStore extends TaggableStore { - use RetrievesMultipleKeys; + use RetrievesMultipleKeys, InteractsWithTime; /** * The array of stored values. @@ -21,7 +23,18 @@ class ArrayStore extends Taggable...
true
Other
laravel
framework
3f62df631e480dd253fb6f2a5dec8cc5fa94ebf6.json
Adjust Cache::remember() to work with ArrayStore
tests/Cache/CacheArrayStoreTest.php
@@ -2,6 +2,7 @@ namespace Illuminate\Tests\Cache; +use Illuminate\Support\Carbon; use PHPUnit\Framework\TestCase; use Illuminate\Cache\ArrayStore; @@ -33,6 +34,19 @@ public function testMultipleItemsCanBeSetAndRetrieved() ], $store->many(['foo', 'fizz', 'quz', 'norf'])); } + public function ...
true
Other
laravel
framework
cca9bfffc1f0a33bbb42d843208383c8fd3f83ec.json
Extract Container extend tests
tests/Container/ContainerExtendTest.php
@@ -0,0 +1,200 @@ +<?php + +namespace Illuminate\Tests\Container; + +use stdClass; +use PHPUnit\Framework\TestCase; +use Illuminate\Container\Container; + +class ContainerExtendTest extends TestCase +{ + public function testExtendedBindings() + { + $container = new Container; + $container['foo'] = '...
true
Other
laravel
framework
cca9bfffc1f0a33bbb42d843208383c8fd3f83ec.json
Extract Container extend tests
tests/Container/ContainerTest.php
@@ -151,48 +151,6 @@ public function testBindingsCanBeOverridden() $this->assertEquals('baz', $container['foo']); } - public function testExtendedBindings() - { - $container = new Container; - $container['foo'] = 'foo'; - $container->extend('foo', function ($old, $container) {...
true
Other
laravel
framework
77e668fbf2d9dc41ac5f0df86ee8b4f6dee99a80.json
Extract App::call tests into a file
tests/Container/ContainerCallTest.php
@@ -0,0 +1,195 @@ +<?php + +namespace Illuminate\Tests\Container; + +use Closure; +use stdClass; +use PHPUnit\Framework\TestCase; +use Illuminate\Container\Container; + +class ContainerCallTest extends TestCase +{ + /** + * @expectedException \ReflectionException + * @expectedExceptionMessage Function Contai...
true
Other
laravel
framework
77e668fbf2d9dc41ac5f0df86ee8b4f6dee99a80.json
Extract App::call tests into a file
tests/Container/ContainerTest.php
@@ -2,7 +2,6 @@ namespace Illuminate\Tests\Container; -use Closure; use stdClass; use PHPUnit\Framework\TestCase; use Illuminate\Container\Container; @@ -435,144 +434,6 @@ public function testBindingResolutionExceptionMessageIncludesBuildStack() $container->make(ContainerTestContextInjectOne::class, []...
true
Other
laravel
framework
a7a0c65b3d2ee1eae68d3d7e749ba41aba7caa72.json
Apply fixes from StyleCI (#27127)
src/Illuminate/Cache/DynamoDbLock.php
@@ -2,9 +2,6 @@ namespace Illuminate\Cache; -use Illuminate\Cache\Lock; -use Aws\DynamoDb\DynamoDbClient; - class DynamoDbLock extends Lock { /**
true
Other
laravel
framework
a7a0c65b3d2ee1eae68d3d7e749ba41aba7caa72.json
Apply fixes from StyleCI (#27127)
src/Illuminate/Cache/DynamoDbStore.php
@@ -124,10 +124,10 @@ public function many(array $keys) 'Keys' => collect($keys)->map(function ($key) { return [ $this->keyAttribute => [ - 'S' => $key - ] + ...
true