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
1b7608c781cd7f61ee7f9fdca182909d397088d1.json
Use Dotenv exception
src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php
@@ -1,6 +1,7 @@ <?php namespace Illuminate\Foundation\Bootstrap; use Dotenv; +use InvalidArgumentException; use Illuminate\Contracts\Foundation\Application; class DetectEnvironment { @@ -13,10 +14,14 @@ class DetectEnvironment { */ public function bootstrap(Application $app) { - if (file_exists($app['pa...
false
Other
laravel
framework
432c93783b1f137b2ab30d0a12e9b37d696c9ab4.json
Add missing tests for files and dir
tests/Filesystem/FilesystemTest.php
@@ -136,4 +136,33 @@ public function testCopyDirectoryMovesEntireDirectory() rmdir(__DIR__.'/tmp2'); } + + public function testGetFiles() + { + mkdir(__DIR__.'/tmp', 0777, true); + file_put_contents(__DIR__.'/tmp/foo.txt', ''); + file_put_contents(__DIR__.'/tmp/bar.txt', ''); + mkdir(__DIR__.'/tmp/nested', 0...
false
Other
laravel
framework
0f5c01d88cde71ea16be9893d78ce35f46093ecb.json
Use array_sum instead of default callback
src/Illuminate/Support/Collection.php
@@ -623,7 +623,7 @@ public function sum($callback = null) { if (is_null($callback)) { - $callback = function($item) { return $item; }; + return array_sum($this->items); } if (is_string($callback))
false
Other
laravel
framework
7f08a725e0fdf34a7569bc62ec51220d8af9581f.json
Add route macro
src/Illuminate/Routing/Router.php
@@ -6,13 +6,16 @@ use Illuminate\Pipeline\Pipeline; use Illuminate\Support\Collection; use Illuminate\Container\Container; +use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Events\Dispatcher; use Illuminate\Contracts\Routing\Registrar as RegistrarContract; use Symfony\Component\HttpFoundation\Res...
true
Other
laravel
framework
7f08a725e0fdf34a7569bc62ec51220d8af9581f.json
Add route macro
tests/Routing/RoutingRouteTest.php
@@ -82,6 +82,19 @@ public function testBasicDispatchingOfRoutes() } + public function testMacro() + { + $router = $this->getRouter(); + $router->macro('webhook', function() use ($router) + { + $router->match(['GET', 'POST'], 'webhook', function() { return 'OK'; }); + }); + $router->webhook(); + $this->ass...
true
Other
laravel
framework
2883c1688cb0bfc7f760d31e7b08bcc5d9dcb830.json
Add multiple cookies to a response Signed-off-by: Graham Campbell <graham@mineuk.com>
src/Illuminate/Http/RedirectResponse.php
@@ -70,6 +70,22 @@ public function withCookie(Cookie $cookie) return $this; } + /** + * Add multiple cookies to the response. + * + * @param array $cookie + * @return $this + */ + public function withCookies(array $cookies) + { + foreach ($cookies as $cookie) + { + $this->headers->setCookie($cookie); ...
false
Other
laravel
framework
6d9e7a608f731dd15ba7840a3bedff7659c2bf74.json
Tweak some code formatting.
src/Illuminate/Http/RedirectResponse.php
@@ -80,11 +80,10 @@ public function withInput(array $input = null) { $input = $input ?: $this->request->input(); - $input = array_filter($input, function ($value) { + $this->session->flashInput(array_filter($input, function ($value) + { return ! $value instanceof UploadedFile; - }); - - $this->session->...
false
Other
laravel
framework
33f4a611095812ebb8a8a2fda2870caf22789e9b.json
Return instance from foundation helpers
src/Illuminate/Foundation/helpers.php
@@ -137,8 +137,10 @@ function bcrypt($value, $options = array()) * @param mixed $default * @return mixed */ - function config($key, $default = null) + function config($key = null, $default = null) { + if (is_null($key)) return app('config'); + if (is_array($key)) { return app('config')->set($key...
false
Other
laravel
framework
d6648e2f19ab4c9f8806968b077f7e36c4939730.json
Use exclusive lock on session write.
src/Illuminate/Session/FileSessionHandler.php
@@ -66,7 +66,7 @@ public function read($sessionId) */ public function write($sessionId, $data) { - $this->files->put($this->path.'/'.$sessionId, $data); + file_put_contents($this->path.'/'.$sessionId, $data, LOCK_EX); } /**
false
Other
laravel
framework
25c6a77749387b709b1ea270b76c200b68ddd706.json
Test queued handlers.
tests/Bus/BusDispatcherTest.php
@@ -39,6 +39,20 @@ public function testCommandsThatShouldBeQueuedAreQueued() } + public function testHandlersThatShouldBeQueuedAreQueued() + { + $container = new Container; + $dispatcher = new Dispatcher($container, function() { + $mock = m::mock('Illuminate\Contracts\Queue\Queue'); + $mock->shouldReceive('...
false
Other
laravel
framework
78148251944be9a3da065954baa52691f5263ed0.json
Add a comment.
src/Illuminate/Foundation/Console/Kernel.php
@@ -122,6 +122,9 @@ public function call($command, array $parameters = array()) { $this->bootstrap(); + // If we are calling a arbitary command from within the application, we will load + // all of the available deferred providers which will make all of the commands + // available to an application. Otherwise...
false
Other
laravel
framework
75e1c61c5d59ac6801b0e3676036f6cbb18ffc11.json
Remove unnecessary code. The Console Kernel loads all deferred providers so there is no need for the provider repository to worry about this.
src/Illuminate/Foundation/ProviderRepository.php
@@ -59,14 +59,6 @@ public function load(array $providers) $manifest = $this->compileManifest($providers); } - // If the application is running in the console, we will not lazy load any of - // the service providers. This is mainly because it's not as necessary for - // performance and also so any provided A...
true
Other
laravel
framework
75e1c61c5d59ac6801b0e3676036f6cbb18ffc11.json
Remove unnecessary code. The Console Kernel loads all deferred providers so there is no need for the provider repository to worry about this.
tests/Foundation/FoundationProviderRepositoryTest.php
@@ -28,24 +28,6 @@ public function testServicesAreRegisteredWhenManifestIsNotRecompiled() } - public function testServicesAreNeverLazyLoadedWhenRunningInConsole() - { - $app = m::mock('Illuminate\Foundation\Application')->makePartial(); - - $repo = m::mock('Illuminate\Foundation\ProviderRepository[createProvide...
true
Other
laravel
framework
2879d43c0fe9a8e3d78ead8e94eab343825a350e.json
Add the ability to register subscribers To use this you would simply add the class names you wish to register in the `$subscribe` property in the `App\Providers\EventServiceProvider` class. I've added the property to the class itself because I didn't want to make laravel/laravel dependent on this change. I also kept `...
src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php
@@ -12,6 +12,13 @@ class EventServiceProvider extends ServiceProvider { * @var array */ protected $scan = []; + + /** + * The subscriber classes to register. + * + * @var array + */ + protected $subscribe = []; /** * Determines if we will auto-scan in the local environment. @@ -45,6 +52,11 @@ publi...
false
Other
laravel
framework
46d7ce05617512b609dde4ca07d43f19413e5508.json
Tweak a few mapping things.
src/Illuminate/Bus/Dispatcher.php
@@ -219,14 +219,15 @@ public function mapUsing(Closure $mapper) * Map the command to a handler within a given root namespace. * * @param mixed $command - * @param string $rootNamespace + * @param string $commandNamespace + * @param string $handlerNamespace * @return string */ - public static f...
false
Other
laravel
framework
78f00c6f1a80eb69052b7be0ce21130c2d7c4042.json
Use doctrine inflector
composer.json
@@ -16,6 +16,7 @@ "classpreloader/classpreloader": "~1.0.2", "d11wtq/boris": "~1.0", "doctrine/annotations": "~1.0", + "doctrine/inflector": "~1.0", "ircmaxell/password-compat": "~1.0", "jeremeamia/superclosure": "~1.0.1", "league/flysystem": "~1.0",
true
Other
laravel
framework
78f00c6f1a80eb69052b7be0ce21130c2d7c4042.json
Use doctrine inflector
src/Illuminate/Support/Pluralizer.php
@@ -1,102 +1,8 @@ <?php namespace Illuminate\Support; -class Pluralizer { - - /** - * Plural word form rules. - * - * @var array - */ - public static $plural = array( - '/(quiz)$/i' => "$1zes", - '/^(ox)$/i' => "$1en", - '/([m|l])ouse$/i' => "$1ice", - '/(matr|vert|ind)ix$|ex$/i' => "$1ices", - '/(stoma|epo...
true
Other
laravel
framework
78f00c6f1a80eb69052b7be0ce21130c2d7c4042.json
Use doctrine inflector
src/Illuminate/Support/composer.json
@@ -11,6 +11,7 @@ "require": { "php": ">=5.4.0", "illuminate/contracts": "5.0.*", + "doctrine/inflector": "~1.0", "patchwork/utf8": "~1.1" }, "require-dev": {
true
Other
laravel
framework
78f00c6f1a80eb69052b7be0ce21130c2d7c4042.json
Use doctrine inflector
tests/Support/SupportPluralizerTest.php
@@ -2,51 +2,55 @@ class SupportPluralizerTest extends PHPUnit_Framework_TestCase { - public function testBasicUsage() + + public function testBasicSingular() { - $this->assertEquals('children', str_plural('child')); - $this->assertEquals('tests', str_plural('test')); - $this->assertEquals('deer', str_plural('...
true
Other
laravel
framework
33ff51a81dbd16f62f903568fd8aab94762f34ae.json
Fix a few bugs.
src/Illuminate/Events/CallQueuedHandler.php
@@ -32,10 +32,10 @@ public function __construct(Container $container) */ public function call(Job $job, array $data) { - $event = $this->setJobIfNecessary(unserialize($data['data'])); + $event = $this->setJobIfNecessary($job, unserialize($data['data'])); $handler = $this->setJobInstanceIfNecessary( - $t...
true
Other
laravel
framework
33ff51a81dbd16f62f903568fd8aab94762f34ae.json
Fix a few bugs.
src/Illuminate/Queue/CallQueuedHandler.php
@@ -33,11 +33,11 @@ public function __construct(Dispatcher $dispatcher) public function call(Job $job, array $data) { $command = $this->setJobInstanceIfNecessary( - unserialize($data['command']) + $job, unserialize($data['command']) ); $handler = $this->setJobInstanceIfNecessary( - $this->dispatche...
true
Other
laravel
framework
d75eab8dbe04d5d01a8539b07a9e89071e52eecd.json
Put same methods that were in L4.
src/Illuminate/Pagination/AbstractPaginator.php
@@ -365,6 +365,16 @@ public function count() return $this->items->count(); } + /** + * Get the paginator's underlying collection. + * + * @return \Illuminate\Support\Collection + */ + public function getCollection() + { + return $this->items; + } + /** * Determine if the given item exists. * @@ -410...
false
Other
laravel
framework
472a93f8710c7783af89ee93b243439e6331eb5c.json
remove extra code
src/Illuminate/Container/Container.php
@@ -135,7 +135,7 @@ public function when($concrete) */ protected function resolvable($abstract) { - return $this->bound($abstract) || $this->isAlias($abstract); + return $this->bound($abstract); } /**
false
Other
laravel
framework
b493e47579abbc8e3d64aa03d2f5b153e960f980.json
Add MacroableTrait for Filesystem
src/Illuminate/Filesystem/Filesystem.php
@@ -2,10 +2,13 @@ use FilesystemIterator; use Symfony\Component\Finder\Finder; +use Illuminate\Support\Traits\MacroableTrait; use Illuminate\Contracts\Filesystem\FileNotFoundException; class Filesystem { + use MacroableTrait; + /** * Determine if a file exists. *
true
Other
laravel
framework
b493e47579abbc8e3d64aa03d2f5b153e960f980.json
Add MacroableTrait for Filesystem
tests/Filesystem/FilesystemTest.php
@@ -74,6 +74,16 @@ public function testCleanDirectory() } + public function testMacro() + { + file_put_contents(__DIR__.'/foo.txt', 'Hello World'); + $files = new Filesystem; + $files->macro('getFoo', function () use ($files) { return $files->get(__DIR__.'/foo.txt'); }); + $this->assertEquals('Hello World', $...
true
Other
laravel
framework
b5e991d15f857ee86a4532a4249813f7c3dd779b.json
Fix docblock and typo
src/Illuminate/Database/Eloquent/Model.php
@@ -1982,7 +1982,7 @@ public function getKey() /** * Get the queueable identity for the entity. * - * @var mixed + * @return mixed */ public function getQueueableId() {
true
Other
laravel
framework
b5e991d15f857ee86a4532a4249813f7c3dd779b.json
Fix docblock and typo
src/Illuminate/Pipeline/Hub.php
@@ -61,12 +61,12 @@ public function pipeline($name, Closure $callback) * @param string|null $pipeline * @return mixed */ - public function pipe($object, $pipieline = null) + public function pipe($object, $pipeline = null) { - $pipieline = $pipieline ?: 'default'; + $pipeline = $pipeline ?: 'default'; ...
true
Other
laravel
framework
b5e991d15f857ee86a4532a4249813f7c3dd779b.json
Fix docblock and typo
src/Illuminate/Pipeline/Pipeline.php
@@ -37,7 +37,7 @@ class Pipeline implements PipelineContract { /** * Create a new class instance. * - * @param \Closure $app + * @param \Illuminate\Contracts\Container\Container $container * @return void */ public function __construct(Container $container)
true
Other
laravel
framework
ee349de4872179b0b91414776f75928b1ba573c6.json
Fix session driver in cached config.
src/Illuminate/Foundation/Console/ConfigCacheCommand.php
@@ -30,6 +30,8 @@ public function fire() $config = $this->getFreshConfiguration(); + $config = $this->setRealSessionDriver($config); + file_put_contents( $this->laravel->getCachedConfigPath(), '<?php return '.var_export($config, true).';'.PHP_EOL ); @@ -51,4 +53,21 @@ protected function getFreshConfig...
false
Other
laravel
framework
a6c638b91c250a38f42536ad7123a45a2d8a9529.json
Fix cookie sessions.
src/Illuminate/Session/Middleware/StartSession.php
@@ -5,10 +5,11 @@ use Illuminate\Session\SessionManager; use Illuminate\Session\SessionInterface; use Symfony\Component\HttpFoundation\Cookie; +use Illuminate\Session\CookieSessionHandler; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Illuminate\Contracts\Routing...
false
Other
laravel
framework
8d6bff9fc0d923201b95fe6349af4adc129a7a5a.json
Implement styled dumper based on Symfony dumper.
src/Illuminate/Support/Debug/Dumper.php
@@ -0,0 +1,20 @@ +<?php namespace Illuminate\Support\Debug; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +class Dumper { + + /** + * Var dump a value elegantly. + * + * @param mixed $value + * @return string + */ + public function ...
true
Other
laravel
framework
8d6bff9fc0d923201b95fe6349af4adc129a7a5a.json
Implement styled dumper based on Symfony dumper.
src/Illuminate/Support/Debug/HtmlDumper.php
@@ -0,0 +1,28 @@ +<?php namespace Illuminate\Support\Debug; + +use Symfony\Component\VarDumper\Dumper\HtmlDumper as SymfonyHtmlDumper; + +class HtmlDumper extends SymfonyHtmlDumper { + + /** + * Colour definitions for output. + * + * @var array + */ + protected $styles = array( + 'default' => 'background-color:#...
true
Other
laravel
framework
8d6bff9fc0d923201b95fe6349af4adc129a7a5a.json
Implement styled dumper based on Symfony dumper.
src/Illuminate/Support/helpers.php
@@ -455,7 +455,10 @@ function data_get($target, $key, $default = null) */ function dd() { - array_map(function($x) { dump($x); }, func_get_args()); die; + array_map(function($x) { + $dumper = new \Illuminate\Support\Debug\Dumper; + $dumper->dump($x); + }, func_get_args()); die; } }
true
Other
laravel
framework
432c478936ba363a09b28c6487c6b3e13c651f86.json
Add tests for Eloquent Model push method.
tests/Database/DatabaseEloquentModelTest.php
@@ -411,6 +411,127 @@ public function testDeleteProperlyDeletesModel() } + public function testPushNoRelations() + { + $model = $this->getMock('EloquentModelStub', array('newQuery', 'updateTimestamps')); + $query = m::mock('Illuminate\Database\Eloquent\Builder'); + $query->shouldReceive('insertGetId')->once()-...
false
Other
laravel
framework
00eebd513c8fa317438488080a6eb05767869a4c.json
Remove useless (array) cast
src/Illuminate/Console/AppNamespaceDetectorTrait.php
@@ -13,7 +13,7 @@ trait AppNamespaceDetectorTrait { */ protected function getAppNamespace() { - $composer = (array) json_decode(file_get_contents(base_path().'/composer.json', true)); + $composer = json_decode(file_get_contents(base_path().'/composer.json', true), true); foreach ((array) data_get($compose...
false
Other
laravel
framework
f364f9988e77b2f9b50f7d90d90636b6cf564968.json
Use var-dumper in dd.
composer.json
@@ -34,6 +34,7 @@ "symfony/routing": "2.6.*", "symfony/security-core": "2.6.*", "symfony/translation": "2.6.*", + "symfony/var-dumper": "2.6.*", "vlucas/phpdotenv": "~1.0" }, "replace": {
true
Other
laravel
framework
f364f9988e77b2f9b50f7d90d90636b6cf564968.json
Use var-dumper in dd.
src/Illuminate/Support/helpers.php
@@ -455,7 +455,7 @@ function data_get($target, $key, $default = null) */ function dd() { - array_map(function($x) { var_dump($x); }, func_get_args()); die; + array_map(function($x) { dump($x); }, func_get_args()); die; } }
true
Other
laravel
framework
60065df712ec06aefdd2b6639318af2ae99d9104.json
Add a session helper.
src/Illuminate/Foundation/helpers.php
@@ -411,6 +411,21 @@ function secure_url($path, $parameters = array()) } } +if ( ! function_exists('session')) +{ + /** + * Get a value from the session. + * + * @param string $name + * @param mixed|null $default + * @return mixed + */ + function session($name, $default = null) + { + return app('session...
false
Other
laravel
framework
893d125acae49f859f8f37d54c429ef875cbf815.json
Tag a new version.
src/Illuminate/Foundation/Application.php
@@ -28,7 +28,7 @@ class Application extends Container implements HttpKernelInterface, TerminableIn * * @var string */ - const VERSION = '4.2.13'; + const VERSION = '4.2.14'; /** * Indicates if the application has "booted".
false
Other
laravel
framework
0b7974d0724e7a842cee7a19ccb6888e10269a8f.json
Remove old tests.
tests/Encryption/EncrypterTest.php
@@ -35,62 +35,6 @@ public function testExceptionThrownWhenPayloadIsInvalid() } - public function testCanStillBeConstructedWithInvalidKeys() - { - $e = new Encrypter(''); // should not throw an exception - - $e = new Encrypter('YourSecretKey!!!'); // should not throw an exception - } - - - /** - * @expectedExce...
false
Other
laravel
framework
a467c446e5b0d29cef196ae69a04a4f669fe9587.json
Use unsigned ints in the jobs table
src/Illuminate/Queue/Console/stubs/jobs.stub
@@ -17,11 +17,11 @@ class CreateJobsTable extends Migration { $table->bigIncrements('id'); $table->string('queue'); $table->text('payload'); - $table->tinyInteger('attempts'); - $table->tinyInteger('reserved'); - $table->integer('reserved_at')->nullable(); - $table->integer('available_at'); - $tab...
false
Other
laravel
framework
60f82796778b828432dcae8b32a9cc8f12829c21.json
Add getGenericUser function
src/Illuminate/Auth/DatabaseUserProvider.php
@@ -52,10 +52,7 @@ public function retrieveById($identifier) { $user = $this->conn->table($this->table)->find($identifier); - if ( ! is_null($user)) - { - return new GenericUser((array) $user); - } + return $this->getGenericUser($user); } /** @@ -72,10 +69,7 @@ public function retrieveByToken($identi...
false
Other
laravel
framework
cb7efa7e1d265e2afc44ad375987ca093cea187a.json
Remove useless foreach
src/Illuminate/Session/Store.php
@@ -455,10 +455,7 @@ public function all() */ public function replace(array $attributes) { - foreach ($attributes as $key => $value) - { - $this->put($key, $value); - } + $this->put($attributes); } /**
false
Other
laravel
framework
3e2cd1dd40668c4e35ed5358e1f4dc4ffcf8ce99.json
Remove extra line.
src/Illuminate/Cache/CacheManager.php
@@ -1,6 +1,5 @@ <?php namespace Illuminate\Cache; - use Closure; use Illuminate\Support\Manager;
false
Other
laravel
framework
fb03b54b3c1b0020cfdb839b95877a419324f0ba.json
Make a start on database queue tests.
src/Illuminate/Queue/DatabaseQueue.php
@@ -126,7 +126,7 @@ protected function pushToDatabase($delay, $queue, $payload, $attempts = 0) 'reserved' => 0, 'reserved_at' => null, 'available_at' => $availableAt->getTimestamp(), - 'created_at' => time(), + 'created_at' => $this->getTime(), ]); } @@ -190,7 +190,7 @@ protected function getNext...
true
Other
laravel
framework
fb03b54b3c1b0020cfdb839b95877a419324f0ba.json
Make a start on database queue tests.
tests/Queue/QueueDatabaseQueueTest.php
@@ -0,0 +1,52 @@ +<?php + +use Mockery as m; + +class QueueDatabaseQueueTest extends PHPUnit_Framework_TestCase { + + public function tearDown() + { + m::close(); + } + + + public function testPushProperlyPushesJobOntoDatabase() + { + $queue = $this->getMock('Illuminate\Queue\DatabaseQueue', array('getTime'), array($...
true
Other
laravel
framework
347ea002c07ee25f599ae525c8c972307f33cea2.json
Remove useless check on $glue argument
src/Illuminate/Support/Collection.php
@@ -277,8 +277,6 @@ public function has($key) */ public function implode($value, $glue = null) { - if (is_null($glue)) return implode($this->lists($value)); - return implode($glue, $this->lists($value)); }
true
Other
laravel
framework
347ea002c07ee25f599ae525c8c972307f33cea2.json
Remove useless check on $glue argument
tests/Support/SupportCollectionTest.php
@@ -270,6 +270,8 @@ public function testImplode() { $data = new Collection(array(array('name' => 'taylor', 'email' => 'foo'), array('name' => 'dayle', 'email' => 'bar'))); $this->assertEquals('foobar', $data->implode('email')); + $this->assertEquals('foobar', $data->implode('email', '')); + $this->assertE...
true
Other
laravel
framework
f7e9277d33b4efee11f4a8170c53f84c739876e1.json
Fix bug in AppNameCommand where it would rename App\Exceptions\* to Acme\Exceptionss\*
src/Illuminate/Foundation/Console/AppNameCommand.php
@@ -134,7 +134,7 @@ protected function setBootstrapNamespaces() $search = [ $this->currentRoot.'\\Http', $this->currentRoot.'\\Console', - $this->currentRoot.'\\Exception', + $this->currentRoot.'\\Exceptions', ]; $replace = [
false
Other
laravel
framework
3cfc4b2715f5781345c013bb7ec8e81979cc12cf.json
Remove old tests.
tests/View/ViewBladeCompilerTest.php
@@ -134,10 +134,6 @@ public function testEchosAreCompiled() $this->assertEquals('<?php echo e(myfunc(\'foo or bar\')); ?>', $compiler->compileString('{{ myfunc(\'foo or bar\') }}')); $this->assertEquals('<?php echo e(myfunc("foo or bar")); ?>', $compiler->compileString('{{ myfunc("foo or bar") }}')); $this->as...
false
Other
laravel
framework
eac2c6d01a989e29e0c780a3425f3a1c8ddd8a01.json
Fix the docblock for constructor
src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php
@@ -32,6 +32,7 @@ class HasManyThrough extends Relation { * Create a new has many relationship instance. * * @param \Illuminate\Database\Eloquent\Builder $query + * @param \Illuminate\Database\Eloquent\Model $farParent * @param \Illuminate\Database\Eloquent\Model $parent * @param string $firstKe...
false
Other
laravel
framework
2af75c10a5cb8ef73bce708be0ec240a1b33780d.json
Limit backtrace frames to return
src/Illuminate/Database/Eloquent/Model.php
@@ -786,7 +786,7 @@ public function belongsTo($related, $foreignKey = null, $otherKey = null, $relat // of the time this will be what we desire to use for the relationships. if (is_null($relation)) { - list(, $caller) = debug_backtrace(false); + list(, $caller) = debug_backtrace(false, 2); $relation ...
false
Other
laravel
framework
cd2e3eb451d7da9c5df30f5febfdfbec6862792f.json
Correct a little spelling mistake
src/Illuminate/Log/Writer.php
@@ -126,7 +126,7 @@ public function useErrorLog($level = 'debug', $messageType = ErrorLogHandler::OP } /** - * Get a defaut Monolog formatter instance. + * Get a default Monolog formatter instance. * * @return \Monolog\Formatter\LineFormatter */
false
Other
laravel
framework
40277d71cc062697ab4697b2b296cf87186a84d1.json
Fix method name.
src/Illuminate/Database/Eloquent/Builder.php
@@ -642,7 +642,7 @@ public function whereHas($relation, Closure $callback, $operator = '>=', $count */ public function whereDoesntHave($relation, Closure $callback) { - return $this->hasNot($relation, 'and', $callback); + return $this->doesntHave($relation, 'and', $callback); } /**
false
Other
laravel
framework
c956a531f2668903a72f95e315f9759711af109c.json
Restore previous behavior.
src/Illuminate/Routing/UrlGenerator.php
@@ -114,7 +114,9 @@ public function previous() { $referrer = $this->request->headers->get('referer'); - return $referrer ? $this->to($referrer) : $this->getPreviousUrlFromSession(); + $url = $referrer ? $this->to($referrer) : $this->getPreviousUrlFromSession(); + + return $url ?: $this->to('/'); } /**
false
Other
laravel
framework
e8aef48810d5803c515f476e194092f0aa0e371b.json
Fix incorrect error message when using arrays
src/Illuminate/Validation/Validator.php
@@ -149,15 +149,21 @@ public function __construct(TranslatorInterface $translator, array $data, array /** * Parse the data and hydrate the files array. * - * @param array $data + * @param array $data + * @param string $arrayKey * @return array */ - protected function parseData(array $data) + pro...
false
Other
laravel
framework
426c1a17a39aced4f8a763b10acbb1b10a5eac28.json
Use mixed return type.
src/Illuminate/Mail/Mailer.php
@@ -142,7 +142,7 @@ public function plain($view, array $data, $callback) * @param string|array $view * @param array $data * @param \Closure|string $callback - * @return void + * @return mixed */ public function send($view, array $data, $callback) {
false
Other
laravel
framework
3615fa377dfab765b17e200566869a95502b2697.json
Rename some methods.
src/Illuminate/Database/Eloquent/Builder.php
@@ -614,7 +614,7 @@ public function has($relation, $operator = '>=', $count = 1, $boolean = 'and', C * @param \Closure $callback * @return \Illuminate\Database\Eloquent\Builder|static */ - public function hasNot($relation, $boolean = 'and', Closure $callback = null) + public function doesntHave($relation, $b...
false
Other
laravel
framework
2808b6c83d454e082d50efc91cd2711d3f6d8dd0.json
Fix some formatting.
src/Illuminate/Filesystem/FilesystemManager.php
@@ -93,12 +93,7 @@ public function createLocalDriver(array $config) */ public function createS3Driver(array $config) { - $s3Config = ['key' => $config['key'], 'secret' => $config['secret']]; - - if (isset($config['region'])) - { - $s3Config['region'] = $config['region']; - } + $s3Config = array_only($conf...
false
Other
laravel
framework
8f0cb08d8ebd157cbfe9fdebb54d2b71b0afaabd.json
Add hasNot And whereHasNot Method
src/Illuminate/Database/Eloquent/Builder.php
@@ -26,14 +26,14 @@ class Builder { * * @var array */ - protected $eagerLoad = []; + protected $eagerLoad = array(); /** * All of the registered builder macros. * * @var array */ - protected $macros = []; + protected $macros = array(); /** * A replacement for the typical delete function....
false
Other
laravel
framework
83a9eebab62897388de56f2bdceb03e844ba5d0a.json
Fix some formatting.
src/Illuminate/Validation/Validator.php
@@ -368,7 +368,7 @@ protected function getValue($attribute) protected function isValidatable($rule, $attribute, $value) { return $this->presentOrRuleIsImplicit($rule, $attribute, $value) && - $this->passesOptionalCheck($attribute); + $this->passesOptionalCheck($attribute); } /**
false
Other
laravel
framework
9da1c65818fa2c6542272f8cb7e52b540284c718.json
Remove useless line break
src/Illuminate/Database/Eloquent/Builder.php
@@ -633,7 +633,6 @@ public function whereHas($relation, Closure $callback, $operator = '>=', $count return $this->has($relation, $operator, $count, 'and', $callback); } - /** * Add a relationship count condition to the query with where clauses. *
false
Other
laravel
framework
511c5cf409526b9cb430396c4f3fe82c038b5d21.json
Add new line at the end of the file
src/Illuminate/Database/Eloquent/Builder.php
@@ -949,3 +949,4 @@ public function __clone() } } +
false
Other
laravel
framework
64b30a8c493547a9ae07090ee83450a486d3cd06.json
Use ConnectionInterface instead of implementation This will allow developers to use custom connection implementation.
src/Illuminate/Database/ConnectionResolver.php
@@ -34,7 +34,7 @@ public function __construct(array $connections = array()) * Get a database connection instance. * * @param string $name - * @return \Illuminate\Database\Connection + * @return \Illuminate\Database\ConnectionInterface */ public function connection($name = null) { @@ -47,10 +47,10 @@...
false
Other
laravel
framework
05539eb498087194f3e17e59fe38e72242564093.json
Add hasNot and whereHasNot method
src/Illuminate/Database/Eloquent/Builder.php
@@ -26,14 +26,14 @@ class Builder { * * @var array */ - protected $eagerLoad = []; + protected $eagerLoad = array(); /** * All of the registered builder macros. * * @var array */ - protected $macros = []; + protected $macros = array(); /** * A replacement for the typical delete function....
false
Other
laravel
framework
c7e15e9b652f4cbb3de46919ba9eb1f66b9b47cc.json
Add hasNot and whereHasNot method
src/Illuminate/Database/Eloquent/Builder.php
@@ -26,14 +26,14 @@ class Builder { * * @var array */ - protected $eagerLoad = array(); + protected $eagerLoad = []; /** * All of the registered builder macros. * * @var array */ - protected $macros = array(); + protected $macros = []; /** * A replacement for the typical delete function....
false
Other
laravel
framework
e098b2c19cacf52ade40bfd22d73ee7fa49d4455.json
use PHPUnit static assertions
src/Illuminate/Foundation/Testing/AssertionsTrait.php
@@ -1,6 +1,7 @@ <?php namespace Illuminate\Foundation\Testing; use Illuminate\View\View; +use PHPUnit_Framework_Assert as PHPUnit; trait AssertionsTrait { @@ -15,7 +16,7 @@ public function assertResponseOk() $actual = $response->getStatusCode(); - return $this->assertTrue($response->isOk(), 'Expected s...
false
Other
laravel
framework
ca877782d63aa0ca440e09c1f87f9e1a9a514356.json
Fix stub order.
src/Illuminate/Foundation/Console/stubs/request.stub
@@ -4,6 +4,16 @@ use {{rootNamespace}}Http\Requests\Request; class {{class}} extends Request { + /** + * Determine if the user is authorized to make this request. + * + * @return bool + */ + public function authorize() + { + return false; + } + /** * Get the validation rules that apply to the request. ...
false
Other
laravel
framework
9e80174f4a055a34fa9c40da51b7ac73deedf0fb.json
Fix casing and conflicts.
src/Illuminate/Support/Collection.php
@@ -235,7 +235,7 @@ public function groupBy($groupBy) foreach ($this->items as $key => $value) { - $results[$this->getGroupbyKey($groupBy, $key, $value)][] = $value; + $results[$this->getGroupByKey($groupBy, $key, $value)][] = $value; } return new static($results); @@ -249,7 +249,7 @@ public functio...
false
Other
laravel
framework
30c4e946033db1df58b2f11d4d8f6885a356c3b8.json
Fix code to not be a breaking chage.
src/Illuminate/Database/Query/Builder.php
@@ -1702,7 +1702,13 @@ protected function restoreFieldsForCount() */ public function exists() { - return $this->limit(1)->count() > 0; + $limit = $this->limit; + + $result = $this->limit(1)->count() > 0; + + $this->limit($limit); + + return $result; } /**
false
Other
laravel
framework
37ebc7ecc693405a717239ca30e0586d0a71e4d3.json
Remove "fresh" command.
src/Illuminate/Foundation/Console/FreshCommand.php
@@ -1,122 +0,0 @@ -<?php namespace Illuminate\Foundation\Console; - -use Illuminate\Console\Command; -use Illuminate\Filesystem\Filesystem; - -class FreshCommand extends Command { - - /** - * The console command name. - * - * @var string - */ - protected $name = 'fresh'; - - /** - * The console command description...
true
Other
laravel
framework
37ebc7ecc693405a717239ca30e0586d0a71e4d3.json
Remove "fresh" command.
src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php
@@ -3,7 +3,6 @@ use Illuminate\Support\ServiceProvider; use Illuminate\Foundation\Console\UpCommand; use Illuminate\Foundation\Console\DownCommand; -use Illuminate\Foundation\Console\FreshCommand; use Illuminate\Foundation\Console\TinkerCommand; use Illuminate\Foundation\Console\AppNameCommand; use Illuminate\Fou...
true
Other
laravel
framework
0c57feea7c44a09fee1ccf600b3525e743e57b38.json
Add sanitization to form requests
src/Illuminate/Foundation/Console/stubs/request.stub
@@ -16,6 +16,16 @@ class {{class}} extends Request { ]; } + /** + * Get the sanitized input for the request. + * + * @return array + */ + public function sanitize() + { + return $this->all(); + } + /** * Determine if the user is authorized to make this request. *
true
Other
laravel
framework
0c57feea7c44a09fee1ccf600b3525e743e57b38.json
Add sanitization to form requests
src/Illuminate/Foundation/Http/FormRequest.php
@@ -29,6 +29,13 @@ class FormRequest extends Request implements ValidatesWhenResolved { */ protected $redirector; + /** + * The sanitized input. + * + * @var array + */ + protected $sanitized; + /** * The URI to redirect to if validation fails. * @@ -79,20 +86,39 @@ protected function getValidatorIns...
true
Other
laravel
framework
b8961bde2a4b3f760156e0d3e970fec795ebc4db.json
Tweak a few variables.
src/Illuminate/Foundation/Http/FormRequest.php
@@ -51,18 +51,18 @@ class FormRequest extends Request implements ValidatesWhenResolved { protected $redirectAction; /** - * The input keys that should not be flashed on redirect. + * The key to be used for the view error bag. * - * @var array + * @var string */ - protected $dontFlash = ['password', 'pas...
false
Other
laravel
framework
f3d3a654726a55d8b0959e136070ad80e4683a6f.json
Fix method name.
src/Illuminate/Database/Eloquent/Model.php
@@ -649,7 +649,7 @@ public static function find($id, $columns = array('*')) * * @return \Illuminate\Database\Query\Builder */ - public static function onWrite() + public static function onWriteConnection() { $instance = new static;
false
Other
laravel
framework
d4c32efcfef46c16dee9b8ee9fdc8d60071b723b.json
Change method order.
src/Illuminate/Support/helpers.php
@@ -464,6 +464,39 @@ function ends_with($haystack, $needles) } } +if ( ! function_exists('env')) +{ + /** + * Gets the value of an environment variable. Supports boolean, empty and null. + * + * @param string $key + * @return mixed + */ + function env($key) + { + $value = getenv($key); + + if ($value === ...
false
Other
laravel
framework
55517bc37843ae70879a8ed3bb38a5e3f598fd66.json
Add cache events
src/Illuminate/Cache/CacheManager.php
@@ -155,7 +155,14 @@ public function setPrefix($name) */ protected function repository(StoreInterface $store) { - return new Repository($store); + $repository = new Repository($store); + + if ($this->app->bound('events')) + { + $repository->setEventDispatcher($this->app['events']); + } + + return $reposi...
true
Other
laravel
framework
55517bc37843ae70879a8ed3bb38a5e3f598fd66.json
Add cache events
src/Illuminate/Cache/Repository.php
@@ -4,6 +4,7 @@ use DateTime; use ArrayAccess; use Carbon\Carbon; +use Illuminate\Events\Dispatcher; use Illuminate\Support\Traits\MacroableTrait; use Illuminate\Contracts\Cache\Repository as CacheContract; @@ -20,6 +21,13 @@ class Repository implements CacheContract, ArrayAccess { */ protected $store; + ...
true
Other
laravel
framework
55517bc37843ae70879a8ed3bb38a5e3f598fd66.json
Add cache events
tests/Cache/CacheRepositoryTest.php
@@ -85,7 +85,12 @@ public function testRegisterMacroWithNonStaticCall() protected function getRepository() { - return new Illuminate\Cache\Repository(m::mock('Illuminate\Cache\StoreInterface')); + $dispatcher = new \Illuminate\Events\Dispatcher(m::mock('Illuminate\Container\Container')); + $repository = new Il...
true
Other
laravel
framework
eb9d915f3d3b0e01d784b5f844ceaf0625fa6c47.json
adjust coding style
src/Illuminate/Database/Query/Builder.php
@@ -1363,7 +1363,8 @@ public function getFresh($columns = array('*')) */ protected function runSelect() { - if ($this->useWritePdo) { + if ($this->useWritePdo) + { return $this->connection->select($this->toSql(), $this->getBindings(), false); }
true
Other
laravel
framework
eb9d915f3d3b0e01d784b5f844ceaf0625fa6c47.json
adjust coding style
tests/Database/DatabaseQueryBuilderTest.php
@@ -1267,6 +1267,7 @@ protected function getSqlServerBuilder() return new Builder(m::mock('Illuminate\Database\ConnectionInterface'), $grammar, $processor); } + protected function getMySqlBuilderWithProcessor() { $grammar = new Illuminate\Database\Query\Grammars\MySqlGrammar;
true
Other
laravel
framework
2cb7711ed9179d3bb34b3860a0ebc9319c610da7.json
Set $options as an empty array per default
src/Illuminate/Database/Eloquent/Model.php
@@ -1467,9 +1467,10 @@ protected function finishSave(array $options) * Perform a model update operation. * * @param \Illuminate\Database\Eloquent\Builder $query + * @param array $options * @return bool|null */ - protected function performUpdate(Builder $query, array $options) + protected function pe...
false
Other
laravel
framework
3f521ad09d4bb3fcfd2dd17b8ae801859c27066d.json
Add Caron to require-dev
src/Illuminate/Console/composer.json
@@ -15,7 +15,8 @@ }, "require-dev": { "mtdowling/cron-expression": "~1.0", - "symfony/process": "2.6.*" + "symfony/process": "2.6.*", + "nesbot/carbon": "~1.0" }, "autoload": { "psr-4": {
false
Other
laravel
framework
b0035ff17ea0fdd86997cc8ab4024a5b67377226.json
add test cases
tests/Database/DatabaseEloquentModelTest.php
@@ -105,6 +105,11 @@ public function testFindMethodCallsQueryBuilderCorrectly() $this->assertEquals('foo', $result); } + public function testFindMethodUseWritePdo() + { + $result = EloquentModelFindWithWritePdoStub::onWrite()->find(1); + } + /** * @expectedException Illuminate\Database\Eloquent\ModelNotFo...
true
Other
laravel
framework
b0035ff17ea0fdd86997cc8ab4024a5b67377226.json
add test cases
tests/Database/DatabaseQueryBuilderTest.php
@@ -20,6 +20,20 @@ public function testBasicSelect() } + public function testBasicSelectUseWritePdo() + { + $builder = $this->getMySqlBuilderWithProcessor(); + $builder->getConnection()->shouldReceive('select')->once() + ->with('select * from `users`', array(), false); + $builder->useWritePdo()->select('*')-...
true
Other
laravel
framework
58ad8577c24886e4e6ef85554c4f598dada8a403.json
add useWritePdo for select query
src/Illuminate/Database/Query/Builder.php
@@ -180,6 +180,13 @@ class Builder { 'rlike', 'regexp', 'not regexp', ); + /** + * Whether use write pdo for select. + * + * @var bool + */ + protected $useWritePdo = false; + /** * Create a new query builder instance. * @@ -1356,6 +1363,10 @@ public function getFresh($columns = array('*')) */ p...
false
Other
laravel
framework
f53b52c8a177e20e3947212a26798dedd1346be6.json
Change some paths.
src/Illuminate/Foundation/Application.php
@@ -231,7 +231,7 @@ public function databasePath() */ public function langPath() { - return $this->basePath.'/resources/lang'; + return $this->basePath.'/lang'; } /**
true
Other
laravel
framework
f53b52c8a177e20e3947212a26798dedd1346be6.json
Change some paths.
src/Illuminate/Foundation/Console/FreshCommand.php
@@ -80,8 +80,8 @@ protected function getFiles() base_path('bower.json'), base_path('gulpfile.js'), base_path('package.json'), + base_path('views/dashboard.blade.php'), app_path('Http/Controllers/HomeController.php'), - base_path('resources/views/dashboard.blade.php'), ]; } @@ -95,13 +95,13 @@...
true
Other
laravel
framework
6bae9b5b2c60767d91ed18f198859998af4d81f4.json
Remove unneeded tests.
tests/Database/DatabaseMigrationMakeCommandTest.php
@@ -35,28 +35,6 @@ public function testBasicCreateGivesCreatorProperArgumentsWhenTableIsSet() } - public function testPackagePathsMayBeUsed() - { - $command = new DatabaseMigrationMakeCommandTestStub($creator = m::mock('Illuminate\Database\Migrations\MigrationCreator'), __DIR__.'/vendor'); - $app = new Illumina...
true
Other
laravel
framework
6bae9b5b2c60767d91ed18f198859998af4d81f4.json
Remove unneeded tests.
tests/Database/DatabaseMigrationMigrateCommandTest.php
@@ -41,32 +41,6 @@ public function testMigrationRepositoryCreatedWhenNecessary() } - public function testPackageIsRespectedWhenMigrating() - { - $command = new MigrateCommand($migrator = m::mock('Illuminate\Database\Migrations\Migrator'), __DIR__.'/vendor'); - $command->setLaravel(new ApplicationDatabaseMigrati...
true
Other
laravel
framework
6bae9b5b2c60767d91ed18f198859998af4d81f4.json
Remove unneeded tests.
tests/Support/SupportServiceProviderTest.php
@@ -1,21 +0,0 @@ -<?php - -class SupportServiceProviderTest extends PHPUnit_Framework_TestCase { - - public static function setUpBeforeClass() - { - require_once __DIR__.'/stubs/providers/SuperProvider.php'; - require_once __DIR__.'/stubs/providers/SuperSuperProvider.php'; - } - - - public function testPackageNameCan...
true
Other
laravel
framework
1b9562f0c5a8b9ad8287fa8c7350bf3f9802628d.json
Fix composer file.
composer.json
@@ -62,7 +62,7 @@ "illuminate/support": "self.version", "illuminate/translation": "self.version", "illuminate/validation": "self.version", - "illuminate/view": "self.version", + "illuminate/view": "self.version" }, "require-dev": { "aws/aws-sdk-php": "~2.7",
false
Other
laravel
framework
68cd74307e98aa7a41101d5b94e11158031e7261.json
Change Flysystem version.
composer.json
@@ -18,7 +18,7 @@ "doctrine/annotations": "~1.0", "ircmaxell/password-compat": "~1.0", "jeremeamia/superclosure": "~1.0.1", - "league/flysystem": "0.6.*", + "league/flysystem": "~1.0", "monolog/monolog": "~1.6", "mtdowling/cron-expression": "~1.0", "ne...
false
Other
laravel
framework
08c89f5124dac73e5283c11ff78f2b2dd9e9535f.json
Add ArrayAccess support to data_get
src/Illuminate/Support/helpers.php
@@ -402,6 +402,15 @@ function data_get($target, $key, $default = null) $target = $target[$segment]; } + elseif ($target instanceof ArrayAccess) + { + if ( ! isset($target[$segment])) + { + return value($default); + } + + $target = $target[$segment]; + } elseif (is_object($target)) ...
true
Other
laravel
framework
08c89f5124dac73e5283c11ff78f2b2dd9e9535f.json
Add ArrayAccess support to data_get
tests/Support/SupportHelpersTest.php
@@ -230,12 +230,19 @@ public function testDataGet() { $object = (object) array('users' => array('name' => array('Taylor', 'Otwell'))); $array = array((object) array('users' => array((object) array('name' => 'Taylor')))); + $arrayAccess = new SupportTestArrayAccess(['price' => 56, 'user' => new SupportTestArray...
true
Other
laravel
framework
fbecdfb27afa2ab49e4e98a7e14edf9787f1ccad.json
Add some features to error handling.
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -2,6 +2,7 @@ use Exception; use Psr\Log\LoggerInterface; +use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Debug\ExceptionHandler as SymfonyDisplayer; use Illuminate\Contracts\Debug\ExceptionHandler as ExceptionHandlerContract; @@ -14,6 +15,13 @@ class Handler implements Except...
true
Other
laravel
framework
fbecdfb27afa2ab49e4e98a7e14edf9787f1ccad.json
Add some features to error handling.
src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php
@@ -1,9 +1,9 @@ <?php namespace Illuminate\Foundation\Http\Middleware; use Closure; -use Illuminate\Http\Response; use Illuminate\Contracts\Routing\Middleware; use Illuminate\Contracts\Foundation\Application; +use Symfony\Component\HttpKernel\Exception\HttpException; class CheckForMaintenanceMode implements Mi...
true
Other
laravel
framework
d5c5f1306dd99c3cf606702b5b7ef51d6a73c752.json
Remove empty brackets from log files The current log files generated by Laravel all show empty brackets at the end of log files. We can remove these by using the $ignoreEmptyContextAndExtra parameter in the default Monolog LineFormatter. http://stackoverflow.com/questions/13968967/how-not-to-show-last-bracket-in-a-mo...
composer.json
@@ -19,7 +19,7 @@ "ircmaxell/password-compat": "~1.0", "jeremeamia/superclosure": "~1.0.1", "league/flysystem": "0.6.*", - "monolog/monolog": "~1.6", + "monolog/monolog": "~1.11", "mtdowling/cron-expression": "~1.0", "nesbot/carbon": "~1.0", "patchwork...
true
Other
laravel
framework
d5c5f1306dd99c3cf606702b5b7ef51d6a73c752.json
Remove empty brackets from log files The current log files generated by Laravel all show empty brackets at the end of log files. We can remove these by using the $ignoreEmptyContextAndExtra parameter in the default Monolog LineFormatter. http://stackoverflow.com/questions/13968967/how-not-to-show-last-bracket-in-a-mo...
src/Illuminate/Log/Writer.php
@@ -354,7 +354,7 @@ public function getMonolog() */ protected function getDefaultFormatter() { - return new LineFormatter(null, null, true); + return new LineFormatter(null, null, true, true); } /**
true