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 | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/View/Factory.php | @@ -276,7 +276,7 @@ public function exists($view)
public function getEngineFromPath($path)
{
if (! $extension = $this->getExtension($path)) {
- throw new InvalidArgumentException("Unrecognized extension in file: $path");
+ throw new InvalidArgumentException("Unrecognized extensi... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/View/FileViewFinder.php | @@ -105,7 +105,7 @@ protected function parseNamespaceSegments($name)
$segments = explode(static::HINT_PATH_DELIMITER, $name);
if (count($segments) != 2) {
- throw new InvalidArgumentException("View [$name] has an invalid name.");
+ throw new InvalidArgumentException("View [{$na... | true |
Other | laravel | framework | ba0fa733243fd9b5abac67e40c9a1f7ba2ca0391.json | unify exception formatting (#23266) | src/Illuminate/View/View.php | @@ -396,9 +396,9 @@ public function __unset($key)
public function __call($method, $parameters)
{
if (! Str::startsWith($method, 'with')) {
- $class = static::class;
-
- throw new BadMethodCallException("Method {$class}::{$method} does not exist.");
+ throw new BadMeth... | true |
Other | laravel | framework | e7fa0b047b401666a50940c722bba762176a556f.json | Apply fixes from StyleCI (#23265) | src/Illuminate/Database/Eloquent/Model.php | @@ -231,7 +231,7 @@ public function fill(array $attributes)
$this->setAttribute($key, $value);
} elseif ($totallyGuarded) {
throw new MassAssignmentException(sprintf(
- "Add [%s] to fillable property to allow mass assignment on [%s].",
+ ... | true |
Other | laravel | framework | e7fa0b047b401666a50940c722bba762176a556f.json | Apply fixes from StyleCI (#23265) | tests/Support/SupportCollectionTest.php | @@ -633,10 +633,11 @@ public function testDiffUsingWithCollection()
{
$c = new Collection(['en_GB', 'fr', 'HR']);
// demonstrate that diffKeys wont support case insensitivity
- $this->assertEquals(['en_GB', 'fr', 'HR'], $c->diff(new Collection(['en_gb' , 'hr']))->values()->toArray());
+ ... | true |
Other | laravel | framework | d435f584348f754ffe1a680e98fd30e6d1e17d61.json | Apply fixes from StyleCI (#23264) | src/Illuminate/Database/Eloquent/Model.php | @@ -231,7 +231,7 @@ public function fill(array $attributes)
$this->setAttribute($key, $value);
} elseif ($totallyGuarded) {
throw new MassAssignmentException(sprintf(
- "Add [%s] to fillable property to allow mass assignment on [%s].",
+ ... | true |
Other | laravel | framework | d435f584348f754ffe1a680e98fd30e6d1e17d61.json | Apply fixes from StyleCI (#23264) | tests/Support/SupportCollectionTest.php | @@ -633,10 +633,11 @@ public function testDiffUsingWithCollection()
{
$c = new Collection(['en_GB', 'fr', 'HR']);
// demonstrate that diffKeys wont support case insensitivity
- $this->assertEquals(['en_GB', 'fr', 'HR'], $c->diff(new Collection(['en_gb' , 'hr']))->values()->toArray());
+ ... | true |
Other | laravel | framework | 4215fd36f269f3b6d27fd453c7503cbde9806621.json | set Redis connection names | src/Illuminate/Redis/Connections/Connection.php | @@ -18,6 +18,13 @@ abstract class Connection
*/
protected $client;
+ /**
+ * The Redis connection name.
+ *
+ * @var string
+ */
+ protected $name;
+
/**
* Subscribe to a set of given channels for messages.
*
@@ -96,6 +103,27 @@ public function command($method, array ... | true |
Other | laravel | framework | 4215fd36f269f3b6d27fd453c7503cbde9806621.json | set Redis connection names | src/Illuminate/Redis/RedisManager.php | @@ -58,7 +58,10 @@ public function connection($name = null)
return $this->connections[$name];
}
- return $this->connections[$name] = $this->resolve($name);
+ $this->connections[$name] = $this->resolve($name);
+ $this->connections[$name]->setName($name);
+
+ return $th... | true |
Other | laravel | framework | d84a0e2334d0732f560b34b7cb5307a4ea4389c2.json | Add reference to model in MassAssignmentException | src/Illuminate/Database/Eloquent/Model.php | @@ -230,8 +230,9 @@ public function fill(array $attributes)
if ($this->isFillable($key)) {
$this->setAttribute($key, $value);
} elseif ($totallyGuarded) {
+ $model = get_class($this);
throw new MassAssignmentException(
- "Add ... | false |
Other | laravel | framework | b3d61d4b091e80a3802dc80cf2611e7bcae8c722.json | Add Blade::include for include aliases | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -458,6 +458,24 @@ public function directive($name, callable $handler)
$this->customDirectives[$name] = $handler;
}
+ /**
+ * Register an include alias directive.
+ *
+ * @param string $path
+ * @param string $alias
+ * @return void
+ */
+ public function include($pat... | true |
Other | laravel | framework | b3d61d4b091e80a3802dc80cf2611e7bcae8c722.json | Add Blade::include for include aliases | tests/View/Blade/BladeCustomTest.php | @@ -123,4 +123,31 @@ public function testCustomComponentsDefaultAlias()
<?php echo $__env->renderComponent(); ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
+
+ public function testCustomIncludes()
+ {
+ $this->compiler->include('app.includes.input', 'input')... | true |
Other | laravel | framework | e0cf00fd1319733666d6c9c1e24468c66f6f58c7.json | normalize actions on route:list artisan (#23148)
remove leading slash | src/Illuminate/Foundation/Console/RouteListCommand.php | @@ -110,7 +110,7 @@ protected function getRouteInformation(Route $route)
'method' => implode('|', $route->methods()),
'uri' => $route->uri(),
'name' => $route->getName(),
- 'action' => $route->getActionName(),
+ 'action' => ltrim($route->getActionName(),... | false |
Other | laravel | framework | 1026ea029ef53f982985a0d08099349af383a082.json | Apply fixes from StyleCI (#23146) | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -402,7 +402,7 @@ protected function renderHttpException(HttpException $e)
if (view()->exists($view = "errors::{$status}")) {
return response()->view($view, [
- 'exception' => $e, 'errors' => new ViewErrorBag
+ 'exception' => $e, 'errors' => new ViewErrorBag,
... | false |
Other | laravel | framework | 8dce475aac47fea67694bb5739e20746f99a0ac0.json | Add an empty error bag for HTTP exceptions | src/Illuminate/Foundation/Exceptions/Handler.php | @@ -11,6 +11,7 @@
use Illuminate\Routing\Router;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\ViewErrorBag;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Http\RedirectResponse;
use Whoops\Handler\PrettyPageHandler;
@@ -400,7 +401,7 @@ protected function ren... | false |
Other | laravel | framework | 29c7deb6562a09a120e63d81d53f3c5fa412b7f7.json | update react preset to latest version (#23134) | src/Illuminate/Foundation/Console/Presets/React.php | @@ -32,8 +32,8 @@ protected static function updatePackageArray(array $packages)
{
return [
'babel-preset-react' => '^6.23.0',
- 'react' => '^15.4.2',
- 'react-dom' => '^15.4.2',
+ 'react' => '^16.2.0',
+ 'react-dom' => '^16.2.0',
] + Arr::e... | false |
Other | laravel | framework | 38284c86642a7fe3c4e2db7622e116df9b0bb729.json | Update CacheSchedulingMutex.php (#23106) | src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php | @@ -22,7 +22,7 @@ class CacheSchedulingMutex implements SchedulingMutex
public $store;
/**
- * Create a new overlapping strategy.
+ * Create a new scheduling strategy.
*
* @param \Illuminate\Contracts\Cache\Factory $cache
* @return void | false |
Other | laravel | framework | 127a83d8d2b1f3842b685982ac531936ef3030c4.json | Apply fixes from StyleCI (#23102) | src/Illuminate/Http/Request.php | @@ -350,7 +350,7 @@ protected function getInputSource()
* @param \Illuminate\Http\Request|null $to
* @return static
*/
- public static function createFrom(Request $from, $to = null)
+ public static function createFrom(self $from, $to = null)
{
$request = $to ?: new static;
| false |
Other | laravel | framework | 04d90b85cd486b217961900ebca5be783367cb88.json | Apply fixes from StyleCI (#23101) | src/Illuminate/Http/Request.php | @@ -350,7 +350,7 @@ protected function getInputSource()
* @param \Illuminate\Http\Request|null $to
* @return static
*/
- public static function createFrom(Request $from, $to = null)
+ public static function createFrom(self $from, $to = null)
{
$request = $to ?: new static;
| false |
Other | laravel | framework | b0c2459d7e55519d1c61927ab526e489a3a52eaf.json | move clone logic | src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php | @@ -32,38 +32,9 @@ public function boot()
});
$this->app->resolving(FormRequest::class, function ($request, $app) {
- $this->initializeRequest($request, $app['request']);
+ $request = FormRequest::createFrom($app['request'], $request);
$request->setContainer($app... | true |
Other | laravel | framework | b0c2459d7e55519d1c61927ab526e489a3a52eaf.json | move clone logic | src/Illuminate/Http/Request.php | @@ -343,6 +343,39 @@ protected function getInputSource()
return $this->getRealMethod() == 'GET' ? $this->query : $this->request;
}
+ /**
+ * Create a new request instance from the given Laravel request.
+ *
+ * @param \Illuminate\Http\Request $from
+ * @param \Illuminate\Http\Reque... | true |
Other | laravel | framework | 20e29199365a11b31e35179bbfe3e83485e05a03.json | allow customization of schedule mutex cache store | src/Illuminate/Console/Scheduling/CacheEventMutex.php | @@ -2,21 +2,28 @@
namespace Illuminate\Console\Scheduling;
-use Illuminate\Contracts\Cache\Repository as Cache;
+use Illuminate\Contracts\Cache\Factory as Cache;
class CacheEventMutex implements EventMutex
{
/**
* The cache repository implementation.
*
- * @var \Illuminate\Contracts\Cache\... | true |
Other | laravel | framework | 20e29199365a11b31e35179bbfe3e83485e05a03.json | allow customization of schedule mutex cache store | src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php | @@ -3,21 +3,28 @@
namespace Illuminate\Console\Scheduling;
use DateTimeInterface;
-use Illuminate\Contracts\Cache\Repository as Cache;
+use Illuminate\Contracts\Cache\Factory as Cache;
class CacheSchedulingMutex implements SchedulingMutex
{
/**
- * The cache repository implementation.
+ * The cache... | true |
Other | laravel | framework | 20e29199365a11b31e35179bbfe3e83485e05a03.json | allow customization of schedule mutex cache store | src/Illuminate/Console/Scheduling/Schedule.php | @@ -174,4 +174,23 @@ public function events()
{
return $this->events;
}
+
+ /**
+ * Specify the cache store that should be used to store mutexes.
+ *
+ * @param string $store
+ * @return $this
+ */
+ public function useCache($store)
+ {
+ if ($this->eventMutex in... | true |
Other | laravel | framework | 20e29199365a11b31e35179bbfe3e83485e05a03.json | allow customization of schedule mutex cache store | tests/Console/ConsoleEventSchedulerTest.php | @@ -4,15 +4,18 @@
use Mockery as m;
use PHPUnit\Framework\TestCase;
+use Illuminate\Container\Container;
use Illuminate\Console\Scheduling\Schedule;
+use Illuminate\Console\Scheduling\EventMutex;
+use Illuminate\Console\Scheduling\SchedulingMutex;
class ConsoleEventSchedulerTest extends TestCase
{
public ... | true |
Other | laravel | framework | 20e29199365a11b31e35179bbfe3e83485e05a03.json | allow customization of schedule mutex cache store | tests/Console/Scheduling/CacheEventMutexTest.php | @@ -19,6 +19,11 @@ class CacheEventMutexTest extends TestCase
*/
protected $event;
+ /**
+ * @var \Illuminate\Contracts\Cache\Factory
+ */
+ protected $cacheFactory;
+
/**
* @var \Illuminate\Contracts\Cache\Repository
*/
@@ -28,8 +33,10 @@ public function setUp()
{
... | true |
Other | laravel | framework | 20e29199365a11b31e35179bbfe3e83485e05a03.json | allow customization of schedule mutex cache store | tests/Console/Scheduling/CacheSchedulingMutexTest.php | @@ -26,6 +26,11 @@ class CacheSchedulingMutexTest extends TestCase
*/
protected $time;
+ /**
+ * @var \Illuminate\Contracts\Cache\Factory
+ */
+ protected $cacheFactory;
+
/**
* @var \Illuminate\Contracts\Cache\Repository
*/
@@ -35,9 +40,11 @@ public function setUp()
{
... | true |
Other | laravel | framework | b6f7cfbc1efcc3866eef336b6cb4f9ac1b221c32.json | Remove monologConfigurator infrastructure (#23078)
This was made obsolete with the overhaul of the new logger in 5.6
and isn't applied anymore (i.e. dead code).
It was used in `\Illuminate\Log\LogServiceProvider` | src/Illuminate/Foundation/Application.php | @@ -94,13 +94,6 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*/
protected $deferredServices = [];
- /**
- * A custom callback used to configure Monolog.
- *
- * @var callable|null
- */
- protected $monologConfigurator;
-
/**
* The cust... | false |
Other | laravel | framework | 8135cf594b23206dd62ff619e91eec130d2862a1.json | remove double reference (#23060) | CHANGELOG-5.6.md | @@ -91,7 +91,7 @@
### Requests
- ⚠️ Return `false` from `expectsJson()` when requested content type isn't explicit ([#22506](https://github.com/laravel/framework/pull/22506), [3624d27](https://github.com/laravel/framework/commit/3624d2702c783d13bd23b852ce35662bee9a8fea))
-- Added `Request::getSession()` method ([e5... | false |
Other | laravel | framework | 83c2ec751d46b427ca9e53644fced4cc439564a5.json | Add Nested Joins to Query Builder
Add $nestedJoins vairable to compileJoins function
Add tests testJoinsWithNestedJoins, testJoinsWithMultipleNestedJoins, testJoinsWithNestedJoinWithAdvancedSubqueryCondition to DatabaseQueryBuilderTest | src/Illuminate/Database/Query/Grammars/Grammar.php | @@ -152,10 +152,11 @@ protected function compileFrom(Builder $query, $table)
*/
protected function compileJoins(Builder $query, $joins)
{
- return collect($joins)->map(function ($join) {
+ return collect($joins)->map(function ($join) use ($query) {
$table = $this->wrapTable($j... | true |
Other | laravel | framework | 83c2ec751d46b427ca9e53644fced4cc439564a5.json | Add Nested Joins to Query Builder
Add $nestedJoins vairable to compileJoins function
Add tests testJoinsWithNestedJoins, testJoinsWithMultipleNestedJoins, testJoinsWithNestedJoinWithAdvancedSubqueryCondition to DatabaseQueryBuilderTest | tests/Database/DatabaseQueryBuilderTest.php | @@ -1190,6 +1190,54 @@ public function testJoinsWithAdvancedSubqueryCondition()
$this->assertEquals(['1', true], $builder->getBindings());
}
+ public function testJoinsWithNestedJoins()
+ {
+ $builder = $this->getBuilder();
+ $builder->select('users.id', 'contacts.id', 'contact_types... | true |
Other | laravel | framework | cda64c05ca73c0f9421589a5bcdf4fabfe7543da.json | add more assertions | src/Illuminate/Database/Eloquent/Relations/Pivot.php | @@ -104,7 +104,7 @@ protected function setKeysForSaveQuery(Builder $query)
));
return $query->where($this->relatedKey, $this->getOriginal(
- $this->relatedKey, $this->getAttribute($this->foreignKey)
+ $this->relatedKey, $this->getAttribute($this->relatedKey)
));
}... | true |
Other | laravel | framework | cda64c05ca73c0f9421589a5bcdf4fabfe7543da.json | add more assertions | tests/Integration/Database/EloquentBelongsToManyTest.php | @@ -129,14 +129,20 @@ public function custom_pivot_class()
$post->tagsWithCustomPivot()->attach($tag->id);
- $post->tagsWithCustomAccessor()->attach($tag->id);
-
$this->assertInstanceOf(CustomPivot::class, $post->tagsWithCustomPivot[0]->pivot);
$this->assertEquals([
... | true |
Other | laravel | framework | 8a6010be76cd2fb514a8698e652e12d08be5a300.json | remove old changelogs | CHANGELOG-5.2.md | @@ -1,477 +0,0 @@
-# Release Notes
-
-## [Unreleased]
-
-### Fixed
-- Fixed deferring write connection ([#16673](https://github.com/laravel/framework/pull/16673))
-
-
-## v5.2.45 (2016-08-26)
-
-### Fixed
-- Revert changes to Eloquent `Builder` that breaks `firstOr*` methods ([#15018](https://github.com/laravel/framewo... | true |
Other | laravel | framework | 8a6010be76cd2fb514a8698e652e12d08be5a300.json | remove old changelogs | CHANGELOG-5.3.md | @@ -1,583 +0,0 @@
-# Release Notes for 5.3.x
-
-## v5.3.30 (2017-01-26)
-
-### Added
-- Added `read()` and `unread()` methods to `DatabaseNotification` ([#17243](https://github.com/laravel/framework/pull/17243))
-
-### Changed
-- Show seed output prior to running, instead of after ([#17318](https://github.com/laravel/f... | true |
Other | laravel | framework | fca53f2a895c33c2884d8c5e6ad70a76de297e9d.json | remove old changelogs | CHANGELOG-5.2.md | @@ -1,477 +0,0 @@
-# Release Notes
-
-## [Unreleased]
-
-### Fixed
-- Fixed deferring write connection ([#16673](https://github.com/laravel/framework/pull/16673))
-
-
-## v5.2.45 (2016-08-26)
-
-### Fixed
-- Revert changes to Eloquent `Builder` that breaks `firstOr*` methods ([#15018](https://github.com/laravel/framewo... | true |
Other | laravel | framework | fca53f2a895c33c2884d8c5e6ad70a76de297e9d.json | remove old changelogs | CHANGELOG-5.3.md | @@ -1,583 +0,0 @@
-# Release Notes for 5.3.x
-
-## v5.3.30 (2017-01-26)
-
-### Added
-- Added `read()` and `unread()` methods to `DatabaseNotification` ([#17243](https://github.com/laravel/framework/pull/17243))
-
-### Changed
-- Show seed output prior to running, instead of after ([#17318](https://github.com/laravel/f... | true |
Other | laravel | framework | fca53f2a895c33c2884d8c5e6ad70a76de297e9d.json | remove old changelogs | CHANGELOG-5.4.md | @@ -1,930 +0,0 @@
-# Release Notes for 5.4.x
-
-## v5.4.36 (2017-08-30)
-
-### Added
-- Added MP3 to `Testing/MimeType::$mimes` ([#20745](https://github.com/laravel/framework/pull/20745))
-
-### Changed
-- Mailables that defined a `$delay` property will honor it ([#20717](https://github.com/laravel/framework/pull/20717... | true |
Other | laravel | framework | 740cc6133277299b4bcd70f9c2913a42df1429a3.json | Allow customization of email body and attachments | src/Illuminate/Mail/Mailable.php | @@ -128,8 +128,8 @@ public function send(MailerContract $mailer)
$this->buildFrom($message)
->buildRecipients($message)
->buildSubject($message)
- ->buildAttachments($message)
- ->runCallbacks($message);
+ ->runCallbacks($m... | false |
Other | laravel | framework | aad6089702a2bbe89b6971b3feb3e202fea9f4d9.json | add extension. fix stub | src/Illuminate/Foundation/Console/stubs/resource.stub | @@ -2,9 +2,9 @@
namespace DummyNamespace;
-use Illuminate\Http\Resources\Json\Resource;
+use Illuminate\Http\Resources\Json\JsonResource;
-class DummyClass extends Resource
+class DummyClass extends JsonResource
{
/**
* Transform the resource into an array. | true |
Other | laravel | framework | aad6089702a2bbe89b6971b3feb3e202fea9f4d9.json | add extension. fix stub | src/Illuminate/Http/Resources/Json/Resource.php | @@ -0,0 +1,8 @@
+<?php
+
+namespace Illuminate\Http\Resources\Json;
+
+class Resource extends JsonResource
+{
+ //
+} | true |
Other | laravel | framework | 6a5ab45714f928484dd09aa3330d32312f2cdb61.json | Resolve incorrect doesntExist method name (#22987)
The function name was renamed from the original pull request prior to release | CHANGELOG-5.5.md | @@ -3,7 +3,7 @@
## v5.5.33 (2018-01-30)
### Added
-- Added `notExists()` method to query builder ([#22836](https://github.com/laravel/framework/pull/22836), [9d2a7ca](https://github.com/laravel/framework/commit/9d2a7ca049e71d39e453ba8c34addb657b71b237))
+- Added `doesntExist()` method to query builder ([#22836](htt... | false |
Other | laravel | framework | d14395fd92253586627890c3c510d47f12a0240d.json | use path helpers for console commands (#22971) | src/Illuminate/Foundation/Console/AppNameCommand.php | @@ -224,7 +224,7 @@ protected function setComposerNamespace()
protected function setDatabaseFactoryNamespaces()
{
$files = Finder::create()
- ->in($this->laravel->databasePath().'/factories')
+ ->in(database_path('factories'))
... | true |
Other | laravel | framework | d14395fd92253586627890c3c510d47f12a0240d.json | use path helpers for console commands (#22971) | src/Illuminate/Foundation/Console/DownCommand.php | @@ -32,7 +32,7 @@ class DownCommand extends Command
public function handle()
{
file_put_contents(
- $this->laravel->storagePath().'/framework/down',
+ storage_path('framework/down'),
json_encode($this->getDownFilePayload(), JSON_PRETTY_PRINT)
);
| true |
Other | laravel | framework | d14395fd92253586627890c3c510d47f12a0240d.json | use path helpers for console commands (#22971) | src/Illuminate/Foundation/Console/ServeCommand.php | @@ -32,7 +32,7 @@ class ServeCommand extends Command
*/
public function handle()
{
- chdir($this->laravel->publicPath());
+ chdir(public_path());
$this->line("<info>Laravel development server started:</info> <http://{$this->host()}:{$this->port()}>");
@@ -50,7 +50,7 @@ protect... | true |
Other | laravel | framework | d14395fd92253586627890c3c510d47f12a0240d.json | use path helpers for console commands (#22971) | src/Illuminate/Foundation/Console/TestMakeCommand.php | @@ -52,7 +52,7 @@ protected function getPath($name)
{
$name = Str::replaceFirst($this->rootNamespace(), '', $name);
- return $this->laravel->basePath().'/tests'.str_replace('\\', '/', $name).'.php';
+ return base_path('tests').str_replace('\\', '/', $name).'.php';
}
/** | true |
Other | laravel | framework | d14395fd92253586627890c3c510d47f12a0240d.json | use path helpers for console commands (#22971) | src/Illuminate/Foundation/Console/UpCommand.php | @@ -27,7 +27,7 @@ class UpCommand extends Command
*/
public function handle()
{
- @unlink($this->laravel->storagePath().'/framework/down');
+ @unlink(storage_path('framework/down'));
$this->info('Application is now live.');
} | true |
Other | laravel | framework | 6d8e53082c188c89f765bf016d1e4bca7802b025.json | add a method to retreive the policies | src/Illuminate/Foundation/Support/Providers/AuthServiceProvider.php | @@ -33,4 +33,14 @@ public function register()
{
//
}
+
+ /**
+ * Get the policies defined on the provider.
+ *
+ * @return array
+ */
+ public function policies()
+ {
+ return $this->policies;
+ }
} | false |
Other | laravel | framework | 4224d0d878a5dee7a7ecae2c1728a6e79c8cfce8.json | Fix typo in docblock | src/Illuminate/Routing/RouteCollection.php | @@ -183,7 +183,7 @@ public function match(Request $request)
* Determine if a route in the array matches the request.
*
* @param array $routes
- * @param \Illuminate\http\Request $request
+ * @param \Illuminate\Http\Request $request
* @param bool $includingMethod
* @return \... | false |
Other | laravel | framework | 497a90749312b0b75fc185246c94e6150a502773.json | add forceDeleted event | src/Illuminate/Database/Eloquent/Concerns/HasEvents.php | @@ -55,9 +55,9 @@ public function getObservableEvents()
{
return array_merge(
[
- 'retrieved', 'creating', 'created', 'updating',
- 'updated', 'deleting', 'deleted', 'saving',
- 'saved', 'restoring', 'restored',
+ 'retrieved', 'creat... | true |
Other | laravel | framework | 497a90749312b0b75fc185246c94e6150a502773.json | add forceDeleted event | src/Illuminate/Database/Eloquent/SoftDeletes.php | @@ -30,11 +30,13 @@ public function forceDelete()
{
$this->forceDeleting = true;
- $deleted = $this->delete();
+ return tap($this->delete(), function ($deleted) {
+ $this->forceDeleting = false;
- $this->forceDeleting = false;
-
- return $deleted;
+ if... | true |
Other | laravel | framework | 497a90749312b0b75fc185246c94e6150a502773.json | add forceDeleted event | tests/Integration/Database/EloquentDeleteTest.php | @@ -5,6 +5,7 @@
use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @group integration
@@ -40,6 +41,12 @@ public function setUp()
$table->integer('post_id');
$table->timest... | true |
Other | laravel | framework | c919402d5847830c1b2a39529cac90251f838709.json | add helper for bootstrap 3 | src/Illuminate/Pagination/AbstractPaginator.php | @@ -447,6 +447,17 @@ public static function defaultSimpleView($view)
static::$defaultSimpleView = $view;
}
+ /**
+ * Indicate that Bootstrap 3 styling should be used for generated links.
+ *
+ * @return void
+ */
+ public static function useBootstrapThree()
+ {
+ static::... | false |
Other | laravel | framework | 796ed1ed7ce5622c2ff9437d2cecf096201d7efb.json | use name variable | src/Illuminate/Log/LogManager.php | @@ -359,11 +359,11 @@ protected function formatter()
*/
protected function parseChannel(array $config)
{
- if (! isset($config['channel'])) {
+ if (! isset($config['name'])) {
return $this->app->bound('env') ? $this->app->environment() : 'production';
}
- ret... | false |
Other | laravel | framework | dbad05599b2d2059e45c480fac8817d1135d5da1.json | allow 0 block time | src/Illuminate/Queue/RedisQueue.php | @@ -40,9 +40,9 @@ class RedisQueue extends Queue implements QueueContract
/**
* The maximum number of seconds to block for a job.
*
- * @var int
+ * @var int|null
*/
- private $blockFor = 0;
+ protected $blockFor = null;
/**
* Create a new Redis queue instance.
@@ -51,1... | false |
Other | laravel | framework | 75d7e077905f7ebba7a0b957934442d680699bda.json | add order assertions and test coverage (#22915) | src/Illuminate/Foundation/Testing/TestResponse.php | @@ -253,6 +253,32 @@ public function assertSee($value)
return $this;
}
+ /**
+ * Assert that the given strings are contained in order within the response.
+ *
+ * @param array $values
+ * @return $this
+ */
+ public function assertSeeInOrder(array $values)
+ {
+ $po... | true |
Other | laravel | framework | 75d7e077905f7ebba7a0b957934442d680699bda.json | add order assertions and test coverage (#22915) | tests/Foundation/FoundationTestResponseTest.php | @@ -41,6 +41,28 @@ public function testAssertViewHas()
$response->assertViewHas('foo');
}
+ public function testAssertSeeInOrder()
+ {
+ $baseResponse = tap(new Response, function ($response) {
+ $response->setContent(\Mockery::mock(View::class, [
+ 'render' => '<u... | true |
Other | laravel | framework | 4bd2251385ba49b0886830a8e1e27833ed34c1fb.json | Improve test coverage (#22894) | tests/Support/SupportCollectionTest.php | @@ -988,6 +988,12 @@ public function testExcept()
$this->assertEquals(['first' => 'Taylor', 'email' => 'taylorotwell@gmail.com'], $data->except('last')->all());
}
+ public function testExceptSelf()
+ {
+ $data = new Collection(['first' => 'Taylor', 'last' => 'Otwell']);
+ $this->asse... | true |
Other | laravel | framework | 4bd2251385ba49b0886830a8e1e27833ed34c1fb.json | Improve test coverage (#22894) | tests/Support/SupportMessageBagTest.php | @@ -35,6 +35,16 @@ public function testMessagesAreAdded()
$this->assertEquals(['bust'], $messages['boom']);
}
+ public function testKeys()
+ {
+ $container = new MessageBag;
+ $container->setFormat(':message');
+ $container->add('foo', 'bar');
+ $container->add('foo', '... | true |
Other | laravel | framework | 4bd2251385ba49b0886830a8e1e27833ed34c1fb.json | Improve test coverage (#22894) | tests/Support/SupportViewErrorBagTest.php | @@ -0,0 +1,128 @@
+<?php
+
+namespace Illuminate\Tests\Support;
+
+use PHPUnit\Framework\TestCase;
+use Illuminate\Support\MessageBag;
+use Illuminate\Support\ViewErrorBag;
+
+class SupportViewErrorBagTest extends TestCase
+{
+ public function testHasBagTrue()
+ {
+ $viewErrorBag = new ViewErrorBag();
+ ... | true |
Other | laravel | framework | 351e3b7694a804e8d6a613288419ccabd22bc012.json | use array values | src/Illuminate/Queue/SerializesModels.php | @@ -24,9 +24,9 @@ public function __sleep()
));
}
- return array_filter(array_map(function ($p) {
+ return array_values(array_filter(array_map(function ($p) {
return $p->isStatic() ? null : $p->getName();
- }, $properties));
+ }, $properties)));
}
... | false |
Other | laravel | framework | 8fad785de66ffaa18e7d8b9e9cd7c4465e60daac.json | ignore static properties in serializes model | src/Illuminate/Queue/SerializesModels.php | @@ -24,9 +24,9 @@ public function __sleep()
));
}
- return array_map(function ($p) {
- return $p->getName();
- }, $properties);
+ return array_filter(array_map(function ($p) {
+ return $p->isStatic() ? null : $p->getName();
+ }, $properties));
... | false |
Other | laravel | framework | fc3c5984d1751975b0e2c59f4cb7a4edf0a1e6d1.json | Improve test coverage (#22886) | tests/Filesystem/FilesystemAdapterTest.php | @@ -11,6 +11,7 @@
class FilesystemAdapterTest extends TestCase
{
+ private $tempDir;
private $filesystem;
public function setUp()
@@ -99,4 +100,49 @@ public function testAppend()
$filesystemAdapter->append('file.txt', 'Moon');
$this->assertStringEqualsFile($this->tempDir.'/file.txt'... | true |
Other | laravel | framework | fc3c5984d1751975b0e2c59f4cb7a4edf0a1e6d1.json | Improve test coverage (#22886) | tests/Support/SupportCollectionTest.php | @@ -1006,6 +1006,15 @@ public function testPluckWithArrayAccessValues()
$this->assertEquals(['foo', 'bar'], $data->pluck('email')->all());
}
+ public function testHas()
+ {
+ $data = new Collection(['id' => 1, 'first' => 'Hello', 'second' => 'World']);
+ $this->assertTrue($data->has(... | true |
Other | laravel | framework | 4ab34a2b39d47053816c757c331b8100764cdbd8.json | Add tests to FilesystemAdapter (#22875) | tests/Filesystem/FilesystemAdapterTest.php | @@ -7,20 +7,22 @@
use League\Flysystem\Adapter\Local;
use Illuminate\Filesystem\FilesystemAdapter;
use Symfony\Component\HttpFoundation\StreamedResponse;
+use Illuminate\Contracts\Filesystem\FileNotFoundException;
class FilesystemAdapterTest extends TestCase
{
private $filesystem;
public function set... | false |
Other | laravel | framework | c3eb81c341d5be7df1df22acd03e5ba748c07044.json | Add some Filesystem tests (#22874) | tests/Filesystem/FilesystemTest.php | @@ -2,6 +2,7 @@
namespace Illuminate\Tests\Filesystem;
+use Mockery as m;
use PHPUnit\Framework\TestCase;
use League\Flysystem\Adapter\Ftp;
use Illuminate\Filesystem\Filesystem;
@@ -20,6 +21,8 @@ public function setUp()
public function tearDown()
{
+ m::close();
+
$files = new Filesy... | false |
Other | laravel | framework | 8f259fcc6027760c0554ca444fbf07455da9d299.json | Fix json docblocks in Request (#22860) | src/Illuminate/Http/Request.php | @@ -22,7 +22,7 @@ class Request extends SymfonyRequest implements Arrayable, ArrayAccess
/**
* The decoded JSON content for the request.
*
- * @var string
+ * @var \Symfony\Component\HttpFoundation\ParameterBag|null
*/
protected $json;
@@ -314,7 +314,7 @@ public function replace(ar... | false |
Other | laravel | framework | 12d789de8472dbbd763cb680e896b3d419f954c0.json | use bootstrap 4 by default | src/Illuminate/Pagination/AbstractPaginator.php | @@ -87,14 +87,14 @@ abstract class AbstractPaginator implements Htmlable
*
* @var string
*/
- public static $defaultView = 'pagination::default';
+ public static $defaultView = 'pagination::bootstrap-4';
/**
* The default "simple" pagination view.
*
* @var string
*... | false |
Other | laravel | framework | 25559cdc14066566658d6c9a7efd8a0e1d0ffccd.json | update bootstrap version | src/Illuminate/Foundation/Console/Presets/Bootstrap.php | @@ -25,7 +25,7 @@ public static function install()
protected static function updatePackageArray(array $packages)
{
return [
- 'bootstrap' => '^4.0.0-beta.3',
+ 'bootstrap' => '^4.0.0',
'jquery' => '^3.2',
'popper.js' => '^1.12',
] + $packages; | false |
Other | laravel | framework | fc3deb532e558abdcec6f6f91e43e5e743e400ad.json | Remove unused import.
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> | tests/Integration/Database/MigrateWithRealpathTest.php | @@ -2,9 +2,7 @@
namespace Illuminate\Tests\Integration\Database;
-use Orchestra\Testbench\TestCase;
use Illuminate\Support\Facades\Schema;
-use Illuminate\Contracts\Console\Kernel as ConsoleKernel;
class MigrateWithRealpathTest extends DatabaseTestCase
{ | false |
Other | laravel | framework | e2aa73ade2a09bca807cb0be4bcd0acfbd58216d.json | Add fixed section (#22848) | CHANGELOG-5.5.md | @@ -2,6 +2,7 @@
## v5.5.32 (2018-01-18)
+### Fixed
- Reverted `Collection::get()` changes [#22554](https://github.com/laravel/framework/pull/22554) ([6197e56](https://github.com/laravel/framework/commit/6197e563fab8511ce8bf9a006444fee26f015d3a), [af36f26](https://github.com/laravel/framework/commit/af36f26dad805a... | false |
Other | laravel | framework | 9d2a7ca049e71d39e453ba8c34addb657b71b237.json | fix broken case. add test | src/Illuminate/Database/Eloquent/Builder.php | @@ -68,7 +68,7 @@ class Builder
*/
protected $passthru = [
'insert', 'insertGetId', 'getBindings', 'toSql',
- 'exists', 'count', 'min', 'max', 'avg', 'sum', 'getConnection',
+ 'exists', 'doesntExist', 'count', 'min', 'max', 'avg', 'sum', 'getConnection',
];
/** | true |
Other | laravel | framework | 9d2a7ca049e71d39e453ba8c34addb657b71b237.json | fix broken case. add test | src/Illuminate/Database/Query/Builder.php | @@ -1951,7 +1951,7 @@ public function exists()
*
* @return bool
*/
- public function notExists()
+ public function doesntExist()
{
return ! $this->exists();
} | true |
Other | laravel | framework | 9d2a7ca049e71d39e453ba8c34addb657b71b237.json | fix broken case. add test | tests/Database/DatabaseEloquentIntegrationTest.php | @@ -138,6 +138,9 @@ public function testBasicModelRetrieval()
$this->assertEquals(2, EloquentTestUser::count());
+ $this->assertFalse(EloquentTestUser::where('email', 'taylorotwell@gmail.com')->doesntExist());
+ $this->assertTrue(EloquentTestUser::where('email', 'mohamed@laravel.com')->doesnt... | true |
Other | laravel | framework | 9d2a7ca049e71d39e453ba8c34addb657b71b237.json | fix broken case. add test | tests/Database/DatabaseQueryBuilderTest.php | @@ -1269,7 +1269,7 @@ public function testAggregateFunctions()
$builder = $this->getBuilder();
$builder->getConnection()->shouldReceive('select')->once()->with('select exists(select * from "users") as "exists"', [], true)->andReturn([['exists' => 0]]);
- $results = $builder->from('users')->no... | true |
Other | laravel | framework | 03f870cb0b0eefde363b8985843aba68446a407c.json | add stack method | src/Illuminate/Log/LogManager.php | @@ -65,6 +65,21 @@ public function __construct($app)
$this->app = $app;
}
+ /**
+ * Create a new, on-demand aggregate logger instance.
+ *
+ * @param array $channels
+ * @param string|null $channel
+ * @return \Psr\Log\LoggerInterface
+ */
+ public function stack(array ... | false |
Other | laravel | framework | 434a82cfecb82453ebccd1f0160b56dd704a6c4c.json | Remove wrong reference in changelog (#22838) | CHANGELOG-5.5.md | @@ -3,7 +3,7 @@
## v5.5.31 (2018-01-16)
### Fixed
-- Reverted [#22804](https://github.com/laravel/framework/pull/22804) ([d8a8368](https://github.com/laravel/framework/commit/d8a8368e15e73de50b91b903f6b933c7d05b0e28), [f34926c](https://github.com/laravel/framework/commit/f34926c52ba282ff67f4be3e9afc8d0ddc885c3f), [... | false |
Other | laravel | framework | af4eebebc748f3f7e969d64b3e5342a16f0b6eaf.json | Add "notExists" method to query builder | src/Illuminate/Database/Query/Builder.php | @@ -1946,6 +1946,16 @@ public function exists()
return false;
}
+ /**
+ * Determine if no rows exist for the current query.
+ *
+ * @return bool
+ */
+ public function notExists()
+ {
+ return ! $this->exists();
+ }
+
/**
* Retrieve the "count" result of the... | true |
Other | laravel | framework | af4eebebc748f3f7e969d64b3e5342a16f0b6eaf.json | Add "notExists" method to query builder | tests/Database/DatabaseQueryBuilderTest.php | @@ -1267,6 +1267,11 @@ public function testAggregateFunctions()
$results = $builder->from('users')->exists();
$this->assertTrue($results);
+ $builder = $this->getBuilder();
+ $builder->getConnection()->shouldReceive('select')->once()->with('select exists(select * from "users") as "exis... | true |
Other | laravel | framework | 7ba0c22133da7ca99d1ec1459630de01f95130c1.json | support aggregate drivers | src/Illuminate/Log/LogManager.php | @@ -96,8 +96,8 @@ public function driver($driver = null)
protected function get($name)
{
try {
- return $this->stores[$name] ?? with($this->resolve($name), function ($monolog) use ($name) {
- return $this->tap($name, new Logger($monolog, $this->app['events']));
+ ... | false |
Other | laravel | framework | e09149aaeb5d58b1fabde3a932578479f7ba86fe.json | Apply fixes from StyleCI (#22818) | tests/Integration/Foundation/Testing/Concerns/InteractsWithAuthenticationTest.php | @@ -7,7 +7,6 @@
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Schema;
-use Illuminate\Auth\EloquentUserProvider;
use Illuminate\Foundation\Auth\User as Authenticatable;
class InteractsWithAuthenticationTest extends TestCase | false |
Other | laravel | framework | 80ef2d0ea836b15c7a45e611d17e9bc24d4bd235.json | Add actingAs() tests. (#22817)
* Add actingAs() tests.
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
* Add test for session auth as well.
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com> | tests/Integration/Foundation/Testing/Concerns/InteractsWithAuthenticationTest.php | @@ -0,0 +1,101 @@
+<?php
+
+namespace Illuminate\Tests\Integration\Foundation\Testing\Concerns;
+
+use Illuminate\Http\Request;
+use Orchestra\Testbench\TestCase;
+use Illuminate\Support\Facades\Auth;
+use Illuminate\Support\Facades\Route;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Auth\EloquentUserProvide... | false |
Other | laravel | framework | 81e1c3f727c5b27d2fb19dd7a02adfe7faac77d8.json | Update MorphToMany.php (#22801) | src/Illuminate/Database/Eloquent/Relations/MorphToMany.php | @@ -149,7 +149,7 @@ public function newPivot(array $attributes = [], $exists = false)
/**
* Get the pivot columns for the relation.
*
- * "pivot_" is prefixed ot each column for easy removal later.
+ * "pivot_" is prefixed at each column for easy removal later.
*
* @return array
... | false |
Other | laravel | framework | 4ab37bb224d7edb21acdf22dcba6ce5272bbfc14.json | Add Blade::component method for component aliases | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -424,6 +424,30 @@ public function check($name, ...$parameters)
return call_user_func($this->conditions[$name], ...$parameters);
}
+ /**
+ * Register a component alias.
+ *
+ * @param string $path
+ * @param string $alias
+ * @return void
+ */
+ public function compon... | true |
Other | laravel | framework | 4ab37bb224d7edb21acdf22dcba6ce5272bbfc14.json | Add Blade::component method for component aliases | tests/View/Blade/BladeCustomTest.php | @@ -90,4 +90,37 @@ public function testCustomIfElseConditions()
<?php endif; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
+
+ public function testCustomComponents()
+ {
+ $this->compiler->component('app.components.alert', 'alert');
+
+ $string = '@al... | true |
Other | laravel | framework | b52d3143c6b4b5eacbb21a5c83873fd1d43289e9.json | Fix pivot serialization (#22786)
Currently, passing a custom pivot model to a queued job will cause errors when pulling the job back off the queue. This correct the storage of pivot model and morphed pivot model queueable IDs and also adjusts the restoration queries to use the new format. | src/Illuminate/Database/Eloquent/Collection.php | @@ -4,6 +4,7 @@
use LogicException;
use Illuminate\Support\Arr;
+use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Contracts\Queue\QueueableCollection;
use Illuminate\Support\Collection as BaseCollection;
@@ -407,7 +408,13 @@ public function getQueueableClass()
*/
public function getQu... | true |
Other | laravel | framework | b52d3143c6b4b5eacbb21a5c83873fd1d43289e9.json | Fix pivot serialization (#22786)
Currently, passing a custom pivot model to a queued job will cause errors when pulling the job back off the queue. This correct the storage of pivot model and morphed pivot model queueable IDs and also adjusts the restoration queries to use the new format. | src/Illuminate/Database/Eloquent/Relations/MorphPivot.php | @@ -2,6 +2,7 @@
namespace Illuminate\Database\Eloquent\Relations;
+use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Builder;
class MorphPivot extends Pivot
@@ -76,4 +77,74 @@ public function setMorphClass($morphClass)
return $this;
}
+
+ /**
+ * Get the queueable identity for... | true |
Other | laravel | framework | b52d3143c6b4b5eacbb21a5c83873fd1d43289e9.json | Fix pivot serialization (#22786)
Currently, passing a custom pivot model to a queued job will cause errors when pulling the job back off the queue. This correct the storage of pivot model and morphed pivot model queueable IDs and also adjusts the restoration queries to use the new format. | src/Illuminate/Database/Eloquent/Relations/MorphToMany.php | @@ -146,6 +146,22 @@ public function newPivot(array $attributes = [], $exists = false)
return $pivot;
}
+ /**
+ * Get the pivot columns for the relation.
+ *
+ * "pivot_" is prefixed ot each column for easy removal later.
+ *
+ * @return array
+ */
+ protected function alia... | true |
Other | laravel | framework | b52d3143c6b4b5eacbb21a5c83873fd1d43289e9.json | Fix pivot serialization (#22786)
Currently, passing a custom pivot model to a queued job will cause errors when pulling the job back off the queue. This correct the storage of pivot model and morphed pivot model queueable IDs and also adjusts the restoration queries to use the new format. | src/Illuminate/Database/Eloquent/Relations/Pivot.php | @@ -222,4 +222,71 @@ public function getUpdatedAtColumn()
{
return $this->pivotParent->getUpdatedAtColumn();
}
+
+ /**
+ * Get the queueable identity for the entity.
+ *
+ * @return mixed
+ */
+ public function getQueueableId()
+ {
+ if (isset($this->attributes[$this->... | true |
Other | laravel | framework | b52d3143c6b4b5eacbb21a5c83873fd1d43289e9.json | Fix pivot serialization (#22786)
Currently, passing a custom pivot model to a queued job will cause errors when pulling the job back off the queue. This correct the storage of pivot model and morphed pivot model queueable IDs and also adjusts the restoration queries to use the new format. | tests/Integration/Database/EloquentPivotSerializationTest.php | @@ -0,0 +1,194 @@
+<?php
+
+namespace Illuminate\Tests\Integration\Database;
+
+use Illuminate\Queue\SerializesModels;
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Eloquent\Model;
+use Illuminate\Database\Eloquent\Relations\Pivot;
+use Illuminate\Database\Eloquent\Relations\MorphPivot;
+use Illumina... | true |
Other | laravel | framework | 468cb1b18c8b5160f0c7fc2c9587ececda3a0b18.json | Use Bootstrap 4 in the preset (#22754) | src/Illuminate/Foundation/Console/Presets/Bootstrap.php | @@ -25,8 +25,9 @@ public static function install()
protected static function updatePackageArray(array $packages)
{
return [
- 'bootstrap-sass' => '^3.3.7',
- 'jquery' => '^3.1.1',
+ 'bootstrap' => '^4.0.0-beta.3',
+ 'jquery' => '^3.2',
+ 'popper.... | true |
Other | laravel | framework | 468cb1b18c8b5160f0c7fc2c9587ececda3a0b18.json | Use Bootstrap 4 in the preset (#22754) | src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/_variables.scss | @@ -2,24 +2,9 @@
// Body
$body-bg: #f5f8fa;
-// Borders
-$laravel-border-color: darken($body-bg, 10%);
-$list-group-border: $laravel-border-color;
-$navbar-default-border: $laravel-border-color;
-$panel-default-border: $laravel-border-color;
-$panel-inner-border: $laravel-border-color;
-
-// Brands
-$brand-primary:... | true |
Other | laravel | framework | 468cb1b18c8b5160f0c7fc2c9587ececda3a0b18.json | Use Bootstrap 4 in the preset (#22754) | src/Illuminate/Foundation/Console/Presets/bootstrap-stubs/app.scss | @@ -6,4 +6,9 @@
@import "variables";
// Bootstrap
-@import "~bootstrap-sass/assets/stylesheets/bootstrap";
+@import '~bootstrap/scss/bootstrap';
+
+.navbar-laravel {
+ background-color: #fff;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
+} | true |
Other | laravel | framework | 2154cc9b3ce6b269e12eca52311b988633b8323d.json | Add additional Container tests (#22716) | tests/Container/ContainerTest.php | @@ -44,6 +44,19 @@ public function testBindIfDoesntRegisterIfServiceAlreadyRegistered()
$this->assertEquals('Taylor', $container->make('name'));
}
+ public function testBindIfDoesRegisterIfServiceNotRegisteredYet()
+ {
+ $container = new Container;
+ $container->bind('surname', funct... | false |
Other | laravel | framework | d1208ecab470b80389f940d2e46c7879c82ccabb.json | Add additional tests to Config Repository (#22714) | tests/Config/RepositoryTest.php | @@ -17,7 +17,7 @@ class RepositoryTest extends TestCase
*/
protected $config;
- public function setUp()
+ protected function setUp()
{
$this->repository = new Repository($this->config = [
'foo' => 'bar',
@@ -142,4 +142,20 @@ public function testPush()
$this->reposi... | false |
Other | laravel | framework | 0466d4aadfa8268db4fc8fd97e18b36247769192.json | Add test for Carbon deserialization | tests/Support/SupportCarbonTest.php | @@ -104,4 +104,13 @@ public function testSetStateReturnsCorrectType()
$this->assertInstanceOf(Carbon::class, $carbon);
}
+
+ public function testDeserializationOccursCorrectly()
+ {
+ $carbon = new Carbon('2017-06-27 13:14:15.000000');
+ $serialized = 'return '.var_export($carbon, tr... | false |
Other | laravel | framework | b0aa3f3d0f5af0da67eaf7db7bd70ee9c030574b.json | Apply fixes from StyleCI (#22691) | src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | @@ -6,7 +6,6 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
-use Illuminate\Database\Eloquent\Relations\Pivot;
use Illuminate\Database\Eloquent\ModelNotFoundException;
class BelongsToMany extends Relation | false |
Other | laravel | framework | 4b1ad85ac70688f8e5fc606a6a400aeb3533363a.json | Add __set_state() method to Carbon | src/Illuminate/Support/Carbon.php | @@ -45,4 +45,15 @@ public static function serializeUsing($callback)
{
static::$serializer = $callback;
}
+
+ /**
+ * The __set_state handler.
+ *
+ * @param array $array
+ * @return static
+ */
+ public static function __set_state($array)
+ {
+ return static::ins... | true |
Other | laravel | framework | 4b1ad85ac70688f8e5fc606a6a400aeb3533363a.json | Add __set_state() method to Carbon | tests/Support/SupportCarbonTest.php | @@ -93,4 +93,15 @@ public function testCarbonCanSerializeToJson()
'timezone' => 'UTC',
], $this->now->jsonSerialize());
}
+
+ public function testSetStateReturnsCorrectType()
+ {
+ $carbon = Carbon::__set_state(array(
+ 'date' => '2017-06-27 13:14:15.000000',
+ ... | true |
Other | laravel | framework | 057374882af9b50c76517e63b3675c43083171a7.json | Update docblocks and simplify code (#22658) | src/Illuminate/Log/LogManager.php | @@ -68,7 +68,7 @@ public function __construct($app)
/**
* Get a log channel instance.
*
- * @param string $driver
+ * @param string|null $channel
* @return mixed
*/
public function channel($channel = null)
@@ -79,7 +79,7 @@ public function channel($channel = null)
/**
... | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.