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
5682bdbc2a14cd982c50981dadfe0df4634084da.json
Support Collection#countBy($key) (#33852)
tests/Support/SupportCollectionTest.php
@@ -478,7 +478,7 @@ public function testCountable($collection) /** * @dataProvider collectionClassProvider */ - public function testCountableByWithoutPredicate($collection) + public function testCountByStandalone($collection) { $c = new $collection(['foo', 'foo', 'foo', 'bar', 'bar'...
true
Other
laravel
framework
bafe68fa48e16cecb54a8e9e670b878cc98e4f5e.json
support dark mode
src/Illuminate/Foundation/Exceptions/views/minimal.blade.php
@@ -10,8 +10,9 @@ <link rel="dns-prefetch" href="//fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet"> - <!-- Styles --> - <link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet"> + <style> + ...
false
Other
laravel
framework
9c61823bc07b2e84583b1a9c9ccbc89cab2798e4.json
Update FilesystemAdapter.php (#33827)
src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -132,7 +132,7 @@ public function get($path) try { return $this->driver->read($path); } catch (FileNotFoundException $e) { - throw new ContractFileNotFoundException($path, $e->getCode(), $e); + throw new ContractFileNotFoundException($e->getMessage(), $e->getCode()...
false
Other
laravel
framework
2aa0563d7fdf1de0d0c7be00d50c2eeaa184b219.json
Simplify encryption mac validation (#33789)
src/Illuminate/Encryption/Encrypter.php
@@ -222,24 +222,8 @@ protected function validPayload($payload) */ protected function validMac(array $payload) { - $calculated = $this->calculateMac($payload, $bytes = random_bytes(16)); - return hash_equals( - hash_hmac('sha256', $payload['mac'], $bytes, true), $calculated - ...
false
Other
laravel
framework
ed12061a9a5e512a32c69db00cd6922db77533a1.json
change method order
src/Illuminate/Support/Traits/EnumeratesValues.php
@@ -956,27 +956,27 @@ protected function equality($value) } /** - * Make a function that returns what's passed to it. + * Make a function using another function, by negating its result. * + * @param \Closure $callback * @return \Closure */ - protected function identity() +...
false
Other
laravel
framework
0cb88d66e87b8843307c98f604216ae73e76453b.json
Apply fixes from StyleCI (#33793)
src/Illuminate/Support/helpers.php
@@ -396,7 +396,7 @@ function retry($times, callable $callback, $sleep = 0, $when = null) { $attempts = 0; - beginning: + beginning : $attempts++; $times--;
false
Other
laravel
framework
55f3b1542751df86610d4d3be88e3fc77e4709cc.json
allow false guard
src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
@@ -71,7 +71,9 @@ public function mergeFillable(array $fillable) */ public function getGuarded() { - return $this->guarded; + return $this->guarded === false + ? [] + : $this->guarded; } /**
false
Other
laravel
framework
51c1c89959002872135a403dac051c547c85d247.json
Apply fixes from StyleCI (#33776)
src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
@@ -233,8 +233,7 @@ protected function ensureModelHasValidGuardState() { if (! empty($this->getGuarded()) && $this->getGuarded() !== ['*']) { - - throw new LogicException("For added security, guarded attributes are no longer supported. Please use fillable instead."); + t...
false
Other
laravel
framework
7a74817c91be61676deafe3a84a758a71350d9f2.json
Apply fixes from StyleCI (#33773)
src/Illuminate/Database/Eloquent/Model.php
@@ -17,7 +17,6 @@ use Illuminate\Support\Str; use Illuminate\Support\Traits\ForwardsCalls; use JsonSerializable; -use LogicException; abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable {
false
Other
laravel
framework
7af11f5acd7b76df47ad3e2453c8de49da27660f.json
Apply fixes from StyleCI (#33772)
src/Illuminate/Database/Eloquent/Model.php
@@ -379,7 +379,7 @@ protected function removeTableFromKey($key) if (strpos($key, '.') !== false) { if (! empty($this->getGuarded()) && $this->getGuarded() !== ['*']) { - throw new LogicException("Mass assignment of Eloquent attributes including table names is unsafe...
false
Other
laravel
framework
9240404b22ef6f9e827577b3753e4713ddce7471.json
protect table names and guarded
src/Illuminate/Database/Eloquent/Model.php
@@ -17,6 +17,7 @@ use Illuminate\Support\Str; use Illuminate\Support\Traits\ForwardsCalls; use JsonSerializable; +use LogicException; abstract class Model implements Arrayable, ArrayAccess, Jsonable, JsonSerializable, QueueableEntity, UrlRoutable { @@ -375,7 +376,16 @@ public function qualifyColumn($column) ...
true
Other
laravel
framework
9240404b22ef6f9e827577b3753e4713ddce7471.json
protect table names and guarded
tests/Integration/Database/EloquentModelTest.php
@@ -47,6 +47,15 @@ public function testCantUpdateGuardedAttributeUsingJson() $this->assertNull($model->id); } + public function testCantMassFillAttributesWithTableNamesWhenUsingGuarded() + { + $this->expectException(\LogicException::class); + + $model = new TestModel2; + + $mo...
true
Other
laravel
framework
6232c084adf5ccc0629bd56042a89fe588b8dc93.json
Apply fixes from StyleCI (#33762)
tests/Database/DatabaseQueryBuilderTest.php
@@ -2704,7 +2704,7 @@ public function testMySqlWrappingJsonWithBooleanAndIntegerThatLooksLikeOne() public function testJsonPathEscaping() { - $expectedWithJsonEscaped = <<<SQL + $expectedWithJsonEscaped = <<<'SQL' select json_unquote(json_extract(`json`, '$."''))#"')) SQL;
false
Other
laravel
framework
5dfafef41f9b2ebbdbf3f24b64f783ee49fb266d.json
Apply fixes from StyleCI (#33761)
tests/Database/DatabaseQueryBuilderTest.php
@@ -2622,7 +2622,7 @@ public function testMySqlWrappingJsonWithBooleanAndIntegerThatLooksLikeOne() public function testJsonPathEscaping() { - $expectedWithJsonEscaped = <<<SQL + $expectedWithJsonEscaped = <<<'SQL' select json_unquote(json_extract(`json`, '$."''))#"')) SQL;
false
Other
laravel
framework
687df01fa19c99546c1ae1dd53c2a465459b50dc.json
fix escaping quotes
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -1202,7 +1202,7 @@ protected function wrapJsonFieldAndPath($column) */ protected function wrapJsonPath($value, $delimiter = '->') { - $value = preg_replace("/([\\\\]+)?\\'/", "\\'", $value); + $value = preg_replace("/([\\\\]+)?\\'/", "''", $value); return '\'$."'.str_replace(...
true
Other
laravel
framework
687df01fa19c99546c1ae1dd53c2a465459b50dc.json
fix escaping quotes
tests/Database/DatabaseQueryBuilderTest.php
@@ -2623,7 +2623,7 @@ public function testMySqlWrappingJsonWithBooleanAndIntegerThatLooksLikeOne() public function testJsonPathEscaping() { $expectedWithJsonEscaped = <<<SQL -select json_unquote(json_extract(`json`, '$."\'))#"')) +select json_unquote(json_extract(`json`, '$."''))#"')) SQL; ...
true
Other
laravel
framework
1b70bef5fd7cc5da74abcdf79e283f830fa3b0a4.json
fix casing issue with guarded
src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
@@ -163,7 +163,7 @@ public function isFillable($key) */ public function isGuarded($key) { - return in_array($key, $this->getGuarded()) || $this->getGuarded() == ['*']; + return $this->getGuarded() == ['*'] || ! empty(preg_grep('/^'.preg_quote($key).'$/i', $this->getGuarded())); } ...
true
Other
laravel
framework
1b70bef5fd7cc5da74abcdf79e283f830fa3b0a4.json
fix casing issue with guarded
tests/Integration/Database/EloquentModelTest.php
@@ -29,6 +29,15 @@ protected function setUp(): void }); } + public function testCantUpdateGuardedAttributesUsingDifferentCasing() + { + $model = new TestModel2; + + $model->fill(['ID' => 123]); + + $this->assertNull($model->ID); + } + public function testUserCanUpdateN...
true
Other
laravel
framework
55e31ddbaef51fdafdc66a1030d90cb7565ab1cc.json
Append database name for withCount
src/Illuminate/Database/Query/Builder.php
@@ -339,6 +339,14 @@ protected function createSub($query) protected function parseSub($query) { if ($query instanceof self || $query instanceof EloquentBuilder || $query instanceof Relation) { + if ($query->getConnection()->getDatabaseName() !== $this->getConnection()->getDatabaseName()) {...
false
Other
laravel
framework
dae4e17286aa9d482f548c2883caa01e9435dd75.json
Update Component.php (#33744)
src/Illuminate/View/Component.php
@@ -49,14 +49,14 @@ abstract class Component /** * Get the view / view contents that represent the component. * - * @return \Illuminate\View\View|string + * @return \Illuminate\View\View|\Closure|string */ abstract public function render(); /** * Resolve the Blade view o...
false
Other
laravel
framework
7ce43078c2a46f7fcfc7f6f5b90fd3ff7a32f391.json
Fix return value
src/Illuminate/View/Compilers/ComponentTagCompiler.php
@@ -289,7 +289,7 @@ protected function partitionDataAndAttributes($class, array $attributes) return collect($attributes)->partition(function ($value, $key) use ($parameterNames) { return in_array(Str::camel($key), $parameterNames); - }); + })->all(); } /**
false
Other
laravel
framework
4d5c8cafda2f6b143b530f51bc62c3c841724342.json
Add the ability to pass parameters to Seeders call Breaking change in method signature
src/Illuminate/Database/Seeder.php
@@ -28,9 +28,10 @@ abstract class Seeder * * @param array|string $class * @param bool $silent + * @param mixed ...$params * @return $this */ - public function call($class, $silent = false) + public function call($class, $silent = false, ...$params) { $classes =...
true
Other
laravel
framework
4d5c8cafda2f6b143b530f51bc62c3c841724342.json
Add the ability to pass parameters to Seeders call Breaking change in method signature
tests/Database/DatabaseSeederTest.php
@@ -20,7 +20,7 @@ public function run() class TestDepsSeeder extends Seeder { - public function run(Mock $someDependency) + public function run(Mock $someDependency, $someParam = '') { // } @@ -76,6 +76,19 @@ public function testInjectDependenciesOnRunMethod() $seeder->__invoke()...
true
Other
laravel
framework
7fd3630d4a192b5823ea31488ddd724c7be733d7.json
add method alias
src/Illuminate/Foundation/Console/ClosureCommand.php
@@ -56,6 +56,17 @@ protected function execute(InputInterface $input, OutputInterface $output) ); } + /** + * Set the description for the command. + * + * @param string $description + * @return $this + */ + public function purpose($description) + { + return $this->de...
false
Other
laravel
framework
76af3fbf3c67889506ebbb1e94bd1060a20e9e5c.json
Apply fixes from StyleCI (#33726)
tests/Notifications/NotificationMailMessageTest.php
@@ -17,6 +17,7 @@ public function testTemplate() $this->assertSame('notifications::foo', $message->markdown); } + public function testHtmlView() { $message = new MailMessage; @@ -47,7 +48,6 @@ public function testPlainView() $this->assertSame(['foo' => 'bar'], $message->viewD...
false
Other
laravel
framework
f28bde37648f8125f39a01e804ef42db1ee183ed.json
Add plain mail to notifications (#33725) * Add Plain mail to notifications * Add TestMailNotificationWithPlain
src/Illuminate/Notifications/Channels/MailChannel.php
@@ -90,7 +90,10 @@ protected function messageBuilder($notifiable, $notification, $message) protected function buildView($message) { if ($message->view) { - return $message->view; + return [ + 'html' => $message->view, + 'text' => $message->textView,...
true
Other
laravel
framework
f28bde37648f8125f39a01e804ef42db1ee183ed.json
Add plain mail to notifications (#33725) * Add Plain mail to notifications * Add TestMailNotificationWithPlain
src/Illuminate/Notifications/Messages/MailMessage.php
@@ -17,6 +17,13 @@ class MailMessage extends SimpleMessage implements Renderable */ public $view; + /** + * The plain text view to use for the message. + * + * @var string + */ + public $textView; + /** * The view data for the message. * @@ -104,13 +111,28 @@ class Ma...
true
Other
laravel
framework
f28bde37648f8125f39a01e804ef42db1ee183ed.json
Add plain mail to notifications (#33725) * Add Plain mail to notifications * Add TestMailNotificationWithPlain
tests/Integration/Notifications/Fixtures/html.blade.php
@@ -0,0 +1 @@ +htmlContent
true
Other
laravel
framework
f28bde37648f8125f39a01e804ef42db1ee183ed.json
Add plain mail to notifications (#33725) * Add Plain mail to notifications * Add TestMailNotificationWithPlain
tests/Integration/Notifications/Fixtures/plain.blade.php
@@ -0,0 +1 @@ +plainContent
true
Other
laravel
framework
f28bde37648f8125f39a01e804ef42db1ee183ed.json
Add plain mail to notifications (#33725) * Add Plain mail to notifications * Add TestMailNotificationWithPlain
tests/Integration/Notifications/SendingMailNotificationsTest.php
@@ -14,6 +14,7 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Notifications\Notification; use Illuminate\Support\Facades\Schema; +use Illuminate\Support\Facades\View; use Illuminate\Support\Str; use Mockery as m; use Orchestra\Testbench\TestCase; @@ -61,6 +62,8 @@ protected function getEnvironmentSetU...
true
Other
laravel
framework
f28bde37648f8125f39a01e804ef42db1ee183ed.json
Add plain mail to notifications (#33725) * Add Plain mail to notifications * Add TestMailNotificationWithPlain
tests/Notifications/NotificationMailMessageTest.php
@@ -17,6 +17,36 @@ public function testTemplate() $this->assertSame('notifications::foo', $message->markdown); } + public function testHtmlView() + { + $message = new MailMessage; + + $this->assertSame(null, $message->view); + $this->assertSame([], $message->viewData); + + ...
true
Other
laravel
framework
cb94c13fa9463649b7a2acfe6a6d2fb85513fe13.json
fix FQCN in PHPDoc (#33708)
src/Illuminate/Database/Eloquent/Collection.php
@@ -633,7 +633,7 @@ public function getQueueableConnection() /** * Get the Eloquent query builder from the collection. * - * @return Illuminate\Database\Eloquen\Builder + * @return \Illuminate\Database\Eloquent\Builder * * @throws \LogicException */
false
Other
laravel
framework
84765753ee164e7b0978021c4d42711011aed340.json
fix key handling
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -562,7 +562,7 @@ protected function prepareCookiesForRequest() } return collect($this->defaultCookies)->map(function ($value, $key) { - return encrypt(CookieValuePrefix::create($key, base64_decode(substr(config('app.key'), 7))).$value, false); + return encrypt(CookieValuePre...
false
Other
laravel
framework
db157d06054674a88c4252ae48a75fd45938663d.json
fix cookie assertions
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -5,6 +5,7 @@ use ArrayAccess; use Closure; use Illuminate\Contracts\View\View; +use Illuminate\Cookie\CookieValuePrefix; use Illuminate\Database\Eloquent\Model; use Illuminate\Foundation\Testing\Assert as PHPUnit; use Illuminate\Foundation\Testing\Constraints\SeeInOrder; @@ -299,7 +300,8 @@ public function ass...
false
Other
laravel
framework
694003ce6334efad6b75d1b9365affc0c5e60764.json
Apply fixes from StyleCI (#33675)
src/Illuminate/Collections/Traits/EnumeratesValues.php
@@ -171,7 +171,7 @@ public function dd(...$args) { call_user_func_array([$this, 'dump'], $args); - die(1); + exit(1); } /**
true
Other
laravel
framework
694003ce6334efad6b75d1b9365affc0c5e60764.json
Apply fixes from StyleCI (#33675)
src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
@@ -105,6 +105,6 @@ protected function writeErrorAndDie(InvalidFileException $e) $output->writeln('The environment file is invalid!'); $output->writeln($e->getMessage()); - die(1); + exit(1); } }
true
Other
laravel
framework
694003ce6334efad6b75d1b9365affc0c5e60764.json
Apply fixes from StyleCI (#33675)
src/Illuminate/Queue/Listener.php
@@ -215,7 +215,7 @@ public function memoryExceeded($memoryLimit) */ public function stop() { - die; + exit; } /**
true
Other
laravel
framework
694003ce6334efad6b75d1b9365affc0c5e60764.json
Apply fixes from StyleCI (#33675)
src/Illuminate/Routing/Router.php
@@ -707,7 +707,7 @@ public function gatherRouteMiddleware(Route $route) $middleware = collect($route->gatherMiddleware())->map(function ($name) { return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups); - })->flatten()->reject(function ($name) use...
true
Other
laravel
framework
694003ce6334efad6b75d1b9365affc0c5e60764.json
Apply fixes from StyleCI (#33675)
src/Illuminate/Support/Stringable.php
@@ -669,7 +669,7 @@ public function dd() { $this->dump(); - die(1); + exit(1); } /**
true
Other
laravel
framework
694003ce6334efad6b75d1b9365affc0c5e60764.json
Apply fixes from StyleCI (#33675)
tests/Queue/RedisQueueIntegrationTest.php
@@ -91,7 +91,7 @@ public function testBlockingPop($driver) $this->setQueue('phpredis'); sleep(1); $this->queue->push(new RedisQueueIntegrationTestJob(12)); - die; + exit; } else { $this->fail('Cannot fork'); }
true
Other
laravel
framework
e492eaa41b6abc741bdbaec9e22408c14f8c7c07.json
Apply fixes from StyleCI (#33674)
src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
@@ -105,6 +105,6 @@ protected function writeErrorAndDie(InvalidFileException $e) $output->writeln('The environment file is invalid!'); $output->writeln($e->getMessage()); - die(1); + exit(1); } }
true
Other
laravel
framework
e492eaa41b6abc741bdbaec9e22408c14f8c7c07.json
Apply fixes from StyleCI (#33674)
src/Illuminate/Queue/Listener.php
@@ -214,7 +214,7 @@ public function memoryExceeded($memoryLimit) */ public function stop() { - die; + exit; } /**
true
Other
laravel
framework
e492eaa41b6abc741bdbaec9e22408c14f8c7c07.json
Apply fixes from StyleCI (#33674)
src/Illuminate/Routing/Router.php
@@ -701,7 +701,7 @@ public function gatherRouteMiddleware(Route $route) $middleware = collect($route->gatherMiddleware())->map(function ($name) { return (array) MiddlewareNameResolver::resolve($name, $this->middleware, $this->middlewareGroups); - })->flatten()->reject(function ($name) use...
true
Other
laravel
framework
e492eaa41b6abc741bdbaec9e22408c14f8c7c07.json
Apply fixes from StyleCI (#33674)
src/Illuminate/Support/Stringable.php
@@ -669,7 +669,7 @@ public function dd() { $this->dump(); - die(1); + exit(1); } /**
true
Other
laravel
framework
e492eaa41b6abc741bdbaec9e22408c14f8c7c07.json
Apply fixes from StyleCI (#33674)
src/Illuminate/Support/Traits/EnumeratesValues.php
@@ -171,7 +171,7 @@ public function dd(...$args) { call_user_func_array([$this, 'dump'], $args); - die(1); + exit(1); } /**
true
Other
laravel
framework
e492eaa41b6abc741bdbaec9e22408c14f8c7c07.json
Apply fixes from StyleCI (#33674)
tests/Queue/RedisQueueIntegrationTest.php
@@ -91,7 +91,7 @@ public function testBlockingPop($driver) $this->setQueue('phpredis'); sleep(1); $this->queue->push(new RedisQueueIntegrationTestJob(12)); - die; + exit; } else { $this->fail('Cannot fork'); }
true
Other
laravel
framework
eaf9db5d1f079a02aa6536c09481d138754fb7f8.json
Apply fixes from StyleCI (#33673)
src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php
@@ -105,6 +105,6 @@ protected function writeErrorAndDie(InvalidFileException $e) $output->writeln('The environment file is invalid!'); $output->writeln($e->getMessage()); - die(1); + exit(1); } }
true
Other
laravel
framework
eaf9db5d1f079a02aa6536c09481d138754fb7f8.json
Apply fixes from StyleCI (#33673)
src/Illuminate/Queue/Listener.php
@@ -214,7 +214,7 @@ public function memoryExceeded($memoryLimit) */ public function stop() { - die; + exit; } /**
true
Other
laravel
framework
eaf9db5d1f079a02aa6536c09481d138754fb7f8.json
Apply fixes from StyleCI (#33673)
src/Illuminate/Support/Traits/EnumeratesValues.php
@@ -145,7 +145,7 @@ public function dd(...$args) { call_user_func_array([$this, 'dump'], $args); - die(1); + exit(1); } /**
true
Other
laravel
framework
eaf9db5d1f079a02aa6536c09481d138754fb7f8.json
Apply fixes from StyleCI (#33673)
tests/Queue/RedisQueueIntegrationTest.php
@@ -90,7 +90,7 @@ public function testBlockingPop($driver) $this->setQueue('phpredis'); sleep(1); $this->queue->push(new RedisQueueIntegrationTestJob(12)); - die; + exit; } else { $this->fail('Cannot fork'); }
true
Other
laravel
framework
f86d9bd7451123e437dd068714e9258145a61c20.json
Add tests for new method implementation
tests/Testing/TestResponseTest.php
@@ -431,6 +431,33 @@ public function testAssertSimilarJsonWithMixed() $response->assertSimilarJson($expected); } + public function testAssertExactJsonWithMixedWhenDataIsExactlySame() + { + $response = TestResponse::fromBaseResponse(new Response(new JsonSerializableMixedResourcesStub)); + + ...
false
Other
laravel
framework
8e0914e847e8b161a1968a68f9f80003e23136db.json
Add new implementation of assertExactJson
src/Illuminate/Testing/TestResponse.php
@@ -530,6 +530,44 @@ public function assertJsonPath($path, $expect) return $this; } + /** + * Assert that the response has the exact given JSON. + * + * @param array $data + * @return $this + */ + public function assertExactJson(array $data) + { + $actual = $this->r...
false
Other
laravel
framework
bb9db21af137344feffa192fcabe4e439c8b0f60.json
fix cookie issues
src/Illuminate/Cookie/Middleware/EncryptCookies.php
@@ -83,7 +83,7 @@ protected function decrypt(Request $request) $value = $this->decryptCookie($key, $cookie); $request->cookies->set( - $key, strpos($value, sha1($key).'|') !== 0 ? null : substr($value, 41) + $key, strpos($value, sha1($key.'v2').'...
true
Other
laravel
framework
bb9db21af137344feffa192fcabe4e439c8b0f60.json
fix cookie issues
src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
@@ -151,7 +151,7 @@ protected function getTokenFromRequest($request) $token = $request->input('_token') ?: $request->header('X-CSRF-TOKEN'); if (! $token && $header = $request->header('X-XSRF-TOKEN')) { - $token = $this->encrypter->decrypt($header, static::serialized()); + $tok...
true
Other
laravel
framework
bb9db21af137344feffa192fcabe4e439c8b0f60.json
fix cookie issues
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -560,8 +560,8 @@ protected function prepareCookiesForRequest() return array_merge($this->defaultCookies, $this->unencryptedCookies); } - return collect($this->defaultCookies)->map(function ($value) { - return encrypt($value, false); + return collect($this->defaultCook...
true
Other
laravel
framework
594a3abdec383b55ce32a9e960263f55b41318e2.json
improve cookie encryption (#33662)
src/Illuminate/Cookie/Middleware/EncryptCookies.php
@@ -80,7 +80,11 @@ protected function decrypt(Request $request) } try { - $request->cookies->set($key, $this->decryptCookie($key, $cookie)); + $value = $this->decryptCookie($key, $cookie); + + $request->cookies->set( + $key, str...
false
Other
laravel
framework
29c64cb6c1d8cc712463c63fcf60c0a46fe3455e.json
remove unneeded variable
src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -40,7 +40,11 @@ public function transaction(Closure $callback, $attempts = 1) } try { - $this->commit(); + if ($this->transactions == 1) { + $this->getPdo()->commit(); + } + + $this->transactions = max(0, $this...
false
Other
laravel
framework
c4cdfc7c54127b772ef10f37cfc9ef8e9d6b3227.json
fix transaction problems on closure transaction
src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -45,15 +45,25 @@ public function transaction(Closure $callback, $attempts = 1) } try { - $this->commit(); + if ($this->transactions == 1) { + $this->getPdo()->commit(); + } + + $this->transactions = max(0, $thi...
false
Other
laravel
framework
f9374fa5fb0450721fb2f90e96adef9d409b112c.json
Remove $key parameter. Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
src/Illuminate/Testing/TestResponse.php
@@ -685,12 +685,11 @@ public function assertJsonMissingValidationErrors($keys = null, $responseKey = ' /** * Validate and return the decoded response JSON. * - * @param string|null $key * @return \Illuminate\Testing\TestJson * * @throws \Throwable */ - public function d...
false
Other
laravel
framework
29ad35650182af6020e725d42064447ee851f569.json
Add a base exception for Http exceptions (#33581)
src/Illuminate/Http/Client/ConnectionException.php
@@ -2,9 +2,7 @@ namespace Illuminate\Http\Client; -use Exception; - -class ConnectionException extends Exception +class ConnectionException extends HttpClientException { // }
true
Other
laravel
framework
29ad35650182af6020e725d42064447ee851f569.json
Add a base exception for Http exceptions (#33581)
src/Illuminate/Http/Client/HttpClientException.php
@@ -0,0 +1,10 @@ +<?php + +namespace Illuminate\Http\Client; + +use Exception; + +class HttpClientException extends Exception +{ + // +}
true
Other
laravel
framework
29ad35650182af6020e725d42064447ee851f569.json
Add a base exception for Http exceptions (#33581)
src/Illuminate/Http/Client/RequestException.php
@@ -2,9 +2,7 @@ namespace Illuminate\Http\Client; -use Exception; - -class RequestException extends Exception +class RequestException extends HttpClientException { /** * The response instance.
true
Other
laravel
framework
8cd28a3a78eaf0097e7bcac29309646310cd277d.json
Update PHPDoc comments to match signature (#33580)
src/Illuminate/Log/LogManager.php
@@ -477,7 +477,7 @@ public function extend($driver, Closure $callback) /** * Unset the given channel instance. * - * @param string|null $name + * @param string|null $driver * @return $this */ public function forgetChannel($driver = null)
true
Other
laravel
framework
8cd28a3a78eaf0097e7bcac29309646310cd277d.json
Update PHPDoc comments to match signature (#33580)
src/Illuminate/Queue/CallQueuedClosure.php
@@ -41,7 +41,7 @@ public function __construct(SerializableClosure $closure) /** * Create a new job instance. * - * @param \Closure $closure + * @param \Closure $job * @return self */ public static function create(Closure $job)
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Database/Eloquent/Concerns/HidesAttributes.php
@@ -117,7 +117,7 @@ public function makeHidden($attributes) /** * Make the given, typically visible, attributes hidden if the given truth test passes. * - * @param bool|Closure $truthTest + * @param bool|Closure $condition * @param array|string|null $attributes * @return $this...
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -554,7 +554,6 @@ public function orWherePivotNull($column, $not = false) * Set a "or where not null" clause for a pivot table column. * * @param string $column - * @param bool $not * @return $this */ public function orWherePivotNotNull($column)
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Database/Query/Builder.php
@@ -2045,6 +2045,8 @@ public function forPageAfterId($perPage = 15, $lastId = 0, $column = 'id') /** * Remove all existing orders and optionally add a new order. * + * @param string|null $column + * @param string $direction * @return $this */ public function reorder($column...
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Log/LogManager.php
@@ -477,7 +477,7 @@ public function extend($driver, Closure $callback) /** * Unset the given channel instance. * - * @param string|null $name + * @param string|null $driver * @return $this */ public function forgetChannel($driver = null)
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Queue/CallQueuedClosure.php
@@ -41,7 +41,7 @@ public function __construct(SerializableClosure $closure) /** * Create a new job instance. * - * @param \Closure $closure + * @param \Closure $job * @return self */ public static function create(Closure $job)
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Queue/Worker.php
@@ -465,7 +465,6 @@ protected function markJobAsFailedIfWillExceedMaxAttempts($connectionName, $job, * * @param string $connectionName * @param \Illuminate\Contracts\Queue\Job $job - * @param int $maxTries * @param \Throwable $e * @return void */
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Session/Middleware/StartSession.php
@@ -281,7 +281,7 @@ protected function sessionIsPersistent(array $config = null) /** * Resolve the given cache driver. * - * @param string $cache + * @param string $driver * @return \Illuminate\Cache\Store */ protected function cache($driver)
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Support/Collection.php
@@ -1210,7 +1210,7 @@ public function take($limit) /** * Take items in the collection until the given condition is met. * - * @param mixed $key + * @param mixed $value * @return static */ public function takeUntil($value) @@ -1221,7 +1221,7 @@ public function takeUntil($val...
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Support/LazyCollection.php
@@ -1155,7 +1155,7 @@ public function take($limit) /** * Take items in the collection until the given condition is met. * - * @param mixed $key + * @param mixed $value * @return static */ public function takeUntil($value) @@ -1176,7 +1176,7 @@ public function takeUntil($val...
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/Support/Traits/EnumeratesValues.php
@@ -732,7 +732,7 @@ public function uniqueStrict($key = null) * * This is an alias to the "takeUntil" method. * - * @param mixed $key + * @param mixed $value * @return static * * @deprecated Use the "takeUntil" method directly.
true
Other
laravel
framework
d2da49c113f995bce6ed64ac765ca3ab3fa6236c.json
Update PHPDoc comments to match signature
src/Illuminate/View/ComponentAttributeBag.php
@@ -152,7 +152,7 @@ public function exceptProps($keys) /** * Merge additional attributes / values into the attribute bag. * - * @param array $attributes + * @param array $attributeDefaults * @return static */ public function merge(array $attributeDefaults = []) @@ -206,7 +2...
true
Other
laravel
framework
8a3810c6b6f4549105341b91485eed748d760768.json
Remove unused variable (#33572)
tests/Auth/AuthEloquentUserProviderTest.php
@@ -64,7 +64,6 @@ public function testRetrieveTokenWithBadIdentifierReturnsNull() public function testRetrievingWithOnlyPasswordCredentialReturnsNull() { $provider = $this->getProviderMock(); - $mock = m::mock(stdClass::class); $user = $provider->retrieveByCredentials(['api_password' ...
true
Other
laravel
framework
8a3810c6b6f4549105341b91485eed748d760768.json
Remove unused variable (#33572)
tests/Foundation/FoundationApplicationTest.php
@@ -388,7 +388,6 @@ public function testEnvPathsAreUsedForCachePathsWhenSpecified() $_SERVER['APP_ROUTES_CACHE'] = '/absolute/path/routes.php'; $_SERVER['APP_EVENTS_CACHE'] = '/absolute/path/events.php'; - $ds = DIRECTORY_SEPARATOR; $this->assertSame('/absolute/path/services.php', $a...
true
Other
laravel
framework
8a3810c6b6f4549105341b91485eed748d760768.json
Remove unused variable (#33572)
tests/Queue/DynamoDbFailedJobProviderTest.php
@@ -144,8 +144,6 @@ public function testNullIsReturnedIfJobNotFound() { $dynamoDbClient = m::mock(DynamoDbClient::class); - $time = time(); - $dynamoDbClient->shouldReceive('getItem')->once()->with([ 'TableName' => 'table', 'Key' => [ @@ -165,8 +163,6 @@ public ...
true
Other
laravel
framework
87ab4e2a962130cd59a52c5d2db453067a954976.json
add ignore method
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -180,6 +180,19 @@ public function map($from, $to = null) return $this; } + /** + * Indicate that the given exception type should not be reported. + * + * @param string $class + * @return $this + */ + protected function ignore(string $class) + { + $this->dontRepor...
false
Other
laravel
framework
b82101fb977798d695de03e1513653a893814584.json
add throws back in
src/Illuminate/Container/Container.php
@@ -381,6 +381,8 @@ public function singletonIf($abstract, $concrete = null) * @param string $abstract * @param \Closure $closure * @return void + * + * @throws \InvalidArgumentException */ public function extend($abstract, Closure $closure) {
false
Other
laravel
framework
5c7b9b232259fc5872307979f0c7e61ae9a0b72f.json
add fluent stop
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -126,32 +126,17 @@ public function register() // } - /** - * Register reportable and renderable callbacks. - * - * @param callable $reportUsing - * @param callable $renderUsing - * @return $this - */ - public function on(callable $reportUsing, callable $renderUsing) ...
true
Other
laravel
framework
5c7b9b232259fc5872307979f0c7e61ae9a0b72f.json
add fluent stop
src/Illuminate/Foundation/Exceptions/ReportableHandler.php
@@ -0,0 +1,72 @@ +<?php + +namespace Illuminate\Foundation\Exceptions; + +use Illuminate\Support\Traits\ReflectsClosures; +use Throwable; + +class ReportableHandler +{ + use ReflectsClosures; + + /** + * The underlying callback. + * + * @var callable + */ + protected $callback; + + /** + ...
true
Other
laravel
framework
5a5a3355fa8a987e9a3a6e30c32c9f59e1fefc80.json
allow exception mapping
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -2,6 +2,7 @@ namespace Illuminate\Foundation\Exceptions; +use Closure; use Exception; use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\AuthenticationException; @@ -22,6 +23,7 @@ use Illuminate\Support\Traits\ReflectsClosures; use Illuminate\Support\ViewErrorBag; use Illuminate\Valida...
false
Other
laravel
framework
8855e86b6eb005d2c1cc35026360741b58b73081.json
tests(add extra method deps check to test)
tests/Container/ContainerCallTest.php
@@ -175,6 +175,7 @@ public function testCallWithCallableClassString() $result = $container->call(ContainerCallCallableClassStringStub::class); $this->assertInstanceOf(ContainerCallConcreteStub::class, $result[0]); $this->assertSame('jeffrey', $result[1]); + $this->assertInstanceOf(Cont...
false
Other
laravel
framework
737b639580598bc77f53f38e2f84431ed5b514ff.json
Apply fixes from StyleCI (#33499)
tests/Validation/ValidationValidatorTest.php
@@ -47,7 +47,7 @@ public function testNestedErrorMessagesAreRetrievedFromLocalArray() 'posts' => [ [ 'name' => '', - ] + ], ], ], ],
false
Other
laravel
framework
2700399f9f18850f8d8b3b45435946956fdddc90.json
add `bootstrap` method to interface (#33486)
src/Illuminate/Contracts/Console/Kernel.php
@@ -4,6 +4,13 @@ interface Kernel { + /** + * Bootstrap the application for artisan commands. + * + * @return void + */ + public function bootstrap(); + /** * Handle an incoming console command. *
false
Other
laravel
framework
7d78de0b214398d5c34c34fd840eee7812fa22ca.json
Guess HasOne or HasMany relationship (#33450)
src/Illuminate/Database/Eloquent/Factories/Factory.php
@@ -395,11 +395,24 @@ public function has(self $factory, $relationship = null) { return $this->newInstance([ 'has' => $this->has->concat([new Relationship( - $factory, $relationship ?: Str::camel(Str::plural(class_basename($factory->modelName()))) + $factory, $re...
false
Other
laravel
framework
ef0a884b608a9ce1e1a1f25c279cfb165b907d5f.json
Apply fixes from StyleCI (#33456)
tests/Support/SupportStringableTest.php
@@ -94,26 +94,26 @@ public function testWhenEmpty() public function testWhenFalse() { - $this->assertSame('when', (string) $this->stringable('when')->when(false,function($stringable,$value){ + $this->assertSame('when', (string) $this->stringable('when')->when(false, function ($stringable, $val...
false
Other
laravel
framework
200fcdbf0f28aff145a2ed2a943d704c36fd3c63.json
improve SQL Server last insert id retrieval
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
@@ -323,6 +323,21 @@ public function compileExists(Builder $query) return $this->compileSelect($existsQuery->selectRaw('1 [exists]')->limit(1)); } + /** + * Compile an insert and get ID statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $...
true
Other
laravel
framework
200fcdbf0f28aff145a2ed2a943d704c36fd3c63.json
improve SQL Server last insert id retrieval
src/Illuminate/Database/Query/Processors/SqlServerProcessor.php
@@ -2,8 +2,6 @@ namespace Illuminate\Database\Query\Processors; -use Exception; -use Illuminate\Database\Connection; use Illuminate\Database\Query\Builder; class SqlServerProcessor extends Processor @@ -21,38 +19,15 @@ public function processInsertGetId(Builder $query, $sql, $values, $sequence = nu { ...
true
Other
laravel
framework
200fcdbf0f28aff145a2ed2a943d704c36fd3c63.json
improve SQL Server last insert id retrieval
tests/Database/DatabaseQueryBuilderTest.php
@@ -2130,7 +2130,7 @@ public function testInsertGetIdWithEmptyValues() $builder->from('users')->insertGetId([]); $builder = $this->getSqlServerBuilder(); - $builder->getProcessor()->shouldReceive('processInsertGetId')->once()->with($builder, 'insert into [users] default values', [], null); + ...
true
Other
laravel
framework
f1a21b3368097253f26eeb4e190cf668f1d7308d.json
Add return to console command stub (#33423)
src/Illuminate/Foundation/Console/stubs/console.stub
@@ -37,6 +37,6 @@ class {{ class }} extends Command */ public function handle() { - // + return 0; } }
false
Other
laravel
framework
a1fdd536c542dabbe9882f50e849cc177dc0ad88.json
determine model key name correctly
src/Illuminate/Validation/Concerns/ValidatesAttributes.php
@@ -731,17 +731,17 @@ public function validateUnique($attribute, $value, $parameters) { $this->requireParameterCount(1, $parameters, 'unique'); - [$connection, $table] = $this->parseTable($parameters[0]); + [$connection, $table, $idColumn] = $this->parseTable($parameters[0]); //...
true
Other
laravel
framework
a1fdd536c542dabbe9882f50e849cc177dc0ad88.json
determine model key name correctly
tests/Integration/Validation/ValidatorTest.php
@@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; +use Illuminate\Support\Str; use Illuminate\Tests\Integration\Database\DatabaseTestCase; use Illuminate\Translation\ArrayLoader; use Illuminate\Translation\Translator; @@ -19,19...
true
Other
laravel
framework
d5cf953ff4bd7db92ebdbfe14d914bbdf13e64d8.json
update factory find model logic
src/Illuminate/Database/Eloquent/Factories/Factory.php
@@ -549,7 +549,11 @@ public function newModel(array $attributes = []) public function modelName() { $resolver = static::$modelNameResolver ?: function (self $factory) { - return 'App\\'.Str::replaceLast('Factory', '', class_basename($factory)); + $factoryBasename = Str::replaceL...
false
Other
laravel
framework
9208548adbc1da7dc0a29de6c9d3365e350cafbd.json
Apply fixes from StyleCI (#33394)
src/Illuminate/Http/Client/RequestException.php
@@ -38,6 +38,6 @@ protected function prepareMessage(Response $response) $summary = \GuzzleHttp\Psr7\get_message_body_summary($response->toPsrResponse()); - return is_null($summary) ? $message : $message .= ":\n{$summary}\n";; + return is_null($summary) ? $message : $message .= ":\n{$summary}\...
false
Other
laravel
framework
5c841b38b6f93345d976c1c756be1d9c2790e955.json
add every2/3/4minutes to scheduler (#33379)
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
@@ -81,6 +81,36 @@ public function everyMinute() return $this->spliceIntoPosition(1, '*'); } + /** + * Schedule the event to run every two minutes. + * + * @return $this + */ + public function everyTwoMinutes() + { + return $this->spliceIntoPosition(1, '*/2'); + } + + ...
true
Other
laravel
framework
5c841b38b6f93345d976c1c756be1d9c2790e955.json
add every2/3/4minutes to scheduler (#33379)
tests/Console/Scheduling/FrequencyTest.php
@@ -28,8 +28,11 @@ public function testEveryMinute() $this->assertSame('* * * * *', $this->event->everyMinute()->getExpression()); } - public function testEveryFiveMinutes() + public function testEveryXMinutes() { + $this->assertSame('*/2 * * * *', $this->event->everyTwoMinutes()->getE...
true
Other
laravel
framework
96d9ac521de59de99c83c56b8a64067cdbf3b038.json
fix code style
src/Illuminate/Database/Eloquent/Collection.php
@@ -631,7 +631,7 @@ public function getQueueableConnection() } /** - * Get the Eloquent query builder from the collection + * Get the Eloquent query builder from the collection. * * @return Illuminate\Database\Eloquen\Builder *
false
Other
laravel
framework
efdab6e774de2b73ec985ae3c965481864bb9c3e.json
Apply fixes from StyleCI (#33355)
src/Illuminate/View/ComponentAttributeBag.php
@@ -14,7 +14,7 @@ class ComponentAttributeBag implements ArrayAccess, Htmlable, IteratorAggregate { use Macroable; - + /** * The raw array of attributes. *
false