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
154b5ece01d524a303f1a7b17c936f60f747da43.json
Apply fixes from StyleCI (#33324)
tests/Foundation/FoundationExceptionsHandlerTest.php
@@ -16,8 +16,8 @@ use Illuminate\Support\MessageBag; use Illuminate\Validation\ValidationException; use Illuminate\Validation\Validator; -use Mockery as m; use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration; +use Mockery as m; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use RuntimeException;
false
Other
laravel
framework
1e1f5311f062d62468fe2d3cef1695b8fa338cfb.json
Add support for binary request
src/Illuminate/Http/Client/PendingRequest.php
@@ -41,6 +41,13 @@ class PendingRequest */ protected $pendingFiles = []; + /** + * The binary for the request. + * + * @var array + */ + protected $pendingBinary; + /** * The request cookies. * @@ -177,6 +184,34 @@ public function asMultipart() return $this->...
false
Other
laravel
framework
e3c86b6bcecc0cfbcb5b9d5b735ad6bb3213b37d.json
Apply fixes from StyleCI (#33313)
tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php
@@ -107,9 +107,8 @@ public function testGetOriginalWithCastValueObjects() $this->assertEquals('110 Kingsbrook St.', $model->getOriginal('address')->lineOne); $this->assertEquals('117 Spencer St.', $model->address->lineOne); - $model = new TestEloquentModelWithCustomCast([ - 'addr...
false
Other
laravel
framework
d750abea34ea179e920294a462ec959decb29acc.json
Apply fixes from StyleCI (#33312)
tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php
@@ -96,7 +96,7 @@ public function testBasicCustomCasting() public function testGetOriginalWithCastValueObjects() { $model = new TestEloquentModelWithCustomCast([ - 'address' => new Address('110 Kingsbrook St.', 'My Childhood House') + 'address' => new Address('110 Kingsbrook St....
false
Other
laravel
framework
561d38887fd0848d1672d554dd1cd30f5044bb84.json
Apply fixes from StyleCI (#33280)
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
@@ -350,7 +350,7 @@ public function twiceMonthly($first = 1, $second = 16, $time = '0:0') $days = $first.','.$second; $this->dailyAt($time); - + return $this->spliceIntoPosition(1, 0) ->spliceIntoPosition(2, 0) ->spliceIntoPosition(3, $days);
false
Other
laravel
framework
b4b72c77c003ffd9355abe815c22221a74422ecc.json
Apply fixes from StyleCI (#33269)
tests/Console/CommandTest.php
@@ -26,7 +26,6 @@ public function testCallingClassCommandResolveCommandViaApplicationResolution() $command = new class extends Command { public function handle() { - } };
true
Other
laravel
framework
b4b72c77c003ffd9355abe815c22221a74422ecc.json
Apply fixes from StyleCI (#33269)
tests/Events/EventsDispatcherTest.php
@@ -7,7 +7,6 @@ use Illuminate\Events\Dispatcher; use Mockery as m; use PHPUnit\Framework\TestCase; -use stdClass; class EventsDispatcherTest extends TestCase {
true
Other
laravel
framework
dd5e57940222878298423c6ba72f45160aca00ab.json
Add sort options to Arr::sortRecursive
src/Illuminate/Collections/Arr.php
@@ -609,20 +609,24 @@ public static function sort($array, $callback = null) * Recursively sort an array by keys and values. * * @param array $array + * @param int $options + * @param bool $descending * @return array */ - public static function sortRecursive($array) + pu...
false
Other
laravel
framework
1a312198b50bea27c7651ce2fe6a855910cd4c03.json
Add monthlyOnLastDay() to ManagesFrequencies
src/Illuminate/Console/Scheduling/ManagesFrequencies.php
@@ -337,6 +337,21 @@ public function monthlyOn($day = 1, $time = '0:0') return $this->spliceIntoPosition(3, $day); } + /** + * Schedule the event to run on the last day of the month + * + * @param string $time + * @return $this + */ + public function monthlyOnLastDay($time = '0...
false
Other
laravel
framework
16156447e4a0e47b4b46ade43731296f4b033f04.json
Apply fixes from StyleCI (#33219)
src/Illuminate/Foundation/Console/PolicyMakeCommand.php
@@ -3,7 +3,6 @@ namespace Illuminate\Foundation\Console; use Illuminate\Console\GeneratorCommand; -use Illuminate\Contracts\Auth\Access\Authorizable; use Illuminate\Support\Str; use Symfony\Component\Console\Input\InputOption; @@ -80,7 +79,7 @@ protected function userProviderModel() $guard = $this->opt...
false
Other
laravel
framework
44879ecf372236f2446483da687f5eea7434c978.json
add theme to mailable properties (#33218) * add theme to mailable properties * Update Mailable.php Co-authored-by: Taylor Otwell <taylor@laravel.com>
src/Illuminate/Mail/Mailable.php
@@ -132,6 +132,13 @@ class Mailable implements MailableContract, Renderable */ public $callbacks = []; + /** + * The name of the theme that should be used when formatting the message. + * + * @var string|null + */ + public $theme; + /** * The name of the mailer that should ...
false
Other
laravel
framework
b88df5d77d490bf76befe022b67423358b16de62.json
fix doc block
src/Illuminate/Events/Dispatcher.php
@@ -359,7 +359,7 @@ protected function addInterfaceListeners($eventName, array $listeners = []) /** * Register an event listener with the dispatcher. * - * @param \Closure|string $listener + * @param \Closure|string|array $listener * @param bool $wildcard * @return \Closure ...
false
Other
laravel
framework
b80ddf458bd08de375d83b716a1309ed927197aa.json
handle array callbacks
src/Illuminate/Events/Dispatcher.php
@@ -365,7 +365,7 @@ protected function addInterfaceListeners($eventName, array $listeners = []) */ public function makeListener($listener, $wildcard = false) { - if (is_string($listener)) { + if (is_string($listener) || is_array($listener)) { return $this->createClassListener(...
true
Other
laravel
framework
b80ddf458bd08de375d83b716a1309ed927197aa.json
handle array callbacks
tests/Events/EventsDispatcherTest.php
@@ -327,6 +327,16 @@ public function testClassesWork() $this->assertSame('baz', $_SERVER['__event.test']); } + public function testArrayCallbackListenersAreHandled() + { + unset($_SERVER['__event.ExampleListener']); + $d = new Dispatcher; + $d->listen(ExampleEvent::class, [Exa...
true
Other
laravel
framework
929d326d5a75facb66c56a208469793846da9935.json
improve event subscribers
src/Illuminate/Events/Dispatcher.php
@@ -161,7 +161,15 @@ public function subscribe($subscriber) { $subscriber = $this->resolveSubscriber($subscriber); - $subscriber->subscribe($this); + $events = $subscriber->subscribe($this); + + if (is_array($events)) { + foreach ($events as $event => $listeners) { + ...
false
Other
laravel
framework
6cbf5c9e220a82fce5e1dc1740fdbcdb0ce47717.json
Improve static analyse (#33159)
src/Illuminate/Database/Query/Builder.php
@@ -242,7 +242,7 @@ public function select($columns = ['*']) /** * Add a subselect expression to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|string $query + * @param \Closure|$this|string $query * @param string $as * @return \Illuminate\Database\Query\B...
false
Other
laravel
framework
fefb64ec0de7bf49fb416ac4b022cc7ff901fdd9.json
Fix misleading docblocks (#33111)
src/Illuminate/Collections/EnumeratesValues.php
@@ -518,7 +518,7 @@ public function where($key, $operator = null, $value = null) } /** - * Filter items where the given key is not null. + * Filter items where the value for the given key is null. * * @param string|null $key * @return static @@ -529,7 +529,7 @@ public function wh...
false
Other
laravel
framework
49f542bbc10afa02fc947eb99d96b916776bb522.json
Fix indention for Blade component inline (#33102)
src/Illuminate/Foundation/Console/ComponentMakeCommand.php
@@ -80,7 +80,7 @@ protected function buildClass($name) if ($this->option('inline')) { return str_replace( 'DummyView', - "<<<'blade'\n<div>\n ".Inspiring::quote()."\n</div>\nblade", + "<<<'blade'\n <div>\n ".Inspiring::quo...
false
Other
laravel
framework
d3e486cc588ae4b30b3f3bfb49a5a455530849d6.json
Apply fixes from StyleCI (#33092)
tests/Mail/MailManagerTest.php
@@ -2,7 +2,6 @@ namespace Illuminate\Tests\Mail; -use Illuminate\Mail\MailManager; use Orchestra\Testbench\TestCase; class MailManagerTest extends TestCase
false
Other
laravel
framework
ac5ee4f4cacba0e79849c9d0de922f6e18b0725f.json
remove code that is in 8.x
src/Illuminate/Mail/MailManager.php
@@ -440,25 +440,6 @@ public function setDefaultDriver(string $name) $this->app['config']['mail.default'] = $name; } - /** - * Forget a mailer instance by name. - * - * @param array|string|null $name - * @return void - */ - public function forgetMailer($name = null) - { - ...
true
Other
laravel
framework
ac5ee4f4cacba0e79849c9d0de922f6e18b0725f.json
remove code that is in 8.x
tests/Mail/MailManagerTest.php
@@ -33,30 +33,4 @@ public function emptyTransportConfigDataProvider() [null], [''], [' '], ]; } - - public function testForgetMailer() - { - $this->app['config']->set('mail.mailers.custom_smtp', [ - 'transport' => 'smtp', - 'host' => 'example.com', - ...
true
Other
laravel
framework
88c93eb59568d228736fa96b52bac51f1c2116cc.json
Apply fixes from StyleCI (#33091)
tests/Mail/MailManagerTest.php
@@ -37,26 +37,26 @@ public function emptyTransportConfigDataProvider() public function testForgetMailer() { $this->app['config']->set('mail.mailers.custom_smtp', [ - 'transport' => "smtp", - 'host' => "example.com", - 'port' => "25", - 'encryption' => "tls"...
false
Other
laravel
framework
469b7719a8dca40841a74f59f2e9f30f01d3a106.json
Apply fixes from StyleCI (#33078)
src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
@@ -4,7 +4,6 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Relations\MorphPivot; use Illuminate\Support\Arr; class MorphToMany extends BelongsToMany
false
Other
laravel
framework
9e5226ecc28f960cba1bd38b6d1d82a52e072dc3.json
Apply fixes from StyleCI (#33077)
src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
@@ -4,7 +4,6 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; -use Illuminate\Database\Eloquent\Relations\MorphPivot; use Illuminate\Support\Arr; class MorphToMany extends BelongsToMany
false
Other
laravel
framework
f9112ad06126d8e265df4b66560e92d924c823e8.json
Add test for withBearerToken method
tests/Foundation/Testing/Concerns/MakesHttpRequestsTest.php
@@ -14,6 +14,13 @@ public function testFromSetsHeaderAndSession() $this->assertSame('previous/url', $this->app['session']->previousUrl()); } + public function testBearerTokenSetsHeader() + { + $this->withBearerToken('foobar'); + + $this->assertSame('Bearer foobar', $this->defaultHead...
false
Other
laravel
framework
9897e3f77b33ee0546509ba73e48aeaa6f5a6c95.json
Add withBearerToken method
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -92,6 +92,19 @@ public function flushHeaders() return $this; } + /** + * Add a bearer token to the request headers. + * + * @param string $value + * @return $this + */ + public function withBearerToken(string $value) + { + $this->defaultHeaders['Authorization'] =...
false
Other
laravel
framework
aa29193a2f60dd4af3d4824a7582d526dc8bd31a.json
Apply fixes from StyleCI (#33074)
tests/Integration/Support/AuthFacadeTest.php
@@ -3,8 +3,8 @@ namespace Illuminate\Tests\Integration\Support; use Illuminate\Support\Facades\Auth; -use RuntimeException; use Orchestra\Testbench\TestCase; +use RuntimeException; class AuthFacadeTest extends TestCase {
false
Other
laravel
framework
b0fb1ba07a248bc63a092b608746f681db4d54f2.json
Apply fixes from StyleCI (#33073)
tests/Integration/Support/AuthFacadeTest.php
@@ -3,8 +3,8 @@ namespace Illuminate\Tests\Integration\Support; use Illuminate\Support\Facades\Auth; -use RuntimeException; use Orchestra\Testbench\TestCase; +use RuntimeException; class AuthFacadeTest extends TestCase {
false
Other
laravel
framework
f54b58433d42a30754719895b653116d20c800f2.json
Replace deprecated class
src/Illuminate/Redis/Connections/PhpRedisConnection.php
@@ -3,8 +3,8 @@ namespace Illuminate\Redis\Connections; use Closure; +use Illuminate\Collections\Arr; use Illuminate\Contracts\Redis\Connection as ConnectionContract; -use Illuminate\Support\Arr; use Illuminate\Support\Str; use Redis; use RedisCluster;
false
Other
laravel
framework
941159162cdeb229e00e642a48d18d75ab8b1e56.json
Add stability to Composer Cache I'm not 100 sure on this one but I think the Cache dependencies key should include the stability (prefer-lowest or prefer-stable). Otherwise, some of the dependencies in the prefer-lowest build seem to be re-downloaded every time - unless the lowest version matches the stable one. ...
.github/workflows/tests.yml
@@ -40,7 +40,7 @@ jobs: uses: actions/cache@v1 with: path: ~/.composer/cache/files - key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + key: dependencies-php-${{ matrix.php }}-${{ matrix.stability }}-composer-${{ hashFiles('composer.json')...
false
Other
laravel
framework
8b33dcd1bbafed763c99bc3b8af4acf6b0ac08cf.json
make dependency optional
src/Illuminate/View/Engines/CompilerEngine.php
@@ -27,12 +27,12 @@ class CompilerEngine extends PhpEngine * Create a new compiler engine instance. * * @param \Illuminate\View\Compilers\CompilerInterface $compiler - * @param \Illuminate\Filesystem\Filesystem $files + * @param \Illuminate\Filesystem\Filesystem|null $files * @retu...
false
Other
laravel
framework
b7284daaa81d374fd4a4f6f23b0e3a2ad17797d2.json
Add putFile doc block to storage facade (#33036)
src/Illuminate/Support/Facades/Storage.php
@@ -10,6 +10,7 @@ * @method static string get(string $path) * @method static resource|null readStream(string $path) * @method static bool put(string $path, string|resource $contents, mixed $options = []) + * @method static string|false putFile(string $path, \Illuminate\Http\File|\Illuminate\Http\UploadedFile|stri...
false
Other
laravel
framework
50efe099b59e75563298deb992017b4cabfb021d.json
add addIf method to message bag
src/Illuminate/Support/MessageBag.php
@@ -66,6 +66,19 @@ public function add($key, $message) return $this; } + /** + * Add a message to the message bag if the given conditional is "true". + * + * @param bool $boolean + * @param string $key + * @param string $message + * @return $this + */ + public fun...
false
Other
laravel
framework
a904322413bcf3abf2f8945192157e42714d50ce.json
Call message method once only
src/Illuminate/Validation/Validator.php
@@ -697,7 +697,7 @@ protected function validateUsingCustomRule($attribute, $value, $rule) if (! $rule->passes($attribute, $value)) { $this->failedRules[$attribute][get_class($rule)] = []; - $messages = $rule->message() ? (array) $rule->message() : [get_class($rule)]; + $mes...
false
Other
laravel
framework
656d0af4577d36770831db97df56305ffd65421b.json
Apply fixes from StyleCI (#33011)
src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
@@ -123,7 +123,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, protected function getCurrentlyAttachedPivots() { return parent::getCurrentlyAttachedPivots()->map(function ($record) { - return $record->setMorphType($this->morphType) + return...
false
Other
laravel
framework
6cb375d0d7a4090b68e53328bc481621035d232b.json
Apply fixes from StyleCI (#33010)
src/Illuminate/Database/Eloquent/Relations/MorphToMany.php
@@ -123,7 +123,7 @@ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, protected function getCurrentlyAttachedPivots() { return parent::getCurrentlyAttachedPivots()->map(function ($record) { - return $record->setMorphType($this->morphType) + return...
false
Other
laravel
framework
00e9ed76483ea6ad1264676e7b1095b23e16a433.json
use array values first
src/Illuminate/Database/Eloquent/Collection.php
@@ -566,7 +566,7 @@ public function getQueueableRelations() if (count($relations) === 0 || $relations === [[]]) { return []; } elseif (count($relations) === 1) { - return $relations[0]; + return array_values($relations)[0]; } else { return array...
false
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
src/Illuminate/View/DynamicComponent.php
@@ -0,0 +1,181 @@ +<?php + +namespace Illuminate\View; + +use Illuminate\Container\Container; +use Illuminate\Support\Str; +use Illuminate\View\Compilers\ComponentTagCompiler; + +class DynamicComponent extends Component +{ + /** + * The name of the component. + * + * @var string + */ + public $com...
true
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
src/Illuminate/View/ViewServiceProvider.php
@@ -88,7 +88,9 @@ public function registerViewFinder() public function registerBladeCompiler() { $this->app->singleton('blade.compiler', function ($app) { - return new BladeCompiler($app['files'], $app['config']['view.compiled']); + return tap(new BladeCompiler($app['files'], $a...
true
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
tests/Integration/View/BladeTest.php
@@ -0,0 +1,42 @@ +<?php + +namespace Illuminate\Tests\Integration\View; + +use Illuminate\Support\Facades\View; +use Orchestra\Testbench\TestCase; + +/** + * @group integration + */ +class BladeTest extends TestCase +{ + public function test_basic_blade_rendering() + { + $view = View::make('hello', ['name'...
true
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
tests/Integration/View/templates/components/panel.blade.php
@@ -0,0 +1,5 @@ +@props(['name']) + +<div {{ $attributes }}> + Hello {{ $name }} +</div>
true
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
tests/Integration/View/templates/hello.blade.php
@@ -0,0 +1 @@ +Hello {{ $name }}
true
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
tests/Integration/View/templates/uses-panel-dynamically.blade.php
@@ -0,0 +1,3 @@ +<x-dynamic-component component="panel" class="ml-2" :name="$name"> + Panel contents +</x-dynamic-component>
true
Other
laravel
framework
f66c103a9457328f0984a010c27afdf889b3c562.json
add dynamic component
tests/Integration/View/templates/uses-panel.blade.php
@@ -0,0 +1,3 @@ +<x-panel class="ml-2" :name="$name"> + Panel contents +</x-panel>
true
Other
laravel
framework
2d52abc33865cc29b8e92a41ed7ad9a2b5383a11.json
fix custom class cast with dates
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
@@ -231,6 +231,11 @@ protected function addCastAttributesToArray(array $attributes, array $mutatedAtt $attributes[$key] = $attributes[$key]->format(explode(':', $value, 2)[1]); } + if ($attributes[$key] && $attributes[$key] instanceof DateTimeInterface && + $thi...
false
Other
laravel
framework
cfed25302fd0ed945541cbffa409785c8a1e2c85.json
Fix Filesystem tests failing in Windows (#32975) * testPutWithStreamInterface() leaves an fopen() stream resource that must be explicitly closed before temp directories can be deleted in Windows. * testReplaceStoresFiles() fails for multiple reasons under Windows. chmod() / umask() write permissions do...
tests/Filesystem/FilesystemAdapterTest.php
@@ -236,8 +236,10 @@ public function testPutWithStreamInterface() $spy = m::spy($this->filesystem); $filesystemAdapter = new FilesystemAdapter($spy); - $stream = new Stream(fopen($this->tempDir.'/foo.txt', 'r')); - $filesystemAdapter->put('bar.txt', $stream); + $stream = fopen($...
true
Other
laravel
framework
cfed25302fd0ed945541cbffa409785c8a1e2c85.json
Fix Filesystem tests failing in Windows (#32975) * testPutWithStreamInterface() leaves an fopen() stream resource that must be explicitly closed before temp directories can be deleted in Windows. * testReplaceStoresFiles() fails for multiple reasons under Windows. chmod() / umask() write permissions do...
tests/Filesystem/FilesystemTest.php
@@ -43,8 +43,22 @@ public function testPutStoresFiles() $this->assertStringEqualsFile($this->tempDir.'/file.txt', 'Hello World'); } - public function testReplaceStoresFiles() + public function testReplaceCreatesFile() { + $tempFile = "{$this->tempDir}/file.txt"; + + $filesystem ...
true
Other
laravel
framework
c59cffa7825498e1d419d8c86cd8527520f718cb.json
fix behavior of oneachside = 1 with paginator
src/Illuminate/Pagination/UrlWindow.php
@@ -73,7 +73,7 @@ protected function getSmallSlider() */ protected function getUrlSlider($onEachSide) { - $window = $onEachSide * 2; + $window = $onEachSide + 4; if (! $this->hasPages()) { return ['first' => null, 'slider' => null, 'last' => null]; @@ -83,14 +83,14 ...
true
Other
laravel
framework
c59cffa7825498e1d419d8c86cd8527520f718cb.json
fix behavior of oneachside = 1 with paginator
tests/Pagination/UrlWindowTest.php
@@ -25,28 +25,31 @@ public function testPresenterCanGetAUrlRangeForASmallNumberOfUrls() public function testPresenterCanGetAUrlRangeForAWindowOfLinks() { $array = []; - for ($i = 1; $i <= 13; $i++) { + for ($i = 1; $i <= 20; $i++) { $array[$i] = 'item'.$i; } - ...
true
Other
laravel
framework
7ebd21193df520d78269d7abd740537a2fae889e.json
fix route list for excluded middleware
src/Illuminate/Foundation/Console/RouteListCommand.php
@@ -170,7 +170,7 @@ protected function displayRoutes(array $routes) */ protected function getMiddleware($route) { - return collect($route->gatherMiddleware())->map(function ($middleware) { + return collect($this->router->gatherRouteMiddleware($route))->map(function ($middleware) { ...
false
Other
laravel
framework
bf1eef400951dcee04839a9ab7c15da1a807f89c.json
add useTailwind method
src/Illuminate/Pagination/AbstractPaginator.php
@@ -552,6 +552,17 @@ public static function defaultSimpleView($view) static::$defaultSimpleView = $view; } + /** + * Indicate that Tailwind styling should be used for generated links. + * + * @return void + */ + public static function useTailwind() + { + static::defaultVi...
false
Other
laravel
framework
4d66ce89c8865ecec0e079f41bb9ea98ce7f7255.json
Apply fixes from StyleCI (#32890)
src/Illuminate/Queue/WorkerOptions.php
@@ -73,7 +73,7 @@ class WorkerOptions * @param bool $stopWhenEmpty * @return void */ - public function __construct($name= 'default', $backoff = 0, $memory = 128, $timeout = 60, $sleep = 3, $maxTries = 1, $force = false, $stopWhenEmpty = false) + public function __construct($name = 'default', $...
false
Other
laravel
framework
6ad92bf9a8552a7759a7757cf821b01969baf0b6.json
fix bug with request rebind and url defaults
src/Illuminate/Routing/UrlGenerator.php
@@ -699,7 +699,14 @@ public function setRequest(Request $request) $this->cachedRoot = null; $this->cachedScheme = null; - $this->routeGenerator = null; + + tap(optional($this->routeGenerator)->defaultParameters ?: [], function ($defaults) { + $this->routeGenerator = null; + ...
false
Other
laravel
framework
b3453e8b18564610bcec44d2d9b458c6a1e8dcb2.json
fix doc block
src/Illuminate/Database/Console/Factories/stubs/factory.stub
@@ -18,7 +18,7 @@ class {{ model }}Factory extends Factory /** * Define the model's default state. * - * @return static + * @return array */ public function definition() {
false
Other
laravel
framework
73060db7c5541fadf5e4f2874a89d18621d705a3.json
fix wrong component generation
src/Illuminate/Foundation/Console/ComponentMakeCommand.php
@@ -99,7 +99,9 @@ protected function buildClass($name) */ protected function getView() { - return collect(explode('/', $this->argument('name'))) + $name = str_replace('\\', '/', $this->argument('name')); + + return collect(explode('/', $name)) ->map(function ($part) { ...
false
Other
laravel
framework
fc779336bbf2559377d3409cf20f6b2db191d9fd.json
Fix eager capture + syntactic sugar (#32847)
src/Illuminate/Database/Schema/ForeignIdColumnDefinition.php
@@ -36,7 +36,7 @@ public function __construct(Blueprint $blueprint, $attributes = []) */ public function constrained($table = null, $column = 'id') { - return $this->references($column)->on($table ?: Str::plural(Str::before($this->name, '_'.$column))); + return $this->references($column)->...
true
Other
laravel
framework
fc779336bbf2559377d3409cf20f6b2db191d9fd.json
Fix eager capture + syntactic sugar (#32847)
tests/Database/DatabaseMySqlSchemaGrammarTest.php
@@ -432,15 +432,17 @@ public function testAddingForeignID() $blueprint = new Blueprint('users'); $foreignId = $blueprint->foreignId('foo'); $blueprint->foreignId('company_id')->constrained(); + $blueprint->foreignId('laravel_idea_id')->constrained(); $blueprint->foreignId('tea...
true
Other
laravel
framework
fc779336bbf2559377d3409cf20f6b2db191d9fd.json
Fix eager capture + syntactic sugar (#32847)
tests/Database/DatabasePostgresSchemaGrammarTest.php
@@ -330,15 +330,17 @@ public function testAddingForeignID() $blueprint = new Blueprint('users'); $foreignId = $blueprint->foreignId('foo'); $blueprint->foreignId('company_id')->constrained(); + $blueprint->foreignId('laravel_idea_id')->constrained(); $blueprint->foreignId('tea...
true
Other
laravel
framework
fc779336bbf2559377d3409cf20f6b2db191d9fd.json
Fix eager capture + syntactic sugar (#32847)
tests/Database/DatabaseSQLiteSchemaGrammarTest.php
@@ -314,6 +314,7 @@ public function testAddingForeignID() $blueprint = new Blueprint('users'); $foreignId = $blueprint->foreignId('foo'); $blueprint->foreignId('company_id')->constrained(); + $blueprint->foreignId('laravel_idea_id')->constrained(); $blueprint->foreignId('team_...
true
Other
laravel
framework
fc779336bbf2559377d3409cf20f6b2db191d9fd.json
Fix eager capture + syntactic sugar (#32847)
tests/Database/DatabaseSqlServerSchemaGrammarTest.php
@@ -339,15 +339,17 @@ public function testAddingForeignID() $blueprint = new Blueprint('users'); $foreignId = $blueprint->foreignId('foo'); $blueprint->foreignId('company_id')->constrained(); + $blueprint->foreignId('laravel_idea_id')->constrained(); $blueprint->foreignId('tea...
true
Other
laravel
framework
aabd1a9edc36052fddb01931e9bfe09a0e260779.json
Add tests for file permissions
tests/Cache/CacheFileStoreTest.php
@@ -6,6 +6,7 @@ use Illuminate\Contracts\Filesystem\FileNotFoundException; use Illuminate\Filesystem\Filesystem; use Illuminate\Support\Carbon; +use Mockery as m; use PHPUnit\Framework\TestCase; class CacheFileStoreTest extends TestCase @@ -79,6 +80,27 @@ public function testStoreItemProperlyStoresValues() ...
false
Other
laravel
framework
f9165439ba826dab16b177680a14cf21f3ce462c.json
Fix ViewFacade reference
src/Illuminate/Foundation/Testing/Concerns/InteractsWithViews.php
@@ -33,7 +33,7 @@ protected function blade(string $template, array $data = []) $tempDirectory = sys_get_temp_dir(); if (! in_array($tempDirectory, ViewFacade::getFinder()->getPaths())) { - View::addLocation(sys_get_temp_dir()); + ViewFacade::addLocation(sys_get_temp_dir()); ...
false
Other
laravel
framework
36628971a86b680fcc73c2d78e671ca83ba2cee2.json
add regression test
tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php
@@ -31,6 +31,14 @@ public function testBasicCustomCasting() $model->uppercase = 'dries'; $this->assertEquals('TAYLOR', $model->getOriginal('uppercase')); + $model = new TestEloquentModelWithCustomCast; + $model->uppercase = 'taylor'; + $model->syncOriginal(); + $model->up...
false
Other
laravel
framework
68e7ad761cbe9ff73ebbecbdbc8fa3e0a97311f9.json
Apply fixes from StyleCI (#32791)
src/Illuminate/Database/Eloquent/Model.php
@@ -631,7 +631,7 @@ protected function incrementOrDecrement($column, $amount, $extra, $method) if ($this->fireModelEvent('updating') === false) { return false; - }; + } return tap($query->where( $this->getKeyName(), $this->getKey()
false
Other
laravel
framework
e37939e855fbcea5e78f00f3bf729a57b2d8a1c2.json
Apply fixes from StyleCI (#32781)
tests/Validation/ValidationValidatorTest.php
@@ -2323,7 +2323,7 @@ public function __toString() { return 'aslsdlks'; } - } + }, ], ['x' => 'Email']); $this->assertFalse($v->passes()); @@ -2333,7 +2333,7 @@ public function __toString() { ...
false
Other
laravel
framework
28b8111dac789b248c3c5f7887912c09ce37df0a.json
Apply fixes from StyleCI (#32780)
tests/Validation/ValidationValidatorTest.php
@@ -2284,7 +2284,7 @@ public function __toString() { return 'aslsdlks'; } - } + }, ], ['x' => 'Email']); $this->assertFalse($v->passes()); @@ -2294,7 +2294,7 @@ public function __toString() { ...
false
Other
laravel
framework
cab1de36ad2e5e42a0111b1e5070d5c62e933f86.json
Apply fixes from StyleCI (#32762)
src/Illuminate/Queue/Jobs/Job.php
@@ -266,7 +266,7 @@ public function maxExceptions() } /** - * The number of seconds to wait before retrying a job that encountered an uncaught exception + * The number of seconds to wait before retrying a job that encountered an uncaught exception. * * @return int|null */
true
Other
laravel
framework
cab1de36ad2e5e42a0111b1e5070d5c62e933f86.json
Apply fixes from StyleCI (#32762)
src/Illuminate/Queue/WorkerOptions.php
@@ -5,7 +5,7 @@ class WorkerOptions { /** - * The number of seconds to wait before retrying a job that encountered an uncaught exception + * The number of seconds to wait before retrying a job that encountered an uncaught exception. * * @var int */
true
Other
laravel
framework
9b652406ab4ef2ef039ebcf972abffb9a4129291.json
Add usingConnection method to DatabaseManager
src/Illuminate/Database/DatabaseManager.php
@@ -245,6 +245,22 @@ public function reconnect($name = null) return $this->refreshPdoConnections($name); } + /** + * Set the database connection for the callback execution. + * + * @param string $name + * @param callable $callback + * @return void + */ + public function...
false
Other
laravel
framework
87bb1352e9e15c28700ffdd3656b429ceddf4e7d.json
Fix StyleCI lint
src/Illuminate/Support/Stringable.php
@@ -193,7 +193,7 @@ public function explode($delimiter, $limit = PHP_INT_MAX) { return collect(explode($delimiter, $this->value, $limit)); } - + /** * Split string by a regular expression. * @@ -206,7 +206,7 @@ public function split($pattern, $limit = -1, $flags = 0) { ...
false
Other
laravel
framework
7490ed68d602f3d08a52109ef900428ee6cab49e.json
Add split() to Stringable class
src/Illuminate/Support/Stringable.php
@@ -193,6 +193,25 @@ public function explode($delimiter, $limit = PHP_INT_MAX) { return collect(explode($delimiter, $this->value, $limit)); } + + /** + * Split string by a regular expression. + * + * @param string $pattern + * @param int $limit + * @param int $flags +...
false
Other
laravel
framework
16164416f6dfb7e8c736b4cb4ff7409d22cc4e70.json
Add where pivot null methods
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -504,6 +504,55 @@ public function orWherePivotNotIn($column, $values) return $this->wherePivotNotIn($column, $values, 'or'); } + /** + * Set a "where null" clause for a pivot table column. + * + * @param string $column + * @param string $boolean + * @param bool $not + ...
false
Other
laravel
framework
1b90dc48d4e9d020569d63eef142cbf14e0c824d.json
Improve parameter type of `destroy()` (#32694)
src/Illuminate/Database/Eloquent/Model.php
@@ -872,7 +872,7 @@ protected function insertAndSetId(Builder $query, $attributes) /** * Destroy the models for the given IDs. * - * @param \Illuminate\Support\Collection|array|int $ids + * @param \Illuminate\Support\Collection|array|int|string $ids * @return int */ public ...
false
Other
laravel
framework
9ed157fbba83ff8925b01ee7de7c836ca97cd15c.json
add facade blocks
src/Illuminate/Support/Facades/Storage.php
@@ -27,6 +27,8 @@ * @method static array allDirectories(string|null $directory = null) * @method static bool makeDirectory(string $path) * @method static bool deleteDirectory(string $directory) + * @method static string url(string $path) + * @method static string temporaryUrl(string $path, \DateTimeInterface $exp...
false
Other
laravel
framework
e802058d27c06748a0628c787d38f1618dbe4eaa.json
Add mergeFillable and mergeGuarded These new methods are to be inline with the `mergeCasts` method that was merged a few months ago. They're mostly useful in traits that add new attributes for example ``` trait HasActiveVisit { protected function initializeHasActiveVisit() { $this->mergeFill...
src/Illuminate/Database/Eloquent/Concerns/GuardsAttributes.php
@@ -49,6 +49,32 @@ public function fillable(array $fillable) return $this; } + + /** + * Merge new fillable attributes with existing fillable attributes on the model. + * + * @param array $fillable + * @return $this + */ + public function mergeFillable(array $fillable) + ...
false
Other
laravel
framework
f16d3256f93be71935ed86951e58f90b83912feb.json
support delete with limit on sqlsrv
src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
@@ -4,6 +4,7 @@ use Illuminate\Database\Query\Builder; use Illuminate\Support\Arr; +use Illuminate\Support\Str; class SqlServerGrammar extends Grammar { @@ -232,6 +233,23 @@ protected function compileRowConstraint($query) return ">= {$start}"; } + /** + * Compile a delete statement withou...
true
Other
laravel
framework
f16d3256f93be71935ed86951e58f90b83912feb.json
support delete with limit on sqlsrv
tests/Database/DatabaseQueryBuilderTest.php
@@ -2355,6 +2355,11 @@ public function testDeleteMethod() $builder->getConnection()->shouldReceive('delete')->once()->with('delete from [users] where [email] = ?', ['foo'])->andReturn(1); $result = $builder->from('users')->where('email', '=', 'foo')->delete(); $this->assertEquals(1, $result);...
true
Other
laravel
framework
6d9a3523f47f7f73553ceee93495f960846cd41a.json
Apply fixes from StyleCI (#32671)
src/Illuminate/Session/Middleware/StartSession.php
@@ -3,7 +3,6 @@ namespace Illuminate\Session\Middleware; use Closure; -use Illuminate\Contracts\Cache\Factory as CacheFactory; use Illuminate\Contracts\Session\Session; use Illuminate\Http\Request; use Illuminate\Session\SessionManager;
false
Other
laravel
framework
b35afc7aa78f591aee364614660d406424d1e52e.json
defer resolution of cache factory
src/Illuminate/Session/Middleware/StartSession.php
@@ -21,17 +21,24 @@ class StartSession */ protected $manager; + /** + * The callback that can resolve an instance of the cache factory. + * + * @var callable + */ + protected $cacheFactoryResolver; + /** * Create a new session middleware. * * @param \Illuminate...
true
Other
laravel
framework
b35afc7aa78f591aee364614660d406424d1e52e.json
defer resolution of cache factory
src/Illuminate/Session/SessionServiceProvider.php
@@ -2,6 +2,7 @@ namespace Illuminate\Session; +use Illuminate\Contracts\Cache\Factory as CacheFactory; use Illuminate\Session\Middleware\StartSession; use Illuminate\Support\ServiceProvider; @@ -18,7 +19,11 @@ public function register() $this->registerSessionDriver(); - $this->app->singleto...
true
Other
laravel
framework
64d5af59b76fd8c33d8184c35f5f85933262e7f4.json
Apply fixes from StyleCI (#32661)
src/Illuminate/Support/Traits/ReflectsClosures.php
@@ -4,7 +4,6 @@ use Closure; use ReflectionFunction; -use ReflectionParameter; use RuntimeException; trait ReflectsClosures
false
Other
laravel
framework
7801e2a6dc5a6fb8be2a11fa7226e2ad868a8d02.json
Apply fixes from StyleCI (#32660)
src/Illuminate/Support/Traits/ReflectsClosures.php
@@ -4,7 +4,6 @@ use Closure; use ReflectionFunction; -use ReflectionParameter; use RuntimeException; trait ReflectsClosures
false
Other
laravel
framework
c9217c0b06a628c4c5188e080e062af8b0fa7ee7.json
Add exception for undefined cast
src/Illuminate/Database/Eloquent/CastNotFoundException.php
@@ -0,0 +1,50 @@ +<?php + +namespace Illuminate\Database\Eloquent; + +use RuntimeException; + +class CastNotFoundException extends RuntimeException +{ + /** + * The name of the affected Eloquent model. + * + * @var string + */ + public $model; + + /** + * The name of the column. + * + ...
true
Other
laravel
framework
c9217c0b06a628c4c5188e080e062af8b0fa7ee7.json
Add exception for undefined cast
src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
@@ -8,6 +8,7 @@ use Illuminate\Contracts\Database\Eloquent\Castable; use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes; use Illuminate\Contracts\Support\Arrayable; +use Illuminate\Database\Eloquent\CastNotFoundException; use Illuminate\Database\Eloquent\JsonEncodingException; use Illuminate\Databas...
true
Other
laravel
framework
c9217c0b06a628c4c5188e080e062af8b0fa7ee7.json
Add exception for undefined cast
tests/Integration/Database/DatabaseEloquentModelCustomCastingTest.php
@@ -5,6 +5,7 @@ use Illuminate\Contracts\Database\Eloquent\Castable; use Illuminate\Contracts\Database\Eloquent\CastsAttributes; use Illuminate\Contracts\Database\Eloquent\CastsInboundAttributes; +use Illuminate\Database\Eloquent\CastNotFoundException; use Illuminate\Database\Eloquent\Model; /** @@ -141,6 +142,2...
true
Other
laravel
framework
36e215dd39cd757a8ffc6b17794de60476b2289d.json
Fix console options parsing with scheduler Co-Authored-By: Mohamed Said <themsaid@gmail.com>
src/Illuminate/Console/Scheduling/Schedule.php
@@ -199,22 +199,44 @@ public function exec($command, array $parameters = []) protected function compileParameters(array $parameters) { return collect($parameters)->map(function ($value, $key) { - if (is_array($value) && Str::startsWith($key, '--')) { - return collect($value)...
true
Other
laravel
framework
36e215dd39cd757a8ffc6b17794de60476b2289d.json
Fix console options parsing with scheduler Co-Authored-By: Mohamed Said <themsaid@gmail.com>
tests/Console/ConsoleEventSchedulerTest.php
@@ -59,6 +59,9 @@ public function testExecCreatesNewCommand() $schedule->exec('path/to/command', ['--title' => 'A "real" test']); $schedule->exec('path/to/command', [['one', 'two']]); $schedule->exec('path/to/command', ['-1 minute']); + $schedule->exec('path/to/command', ['foo' => ['ba...
true
Other
laravel
framework
cfc3ac9c8b0a593d264ae722ab90601fa4882d0e.json
fix array options
src/Illuminate/Console/Scheduling/Schedule.php
@@ -11,6 +11,7 @@ use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\CallQueuedClosure; use Illuminate\Support\ProcessUtils; +use Illuminate\Support\Str; use Illuminate\Support\Traits\Macroable; use RuntimeException; @@ -198,7 +199,11 @@ public function exec($command, array $parameters = []) p...
false
Other
laravel
framework
8a0a8e430d33ea8c2f784f4443c1912f0a027013.json
Fix Closure namespace
src/Illuminate/Console/Scheduling/Event.php
@@ -501,7 +501,7 @@ protected function getEmailSubject() /** * Register a callback that uses the output after the job runs. * - * @param Closure $callback + * @param \Closure $callback * @param bool $onlyIfOutputExists * @return $this */ @@ -516,7 +516,7 @@ public functio...
false
Other
laravel
framework
5d872d1fe07eee74fd7f28d138e31a4895c6aa53.json
Add withOutput callbacks
src/Illuminate/Console/Scheduling/Event.php
@@ -498,6 +498,83 @@ protected function getEmailSubject() return "Scheduled Job Output For [{$this->command}]"; } + /** + * Register a callback that uses the output after the job runs. + * + * @param Closure $callback + * @param bool $onlyIfOutputExists + * @return $this + ...
false
Other
laravel
framework
386e7d7ada0985dfb5408d2f4d5cdbf30846f9af.json
Implement call named scope
src/Illuminate/Database/Eloquent/Builder.php
@@ -922,10 +922,7 @@ public function scopes($scopes) // Next we'll pass the scope callback to the callScope method which will take // care of grouping the "wheres" properly so the logical order doesn't get // messed up when adding scopes. Then we'll return back out the builder. - ...
true
Other
laravel
framework
386e7d7ada0985dfb5408d2f4d5cdbf30846f9af.json
Implement call named scope
src/Illuminate/Database/Eloquent/Model.php
@@ -1111,12 +1111,24 @@ public function newPivot(self $parent, array $attributes, $table, $exists, $usin /** * Determine if the model has a given scope. * - * @param string $method + * @param string $scope * @return bool */ - public function hasScope($method) + public func...
true
Other
laravel
framework
9922c87369962939af7c620472fe3a82dd0f4019.json
allow only a closure in Event::fake() assertions
src/Illuminate/Support/Testing/Fakes/EventFake.php
@@ -5,10 +5,13 @@ use Closure; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Support\Arr; +use Illuminate\Support\Traits\ReflectsClosures; use PHPUnit\Framework\Assert as PHPUnit; class EventFake implements Dispatcher { + use ReflectsClosures; + /** * The original event dispatcher. ...
true
Other
laravel
framework
9922c87369962939af7c620472fe3a82dd0f4019.json
allow only a closure in Event::fake() assertions
tests/Support/SupportTestingEventFakeTest.php
@@ -31,6 +31,15 @@ public function testAssertDispatched() $this->fake->assertDispatched(EventStub::class); } + public function testAssertDispatchedWithClosure() + { + $this->fake->dispatch(new EventStub); + + $this->fake->assertDispatched(function (EventStub $event) { + re...
true
Other
laravel
framework
5783f4a741a537aaee9845fb725e9eb9941ce376.json
allow only a closure in Queue::fake() assertions
src/Illuminate/Support/Testing/Fakes/QueueFake.php
@@ -3,12 +3,16 @@ namespace Illuminate\Support\Testing\Fakes; use BadMethodCallException; +use Closure; use Illuminate\Contracts\Queue\Queue; use Illuminate\Queue\QueueManager; +use Illuminate\Support\Traits\ReflectsClosures; use PHPUnit\Framework\Assert as PHPUnit; class QueueFake extends QueueManager implem...
true
Other
laravel
framework
5783f4a741a537aaee9845fb725e9eb9941ce376.json
allow only a closure in Queue::fake() assertions
tests/Support/SupportTestingQueueFakeTest.php
@@ -43,6 +43,15 @@ public function testAssertPushed() $this->fake->assertPushed(JobStub::class); } + public function testAssertPushedWithClosure() + { + $this->fake->push($this->job); + + $this->fake->assertPushed(function (JobStub $job) { + return true; + }); + ...
true
Other
laravel
framework
6cb43b99eceff801ab7f660e23d8b57fa5c3559f.json
add ReflectsClosures trait
src/Illuminate/Support/Traits/ReflectsClosures.php
@@ -0,0 +1,31 @@ +<?php + +namespace Illuminate\Support\Traits; + +use Closure; +use ReflectionFunction; +use ReflectionParameter; + +trait ReflectsClosures +{ + /** + * Get the class types of the parameters of the given closure. + * + * @param Closure $closure + * @return array + * + * @th...
true
Other
laravel
framework
6cb43b99eceff801ab7f660e23d8b57fa5c3559f.json
add ReflectsClosures trait
tests/Support/SupportReflectsClosuresTest.php
@@ -0,0 +1,61 @@ +<?php + +namespace Illuminate\Tests\Support; + +use Illuminate\Support\Traits\ReflectsClosures; +use PHPUnit\Framework\TestCase; +use RuntimeException; + +class SupportReflectsClosuresTest extends TestCase +{ + public function testReflectsClosures() + { + $this->assertParameterTypes([Exam...
true
Other
laravel
framework
358827f3b0e44eeb166e6ef70d720213b5b5d3a7.json
Fix duplicate model name
tests/Integration/Database/EloquentModelScopeTest.php
@@ -11,20 +11,20 @@ class EloquentModelScopeTest extends DatabaseTestCase { public function testModelHasScope() { - $model = new TestModel1; + $model = new TestScopeModel1; $this->assertTrue($model->hasScope("exists")); } public function testModelDoesNotHaveScope() {...
false
Other
laravel
framework
d370eb18092210adadcbdd857f97d4c1dc2784c3.json
Add hasScope to the builder
src/Illuminate/Database/Eloquent/Builder.php
@@ -1327,6 +1327,17 @@ public static function hasGlobalMacro($name) return isset(static::$macros[$name]); } + /** + * Determine if the given model has a scope. + * + * @param string $method + * @return bool + */ + public function hasScope(string $name) + { + return $...
false