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
b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json
Use expectedException annotations in the tests
tests/Http/HttpResponseTest.php
@@ -134,9 +134,11 @@ public function testMagicCall() $response->withFoo('bar'); } + /** + * @expectedException BadMethodCallException + */ public function testMagicCallException() { - $this->setExpectedException('BadMethodCallException'); $response = new RedirectResp...
true
Other
laravel
framework
b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json
Use expectedException annotations in the tests
tests/Session/SessionStoreTest.php
@@ -28,9 +28,11 @@ public function testSessionIsLoadedFromHandler() $this->assertTrue($session->has('baz')); } + /** + * @expectedException InvalidArgumentException + */ public function testSessionGetBagException() { - $this->setExpectedException('InvalidArgumentException'); ...
true
Other
laravel
framework
b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json
Use expectedException annotations in the tests
tests/View/ViewEngineResolverTest.php
@@ -11,9 +11,11 @@ public function testResolversMayBeResolved() $this->assertEquals(spl_object_hash($result), spl_object_hash($resolver->resolve('foo'))); } + /** + * @expectedException InvalidArgumentException + */ public function testResolverThrowsExceptionOnUnknownEngine() { - ...
true
Other
laravel
framework
b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json
Use expectedException annotations in the tests
tests/View/ViewFactoryTest.php
@@ -373,17 +373,23 @@ public function testMakeWithAlias() $this->assertEquals('real', $view->getName()); } + /** + * @expectedException InvalidArgumentException + */ public function testExceptionIsThrownForUnknownExtension() { - $this->setExpectedException('InvalidArgumentExc...
true
Other
laravel
framework
b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json
Use expectedException annotations in the tests
tests/View/ViewTest.php
@@ -148,9 +148,11 @@ public function testViewMagicMethods() $this->assertFalse($view->offsetExists('foo')); } + /** + * @expectedException BadMethodCallException + */ public function testViewBadMethod() { - $this->setExpectedException('BadMethodCallException'); $view...
true
Other
laravel
framework
073ac37b33dec850627363a6ab950ac9f2fd6474.json
Let a collection a macroable
src/Illuminate/Support/Collection.php
@@ -9,11 +9,14 @@ use JsonSerializable; use IteratorAggregate; use InvalidArgumentException; +use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate, Jsonable...
true
Other
laravel
framework
073ac37b33dec850627363a6ab950ac9f2fd6474.json
Let a collection a macroable
tests/Support/SupportCollectionTest.php
@@ -487,6 +487,22 @@ public function testTakeLast() $this->assertEquals(['dayle', 'shawn'], $data->all()); } + public function testMacroable() + { + // Foo() macro : unique values starting with A + Collection::macro('foo', function () { + return $this->filter(function ($it...
true
Other
laravel
framework
44c11585f127764278f979fa04307b805df58792.json
Use namespace imports
tests/Routing/RoutingUrlGeneratorTest.php
@@ -1,15 +1,18 @@ <?php +use Illuminate\Http\Request; +use Illuminate\Routing\Route; use Illuminate\Routing\UrlGenerator; +use Illuminate\Routing\RouteCollection; use Illuminate\Contracts\Routing\UrlRoutable; class RoutingUrlGeneratorTest extends PHPUnit_Framework_TestCase { public function testBasicGener...
false
Other
laravel
framework
8c211754a6d6d00dbaa5f46e3ae70378c02e6025.json
Update method documentation Same as https://github.com/laravel/docs/pull/1922
src/Illuminate/Foundation/Testing/AssertionsTrait.php
@@ -131,7 +131,7 @@ public function assertRedirectedToAction($name, $parameters = [], $with = []) } /** - * Assert that the session has a given list of values. + * Assert that the session has a given value. * * @param string|array $key * @param mixed $value
false
Other
laravel
framework
98271e29dc7ef6ea808c2b5786204b93b20aa7bd.json
fix doc block
src/Illuminate/Foundation/Auth/ResetsPasswords.php
@@ -118,7 +118,7 @@ protected function resetPassword($user, $password) } /** - * Get the post register / login redirect path. + * Get the post password reset redirect path. * * @return string */
false
Other
laravel
framework
9ddc23401389dc5f316591114540f607176491c7.json
Fix return type
src/Illuminate/Console/Command.php
@@ -290,7 +290,7 @@ public function secret($question, $fallback = true) * @param string $default * @param mixed $attempts * @param bool $multiple - * @return bool + * @return string */ public function choice($question, array $choices, $default = null, $attempts = null, $mul...
false
Other
laravel
framework
4b853b668833941282dd133d1741aa479eb6840e.json
Update vlucas/phpdotenv to ~2.0
composer.json
@@ -38,7 +38,7 @@ "symfony/routing": "2.8.*|3.0.*", "symfony/translation": "2.8.*|3.0.*", "symfony/var-dumper": "2.8.*|3.0.*", - "vlucas/phpdotenv": "~1.0" + "vlucas/phpdotenv": "~2.0" }, "replace": { "illuminate/auth": "self.version",
true
Other
laravel
framework
4b853b668833941282dd133d1741aa479eb6840e.json
Update vlucas/phpdotenv to ~2.0
src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php
@@ -2,7 +2,7 @@ namespace Illuminate\Foundation\Bootstrap; -use Dotenv; +use Dotenv\Dotenv; use InvalidArgumentException; use Illuminate\Contracts\Foundation\Application; @@ -17,7 +17,7 @@ class DetectEnvironment public function bootstrap(Application $app) { try { - Dotenv::load($...
true
Other
laravel
framework
6b8f3f96a40ad22f6ac1436eca12f13d4caa0bef.json
change mysql schema grammar to remove default 0
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
@@ -547,10 +547,6 @@ protected function typeTimestampTz(Fluent $column) return 'timestamp default CURRENT_TIMESTAMP'; } - if (! $column->nullable && $column->default === null) { - return 'timestamp default 0'; - } - return 'timestamp'; }
true
Other
laravel
framework
6b8f3f96a40ad22f6ac1436eca12f13d4caa0bef.json
change mysql schema grammar to remove default 0
tests/Database/DatabaseMySqlSchemaGrammarTest.php
@@ -575,7 +575,7 @@ public function testAddingTimeStampTz() $statements = $blueprint->toSql($this->getConnection(), $this->getGrammar()); $this->assertEquals(1, count($statements)); - $this->assertEquals('alter table `users` add `foo` timestamp default 0 not null', $statements[0]); + $...
true
Other
laravel
framework
5ad598c6b445630895743844695b0a0ada732e66.json
Add flatMap method to Collection Another common array operation from functional languages, makes it quick to map out an array of arrays and collapse them into one. Reference: http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-flat_map http://elixir-lang.org/docs/v1.0/elixir/Enum.html#flat_map/2 http://alvinalexa...
src/Illuminate/Support/Collection.php
@@ -468,6 +468,17 @@ public function map(callable $callback) return new static(array_combine($keys, $items)); } + /** + * Map a collection and flatten the result by a single level. + * + * @param callable $callback + * @return static + */ + public function flatMap(callable $c...
true
Other
laravel
framework
5ad598c6b445630895743844695b0a0ada732e66.json
Add flatMap method to Collection Another common array operation from functional languages, makes it quick to map out an array of arrays and collapse them into one. Reference: http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-flat_map http://elixir-lang.org/docs/v1.0/elixir/Enum.html#flat_map/2 http://alvinalexa...
tests/Support/SupportCollectionTest.php
@@ -595,6 +595,16 @@ public function testMap() $this->assertEquals(['first' => 'first-rolyat', 'last' => 'last-llewto'], $data->all()); } + public function testFlatMap() + { + $data = new Collection([ + ['name' => 'taylor', 'hobbies' => ['programming', 'basketball']], + ...
true
Other
laravel
framework
b40d7c6400bbc0b7c407e4675bdf58376002ddc7.json
Add CheckHttpCache middleware
src/Illuminate/Foundation/Http/Middleware/CheckHttpCache.php
@@ -0,0 +1,27 @@ +<?php + +namespace Illuminate\Foundation\Http\Middleware; + +use Closure; +use Symfony\Component\HttpFoundation\Response; + +class CheckHttpCache +{ + /** + * Handle an incoming request. + * + * @param \Illuminate\Http\Request $request + * @param \Closure $next + * @return m...
false
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
composer.json
@@ -29,15 +29,15 @@ "paragonie/random_compat": "~1.1", "psy/psysh": "0.6.*", "swiftmailer/swiftmailer": "~5.1", - "symfony/console": "3.1.*", - "symfony/debug": "3.1.*", - "symfony/finder": "3.1.*", - "symfony/http-foundation": "3.1.*", - "symfony/http-kerne...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Console/composer.json
@@ -17,7 +17,7 @@ "php": ">=5.5.9", "illuminate/contracts": "5.3.*", "illuminate/support": "5.3.*", - "symfony/console": "3.1.*", + "symfony/console": "3.0.*", "nesbot/carbon": "~1.20" }, "autoload": { @@ -33,7 +33,7 @@ "suggest": { "guzzlehttp/g...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Cookie/composer.json
@@ -17,8 +17,8 @@ "php": ">=5.5.9", "illuminate/contracts": "5.3.*", "illuminate/support": "5.3.*", - "symfony/http-kernel": "3.1.*", - "symfony/http-foundation": "3.1.*" + "symfony/http-kernel": "3.0.*", + "symfony/http-foundation": "3.0.*" }, "autoload"...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Filesystem/composer.json
@@ -17,7 +17,7 @@ "php": ">=5.5.9", "illuminate/contracts": "5.3.*", "illuminate/support": "5.3.*", - "symfony/finder": "3.1.*" + "symfony/finder": "3.0.*" }, "autoload": { "psr-4": {
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Http/composer.json
@@ -17,8 +17,8 @@ "php": ">=5.5.9", "illuminate/session": "5.3.*", "illuminate/support": "5.3.*", - "symfony/http-foundation": "3.1.*", - "symfony/http-kernel": "3.1.*" + "symfony/http-foundation": "3.0.*", + "symfony/http-kernel": "3.0.*" }, "autoload": ...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Queue/composer.json
@@ -20,7 +20,7 @@ "illuminate/container": "5.3.*", "illuminate/http": "5.3.*", "illuminate/support": "5.3.*", - "symfony/process": "3.1.*", + "symfony/process": "3.0.*", "nesbot/carbon": "~1.20" }, "autoload": {
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Routing/composer.json
@@ -21,9 +21,9 @@ "illuminate/pipeline": "5.3.*", "illuminate/session": "5.3.*", "illuminate/support": "5.3.*", - "symfony/http-foundation": "3.1.*", - "symfony/http-kernel": "3.1.*", - "symfony/routing": "3.1.*" + "symfony/http-foundation": "3.0.*", + "symf...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Session/composer.json
@@ -18,8 +18,8 @@ "illuminate/contracts": "5.3.*", "illuminate/support": "5.3.*", "nesbot/carbon": "~1.20", - "symfony/finder": "3.1.*", - "symfony/http-foundation": "3.1.*" + "symfony/finder": "3.0.*", + "symfony/http-foundation": "3.0.*" }, "autoload": ...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Support/composer.json
@@ -37,8 +37,8 @@ "illuminate/filesystem": "Required to use the composer class (5.2.*).", "jeremeamia/superclosure": "Required to be able to serialize closures (~2.0).", "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1).", - ...
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Translation/composer.json
@@ -17,7 +17,7 @@ "php": ">=5.5.9", "illuminate/filesystem": "5.3.*", "illuminate/support": "5.3.*", - "symfony/translation": "3.1.*" + "symfony/translation": "3.0.*" }, "autoload": { "psr-4": {
true
Other
laravel
framework
ec673e00d77820b4824f04beb5f106c8e19b8bd9.json
Use symfony 3.0 rather than 3.1 for now
src/Illuminate/Validation/composer.json
@@ -18,8 +18,8 @@ "illuminate/container": "5.3.*", "illuminate/contracts": "5.3.*", "illuminate/support": "5.3.*", - "symfony/http-foundation": "3.1.*", - "symfony/translation": "3.1.*" + "symfony/http-foundation": "3.0.*", + "symfony/translation": "3.0.*" }, ...
true
Other
laravel
framework
4fd6db18d1586eeb8f12424394f143e465015bbc.json
Allow column aliases in query builder pluck
src/Illuminate/Database/Query/Builder.php
@@ -1562,14 +1562,14 @@ public function lists($column, $key = null) } /** - * Strip off the table name from a column identifier. + * Strip off the table name or alias from a column identifier. * * @param string $column * @return string */ protected function stripTable(...
true
Other
laravel
framework
4fd6db18d1586eeb8f12424394f143e465015bbc.json
Allow column aliases in query builder pluck
tests/Database/DatabaseEloquentIntegrationTest.php
@@ -41,6 +41,7 @@ public function setUp() { $this->schema()->create('users', function ($table) { $table->increments('id'); + $table->string('name')->nullable(); $table->string('email')->unique(); $table->string('role')->default('standard'); $t...
true
Other
laravel
framework
c6b1dcc9664b786fcaca9baab9631801eae4ae08.json
remove pointless class
src/Illuminate/Foundation/Composer.php
@@ -1,13 +0,0 @@ -<?php - -namespace Illuminate\Foundation; - -use Illuminate\Support\Composer as NewComposer; - -/** - * @deprecated since version 5.2. Use Illuminate\Support\Composer. - */ -class Composer extends NewComposer -{ - // -}
false
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
composer.json
@@ -75,7 +75,7 @@ }, "require-dev": { "aws/aws-sdk-php": "~3.0", - "iron-io/iron_mq": "~2.0", + "iron-io/iron_mq": "~2.0|~4.0", "mockery/mockery": "~0.9.2", "pda/pheanstalk": "~3.0", "phpunit/phpunit": "~4.0", @@ -103,7 +103,7 @@ "doctrine/dbal": "Req...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Database/Console/Migrations/StatusCommand.php
@@ -3,6 +3,7 @@ namespace Illuminate\Database\Console\Migrations; use Illuminate\Database\Migrations\Migrator; +use Symfony\Component\Console\Input\InputOption; class StatusCommand extends BaseCommand { @@ -51,11 +52,19 @@ public function fire() return $this->error('No migrations found.'); ...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Database/DatabaseServiceProvider.php
@@ -50,6 +50,10 @@ public function register() $this->app->singleton('db', function ($app) { return new DatabaseManager($app, $app['db.factory']); }); + + $this->app->bind('db.connection', function ($app) { + return $app['db']->connection(); + }); } /**
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Database/Eloquent/Relations/MorphTo.php
@@ -104,6 +104,10 @@ protected function buildDictionary(Collection $models) */ public function match(array $models, Collection $results, $relation) { + foreach (array_keys($this->dictionary) as $type) { + $this->matchToMorphParents($type, $this->getResultsByType($type), $relation); + ...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Foundation/Application.php
@@ -1037,6 +1037,7 @@ public function registerCoreContainerAliases() 'cookie' => ['Illuminate\Cookie\CookieJar', 'Illuminate\Contracts\Cookie\Factory', 'Illuminate\Contracts\Cookie\QueueingFactory'], 'encrypter' => ['Illuminate\Encryption\Encrypter', 'Illuminate\Contra...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Foundation/Bootstrap/ConfigureLogging.php
@@ -28,13 +28,6 @@ public function bootstrap(Application $app) } else { $this->configureHandlers($app, $log); } - - // Next, we will bind a Closure that resolves the PSR logger implementation - // as this will grant us the ability to be interoperable with many other - ...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
@@ -76,7 +76,11 @@ public function handle($request, Closure $next) protected function shouldPassThrough($request) { foreach ($this->except as $except) { - if ($request->is(trim($except, '/'))) { + if ($except !== '/') { + $except = trim($except, '/'); + ...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Http/Request.php
@@ -595,7 +595,7 @@ public static function matchesType($actual, $type) */ public function isJson() { - return Str::contains($this->header('CONTENT_TYPE'), '/json'); + return Str::contains($this->header('CONTENT_TYPE'), ['/json', '+json']); } /**
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Queue/IronQueue.php
@@ -134,11 +134,12 @@ public function pop($queue = null) * * @param string $queue * @param string $id + * @param string $reservationId * @return void */ - public function deleteMessage($queue, $id) + public function deleteMessage($queue, $id, $reservationId) { - ...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Queue/Jobs/IronJob.php
@@ -83,7 +83,9 @@ public function delete() return; } - $this->iron->deleteMessage($this->getQueue(), $this->job->id); + $this->iron->deleteMessage( + $this->getQueue(), $this->job->id, $this->job->reservation_id + ); } /**
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Queue/composer.json
@@ -39,7 +39,7 @@ "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", "illuminate/redis": "Required to use the redis queue driver (5.2.*).", - "iron-io/iron_mq": "Required to use the iron queue driver (~2.0).", + "iron-io/iron_mq": "Required to use the ir...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
src/Illuminate/Routing/UrlGenerator.php
@@ -168,7 +168,14 @@ public function to($path, $extra = [], $secure = null) // for passing the array of parameters to this URL as a list of segments. $root = $this->getRootUrl($scheme); - return $this->trimUrl($root, $path, $tail); + if (($queryPosition = strpos($path, '?')) !== false)...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
tests/Database/DatabaseEloquentMorphToTest.php
@@ -77,7 +77,7 @@ public function testModelsAreProperlyPulledAndMatched() $two->shouldReceive('setRelation')->once()->with('relation', $resultOne); $three->shouldReceive('setRelation')->once()->with('relation', $resultTwo); - $relation->getEager(); + $relation->match([$one, $two, $thre...
true
Other
laravel
framework
4858b91f8482c8d72e13aa51146b3431ef716d37.json
require 4.0 of iron
tests/Routing/RoutingUrlGeneratorTest.php
@@ -15,6 +15,7 @@ public function testBasicGeneration() $this->assertEquals('http://www.foo.com/foo/bar', $url->to('foo/bar')); $this->assertEquals('https://www.foo.com/foo/bar', $url->to('foo/bar', [], true)); $this->assertEquals('https://www.foo.com/foo/bar/baz/boom', $url->to('foo/bar', ['...
true
Other
laravel
framework
53131ddf5285a675c8b5560d19d2faaf91882811.json
allow 4.0 of iron driver.
composer.json
@@ -75,7 +75,7 @@ }, "require-dev": { "aws/aws-sdk-php": "~3.0", - "iron-io/iron_mq": "~2.0", + "iron-io/iron_mq": "~2.0|~4.0", "mockery/mockery": "~0.9.2", "pda/pheanstalk": "~3.0", "phpunit/phpunit": "~4.0", @@ -103,7 +103,7 @@ "doctrine/dbal": "Req...
true
Other
laravel
framework
53131ddf5285a675c8b5560d19d2faaf91882811.json
allow 4.0 of iron driver.
src/Illuminate/Queue/IronQueue.php
@@ -145,11 +145,17 @@ public function pop($queue = null) * * @param string $queue * @param string $id + * @param string|null $reservation * @return void */ - public function deleteMessage($queue, $id) + public function deleteMessage($queue, $id, $reservation = null) { ...
true
Other
laravel
framework
53131ddf5285a675c8b5560d19d2faaf91882811.json
allow 4.0 of iron driver.
src/Illuminate/Queue/Jobs/IronJob.php
@@ -83,7 +83,11 @@ public function delete() return; } - $this->iron->deleteMessage($this->getQueue(), $this->job->id); + if (property_exists($this->job, 'reservation_id')) { + $this->iron->deleteMessage($this->getQueue(), $this->job->id, $this->job->reservation_id); + ...
true
Other
laravel
framework
53131ddf5285a675c8b5560d19d2faaf91882811.json
allow 4.0 of iron driver.
src/Illuminate/Queue/composer.json
@@ -39,7 +39,7 @@ "suggest": { "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", "illuminate/redis": "Required to use the redis queue driver (5.1.*).", - "iron-io/iron_mq": "Required to use the iron queue driver (~2.0).", + "iron-io/iron_mq": "Required to use the ir...
true
Other
laravel
framework
9dcf2c7e350aa23a6e833e13cbbdd714116b7e52.json
Drop unnecessary conditional in receiveJson() Both routes eventually end up at seeJson(); and since the first parameter's default is `null`, this conditional doesn't actually do anything. The one caveat is that a `null` `$data` would not `return` like one with real content, but I don't that was intentional or consequ...
src/Illuminate/Foundation/Testing/Concerns/MakesHttpRequests.php
@@ -189,11 +189,7 @@ protected function shouldReturnJson(array $data = null) */ protected function receiveJson($data = null) { - $this->seeJson(); - - if (! is_null($data)) { - return $this->seeJson($data); - } + return $this->seeJson($data); } /**
false
Other
laravel
framework
cccdad418159a856c72bec61c3ad16d754d5f35e.json
use json for mysql json now that 5.7 is out
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
@@ -451,7 +451,7 @@ protected function typeEnum(Fluent $column) */ protected function typeJson(Fluent $column) { - return 'text'; + return 'json'; } /** @@ -462,7 +462,7 @@ protected function typeJson(Fluent $column) */ protected function typeJsonb(Fluent $column) ...
false
Other
laravel
framework
8c73439ee4b7be4ed63325a56f1551022b340867.json
Remove controller inspection from routing
src/Illuminate/Routing/ControllerInspector.php
@@ -1,136 +0,0 @@ -<?php - -namespace Illuminate\Routing; - -use ReflectionClass; -use ReflectionMethod; -use Illuminate\Support\Str; - -/** - * @deprecated since version 5.1. - */ -class ControllerInspector -{ - /** - * An array of HTTP verbs. - * - * @var array - */ - protected $verbs = [ - ...
true
Other
laravel
framework
8c73439ee4b7be4ed63325a56f1551022b340867.json
Remove controller inspection from routing
src/Illuminate/Routing/Router.php
@@ -3,7 +3,6 @@ namespace Illuminate\Routing; use Closure; -use Illuminate\Support\Arr; use Illuminate\Support\Str; use Illuminate\Http\Request; use Illuminate\Http\Response; @@ -206,96 +205,6 @@ public function match($methods, $uri, $action) return $this->addRoute(array_map('strtoupper', (array) $metho...
true
Other
laravel
framework
8c73439ee4b7be4ed63325a56f1551022b340867.json
Remove controller inspection from routing
tests/Routing/RoutingRouteTest.php
@@ -711,13 +711,6 @@ public function testControllerRouting() $this->assertFalse(isset($_SERVER['route.test.controller.except.middleware'])); } - public function testControllerInspection() - { - $router = $this->getRouter(); - $router->controller('home', 'RouteTestInspectedControllerS...
true
Other
laravel
framework
98d01781bf76de817bf15b7f2fed5ba87e0e6f15.json
Drop support for class preloader 2.x
composer.json
@@ -18,7 +18,7 @@ "php": ">=5.5.9", "ext-mbstring": "*", "ext-openssl": "*", - "classpreloader/classpreloader": "~2.0|~3.0", + "classpreloader/classpreloader": "~3.0", "danielstjules/stringy": "~2.1", "doctrine/inflector": "~1.0", "jeremeamia/superclos...
true
Other
laravel
framework
98d01781bf76de817bf15b7f2fed5ba87e0e6f15.json
Drop support for class preloader 2.x
src/Illuminate/Foundation/Console/OptimizeCommand.php
@@ -2,18 +2,10 @@ namespace Illuminate\Foundation\Console; -use PhpParser\Lexer; -use PhpParser\Parser; use ClassPreloader\Factory; use Illuminate\Console\Command; -use ClassPreloader\ClassPreloader; use Illuminate\Foundation\Composer; -use ClassPreloader\Parser\DirVisitor; -use ClassPreloader\Parser\FileVisito...
true
Other
laravel
framework
9bc717d955da4943c43cbb042a707e75ebb9265f.json
Implement JsonSerializable in paginators
src/Illuminate/Pagination/LengthAwarePaginator.php
@@ -4,14 +4,15 @@ use Countable; use ArrayAccess; +use JsonSerializable; use IteratorAggregate; use Illuminate\Support\Collection; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Pagination\Presenter; use Illuminate\Contracts\Pagination\LengthAwa...
true
Other
laravel
framework
9bc717d955da4943c43cbb042a707e75ebb9265f.json
Implement JsonSerializable in paginators
src/Illuminate/Pagination/Paginator.php
@@ -4,14 +4,15 @@ use Countable; use ArrayAccess; +use JsonSerializable; use IteratorAggregate; use Illuminate\Support\Collection; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Pagination\Presenter; use Illuminate\Contracts\Pagination\Paginator...
true
Other
laravel
framework
9b06643e404d11b3e14ab9711aeef1f5f72785dd.json
Use paginators as Htmlable
src/Illuminate/Pagination/AbstractPaginator.php
@@ -4,8 +4,9 @@ use Closure; use ArrayIterator; +use Illuminate\Contracts\Support\Htmlable; -abstract class AbstractPaginator +abstract class AbstractPaginator implements Htmlable { /** * All of the items being paginated. @@ -482,6 +483,16 @@ public function __call($method, $parameters) */ ...
false
Other
laravel
framework
9cb46e6d6c4576aad6fcbc2e63a2837b2e2a4e95.json
Add database connection to DI container
src/Illuminate/Database/DatabaseServiceProvider.php
@@ -50,6 +50,10 @@ public function register() $this->app->singleton('db', function ($app) { return new DatabaseManager($app, $app['db.factory']); }); + + $this->app->bind('db.connection', function ($app) { + return $app['db']->connection(); + }); } /**
true
Other
laravel
framework
9cb46e6d6c4576aad6fcbc2e63a2837b2e2a4e95.json
Add database connection to DI container
src/Illuminate/Foundation/Application.php
@@ -1037,6 +1037,7 @@ public function registerCoreContainerAliases() 'cookie' => ['Illuminate\Cookie\CookieJar', 'Illuminate\Contracts\Cookie\Factory', 'Illuminate\Contracts\Cookie\QueueingFactory'], 'encrypter' => ['Illuminate\Encryption\Encrypter', 'Illuminate\Contra...
true
Other
laravel
framework
1fdc127aeda134b175e115142cdccd4d9d6611a4.json
Fix query strings handling
src/Illuminate/Routing/UrlGenerator.php
@@ -167,7 +167,14 @@ public function to($path, $extra = [], $secure = null) // for passing the array of parameters to this URL as a list of segments. $root = $this->getRootUrl($scheme); - return $this->trimUrl($root, $path, $tail); + if (($queryStart = strpos($path, '?')) !== false) { ...
true
Other
laravel
framework
1fdc127aeda134b175e115142cdccd4d9d6611a4.json
Fix query strings handling
tests/Routing/RoutingUrlGeneratorTest.php
@@ -15,6 +15,7 @@ public function testBasicGeneration() $this->assertEquals('http://www.foo.com/foo/bar', $url->to('foo/bar')); $this->assertEquals('https://www.foo.com/foo/bar', $url->to('foo/bar', [], true)); $this->assertEquals('https://www.foo.com/foo/bar/baz/boom', $url->to('foo/bar', ['...
true
Other
laravel
framework
a0b5cd6d6af1ed5f599a81d4005168e134b150a7.json
Add tests for only/except multiple arguments
tests/Support/SupportCollectionTest.php
@@ -417,7 +417,10 @@ public function testExcept() $data = new Collection(['first' => 'Taylor', 'last' => 'Otwell', 'email' => 'taylorotwell@gmail.com']); $this->assertEquals(['first' => 'Taylor'], $data->except(['last', 'email', 'missing'])->all()); + $this->assertEquals(['first' => 'Taylor']...
false
Other
laravel
framework
f26ac172f3a29e9feb39db4d3d5730722317b6a1.json
Add tests for collection's only and except methods
tests/Support/SupportCollectionTest.php
@@ -412,6 +412,14 @@ public function testEvery() $this->assertEquals(['d'], $data->every(4, 3)->all()); } + public function testExcept() + { + $data = new Collection(['first' => 'Taylor', 'last' => 'Otwell', 'email' => 'taylorotwell@gmail.com']); + + $this->assertEquals(['first' => '...
false
Other
laravel
framework
e3bc23b952466ceca259d028af2e3c8c0695b21c.json
Adjust docblock for Collection::pluck
src/Illuminate/Support/Collection.php
@@ -417,7 +417,7 @@ public function last(callable $callback = null, $default = null) } /** - * Get an array with the values of a given key. + * Get the values of a given key. * * @param string $value * @param string $key
false
Other
laravel
framework
706d0d6aafee7ac942000cffa55b84ff4b24f82e.json
Fix Arr::get usages
src/Illuminate/Broadcasting/BroadcastManager.php
@@ -121,7 +121,7 @@ protected function callCustomCreator(array $config) protected function createPusherDriver(array $config) { return new PusherBroadcaster( - new Pusher($config['key'], $config['secret'], $config['app_id'], array_get($config, 'options', [])) + new Pusher($config...
true
Other
laravel
framework
706d0d6aafee7ac942000cffa55b84ff4b24f82e.json
Fix Arr::get usages
src/Illuminate/Cache/CacheManager.php
@@ -200,7 +200,7 @@ protected function createRedisDriver(array $config) { $redis = $this->app['redis']; - $connection = Arr::get($config, 'connection', 'default') ?: 'default'; + $connection = Arr::get($config, 'connection', 'default'); return $this->repository(new RedisStore($r...
true
Other
laravel
framework
706d0d6aafee7ac942000cffa55b84ff4b24f82e.json
Fix Arr::get usages
src/Illuminate/Support/ViewErrorBag.php
@@ -33,7 +33,7 @@ public function hasBag($key = 'default') */ public function getBag($key) { - return Arr::get($this->bags, $key, new MessageBag); + return Arr::get($this->bags, $key) ?: new MessageBag; } /** @@ -90,7 +90,7 @@ public function __call($method, $parameters) ...
true
Other
laravel
framework
91e3510b447629dd609850779e63511941a1c25a.json
Add array_prepend helper
src/Illuminate/Support/helpers.php
@@ -243,6 +243,21 @@ function array_pluck($array, $value, $key = null) } } +if (! function_exists('array_prepend')) { + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + ...
false
Other
laravel
framework
ea0e338626973e6a48202a28311b9bb590b7b783.json
Add prepend method to Arr class
src/Illuminate/Support/Arr.php
@@ -349,6 +349,25 @@ protected static function explodePluckParameters($value, $key) return [$value, $key]; } + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + p...
true
Other
laravel
framework
ea0e338626973e6a48202a28311b9bb590b7b783.json
Add prepend method to Arr class
tests/Support/SupportArrTest.php
@@ -120,6 +120,15 @@ public function testPluckWithKeys() ], $test2); } + public function testPrepend() + { + $array = Arr::prepend(['one', 'two', 'three', 'four'], 'zero'); + $this->assertEquals(['zero', 'one', 'two', 'three', 'four'], $array); + + $array = Arr::prepend(['one'...
true
Other
laravel
framework
7cdbd874d82d201e2a100b4684ec04e707a4184d.json
Allow collection prepend with a key
src/Illuminate/Support/Collection.php
@@ -522,11 +522,16 @@ public function pop() * Push an item onto the beginning of the collection. * * @param mixed $value + * @param mixed $key * @return $this */ - public function prepend($value) + public function prepend($value, $key = null) { - array_unshift($th...
true
Other
laravel
framework
7cdbd874d82d201e2a100b4684ec04e707a4184d.json
Allow collection prepend with a key
tests/Support/SupportCollectionTest.php
@@ -767,6 +767,15 @@ public function testPaginate() $this->assertEquals([], $c->forPage(3, 2)->all()); } + public function testPrepend() + { + $c = new Collection(['one', 'two', 'three', 'four']); + $this->assertEquals(['zero', 'one', 'two', 'three', 'four'], $c->prepend('zero')->all...
true
Other
laravel
framework
d4157a41b4768d7f6600b9999bff577fb293d72b.json
add testStepMayBeSet, fix mock values
tests/Database/DatabaseMigrationMigrateCommandTest.php
@@ -18,7 +18,7 @@ public function testBasicMigrationsCallMigratorWithProperArguments() $app->useDatabasePath(__DIR__); $command->setLaravel($app); $migrator->shouldReceive('setConnection')->once()->with(null); - $migrator->shouldReceive('run')->once()->with(__DIR__.'/migrations', false...
false
Other
laravel
framework
50b6f556500c5d07416827c49e47077f08e857e3.json
Update the mocking
tests/Database/DatabaseMigrationMigrateCommandTest.php
@@ -18,7 +18,7 @@ public function testBasicMigrationsCallMigratorWithProperArguments() $app->useDatabasePath(__DIR__); $command->setLaravel($app); $migrator->shouldReceive('setConnection')->once()->with(null); - $migrator->shouldReceive('run')->once()->with(__DIR__.'/migrations', false...
false
Other
laravel
framework
8a2a2d5d9102ecab0cd4a69ffc073f09f03760e1.json
allow mocking protected methods on facades
src/Illuminate/Support/Facades/Facade.php
@@ -64,6 +64,8 @@ protected static function createFreshMockInstance($name) { static::$resolvedInstance[$name] = $mock = static::createMockByName($name); + $mock->shouldAllowMockingProtectedMethods(); + if (isset(static::$app)) { static::$app->instance($name, $mock); ...
false
Other
laravel
framework
4c46c2294f135264dce48d4d178af4a45a9bf6fb.json
restore exception catching on result
src/Illuminate/Console/Application.php
@@ -61,7 +61,11 @@ public function call($command, array $parameters = []) $this->setCatchExceptions(false); - return $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput); + $result = $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput); + + $this->setC...
false
Other
laravel
framework
3509d0b31d6c17d97b7e2e0d719c63a9c3837aa3.json
Move is_array check to internal method
src/Illuminate/Support/Collection.php
@@ -29,7 +29,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate */ public function __construct($items = []) { - $this->items = is_array($items) ? $items : $this->getArrayableItems($items); + $this->items = $this->getArrayableItems($items); } /...
false
Other
laravel
framework
bdef94e517368568a896b5a03ad87eee394adccd.json
Fix some docblocks
src/Illuminate/Database/Query/JoinClause.php
@@ -60,7 +60,7 @@ public function __construct($type, $table) * * on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id` * - * @param string $first + * @param string|\Closure $first * @param string|null $operator * @param string|null $second * @...
false
Other
laravel
framework
d6abdbfaf17ae629ebd27594e86d1a8480669e81.json
Add support for joins with nested conditions
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -169,6 +169,20 @@ protected function compileJoins(Builder $query, $joins) */ protected function compileJoinConstraint(array $clause) { + if ($clause['nested']) { + $clauses = []; + + foreach ($clause['join']->clauses as $nestedClause) { + $clauses[] = $this...
true
Other
laravel
framework
d6abdbfaf17ae629ebd27594e86d1a8480669e81.json
Add support for joins with nested conditions
src/Illuminate/Database/Query/JoinClause.php
@@ -2,6 +2,9 @@ namespace Illuminate\Database\Query; +use Closure; +use InvalidArgumentException; + class JoinClause { /** @@ -58,14 +61,24 @@ public function __construct($type, $table) * on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id` * * @param string $fi...
true
Other
laravel
framework
d6abdbfaf17ae629ebd27594e86d1a8480669e81.json
Add support for joins with nested conditions
tests/Database/DatabaseQueryBuilderTest.php
@@ -712,6 +712,31 @@ public function testJoinWhereNotIn() $this->assertEquals([48, 'baz', null], $builder->getBindings()); } + public function testJoinsWithNestedConditions() + { + $builder = $this->getBuilder(); + $builder->select('*')->from('users')->leftJoin('contacts', function (...
true
Other
laravel
framework
a4ea877d2bb6a68796b244a741594968796c1c4e.json
update laravel version
src/Illuminate/Foundation/Application.php
@@ -25,7 +25,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn * * @var string */ - const VERSION = '5.1.22 (LTS)'; + const VERSION = '5.1.23 (LTS)'; /** * The base path for the Laravel installation.
false
Other
laravel
framework
9c9f817372a644a2e233c3af543b2120fcfcf2d9.json
Import Dispatcher contract
src/Illuminate/Foundation/Bus/DispatchesJobs.php
@@ -3,6 +3,7 @@ namespace Illuminate\Foundation\Bus; use ArrayAccess; +use Illuminate\Contracts\Bus\Dispatcher; trait DispatchesJobs { @@ -14,7 +15,7 @@ trait DispatchesJobs */ protected function dispatch($job) { - return app(\Illuminate\Contracts\Bus\Dispatcher::class)->dispatch($job); +...
false
Other
laravel
framework
2c4c93175db79b37331b07e561d7e2232894b7f8.json
Remove useless foreach.
src/Illuminate/Routing/UrlGenerator.php
@@ -357,9 +357,7 @@ protected function replaceRouteParameters($path, array &$parameters) return $match[0]; } - foreach ($parameters as $key => $value) { - return array_shift($parameters); - } + return array_shift($pa...
false
Other
laravel
framework
d18451f841dc95cf919602c473e88103cfe69994.json
Remove unused refrence
src/Illuminate/Foundation/Console/RouteListCommand.php
@@ -4,7 +4,6 @@ use Illuminate\Support\Arr; use Illuminate\Support\Str; -use Illuminate\Http\Request; use Illuminate\Routing\Route; use Illuminate\Routing\Router; use Illuminate\Console\Command;
false
Other
laravel
framework
1c71e7785655e5084630fdee58ed290245a69f4c.json
allow 0 limit
src/Illuminate/Database/Query/Builder.php
@@ -1207,7 +1207,7 @@ public function limit($value) { $property = $this->unions ? 'unionLimit' : 'limit'; - if ($value > 0) { + if ($value >= 0) { $this->$property = $value; }
false
Other
laravel
framework
c24371e590879a3916be5cc4daa4aa9f646b660a.json
Add new test for implicit each.
tests/Validation/ValidationValidatorTest.php
@@ -1762,6 +1762,18 @@ public function testValidateEach() $this->assertTrue($v->passes()); } + public function testValidateImplicitEachWithAsterisks() + { + $trans = $this->getRealTranslator(); + $data = ['foo' => [5, 10, 15]]; + + $v = new Validator($trans, $data, ['foo' => '...
false
Other
laravel
framework
2bb3fae85458b0bc94554969d9e22bdf0c221152.json
add unique method to message bag.
src/Illuminate/Support/MessageBag.php
@@ -158,6 +158,17 @@ public function all($format = null) return $all; } + /** + * Get all of the unique messages for every key in the bag. + * + * @param string $format + * @return array + */ + public function unique($format = null) + { + return array_unique($this->...
false
Other
laravel
framework
5505d26ba67746c3e229a789ba5f62ebbeea1c3d.json
Support temporary tables in schema builder
src/Illuminate/Database/Schema/Blueprint.php
@@ -30,6 +30,13 @@ class Blueprint */ protected $commands = []; + /** + * Whether to make the table temporary. + * + * @var bool + */ + public $temporary = false; + /** * The storage engine that should be used for the table. * @@ -180,6 +187,16 @@ public function crea...
true
Other
laravel
framework
5505d26ba67746c3e229a789ba5f62ebbeea1c3d.json
Support temporary tables in schema builder
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
@@ -54,7 +54,11 @@ public function compileCreate(Blueprint $blueprint, Fluent $command, Connection { $columns = implode(', ', $this->getColumns($blueprint)); - $sql = 'create table '.$this->wrapTable($blueprint)." ($columns)"; + $sql = 'create'; + if ($blueprint->temporary === true)...
true
Other
laravel
framework
5505d26ba67746c3e229a789ba5f62ebbeea1c3d.json
Support temporary tables in schema builder
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
@@ -53,7 +53,13 @@ public function compileCreate(Blueprint $blueprint, Fluent $command) { $columns = implode(', ', $this->getColumns($blueprint)); - return 'create table '.$this->wrapTable($blueprint)." ($columns)"; + $sql = 'create'; + if ($blueprint->temporary === true) { + ...
true
Other
laravel
framework
5505d26ba67746c3e229a789ba5f62ebbeea1c3d.json
Support temporary tables in schema builder
src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php
@@ -54,7 +54,11 @@ public function compileCreate(Blueprint $blueprint, Fluent $command) { $columns = implode(', ', $this->getColumns($blueprint)); - $sql = 'create table '.$this->wrapTable($blueprint)." ($columns"; + $sql = 'create'; + if ($blueprint->temporary === true) { + ...
true
Other
laravel
framework
beb65db9b8f3d6f0d566f09429465d2033cff6e6.json
update maximum string length.
src/Illuminate/Session/Console/stubs/database.stub
@@ -15,7 +15,7 @@ class CreateSessionsTable extends Migration Schema::create('sessions', function (Blueprint $table) { $table->string('id')->unique(); $table->integer('user_id')->nullable(); - $table->string('ip_address', 25)->nullable(); + $table->string('ip_add...
false
Other
laravel
framework
34acd3c9a7241c10af9c7e3444bb29de3b7f2b09.json
Add user agent to 5.2 session database.
src/Illuminate/Session/Console/stubs/database.stub
@@ -16,6 +16,7 @@ class CreateSessionsTable extends Migration $table->string('id')->unique(); $table->integer('user_id')->nullable(); $table->string('ip_address', 25)->nullable(); + $table->text('user_agent')->nullable(); $table->text('payload'); ...
true
Other
laravel
framework
34acd3c9a7241c10af9c7e3444bb29de3b7f2b09.json
Add user agent to 5.2 session database.
src/Illuminate/Session/DatabaseSessionHandler.php
@@ -110,12 +110,20 @@ protected function getDefaultPayload($data) { $payload = ['payload' => base64_encode($data), 'last_activity' => time()]; - if ($this->container && $this->container->bound(Guard::class)) { - $payload['user_id'] = $this->container->make(Guard::class)->id(); + ...
true
Other
laravel
framework
ea9432aa1036c45b9af78af7ab111d2da4ca32b5.json
Add functions for encrypt / decrypt.
src/Illuminate/Foundation/helpers.php
@@ -242,6 +242,19 @@ function database_path($path = '') } } +if (! function_exists('decrypt')) { + /** + * Decrypt the given value. + * + * @param string $value + * @return string + */ + function decrypt($value) + { + return app('encrypter')->decrypt($value); + } +} + i...
false
Other
laravel
framework
19077801dbd633cab1284a5cba00fedd0dadf546.json
trim request on passthrough
src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php
@@ -62,7 +62,7 @@ public function handle($request, Closure $next) protected function shouldPassThrough($request) { foreach ($this->except as $except) { - if ($request->is($except)) { + if ($request->is(trim($except, '/'))) { return true; } ...
false