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 | bf02037b77fc4075a067ca08d565349d391557bb.json | update validation component | src/Illuminate/Validation/composer.json | @@ -16,7 +16,7 @@
"require": {
"php": "^7.1.3",
"ext-json": "*",
- "egulias/email-validator": "~2.0",
+ "egulias/email-validator": "^2.0",
"illuminate/container": "5.8.*",
"illuminate/contracts": "5.8.*",
"illuminate/support": "5.8.*", | false |
Other | laravel | framework | c071123617c02d5cf9db082015ad10f81029cb55.json | Use a library for email validation (#26503) | composer.json | @@ -21,6 +21,7 @@
"ext-openssl": "*",
"doctrine/inflector": "^1.1",
"dragonmantank/cron-expression": "^2.0",
+ "egulias/email-validator": "~2.0",
"erusev/parsedown": "^1.7",
"league/flysystem": "^1.0.8",
"monolog/monolog": "^1.12", | true |
Other | laravel | framework | c071123617c02d5cf9db082015ad10f81029cb55.json | Use a library for email validation (#26503) | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -16,7 +16,9 @@
use Illuminate\Validation\Rules\Exists;
use Illuminate\Validation\Rules\Unique;
use Illuminate\Validation\ValidationData;
+use Egulias\EmailValidator\EmailValidator;
use Symfony\Component\HttpFoundation\File\File;
+use Egulias\EmailValidator\Validation\RFCValidation;
use Symfony\Component\HttpFou... | true |
Other | laravel | framework | c071123617c02d5cf9db082015ad10f81029cb55.json | Use a library for email validation (#26503) | src/Illuminate/Validation/composer.json | @@ -16,6 +16,7 @@
"require": {
"php": "^7.1.3",
"ext-json": "*",
+ "egulias/email-validator": "~2.0",
"illuminate/container": "5.8.*",
"illuminate/contracts": "5.8.*",
"illuminate/support": "5.8.*", | true |
Other | laravel | framework | c071123617c02d5cf9db082015ad10f81029cb55.json | Use a library for email validation (#26503) | tests/Validation/ValidationValidatorTest.php | @@ -386,10 +386,10 @@ public function testInputIsReplaced()
{
$trans = $this->getIlluminateArrayTranslator();
$trans->addLines(['validation.email' => ':input is not a valid email'], 'en');
- $v = new Validator($trans, ['email' => 'a@s'], ['email' => 'email']);
+ $v = new Validator($... | true |
Other | laravel | framework | 618b49a38bfc88717ea61869284c2254aca5bbfb.json | Apply fixes from StyleCI (#26512) | tests/Mail/MailLogTransportTest.php | @@ -6,7 +6,6 @@
use Psr\Log\LoggerInterface;
use Orchestra\Testbench\TestCase;
use Monolog\Handler\StreamHandler;
-use Monolog\Handler\RotatingFileHandler;
use Illuminate\Mail\Transport\LogTransport;
class MailLogTransportTest extends TestCase | false |
Other | laravel | framework | d9ad6863ebdc3b4c1edafad3e4046e0822b0bf46.json | Apply style fixes | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -571,7 +571,7 @@ public function validateDistinct($attribute, $value, $parameters)
$data = $this->getDistinctValues($attribute);
if (in_array('ignore_case', $parameters)) {
- return empty(preg_grep('/^' . preg_quote($value, '/') . '$/iu', $data));
+ return empty(preg_grep('/... | false |
Other | laravel | framework | 6ea332b642f480faf3ea9931057506e2c7a5ba25.json | Reset distinctValues after each check | src/Illuminate/Validation/Validator.php | @@ -257,6 +257,7 @@ public function after($callback)
public function passes()
{
$this->messages = new MessageBag;
+ $this->distinctValues = [];
// We'll spin through each rule, validating the attributes attached to that
// rule. Any error messages will be added to the conta... | true |
Other | laravel | framework | 6ea332b642f480faf3ea9931057506e2c7a5ba25.json | Reset distinctValues after each check | tests/Validation/ValidationValidatorTest.php | @@ -1798,7 +1798,7 @@ public function testValidateDistinct()
$this->assertFalse($v->passes());
$this->assertCount(4, $v->messages());
- $v = new Validator($trans, ['foo' => ['foo', 'bar'], 'bar' => ['foo', 'bar']], ['foo.*' => 'distinct', 'bar.*' => 'distinct']);
+ $v->setData(['foo' =... | true |
Other | laravel | framework | be79e7625c55526db900f4e2105ac5d15a6b4633.json | Apply fixes from StyleCI (#26479) | src/Illuminate/Session/Middleware/StartSession.php | @@ -8,7 +8,6 @@
use Illuminate\Support\Facades\Date;
use Illuminate\Session\SessionManager;
use Illuminate\Contracts\Session\Session;
-use Illuminate\Session\CookieSessionHandler;
use Symfony\Component\HttpFoundation\Cookie;
use Symfony\Component\HttpFoundation\Response;
| false |
Other | laravel | framework | 463bb87662143734251923b36a473f5b4cdb5440.json | remove unused method | src/Illuminate/Session/Middleware/StartSession.php | @@ -203,18 +203,4 @@ protected function sessionIsPersistent(array $config = null)
return ! in_array($config['driver'], [null, 'array']);
}
-
- /**
- * Determine if the session is using cookie sessions.
- *
- * @return bool
- */
- protected function usingCookieSessions()
- {
- ... | false |
Other | laravel | framework | d3df6d855d2d98ac1ffb05b0d90e2f153f34ae28.json | Apply fixes from StyleCI (#26478) | tests/Integration/Session/SessionPersistenceTest.php | @@ -55,6 +55,7 @@ class FakeNullSessionHandler extends NullSessionHandler
public function write($sessionId, $data)
{
$this->written = true;
+
return true;
}
} | false |
Other | laravel | framework | f546835092206037ce1d9b4103be204e2e9272cc.json | Add missing docblock (#26464) | src/Illuminate/Foundation/Console/PresetCommand.php | @@ -27,6 +27,8 @@ class PresetCommand extends Command
* Execute the console command.
*
* @return void
+ *
+ * @throws \InvalidArgumentException
*/
public function handle()
{ | false |
Other | laravel | framework | cc188a561bc186ed4fc9811e8d60c71550ff8bbe.json | Add ability to publish error views | src/Illuminate/Foundation/Providers/FoundationServiceProvider.php | @@ -17,6 +17,18 @@ class FoundationServiceProvider extends AggregateServiceProvider
FormRequestServiceProvider::class,
];
+ /**
+ * Boot the service provider.
+ */
+ public function boot()
+ {
+ if ($this->app->runningInConsole()) {
+ $this->publishes([
+ ... | false |
Other | laravel | framework | a40653328d830b92b464540bc1468b6f183b75d4.json | Switch increments to use unsignedBigInteger | src/Illuminate/Database/Schema/Blueprint.php | @@ -526,14 +526,14 @@ public function foreign($columns, $name = null)
}
/**
- * Create a new auto-incrementing integer (4-byte) column on the table.
+ * Create a new auto-incrementing integer column on the table.
*
* @param string $column
* @return \Illuminate\Database\Schema\Col... | true |
Other | laravel | framework | a40653328d830b92b464540bc1468b6f183b75d4.json | Switch increments to use unsignedBigInteger | src/Illuminate/Database/Schema/Builder.php | @@ -36,6 +36,13 @@ class Builder
*/
public static $defaultStringLength = 255;
+ /**
+ * The default increments type for migrations.
+ *
+ * @var string
+ */
+ public static $defaultIncrementsType = 'unsignedBigInteger';
+
/**
* Create a new database Schema manager.
*
... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | src/Illuminate/Database/Eloquent/Relations/BelongsTo.php | @@ -111,7 +111,9 @@ public function addEagerConstraints(array $models)
// our eagerly loading query so it returns the proper models from execution.
$key = $this->related->getTable().'.'.$this->ownerKey;
- $this->query->whereIn($key, $this->getEagerModelKeys($models));
+ $whereIn = $thi... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | @@ -209,7 +209,9 @@ protected function addWhereConstraints()
*/
public function addEagerConstraints(array $models)
{
- $this->query->whereIn($this->getQualifiedForeignPivotKeyName(), $this->getKeys($models, $this->parentKey));
+ $whereIn = $this->whereInMethod($this->parent, $this->parentK... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php | @@ -146,7 +146,9 @@ public function throughParentSoftDeletes()
*/
public function addEagerConstraints(array $models)
{
- $this->query->whereIn(
+ $whereIn = $this->whereInMethod($this->farParent, $this->localKey);
+
+ $this->query->{$whereIn}(
$this->getQualifiedFirstKe... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php | @@ -81,7 +81,7 @@ public function addConstraints()
*/
public function addEagerConstraints(array $models)
{
- $whereIn = in_array($this->parent->getKeyType(), ['int', 'integer']) ? 'whereInRaw' : 'whereIn';
+ $whereIn = $this->whereInMethod($this->parent, $this->localKey);
$this-... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | src/Illuminate/Database/Eloquent/Relations/Relation.php | @@ -307,6 +307,21 @@ public function relatedUpdatedAt()
return $this->related->getUpdatedAtColumn();
}
+ /**
+ * Get the name of the "where in" method for eager loading.
+ *
+ * @param \Illuminate\Database\Eloquent\Model $model
+ * @param string $key
+ * @return string
+ *... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | tests/Database/DatabaseEloquentBelongsToTest.php | @@ -79,15 +79,19 @@ public function testUpdateMethodRetrievesModelAndUpdates()
public function testEagerConstraintsAreProperlyAdded()
{
$relation = $this->getRelation();
- $relation->getQuery()->shouldReceive('whereIn')->once()->with('relation.id', ['foreign.value', 'foreign.value.two']);
+ ... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | tests/Database/DatabaseEloquentHasManyTest.php | @@ -200,6 +200,7 @@ public function testRelationIsProperlyInitialized()
public function testEagerConstraintsAreProperlyAdded()
{
$relation = $this->getRelation();
+ $relation->getParent()->shouldReceive('getKeyName')->once()->andReturn('id');
$relation->getParent()->shouldReceive('get... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | tests/Database/DatabaseEloquentHasOneTest.php | @@ -163,6 +163,7 @@ public function testRelationIsProperlyInitialized()
public function testEagerConstraintsAreProperlyAdded()
{
$relation = $this->getRelation();
+ $relation->getParent()->shouldReceive('getKeyName')->once()->andReturn('id');
$relation->getParent()->shouldReceive('get... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | tests/Database/DatabaseEloquentMorphTest.php | @@ -28,6 +28,7 @@ public function testMorphOneSetsProperConstraints()
public function testMorphOneEagerConstraintsAreProperlyAdded()
{
$relation = $this->getOneRelation();
+ $relation->getParent()->shouldReceive('getKeyName')->once()->andReturn('id');
$relation->getParent()->shouldRec... | true |
Other | laravel | framework | 352e8abcf1354e73cbab6473d6467dd92960d38e.json | Improve eager loading performance | tests/Database/DatabaseEloquentMorphToManyTest.php | @@ -18,7 +18,9 @@ public function tearDown()
public function testEagerConstraintsAreProperlyAdded()
{
$relation = $this->getRelation();
- $relation->getQuery()->shouldReceive('whereIn')->once()->with('taggables.taggable_id', [1, 2]);
+ $relation->getParent()->shouldReceive('getKeyName')... | true |
Other | laravel | framework | 96de5cc1753323f4a69ce72d5e7c2a549718670c.json | Provide retry callback with the attempt count
This provides the call back with a attempt count, this can be helpful
for function that need to modify there behavior with each attempt, or
log it some how. | src/Illuminate/Support/helpers.php | @@ -739,19 +739,21 @@ function preg_replace_array($pattern, array $replacements, $subject)
* Retry an operation a given number of times.
*
* @param int $times
- * @param callable $callback
+ * @param callable $callback First parameter is the number of attempt
* @param int $sleep
... | true |
Other | laravel | framework | 96de5cc1753323f4a69ce72d5e7c2a549718670c.json | Provide retry callback with the attempt count
This provides the call back with a attempt count, this can be helpful
for function that need to modify there behavior with each attempt, or
log it some how. | tests/Support/SupportHelpersTest.php | @@ -868,6 +868,25 @@ public function something()
})->present()->something());
}
+ public function testRetry()
+ {
+ $startTime = microtime(true);
+
+ $attempts = retry(2, function ($attempts) {
+ if ($attempts > 1) {
+ return $attempts;
+ }
+
+ ... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php | @@ -81,7 +81,9 @@ public function addConstraints()
*/
public function addEagerConstraints(array $models)
{
- $this->query->whereIn(
+ $whereIn = in_array($this->parent->getKeyType(), ['int', 'integer']) ? 'whereInRaw' : 'whereIn';
+
+ $this->query->$whereIn(
$this->fore... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | src/Illuminate/Database/Query/Builder.php | @@ -948,6 +948,30 @@ protected function whereInExistingQuery($column, $query, $boolean, $not)
return $this;
}
+ /**
+ * Add a "where in raw" clause to the query.
+ *
+ * @param string $column
+ * @param array $values
+ * @param string $boolean
+ * @param bool $not
+... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | src/Illuminate/Database/Query/Grammars/Grammar.php | @@ -301,6 +301,22 @@ protected function whereNotInSub(Builder $query, $where)
return $this->wrap($where['column']).' not in ('.$this->compileSelect($where['query']).')';
}
+ /**
+ * Compile a "where in raw" clause.
+ *
+ * @param \Illuminate\Database\Query\Builder $query
+ * @param ... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | tests/Database/DatabaseEloquentHasManyTest.php | @@ -200,6 +200,19 @@ public function testRelationIsProperlyInitialized()
public function testEagerConstraintsAreProperlyAdded()
{
$relation = $this->getRelation();
+ $relation->getParent()->shouldReceive('getKeyType')->once()->andReturn('int');
+ $relation->getQuery()->shouldReceive('wh... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | tests/Database/DatabaseEloquentHasOneTest.php | @@ -163,7 +163,8 @@ public function testRelationIsProperlyInitialized()
public function testEagerConstraintsAreProperlyAdded()
{
$relation = $this->getRelation();
- $relation->getQuery()->shouldReceive('whereIn')->once()->with('table.foreign_key', [1, 2]);
+ $relation->getParent()->shou... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | tests/Database/DatabaseEloquentMorphTest.php | @@ -28,6 +28,7 @@ public function testMorphOneSetsProperConstraints()
public function testMorphOneEagerConstraintsAreProperlyAdded()
{
$relation = $this->getOneRelation();
+ $relation->getParent()->shouldReceive('getKeyType')->once()->andReturn('string');
$relation->getQuery()->should... | true |
Other | laravel | framework | a4405e91af27429f9e879d8754769cb68eb208d6.json | Improve eager loading performance on MySQL | tests/Database/DatabaseQueryBuilderTest.php | @@ -693,6 +693,14 @@ public function testEmptyWhereNotIns()
$this->assertEquals([0 => 1], $builder->getBindings());
}
+ public function testWhereInRaw()
+ {
+ $builder = $this->getBuilder();
+ $builder->select('*')->from('users')->whereInRaw('id', ['1a', 2]);
+ $this->assertEq... | true |
Other | laravel | framework | 2497ad869a689464e18549d2cf8558df6085f3a2.json | Fix irregular plural in make:policy command | src/Illuminate/Foundation/Console/PolicyMakeCommand.php | @@ -104,7 +104,7 @@ protected function replaceModel($stub, $model)
$stub = str_replace('DummyUser', $dummyUser, $stub);
- return str_replace('DocDummyPluralModel', Str::snake(Str::plural($dummyModel), ' '), $stub);
+ return str_replace('DocDummyPluralModel', Str::snake(Str::pluralStudly($dumm... | false |
Other | laravel | framework | e8f31f149948cad5b3e42aeb5ff3ce1e1ab5514e.json | Fix validate method | src/Illuminate/Contracts/Validation/Validator.php | @@ -13,6 +13,13 @@ interface Validator extends MessageProvider
*/
public function validate();
+ /**
+ * Return validated value.
+ *
+ * @return array
+ */
+ public function validated();
+
/**
* Determine if the data fails the validation rules.
* | true |
Other | laravel | framework | e8f31f149948cad5b3e42aeb5ff3ce1e1ab5514e.json | Fix validate method | src/Illuminate/Foundation/Http/FormRequest.php | @@ -172,7 +172,7 @@ protected function failedAuthorization()
*/
public function validated()
{
- return $this->getValidatorInstance()->validate();
+ return $this->getValidatorInstance()->validated();
}
/** | true |
Other | laravel | framework | e8f31f149948cad5b3e42aeb5ff3ce1e1ab5514e.json | Fix validate method | src/Illuminate/Validation/Validator.php | @@ -306,6 +306,22 @@ public function validate()
throw new ValidationException($this);
}
+ return $this->validated();
+ }
+
+ /**
+ * Return validated value.
+ *
+ * @return array
+ *
+ * @throws \Illuminate\Validation\ValidationException
+ */
+ public func... | true |
Other | laravel | framework | e8f31f149948cad5b3e42aeb5ff3ce1e1ab5514e.json | Fix validate method | tests/Validation/ValidationValidatorTest.php | @@ -4254,6 +4254,37 @@ public function testValidateReturnsValidatedDataNestedArrayRules()
$this->assertEquals(['nested' => [['bar' => 'baz'], ['bar' => 'baz2']]], $data);
}
+ public function testValidateAndValidatedData()
+ {
+ $post = ['first' => 'john', 'preferred'=>'john', 'last' => 'do... | true |
Other | laravel | framework | b70ec729f8459140505bae0f6a5699c2fc813ef7.json | Fix multi-word models with irregular plurals | src/Illuminate/Database/Eloquent/Model.php | @@ -1277,13 +1277,9 @@ public static function unsetConnectionResolver()
*/
public function getTable()
{
- if (! isset($this->table)) {
- return str_replace(
- '\\', '', Str::snake(Str::plural(class_basename($this)))
- );
- }
-
- return $this->tab... | true |
Other | laravel | framework | b70ec729f8459140505bae0f6a5699c2fc813ef7.json | Fix multi-word models with irregular plurals | src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | @@ -766,7 +766,7 @@ protected function touchingParent()
*/
protected function guessInverseRelation()
{
- return Str::camel(Str::plural(class_basename($this->getParent())));
+ return Str::camel(Str::pluralStudly(class_basename($this->getParent())));
}
/** | true |
Other | laravel | framework | b70ec729f8459140505bae0f6a5699c2fc813ef7.json | Fix multi-word models with irregular plurals | src/Illuminate/Foundation/Console/ModelMakeCommand.php | @@ -82,7 +82,7 @@ protected function createFactory()
*/
protected function createMigration()
{
- $table = Str::plural(Str::snake(class_basename($this->argument('name'))));
+ $table = Str::snake(Str::pluralStudly(class_basename($this->argument('name'))));
if ($this->option('pivot... | true |
Other | laravel | framework | b70ec729f8459140505bae0f6a5699c2fc813ef7.json | Fix multi-word models with irregular plurals | src/Illuminate/Support/Str.php | @@ -280,6 +280,22 @@ public static function plural($value, $count = 2)
return Pluralizer::plural($value, $count);
}
+ /**
+ * Pluralize the last word of an English, studly caps case string.
+ *
+ * @param string $value
+ * @param int $count
+ * @return string
+ */
+ ... | true |
Other | laravel | framework | b70ec729f8459140505bae0f6a5699c2fc813ef7.json | Fix multi-word models with irregular plurals | tests/Database/DatabaseEloquentIrregularPluralTest.php | @@ -0,0 +1,117 @@
+<?php
+
+namespace Illuminate\Tests\Database;
+
+use Carbon\Carbon;
+use PHPUnit\Framework\TestCase;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Capsule\Manager as DB;
+
+class DatabaseEloquentIrregularPluralTest extends TestCase
+{
+ public function setUp()
+ {
+ $... | true |
Other | laravel | framework | b70ec729f8459140505bae0f6a5699c2fc813ef7.json | Fix multi-word models with irregular plurals | tests/Support/SupportPluralizerTest.php | @@ -38,6 +38,9 @@ public function testIfEndOfWordPlural()
$this->assertEquals('MatrixFields', Str::plural('MatrixField'));
$this->assertEquals('IndexFields', Str::plural('IndexField'));
$this->assertEquals('VertexFields', Str::plural('VertexField'));
+
+ // This is expected behavior, u... | true |
Other | laravel | framework | 87ef35362234c47e868fb19e4f7fad5371f0fe42.json | add mix intergration tests (#26416) | tests/Integration/Foundation/FoundationHelpersTest.php | @@ -4,6 +4,7 @@
use Exception;
use Orchestra\Testbench\TestCase;
+use Illuminate\Contracts\Debug\ExceptionHandler;
/**
* @group integration
@@ -37,4 +38,77 @@ public function test(int $a)
$testClass->test([]);
}, 'rescued!'), 'rescued!');
}
+
+ public function testMixReportsExcept... | false |
Other | laravel | framework | bdfc993c0a5e547d01f76818e439d715a345a1e9.json | fix redis job php doc (#26381) | src/Illuminate/Queue/Jobs/RedisJob.php | @@ -120,7 +120,7 @@ public function getJobId()
/**
* Get the underlying Redis factory implementation.
*
- * @return \Illuminate\Contracts\Redis\Factory
+ * @return \Illuminate\Queue\RedisQueue
*/
public function getRedisQueue()
{ | false |
Other | laravel | framework | 12f3b94c564f174b338c8ed089fc1df89aaa64d8.json | Make View Factory macroable (#26361) | src/Illuminate/View/Factory.php | @@ -5,6 +5,7 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use InvalidArgumentException;
+use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\View\Engines\EngineResolver;
@@ -13,7 +14,8 @@
class Factory imp... | true |
Other | laravel | framework | 12f3b94c564f174b338c8ed089fc1df89aaa64d8.json | Make View Factory macroable (#26361) | tests/View/ViewFactoryTest.php | @@ -653,6 +653,15 @@ public function testIncrementingLoopIndicesOfUncountable()
$this->assertNull($factory->getLoopStack()[0]['last']);
}
+ public function testMacro()
+ {
+ $factory = $this->getFactory();
+ $factory->macro('getFoo', function () {
+ return 'Hello World';
+... | true |
Other | laravel | framework | dfe84e68eee50fa53a8ca886628b6b8a3275a1ad.json | Add whenEmpty + variants to Collection (#26345) | src/Illuminate/Support/Collection.php | @@ -501,6 +501,32 @@ public function when($value, callable $callback, callable $default = null)
return $this;
}
+ /**
+ * Apply the callback if the collection is empty.
+ *
+ * @param bool $value
+ * @param callable $callback
+ * @param callable $default
+ * @return stat... | true |
Other | laravel | framework | dfe84e68eee50fa53a8ca886628b6b8a3275a1ad.json | Add whenEmpty + variants to Collection (#26345) | tests/Support/SupportCollectionTest.php | @@ -2693,6 +2693,70 @@ public function testWhenDefault()
$this->assertSame(['michael', 'tom', 'taylor'], $collection->toArray());
}
+ public function testWhenEmpty()
+ {
+ $collection = new Collection(['michael', 'tom']);
+
+ $collection->whenEmpty(function ($collection) {
+ ... | true |
Other | laravel | framework | b4ddc72e9b48e460222277bde5afda2b73830fcc.json | Improve ColumnDefinition (#26338) | src/Illuminate/Database/Schema/ColumnDefinition.php | @@ -12,7 +12,7 @@
* @method ColumnDefinition collation(string $collation) Specify a collation for the column (MySQL/SQL Server)
* @method ColumnDefinition comment(string $comment) Add a comment to the column (MySQL)
* @method ColumnDefinition default(mixed $value) Specify a "default" value for the column
- * @met... | false |
Other | laravel | framework | 52485a0c4a1dd4af7066e4de5ed3b2ee9f26d022.json | Fix container return docblock (#26322) | src/Illuminate/Container/Container.php | @@ -712,7 +712,7 @@ protected function getConcrete($abstract)
* Get the contextual concrete binding for the given abstract.
*
* @param string $abstract
- * @return string|null
+ * @return \Closure|string|null
*/
protected function getContextualConcrete($abstract)
{
@@ -738,7 ... | false |
Other | laravel | framework | 15d4384e041bcc458ae6443a6becab1d995be60c.json | Fix @param directives for cache store
Some of this docblocks were using 3 spaces instead
of the recommended 2 in the contributions page. | src/Illuminate/Contracts/Cache/Store.php | @@ -26,7 +26,7 @@ public function many(array $keys);
* Store an item in the cache for a given number of minutes.
*
* @param string $key
- * @param mixed $value
+ * @param mixed $value
* @param float|int $minutes
* @return void
*/
@@ -45,7 +45,7 @@ public function put... | false |
Other | laravel | framework | c78004514e56822eec94e006862caf2ff1622aef.json | Update CacheManager::driver @return directive
The driver method only calls the store method which
return type is \Illuminate\Contracts\Cache\Repository,
so this should be the same one. | src/Illuminate/Cache/CacheManager.php | @@ -62,7 +62,7 @@ public function store($name = null)
* Get a cache driver instance.
*
* @param string|null $driver
- * @return mixed
+ * @return \Illuminate\Contracts\Cache\Repository
*/
public function driver($driver = null)
{ | false |
Other | laravel | framework | b6578835c7dfe14bbf2c0b5b32e9c1a3e54e8987.json | Add encrypter throws docblock (#26304) | src/Illuminate/Encryption/Encrypter.php | @@ -114,6 +114,8 @@ public function encrypt($value, $serialize = true)
*
* @param string $value
* @return string
+ *
+ * @throws \Illuminate\Contracts\Encryption\EncryptException
*/
public function encryptString($value)
{
@@ -154,6 +156,8 @@ public function decrypt($payload, ... | false |
Other | laravel | framework | 02d41da1a8013b98d69a7295f239d5f180a6ad4e.json | Fix contextual var docblock (#26305) | src/Illuminate/Container/ContextualBindingBuilder.php | @@ -17,7 +17,7 @@ class ContextualBindingBuilder implements ContextualBindingBuilderContract
/**
* The concrete instance.
*
- * @var string
+ * @var string|array
*/
protected $concrete;
| false |
Other | laravel | framework | 456eefe5bde4b6a99c41928411e4de073a9a6880.json | Fix nested whereDoesntHave() (#26228) | src/Illuminate/Database/Eloquent/Concerns/QueriesRelationships.php | @@ -74,6 +74,13 @@ protected function hasNested($relations, $operator = '>=', $count = 1, $boolean
{
$relations = explode('.', $relations);
+ $doesntHave = $operator === '<' && $count === 1;
+
+ if ($doesntHave) {
+ $operator = '>=';
+ $count = 1;
+ }
+
... | true |
Other | laravel | framework | 456eefe5bde4b6a99c41928411e4de073a9a6880.json | Fix nested whereDoesntHave() (#26228) | tests/Database/DatabaseEloquentBuilderTest.php | @@ -876,6 +876,15 @@ public function testDoesntHave()
$this->assertEquals('select * from "eloquent_builder_test_model_parent_stubs" where not exists (select * from "eloquent_builder_test_model_close_related_stubs" where "eloquent_builder_test_model_parent_stubs"."foo_id" = "eloquent_builder_test_model_close_re... | true |
Other | laravel | framework | 456eefe5bde4b6a99c41928411e4de073a9a6880.json | Fix nested whereDoesntHave() (#26228) | tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php | @@ -526,6 +526,14 @@ public function testWhereHasWithNestedDeletedRelationship()
$this->assertCount(1, $users);
}
+ public function testWhereDoesntHaveWithNestedDeletedRelationship()
+ {
+ $this->createUsers();
+
+ $users = SoftDeletesTestUser::doesntHave('posts.comments')->get();
+ ... | true |
Other | laravel | framework | 68fec90c18d5a4871ad62d6aea5065c8763b988c.json | Apply fixes from StyleCI (#26299) | src/Illuminate/Database/SQLiteConnection.php | @@ -27,6 +27,7 @@ public function __construct($pdo, $database = '', $tablePrefix = '', array $conf
$this->getSchemaBuilder()->enableForeignKeyConstraints();
}
}
+
/**
* Get the default query grammar instance.
*
@@ -84,7 +85,7 @@ protected function getDoctrineDriver()
/**... | false |
Other | laravel | framework | 07648ae5ce79d09d1032818cb5af10cd5a5365e7.json | Create getter for the http middleware groups
This getter allows to create tests for the route middleware groups,
which is currently not possible because the property is protected.
For example, if you want to ensure that the web group is using a
middleware to track utm campaigns, with this getter you can write:
```ph... | src/Illuminate/Foundation/Http/Kernel.php | @@ -335,4 +335,14 @@ public function getApplication()
{
return $this->app;
}
+
+ /**
+ * Get the application's route middleware groups.
+ *
+ * @return array
+ */
+ public function getMiddlewareGroups()
+ {
+ return $this->middlewareGroups;
+ }
} | true |
Other | laravel | framework | 07648ae5ce79d09d1032818cb5af10cd5a5365e7.json | Create getter for the http middleware groups
This getter allows to create tests for the route middleware groups,
which is currently not possible because the property is protected.
For example, if you want to ensure that the web group is using a
middleware to track utm campaigns, with this getter you can write:
```ph... | tests/Foundation/Http/KernelTest.php | @@ -0,0 +1,35 @@
+<?php
+
+namespace Illuminate\Tests\Foundation\Http;
+
+use Illuminate\Routing\Router;
+use PHPUnit\Framework\TestCase;
+use Illuminate\Events\Dispatcher;
+use Illuminate\Foundation\Application;
+use Illuminate\Foundation\Http\Kernel;
+
+class KernelTest extends TestCase
+{
+ public function testGe... | true |
Other | laravel | framework | 442c5eea031f4bfdcbe1de790a9f383e1314dcec.json | Improve findOrFail() exceptions (#26182) | src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | @@ -514,7 +514,7 @@ public function findOrFail($id, $columns = ['*'])
return $result;
}
- throw (new ModelNotFoundException)->setModel(get_class($this->related));
+ throw (new ModelNotFoundException)->setModel(get_class($this->related), $id);
}
/** | true |
Other | laravel | framework | 442c5eea031f4bfdcbe1de790a9f383e1314dcec.json | Improve findOrFail() exceptions (#26182) | src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php | @@ -331,7 +331,7 @@ public function findOrFail($id, $columns = ['*'])
return $result;
}
- throw (new ModelNotFoundException)->setModel(get_class($this->related));
+ throw (new ModelNotFoundException)->setModel(get_class($this->related), $id);
}
/** | true |
Other | laravel | framework | 442c5eea031f4bfdcbe1de790a9f383e1314dcec.json | Improve findOrFail() exceptions (#26182) | tests/Database/DatabaseEloquentHasManyThroughIntegrationTest.php | @@ -132,7 +132,7 @@ public function testFirstOrFailThrowsAnException()
/**
* @expectedException \Illuminate\Database\Eloquent\ModelNotFoundException
- * @expectedExceptionMessage No query results for model [Illuminate\Tests\Database\HasManyThroughTestPost].
+ * @expectedExceptionMessage No query re... | true |
Other | laravel | framework | 437060a048d722c544f71637cd920a2ad20d19fd.json | Add test for decimal cast | tests/Integration/Database/EloquentModelDecimalCastingTest.php | @@ -0,0 +1,58 @@
+<?php
+
+namespace Illuminate\Tests\Integration\Database\EloquentModelDecimalCastingTest;
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Tests\Integration\Database\DatabaseTestCase;
+
+/**
+ * @group integration
+ */
+class EloquentModelDecimalCastin... | false |
Other | laravel | framework | 5892daa6e97590ea9a05dfa23b81493c8eaadc1c.json | Replace newQuery() with newModelQuery() (#26158) | src/Illuminate/Database/Eloquent/Model.php | @@ -544,7 +544,7 @@ protected function decrement($column, $amount = 1, array $extra = [])
*/
protected function incrementOrDecrement($column, $amount, $extra, $method)
{
- $query = $this->newQuery();
+ $query = $this->newModelQuery();
if (! $this->exists) {
return $... | true |
Other | laravel | framework | 5892daa6e97590ea9a05dfa23b81493c8eaadc1c.json | Replace newQuery() with newModelQuery() (#26158) | src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | @@ -788,7 +788,7 @@ public function touch()
// the related model's timestamps, to make sure these all reflect the changes
// to the parent models. This will help us keep any caching synced up here.
if (count($ids = $this->allRelatedIds()) > 0) {
- $this->getRelated()->newQuery()->w... | true |
Other | laravel | framework | 5892daa6e97590ea9a05dfa23b81493c8eaadc1c.json | Replace newQuery() with newModelQuery() (#26158) | src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php | @@ -124,7 +124,7 @@ public function delete()
*/
protected function getDeleteQuery()
{
- return $this->newQuery()->where([
+ return $this->newModelQuery()->where([
$this->foreignKey => $this->getOriginal($this->foreignKey, $this->getAttribute($this->foreignKey)),
$... | true |
Other | laravel | framework | 5892daa6e97590ea9a05dfa23b81493c8eaadc1c.json | Replace newQuery() with newModelQuery() (#26158) | tests/Database/DatabaseEloquentModelTest.php | @@ -1444,13 +1444,13 @@ public function testReplicateCreatesANewModelInstanceWithSameAttributeValues()
public function testIncrementOnExistingModelCallsQueryAndSetsAttribute()
{
- $model = m::mock(EloquentModelStub::class.'[newQuery]');
+ $model = m::mock(EloquentModelStub::class.'[newModelQue... | true |
Other | laravel | framework | 5892daa6e97590ea9a05dfa23b81493c8eaadc1c.json | Replace newQuery() with newModelQuery() (#26158) | tests/Database/DatabaseEloquentPivotTest.php | @@ -110,14 +110,14 @@ public function testKeysCanBeSetProperly()
public function testDeleteMethodDeletesModelByKeys()
{
- $pivot = $this->getMockBuilder(Pivot::class)->setMethods(['newQuery'])->getMock();
+ $pivot = $this->getMockBuilder(Pivot::class)->setMethods(['newModelQuery'])->getMock();... | true |
Other | laravel | framework | 0ec8c170c8604eb4ae55988b0f97dced8fef6a6f.json | Remove unused import (#26159) | src/Illuminate/Http/Resources/Json/JsonResource.php | @@ -4,7 +4,6 @@
use ArrayAccess;
use JsonSerializable;
-use Illuminate\Support\Collection;
use Illuminate\Container\Container;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Routing\UrlRoutable; | false |
Other | laravel | framework | 6403bea2360361465726a1661a59241fd788176b.json | Remove useless statement. (#26160) | src/Illuminate/Http/Resources/Json/JsonResource.php | @@ -91,9 +91,7 @@ public function resolve($request = null)
$request = $request ?: Container::getInstance()->make('request')
);
- if (is_array($data)) {
- $data = $data;
- } elseif ($data instanceof Arrayable) {
+ if ($data instanceof Arrayable) {
$dat... | false |
Other | laravel | framework | b723b90889f084c8026e2d92ecb125deb6087816.json | Define mix as const (#26119) | src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js | @@ -1,4 +1,4 @@
-let mix = require('laravel-mix');
+const mix = require('laravel-mix');
/*
|-------------------------------------------------------------------------- | true |
Other | laravel | framework | b723b90889f084c8026e2d92ecb125deb6087816.json | Define mix as const (#26119) | src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js | @@ -1,4 +1,4 @@
-let mix = require('laravel-mix');
+const mix = require('laravel-mix');
/*
|-------------------------------------------------------------------------- | true |
Other | laravel | framework | 3cad3720ca557581bcc60f4264d5f19abb2a0633.json | Add support for identity columns in PostgreSQL 10+
Since PostgreSQL 10 the preferred method of defining auto increment
columns is to use SQL standard identity columns instead of SERIAL psedo-types
COLUMN TYPE GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]
See https://www.postgresql.org/docs/10/... | src/Illuminate/Database/Schema/ColumnDefinition.php | @@ -19,6 +19,8 @@
* @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 | 3cad3720ca557581bcc60f4264d5f19abb2a0633.json | Add support for identity columns in PostgreSQL 10+
Since PostgreSQL 10 the preferred method of defining auto increment
columns is to use SQL standard identity columns instead of SERIAL psedo-types
COLUMN TYPE GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]
See https://www.postgresql.org/docs/10/... | src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | @@ -437,6 +437,38 @@ protected function typeLongText(Fluent $column)
return 'text';
}
+ private function generatableColumn($type, Fluent $column)
+ {
+ if (! $column->autoIncrement && $column->generatedAs === null) {
+ return $type;
+ }
+
+ if ($column->autoIncremen... | true |
Other | laravel | framework | 3cad3720ca557581bcc60f4264d5f19abb2a0633.json | Add support for identity columns in PostgreSQL 10+
Since PostgreSQL 10 the preferred method of defining auto increment
columns is to use SQL standard identity columns instead of SERIAL psedo-types
COLUMN TYPE GENERATED { ALWAYS | BY DEFAULT } AS IDENTITY [ ( sequence_options ) ]
See https://www.postgresql.org/docs/10/... | tests/Database/DatabasePostgresSchemaGrammarTest.php | @@ -660,6 +660,33 @@ public function testAddingUuid()
$this->assertEquals('alter table "users" add column "foo" uuid not null', $statements[0]);
}
+ public function testAddingGeneratedAs()
+ {
+ $blueprint = new Blueprint('users');
+ $blueprint->increments('foo')->generatedAs();
+ ... | true |
Other | laravel | framework | 06788ba388a91682dd98d01d30876fccd17ecda4.json | Fix redirect response docblock (#26077) | src/Illuminate/Http/RedirectResponse.php | @@ -37,7 +37,7 @@ class RedirectResponse extends BaseRedirectResponse
*
* @param string|array $key
* @param mixed $value
- * @return \Illuminate\Http\RedirectResponse
+ * @return $this
*/
public function with($key, $value = null)
{
@@ -114,7 +114,7 @@ public function onlyIn... | false |
Other | laravel | framework | 860267cc6b9fa3e41de18ffd7e7326898007ac11.json | REMOVE Size argument from constructor (#26080)
Remove 4th argument from constructor because ErrorException: Passing a size as 4th argument to the constructor is deprecated since 4.1 | src/Illuminate/Http/Testing/File.php | @@ -41,7 +41,7 @@ public function __construct($name, $tempFile)
parent::__construct(
$this->tempFilePath(), $name, $this->getMimeType(),
- filesize($this->tempFilePath()), null, true
+ null, true
);
}
| false |
Other | laravel | framework | 959b547fb26af22aced8358e34c3355a0928f813.json | Fix StyleCI warnings | tests/Integration/Database/EloquentRelationshipsTest.php | @@ -2,7 +2,6 @@
namespace Illuminate\Tests\Integration\Database\EloquentRelationshipsTest;
-use Illuminate\Database\Eloquent\Relations\HasOneThrough;
use Orchestra\Testbench\TestCase;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
@@ -14,6 +13,7 @@
use Illuminate\Database\Elo... | false |
Other | laravel | framework | fbd80a587323fabab67adffea8e6851065a3a7d7.json | Add extra test for overriding relationship | tests/Integration/Database/EloquentRelationshipsTest.php | @@ -2,6 +2,7 @@
namespace Illuminate\Tests\Integration\Database\EloquentRelationshipsTest;
+use Illuminate\Database\Eloquent\Relations\HasOneThrough;
use Orchestra\Testbench\TestCase;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
@@ -34,6 +35,7 @@ public function standard_rel... | false |
Other | laravel | framework | a9a53a743e5f854d9812f56f55e752f1cbdddb16.json | remove unused code | src/Illuminate/Translation/Translator.php | @@ -6,7 +6,6 @@
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Collection;
-use Illuminate\Support\HtmlString;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Translation\Loader;
use Illuminate\Support\NamespacedItemResolver;
@@ -265,8 +264,6 @@ protected function... | false |
Other | laravel | framework | b0efeb71216761ff8cefa621f45b43b4402702e8.json | Add throws docblock for console kernel (#26034) | src/Illuminate/Foundation/Console/Kernel.php | @@ -242,6 +242,8 @@ public function registerCommand($command)
* @param array $parameters
* @param \Symfony\Component\Console\Output\OutputInterface $outputBuffer
* @return int
+ *
+ * @throws \Symfony\Component\Console\Exception\CommandNotFoundException
*/
public function call($... | false |
Other | laravel | framework | 6d1f8ce635c4ef8a71abf4f733d08ced092c0d1f.json | add integration test | src/Illuminate/Database/Eloquent/Collection.php | @@ -63,7 +63,7 @@ public function load($relations)
return $this;
}
- /**
+ /**
* Load a set of relationship counts onto the collection.
*
* @param array|string $relations | true |
Other | laravel | framework | 6d1f8ce635c4ef8a71abf4f733d08ced092c0d1f.json | add integration test | tests/Integration/Database/EloquentCollectionLoadCountTest.php | @@ -0,0 +1,128 @@
+<?php
+
+namespace App\Integration\Database;
+
+use Illuminate\Support\Facades\DB;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\SoftDeletes;
+... | true |
Other | laravel | framework | c9820088e9a785639299e8569cce33592b485b0b.json | Update email.blade.php (#25963) | src/Illuminate/Notifications/resources/views/email.blade.php | @@ -51,12 +51,12 @@
@component('mail::subcopy')
@lang(
"If you’re having trouble clicking the \":actionText\" button, copy and paste the URL below\n".
- 'into your web browser: ',
+ 'into your web browser: [:actionURL](:actionURL)',
[
- 'actionText' => $actionText
+ 'actionText' => $acti... | false |
Other | laravel | framework | b34affa78985a2b09449d87190dd583df9ce00ea.json | Fix missing dependency (#25955)
The array class is used in the container and the contextual binding builder. If only the service container is required in another project, `Illuminate\Support\Arr` will not be present after updating or installing Composer dependencies. | src/Illuminate/Container/composer.json | @@ -16,6 +16,7 @@
"require": {
"php": "^7.1.3",
"illuminate/contracts": "5.7.*",
+ "illuminate/support": "5.7.*",
"psr/container": "^1.0"
},
"autoload": { | false |
Other | laravel | framework | 768d3212939dcebba54f9f3304d24dfe315953b7.json | Apply fixes from StyleCI (#25936) | src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php | @@ -299,7 +299,7 @@ protected function retrieveUser($request, $channel)
}
/**
- * Retrieve options for a certain channel
+ * Retrieve options for a certain channel.
*
* @param string $channel
* @return array
@@ -318,7 +318,7 @@ protected function retrieveChannelOptions($channel)
... | true |
Other | laravel | framework | 768d3212939dcebba54f9f3304d24dfe315953b7.json | Apply fixes from StyleCI (#25936) | src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelConventions.php | @@ -7,7 +7,7 @@
trait UsePusherChannelConventions
{
/**
- * Return true if channel is protected by authentication
+ * Return true if channel is protected by authentication.
*
* @param string $channel
* @return bool
@@ -18,7 +18,7 @@ public function isGuardedChannel($channel)
}
... | true |
Other | laravel | framework | 768d3212939dcebba54f9f3304d24dfe315953b7.json | Apply fixes from StyleCI (#25936) | tests/Broadcasting/BroadcasterTest.php | @@ -100,19 +100,22 @@ public function testNotFoundThrowsHttpException()
public function testCanRegisterChannelsWithoutOptions()
{
- $this->broadcaster->channel('somechannel', function () {});
+ $this->broadcaster->channel('somechannel', function () {
+ });
}
public function ... | true |
Other | laravel | framework | 768d3212939dcebba54f9f3304d24dfe315953b7.json | Apply fixes from StyleCI (#25936) | tests/Broadcasting/PusherBroadcasterTest.php | @@ -2,9 +2,9 @@
namespace Illuminate\Tests\Broadcasting;
-use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
use Mockery as m;
use PHPUnit\Framework\TestCase;
+use Illuminate\Broadcasting\Broadcasters\PusherBroadcaster;
class PusherBroadcasterTest extends TestCase
{
@@ -25,7 +25,7 @@ public function... | true |
Other | laravel | framework | 768d3212939dcebba54f9f3304d24dfe315953b7.json | Apply fixes from StyleCI (#25936) | tests/Broadcasting/RedisBroadcasterTest.php | @@ -2,9 +2,9 @@
namespace Illuminate\Tests\Broadcasting;
-use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster;
use Mockery as m;
use PHPUnit\Framework\TestCase;
+use Illuminate\Broadcasting\Broadcasters\RedisBroadcaster;
class RedisBroadcasterTest extends TestCase
{
@@ -27,7 +27,7 @@ public function te... | true |
Other | laravel | framework | 768d3212939dcebba54f9f3304d24dfe315953b7.json | Apply fixes from StyleCI (#25936) | tests/Broadcasting/UsePusherChannelsNamesTest.php | @@ -2,10 +2,10 @@
namespace Illuminate\Tests\Broadcasting;
-use Illuminate\Broadcasting\Broadcasters\Broadcaster;
-use Illuminate\Broadcasting\Broadcasters\UsePusherChannelConventions;
use Mockery as m;
use PHPUnit\Framework\TestCase;
+use Illuminate\Broadcasting\Broadcasters\Broadcaster;
+use Illuminate\Broadca... | true |
Other | laravel | framework | 477273c72be8b253b6421c69f3e37b5bf4c3a185.json | add some meta data to the notification mails | src/Illuminate/Notifications/Channels/MailChannel.php | @@ -8,6 +8,7 @@
use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Contracts\Mail\Mailable;
use Illuminate\Notifications\Notification;
+use Illuminate\Contracts\Queue\ShouldQueue;
class MailChannel
{
@@ -60,7 +61,7 @@ public function send($notifiable, Notification $notification)
$this->mailer->send(... | false |
Other | laravel | framework | 7bef94e69019b673b00d716ee8af891b84afb734.json | Enable passing options to custom presets
Currently it is not possible to create custom presets with customization | src/Illuminate/Foundation/Console/PresetCommand.php | @@ -12,7 +12,9 @@ class PresetCommand extends Command
*
* @var string
*/
- protected $signature = 'preset { type : The preset type (none, bootstrap, vue, react) }';
+ protected $signature = 'preset
+ { type : The preset type (none, bootstrap, vue, react) }
+ ... | false |
Other | laravel | framework | fd29db13a8419ca9c163f73b79dc951a3d3b4c7d.json | remove unused variable (#25926) | tests/Support/SupportCollectionTest.php | @@ -1405,18 +1405,18 @@ public function testMapSpread()
{
$c = new Collection([[1, 'a'], [2, 'b']]);
- $result = $c->mapSpread(function ($number, $character) use (&$result) {
+ $result = $c->mapSpread(function ($number, $character) {
return "{$number}-{$character}";
}... | false |
Other | laravel | framework | 21567e538a408717468ce755bb1b054ecda1fb61.json | Fix typo in changelog (#25907) | CHANGELOG-5.7.md | @@ -19,7 +19,7 @@
- Fix `be` method in `InteractsWithAuthentication` trait ([#25873](https://github.com/laravel/framework/pull/25873))
- Fixes the error when $resource is null ([#25838](https://github.com/laravel/framework/pull/25838))
- Attach all disk attachments and not only first one in the `Mail/Mailable.php` (... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.