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 | ef2dc2e7ccbcb3d074e81c552e35df36a6fc25e6.json | Fix MorphTo lazy eager loading (#25240) | tests/Database/DatabaseEloquentBuilderTest.php | @@ -460,7 +460,7 @@ public function testGetRelationProperlySetsNestedRelationships()
{
$builder = $this->getBuilder();
$builder->setModel($this->getMockModel());
- $builder->getModel()->shouldReceive('orders')->once()->andReturn($relation = m::mock('stdClass'));
+ $builder->getModel... | true |
Other | laravel | framework | ef2dc2e7ccbcb3d074e81c552e35df36a6fc25e6.json | Fix MorphTo lazy eager loading (#25240) | tests/Integration/Database/EloquentMorphToLazyEagerLoadingTest.php | @@ -0,0 +1,94 @@
+<?php
+
+namespace Illuminate\Tests\Integration\Database\EloquentMorphToLazyEagerLoadingTest;
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Tests\Integration\Database\DatabaseTestCase;
+
+/**
+ * @group int... | true |
Other | laravel | framework | 7bfbac7d22926612cce18bd3aac1376f24704320.json | Fix URL validation pattern (#25197) | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1360,7 +1360,7 @@ public function validateUrl($attribute, $value)
((aaa|aaas|about|acap|acct|acr|adiumxtra|afp|afs|aim|apt|attachment|aw|barion|beshare|bitcoin|blob|bolo|callto|cap|chrome|chrome-extension|cid|coap|coaps|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-playcontainer|dlna-play... | false |
Other | laravel | framework | 2d551a849184ed55655f52559beed7ac26706bb7.json | Fix URL validation pattern (#25194) | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1528,7 +1528,7 @@ public function validateUrl($attribute, $value)
((aaa|aaas|about|acap|acct|acr|adiumxtra|afp|afs|aim|apt|attachment|aw|barion|beshare|bitcoin|blob|bolo|callto|cap|chrome|chrome-extension|cid|coap|coaps|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-playcontainer|dlna-play... | false |
Other | laravel | framework | 0a6bd84aed6faaff0a1716e26c62ff7aef7971cb.json | Remove undefined variable from compact (#25193) | src/Illuminate/Database/Query/Builder.php | @@ -1240,7 +1240,7 @@ public function addWhereExistsQuery(self $query, $boolean = 'and', $not = false)
{
$type = $not ? 'NotExists' : 'Exists';
- $this->wheres[] = compact('type', 'operator', 'query', 'boolean');
+ $this->wheres[] = compact('type', 'query', 'boolean');
$this->ad... | false |
Other | laravel | framework | a86665aee4bed73272b0b0365b73060db6dee984.json | remove unused var (#25187) | src/Illuminate/Database/Concerns/ManagesTransactions.php | @@ -26,7 +26,7 @@ public function transaction(Closure $callback, $attempts = 1)
// catch any exception we can rollback this transaction so that none of this
// gets actually persisted to a database or stored in a permanent fashion.
try {
- return tap($callback($this... | false |
Other | laravel | framework | 525f780709026979e08ba5cfe0da91a6853075d8.json | Create ForwardsCalls trait | src/Illuminate/Support/Traits/ForwardsCalls.php | @@ -0,0 +1,35 @@
+<?php
+
+namespace Illuminate\Support\Traits;
+
+use Error;
+use BadMethodCallException;
+
+trait ForwardsCalls
+{
+ protected function forwardCallTo($object, $method, $parameters)
+ {
+ try {
+ return $object->{$method}(...$parameters);
+ } catch (Error | BadMethodCallE... | true |
Other | laravel | framework | 525f780709026979e08ba5cfe0da91a6853075d8.json | Create ForwardsCalls trait | tests/Support/ForwardsCallsTest.php | @@ -0,0 +1,93 @@
+<?php
+
+namespace Illuminate\Tests\Support;
+
+use PHPUnit\Framework\TestCase;
+use Illuminate\Support\Traits\ForwardsCalls;
+
+class ForwardsCallsTest extends TestCase
+{
+ public function testForwardsCalls()
+ {
+ $results = (new ForwardsCallsOne)->forwardedTwo('foo', 'bar');
+
+ ... | true |
Other | laravel | framework | fe290321349916223a800bf2f300d818d94d537a.json | Modify MSSQL driver order (#25150) | src/Illuminate/Database/Connectors/SqlServerConnector.php | @@ -43,13 +43,15 @@ protected function getDsn(array $config)
// First we will create the basic DSN setup as well as the port if it is in
// in the configuration options. This will give us the basic DSN we will
// need to establish the PDO connections and return them back for use.
- if ... | true |
Other | laravel | framework | fe290321349916223a800bf2f300d818d94d537a.json | Modify MSSQL driver order (#25150) | tests/Database/DatabaseConnectorTest.php | @@ -161,23 +161,48 @@ public function testSqlServerConnectCallsCreateConnectionWithOptionalArguments()
$this->assertSame($result, $connection);
}
+ public function testSqlServerConnectCallsCreateConnectionWithPreferredODBC()
+ {
+ if (! in_array('odbc', PDO::getAvailableDrivers())) {
+ ... | true |
Other | laravel | framework | c5dc9c870a8a1af6c7e827dd81bd15f0a1561cc4.json | update serialization logic | src/Illuminate/Cookie/Middleware/EncryptCookies.php | @@ -30,7 +30,7 @@ class EncryptCookies
*
* @var bool
*/
- protected $serialize = false;
+ protected static $serialize = false;
/**
* Create a new CookieGuard instance.
@@ -100,7 +100,7 @@ protected function decryptCookie($name, $cookie)
{
return is_array($cookie)
... | true |
Other | laravel | framework | c5dc9c870a8a1af6c7e827dd81bd15f0a1561cc4.json | update serialization logic | src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php | @@ -8,6 +8,7 @@
use Symfony\Component\HttpFoundation\Cookie;
use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Session\TokenMismatchException;
+use Illuminate\Cookie\Middleware\EncryptCookies;
class VerifyCsrfToken
{
@@ -138,7 +139,7 @@ protected function getTokenFromRequest($request)
$token... | true |
Other | laravel | framework | 240d904606a101f5104bff8a1d09678c44f11903.json | adjust cookie serialization | src/Illuminate/Cookie/Middleware/EncryptCookies.php | @@ -30,7 +30,7 @@ class EncryptCookies
*
* @var bool
*/
- protected $serialize = false;
+ protected static $serialize = false;
/**
* Create a new CookieGuard instance.
@@ -100,7 +100,7 @@ protected function decryptCookie($name, $cookie)
{
return is_array($cookie)
... | true |
Other | laravel | framework | 240d904606a101f5104bff8a1d09678c44f11903.json | adjust cookie serialization | src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php | @@ -8,6 +8,7 @@
use Symfony\Component\HttpFoundation\Cookie;
use Illuminate\Contracts\Encryption\Encrypter;
use Illuminate\Session\TokenMismatchException;
+use Illuminate\Cookie\Middleware\EncryptCookies;
class VerifyCsrfToken
{
@@ -138,7 +139,7 @@ protected function getTokenFromRequest($request)
$token... | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/Bootstrap.php | @@ -38,7 +38,7 @@ protected static function updatePackageArray(array $packages)
*/
protected static function updateSass()
{
- copy(__DIR__.'/bootstrap-stubs/_variables.scss', resource_path('assets/sass/_variables.scss'));
- copy(__DIR__.'/bootstrap-stubs/app.scss', resource_path('assets/sa... | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/None.php | @@ -17,8 +17,8 @@ public static function install()
static::updateBootstrapping();
tap(new Filesystem, function ($filesystem) {
- $filesystem->deleteDirectory(resource_path('assets/js/components'));
- $filesystem->delete(resource_path('assets/sass/_variables.scss'));
+ ... | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/Preset.php | @@ -15,7 +15,7 @@ protected static function ensureComponentDirectoryExists()
{
$filesystem = new Filesystem;
- if (! $filesystem->isDirectory($directory = resource_path('assets/js/components'))) {
+ if (! $filesystem->isDirectory($directory = resource_path('js/components'))) {
... | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/React.php | @@ -55,12 +55,12 @@ protected static function updateWebpackConfiguration()
protected static function updateComponent()
{
(new Filesystem)->delete(
- resource_path('assets/js/components/ExampleComponent.vue')
+ resource_path('js/components/ExampleComponent.vue')
);
... | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/Vue.php | @@ -55,12 +55,12 @@ protected static function updateWebpackConfiguration()
protected static function updateComponent()
{
(new Filesystem)->delete(
- resource_path('assets/js/components/Example.js')
+ resource_path('js/components/Example.js')
);
copy(
... | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/react-stubs/webpack.mix.js | @@ -11,5 +11,5 @@ let mix = require('laravel-mix');
|
*/
-mix.react('resources/assets/js/app.js', 'public/js')
- .sass('resources/assets/sass/app.scss', 'public/css');
+mix.react('resources/js/app.js', 'public/js')
+ .sass('resources/sass/app.scss', 'public/css'); | true |
Other | laravel | framework | 2104d867fd5a14753a01bec2603da0044fefa17e.json | Flatten preset asset directories (#25112) | src/Illuminate/Foundation/Console/Presets/vue-stubs/webpack.mix.js | @@ -11,5 +11,5 @@ let mix = require('laravel-mix');
|
*/
-mix.js('resources/assets/js/app.js', 'public/js')
- .sass('resources/assets/sass/app.scss', 'public/css');
+mix.js('resources/js/app.js', 'public/js')
+ .sass('resources/sass/app.scss', 'public/css'); | true |
Other | laravel | framework | a0b4d25c1b795cd81cacda1a1407ecc191151c4c.json | Add absolute parameter to signed routes (#25107) | src/Illuminate/Routing/UrlGenerator.php | @@ -301,9 +301,10 @@ public function formatScheme($secure = null)
* @param string $name
* @param array $parameters
* @param \DateTimeInterface|int $expiration
+ * @param bool $absolute
* @return string
*/
- public function signedRoute($name, $parameters = [], $expiration = n... | false |
Other | laravel | framework | 55afaaa248d2e7092f99963762150f397fbbaba3.json | Allow guests in authorize middleware (#25109) | src/Illuminate/Auth/Middleware/Authorize.php | @@ -5,17 +5,9 @@
use Closure;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\Access\Gate;
-use Illuminate\Contracts\Auth\Factory as Auth;
class Authorize
{
- /**
- * The authentication factory instance.
- *
- * @var \Illuminate\Contracts\Auth\Factory
- */
- protected ... | true |
Other | laravel | framework | 55afaaa248d2e7092f99963762150f397fbbaba3.json | Allow guests in authorize middleware (#25109) | tests/Auth/AuthorizeMiddlewareTest.php | @@ -12,7 +12,6 @@
use Illuminate\Container\Container;
use Illuminate\Auth\Middleware\Authorize;
use Illuminate\Contracts\Routing\Registrar;
-use Illuminate\Contracts\Auth\Factory as Auth;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
@@ -34,13 +3... | true |
Other | laravel | framework | a09b0e377ff1cf2b68a0c9bb87e8dfba21f34c51.json | use 301 redirect | src/Illuminate/Routing/Router.php | @@ -236,7 +236,7 @@ public function fallback($action)
* @param int $status
* @return \Illuminate\Routing\Route
*/
- public function redirect($uri, $destination, $status = 302)
+ public function redirect($uri, $destination, $status = 301)
{
return $this->any($uri, '\Illuminate\Rou... | false |
Other | laravel | framework | 7a5b58b8e688a60557be238f4648b196b750f233.json | Fix ConnectionInterface methods (#25092)
Declaration of Illuminate\Database\Connection class methods must be compatible with Illuminate\Database\ConnectionInterface | src/Illuminate/Database/ConnectionInterface.php | @@ -27,18 +27,20 @@ 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 | bb57655967f31b426b968a46ca738d6a245e873d.json | Add getFallbackChannelName method.
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> | src/Illuminate/Log/LogManager.php | @@ -374,6 +374,16 @@ protected function formatter()
});
}
+ /**
+ * Get fallback log channel name.
+ *
+ * @return string
+ */
+ protected function getFallbackChannelName()
+ {
+ return $this->app->bound('env') ? $this->app->environment() : 'production';
+ }
+
/**... | true |
Other | laravel | framework | bb57655967f31b426b968a46ca738d6a245e873d.json | Add getFallbackChannelName method.
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> | src/Illuminate/Log/LoggerConfiguration.php | @@ -51,9 +51,16 @@ protected function level(array $config)
protected function parseChannel(array $config)
{
if (! isset($config['name'])) {
- return $this->app->bound('env') ? $this->app->environment() : 'production';
+ return $this->getFallbackChannelName();
}
... | true |
Other | laravel | framework | a7fecc3e3d410a955021583ddfc6cccc07b0114b.json | remove check for keys | src/Illuminate/Foundation/Testing/TestResponse.php | @@ -552,7 +552,6 @@ protected function jsonSearchStrings($key, $value)
$needle = substr(json_encode([$key => $value]), 1, -1);
return [
- $needle.':',
$needle.']',
$needle.'}',
$needle.',', | true |
Other | laravel | framework | a7fecc3e3d410a955021583ddfc6cccc07b0114b.json | remove check for keys | tests/Foundation/FoundationTestResponseTest.php | @@ -167,8 +167,6 @@ public function testAssertJsonFragment()
$response = TestResponse::fromBaseResponse(new Response(new JsonSerializableMixedResourcesStub));
- $response->assertJsonFragment(['foobar']);
-
$response->assertJsonFragment(['foo' => 'bar']);
$response->assertJsonFrag... | true |
Other | laravel | framework | 3c6febb810af2128c479b402c36859d7572665cc.json | Apply fixes from StyleCI (#25080) | src/Illuminate/Validation/Rules/RequiredIf.php | @@ -2,8 +2,6 @@
namespace Illuminate\Validation\Rules;
-use Closure;
-
class RequiredIf
{
/** | false |
Other | laravel | framework | 5faa5944d9a9f2d2cae0cd7a40f7ec3ef7b58632.json | Apply fixes from StyleCI (#25079) | tests/Support/SupportPluralizerTest.php | @@ -40,7 +40,8 @@ public function testIfEndOfWordPlural()
$this->assertEquals('VertexFields', Str::plural('VertexField'));
}
- public function testPluralWithNegativeCount() {
+ public function testPluralWithNegativeCount()
+ {
$this->assertEquals('test', Str::plural('test', 1));
... | false |
Other | laravel | framework | f294134e2404dca84db92efa193ba574174cef30.json | Update DocBlock for PHP Analyses (#25078) | src/Illuminate/Http/Resources/Json/JsonResource.php | @@ -60,7 +60,7 @@ public function __construct($resource)
/**
* Create a new resource instance.
*
- * @param dynamic $parameters
+ * @param mixed $parameters
* @return static
*/
public static function make(...$parameters) | false |
Other | laravel | framework | 5f9769bc17d7d6ade1583ad7f348b1c4ebe3eb8b.json | Remove unused rule | tests/Validation/ValidationRequiredIfTest.php | @@ -2,7 +2,6 @@
namespace Illuminate\Tests\Validation;
-use Illuminate\Validation\Rule;
use PHPUnit\Framework\TestCase;
use Illuminate\Validation\Rules\RequiredIf;
| false |
Other | laravel | framework | 932cccb5c511d9e36a5e27217232d2626949737a.json | Fix edge case in assertJsonFragment (#25023) | src/Illuminate/Foundation/Testing/TestResponse.php | @@ -552,6 +552,7 @@ protected function jsonSearchStrings($key, $value)
$needle = substr(json_encode([$key => $value]), 1, -1);
return [
+ $needle.':',
$needle.']',
$needle.'}',
$needle.',', | true |
Other | laravel | framework | 932cccb5c511d9e36a5e27217232d2626949737a.json | Fix edge case in assertJsonFragment (#25023) | tests/Foundation/FoundationTestResponseTest.php | @@ -167,6 +167,8 @@ public function testAssertJsonFragment()
$response = TestResponse::fromBaseResponse(new Response(new JsonSerializableMixedResourcesStub));
+ $response->assertJsonFragment(['foobar']);
+
$response->assertJsonFragment(['foo' => 'bar']);
$response->assertJsonFrag... | true |
Other | laravel | framework | 64f6f170e9c8f61dd61ef6f75aae633f9547b8b9.json | support multiple addresses in array | src/Illuminate/Notifications/Messages/MailMessage.php | @@ -2,6 +2,9 @@
namespace Illuminate\Notifications\Messages;
+use Traversable;
+use Illuminate\Contracts\Support\Arrayable;
+
class MailMessage extends SimpleMessage
{
/**
@@ -144,35 +147,47 @@ public function from($address, $name = null)
*/
public function replyTo($address, $name = null)
{
... | true |
Other | laravel | framework | 64f6f170e9c8f61dd61ef6f75aae633f9547b8b9.json | support multiple addresses in array | tests/Notifications/NotificationMailMessageTest.php | @@ -30,6 +30,11 @@ public function testCcIsSetCorrectly()
->cc('test@example.com', 'Test');
$this->assertSame([['test@example.com', null], ['test@example.com', 'Test']], $message->cc);
+
+ $message = new MailMessage;
+ $message->cc(['test@example.com', 'Test' => 'test@example.c... | true |
Other | laravel | framework | 2ee2bb537ee10f398e9c4f4ffbc12b057a93a3d2.json | Add tests for Arr::query(). (#25024) | tests/Support/SupportArrTest.php | @@ -419,6 +419,16 @@ public function testPull()
$this->assertEquals(['emails' => ['joe@example.com' => 'Joe', 'jane@localhost' => 'Jane']], $array);
}
+ public function testQuery()
+ {
+ $this->assertSame('', Arr::query([]));
+ $this->assertSame('foo=bar', Arr::query(['foo' => 'bar']... | false |
Other | laravel | framework | dc767d2d7cecd621d4c12b9eac901c17560cecd0.json | Apply fixes from StyleCI (#25017) | src/Illuminate/Mail/Transport/MailgunTransport.php | @@ -2,7 +2,6 @@
namespace Illuminate\Mail\Transport;
-use Illuminate\Support\Str;
use Swift_Mime_SimpleMessage;
use GuzzleHttp\ClientInterface;
| false |
Other | laravel | framework | 819dbe33b899e174ff70192479f1beaa86ab6707.json | add API endpoint to MailgunTransport (#25010) | src/Illuminate/Mail/Transport/MailgunTransport.php | @@ -23,7 +23,7 @@ class MailgunTransport extends Transport
protected $key;
/**
- * The Mailgun domain.
+ * The Mailgun email domain.
*
* @var string
*/
@@ -34,7 +34,7 @@ class MailgunTransport extends Transport
*
* @var string
*/
- protected $url;
+ protecte... | true |
Other | laravel | framework | 819dbe33b899e174ff70192479f1beaa86ab6707.json | add API endpoint to MailgunTransport (#25010) | src/Illuminate/Mail/TransportManager.php | @@ -118,7 +118,9 @@ protected function createMailgunDriver()
return new MailgunTransport(
$this->guzzle($config),
- $config['secret'], $config['domain']
+ $config['secret'],
+ $config['domain'],
+ $config['endpoint'] ?? null
);
}
| true |
Other | laravel | framework | a9e332988f707a3e721dd24b7881fc2c8f07daa5.json | add missing docblock | src/Illuminate/Console/Parser.php | @@ -35,6 +35,8 @@ public static function parse($expression)
*
* @param string $expression
* @return string
+ *
+ * @throws \InvalidArgumentException
*/
protected static function name($expression)
{ | false |
Other | laravel | framework | e3438e1071a06a2570108ed2a6e011b8816abbc7.json | Make Router::addRoute() public (#25000)
I'm developing a package that provides a different mechanism for defining routes. It would be much easier for the package to call `addRoute()` directly instead of the individual human-friendly get/post/etc. methods. I don't want to extend the router in order to reduce conflicts ... | src/Illuminate/Routing/Router.php | @@ -425,7 +425,7 @@ public function getLastGroupPrefix()
* @param \Closure|array|string|null $action
* @return \Illuminate\Routing\Route
*/
- protected function addRoute($methods, $uri, $action)
+ public function addRoute($methods, $uri, $action)
{
return $this->routes->add($this... | false |
Other | laravel | framework | 51c6c8604fb1c0f5a13585cf991a872bf2f242bb.json | Use proper assertions. (#25004) | tests/Filesystem/FilesystemAdapterTest.php | @@ -107,7 +107,7 @@ public function testDelete()
file_put_contents($this->tempDir.'/file.txt', 'Hello World');
$filesystemAdapter = new FilesystemAdapter($this->filesystem);
$this->assertTrue($filesystemAdapter->delete('file.txt'));
- $this->assertFalse(file_exists($this->tempDir.'/fil... | true |
Other | laravel | framework | 51c6c8604fb1c0f5a13585cf991a872bf2f242bb.json | Use proper assertions. (#25004) | tests/Integration/Database/EloquentCollectionLoadMissingTest.php | @@ -57,7 +57,7 @@ public function testLoadMissing()
$this->assertCount(2, \DB::getQueryLog());
$this->assertTrue($posts[0]->comments[0]->relationLoaded('parent'));
$this->assertTrue($posts[0]->comments[1]->parent->relationLoaded('revisions'));
- $this->assertFalse(array_key_exists('id'... | true |
Other | laravel | framework | 51c6c8604fb1c0f5a13585cf991a872bf2f242bb.json | Use proper assertions. (#25004) | tests/Integration/Routing/UrlSigningTest.php | @@ -21,7 +21,7 @@ public function test_signing_url()
return $request->hasValidSignature() ? 'valid' : 'invalid';
})->name('foo');
- $this->assertTrue(is_string($url = URL::signedRoute('foo', ['id' => 1])));
+ $this->assertInternalType('string', $url = URL::signedRoute('foo', ['id' ... | true |
Other | laravel | framework | 51c6c8604fb1c0f5a13585cf991a872bf2f242bb.json | Use proper assertions. (#25004) | tests/Mail/MailableQueuedTest.php | @@ -46,7 +46,7 @@ public function testQueuedMailableWithAttachmentSent()
$mailable = new MailableQueableStub();
$attachmentOption = ['mime' => 'image/jpeg', 'as' => 'bar.jpg'];
$mailable->attach('foo.jpg', $attachmentOption);
- $this->assertTrue(is_array($mailable->attachments));
+ ... | true |
Other | laravel | framework | fa9359c8fed0211ddff970ee99a61e75bcd4fca8.json | Add a setup method in BroadcasterTest | tests/Broadcasting/BroadcasterTest.php | @@ -11,33 +11,43 @@
class BroadcasterTest extends TestCase
{
+ /**
+ * @var \Illuminate\Tests\Broadcasting\FakeBroadcaster
+ */
+ public $broadcaster;
+
+ public function setUp()
+ {
+ parent::setUp();
+
+ $this->broadcaster = new FakeBroadcaster;
+ }
+
public function tear... | false |
Other | laravel | framework | 304de5fc046c16eb08ab1415cc7755981ac1f3cb.json | Add tests for method retrieveChannelsOptions | tests/Broadcasting/BroadcasterTest.php | @@ -108,13 +108,61 @@ public function testCanRegisterChannelsWithOptions()
$options = [ 'a' => [ 'b', 'c' ] ];
$broadcaster->channel('somechannel', function () {}, $options);
+ }
+
+ public function testCanRetrieveChannelsOptions()
+ {
+ $broadcaster = new FakeBroadcaster;
+
+ ... | false |
Other | laravel | framework | cdcb9e28205e1bd9104a79335619652772533f18.json | Add a test class for trait UsePusherChannelsNames | tests/Broadcasting/PusherBroadcasterTest.php | @@ -23,28 +23,6 @@ public function setUp()
$this->broadcaster = m::mock(PusherBroadcaster::class, [$this->pusher])->makePartial();
}
- /**
- * @dataProvider channelsProvider
- */
- public function testChannelNameNormalization($requestChannelName, $normalizedName)
- {
- $this->ass... | true |
Other | laravel | framework | cdcb9e28205e1bd9104a79335619652772533f18.json | Add a test class for trait UsePusherChannelsNames | tests/Broadcasting/RedisBroadcasterTest.php | @@ -25,28 +25,6 @@ public function tearDown()
m::close();
}
- /**
- * @dataProvider channelsProvider
- */
- public function testChannelNameNormalization($requestChannelName, $normalizedName)
- {
- $this->assertEquals(
- $normalizedName,
- $this->broadcaster-... | true |
Other | laravel | framework | cdcb9e28205e1bd9104a79335619652772533f18.json | Add a test class for trait UsePusherChannelsNames | tests/Broadcasting/UsePusherChannelsNamesTest.php | @@ -0,0 +1,109 @@
+<?php
+
+namespace Illuminate\Tests\Broadcasting;
+
+use Illuminate\Broadcasting\Broadcasters\Broadcaster;
+use Illuminate\Broadcasting\Broadcasters\UsePusherChannelsNames;
+use Mockery as m;
+use PHPUnit\Framework\TestCase;
+
+class UsePusherChannelsNamesTest extends TestCase
+{
+ /**
+ * @va... | true |
Other | laravel | framework | 30ebb1b80521efca6c65b3921bfd725d6c628b6f.json | Add trait UsePusherChannelsNames | src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php | @@ -10,6 +10,8 @@
class PusherBroadcaster extends Broadcaster
{
+ use UsePusherChannelsNames;
+
/**
* The Pusher SDK instance.
*
@@ -127,31 +129,4 @@ public function getPusher()
{
return $this->pusher;
}
-
- /**
- * Return true if channel is protected by authentication
... | true |
Other | laravel | framework | 30ebb1b80521efca6c65b3921bfd725d6c628b6f.json | Add trait UsePusherChannelsNames | src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php | @@ -3,12 +3,13 @@
namespace Illuminate\Broadcasting\Broadcasters;
use Illuminate\Support\Arr;
-use Illuminate\Support\Str;
use Illuminate\Contracts\Redis\Factory as Redis;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
class RedisBroadcaster extends Broadcaster
{
+ use UsePusherChann... | true |
Other | laravel | framework | 30ebb1b80521efca6c65b3921bfd725d6c628b6f.json | Add trait UsePusherChannelsNames | src/Illuminate/Broadcasting/Broadcasters/UsePusherChannelsNames.php | @@ -0,0 +1,35 @@
+<?php
+
+namespace Illuminate\Broadcasting\Broadcasters;
+
+use Illuminate\Support\Str;
+
+trait UsePusherChannelsNames
+{
+ /**
+ * Return true if channel is protected by authentication
+ *
+ * @param string $channel
+ * @return bool
+ */
+ public function isGuardedChannel... | true |
Other | laravel | framework | 7bc1103a127d26442e60e343abf34bb6f6857f99.json | Fix multiple notification recipients (#24957)
* Fix multiple notification recipients
PR #24606 unfortunately broke on-demand notifications addressed to multiple recipients.
This fixes Issue #24729 and #24956
* Added test for multiple mail recipients.
* Remove unnecessary spaces. | src/Illuminate/Notifications/Channels/MailChannel.php | @@ -186,7 +186,7 @@ protected function getRecipients($notifiable, $notification, $message)
return collect($recipients)->mapWithKeys(function ($recipient, $email) {
return is_numeric($email)
- ? [(is_string($recipient) ? $recipient : $recipient->email)]
+ ? [... | true |
Other | laravel | framework | 7bc1103a127d26442e60e343abf34bb6f6857f99.json | Fix multiple notification recipients (#24957)
* Fix multiple notification recipients
PR #24606 unfortunately broke on-demand notifications addressed to multiple recipients.
This fixes Issue #24729 and #24956
* Added test for multiple mail recipients.
* Remove unnecessary spaces. | tests/Integration/Notifications/SendingMailNotificationsTest.php | @@ -174,6 +174,36 @@ public function test_mail_is_sent_with_subject()
$user->notify($notification);
}
+ public function test_mail_is_sent_to_multiple_adresses()
+ {
+ $notification = new TestMailNotificationWithSubject;
+
+ $user = NotifiableUserWithMultipleAddreses::forceCreate([
+ ... | true |
Other | laravel | framework | c8682e11b9f0e153654ff5c2a3ad9f8b2dca56d1.json | Add alias for calling with single state (#24937) | src/Illuminate/Database/Eloquent/FactoryBuilder.php | @@ -117,6 +117,17 @@ public function times($amount)
return $this;
}
+ /**
+ * Set the state to be applied to the model.
+ *
+ * @param string $state
+ * @return $this
+ */
+ public function state($state)
+ {
+ return $this->states([$state]);
+ }
+
/**
... | true |
Other | laravel | framework | c8682e11b9f0e153654ff5c2a3ad9f8b2dca56d1.json | Add alias for calling with single state (#24937) | tests/Integration/Database/EloquentFactoryBuilderTest.php | @@ -53,7 +53,7 @@ protected function getEnvironmentSetUp($app)
$factory->afterMakingState(FactoryBuildableUser::class, 'with_callable_server', function (FactoryBuildableUser $user, Generator $faker) {
$server = factory(FactoryBuildableServer::class)
- ->states('callable')
+ ... | true |
Other | laravel | framework | ffa5803a9dd72ca431cf4711cf636f3ba20f57db.json | Support special float values on PostgreSQL | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -478,7 +478,7 @@ protected function castAttribute($key, $value)
case 'real':
case 'float':
case 'double':
- return (float) $value;
+ return $this->fromFloat($value);
case 'string':
return (string) $value;
... | true |
Other | laravel | framework | ffa5803a9dd72ca431cf4711cf636f3ba20f57db.json | Support special float values on PostgreSQL | tests/Database/DatabaseEloquentModelTest.php | @@ -1613,6 +1613,29 @@ public function testModelAttributeCastingFailsOnUnencodableData()
$model->getAttributes();
}
+ public function testModelAttributeCastingWithSpecialFloatValues()
+ {
+ $model = new EloquentModelCastingStub;
+
+ $model->floatAttribute = 'Infinity';
+ $this... | true |
Other | laravel | framework | 4d9e85fc4f320fce3c7c386368e00405efb46d3e.json | Add missing call to guard for Pusher | src/Illuminate/Broadcasting/Broadcasters/PusherBroadcaster.php | @@ -67,7 +67,7 @@ public function auth($request)
* @param mixed $result
* @return mixed
*/
- public function validAuthenticationResponse($request, $result)
+ public function validAuthenticationResponse($request, $result, $options = [])
{
if (Str::startsWith($request->channel_name... | false |
Other | laravel | framework | 796eb9315b2a1eaee830873ebdd4950b757fcdb1.json | Add options to RedisBroadcaster | src/Illuminate/Broadcasting/Broadcasters/RedisBroadcaster.php | @@ -45,17 +45,26 @@ public function __construct(Redis $redis, $connection = null)
*/
public function auth($request)
{
+ $channelName = Str::startsWith($request->channel_name, 'private-')
+ ? Str::replaceFirst('private-', '', $request->channel_name)
+ : Str::replaceFirst('pre... | false |
Other | laravel | framework | 16ed752928a59e0b3003ab54675fcb3096b23d96.json | Remove options retrieving from Broadcaster | src/Illuminate/Broadcasting/Broadcasters/Broadcaster.php | @@ -59,19 +59,8 @@ public function channel($channel, $callback, array $options = [])
* @return mixed
* @throws \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
*/
- protected function verifyUserCanAccessChannel($request, $channel)
+ protected function verifyUserCanAccessChannel(... | false |
Other | laravel | framework | 6dd4e2bfb1cc545d2a26ecb790c78bf4c13be41c.json | add method to get contents of uploaded file
- `getContents()` checks if a file exists at the temporary upload location, and returns the contents of the file if found.
- added a test, and a file for the test | src/Illuminate/Http/UploadedFile.php | @@ -5,6 +5,7 @@
use Illuminate\Support\Arr;
use Illuminate\Container\Container;
use Illuminate\Support\Traits\Macroable;
+use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Contracts\Filesystem\Factory as FilesystemFactory;
use Symfony\Component\HttpFoundation\File\UploadedFile as SymfonyUpl... | true |
Other | laravel | framework | 6dd4e2bfb1cc545d2a26ecb790c78bf4c13be41c.json | add method to get contents of uploaded file
- `getContents()` checks if a file exists at the temporary upload location, and returns the contents of the file if found.
- added a test, and a file for the test | tests/Http/HttpUploadedFileTest.php | @@ -0,0 +1,19 @@
+<?php
+
+namespace Illuminate\Tests\Http;
+
+use PHPUnit\Framework\TestCase;
+use Illuminate\Http\UploadedFile;
+
+class HttpUploadedFileTest extends TestCase
+{
+ public function testUploadedFileCanRetrieveContentsFromTextFile()
+ {
+ $file = new UploadedFile(
+ __DIR__.'/Fixt... | true |
Other | laravel | framework | 6dd4e2bfb1cc545d2a26ecb790c78bf4c13be41c.json | add method to get contents of uploaded file
- `getContents()` checks if a file exists at the temporary upload location, and returns the contents of the file if found.
- added a test, and a file for the test | tests/Http/fixtures/test.txt | @@ -0,0 +1 @@
+This is a story about something that happened long ago when your grandfather was a child. | true |
Other | laravel | framework | c19afaf30f67838b6b3d2da0afcbff98ff6029f3.json | Add hint to mail fake (#24911)
* Add hint to mail fake
* Style fixes | src/Illuminate/Support/Testing/Fakes/MailFake.php | @@ -36,9 +36,15 @@ public function assertSent($mailable, $callback = null)
return $this->assertSentTimes($mailable, $callback);
}
+ $message = "The expected [{$mailable}] mailable was not sent.";
+
+ if (count($this->queuedMailables) > 0) {
+ $message .= ' Did you mean t... | false |
Other | laravel | framework | 74252d15d8c22be664934b251c52ff3c98147740.json | Use func_num_args(). (#24901) | src/Illuminate/View/Concerns/ManagesComponents.php | @@ -88,7 +88,7 @@ protected function componentData($name)
*/
public function slot($name, $content = null)
{
- if (count(func_get_args()) === 2) {
+ if (func_num_args() === 2) {
$this->slots[$this->currentComponent()][$name] = $content;
} else {
if (ob_sta... | false |
Other | laravel | framework | f912d7ba43af6f494603898ef15fca3d5b9d56e6.json | Fix typo in the observer stub | src/Illuminate/Foundation/Console/stubs/observer.stub | @@ -7,7 +7,7 @@ use NamespacedDummyModel;
class DummyClass
{
/**
- * Handle to the DocDummyModel "created" event.
+ * Handle the DocDummyModel "created" event.
*
* @param \NamespacedDummyModel $dummyModel
* @return void | false |
Other | laravel | framework | cab365a85a0fa3e4f7113390de4a5b31f64748e2.json | Fix $withCount binding problems | src/Illuminate/Database/Eloquent/Builder.php | @@ -219,9 +219,7 @@ public function whereKeyNot($id)
public function where($column, $operator = null, $value = null, $boolean = 'and')
{
if ($column instanceof Closure) {
- $query = $this->model->newQueryWithoutScopes();
-
- $column($query);
+ $column($query = $this->... | true |
Other | laravel | framework | cab365a85a0fa3e4f7113390de4a5b31f64748e2.json | Fix $withCount binding problems | src/Illuminate/Database/Eloquent/Model.php | @@ -526,7 +526,7 @@ public function push()
*/
public function save(array $options = [])
{
- $query = $this->newQueryWithoutScopes();
+ $query = $this->newModelQuery();
// If the "saving" event returns false we'll bail out of the save and return
// false, indicating that... | true |
Other | laravel | framework | cab365a85a0fa3e4f7113390de4a5b31f64748e2.json | Fix $withCount binding problems | src/Illuminate/Database/Eloquent/SoftDeletes.php | @@ -47,7 +47,7 @@ protected function performDeleteOnModel()
if ($this->forceDeleting) {
$this->exists = false;
- return $this->newQueryWithoutScopes()->where($this->getKeyName(), $this->getKey())->forceDelete();
+ return $this->newModelQuery()->where($this->getKeyName(), $t... | true |
Other | laravel | framework | cab365a85a0fa3e4f7113390de4a5b31f64748e2.json | Fix $withCount binding problems | tests/Database/DatabaseEloquentBuilderTest.php | @@ -575,7 +575,7 @@ public function testNestedWhere()
$nestedRawQuery = $this->getMockQueryBuilder();
$nestedQuery->shouldReceive('getQuery')->once()->andReturn($nestedRawQuery);
$model = $this->getMockModel()->makePartial();
- $model->shouldReceive('newQueryWithoutScopes')->once()->an... | true |
Other | laravel | framework | cab365a85a0fa3e4f7113390de4a5b31f64748e2.json | Fix $withCount binding problems | tests/Database/DatabaseEloquentModelTest.php | @@ -227,11 +227,11 @@ public function testWithMethodCallsQueryBuilderCorrectlyWithArray()
public function testUpdateProcess()
{
- $model = $this->getMockBuilder('Illuminate\Tests\Database\EloquentModelStub')->setMethods(['newQueryWithoutScopes', 'updateTimestamps'])->getMock();
+ $model = $thi... | true |
Other | laravel | framework | cab365a85a0fa3e4f7113390de4a5b31f64748e2.json | Fix $withCount binding problems | tests/Database/DatabaseSoftDeletingTraitTest.php | @@ -17,7 +17,7 @@ public function testDeleteSetsSoftDeletedColumn()
$model = m::mock('Illuminate\Tests\Database\DatabaseSoftDeletingTraitStub');
$model->shouldDeferMissing();
// $model->shouldReceive('newQuery')->andReturn($query = m::mock('stdClass'));
- $model->shouldReceive('newQuer... | true |
Other | laravel | framework | a451a2bacc2518fa0d54b780e4324bb3be560aad.json | Add JPEG support to FileFactory::image() | src/Illuminate/Http/Testing/FileFactory.php | @@ -2,6 +2,8 @@
namespace Illuminate\Http\Testing;
+use Illuminate\Support\Str;
+
class FileFactory
{
/**
@@ -28,7 +30,9 @@ public function create($name, $kilobytes = 0)
*/
public function image($name, $width = 10, $height = 10)
{
- return new File($name, $this->generateImage($width, ... | true |
Other | laravel | framework | a451a2bacc2518fa0d54b780e4324bb3be560aad.json | Add JPEG support to FileFactory::image() | tests/Http/HttpTestingFileFactoryTest.php | @@ -0,0 +1,31 @@
+<?php
+
+namespace Illuminate\Tests\Http;
+
+use PHPUnit\Framework\TestCase;
+use Illuminate\Http\Testing\FileFactory;
+
+class HttpTestingFileFactoryTest extends TestCase
+{
+ public function testImagePng()
+ {
+ $image = (new FileFactory)->image('test.png', 15, 20);
+
+ $info = g... | true |
Other | laravel | framework | 4a9ccc9943e016e324b1df5e74dd244cd8cd5420.json | add unit tests to illustrate JSON assertion issues | tests/Foundation/FoundationTestResponseTest.php | @@ -174,6 +174,16 @@ public function testAssertJsonFragment()
$response->assertJsonFragment(['foobar' => ['foobar_foo' => 'foo', 'foobar_bar' => 'bar']]);
$response->assertJsonFragment(['foo' => 'bar 0', 'bar' => ['foo' => 'bar 0', 'bar' => 'foo 0']]);
+
+ $response = TestResponse::fromBaseRe... | false |
Other | laravel | framework | 89fc8607d0b58dabdcb198452393b898af77bbe8.json | add methods to policy stub | src/Illuminate/Foundation/Console/stubs/policy.stub | @@ -56,4 +56,28 @@ class DummyClass
{
//
}
+
+ /**
+ * Determine whether the user can restore the DocDummyModel.
+ *
+ * @param \NamespacedDummyUserModel $user
+ * @param \NamespacedDummyModel $dummyModel
+ * @return mixed
+ */
+ public function restore(DummyUser $us... | false |
Other | laravel | framework | a43562b6a139887b421d1d3f3fdfc110c9a8df2b.json | add joiningTableSegment to Model | src/Illuminate/Database/Eloquent/Concerns/HasRelationships.php | @@ -425,7 +425,7 @@ public function belongsToMany($related, $table = null, $foreignPivotKey = null,
// models using underscores in alphabetical order. The two model names
// are transformed to snake case from their default CamelCase also.
if (is_null($table)) {
- $table = $this->jo... | false |
Other | laravel | framework | 2ae5872a24a71094521c06b4f682e053f9ec8fe6.json | use local configuration options | src/Illuminate/Broadcasting/BroadcastManager.php | @@ -212,13 +212,13 @@ protected function callCustomCreator(array $config)
*/
protected function createPusherDriver(array $config)
{
- $pusher = new Pusher($config['key'], $config['secret'],
- $config['app_id'], $config['options'] ?? []);
+ $pusher = new Pusher(
+ $con... | false |
Other | laravel | framework | 8e2d32c2b6b6aff7b966abc714a391e136abb41b.json | add docblock for \BadMethodCallException (#24847) | src/Illuminate/Routing/RouteRegistrar.php | @@ -175,6 +175,8 @@ protected function compileAction($action)
* @param string $method
* @param array $parameters
* @return \Illuminate\Routing\Route|$this
+ *
+ * @throws \BadMethodCallException
*/
public function __call($method, $parameters)
{ | false |
Other | laravel | framework | b1a80f0c32e16753b5f50ec1172fdf8a8d41256e.json | add tests. extract class | src/Illuminate/Database/Console/Migrations/MigrateMakeCommand.php | @@ -84,22 +84,7 @@ public function handle()
// "create" in the name. This will allow us to provide a convenient way
// of creating migrations that create new tables for the application.
if (! $table) {
- if (preg_match('/^create_(\w+)_table$/', $name, $matches)) {
- ... | true |
Other | laravel | framework | b1a80f0c32e16753b5f50ec1172fdf8a8d41256e.json | add tests. extract class | src/Illuminate/Database/Console/Migrations/TableGuesser.php | @@ -0,0 +1,23 @@
+<?php
+
+namespace Illuminate\Database\Console\Migrations;
+
+class TableGuesser
+{
+ /**
+ * Attempt to guess the table name and "creation" status of the given migration.
+ *
+ * @param string $migration
+ * @return array
+ */
+ public static function guess($migration)
+ ... | true |
Other | laravel | framework | b1a80f0c32e16753b5f50ec1172fdf8a8d41256e.json | add tests. extract class | tests/Database/TableGuesserTest.php | @@ -0,0 +1,24 @@
+<?php
+
+namespace Illuminate\Tests\Database;
+
+use PHPUnit\Framework\TestCase;
+use Illuminate\Database\Console\Migrations\TableGuesser;
+
+class TableGuesserTest extends TestCase
+{
+ public function test_migration_is_properly_parsed()
+ {
+ [$table, $create] = TableGuesser::guess('cre... | true |
Other | laravel | framework | b343c4fd40e4c8466e205ee3347a893a0dcdb1c2.json | Remove aria-label on form tags (#24839) | src/Illuminate/Auth/Console/stubs/make/views/auth/login.stub | @@ -8,7 +8,7 @@
<div class="card-header">{{ __('Login') }}</div>
<div class="card-body">
- <form method="POST" action="{{ route('login') }}" aria-label="{{ __('Login') }}">
+ <form method="POST" action="{{ route('login') }}">
... | true |
Other | laravel | framework | b343c4fd40e4c8466e205ee3347a893a0dcdb1c2.json | Remove aria-label on form tags (#24839) | src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/email.stub | @@ -14,7 +14,7 @@
</div>
@endif
- <form method="POST" action="{{ route('password.email') }}" aria-label="{{ __('Reset Password') }}">
+ <form method="POST" action="{{ route('password.email') }}">
@csrf
... | true |
Other | laravel | framework | b343c4fd40e4c8466e205ee3347a893a0dcdb1c2.json | Remove aria-label on form tags (#24839) | src/Illuminate/Auth/Console/stubs/make/views/auth/passwords/reset.stub | @@ -8,7 +8,7 @@
<div class="card-header">{{ __('Reset Password') }}</div>
<div class="card-body">
- <form method="POST" action="{{ route('password.update') }}" aria-label="{{ __('Reset Password') }}">
+ <form method="POST" action="{{ route('passw... | true |
Other | laravel | framework | b343c4fd40e4c8466e205ee3347a893a0dcdb1c2.json | Remove aria-label on form tags (#24839) | src/Illuminate/Auth/Console/stubs/make/views/auth/register.stub | @@ -8,7 +8,7 @@
<div class="card-header">{{ __('Register') }}</div>
<div class="card-body">
- <form method="POST" action="{{ route('register') }}" aria-label="{{ __('Register') }}">
+ <form method="POST" action="{{ route('register') }}">
... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | src/Illuminate/Database/Console/Migrations/MigrateCommand.php | @@ -65,18 +65,11 @@ public function handle()
// Next, we will check to see if a path option has been defined. If it has
// we will use the path relative to the root of this installation folder
// so that migrations may be run for any path within the applications.
- $this->migrator->run... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | src/Illuminate/Database/Console/Migrations/ResetCommand.php | @@ -64,16 +64,9 @@ public function handle()
return $this->comment('Migration table not found.');
}
- $this->migrator->reset(
+ $this->migrator->setOutput($this->output)->reset(
$this->getMigrationPaths(), $this->option('pretend')
);
-
- // Once the migr... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | src/Illuminate/Database/Console/Migrations/RollbackCommand.php | @@ -57,19 +57,12 @@ public function handle()
$this->migrator->setConnection($this->option('database'));
- $this->migrator->rollback(
+ $this->migrator->setOutput($this->output)->rollback(
$this->getMigrationPaths(), [
'pretend' => $this->option('pretend'),
... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | src/Illuminate/Database/Migrations/Migrator.php | @@ -2,6 +2,7 @@
namespace Illuminate\Database\Migrations;
+use Illuminate\Console\OutputStyle;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Support\Collection;
@@ -39,18 +40,18 @@ class Migrator
protected $connection;
/**
- * The notes for the current operation.
+ *... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | tests/Database/DatabaseMigrationMigrateCommandTest.php | @@ -22,6 +22,7 @@ public function testBasicMigrationsCallMigratorWithProperArguments()
$command->setLaravel($app);
$migrator->shouldReceive('paths')->once()->andReturn([]);
$migrator->shouldReceive('setConnection')->once()->with(null);
+ $migrator->shouldReceive('setOutput')->once()->a... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | tests/Database/DatabaseMigrationResetCommandTest.php | @@ -23,8 +23,8 @@ public function testResetCommandCallsMigratorWithProperArguments()
$migrator->shouldReceive('paths')->once()->andReturn([]);
$migrator->shouldReceive('setConnection')->once()->with(null);
$migrator->shouldReceive('repositoryExists')->once()->andReturn(true);
+ $migrat... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | tests/Database/DatabaseMigrationRollbackCommandTest.php | @@ -22,8 +22,8 @@ public function testRollbackCommandCallsMigratorWithProperArguments()
$command->setLaravel($app);
$migrator->shouldReceive('paths')->once()->andReturn([]);
$migrator->shouldReceive('setConnection')->once()->with(null);
+ $migrator->shouldReceive('setOutput')->once()->... | true |
Other | laravel | framework | 18dc89b3434367946d7e62e5d684dbbae49d0431.json | Display messages during running migrator | tests/Database/DatabaseMigratorIntegrationTest.php | @@ -3,6 +3,7 @@
namespace Illuminate\Tests\Database;
use Illuminate\Support\Str;
+use Mockery;
use PHPUnit\Framework\TestCase;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Database\Migrations\Migrator;
@@ -39,6 +40,11 @@ public function setUp()
new Filesystem
);
+ $output =... | true |
Other | laravel | framework | 9a912d6f7da4d15144d73afc9213a5ef0f8db3e2.json | add merge method | src/Illuminate/Http/Resources/ConditionallyLoadsAttributes.php | @@ -28,7 +28,7 @@ protected function filter($data)
}
if (is_numeric($key) && $value instanceof MergeValue) {
- return $this->merge($data, $index, $this->filter($value->data), $numericKeys);
+ return $this->mergeData($data, $index, $this->filter($value->data), $n... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.