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 | 206aae2a7a5c97a7e0af3bed8e842635504de306.json | add tests, update changelog, increase readability | tests/Filesystem/FilesystemTest.php | @@ -414,4 +414,28 @@ public function testIsFileChecksFilesProperly()
$this->assertTrue($filesystem->isFile($this->tempDir.'/foo/foo.txt'));
$this->assertFalse($filesystem->isFile($this->tempDir.'./foo'));
}
+
+ public function testFilesMethodReturnsFileInfoObjects()
+ {
+ mkdir($this... | true |
Other | laravel | framework | 2a6902866e4db7a0de65cbaf33a6cbd20b77834e.json | Apply fixes from StyleCI (#18873) | src/Illuminate/Foundation/Console/Kernel.php | @@ -11,7 +11,6 @@
use Illuminate\Contracts\Debug\ExceptionHandler;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Contracts\Cache\Repository as Cache;
-use Illuminate\Contracts\Queue\Queue as QueueContract;
use Illuminate\Contracts\Console\Kernel as KernelContract;
use Symfony\Component\Debug\Exce... | true |
Other | laravel | framework | 2a6902866e4db7a0de65cbaf33a6cbd20b77834e.json | Apply fixes from StyleCI (#18873) | src/Illuminate/Foundation/Console/QueuedCommand.php | @@ -3,8 +3,8 @@
namespace Illuminate\Foundation\Console;
use Illuminate\Bus\Queueable;
-use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Console\Kernel as KernelContract;
class QueuedCommand implements ... | true |
Other | laravel | framework | 51647eb701307e7682f7489b605a146e750abf0f.json | return pending dispatch for artisan::queue | src/Illuminate/Contracts/Console/Kernel.php | @@ -27,7 +27,7 @@ public function call($command, array $parameters = []);
*
* @param string $command
* @param array $parameters
- * @return int
+ * @return \Illuminate\Foundation\Bus\PendingDispatch
*/
public function queue($command, array $parameters = []);
| true |
Other | laravel | framework | 51647eb701307e7682f7489b605a146e750abf0f.json | return pending dispatch for artisan::queue | src/Illuminate/Foundation/Console/Kernel.php | @@ -226,13 +226,11 @@ public function call($command, array $parameters = [], $outputBuffer = null)
*
* @param string $command
* @param array $parameters
- * @return void
+ * @return \Illuminate\Foundation\Bus\PendingDispatch
*/
public function queue($command, array $parameters ... | true |
Other | laravel | framework | 51647eb701307e7682f7489b605a146e750abf0f.json | return pending dispatch for artisan::queue | src/Illuminate/Foundation/Console/QueuedCommand.php | @@ -2,11 +2,15 @@
namespace Illuminate\Foundation\Console;
+use Illuminate\Bus\Queueable;
+use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Contracts\Console\Kernel as KernelContract;
class QueuedCommand implements ShouldQueue
{
+ use Dispatchable, Que... | true |
Other | laravel | framework | 17327b7bbe461e7afa6a24436aeeb398cb9c7750.json | add prefix to database queue driver | src/Illuminate/Queue/DatabaseQueue.php | @@ -308,7 +308,7 @@ public function deleteReserved($queue, $id)
*/
protected function getQueue($queue)
{
- return $queue ?: $this->default;
+ return $this->getQueuePrefix().($queue ?: $this->default);
}
/** | false |
Other | laravel | framework | 354b5799e35f8ffb4732dcdd8b7bc8d1ef79a6a4.json | Apply fixes from StyleCI (#18853) | tests/Routing/RouteRegistrarTest.php | @@ -322,5 +322,4 @@ public function destroy()
class RouteRegistrarMiddlewareStub
{
-
} | false |
Other | laravel | framework | 92f5f7de3e30affe5ea5468bedd004759f785b48.json | Break long words in emails (#18827) | src/Illuminate/Mail/resources/views/html/themes/default.css | @@ -13,6 +13,12 @@ body {
margin: 0;
width: 100% !important;
-webkit-text-size-adjust: none;
+ -ms-word-break: break-all;
+ word-break: break-all;
+ word-break: break-word;
+ -webkit-hyphens: auto;
+ -moz-hyphens: auto;
+ hyphens: auto;
}
p, | false |
Other | laravel | framework | 33c96f9fc254c6422a1ba6762f0b36ba4acd12ff.json | Apply fixes from StyleCI (#18834) | src/Illuminate/Foundation/Console/Presets/Bootstrap.php | @@ -2,9 +2,6 @@
namespace Illuminate\Foundation\Console\Presets;
-use Illuminate\Support\Arr;
-use Illuminate\Filesystem\Filesystem;
-
class Bootstrap extends Preset
{
/** | false |
Other | laravel | framework | 7d64dee369fcfd9e576ced09a7c666e9827b10c1.json | Replace duplicated method with result (#18828) | src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php | @@ -66,7 +66,7 @@ protected function loadConfigurationFiles(Application $app, RepositoryContract $
throw new Exception('Unable to load the "app" configuration file.');
}
- foreach ($this->getConfigurationFiles($app) as $key => $path) {
+ foreach ($files as $key => $path) {
... | false |
Other | laravel | framework | 7c283c201d04f3ee949dc89600a5aa0e4bbb80f1.json | Use @isset directive (#18817) | src/Illuminate/Mail/resources/views/html/message.blade.php | @@ -10,13 +10,13 @@
{{ $slot }}
{{-- Subcopy --}}
- @if (isset($subcopy))
+ @isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
- @endif
+ @endisset
{{-- Footer --}}
@slot('fo... | true |
Other | laravel | framework | 7c283c201d04f3ee949dc89600a5aa0e4bbb80f1.json | Use @isset directive (#18817) | src/Illuminate/Mail/resources/views/markdown/layout.blade.php | @@ -1,9 +1,9 @@
{!! strip_tags($header) !!}
{!! strip_tags($slot) !!}
-@if (isset($subcopy))
+@isset($subcopy)
{!! strip_tags($subcopy) !!}
-@endif
+@endisset
{!! strip_tags($footer) !!} | true |
Other | laravel | framework | 7c283c201d04f3ee949dc89600a5aa0e4bbb80f1.json | Use @isset directive (#18817) | src/Illuminate/Mail/resources/views/markdown/message.blade.php | @@ -10,13 +10,13 @@
{{ $slot }}
{{-- Subcopy --}}
- @if (isset($subcopy))
+ @isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
{{ $subcopy }}
@endcomponent
@endslot
- @endif
+ @endisset
{{-- Footer --}}
@slot('fo... | true |
Other | laravel | framework | 7c283c201d04f3ee949dc89600a5aa0e4bbb80f1.json | Use @isset directive (#18817) | src/Illuminate/Notifications/resources/views/email.blade.php | @@ -17,7 +17,7 @@
@endforeach
{{-- Action Button --}}
-@if (isset($actionText))
+@isset($actionText)
<?php
switch ($level) {
case 'success':
@@ -33,7 +33,7 @@
@component('mail::button', ['url' => $actionUrl, 'color' => $color])
{{ $actionText }}
@endcomponent
-@endif
+@endisset
{{-- Outro Lines... | true |
Other | laravel | framework | 4ee7aa8c1ff3cbea1441ef0b4c2968eaf4a3c0d5.json | Add 'proccessing' message to queue worker output
Related to 2328c7a318c22396ea0b99df6c576f8eae7c90e6 | src/Illuminate/Queue/Console/WorkCommand.php | @@ -9,6 +9,7 @@
use Illuminate\Queue\WorkerOptions;
use Illuminate\Queue\Events\JobFailed;
use Illuminate\Queue\Events\JobProcessed;
+use Illuminate\Queue\Events\JobProcessing;
class WorkCommand extends Command
{
@@ -122,12 +123,16 @@ protected function gatherWorkerOptions()
*/
protected function list... | false |
Other | laravel | framework | 7392014bee4601a054f070f95451037d99df4ce7.json | Set connection while retrieving models (#18769) | src/Illuminate/Database/Eloquent/Builder.php | @@ -225,7 +225,9 @@ public function orWhere($column, $operator = null, $value = null)
*/
public function hydrate(array $items)
{
- $instance = $this->model->newInstance();
+ $instance = $this->model->newInstance()->setConnection(
+ $this->query->getConnection()->getName()
+ ... | true |
Other | laravel | framework | 7392014bee4601a054f070f95451037d99df4ce7.json | Set connection while retrieving models (#18769) | tests/Database/DatabaseEloquentBuilderTest.php | @@ -386,11 +386,10 @@ public function testGetModelsProperlyHydratesModels()
$records[] = ['name' => 'taylor', 'age' => 26];
$records[] = ['name' => 'dayle', 'age' => 28];
$builder->getQuery()->shouldReceive('get')->once()->with(['foo'])->andReturn(new BaseCollection($records));
- $mode... | true |
Other | laravel | framework | 7392014bee4601a054f070f95451037d99df4ce7.json | Set connection while retrieving models (#18769) | tests/Database/DatabaseEloquentIntegrationTest.php | @@ -1061,6 +1061,14 @@ public function testBelongsToManyCustomPivot()
$this->assertEquals('Jule Doe', $johnWithFriends->friends->find(4)->pivot->friend->name);
}
+ public function testIsAfterRetrievingTheSameModel()
+ {
+ $saved = EloquentTestUser::create(['id' => 1, 'email' => 'taylorotwel... | true |
Other | laravel | framework | 398e3f2e8ccd3414e9e3ebc2a733ff1cda0ea375.json | add method for setting middleware to the resource | src/Illuminate/Routing/PendingResourceRegistration.php | @@ -147,4 +147,17 @@ public function parameter($previous, $new)
return $this;
}
+
+ /**
+ * Set a middleware to the resource.
+ *
+ * @param mixed $middleware
+ * @return \Illuminate\Routing\PendingResourceRegistration
+ */
+ public function middleware($middleware)
+ {
+ ... | true |
Other | laravel | framework | 398e3f2e8ccd3414e9e3ebc2a733ff1cda0ea375.json | add method for setting middleware to the resource | tests/Routing/RouteRegistrarTest.php | @@ -241,6 +241,14 @@ public function testCanOverrideParametersOnRegisteredResource()
$this->assertContains('topic', $this->router->getRoutes()->getByName('posts.show')->uri);
}
+ public function testCanSetMiddlewareOnRegisteredResource()
+ {
+ $this->router->resource('users', 'Illuminate\Te... | true |
Other | laravel | framework | bc115363d9940f10d58cbca2e65bb83027a620eb.json | fix docblocks, remove unnecessary array checks | src/Illuminate/Routing/PendingResourceRegistration.php | @@ -108,18 +108,14 @@ public function names(array $names)
}
/**
- * Set the methods the controller should exclude.
+ * Set the route name for controller action.
*
* @param string $method
* @param string $name
* @return \Illuminate\Routing\PendingResourceRegistration
... | false |
Other | laravel | framework | b226c759a4d208ab2215c4e7bfde7cf8ba98f5ea.json | remove unnecessary import | tests/Routing/RouteRegistrarTest.php | @@ -3,7 +3,6 @@
namespace Illuminate\Tests\Routing;
use Mockery as m;
-use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Routing\Router;
use PHPUnit\Framework\TestCase; | false |
Other | laravel | framework | 777fdc46630978a26ddc605d728c4df91a81d920.json | return PendingResourceRegistration when
registering resources which registeres them on destruction possibly limiting/excluding methods | src/Illuminate/Routing/PendingResourceRegistration.php | @@ -0,0 +1,90 @@
+<?php
+
+namespace Illuminate\Routing;
+
+class PendingResourceRegistration
+{
+ /**
+ * The resource name.
+ *
+ * @var string
+ */
+ protected $name;
+
+ /**
+ * The resource controller.
+ *
+ * @var string
+ */
+ protected $controller;
+
+ /**
+ * ... | true |
Other | laravel | framework | 777fdc46630978a26ddc605d728c4df91a81d920.json | return PendingResourceRegistration when
registering resources which registeres them on destruction possibly limiting/excluding methods | src/Illuminate/Routing/ResourceRegistrar.php | @@ -62,6 +62,22 @@ public function __construct(Router $router)
$this->router = $router;
}
+ /**
+ * Route a resource to a controller lazy.
+ *
+ * @param string $name
+ * @param string $controller
+ * @param array $options
+ * @return \Illuminate\Routing\PendingResource... | true |
Other | laravel | framework | 777fdc46630978a26ddc605d728c4df91a81d920.json | return PendingResourceRegistration when
registering resources which registeres them on destruction possibly limiting/excluding methods | src/Illuminate/Routing/RouteRegistrar.php | @@ -86,11 +86,11 @@ public function attribute($key, $value)
* @param string $name
* @param string $controller
* @param array $options
- * @return void
+ * @return \Illuminate\Routing\PendingResourceRegistration
*/
public function resource($name, $controller, array $options = [... | true |
Other | laravel | framework | 777fdc46630978a26ddc605d728c4df91a81d920.json | return PendingResourceRegistration when
registering resources which registeres them on destruction possibly limiting/excluding methods | src/Illuminate/Routing/Router.php | @@ -245,7 +245,7 @@ public function resources(array $resources)
* @param string $name
* @param string $controller
* @param array $options
- * @return void
+ * @return \Illuminate\Routing\PendingResourceRegistration
*/
public function resource($name, $controller, array $options... | true |
Other | laravel | framework | 48cf1e1af27e91a27ed47c6e49905889307c6751.json | Apply fixes from StyleCI (#18762) | src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php | @@ -39,12 +39,21 @@ protected function withoutExceptionHandling()
$this->previousExceptionHandler = app(ExceptionHandler::class);
$this->app->instance(ExceptionHandler::class, new class implements ExceptionHandler {
- public function __construct() {}
- public function report(Ex... | false |
Other | laravel | framework | a171f44594c248afe066fee74fad640765b12da0.json | Add withoutExceptionHandling method for testing. | src/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.php | @@ -0,0 +1,54 @@
+<?php
+
+namespace Illuminate\Foundation\Testing\Concerns;
+
+use Exception;
+use Illuminate\Contracts\Debug\ExceptionHandler;
+use Symfony\Component\Console\Application as ConsoleApplication;
+
+trait InteractsWithExceptionHandling
+{
+ /**
+ * The previous exception handler.
+ *
+ * @... | true |
Other | laravel | framework | a171f44594c248afe066fee74fad640765b12da0.json | Add withoutExceptionHandling method for testing. | src/Illuminate/Foundation/Testing/TestCase.php | @@ -15,6 +15,7 @@ abstract class TestCase extends BaseTestCase
Concerns\InteractsWithAuthentication,
Concerns\InteractsWithConsole,
Concerns\InteractsWithDatabase,
+ Concerns\InteractsWithExceptionHandling,
Concerns\InteractsWithSession,
Concerns\MocksApplicationServi... | true |
Other | laravel | framework | a513aaa2da69d1d8619c10568b3c13e4e250c825.json | Update AuthenticatesUsers.php (#18746)
Additional checking for non string properties | src/Illuminate/Foundation/Auth/AuthenticatesUsers.php | @@ -59,7 +59,8 @@ public function login(Request $request)
protected function validateLogin(Request $request)
{
$this->validate($request, [
- $this->username() => 'required', 'password' => 'required',
+ $this->username() => 'required|string',
+ 'password' => 'required|... | false |
Other | laravel | framework | ceab3cc25cb7257c273b81dbf06f0c4e00fade90.json | Handle case when $this->events is null | src/Illuminate/Mail/Mailer.php | @@ -207,7 +207,9 @@ public function send($view, array $data = [], $callback = null)
$this->sendSwiftMessage($message->getSwiftMessage());
- $this->events->dispatch(new Events\MessageSent($message->getSwiftMessage()));
+ if ($this->events) {
+ $this->events->dispatch(new Events\Mess... | false |
Other | laravel | framework | 134df8712b28fdee7f83d2793dafeb6950b79f39.json | Add @empty Changelog Line (#18743) | CHANGELOG-5.4.md | @@ -8,6 +8,7 @@
- Added support for attaching an image to Slack attachments `$attachment->image($url)`([#18664](https://github.com/laravel/framework/pull/18664))
- Added `Validator::extendDependent()` to allow adding custom rules that depend on other fields ([#18654](https://github.com/laravel/framework/pull/18654))
... | false |
Other | laravel | framework | 9a16e9f625e8b31072aaa7cb9a70f0f6e88456f4.json | Trigger new MessageSent event | src/Illuminate/Mail/Events/MessageSent.php | @@ -0,0 +1,24 @@
+<?php
+
+namespace Illuminate\Mail\Events;
+
+class MessageSent
+{
+ /**
+ * The Swift message instance.
+ *
+ * @var \Swift_Message
+ */
+ public $message;
+
+ /**
+ * Create a new event instance.
+ *
+ * @param \Swift_Message $message
+ * @return void
+ ... | true |
Other | laravel | framework | 9a16e9f625e8b31072aaa7cb9a70f0f6e88456f4.json | Trigger new MessageSent event | src/Illuminate/Mail/Mailer.php | @@ -206,6 +206,8 @@ public function send($view, array $data = [], $callback = null)
}
$this->sendSwiftMessage($message->getSwiftMessage());
+
+ $this->events->dispatch(new Events\MessageSent($message->getSwiftMessage()));
}
/** | true |
Other | laravel | framework | b27f967b43e9b1bb54fc68bb07e65023e866d0c7.json | Fix job release on exception
Without this change the worker does not account for changes to the job state done in the JobExceptionOccurred event listener except for when the job was deleted. If there is a need to release the job back onto the queue with a different delay than the one set on the worker, the job would b... | src/Illuminate/Queue/Worker.php | @@ -328,7 +328,9 @@ protected function handleJobException($connectionName, $job, WorkerOptions $opti
// If we catch an exception, we will attempt to release the job back onto the queue
// so it is not lost entirely. This'll let the job be retried at a later time by
// another list... | true |
Other | laravel | framework | b27f967b43e9b1bb54fc68bb07e65023e866d0c7.json | Fix job release on exception
Without this change the worker does not account for changes to the job state done in the JobExceptionOccurred event listener except for when the job was deleted. If there is a need to release the job back onto the queue with a different delay than the one set on the worker, the job would b... | tests/Queue/QueueWorkerTest.php | @@ -257,9 +257,11 @@ class WorkerFakeJob
public $callback;
public $deleted = false;
public $releaseAfter;
+ public $released = false;
public $maxTries;
public $attempts = 0;
public $failedWith;
+ public $failed = false;
public $connectionName;
public function __construct(... | true |
Other | laravel | framework | f8f2540a575178fbd06cf02865d900f347ee08b2.json | Fix job release on exception
Without this change the worker does not account for changes to the job state done in the JobExceptionOccurred event listener except for when the job was deleted. If there is a need to release the job back onto the queue with a different delay than the one set on the worker, the job would b... | src/Illuminate/Queue/Worker.php | @@ -328,7 +328,9 @@ protected function handleJobException($connectionName, $job, WorkerOptions $opti
// If we catch an exception, we will attempt to release the job back onto the queue
// so it is not lost entirely. This'll let the job be retried at a later time by
// another list... | true |
Other | laravel | framework | f8f2540a575178fbd06cf02865d900f347ee08b2.json | Fix job release on exception
Without this change the worker does not account for changes to the job state done in the JobExceptionOccurred event listener except for when the job was deleted. If there is a need to release the job back onto the queue with a different delay than the one set on the worker, the job would b... | tests/Queue/QueueWorkerTest.php | @@ -257,9 +257,11 @@ class WorkerFakeJob
public $callback;
public $deleted = false;
public $releaseAfter;
+ public $released = false;
public $maxTries;
public $attempts = 0;
public $failedWith;
+ public $failed = false;
public $connectionName;
public function __construct(... | true |
Other | laravel | framework | 7b33de43808f2f9f6c199c30e5ebffbb76362c22.json | fix typo and use local variable | tests/Foundation/FoundationExceptionsHandlerTest.php | @@ -18,7 +18,7 @@ class FoundationExceptionsHandlerTest extends TestCase
protected $handler;
- protected $rquest;
+ protected $request;
public function setUp()
{ | false |
Other | laravel | framework | 4a4a6f6a79fdb3a29445dd8b0614f59bdd1e833c.json | remove unused class from test | tests/Foundation/FoundationExceptionsHandlerTest.php | @@ -6,7 +6,6 @@
use Mockery as m;
use PHPUnit\Framework\TestCase;
use Illuminate\Container\Container;
-use Illuminate\Foundation\Application;
use Illuminate\Config\Repository as Config;
use Illuminate\Foundation\Exceptions\Handler;
@@ -87,5 +86,4 @@ public function testReturnsJsonWithoutStackTraceWhenAjaxRequest... | false |
Other | laravel | framework | 786b7821e0009a4288bff032443f2b1a273ee459.json | adjust test response | src/Illuminate/Foundation/Testing/TestResponse.php | @@ -289,11 +289,10 @@ public function assertExactJson(array $data)
/**
* Assert that the response contains the given JSON fragment.
*
- * @param array $data
- * @param bool $negate
+ * @param array $data
* @return $this
*/
- public function assertJsonFragment(array $data, ... | false |
Other | laravel | framework | 42255bedff7637bcf3c2ee1b60c613ef3cbf8888.json | add exists as alias to has | src/Illuminate/Http/Concerns/InteractsWithInput.php | @@ -59,6 +59,17 @@ public function bearerToken()
}
}
+ /**
+ * Determine if the request contains a given input item key.
+ *
+ * @param string|array $key
+ * @return bool
+ */
+ public function exists($key)
+ {
+ return $this->has($key);
+ }
+
/**
* De... | false |
Other | laravel | framework | 183bf16a2c939889f4461e237a851b55cf858f8e.json | add exists as alias to has | src/Illuminate/Http/Concerns/InteractsWithInput.php | @@ -58,6 +58,17 @@ public function bearerToken()
}
}
+ /**
+ * Determine if the request contains a given input item key.
+ *
+ * @param string|array $key
+ * @return bool
+ */
+ public function exists($key)
+ {
+ return $this->has($key);
+ }
+
/**
* De... | false |
Other | laravel | framework | e9c65cdd243d802784b193595227bfa29147f367.json | Apply fixes from StyleCI (#18709) | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -10,8 +10,8 @@
use Illuminate\Auth\Console\ClearResetsCommand;
use Illuminate\Cache\Console\CacheTableCommand;
use Illuminate\Foundation\Console\ServeCommand;
-use Illuminate\Queue\Console\FailedTableCommand;
use Illuminate\Foundation\Console\PresetCommand;
+use Illuminate\Queue\Console\FailedTableCommand;
use ... | false |
Other | laravel | framework | 5801d6da046fde63bfc2db70a9ea0efb5f91e311.json | add bootstrap preset | src/Illuminate/Foundation/Console/PresetCommand.php | @@ -12,7 +12,7 @@ class PresetCommand extends Command
*
* @var string
*/
- protected $signature = 'preset { type : The preset type (fresh, react) }';
+ protected $signature = 'preset { type : The preset type (fresh, bootstrap, react) }';
/**
* The console command description.
@@ -28... | true |
Other | laravel | framework | 5801d6da046fde63bfc2db70a9ea0efb5f91e311.json | add bootstrap preset | src/Illuminate/Foundation/Console/Presets/Bootstrap.php | @@ -0,0 +1,94 @@
+<?php
+
+namespace Illuminate\Foundation\Console\Presets;
+
+use Illuminate\Support\Arr;
+use Illuminate\Filesystem\Filesystem;
+
+class Bootstrap
+{
+ /**
+ * Install the preset.
+ *
+ * @return void
+ */
+ public static function install()
+ {
+ static::updatePackages(... | true |
Other | laravel | framework | 5801d6da046fde63bfc2db70a9ea0efb5f91e311.json | add bootstrap preset | src/Illuminate/Foundation/Console/Presets/React.php | @@ -33,13 +33,9 @@ protected static function updatePackages()
$packages = json_decode(file_get_contents(base_path('package.json')), true);
- unset($packages['devDependencies']['vue']);
-
- $packages['devDependencies'] += [
- 'babel-preset-react' => '^6.23.0',
- 'react' =... | true |
Other | laravel | framework | 5801d6da046fde63bfc2db70a9ea0efb5f91e311.json | add bootstrap preset | src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.js | @@ -0,0 +1,8 @@
+
+/**
+ * First we will load all of this project's JavaScript dependencies which
+ * includes jQuery and other helpers. It's a great starting point when
+ * building simple applications where you don't need any complexity.
+ */
+
+require('./bootstrap'); | true |
Other | laravel | framework | 5801d6da046fde63bfc2db70a9ea0efb5f91e311.json | add bootstrap preset | src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/bootstrap.js | @@ -0,0 +1,40 @@
+
+window._ = require('lodash');
+
+/**
+ * We'll load jQuery and the Bootstrap jQuery plugin which provides support
+ * for JavaScript based Bootstrap features such as modals and tabs. This
+ * code may be modified to fit the specific needs of your application.
+ */
+
+window.$ = window.jQuery = requi... | true |
Other | laravel | framework | 5801d6da046fde63bfc2db70a9ea0efb5f91e311.json | add bootstrap preset | src/Illuminate/Foundation/Console/Presets/react-stubs/app.js | @@ -1,8 +1,8 @@
/**
* First we will load all of this project's JavaScript dependencies which
- * includes Vue and other libraries. It is a great starting point when
- * building robust, powerful web applications using Vue and Laravel.
+ * includes React and other helpers. It's a great starting point while
+ * buil... | true |
Other | laravel | framework | 1d0fbe64e75ebedd3410f279fc120ab9281e17d0.json | Apply fixes from StyleCI (#18677) | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -55,8 +55,8 @@
use Illuminate\Queue\Console\ListFailedCommand as ListFailedQueueCommand;
use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand;
use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand;
-use Illuminate\Database\Console\Migrations\ResetCommand as MigrateRese... | false |
Other | laravel | framework | f6511d477f73b3033ef2336257f4cac5f20594a0.json | add migrate:fresh command | src/Illuminate/Database/Console/Migrations/FreshCommand.php | @@ -0,0 +1,110 @@
+<?php
+
+namespace Illuminate\Database\Console\Migrations;
+
+use Illuminate\Console\Command;
+use Illuminate\Console\ConfirmableTrait;
+use Symfony\Component\Console\Input\InputOption;
+
+class FreshCommand extends Command
+{
+ use ConfirmableTrait;
+
+ /**
+ * The console command name.
+ ... | true |
Other | laravel | framework | f6511d477f73b3033ef2336257f4cac5f20594a0.json | add migrate:fresh command | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -56,6 +56,7 @@
use Illuminate\Queue\Console\FlushFailedCommand as FlushFailedQueueCommand;
use Illuminate\Queue\Console\ForgetFailedCommand as ForgetFailedQueueCommand;
use Illuminate\Database\Console\Migrations\ResetCommand as MigrateResetCommand;
+use Illuminate\Database\Console\Migrations\FreshCommand as Migra... | true |
Other | laravel | framework | bc91b6c997491e029c0d9bb1828cbe89d66f76ff.json | Remove unused import | src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php | @@ -2,7 +2,6 @@
namespace Illuminate\Foundation\Testing\Concerns;
-use Illuminate\Http\Testing\NullMiddleware;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Foundation\Testing\TestResponse; | false |
Other | laravel | framework | 3879cb699f26136e227f61595c631112a050438b.json | Allow disabling of specific Middleware in tests | src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php | @@ -2,6 +2,7 @@
namespace Illuminate\Foundation\Testing\Concerns;
+use Illuminate\Http\Testing\NullMiddleware;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Foundation\Testing\TestResponse;
@@ -34,11 +35,26 @@ protected function withServerVariables(array $server)
/**
* Disab... | false |
Other | laravel | framework | 52664a9a7b9fcafff76b285aaaa0c156eaf72441.json | Simplify email check (#18637) | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -112,8 +112,7 @@ protected function context()
{
return array_filter([
'userId' => Auth::id(),
- 'email' => Auth::check() && isset(Auth::user()->email)
- ? Auth::user()->email : null,
+ 'email' => Auth::user()->email ?? null,
]);
}
... | false |
Other | laravel | framework | 23b7d6b45c675bcd93e9f1fb9cd33e71779142c6.json | Add some default context to logs if we know it.
If we know the user ID and email, add it to the log context for easier
searching for a given users error. | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -6,6 +6,7 @@
use Psr\Log\LoggerInterface;
use Illuminate\Http\Response;
use Illuminate\Routing\Router;
+use Illuminate\Support\Facades\Auth;
use Illuminate\Http\RedirectResponse;
use Illuminate\Auth\AuthenticationException;
use Illuminate\Contracts\Container\Container;
@@ -69,7 +70,7 @@ public function report(... | false |
Other | laravel | framework | c1a33b865d009b2aec4d8b174db30d4bb68e95a0.json | Apply fixes from StyleCI (#18623) | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -210,7 +210,7 @@ protected function prepareJsonResponse($request, Exception $e)
'line' => $e->getLine(),
'trace' => $e->getTrace(),
], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), $status, array_merge($headers, [
- 'Content-Type' => 'application/json'
+ 'Conte... | false |
Other | laravel | framework | 5225389dfdf03d656b862bba59cebf1820e0e8f4.json | Send JSON in debug mode if the request wants JSON.
Currently, when making AJAX requests with debug mode enabled, uncaught
exceptions will display the full debug HTML page. With this change, the
exceptions will be rendered as JSON for easier viewing in the console /
dev tools. | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -121,6 +121,10 @@ public function render($request, Exception $e)
return $this->convertValidationExceptionToResponse($e, $request);
}
+ if ($request->expectsJson() && config('app.debug')) {
+ return $this->prepareJsonResponse($request, $e);
+ }
+
return $this-... | false |
Other | laravel | framework | a1226cb5ad3b4fae45b8d20d4f8d9275c759b7d2.json | Apply fixes from StyleCI (#18616) | tests/Integration/Queue/JobChainingTest.php | @@ -21,7 +21,7 @@ public function tearDown()
public function test_jobs_can_be_chained_on_success()
{
JobChainingTestFirstJob::dispatch()->chain([
- new JobChainingTestSecondJob
+ new JobChainingTestSecondJob,
]);
$this->assertTrue(JobChainingTestFirstJob::$ra... | false |
Other | laravel | framework | 96ebdd6aed761d83eeedfb3e7bf11ed5aa5cc0ff.json | Apply fixes from StyleCI (#18615) | tests/Integration/Queue/JobChainingTest.php | @@ -4,8 +4,8 @@
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Queue;
use Illuminate\Queue\InteractsWithQueue;
-use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Queue\ShouldQueue;
+use Illuminate\Foundation\Bus\Dispatchable;
/**
* @group integration
@@ -18,40 +18,36 @@ pub... | false |
Other | laravel | framework | 7120eed7f516d50f621be87c85bf4d2c82fee24c.json | Add additional test for chaining.
This adds an additional test to make sure the second job is not fired
if the first fails or is deleted. | tests/Integration/Queue/JobChainingTest.php | @@ -2,6 +2,8 @@
use Illuminate\Bus\Queueable;
use Orchestra\Testbench\TestCase;
+use Illuminate\Support\Facades\Queue;
+use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Queue\ShouldQueue;
@@ -26,6 +28,27 @@ public function test_jobs_can_be_chained_on_... | false |
Other | laravel | framework | 9ae1993b124dd1a63a51939486a1a41d6ca30bea.json | remove tests that seem really strange and broken. | tests/Support/SupportCollectionTest.php | @@ -227,15 +227,6 @@ public function testArrayAccessOffsetGet()
$this->assertEquals('bar', $c->offsetGet(1));
}
- /**
- * @expectedException \PHPUnit\Framework\Error\Notice
- */
- public function testArrayAccessOffsetGetOnNonExist()
- {
- $c = new Collection(['foo', 'bar']);
- ... | false |
Other | laravel | framework | 458e66e7e5e659f6a27aec7c907be97946a11679.json | Apply fixes from StyleCI (#18612) | tests/Database/DatabaseConnectionFactoryTest.php | @@ -6,7 +6,6 @@
use ReflectionProperty;
use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
-use Illuminate\Database\Connection;
use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Connectors\ConnectionFactory;
| false |
Other | laravel | framework | d5a71bad602e45e54aef2c15e1cb1b8c20c46535.json | Apply fixes from StyleCI (#18611) | tests/Pagination/LengthAwarePaginatorTest.php | @@ -36,13 +36,13 @@ public function testLengthAwarePaginatorCanGiveMeRelevantPageInformation()
public function testLengthAwarePaginatorCanGenerateUrls()
{
- $this->p->setPath('http://website.com');
- $this->p->setPageName('foo');
+ $this->p->setPath('http://website.com');
+ $th... | true |
Other | laravel | framework | d5a71bad602e45e54aef2c15e1cb1b8c20c46535.json | Apply fixes from StyleCI (#18611) | tests/Pagination/PaginatorTest.php | @@ -15,32 +15,32 @@ public function testSimplePaginatorReturnsRelevantContextInformation()
$this->assertTrue($p->hasPages());
$this->assertTrue($p->hasMorePages());
$this->assertEquals(['item3', 'item4'], $p->items());
-
+
$pageInfo = [
- 'per_page' => 2,
- ... | true |
Other | laravel | framework | d5a71bad602e45e54aef2c15e1cb1b8c20c46535.json | Apply fixes from StyleCI (#18611) | tests/Pagination/UrlWindowTest.php | @@ -3,8 +3,8 @@
namespace Illuminate\Tests\Pagination;
use PHPUnit\Framework\TestCase;
-use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Pagination\UrlWindow;
+use Illuminate\Pagination\LengthAwarePaginator;
class UrlWindowTest extends TestCase
{
@@ -36,7 +36,7 @@ public function testPresenterCan... | true |
Other | laravel | framework | f55331d0f47415e4da6d6bf0fc0f1f4f950acd60.json | add postgres table escaping and regression test | src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | @@ -159,7 +159,7 @@ public function compileDropIfExists(Blueprint $blueprint, Fluent $command)
*/
public function compileDropAllTables($tables)
{
- return 'drop table '.implode(',', $tables).' cascade';
+ return 'drop table "'.implode('","', $tables).'" cascade';
}
/** | true |
Other | laravel | framework | f55331d0f47415e4da6d6bf0fc0f1f4f950acd60.json | add postgres table escaping and regression test | tests/Database/DatabasePostgresSchemaGrammarTest.php | @@ -546,6 +546,13 @@ public function testAddingMacAddress()
$this->assertEquals('alter table "users" add column "foo" macaddr not null', $statements[0]);
}
+ public function testDropAllTablesEscapesTableNames()
+ {
+ $statement = $this->getGrammar()->compileDropAllTables(['alpha', 'beta', '... | true |
Other | laravel | framework | 81608d0ee85eef48769ddcc95e9c2b3140145f5a.json | add ability to create nested model controllers
- new stub for nested controllers
- ‘parent’ option for make command
- if we want a parent, determine the replacement values based on the
model name | src/Illuminate/Routing/Console/ControllerMakeCommand.php | @@ -37,7 +37,9 @@ class ControllerMakeCommand extends GeneratorCommand
*/
protected function getStub()
{
- if ($this->option('model')) {
+ if ($this->option('parent')) {
+ return __DIR__.'/stubs/controller.nested.stub';
+ } elseif ($this->option('model')) {
r... | true |
Other | laravel | framework | 81608d0ee85eef48769ddcc95e9c2b3140145f5a.json | add ability to create nested model controllers
- new stub for nested controllers
- ‘parent’ option for make command
- if we want a parent, determine the replacement values based on the
model name | src/Illuminate/Routing/Console/stubs/controller.nested.stub | @@ -0,0 +1,94 @@
+<?php
+
+namespace DummyNamespace;
+
+use DummyFullModelClass;
+use Illuminate\Http\Request;
+use ParentDummyFullModelClass;
+use DummyRootNamespaceHttp\Controllers\Controller;
+
+class DummyClass extends Controller
+{
+ /**
+ * Display a listing of the resource.
+ *
+ * @param \Parent... | true |
Other | laravel | framework | ea134ccbdd52797d14ef05bc9467ec1fedfe6b36.json | Apply fixes from StyleCI (#18600) | tests/Database/DatabaseConnectionFactoryTest.php | @@ -6,7 +6,6 @@
use ReflectionProperty;
use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
-use Illuminate\Database\Connection;
use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Connectors\ConnectionFactory;
| false |
Other | laravel | framework | d3c96686c36c0681cb01251c32f2fc3291d49c6b.json | Use stdClass (#18574) | src/Illuminate/Queue/Console/RetryCommand.php | @@ -63,7 +63,7 @@ protected function getJobIds()
/**
* Retry the queue job.
*
- * @param stdClass $job
+ * @param \stdClass $job
* @return void
*/
protected function retryJob($job) | true |
Other | laravel | framework | d3c96686c36c0681cb01251c32f2fc3291d49c6b.json | Use stdClass (#18574) | src/Illuminate/Queue/Jobs/DatabaseJob.php | @@ -18,7 +18,7 @@ class DatabaseJob extends Job implements JobContract
/**
* The database job payload.
*
- * @var \StdClass
+ * @var \stdClass
*/
protected $job;
@@ -27,7 +27,7 @@ class DatabaseJob extends Job implements JobContract
*
* @param \Illuminate\Container\Con... | true |
Other | laravel | framework | d3c96686c36c0681cb01251c32f2fc3291d49c6b.json | Use stdClass (#18574) | src/Illuminate/Queue/Jobs/DatabaseJobRecord.php | @@ -11,14 +11,14 @@ class DatabaseJobRecord
/**
* The underlying job record.
*
- * @var \StdClass
+ * @var \stdClass
*/
protected $record;
/**
* Create a new job record instance.
*
- * @param \StdClass $record
+ * @param \stdClass $record
* @retur... | true |
Other | laravel | framework | d3c96686c36c0681cb01251c32f2fc3291d49c6b.json | Use stdClass (#18574) | src/Illuminate/Session/DatabaseSessionHandler.php | @@ -103,7 +103,7 @@ public function read($sessionId)
/**
* Determine if the session is expired.
*
- * @param \StdClass $session
+ * @param \stdClass $session
* @return bool
*/
protected function expired($session) | true |
Other | laravel | framework | d3c96686c36c0681cb01251c32f2fc3291d49c6b.json | Use stdClass (#18574) | src/Illuminate/Validation/ValidationRuleParser.php | @@ -38,7 +38,7 @@ public function __construct(array $data)
* Parse the human-friendly rules into a full rules array for the validator.
*
* @param array $rules
- * @return \StdClass
+ * @return \stdClass
*/
public function explode($rules)
{ | true |
Other | laravel | framework | d3c96686c36c0681cb01251c32f2fc3291d49c6b.json | Use stdClass (#18574) | src/Illuminate/View/Concerns/ManagesLoops.php | @@ -69,7 +69,7 @@ public function popLoop()
/**
* Get an instance of the last loop in the stack.
*
- * @return \StdClass|null
+ * @return \stdClass|null
*/
public function getLastLoop()
{ | true |
Other | laravel | framework | af5035dafc456c61d6b993d703bc6e96d046f84b.json | Fix event dispatcher comments (#18548) | src/Illuminate/Contracts/Events/Dispatcher.php | @@ -30,7 +30,7 @@ public function hasListeners($eventName);
public function subscribe($subscriber);
/**
- * Dispatch an event and call the listeners.
+ * Dispatch an event until the first non-null response is returned.
*
* @param string|object $event
* @param mixed $payload
@@ ... | false |
Other | laravel | framework | cc889335728166f2ad2bffad6e75095cdf70e7ba.json | Fix typo in Session/Store (#18530) | src/Illuminate/Session/Store.php | @@ -180,7 +180,7 @@ public function exists($key)
}
/**
- * Checks if an a key is present and not null.
+ * Checks if a key is present and not null.
*
* @param string|array $key
* @return bool | false |
Other | laravel | framework | 5a5278d167f8c73ea9d95b9bbc7bbae3cafcbe44.json | Remove unused parameters (#18520) | src/Illuminate/Contracts/Mail/MailQueue.php | @@ -7,23 +7,19 @@ interface MailQueue
/**
* Queue a new e-mail message for sending.
*
- * @param string|array $view
- * @param array $data
- * @param \Closure|string $callback
+ * @param string|array|MailableContract $view
* @param string $queue
* @return mixed
... | true |
Other | laravel | framework | 5a5278d167f8c73ea9d95b9bbc7bbae3cafcbe44.json | Remove unused parameters (#18520) | src/Illuminate/Contracts/Mail/Mailer.php | @@ -16,7 +16,7 @@ public function raw($text, $callback);
/**
* Send a new message using a view.
*
- * @param string|array $view
+ * @param string|array|MailableContract $view
* @param array $data
* @param \Closure|string $callback
* @return void | true |
Other | laravel | framework | 5a5278d167f8c73ea9d95b9bbc7bbae3cafcbe44.json | Remove unused parameters (#18520) | src/Illuminate/Mail/Mailer.php | @@ -193,7 +193,7 @@ public function render($view, array $data = [])
/**
* Send a new message using a view.
*
- * @param string|array $view
+ * @param string|array|MailableContract $view
* @param array $data
* @param \Closure|string $callback
* @return void
@@ -334,33 +... | true |
Other | laravel | framework | ab3cfef17edb09cc55966b82b9a10d05ffae0cbd.json | Apply fixes from StyleCI (#18518) | src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | @@ -395,7 +395,7 @@ protected function typeReal(Fluent $column)
{
return 'real';
}
-
+
/**
* Create the column definition for a decimal type.
* | false |
Other | laravel | framework | 12dad330ed505fa939eb50683bae795a7189246c.json | add Integration test | tests/Database/DatabaseSchemaBuilderIntegrationTest.php | @@ -0,0 +1,58 @@
+<?php
+
+use PHPUnit\Framework\TestCase;
+use Illuminate\Database\Capsule\Manager as DB;
+
+class DatabaseSchemaBuilderIntegrationTest extends TestCase
+{
+ protected $db;
+
+ /**
+ * Bootstrap database.
+ *
+ * @return void
+ */
+ public function setUp()
+ {
+ $this... | false |
Other | laravel | framework | ae16e5930eaa7d9e4518edea75740f1a7ee5a472.json | remove unused command I added | src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php | @@ -61,17 +61,6 @@ public function compileCreate(Blueprint $blueprint, Fluent $command)
);
}
- /**
- * Compile a get all tables command.
- *
- * @param string $schema
- * @return string
- */
- public function compileGetAllTables()
- {
- return "select name from sqli... | false |
Other | laravel | framework | 69692647947f0bf2a685a71768d55f1003e8a684.json | improve sqlite command | src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php | @@ -61,6 +61,17 @@ public function compileCreate(Blueprint $blueprint, Fluent $command)
);
}
+ /**
+ * Compile a get all tables command.
+ *
+ * @param string $schema
+ * @return string
+ */
+ public function compileGetAllTables()
+ {
+ return "select name from sqli... | true |
Other | laravel | framework | 69692647947f0bf2a685a71768d55f1003e8a684.json | improve sqlite command | src/Illuminate/Database/Schema/SQLiteBuilder.php | @@ -11,12 +11,10 @@ class SQLiteBuilder extends Builder
*/
public function dropAllTables()
{
- $dbPath = $this->connection->getConfig('database');
+ $this->connection->select($this->grammar->compileEnableWriteableSchema());
- if (file_exists($dbPath)) {
- unlink($dbPath... | true |
Other | laravel | framework | 1a2567d1d315cd3176a4a8d7f8de0a630049de1f.json | Add assertion to check if no mailables were sent | src/Illuminate/Support/Testing/Fakes/MailFake.php | @@ -45,6 +45,19 @@ public function assertNotSent($mailable, $callback = null)
);
}
+ /**
+ * Determine if no mailable was sent.
+ *
+ * @return void
+ */
+ public function assertNilSent()
+ {
+ PHPUnit::assertEmpty(
+ $this->mailables,
+ "Some mailab... | false |
Other | laravel | framework | 328f505d6cac8bffdb6dc103d60af0b7ce54066b.json | Update doc block | src/Illuminate/Support/Testing/Fakes/MailFake.php | @@ -31,7 +31,7 @@ public function assertSent($mailable, $callback = null)
}
/**
- * Determine if a mailable was sent based on a truth-test callback.
+ * Determine if a mailable was not sent based on a truth-test callback.
*
* @param string $mailable
* @param callable|null $call... | false |
Other | laravel | framework | d493b629771844b08e51370c75a97afdde988c88.json | convert errors to http exception | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -169,11 +169,15 @@ protected function convertValidationExceptionToResponse(ValidationException $e,
*/
protected function prepareResponse($request, Exception $e)
{
- if ($this->isHttpException($e)) {
- return $this->toIlluminateResponse($this->renderHttpException($e), $e);
- }... | false |
Other | laravel | framework | 2a5d11b40392748f86c64335b96fba0bd18fbd51.json | Add test for overwriting routes | tests/Routing/RouteCollectionTest.php | @@ -165,4 +165,35 @@ public function testRouteCollectionCanGetAllRoutes()
];
$this->assertEquals($allRoutes, $this->routeCollection->getRoutes());
}
+
+
+ public function testRouteCollectionCleansUpOverwrittenRoutes()
+ {
+ // Create two routes with the same path and method.
+ ... | false |
Other | laravel | framework | 01d6896cb402d7b641c84ed8d541b1bc96af34ce.json | apply style ci | tests/Database/DatabaseEloquentModelTest.php | @@ -67,7 +67,8 @@ public function testDirtyAttributes()
$this->assertTrue($model->isDirty(['foo', 'bar']));
}
- public function testDirtyOnCastOrDateAttributes(){
+ public function testDirtyOnCastOrDateAttributes()
+ {
$model = new EloquentModelCastingStub;
$model->setDateForm... | false |
Other | laravel | framework | a720279a0b2e7d3a028b63f7c4e5ee501807a1b5.json | add testWhenCallbackWithReturn (#18447) | tests/Database/DatabaseQueryBuilderTest.php | @@ -147,6 +147,23 @@ public function testWhenCallback()
$this->assertEquals('select * from "users" where "email" = ?', $builder->toSql());
}
+ public function testWhenCallbackWithReturn()
+ {
+ $callback = function ($query, $condition) {
+ $this->assertTrue($condition);
+
+ ... | false |
Other | laravel | framework | 3f693da808f4cc77e15c9932ee1019f00c627ada.json | fix issue with case in authorizeResource (#18435) | src/Illuminate/Foundation/Auth/Access/AuthorizesRequests.php | @@ -81,7 +81,7 @@ protected function normalizeGuessedAbilityName($ability)
*/
public function authorizeResource($model, $parameter = null, array $options = [], $request = null)
{
- $parameter = $parameter ?: strtolower(class_basename($model));
+ $parameter = $parameter ?: lcfirst(class_bas... | false |
Other | laravel | framework | 4be74e19a6282a789070b6da81f70e1a886b7176.json | Apply fixes from StyleCI (#18427) | src/Illuminate/View/Compilers/Concerns/CompilesConditionals.php | @@ -77,7 +77,7 @@ protected function compileEndunless()
{
return '<?php endif; ?>';
}
-
+
/**
* Compile the if-isset statements into valid PHP.
* | false |
Other | laravel | framework | 36b255013aeeb841d8fc441401825f9811b0993f.json | Pass the condition value to "when" (#18419) | src/Illuminate/Database/Concerns/BuildsQueries.php | @@ -84,9 +84,9 @@ public function when($value, $callback, $default = null)
$builder = $this;
if ($value) {
- $builder = $callback($builder);
+ $builder = $callback($builder, $value);
} elseif ($default) {
- $builder = $default($builder);
+ $builde... | true |
Other | laravel | framework | 36b255013aeeb841d8fc441401825f9811b0993f.json | Pass the condition value to "when" (#18419) | tests/Database/DatabaseQueryBuilderTest.php | @@ -132,7 +132,9 @@ public function testBasicTableWrapping()
public function testWhenCallback()
{
- $callback = function ($query) {
+ $callback = function ($query, $condition) {
+ $this->assertTrue($condition);
+
return $query->where('id', '=', 1);
};
@@ -147... | true |
Other | laravel | framework | d876eb34ff07ebd54fd48b0264135f795c0bad0c.json | move method lower in class | src/Illuminate/Redis/Connections/PhpRedisConnection.php | @@ -140,17 +140,6 @@ public function transaction(callable $callback = null)
: tap($transaction, $callback)->exec();
}
- /**
- * Execute a raw command.
- *
- * @param array $parameters
- * @return mixed
- */
- public function executeRaw(array $parameters)
- {
- r... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.