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 | bf43c1473c85befc501791bcbe7fa18e88a22f25.json | Remove unused imports | src/Illuminate/Foundation/Console/ViewCacheCommand.php | @@ -4,7 +4,6 @@
use Illuminate\Console\Command;
use Illuminate\Support\Collection;
-use Illuminate\Support\Facades\View;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
| true |
Other | laravel | framework | bf43c1473c85befc501791bcbe7fa18e88a22f25.json | Remove unused imports | src/Illuminate/Routing/Exceptions/InvalidSignatureException.php | @@ -2,7 +2,6 @@
namespace Illuminate\Routing\Exceptions;
-use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
class InvalidSignatureException extends HttpException | true |
Other | laravel | framework | bf43c1473c85befc501791bcbe7fa18e88a22f25.json | Remove unused imports | tests/Database/DatabaseEloquentPolymorphicIntegrationTest.php | @@ -4,7 +4,6 @@
use PHPUnit\Framework\TestCase;
use Illuminate\Database\Connection;
-use Illuminate\Database\Query\Builder;
use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Eloquent\Model as Eloquent;
| true |
Other | laravel | framework | ec8fb5596b67de0edfcc8cc7c2167d6c184f080b.json | Simplify validators (#23635) | src/Illuminate/Foundation/Http/FormRequest.php | @@ -175,7 +175,7 @@ public function validated()
$rules = $this->container->call([$this, 'rules']);
return $this->only(collect($rules)->keys()->map(function ($rule) {
- return str_contains($rule, '.') ? explode('.', $rule)[0] : $rule;
+ return explode('.', $rule)[0];
})... | true |
Other | laravel | framework | ec8fb5596b67de0edfcc8cc7c2167d6c184f080b.json | Simplify validators (#23635) | src/Illuminate/Foundation/Providers/FoundationServiceProvider.php | @@ -2,7 +2,6 @@
namespace Illuminate\Foundation\Providers;
-use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\AggregateServiceProvider;
@@ -42,7 +41,7 @@ public function registerRequestValidation()
validator()->validate($this->all(),... | true |
Other | laravel | framework | ec8fb5596b67de0edfcc8cc7c2167d6c184f080b.json | Simplify validators (#23635) | src/Illuminate/Foundation/Validation/ValidatesRequests.php | @@ -2,7 +2,6 @@
namespace Illuminate\Foundation\Validation;
-use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Contracts\Validation\Factory;
use Illuminate\Validation\ValidationException;
@@ -58,7 +57,7 @@ public function validate(Request $request, array $rules,
protected function ext... | true |
Other | laravel | framework | ec8fb5596b67de0edfcc8cc7c2167d6c184f080b.json | Simplify validators (#23635) | src/Illuminate/Validation/Validator.php | @@ -309,7 +309,7 @@ public function validate()
$data = collect($this->getData());
return $data->only(collect($this->getRules())->keys()->map(function ($rule) {
- return Str::contains($rule, '.') ? explode('.', $rule)[0] : $rule;
+ return explode('.', $rule)[0];
})->uni... | true |
Other | laravel | framework | 7affebd69bd212da4f7e0674b61c5df51d101b30.json | make return type a bit more precise (#23634) | src/Illuminate/Contracts/Broadcasting/ShouldBroadcast.php | @@ -2,12 +2,14 @@
namespace Illuminate\Contracts\Broadcasting;
+use Illuminate\Broadcasting\Channel;
+
interface ShouldBroadcast
{
/**
* Get the channels the event should broadcast on.
*
- * @return array
+ * @return Channel|Channel[]
*/
public function broadcastOn();
} | false |
Other | laravel | framework | bc4624cef6e60b8f711da971f7a466d574f484c6.json | add model factory after callbacks with states | src/Illuminate/Database/Eloquent/Factory.php | @@ -120,7 +120,22 @@ public function state($class, $state, $attributes)
*/
public function afterMaking($class, $callback)
{
- $this->afterMaking[$class][] = $callback;
+ $this->afterMaking[$class]['default'][] = $callback;
+
+ return $this;
+ }
+
+ /**
+ * Define a callbac... | true |
Other | laravel | framework | bc4624cef6e60b8f711da971f7a466d574f484c6.json | add model factory after callbacks with states | src/Illuminate/Database/Eloquent/FactoryBuilder.php | @@ -300,6 +300,9 @@ protected function applyStates(array $definition, array $attributes = [])
{
foreach ($this->activeStates as $state) {
if (! isset($this->states[$this->class][$state])) {
+ if ($this->afterStateExists($state)) {
+ continue;
+ ... | true |
Other | laravel | framework | bc4624cef6e60b8f711da971f7a466d574f484c6.json | add model factory after callbacks with states | tests/Integration/Database/EloquentFactoryBuilderTest.php | @@ -51,6 +51,14 @@ protected function getEnvironmentSetUp($app)
$user->setRelation('profile', $profile);
});
+ $factory->afterMakingState(FactoryBuildableUser::class, 'with_callable_server', function (FactoryBuildableUser $user, Generator $faker) {
+ $server = factory(FactoryBu... | true |
Other | laravel | framework | 87838b56581bca1d5bc52f6d38de8bf1d52ace11.json | Allow higher order groupBy (#23608)
collect()->groupBy->computed() instead of
relying on a Closure value retriever. | src/Illuminate/Support/Collection.php | @@ -33,8 +33,9 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate
* @var array
*/
protected static $proxies = [
- 'average', 'avg', 'contains', 'each', 'every', 'filter', 'first', 'flatMap', 'keyBy',
- 'map', 'max', 'min', 'partition', 'reject', 'sortBy', ... | true |
Other | laravel | framework | 87838b56581bca1d5bc52f6d38de8bf1d52ace11.json | Allow higher order groupBy (#23608)
collect()->groupBy->computed() instead of
relying on a Closure value retriever. | tests/Support/SupportCollectionTest.php | @@ -2397,6 +2397,26 @@ public function testSplitEmptyCollection()
);
}
+ public function testHigherOrderCollectionGroupBy()
+ {
+ $collection = collect([
+ new TestSupportCollectionHigherOrderItem,
+ new TestSupportCollectionHigherOrderItem('TAYLOR'),
+ new ... | true |
Other | laravel | framework | 1f62d23c65c92a7ece0ceec2a99965adceb42d66.json | Remove unneeded parameter (#23583) | src/Illuminate/Routing/Middleware/ValidateSignature.php | @@ -18,7 +18,7 @@ class ValidateSignature
*/
public function handle($request, Closure $next)
{
- if ($request->hasValidSignature($request)) {
+ if ($request->hasValidSignature()) {
return $next($request);
}
| false |
Other | laravel | framework | 03e550fe04f395a59ac40ef683450c6c5a30842d.json | Apply fixes from StyleCI (#23558) | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -21,9 +21,9 @@
use Illuminate\Foundation\Console\EventMakeCommand;
use Illuminate\Foundation\Console\ModelMakeCommand;
use Illuminate\Foundation\Console\RouteListCommand;
+use Illuminate\Foundation\Console\ViewCacheCommand;
use Illuminate\Foundation\Console\ViewClearCommand;
use Illuminate\Session\Console\Sessi... | false |
Other | laravel | framework | 669b118bba3e8feb4d9b97a50a88602bde471464.json | Remove extra period from docblock (#23543) | src/Illuminate/Auth/TokenGuard.php | @@ -36,7 +36,7 @@ class TokenGuard implements Guard
*
* @param \Illuminate\Contracts\Auth\UserProvider $provider
* @param \Illuminate\Http\Request $request
- * @param. string $inputKey
+ * @param string $inputKey
* @param string $storageKey
* @return void
*/ | false |
Other | laravel | framework | 8913981ce443ed0d57518800fe407ae4be5567b7.json | Apply fixes from StyleCI (#23546) | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -23,9 +23,9 @@
use Illuminate\Foundation\Console\RouteListCommand;
use Illuminate\Foundation\Console\ViewClearCommand;
use Illuminate\Session\Console\SessionTableCommand;
+use Illuminate\Foundation\Console\BladeCacheCommand;
use Illuminate\Foundation\Console\PolicyMakeCommand;
use Illuminate\Foundation\Console\... | false |
Other | laravel | framework | 9fd1273ad79a46bb3aa006129109c6bc72766e4b.json | add blade cache command | src/Illuminate/Foundation/Console/BladeCacheCommand.php | @@ -0,0 +1,83 @@
+<?php
+
+namespace Illuminate\Foundation\Console;
+
+use Illuminate\Console\Command;
+use Illuminate\Support\Collection;
+use Illuminate\Support\Facades\View;
+use Symfony\Component\Finder\Finder;
+use Symfony\Component\Finder\SplFileInfo;
+
+class BladeCacheCommand extends Command
+{
+ /**
+ *... | true |
Other | laravel | framework | 9fd1273ad79a46bb3aa006129109c6bc72766e4b.json | add blade cache command | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -25,6 +25,7 @@
use Illuminate\Session\Console\SessionTableCommand;
use Illuminate\Foundation\Console\PolicyMakeCommand;
use Illuminate\Foundation\Console\RouteCacheCommand;
+use Illuminate\Foundation\Console\BladeCacheCommand;
use Illuminate\Foundation\Console\RouteClearCommand;
use Illuminate\Console\Schedulin... | true |
Other | laravel | framework | 8eaa147fab01a92fdf1f520e58440512c84b744b.json | Apply fixes from StyleCI (#23539) | src/Illuminate/Support/Testing/Fakes/QueueFake.php | @@ -85,7 +85,7 @@ public function assertPushedWithChain($job, $expectedChain = [], $callback = nul
PHPUnit::assertTrue(
collect($expectedChain)->isNotEmpty(),
- "The expected chain can not be empty."
+ 'The expected chain can not be empty.'
);
$this->isC... | true |
Other | laravel | framework | 8eaa147fab01a92fdf1f520e58440512c84b744b.json | Apply fixes from StyleCI (#23539) | tests/Support/SupportTestingQueueFakeTest.php | @@ -106,26 +106,26 @@ public function testAssertPushedUsingBulk()
public function testAssertPushedWithChainUsingClassesOrObjectsArray()
{
$this->fake->push(new JobWithChainStub([
- new JobStub
+ new JobStub,
]));
$this->fake->assertPushedWithChain(JobWithChai... | true |
Other | laravel | framework | ec5764c94ef567fe19644d137e3ce689dd47cdb4.json | remove Blade defaults (#23532)
current Blade functionality allows the user to define a default value if the first value is not set.
`{{ $name or 'Andrew' }}`
This feature was added in an early version of Laravel to be a shorthand for
`isset($name) ? $name : 'Andrew'`
PHP7 has introduced the null coalesce o... | src/Illuminate/View/Compilers/Concerns/CompilesEchos.php | @@ -46,7 +46,7 @@ protected function compileRawEchos($value)
$callback = function ($matches) {
$whitespace = empty($matches[3]) ? '' : $matches[3].$matches[3];
- return $matches[1] ? substr($matches[0], 1) : "<?php echo {$this->compileEchoDefaults($matches[2])}; ?>{$whitespace}";
+ ... | true |
Other | laravel | framework | ec5764c94ef567fe19644d137e3ce689dd47cdb4.json | remove Blade defaults (#23532)
current Blade functionality allows the user to define a default value if the first value is not set.
`{{ $name or 'Andrew' }}`
This feature was added in an early version of Laravel to be a shorthand for
`isset($name) ? $name : 'Andrew'`
PHP7 has introduced the null coalesce o... | tests/View/Blade/BladeEchoTest.php | @@ -11,8 +11,6 @@ public function testEchosAreCompiled()
$this->assertEquals('<?php echo $name; ?>', $this->compiler->compileString('{!!
$name
!!}'));
- $this->assertEquals('<?php echo isset($name) ? $name : \'foo\'; ?>',
- $this->compiler->compileString('{!! $name or \'... | true |
Other | laravel | framework | 9f1fc50d5069914eaa33aa20950aa8187179ef34.json | Fix typo in test method name | tests/Cache/ClearCommandTest.php | @@ -119,7 +119,7 @@ public function testClearWithStoreArgumentAndTagsOption()
$this->runCommand($command, ['store' => 'redis', '--tags' => 'foo']);
}
- public function testClearWillClearsRealTimeFacades()
+ public function testClearWillClearRealTimeFacades()
{
$command = new ClearCom... | false |
Other | laravel | framework | 7371846bab898dcc6a910b8eff514cc4140c1141.json | Use static instead of self | src/Illuminate/Database/Eloquent/Model.php | @@ -214,12 +214,12 @@ public static function withoutTouching($callback)
{
$currentClass = static::class;
- self::$ignoreOnTouch[] = $currentClass;
+ static::$ignoreOnTouch[] = $currentClass;
try {
call_user_func($callback);
} finally {
- self::$i... | false |
Other | laravel | framework | 4e0754d3b9d869c0fd23574ee725c67ac834b2dd.json | Add ArrayAccess test for Request object | tests/Http/HttpRequestTest.php | @@ -325,6 +325,34 @@ public function testInputMethod()
$this->assertInstanceOf('Symfony\Component\HttpFoundation\File\UploadedFile', $request['file']);
}
+ public function testArrayAccess()
+ {
+ $request = Request::create('/', 'GET', ['name' => null, 'foo' => ['bar' => null, 'baz' => '']])... | false |
Other | laravel | framework | 04091833c1d22406828862ef9d58519882342b61.json | remove test that isnt written properly | src/Illuminate/Queue/Queue.php | @@ -17,13 +17,6 @@ abstract class Queue
*/
protected $container;
- /**
- * The encrypter implementation.
- *
- * @var \Illuminate\Contracts\Encryption\Encrypter
- */
- protected $encrypter;
-
/**
* The connection name for the queue.
* | true |
Other | laravel | framework | 04091833c1d22406828862ef9d58519882342b61.json | remove test that isnt written properly | tests/Support/SupportTestingStorageFakeTest.php | @@ -1,41 +0,0 @@
-<?php
-
-namespace Illuminate\Tests\Support;
-
-use PHPUnit\Framework\TestCase;
-use Illuminate\Foundation\Application;
-use Illuminate\Support\Facades\Storage;
-use Illuminate\Filesystem\FilesystemManager;
-use PHPUnit\Framework\ExpectationFailedException;
-
-class StorageFakeTest extends TestCase
-{... | true |
Other | laravel | framework | 2115cf6274f4da1681311700b12416d637517340.json | Add cursor to ConnectionInterface (#23525) | src/Illuminate/Database/ConnectionInterface.php | @@ -27,18 +27,30 @@ public function raw($value);
*
* @param string $query
* @param array $bindings
+ * @param bool $useReadPdo
* @return mixed
*/
- public function selectOne($query, $bindings = []);
+ public function selectOne($query, $bindings = [], $useReadPdo = true);
... | false |
Other | laravel | framework | 0252d09aa8d764d460ef9172fe919e66e8c21ee4.json | Apply StyleCI Fixes | src/Illuminate/Validation/Rules/Unique.php | @@ -36,7 +36,7 @@ public function ignore($id, $idColumn = null)
}
$this->ignore = $id;
- $this->idColumn = $idColumn?? 'id';
+ $this->idColumn = $idColumn ?? 'id';
return $this;
}
@@ -50,7 +50,7 @@ public function ignore($id, $idColumn = null)
*/
public funct... | true |
Other | laravel | framework | 0252d09aa8d764d460ef9172fe919e66e8c21ee4.json | Apply StyleCI Fixes | tests/Support/framework/testing/disks/testing/letter.txt | @@ -0,0 +1 @@
+hi
\ No newline at end of file | true |
Other | laravel | framework | 0252d09aa8d764d460ef9172fe919e66e8c21ee4.json | Apply StyleCI Fixes | tests/Validation/ValidationUniqueRuleTest.php | @@ -2,8 +2,8 @@
namespace Illuminate\Tests\Validation;
-use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\TestCase;
+use Illuminate\Database\Eloquent\Model;
class ValidationUniqueRuleTest extends TestCase
{
@@ -23,9 +23,8 @@ public function testItCorrectlyFormatsAStringVersionOfTheRule()
... | true |
Other | laravel | framework | 9cda938d168d8aceaab1ca0409eafce484458f0b.json | Ignore a given model during a unique check. | src/Illuminate/Validation/Rules/Unique.php | @@ -2,6 +2,8 @@
namespace Illuminate\Validation\Rules;
+use Illuminate\Database\Eloquent\Model;
+
class Unique
{
use DatabaseRule;
@@ -18,7 +20,7 @@ class Unique
*
* @var string
*/
- protected $idColumn = 'id';
+ protected $idColumn;
/**
* Ignore the given ID during the ... | true |
Other | laravel | framework | 9cda938d168d8aceaab1ca0409eafce484458f0b.json | Ignore a given model during a unique check. | tests/Validation/ValidationUniqueRuleTest.php | @@ -2,6 +2,7 @@
namespace Illuminate\Tests\Validation;
+use Illuminate\Database\Eloquent\Model;
use PHPUnit\Framework\TestCase;
class ValidationUniqueRuleTest extends TestCase
@@ -10,7 +11,7 @@ public function testItCorrectlyFormatsAStringVersionOfTheRule()
{
$rule = new \Illuminate\Validation\Ru... | true |
Other | laravel | framework | a3889bc48c89baaca8c274fd3f0f561e8799e3f5.json | Remove unused conditional | src/Illuminate/Database/Eloquent/Model.php | @@ -661,7 +661,7 @@ protected function performUpdate(Builder $query)
// First we need to create a fresh query instance and touch the creation and
// update timestamp on the model which are maintained by us for developer
// convenience. Then we will just continue saving the model instances.
- ... | false |
Other | laravel | framework | 9f3b5e822b963433b400f07a1e9db52ae525660f.json | Apply StyleCI Fixes | tests/Database/DatabaseEloquentModelTest.php | @@ -1291,7 +1291,7 @@ public function testModelObserversCanBeAttachedToModelsThroughCallingObserveMeth
$events->shouldReceive('forget');
EloquentModelStub::observe([
'Illuminate\Tests\Database\EloquentTestObserverStub',
- 'Illuminate\Tests\Database\EloquentTestAnotherObserverSt... | false |
Other | laravel | framework | 5403d02c8f479855eeaaeb39935c0effc1b412bb.json | add more test variations | tests/Http/HttpRequestTest.php | @@ -304,6 +304,12 @@ public function testFilledAnyMethod()
$this->assertTrue($request->filledAny(['name']));
$this->assertTrue($request->filledAny('name'));
+ $this->assertFalse($request->filledAny(['age']));
+ $this->assertFalse($request->filledAny('age'));
+
+ $this->assertFal... | false |
Other | laravel | framework | 4bb96d1f8a415023632064e9ec114ed32fe2ae0d.json | fix doc block | src/Illuminate/Http/Concerns/InteractsWithInput.php | @@ -131,7 +131,7 @@ public function filled($key)
return true;
}
- /**
+ /**
* Determine if the request contains a non-empty value for any of the given inputs.
*
* @param string|array $keys | false |
Other | laravel | framework | 591d2194b731804c438301a82522190c4397581c.json | add new tests | tests/Integration/Database/EloquentFactoryBuilderTest.php | @@ -38,6 +38,32 @@ protected function getEnvironmentSetUp($app)
];
});
+ $factory->define(FactoryBuildableProfile::class, function (Generator $faker) {
+ return [
+ 'user_id' => function () {
+ return factory(FactoryBuildableUser::class)->creat... | false |
Other | laravel | framework | d15cfe3c57e53467445f6ca599091ac13ccd2356.json | fix existing tests | src/Illuminate/Database/Eloquent/FactoryBuilder.php | @@ -193,8 +193,9 @@ public function make(array $attributes = [])
{
if ($this->amount === null) {
$instance = $this->makeInstance($attributes);
+ $this->applyAfter(collect([$instance]), 'make');
- return $this->applyAfter(collect([$instance]), 'make');
+ retu... | false |
Other | laravel | framework | 91ee51fefc510f2ed20701579e9d6b40abaf82d6.json | update doc block | src/Illuminate/Support/Arr.php | @@ -541,7 +541,7 @@ public static function set(&$array, $key, $value)
* Shuffle the given array and return the result.
*
* @param array $array
- * @param int $seed
+ * @param int|null $seed
* @return array
*/
public static function shuffle($array, $seed = null) | false |
Other | laravel | framework | 43851636c4b5bf87ea81f6bfb108bc14db445446.json | add seed to Arr::shuffle() | src/Illuminate/Support/Arr.php | @@ -541,11 +541,20 @@ public static function set(&$array, $key, $value)
* Shuffle the given array and return the result.
*
* @param array $array
+ * @param int $seed
* @return array
*/
- public static function shuffle($array)
+ public static function shuffle($array, $seed = n... | true |
Other | laravel | framework | 43851636c4b5bf87ea81f6bfb108bc14db445446.json | add seed to Arr::shuffle() | src/Illuminate/Support/Collection.php | @@ -1360,19 +1360,7 @@ public function shift()
*/
public function shuffle($seed = null)
{
- $items = $this->items;
-
- if (is_null($seed)) {
- shuffle($items);
- } else {
- srand($seed);
-
- usort($items, function () {
- return rand(-1... | true |
Other | laravel | framework | 43851636c4b5bf87ea81f6bfb108bc14db445446.json | add seed to Arr::shuffle() | tests/Support/SupportArrTest.php | @@ -498,6 +498,14 @@ public function testSet()
$this->assertEquals(['products' => ['desk' => ['price' => 200]]], $array);
}
+ public function testShuffleWithSeed()
+ {
+ $this->assertEquals(
+ Arr::shuffle(range(0, 100, 10), 1234),
+ Arr::shuffle(range(0, 100, 10), 123... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | composer.json | @@ -110,22 +110,22 @@
"suggest": {
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
- "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).",
- "doctrine/dbal": "Require... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Broadcasting/composer.json | @@ -32,7 +32,7 @@
}
},
"suggest": {
- "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~3.0)."
+ "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^3.0)."
},
"config": {
"sort-packages": true | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Console/composer.json | @@ -30,8 +30,8 @@
}
},
"suggest": {
- "dragonmantank/cron-expression": "Required to use scheduling component (~2.0).",
- "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~6.0).",
+ "dragonmantank/cron-expression": "Required to use scheduling component (^2.0)."... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Database/composer.json | @@ -31,8 +31,8 @@
}
},
"suggest": {
- "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.6).",
- "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).",
+ "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6).",
+ ... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Filesystem/composer.json | @@ -30,10 +30,10 @@
}
},
"suggest": {
- "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).",
- "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).",
- "league/flysystem-rackspace": "Required to use the Flysystem Rackspace d... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Mail/composer.json | @@ -34,8 +34,8 @@
}
},
"suggest": {
- "aws/aws-sdk-php": "Required to use the SES mail driver (~3.0).",
- "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (~6.0)."
+ "aws/aws-sdk-php": "Required to use the SES mail driver (^3.0).",
+ "guzzlehttp/... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Notifications/composer.json | @@ -36,9 +36,9 @@
}
},
"suggest": {
- "guzzlehttp/guzzle": "Required to use the Slack transport (~6.0)",
+ "guzzlehttp/guzzle": "Required to use the Slack transport (^6.0)",
"illuminate/database": "Required to use the database transport (5.7.*).",
- "nexmo/client": "Requ... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Queue/composer.json | @@ -37,9 +37,9 @@
"suggest": {
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-posix": "Required to use all features of the queue worker.",
- "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).",
+ "aws/aws-sdk-php": "Required to use the SQS queue... | true |
Other | laravel | framework | c6241441b93113d6c87b83d4e71f7a1d82b2fddc.json | Update suggestion constraints | src/Illuminate/Routing/composer.json | @@ -38,7 +38,7 @@
},
"suggest": {
"illuminate/console": "Required to use the make commands (5.7.*).",
- "symfony/psr-http-message-bridge": "Required to psr7 bridging features (~1.0)."
+ "symfony/psr-http-message-bridge": "Required to psr7 bridging features (^1.0)."
},
"config"... | true |
Other | laravel | framework | 9457b28b470036582a215599b7cb84616a41f297.json | fix broken constraint | src/Illuminate/Support/composer.json | @@ -18,7 +18,7 @@
"ext-mbstring": "*",
"doctrine/inflector": "~1.1",
"illuminate/contracts": "5.5.*",
- "nesbot/carbon": "^1.24.1",
+ "nesbot/carbon": "^1.24.1"
},
"replace": {
"tightenco/collect": "<5.5.33" | false |
Other | laravel | framework | 84cc466c0e78140b15aade306dee6cea3dac5b59.json | Fix style issue | tests/Database/DatabaseEloquentRelationTest.php | @@ -192,7 +192,7 @@ public function testIgnoredModelsStateIsResetWhenThereAreExceptions()
$this->fail('Exception was not thrown');
} catch (\Exception $exception) {
-
+ // Does nothing.
}
$this->assertTrue($related->shouldTouch()); | false |
Other | laravel | framework | fe1cbdf3b51ce1235b8c91f5e603f1e9306e4f6f.json | Add optimize and optimize:clear commands | src/Illuminate/Foundation/Console/OptimizeClearCommand.php | @@ -0,0 +1,37 @@
+<?php
+
+namespace Illuminate\Foundation\Console;
+
+use Illuminate\Console\Command;
+
+class OptimizeClearCommand extends Command
+{
+ /**
+ * The console command name.
+ *
+ * @var string
+ */
+ protected $name = 'optimize:clear';
+
+ /**
+ * The console command descript... | true |
Other | laravel | framework | fe1cbdf3b51ce1235b8c91f5e603f1e9306e4f6f.json | Add optimize and optimize:clear commands | src/Illuminate/Foundation/Console/OptimizeCommand.php | @@ -0,0 +1,37 @@
+<?php
+
+namespace Illuminate\Foundation\Console;
+
+use Illuminate\Console\Command;
+
+class OptimizeCommand extends Command
+{
+ /**
+ * The console command name.
+ *
+ * @var string
+ */
+ protected $name = 'optimize';
+
+ /**
+ * The console command description.
+ ... | true |
Other | laravel | framework | fe1cbdf3b51ce1235b8c91f5e603f1e9306e4f6f.json | Add optimize and optimize:clear commands | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -16,6 +16,7 @@
use Illuminate\Foundation\Console\JobMakeCommand;
use Illuminate\Database\Console\Seeds\SeedCommand;
use Illuminate\Foundation\Console\MailMakeCommand;
+use Illuminate\Foundation\Console\OptimizeCommand;
use Illuminate\Foundation\Console\RuleMakeCommand;
use Illuminate\Foundation\Console\TestMake... | true |
Other | laravel | framework | b3a5608ff60a3679d51536a65bb525bdc2390fbc.json | remove set state | src/Illuminate/Support/Carbon.php | @@ -45,15 +45,4 @@ public static function serializeUsing($callback)
{
static::$serializer = $callback;
}
-
- /**
- * Create a new Carbon instance based on the given state array.
- *
- * @param array $array
- * @return static
- */
- public static function __set_state(array ... | false |
Other | laravel | framework | b17f5337affb28802c861e8f8af4fb1d5bec2582.json | fix shaky test | tests/Integration/Http/ThrottleRequestsTest.php | @@ -27,7 +27,7 @@ public function getEnvironmentSetUp($app)
public function test_lock_opens_immediately_after_decay()
{
- Carbon::setTestNow(null);
+ Carbon::setTestNow(Carbon::create(2018, 1, 1, 0, 0, 0));
Route::get('/', function () {
return 'yes';
@@ -43,9 +43,7 @@ p... | false |
Other | laravel | framework | 0fa361d0e2e111a1a684606a675b414ebd471257.json | add attachFromStorage to mailables | src/Illuminate/Mail/Mailable.php | @@ -15,6 +15,7 @@
use Illuminate\Contracts\Translation\Translator;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use Illuminate\Contracts\Mail\Mailable as MailableContract;
+use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
class Mailable implements MailableContract, Renderable
{
@@ -70... | false |
Other | laravel | framework | ca74f37573b8c223c010414fe1910d4596544db2.json | Drop index before columns | src/Illuminate/Database/Schema/Blueprint.php | @@ -416,11 +416,11 @@ public function dropRememberToken()
*/
public function dropMorphs($name, $indexName = null)
{
- $this->dropColumn("{$name}_type", "{$name}_id");
-
$indexName = $indexName ?: $this->createIndexName('index', ["{$name}_type", "{$name}_id"]);
$this->dropIndex... | true |
Other | laravel | framework | ca74f37573b8c223c010414fe1910d4596544db2.json | Drop index before columns | tests/Database/DatabaseMySqlSchemaGrammarTest.php | @@ -265,8 +265,8 @@ public function testDropMorphs()
$statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
$this->assertCount(2, $statements);
- $this->assertEquals('alter table `photos` drop `imageable_type`, drop `imageable_id`', $statements[0]);
- $this->asse... | true |
Other | laravel | framework | ca74f37573b8c223c010414fe1910d4596544db2.json | Drop index before columns | tests/Database/DatabasePostgresSchemaGrammarTest.php | @@ -180,8 +180,8 @@ public function testDropMorphs()
$statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
$this->assertCount(2, $statements);
- $this->assertEquals('alter table "photos" drop column "imageable_type", drop column "imageable_id"', $statements[0]);
- ... | true |
Other | laravel | framework | ca74f37573b8c223c010414fe1910d4596544db2.json | Drop index before columns | tests/Database/DatabaseSqlServerSchemaGrammarTest.php | @@ -190,8 +190,8 @@ public function testDropMorphs()
$statements = $blueprint->toSql($this->getConnection(), $this->getGrammar());
$this->assertCount(2, $statements);
- $this->assertEquals('alter table "photos" drop column "imageable_type", "imageable_id"', $statements[0]);
- $this->as... | true |
Other | laravel | framework | 692f792dc09885ec6191c4aa92ec3859711a3c32.json | Add dropMorphs to Blueprint | src/Illuminate/Database/Schema/Blueprint.php | @@ -407,6 +407,18 @@ public function dropRememberToken()
$this->dropColumn('remember_token');
}
+ /**
+ * Indicate that the polymorphic columns should be dropped.
+ *
+ * @param string $name
+ *
+ * @return void
+ */
+ public function dropMorphs($name)
+ {
+ $this... | true |
Other | laravel | framework | 692f792dc09885ec6191c4aa92ec3859711a3c32.json | Add dropMorphs to Blueprint | tests/Database/DatabaseMySqlSchemaGrammarTest.php | @@ -258,6 +258,16 @@ public function testDropTimestampsTz()
$this->assertEquals('alter table `users` drop `created_at`, drop `updated_at`', $statements[0]);
}
+ public function testDropMorphs()
+ {
+ $blueprint = new Blueprint('photos');
+ $blueprint->dropMorphs('imageable');
+ ... | true |
Other | laravel | framework | 692f792dc09885ec6191c4aa92ec3859711a3c32.json | Add dropMorphs to Blueprint | tests/Database/DatabasePostgresSchemaGrammarTest.php | @@ -173,6 +173,16 @@ public function testDropTimestampsTz()
$this->assertEquals('alter table "users" drop column "created_at", drop column "updated_at"', $statements[0]);
}
+ public function testDropMorphs()
+ {
+ $blueprint = new Blueprint('photos');
+ $blueprint->dropMorphs('imagea... | true |
Other | laravel | framework | 692f792dc09885ec6191c4aa92ec3859711a3c32.json | Add dropMorphs to Blueprint | tests/Database/DatabaseSqlServerSchemaGrammarTest.php | @@ -183,6 +183,16 @@ public function testDropTimestampsTz()
$this->assertEquals('alter table "users" drop column "created_at", "updated_at"', $statements[0]);
}
+ public function testDropMorphs()
+ {
+ $blueprint = new Blueprint('photos');
+ $blueprint->dropMorphs('imageable');
+ ... | true |
Other | laravel | framework | 20e84191d5ef21eb5c015908c11eabf8e81d6212.json | regenerate the token on session regeneration | src/Illuminate/Session/Store.php | @@ -475,7 +475,9 @@ public function invalidate()
*/
public function regenerate($destroy = false)
{
- return $this->migrate($destroy);
+ return tap($this->migrate($destroy), function () {
+ $this->regenerateToken();
+ });
}
/** | false |
Other | laravel | framework | a73812999ad2bcb5926cbdd296c723d9635e304c.json | Remove attribute filling from pivot model | src/Illuminate/Database/Eloquent/Relations/Pivot.php | @@ -80,7 +80,7 @@ public static function fromAttributes(Model $parent, $attributes, $table, $exist
*/
public static function fromRawAttributes(Model $parent, $attributes, $table, $exists = false)
{
- $instance = static::fromAttributes($parent, $attributes, $table, $exists);
+ $instance = s... | true |
Other | laravel | framework | a73812999ad2bcb5926cbdd296c723d9635e304c.json | Remove attribute filling from pivot model | tests/Database/DatabaseEloquentPivotTest.php | @@ -37,14 +37,14 @@ public function testMutatorsAreCalledFromConstructor()
$this->assertTrue($pivot->getMutatorCalled());
}
- public function testFromRawAttributesDoesNotDoubleMutate()
+ public function testFromRawAttributesDoesNotMutate()
{
$parent = m::mock('Illuminate\Database\Elo... | true |
Other | laravel | framework | ab526b7d8fc565314f20c840c7398096b9ec9b94.json | Add dispatchNow to Dispatchable Trait. | src/Illuminate/Foundation/Bus/Dispatchable.php | @@ -2,6 +2,8 @@
namespace Illuminate\Foundation\Bus;
+use Illuminate\Contracts\Bus\Dispatcher;
+
trait Dispatchable
{
/**
@@ -14,6 +16,16 @@ public static function dispatch()
return new PendingDispatch(new static(...func_get_args()));
}
+ /**
+ * Dispatch a command to its appropriate ... | false |
Other | laravel | framework | 557177cbe6241f04e4b1e0e1d4b7633635aa4e2d.json | Provide access to validated dataset | src/Illuminate/Validation/Validator.php | @@ -296,7 +296,7 @@ public function fails()
/**
* Run the validator's rules against its data.
*
- * @return void
+ * @return array
*
* @throws \Illuminate\Validation\ValidationException
*/
@@ -305,6 +305,8 @@ public function validate()
if ($this->fails()) {
... | true |
Other | laravel | framework | 557177cbe6241f04e4b1e0e1d4b7633635aa4e2d.json | Provide access to validated dataset | tests/Validation/ValidationValidatorTest.php | @@ -3874,6 +3874,30 @@ public function message()
$this->assertTrue($rule->called);
}
+ public function testGetDataForRules()
+ {
+ $post = ['first'=>'john', 'last'=>'doe', 'type' => 'admin'];
+
+ $v = new Validator($this->getIlluminateArrayTranslator(), $post, ['first' => 'required']... | true |
Other | laravel | framework | d217a2094cf0cbc9ab1a15aeab7c19533e08178c.json | Fix Failing Build (#23386)
Travis CI is failing on "PHP Fatal error: Cannot redeclare Illuminate\Tests\Database\DatabaseQueryBuilderTest::testWhereTimePostgres() in /home/travis/build/laravel/framework/tests/Database/DatabaseQueryBuilderTest.php on line 391"
Looks like a redundant function. | tests/Database/DatabaseQueryBuilderTest.php | @@ -340,14 +340,6 @@ public function testWhereTimeOperatorOptionalMySql()
$this->assertEquals([0 => '22:00'], $builder->getBindings());
}
- public function testWhereTimePostgres()
- {
- $builder = $this->getPostgresBuilder();
- $builder->select('*')->from('users')->whereTime('created... | false |
Other | laravel | framework | e5763e16cb9170140d2c26697e34bda57b56e62d.json | Add getNextRunDate timezone argument (#23350)
CronExpression getNextRunDate supports a timezone argument to output the datetime in the specified timezone | src/Illuminate/Console/Scheduling/Event.php | @@ -668,7 +668,7 @@ public function nextRunDate($currentTime = 'now', $nth = 0, $allowCurrentDate =
{
return Carbon::instance(CronExpression::factory(
$this->getExpression()
- )->getNextRunDate($currentTime, $nth, $allowCurrentDate));
+ )->getNextRunDate($currentTime, $nth, $all... | false |
Other | laravel | framework | c71213673fff3a83471ade4535087c77d2d2f4d9.json | Check the instance of the thrown exception | tests/Integration/Http/ThrottleRequestsTest.php | @@ -7,6 +7,7 @@
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Route;
use Illuminate\Routing\Middleware\ThrottleRequests;
+use Illuminate\Http\Exceptions\ThrottleRequestsException;
/**
* @group integration
@@ -49,6 +50,7 @@ public function test_lock_opens_immediately_after_decay()
try... | false |
Other | laravel | framework | 816f893c30152e95b14c4ae9d345f53168e5a20e.json | use secure version of parsedown | composer.json | @@ -20,7 +20,7 @@
"ext-openssl": "*",
"doctrine/inflector": "~1.1",
"dragonmantank/cron-expression": "~2.0",
- "erusev/parsedown": "~1.6",
+ "erusev/parsedown": "~1.7",
"league/flysystem": "~1.0",
"monolog/monolog": "~1.12",
"nesbot/carbon": "^1.22.1", | false |
Other | laravel | framework | 5b2923eb8d3dee5ebe65102a4ad2cbbf02b3b40b.json | add test for translator fallback (#23325) | tests/Translation/TranslationTranslatorTest.php | @@ -66,6 +66,16 @@ public function testGetMethodProperlyLoadsAndRetrievesItemWithLongestReplacement
$this->assertEquals('foo', $t->get('foo::bar.foo'));
}
+ public function testGetMethodProperlyLoadsAndRetrievesItemForFallback()
+ {
+ $t = new \Illuminate\Translation\Translator($this->getLo... | false |
Other | laravel | framework | ebbefd8723125d094a09c940ff27919b9ae9f2d1.json | Apply fixes from StyleCI (#23278) | tests/Integration/Database/EloquentPaginateTest.php | @@ -26,7 +26,7 @@ public function test_pagination_on_top_of_columns()
{
for ($i = 1; $i <= 50; $i++) {
Post::create([
- 'title' => 'Title ' . $i,
+ 'title' => 'Title '.$i,
]);
}
| false |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Database/Connectors/ConnectionFactory.php | @@ -283,6 +283,6 @@ protected function createConnection($driver, $connection, $database, $prefix = '
return new SqlServerConnection($connection, $database, $prefix, $config);
}
- throw new InvalidArgumentException("Unsupported driver [$driver]");
+ throw new InvalidArgumentExce... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Database/DatabaseManager.php | @@ -137,7 +137,7 @@ protected function configuration($name)
$connections = $this->app['config']['database.connections'];
if (is_null($config = Arr::get($connections, $name))) {
- throw new InvalidArgumentException("Database [$name] not configured.");
+ throw new InvalidArgument... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Database/Eloquent/Builder.php | @@ -1308,9 +1308,9 @@ public static function __callStatic($method, $parameters)
}
if (! isset(static::$macros[$method])) {
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallException... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -411,7 +411,9 @@ protected function getRelationshipFromMethod($method)
$relation = $this->$method();
if (! $relation instanceof Relation) {
- throw new LogicException(get_class($this).'::'.$method.' must return a relationship instance.');
+ throw new LogicException(sprintf(
... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Database/Query/Builder.php | @@ -2519,8 +2519,8 @@ public function __call($method, $parameters)
return $this->dynamicWhere($method, $parameters);
}
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallException(sprintf(
+ ... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Database/Query/JsonExpression.php | @@ -40,6 +40,6 @@ protected function getJsonBindingParameter($value)
return '?';
}
- throw new InvalidArgumentException('JSON value is of illegal type: '.$type);
+ throw new InvalidArgumentException("JSON value is of illegal type: {$type}");
}
} | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Filesystem/FilesystemAdapter.php | @@ -665,7 +665,7 @@ protected function parseVisibility($visibility)
return AdapterInterface::VISIBILITY_PRIVATE;
}
- throw new InvalidArgumentException('Unknown visibility: '.$visibility);
+ throw new InvalidArgumentException("Unknown visibility: {$visibility}");
}
... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Http/RedirectResponse.php | @@ -231,8 +231,8 @@ public function __call($method, $parameters)
return $this->with(Str::snake(substr($method, 4)), $parameters[0]);
}
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallExcep... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Mail/Mailable.php | @@ -746,8 +746,8 @@ public function __call($method, $parameters)
return $this->with(Str::snake(substr($method, 4)), $parameters[0]);
}
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallExcep... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Notifications/Channels/BroadcastChannel.php | @@ -70,8 +70,6 @@ protected function getData($notifiable, Notification $notification)
return $notification->toArray($notifiable);
}
- throw new RuntimeException(
- 'Notification is missing toArray method.'
- );
+ throw new RuntimeException('Notification is missing... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Notifications/Channels/DatabaseChannel.php | @@ -44,8 +44,6 @@ protected function getData($notifiable, Notification $notification)
return $notification->toArray($notifiable);
}
- throw new RuntimeException(
- 'Notification is missing toDatabase / toArray method.'
- );
+ throw new RuntimeException('Notificati... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Redis/RedisManager.php | @@ -83,9 +83,7 @@ public function resolve($name = null)
return $this->resolveCluster($name);
}
- throw new InvalidArgumentException(
- "Redis connection [{$name}] not configured."
- );
+ throw new InvalidArgumentException("Redis connection [{$name}] not configured... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Routing/Controller.php | @@ -65,8 +65,8 @@ public function callAction($method, $parameters)
*/
public function __call($method, $parameters)
{
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallException(sprintf(
+ ... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Routing/Middleware/ThrottleRequests.php | @@ -99,9 +99,7 @@ protected function resolveRequestSignature($request)
return sha1($route->getDomain().'|'.$request->ip());
}
- throw new RuntimeException(
- 'Unable to generate the request signature. Route unavailable.'
- );
+ throw new RuntimeException('Unable t... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Routing/RouteRegistrar.php | @@ -175,8 +175,8 @@ public function __call($method, $parameters)
return $this->attribute($method, $parameters[0]);
}
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallException(sprintf(
+ ... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Support/Manager.php | @@ -57,7 +57,9 @@ public function driver($driver = null)
$driver = $driver ?: $this->getDefaultDriver();
if (is_null($driver)) {
- throw new InvalidArgumentException('Unable to resolve NULL driver for ['.get_class($this).'].');
+ throw new InvalidArgumentException(sprintf(
+ ... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Support/Traits/Macroable.php | @@ -71,9 +71,9 @@ public static function hasMacro($name)
public static function __callStatic($method, $parameters)
{
if (! static::hasMacro($method)) {
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ thro... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/Validation/Validator.php | @@ -1137,8 +1137,8 @@ public function __call($method, $parameters)
return $this->callExtension($rule, $parameters);
}
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMethodCallException(sprintf(
+ ... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/View/Engines/EngineResolver.php | @@ -54,6 +54,6 @@ public function resolve($engine)
return $this->resolved[$engine] = call_user_func($this->resolvers[$engine]);
}
- throw new InvalidArgumentException("Engine $engine not found.");
+ throw new InvalidArgumentException("Engine [{$engine}] not found.");
}
} | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.