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
847b196c7bf3cadae09ce9ebb6d4a2a4664518d2.json
Add support for custom drivers This portion of code is heavily inspired by the CacheManager extension system.
src/Illuminate/Redis/RedisManager.php
@@ -26,6 +26,13 @@ class RedisManager implements Factory */ protected $driver; + /** + * The registered custom driver creators. + * + * @var array + */ + protected $customCreators = []; + /** * The Redis server configurations. * @@ -147,10 +154,16 @@ protected functio...
true
Other
laravel
framework
0708161b2079b55a44112fba94500340a1b56792.json
Simplify UPDATE query bindings
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -942,7 +942,7 @@ public function compileUpdate(Builder $query, $values) */ public function prepareBindingsForUpdate(array $bindings, array $values) { - $cleanBindings = Arr::except($bindings, ['join', 'select']); + $cleanBindings = Arr::except($bindings, ['select', 'join']); ...
true
Other
laravel
framework
0708161b2079b55a44112fba94500340a1b56792.json
Simplify UPDATE query bindings
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
@@ -365,13 +365,10 @@ public function prepareBindingsForUpdate(array $bindings, array $values) : $value; })->all(); - // Update statements with "joins" in Postgres use an interesting syntax. We need to - // take all of the bindings and put them on the end of this array since th...
true
Other
laravel
framework
0708161b2079b55a44112fba94500340a1b56792.json
Simplify UPDATE query bindings
src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
@@ -211,10 +211,10 @@ public function compileUpdate(Builder $query, $values) */ public function prepareBindingsForUpdate(array $bindings, array $values) { - $cleanBindings = Arr::except($bindings, ['select', 'join']); + $cleanBindings = Arr::except($bindings, 'select'); return a...
true
Other
laravel
framework
0708161b2079b55a44112fba94500340a1b56792.json
Simplify UPDATE query bindings
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
@@ -405,13 +405,10 @@ protected function parseUpdateTable($table) */ public function prepareBindingsForUpdate(array $bindings, array $values) { - // Update statements with joins in SQL Servers utilize an unique syntax. We need to - // take all of the bindings and put them on the end of thi...
true
Other
laravel
framework
e03d7156a74e00783213113da5f71634050d8c98.json
Add test: testAddingGeneratedColumnWithCharset
tests/Database/DatabaseMySqlSchemaGrammarTest.php
@@ -434,6 +434,18 @@ public function testAddingGeneratedColumn() $this->assertEquals('alter table `products` add `price` int not null, add `discounted_virtual` int as (price - 5), add `discounted_stored` int as (price - 5) stored', $statements[0]); } + public function testAddingGeneratedColumnWithCha...
false
Other
laravel
framework
b8eda4b3270ed69b00db3f93209fa12563443f1b.json
Add functions for testing OPTION requests
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -294,6 +294,34 @@ public function deleteJson($uri, array $data = [], array $headers = []) return $this->json('DELETE', $uri, $data, $headers); } + /** + * Visit the given URI with a OPTION request. + * + * @param string $uri + * @param array $data + * @param array $header...
false
Other
laravel
framework
e2d3424cc2bfeebda0e546779bf9575f4b883578.json
Remove hack to access class scope inside closures This is possible since 5.4.
tests/Routing/RoutingRouteTest.php
@@ -1093,19 +1093,18 @@ public function testRoutePrefixing() public function testRoutePreservingOriginalParametersState() { - $phpunit = $this; $router = $this->getRouter(); $router->bind('bar', function ($value) { return strlen($value); }); $router->g...
false
Other
laravel
framework
f43c2d3cd6f6bdbe4f66563a852789512ab366f4.json
Use QueueManager contract in Worker we can depend on `Illuminate\Contracts\Queue\Factory` in the `Illuminate\Queue\Worker` instead of the concrete manager instance. This allows for decorating the QueueManager with extra functionality. This solves the issues encountered in [27826](https://github.com/laravel/framework/...
src/Illuminate/Queue/QueueManager.php
@@ -246,16 +246,6 @@ public function getName($connection = null) return $connection ?: $this->getDefaultDriver(); } - /** - * Determine if the application is in maintenance mode. - * - * @return bool - */ - public function isDownForMaintenance() - { - return $this->app->i...
true
Other
laravel
framework
f43c2d3cd6f6bdbe4f66563a852789512ab366f4.json
Use QueueManager contract in Worker we can depend on `Illuminate\Contracts\Queue\Factory` in the `Illuminate\Queue\Worker` instead of the concrete manager instance. This allows for decorating the QueueManager with extra functionality. This solves the issues encountered in [27826](https://github.com/laravel/framework/...
src/Illuminate/Queue/QueueServiceProvider.php
@@ -161,8 +161,15 @@ protected function registerSqsConnector($manager) protected function registerWorker() { $this->app->singleton('queue.worker', function () { + $isDownForMaintenance = function () { + return $this->app->isDownForMaintenance(); + }; + ...
true
Other
laravel
framework
f43c2d3cd6f6bdbe4f66563a852789512ab366f4.json
Use QueueManager contract in Worker we can depend on `Illuminate\Contracts\Queue\Factory` in the `Illuminate\Queue\Worker` instead of the concrete manager instance. This allows for decorating the QueueManager with extra functionality. This solves the issues encountered in [27826](https://github.com/laravel/framework/...
src/Illuminate/Queue/Worker.php
@@ -8,6 +8,7 @@ use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Database\DetectsLostConnections; use Illuminate\Contracts\Debug\ExceptionHandler; +use Illuminate\Contracts\Queue\Factory as QueueManager; use Symfony\Component\Debug\Exception\FatalThrowableError; use Illuminate\Contracts\Cache\Repository ...
true
Other
laravel
framework
f43c2d3cd6f6bdbe4f66563a852789512ab366f4.json
Use QueueManager contract in Worker we can depend on `Illuminate\Contracts\Queue\Factory` in the `Illuminate\Queue\Worker` instead of the concrete manager instance. This allows for decorating the QueueManager with extra functionality. This solves the issues encountered in [27826](https://github.com/laravel/framework/...
tests/Queue/QueueWorkerTest.php
@@ -97,7 +97,10 @@ public function test_exception_is_reported_if_connection_throws_exception_on_job $worker = new InsomniacWorker( new WorkerFakeManager('default', new BrokenQueueConnection($e = new RuntimeException)), $this->events, - $this->exceptionHandler + $...
true
Other
laravel
framework
897872952e4f57664356198f5c19391492176117.json
allocate memory for error handling
src/Illuminate/Foundation/Bootstrap/HandleExceptions.php
@@ -12,6 +12,8 @@ class HandleExceptions { + static $reservedMemory; + /** * The application instance. * @@ -27,6 +29,8 @@ class HandleExceptions */ public function bootstrap(Application $app) { + self::$reservedMemory = str_repeat('x', 10240); + $this->app = $app...
false
Other
laravel
framework
9775c6079e27441d20b2fca4c08c145c8c2286ba.json
Add Postgres support for collation() on columns
src/Illuminate/Database/Schema/ColumnDefinition.php
@@ -11,7 +11,7 @@ * @method ColumnDefinition autoIncrement() Set INTEGER columns as auto-increment (primary key) * @method ColumnDefinition change() Change the column * @method ColumnDefinition charset(string $charset) Specify a character set for the column (MySQL) - * @method ColumnDefinition collation(string $c...
true
Other
laravel
framework
9775c6079e27441d20b2fca4c08c145c8c2286ba.json
Add Postgres support for collation() on columns
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
@@ -19,7 +19,7 @@ class PostgresGrammar extends Grammar * * @var array */ - protected $modifiers = ['Increment', 'Nullable', 'Default']; + protected $modifiers = ['Collate', 'Increment', 'Nullable', 'Default']; /** * The columns available as serials. @@ -879,6 +879,20 @@ private fun...
true
Other
laravel
framework
9775c6079e27441d20b2fca4c08c145c8c2286ba.json
Add Postgres support for collation() on columns
tests/Database/DatabasePostgresSchemaGrammarTest.php
@@ -21,10 +21,11 @@ public function testBasicCreateTable() $blueprint->create(); $blueprint->increments('id'); $blueprint->string('email'); + $blueprint->string('name')->collation('nb_NO.utf8'); $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); ...
true
Other
laravel
framework
e14da1d5c659e17cc50456249a59956d93f033c2.json
Fix formatting of DocBlock in factory.stub
src/Illuminate/Database/Console/Factories/stubs/factory.stub
@@ -1,6 +1,6 @@ <?php -/* @var $factory \Illuminate\Database\Eloquent\Factory */ +/** @var \Illuminate\Database\Eloquent\Factory $factory */ use NamespacedDummyModel; use Faker\Generator as Faker;
false
Other
laravel
framework
2b77ef07db52f634d1b488b745bb8ff22376942d.json
Use contract for email address
src/Illuminate/Auth/Notifications/VerifyEmail.php
@@ -61,7 +61,7 @@ protected function verificationUrl($notifiable) return URL::temporarySignedRoute( 'verification.verify', Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60)), - ['id' => $notifiable->getKey(), 'hash' => sha1($notifiable->email)] + ...
false
Other
laravel
framework
e05c226c09031233acf79707635861932ec3b9b8.json
Use POST method when re-sending email verfication.
src/Illuminate/Routing/Router.php
@@ -1192,7 +1192,7 @@ public function emailVerification() { $this->get('email/verify', 'Auth\VerificationController@show')->name('verification.notice'); $this->get('email/verify/{id}', 'Auth\VerificationController@verify')->name('verification.verify'); - $this->get('email/resend', 'Auth\Ve...
false
Other
laravel
framework
ba6f51822405f4a6ee4e3cb12b651504f95f31e4.json
fix StyleCI stuff
tests/Database/DatabaseQueryBuilderTest.php
@@ -2261,7 +2261,7 @@ public function testPostgresUpdateWrappingJsonArrayAndObject() $builder->getConnection()->shouldReceive('update') ->with('update "users" set "options" = ?, "meta" = jsonb_set("meta"::jsonb, \'{"tags"}\', ?), "group_id" = 45', [ json_encode(['2fa' => false, 'p...
false
Other
laravel
framework
5369bec0dd94eb8f0b4cbff4da98c0dae4c74729.json
Fix DELETE queries with alias on SQLite
src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php
@@ -227,16 +227,31 @@ public function prepareBindingsForUpdate(array $bindings, array $values) public function compileDelete(Builder $query) { if (isset($query->joins) || isset($query->limit)) { - $selectSql = parent::compileSelect($query->select("{$query->from}.rowid")); - - re...
true
Other
laravel
framework
5369bec0dd94eb8f0b4cbff4da98c0dae4c74729.json
Fix DELETE queries with alias on SQLite
tests/Database/DatabaseQueryBuilderTest.php
@@ -2099,6 +2099,11 @@ public function testDeleteWithJoinMethod() $result = $builder->from('users')->join('contacts', 'users.id', '=', 'contacts.id')->where('users.email', '=', 'foo')->orderBy('users.id')->limit(1)->delete(); $this->assertEquals(1, $result); + $builder = $this->getSqliteBuild...
true
Other
laravel
framework
d8e3a500a9bbdbf47a4fd2798da0a85636da56f2.json
Check datatype correctly in PostgresGrammar
src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
@@ -387,7 +387,7 @@ protected function compileUpdateJoinWheres(Builder $query) public function prepareBindingsForUpdate(array $bindings, array $values) { $values = collect($values)->map(function ($value, $column) { - return $this->isJsonSelector($column) && ! $this->isExpression($value) + ...
false
Other
laravel
framework
45c997b569c0b3127f578087eb60b372e3605ca2.json
Use contract instead of email attribute directly
src/Illuminate/Auth/MustVerifyEmail.php
@@ -35,4 +35,15 @@ public function sendEmailVerificationNotification() { $this->notify(new Notifications\VerifyEmail); } + + /** + * Get the email address to verify + * + * @return string + */ + public function getEmailForVerification() + { + return $this->email; + ...
true
Other
laravel
framework
45c997b569c0b3127f578087eb60b372e3605ca2.json
Use contract instead of email attribute directly
src/Illuminate/Contracts/Auth/MustVerifyEmail.php
@@ -24,4 +24,11 @@ public function markEmailAsVerified(); * @return void */ public function sendEmailVerificationNotification(); + + /** + * Get the email address to verify + * + * @return string + */ + public function getEmailForVerification(); }
true
Other
laravel
framework
45c997b569c0b3127f578087eb60b372e3605ca2.json
Use contract instead of email attribute directly
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 (!hash_equals(hash('sha1', $request->user()->email), $request->route('hash'))) { + if (! hash_equals(hash('sha1', $r...
true
Other
laravel
framework
af1bf7fd1fb408ef25004dcd04402d4cc219c9d3.json
update param name in docblock
src/Illuminate/Database/Query/Builder.php
@@ -996,7 +996,7 @@ public function whereIntegerNotInRaw($column, $values, $boolean = 'and') /** * Add a "where null" clause to the query. * - * @param string|array $column + * @param string|array $columns * @param string $boolean * @param bool $not * @return $this
false
Other
laravel
framework
1633206cc9d4b58b2f4cdaa8755f74d9561b6e7f.json
Add runtime for each migration to output
src/Illuminate/Database/Migrations/Migrator.php
@@ -192,14 +192,18 @@ protected function runUp($file, $batch, $pretend) $this->note("<comment>Migrating:</comment> {$name}"); + $startTime = microtime(true); + $this->runMigration($migration, 'up'); + $runTime = round(microtime(true) - $startTime, 2); + // Once we have run...
false
Other
laravel
framework
5c7ac297994994fd6d3a804ac9729f4fca61e479.json
Use json_extract instead of json_merge
src/Illuminate/Database/Query/JsonExpression.php
@@ -43,7 +43,7 @@ protected function getJsonBindingParameter($value) return '?'; case 'object': case 'array': - return 'json_merge(?, "[]")'; + return 'json_extract(?, "$")'; } throw new InvalidArgumentException("JSON value is ...
true
Other
laravel
framework
5c7ac297994994fd6d3a804ac9729f4fca61e479.json
Use json_extract instead of json_merge
tests/Database/DatabaseQueryBuilderTest.php
@@ -2193,7 +2193,7 @@ public function testMySqlUpdateWrappingJsonArray() $connection->expects($this->once()) ->method('update') ->with( - 'update `users` set `meta` = json_set(`meta`, \'$."tags"\', json_merge(?, "[]")) where `active` = ?', + ...
true
Other
laravel
framework
aed06b10f44b24928aeffa589f630bf5b5c19ed8.json
Add ability to set theme for mail notifications We already can set a different theme than the default one for our Mailable. It would be very useful if there was a way to set the theme for the mail notifications too.
src/Illuminate/Notifications/Channels/MailChannel.php
@@ -93,6 +93,10 @@ protected function buildView($message) return $message->view; } + if (property_exists($message, 'theme') && ! is_null($message->theme)) { + $this->markdown->theme($message->theme); + } + return [ 'html' => $this->markdown->render(...
true
Other
laravel
framework
aed06b10f44b24928aeffa589f630bf5b5c19ed8.json
Add ability to set theme for mail notifications We already can set a different theme than the default one for our Mailable. It would be very useful if there was a way to set the theme for the mail notifications too.
src/Illuminate/Notifications/Messages/MailMessage.php
@@ -31,6 +31,13 @@ class MailMessage extends SimpleMessage implements Renderable */ public $markdown = 'notifications::email'; + /** + * The current theme being used when generating emails. + * + * @var string|null + */ + public $theme = 'default'; + /** * The "from" inform...
true
Other
laravel
framework
aed06b10f44b24928aeffa589f630bf5b5c19ed8.json
Add ability to set theme for mail notifications We already can set a different theme than the default one for our Mailable. It would be very useful if there was a way to set the theme for the mail notifications too.
tests/Integration/Notifications/SendingMailNotificationsTest.php
@@ -74,6 +74,7 @@ public function test_mail_is_sent() 'email' => 'taylor@laravel.com', ]); + $this->markdown->shouldReceive('theme')->once()->andReturnSelf(); $this->markdown->shouldReceive('render')->once()->andReturn('htmlContent'); $this->markdown->shouldReceive('rend...
true
Other
laravel
framework
df2f36c3e1b733eb006cd27b240d68e6fa8bcb3b.json
Use model instance instead of parent Co-Authored-By: Jonas Staudenmeir <mail@jonas-staudenmeir.de>
src/Illuminate/Database/Eloquent/Relations/MorphTo.php
@@ -123,7 +123,7 @@ protected function getResultsByType($type) (array) ($this->morphableEagerLoads[get_class($instance)] ?? []) )); - $whereIn = $this->whereInMethod($this->parent, $ownerKey); + $whereIn = $this->whereInMethod($instance, $own...
false
Other
laravel
framework
67a38ba0fa2acfbd1f4af4bf7d462bb4419cc091.json
Remove scalar type
src/Illuminate/Auth/Access/Response.php
@@ -35,7 +35,7 @@ class Response implements Arrayable * @param mixed $code * @return void */ - public function __construct(bool $allowed, $message = '', $code = null) + public function __construct($allowed, $message = '', $code = null) { $this->code = $code; $this->allow...
false
Other
laravel
framework
acec13a2b3ee734b15410982e84355030c26468f.json
Apply fixes from StyleCI (#29118)
tests/Auth/AuthAccessGateTest.php
@@ -611,7 +611,7 @@ public function test_authorize_with_policy_that_returns_denied_response_object_t public function test_policy_that_throws_authorization_exception_is_caught_in_inspect() { $gate = $this->getBasicGate(); - + $gate->policy(AccessGateTestDummy::class, AccessGateTestPol...
false
Other
laravel
framework
c681ef442a2c57a74671ec9d11d157349be66646.json
Add only method to session
src/Illuminate/Session/Store.php
@@ -167,6 +167,17 @@ public function all() return $this->attributes; } + /** + * Get a subset of the session data. + * + * @param array $keys + * @return array + */ + public function only($keys) + { + return Arr::only($this->attributes, $keys); + } + /** ...
true
Other
laravel
framework
c681ef442a2c57a74671ec9d11d157349be66646.json
Add only method to session
tests/Session/SessionStoreTest.php
@@ -211,6 +211,15 @@ public function testReflashWithNow() $this->assertFalse(array_search('foo', $session->get('_flash.old'))); } + public function testOnly() + { + $session = $this->getSession(); + $session->put('foo', 'bar'); + $session->put('qu', 'ux'); + $this->asse...
true
Other
laravel
framework
05bb2b83df8f4c6dfd94b52c50e66b71e8f46729.json
Add early return
src/Illuminate/Translation/Translator.php
@@ -136,7 +136,7 @@ public function get($key, array $replace = [], $locale = null, $fallback = true) if (! is_null($line = $this->getLine( $namespace, $group, $locale, $item, $replace ))) { - break; + return $line ?? $key; ...
false
Other
laravel
framework
9add84a72d5337adfe245553ca20da94ed08eedf.json
Add mergeRecursive() method on collections
src/Illuminate/Support/Collection.php
@@ -1258,6 +1258,17 @@ public function merge($items) return new static(array_merge($this->items, $this->getArrayableItems($items))); } + /** + * Recursively merge the collection with the given items. + * + * @param mixed $items + * @return static + */ + public function mergeR...
true
Other
laravel
framework
9add84a72d5337adfe245553ca20da94ed08eedf.json
Add mergeRecursive() method on collections
tests/Support/SupportCollectionTest.php
@@ -666,6 +666,27 @@ public function testMergeCollection() $this->assertEquals(['name' => 'World', 'id' => 1], $c->merge(new Collection(['name' => 'World', 'id' => 1]))->all()); } + public function testMergeRecursiveNull() + { + $c = new Collection(['name' => 'Hello']); + $this->asse...
true
Other
laravel
framework
53ae6e90430896d5d5093ca5e16ac6283148cc23.json
Remove throws annotation
src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -102,8 +102,6 @@ protected function handleTransactionException($e, $currentAttempt, $maxAttempts) * @param int $currentAttempt * @param int $maxAttempts * @return void - * - * @throws \Exception */ protected function handleCommitTransactionException($e, $currentAttempt, $maxA...
false
Other
laravel
framework
c6d4e6a026f087c7a8478753f848a000ea1bb612.json
Add requested whitespace
src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -36,6 +36,7 @@ public function transaction(Closure $callback, $attempts = 1) $this->handleTransactionException( $e, $currentAttempt, $attempts ); + continue; } catch (Throwable $e) { $this->rollBack(...
false
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
src/Illuminate/Auth/Notifications/ResetPassword.php
@@ -57,11 +57,11 @@ public function toMail($notifiable) } return (new MailMessage) - ->subject(Lang::getFromJson('Reset Password Notification')) - ->line(Lang::getFromJson('You are receiving this email because we received a password reset request for your account.')) - ...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
src/Illuminate/Auth/Notifications/VerifyEmail.php
@@ -44,10 +44,10 @@ public function toMail($notifiable) } return (new MailMessage) - ->subject(Lang::getFromJson('Verify Email Address')) - ->line(Lang::getFromJson('Please click the button below to verify your email address.')) - ->action(Lang::getFromJson('Verify E...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
src/Illuminate/Foundation/helpers.php
@@ -899,14 +899,14 @@ function trans_choice($key, $number, array $replace = [], $locale = null) /** * Translate the given message. * - * @param string $key + * @param string|null $key * @param array $replace * @param string|null $locale - * @return string|array|null + ...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
src/Illuminate/Translation/Translator.php
@@ -111,38 +111,6 @@ public function trans($key, array $replace = [], $locale = null) * @return string|array */ public function get($key, array $replace = [], $locale = null, $fallback = true) - { - [$namespace, $group, $item] = $this->parseKey($key); - - // Here we will get the locale...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
src/Illuminate/View/Compilers/Concerns/CompilesTranslations.php
@@ -18,7 +18,7 @@ protected function compileLang($expression) return "<?php \$__env->startTranslation{$expression}; ?>"; } - return "<?php echo app('translator')->getFromJson{$expression}; ?>"; + return "<?php echo app('translator')->get{$expression}; ?>"; } /**
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
src/Illuminate/View/Concerns/ManagesTranslations.php
@@ -31,7 +31,7 @@ public function startTranslation($replacements = []) */ public function renderTranslation() { - return $this->container->make('translator')->getFromJson( + return $this->container->make('translator')->get( trim(ob_get_clean()), $this->translationReplacements ...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
tests/Translation/TranslationTranslatorTest.php
@@ -34,36 +34,50 @@ public function testHasMethodReturnsFalseWhenReturnedTranslationIsNull() $t->expects($this->once())->method('get')->with($this->equalTo('foo'), $this->equalTo([]), $this->equalTo('bar'), false)->will($this->returnValue('foo')); $this->assertFalse($t->hasForLocale('foo', 'bar')); ...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
tests/View/Blade/BladeExpressionTest.php
@@ -6,13 +6,13 @@ class BladeExpressionTest extends AbstractBladeTestCase { public function testExpressionsOnTheSameLine() { - $this->assertEquals('<?php echo app(\'translator\')->getFromJson(foo(bar(baz(qux(breeze()))))); ?> space () <?php echo app(\'translator\')->getFromJson(foo(bar)); ?>', $this->...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
tests/View/Blade/BladeLangTest.php
@@ -7,13 +7,13 @@ class BladeLangTest extends AbstractBladeTestCase public function testStatementThatContainsNonConsecutiveParenthesisAreCompiled() { $string = "Foo @lang(function_call('foo(blah)')) bar"; - $expected = "Foo <?php echo app('translator')->getFromJson(function_call('foo(blah)'));...
true
Other
laravel
framework
697b898a1c89881c91af83ecc4493fa681e2aa38.json
Remove getFromJson from Translator These changes merge the getFromJson behavior into the get method of the Translator class. What it basically does is make the JSON file lookup take precedence over the directory based PHP translation files. The __ helper becomes an alias of the trans helper. It basically doesn't brea...
tests/View/ViewFactoryTest.php
@@ -353,7 +353,7 @@ public function testTranslation() { $container = new Container; $container->instance('translator', $translator = m::mock(stdClass::class)); - $translator->shouldReceive('getFromJson')->with('Foo', ['name' => 'taylor'])->andReturn('Bar'); + $translator->shouldRece...
true
Other
laravel
framework
0cbd8d97eff2c02046f49ce2641dcde77b13be56.json
Add support for callbacks in Command::anticipate() - Allows the Illuminate\Console\Command::anticipate() method to accept a callback as it's second parameter instead of an array - The callback should accept a user input string and return an array of choices - The callback will be run everytime the user's input changes...
src/Illuminate/Console/Command.php
@@ -357,11 +357,11 @@ public function ask($question, $default = null) * Prompt the user for input with auto completion. * * @param string $question - * @param array $choices + * @param array|callable $choices * @param string|null $default * @return mixed */ - publ...
false
Other
laravel
framework
463144cf3ae51baa7d85d98099a4eabea0260e99.json
Apply fixes from StyleCI
src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -47,8 +47,7 @@ public function transaction(Closure $callback, $attempts = 1) // back the transaction, resulting in an error if we attempt to manually roll back. try { $this->commit(); - } - catch (Exception $e) { + } catch (Exception $e) { ...
true
Other
laravel
framework
463144cf3ae51baa7d85d98099a4eabea0260e99.json
Apply fixes from StyleCI
tests/Database/DatabaseConnectionTest.php
@@ -251,7 +251,8 @@ public function testTransactionRetriesOnSerializationFailure() $pdo->expects($this->exactly(3))->method('beginTransaction'); $pdo->expects($this->never())->method('rollBack'); $pdo->expects($this->exactly(3))->method('commit'); - $mock->transaction(function () {}, 3...
true
Other
laravel
framework
463144cf3ae51baa7d85d98099a4eabea0260e99.json
Apply fixes from StyleCI
tests/Database/stubs/PDOExceptionStub.php
@@ -1,11 +1,11 @@ <?php -class PDOExceptionStub extends PDOException { - +class PDOExceptionStub extends PDOException +{ /** * Overrides Exception::__construct, which casts $code to integer, so that we can create * an exception with a string $code consistent with the real PDOException behavior. - ...
true
Other
laravel
framework
dca45985ab1b2353615cef14d9d4d70ba7b1cd15.json
Modify release methods of the cache lock
src/Illuminate/Cache/DynamoDbLock.php
@@ -42,13 +42,15 @@ public function acquire() /** * Release the lock. * - * @return void + * @return bool */ public function release() { if ($this->isOwnedByCurrentProcess()) { - $this->dynamo->forget($this->name); + return $this->dynamo->forget($t...
true
Other
laravel
framework
dca45985ab1b2353615cef14d9d4d70ba7b1cd15.json
Modify release methods of the cache lock
src/Illuminate/Cache/Lock.php
@@ -61,7 +61,7 @@ abstract public function acquire(); /** * Release the lock. * - * @return void + * @return bool */ abstract public function release();
true
Other
laravel
framework
dca45985ab1b2353615cef14d9d4d70ba7b1cd15.json
Modify release methods of the cache lock
src/Illuminate/Cache/MemcachedLock.php
@@ -42,13 +42,15 @@ public function acquire() /** * Release the lock. * - * @return void + * @return bool */ public function release() { if ($this->isOwnedByCurrentProcess()) { - $this->memcached->delete($this->name); + return $this->memcached->del...
true
Other
laravel
framework
dca45985ab1b2353615cef14d9d4d70ba7b1cd15.json
Modify release methods of the cache lock
src/Illuminate/Cache/RedisLock.php
@@ -46,11 +46,11 @@ public function acquire() /** * Release the lock. * - * @return int + * @return bool */ public function release() { - return $this->redis->eval(LuaScripts::releaseLock(), 1, $this->name, $this->owner); + return (bool) $this->redis->eval(LuaScrip...
true
Other
laravel
framework
300a9c7750c571cf5df498b12ca079ef57c1e0ef.json
Use const HTTP_TOO_MANY_REQUESTS for readability Use constant Response::HTTP_TOO_MANY_REQUESTS instead of hardcoded value 429
src/Illuminate/Foundation/Auth/ThrottlesLogins.php
@@ -4,6 +4,7 @@ use Illuminate\Support\Str; use Illuminate\Http\Request; +use Illuminate\Http\Response; use Illuminate\Cache\RateLimiter; use Illuminate\Auth\Events\Lockout; use Illuminate\Support\Facades\Lang; @@ -53,7 +54,7 @@ protected function sendLockoutResponse(Request $request) throw Validation...
false
Other
laravel
framework
a70352e0a1b94da97510bf1370268b80074cee77.json
Add singletonIf method to the Container
src/Illuminate/Container/Container.php
@@ -358,6 +358,20 @@ public function singleton($abstract, $concrete = null) $this->bind($abstract, $concrete, true); } + /** + * Register a shared binding if it hasn't already been registered. + * + * @param string $abstract + * @param \Closure|string|null $concrete + * @retur...
true
Other
laravel
framework
a70352e0a1b94da97510bf1370268b80074cee77.json
Add singletonIf method to the Container
src/Illuminate/Contracts/Container/Container.php
@@ -72,6 +72,15 @@ public function bindIf($abstract, $concrete = null, $shared = false); */ public function singleton($abstract, $concrete = null); + /** + * Register a shared binding if it hasn't already been registered. + * + * @param string $abstract + * @param \Closure|string|null...
true
Other
laravel
framework
a70352e0a1b94da97510bf1370268b80074cee77.json
Add singletonIf method to the Container
tests/Container/ContainerTest.php
@@ -65,6 +65,36 @@ public function testBindIfDoesRegisterIfServiceNotRegisteredYet() $this->assertEquals('Dayle', $container->make('name')); } + public function testSingletonIfDoesntRegisterIfBindingAlreadyRegistered() + { + $container = new Container; + $class = new stdClass; + ...
true
Other
laravel
framework
7b3d97afdf8e1a7185541137b1e88be320f89673.json
use env helper
src/Illuminate/Foundation/Application.php
@@ -5,6 +5,7 @@ use Closure; use RuntimeException; use Illuminate\Support\Arr; +use Illuminate\Support\Env; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Support\Collection; @@ -549,8 +550,8 @@ public function detectEnvironment(Closure $callback) */ public function runningInCo...
true
Other
laravel
framework
7b3d97afdf8e1a7185541137b1e88be320f89673.json
use env helper
src/Illuminate/Foundation/Console/Kernel.php
@@ -7,6 +7,7 @@ use Throwable; use ReflectionClass; use Illuminate\Support\Arr; +use Illuminate\Support\Env; use Illuminate\Support\Str; use Illuminate\Console\Command; use Symfony\Component\Finder\Finder; @@ -112,7 +113,7 @@ protected function defineConsoleSchedule() */ protected function scheduleCach...
true
Other
laravel
framework
7b3d97afdf8e1a7185541137b1e88be320f89673.json
use env helper
src/Illuminate/Foundation/Console/ServeCommand.php
@@ -2,6 +2,7 @@ namespace Illuminate\Foundation\Console; +use Illuminate\Support\Env; use Illuminate\Console\Command; use Illuminate\Support\ProcessUtils; use Symfony\Component\Console\Input\InputOption; @@ -112,7 +113,7 @@ protected function getOptions() return [ ['host', null, InputOptio...
true
Other
laravel
framework
968daa74e7f3cec4f7b79bb39efa1419741e52eb.json
Avoid deprecated whoops code
composer.json
@@ -78,7 +78,7 @@ "require-dev": { "aws/aws-sdk-php": "^3.0", "doctrine/dbal": "^2.6", - "filp/whoops": "^2.1.4", + "filp/whoops": "^2.4", "guzzlehttp/guzzle": "^6.3", "league/flysystem-cached-adapter": "^1.0", "mockery/mockery": "^1.0", @@ -118,7 +118,7 @...
true
Other
laravel
framework
968daa74e7f3cec4f7b79bb39efa1419741e52eb.json
Avoid deprecated whoops code
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -335,7 +335,7 @@ protected function renderExceptionContent(Exception $e) protected function renderExceptionWithWhoops(Exception $e) { return tap(new Whoops, function ($whoops) { - $whoops->pushHandler($this->whoopsHandler()); + $whoops->appendHandler($this->whoopsHandler()); ...
true
Other
laravel
framework
1b3f26dd0b722ac55b0b04d2a603a967271f82e9.json
Set a message for SuspiciousOperationException
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -205,7 +205,7 @@ protected function prepareException(Exception $e) } elseif ($e instanceof TokenMismatchException) { $e = new HttpException(419, $e->getMessage(), $e); } elseif ($e instanceof SuspiciousOperationException) { - $e = new NotFoundHttpException(null, $e); + ...
false
Other
laravel
framework
9582a6d4404c301230cb32462db66f56b7e0507d.json
Add implementation for path method
src/Illuminate/Contracts/Pagination/Paginator.php
@@ -92,6 +92,13 @@ public function hasPages(); */ public function hasMorePages(); + /** + * Get the base path + * + * @return string|null + */ + public function path(); + /** * Determine if the list of items is empty or not. *
true
Other
laravel
framework
9582a6d4404c301230cb32462db66f56b7e0507d.json
Add implementation for path method
src/Illuminate/Pagination/AbstractPaginator.php
@@ -172,8 +172,8 @@ public function url($page) $parameters = array_merge($this->query, $parameters); } - return $this->path - .(Str::contains($this->path, '?') ? '&' : '?') + return $this->path() + .(Str::contains($this->path(), '?') ? ...
true
Other
laravel
framework
9582a6d4404c301230cb32462db66f56b7e0507d.json
Add implementation for path method
src/Illuminate/Pagination/LengthAwarePaginator.php
@@ -170,7 +170,7 @@ public function toArray() 'last_page' => $this->lastPage(), 'last_page_url' => $this->url($this->lastPage()), 'next_page_url' => $this->nextPageUrl(), - 'path' => $this->path, + 'path' => $this->path(), 'per_page' => $this->pe...
true
Other
laravel
framework
9582a6d4404c301230cb32462db66f56b7e0507d.json
Add implementation for path method
src/Illuminate/Pagination/Paginator.php
@@ -149,7 +149,7 @@ public function toArray() 'first_page_url' => $this->url(1), 'from' => $this->firstItem(), 'next_page_url' => $this->nextPageUrl(), - 'path' => $this->path, + 'path' => $this->path(), 'per_page' => $this->perPage(), ...
true
Other
laravel
framework
774ac42fdbddd4e208511a6786452d5232d8ae51.json
Add test methods for path() in paginator objects
tests/Pagination/LengthAwarePaginatorTest.php
@@ -61,6 +61,9 @@ public function testLengthAwarePaginatorCanGenerateUrls() $this->p->setPath('http://website.com'); $this->p->setPageName('foo'); + $this->assertEquals('http://website.com', + $this->p->path()); + $this->assertEquals('http://website.com?foo...
true
Other
laravel
framework
774ac42fdbddd4e208511a6786452d5232d8ae51.json
Add test methods for path() in paginator objects
tests/Pagination/PaginatorTest.php
@@ -54,4 +54,12 @@ public function testItRetrievesThePaginatorOptions() $this->assertSame($p->getOptions(), $options); } + + public function testPaginatorReturnsPath() + { + $p = new Paginator($array = ['item1', 'item2', 'item3'], 2, 2, + ['path' => 'http:...
true
Other
laravel
framework
32325d9dbf3f4f0941f27d3c2496fed33d3cb975.json
Remove unnecessary whitespace
src/Illuminate/Redis/RedisManager.php
@@ -203,7 +203,7 @@ public function disableEvents() { $this->events = false; } - + /** * Change the default driver. *
false
Other
laravel
framework
54fc65fecbcfeb25a93d14d4b52c2ce4106a5bf0.json
Replace self:: with static::
src/Illuminate/Database/Eloquent/Relations/Relation.php
@@ -367,7 +367,7 @@ protected static function buildMorphMapFromModels(array $models = null) */ public static function getMorphedModel($alias) { - return self::$morphMap[$alias] ?? null; + return static::$morphMap[$alias] ?? null; } /**
false
Other
laravel
framework
563e7d4e16d73eaafaf927fba2a29f5fbe783ede.json
Replace contents of service manifest atomically
src/Illuminate/Foundation/ProviderRepository.php
@@ -190,7 +190,7 @@ public function writeManifest($manifest) throw new Exception('The bootstrap/cache directory must be present and writable.'); } - $this->files->put( + $this->files->replace( $this->manifestPath, '<?php return '.var_export($manifest, true).';' ...
false
Other
laravel
framework
5ac66a8c341d659d61d128d52cc79f5a0de66219.json
Convert percentage sign in fallback filename
src/Illuminate/Filesystem/FilesystemAdapter.php
@@ -141,7 +141,7 @@ public function response($path, $name = null, array $headers = [], $disposition $filename = $name ?? basename($path); $disposition = $response->headers->makeDisposition( - $disposition, $filename, Str::ascii($filename) + $disposition, $filename, $this->fallb...
false
Other
laravel
framework
58da15941e019e9d9742358e22cc7f68eb7146b0.json
Create tests for some asserts methods Create tests for asserts methods from 'TestResponse'. The methods that now have new tests are: 'assertForbidden', 'assertOk', 'assertUnauthorized' and 'assertStatus'.
tests/Foundation/FoundationTestResponseTest.php
@@ -131,6 +131,22 @@ public function testAssertSeeTextInOrderCanFail2() $response->assertSeeTextInOrder(['foobar', 'qux', 'baz']); } + public function testAssertOk() + { + $statusCode = 500; + + $this->expectException(AssertionFailedError::class); + + $this->expectExceptionMes...
false
Other
laravel
framework
6f6f6ff7711671252be2d09abefc75e69b15b500.json
Remove unnecessary space
src/Illuminate/Routing/UrlGenerator.php
@@ -365,7 +365,7 @@ public function hasValidSignature(Request $request, $absolute = true) $signature = hash_hmac('sha256', $original, call_user_func($this->keyResolver)); - return hash_equals($signature, (string) $request->query('signature', '')) && + return hash_equals($signature, (string) ...
false
Other
laravel
framework
d4c37c3d1eaa450a6ce0649d7ac933076d1329ad.json
Use assertSame() for array test
tests/Support/SupportCollectionTest.php
@@ -1075,7 +1075,7 @@ public function testSortKeys() { $data = new Collection(['b' => 'dayle', 'a' => 'taylor']); - $this->assertEquals(['a' => 'taylor', 'b' => 'dayle'], $data->sortKeys()->all()); + $this->assertSame(['a' => 'taylor', 'b' => 'dayle'], $data->sortKeys()->all()); } ...
false
Other
laravel
framework
94403f69515978bdf68a1280f706ee30c473d28b.json
Fix columns parameter on paginate method This is currently broken and will throw a SQL exception: DB::table('posts')->paginate(5, ['title', 'content']); At the moment when you attempt to pass specific columns on the paginate method on the base query builder it will fail when you provide more than one column. SQL...
src/Illuminate/Database/Query/Builder.php
@@ -2138,7 +2138,7 @@ public function paginate($perPage = 15, $columns = ['*'], $pageName = 'page', $p { $page = $page ?: Paginator::resolveCurrentPage($pageName); - $total = $this->getCountForPagination($columns); + $total = $this->getCountForPagination(); $results = $total ? $...
true
Other
laravel
framework
94403f69515978bdf68a1280f706ee30c473d28b.json
Fix columns parameter on paginate method This is currently broken and will throw a SQL exception: DB::table('posts')->paginate(5, ['title', 'content']); At the moment when you attempt to pass specific columns on the paginate method on the base query builder it will fail when you provide more than one column. SQL...
tests/Database/DatabaseQueryBuilderTest.php
@@ -2826,7 +2826,7 @@ public function testPaginate() $results = collect([['test' => 'foo'], ['test' => 'bar']]); - $builder->shouldReceive('getCountForPagination')->once()->with($columns)->andReturn(2); + $builder->shouldReceive('getCountForPagination')->once()->andReturn(2); $builde...
true
Other
laravel
framework
94403f69515978bdf68a1280f706ee30c473d28b.json
Fix columns parameter on paginate method This is currently broken and will throw a SQL exception: DB::table('posts')->paginate(5, ['title', 'content']); At the moment when you attempt to pass specific columns on the paginate method on the base query builder it will fail when you provide more than one column. SQL...
tests/Integration/Database/QueryBuilderTest.php
@@ -6,6 +6,7 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; +use Illuminate\Contracts\Pagination\LengthAwarePaginator; use Illuminate\Tests\Integration\Database\DatabaseTestCase; /** @@ -18,12 +19,14 @@ protected function setUp(): void ...
true
Other
laravel
framework
3276dc36f7540fae5197173c35937f9e0046bcef.json
add test to check model scopes are accessible
tests/Integration/Database/EloquentWhereHasMorphTest.php
@@ -192,6 +192,15 @@ public function testOrWhereDoesntHaveMorph() $this->assertEquals([1, 2, 3], $comments->pluck('id')->all()); } + + public function testModelScopesAreAccessible() + { + $comments = Comment::whereHasMorph('commentable', [Post::class, Video::class], function (Builder $query...
false
Other
laravel
framework
2d14798f6115d5a4f7ee50359c43e4b8c6180d0f.json
Add option to output route:list as JSON
src/Illuminate/Foundation/Console/RouteListCommand.php
@@ -153,6 +153,12 @@ protected function pluckColumns(array $routes) */ protected function displayRoutes(array $routes) { + if ($this->option('json')) { + $this->line(json_encode(array_values($routes))); + + return; + } + $this->table($this->getHeaders(), $rou...
false
Other
laravel
framework
cda913232649edcf7dd1dc592dda81190bd4efe7.json
add index => viewAny to resourceAbilityMap
src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php
@@ -105,6 +105,7 @@ public function authorizeResource($model, $parameter = null, array $options = [] protected function resourceAbilityMap() { return [ + 'index' => 'viewAny', 'show' => 'view', 'create' => 'create', 'store' => 'create',
false
Other
laravel
framework
c9c5513bb0dcc94a118c4fe86348c02b2b0fded9.json
Create tests for assertNotFound
tests/Foundation/FoundationTestResponseTest.php
@@ -131,6 +131,21 @@ public function testAssertSeeTextInOrderCanFail2() $response->assertSeeTextInOrder(['foobar', 'qux', 'baz']); } + public function testAssertNotFound() + { + $statusCode = 500; + + $this->expectException(AssertionFailedError::class); + $this->expectExceptio...
false
Other
laravel
framework
94b7ef96349102d445fb06d5f1c17511e9e75c3b.json
Apply fixes from StyleCI (#28864)
src/Illuminate/Database/Eloquent/Builder.php
@@ -913,7 +913,7 @@ public function applyScopes() continue; } - $builder->callScope(function (Builder $builder) use ($scope) { + $builder->callScope(function (self $builder) use ($scope) { // If the scope is a Closure we will just go ahead and call ...
true
Other
laravel
framework
94b7ef96349102d445fb06d5f1c17511e9e75c3b.json
Apply fixes from StyleCI (#28864)
src/Illuminate/Foundation/Application.php
@@ -1106,7 +1106,7 @@ public function isLocale($locale) public function registerCoreContainerAliases() { foreach ([ - 'app' => [\Illuminate\Foundation\Application::class, \Illuminate\Contracts\Container\Container::class, \Illuminate\Contracts\Foundation\Application::class,...
true
Other
laravel
framework
94b7ef96349102d445fb06d5f1c17511e9e75c3b.json
Apply fixes from StyleCI (#28864)
tests/Integration/Foundation/FoundationHelpersTest.php
@@ -8,7 +8,7 @@ /** * @group integration */ -class HelpersTest extends TestCase +class FoundationHelpersTest extends TestCase { public function test_rescue() {
true
Other
laravel
framework
5aa0c3abb3affeef1d8e5736da147b411892842c.json
Fix Builder::dump() and dd() with global scopes
src/Illuminate/Database/Eloquent/Builder.php
@@ -71,7 +71,7 @@ class Builder * @var array */ protected $passthru = [ - 'insert', 'insertGetId', 'getBindings', 'toSql', + 'insert', 'insertGetId', 'getBindings', 'toSql', 'dump', 'dd', 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'average', 'sum', 'getConnection', ...
false
Other
laravel
framework
85c08016c424f6c8e45f08282523f8785eda9673.json
allow a when callback to dictate retries
src/Illuminate/Support/helpers.php
@@ -800,11 +800,12 @@ function preg_replace_array($pattern, array $replacements, $subject) * @param int $times * @param callable $callback * @param int $sleep + * @param callable $when * @return mixed * * @throws \Exception */ - function retry($times, callable $c...
true
Other
laravel
framework
85c08016c424f6c8e45f08282523f8785eda9673.json
allow a when callback to dictate retries
tests/Support/SupportHelpersTest.php
@@ -494,6 +494,42 @@ public function testRetry() $this->assertTrue(microtime(true) - $startTime >= 0.1); } + public function testRetryWithPassingWhenCallback() + { + $startTime = microtime(true); + + $attempts = retry(2, function ($attempts) { + if ($attempts > 1) { + ...
true
Other
laravel
framework
9039f2457e8df999aa1a0e401d04dafee135d9f5.json
Remove extra spaces.
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -117,7 +117,7 @@ public function assertForbidden() return $this; } - + /** * Assert that the response has an unauthorized status code. * @@ -126,7 +126,7 @@ public function assertForbidden() public function assertUnauthorized() { $actual = $this->getStatusCode(...
false
Other
laravel
framework
b0939f50e1178b6e2381b6379ac9942f210282db.json
Add assert method for unauthorized response. (#1)
src/Illuminate/Foundation/Testing/TestResponse.php
@@ -117,6 +117,23 @@ public function assertForbidden() return $this; } + + /** + * Assert that the response has an unauthorized status code. + * + * @return $this + */ + public function assertUnauthorized() + { + $actual = $this->getStatusCode(); + + PH...
false
Other
laravel
framework
29560b5e3c8a115e358df1ffef40baf3de019c90.json
Convert Arrayable attributes to Array.
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
@@ -110,6 +110,12 @@ public function attributesToArray() foreach ($this->getArrayableAppends() as $key) { $attributes[$key] = $this->mutateAttributeForArray($key, null); } + + foreach ($attributes as $key => $value) { + if ($value instanceof Arrayable) { + ...
false