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
86c225951ad64ce0d705f5def8b83cdee5f849a9.json
Dump autloads on migration creation again.
src/Illuminate/Database/Console/Migrations/MakeCommand.php
@@ -69,11 +69,24 @@ public function fire() // Now we're ready to get the path where these migrations should be placed // on disk. This may be specified via the package option on the command // and we will verify that option to determine the appropriate paths. + $this->writeMigration($name, $table, $create); +...
true
Other
laravel
framework
86c225951ad64ce0d705f5def8b83cdee5f849a9.json
Dump autloads on migration creation again.
src/Illuminate/Database/MigrationServiceProvider.php
@@ -35,6 +35,8 @@ public function register() $this->registerMigrator(); $this->registerCommands(); + + $this->registerPostCreationHook(); } /** @@ -189,6 +191,27 @@ protected function registerMakeCommand() }); } + /** + * Register the migration post create hook. + * + * @return vo...
true
Other
laravel
framework
86c225951ad64ce0d705f5def8b83cdee5f849a9.json
Dump autloads on migration creation again.
src/Illuminate/Foundation/Composer.php
@@ -35,17 +35,28 @@ public function __construct(Filesystem $files, $workingPath) /** * Regenerate the Composer autoloader files. * + * @param string $extra * @return void */ - public function dumpAutoloads() + public function dumpAutoloads($extra = '') { $process = $this->getProcess(); - $proce...
true
Other
laravel
framework
86c225951ad64ce0d705f5def8b83cdee5f849a9.json
Dump autloads on migration creation again.
tests/Foundation/FoundationComposerTest.php
@@ -16,7 +16,7 @@ public function testDumpAutoloadRunsTheCorrectCommand() $files->shouldReceive('exists')->once()->with(__DIR__.'/composer.phar')->andReturn(true); $process = m::mock('stdClass'); $composer->expects($this->once())->method('getProcess')->will($this->returnValue($process)); - $process->shouldRec...
true
Other
laravel
framework
9c4f744ae1ad0794a41af3cbaeeeb36e0cbf27b7.json
Simplify configuration get.
src/Illuminate/Queue/Console/ListenCommand.php
@@ -74,7 +74,7 @@ protected function getQueue($connection) { if (is_null($connection)) { - $connection = $this->laravel['config']->get("queue.default"); + $connection = $this->laravel['config']['queue.default']; } $queue = $this->laravel['config']->get("queue.connections.{$connection}.queue...
false
Other
laravel
framework
23f647c9ba5d5a4d5a16ad275b1be17f6a62eafa.json
Return SQS response from SqsClient There are situations where you want to know response information after sending a message to SQS. I'm not familiar with beanstalkd so didn't make the same change to the beanstalkd equivalent.
src/Illuminate/Queue/SqsQueue.php
@@ -44,7 +44,7 @@ public function push($job, $data = '', $queue = null) { $payload = $this->createPayload($job, $data); - $this->sqs->sendMessage(array('QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload)); + return $this->sqs->sendMessage(array('QueueUrl' => $this->getQueue($queue), 'MessageBody'...
false
Other
laravel
framework
03c16cc6adba7065d50caa2308bc03512ad9a889.json
Fix response downloads.
src/Illuminate/Support/Facades/Response.php
@@ -1,6 +1,7 @@ <?php namespace Illuminate\Support\Facades; use Illuminate\Support\Contracts\ArrayableInterface; +use Symfony\Component\HttpFoundation\BinaryFileResponse; class Response { @@ -56,9 +57,16 @@ public static function stream($callback, $status = 200, array $headers = array() * @param arr...
false
Other
laravel
framework
99d0fd9819b8a0a972a7b535d175e960ff50d14c.json
Allow default value in find method.
src/Illuminate/Database/Eloquent/Collection.php
@@ -15,16 +15,17 @@ class Collection extends BaseCollection { * Find a model in the collection by key. * * @param mixed $key + * @param mixed $default * @return Illuminate\Database\Eloquent\Model */ - public function find($key) + public function find($key, $default = null) { if (count($this->di...
true
Other
laravel
framework
99d0fd9819b8a0a972a7b535d175e960ff50d14c.json
Allow default value in find method.
tests/Database/DatabaseEloquentCollectionTest.php
@@ -41,6 +41,7 @@ public function testFindMethodFindsModelById() $c = new Collection(array($mockModel)); $this->assertTrue($mockModel === $c->find(1)); + $this->assertTrue('taylor' === $c->find(2, 'taylor')); }
true
Other
laravel
framework
a54268697a6c544312dd0b610c68db5021d267d3.json
Remove duplicate variable
src/Illuminate/Database/Eloquent/Model.php
@@ -675,8 +675,6 @@ protected function performUpdate($query) return false; } - $dirty = $this->getDirty(); - // Once we have run the update operation, we will fire the "updated" event for // this model instance. This will allow developers to hook into these after // models are updated, giving t...
false
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
src/Illuminate/Database/Migrations/Migrator.php
@@ -171,7 +171,7 @@ public function rollback($pretend = false) // and properly reverse the entire database schema operation that ran. foreach ($migrations as $migration) { - $this->runDown($migration, $pretend); + $this->runDown((object) $migration, $pretend); } return count($migrations);
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
src/Illuminate/Routing/Generators/stubs/destroy.php
@@ -1,7 +1,7 @@ /** * Remove the specified resource from storage. * - * @param int $id + * @param int $id * @return Response */ public function destroy($id)
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
src/Illuminate/Routing/Generators/stubs/edit.php
@@ -1,7 +1,7 @@ /** * Show the form for editing the specified resource. * - * @param int $id + * @param int $id * @return Response */ public function edit($id)
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
src/Illuminate/Routing/Generators/stubs/show.php
@@ -1,7 +1,7 @@ /** * Display the specified resource. * - * @param int $id + * @param int $id * @return Response */ public function show($id)
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
src/Illuminate/Routing/Generators/stubs/update.php
@@ -1,7 +1,7 @@ /** * Update the specified resource in storage. * - * @param int $id + * @param int $id * @return Response */ public function update($id)
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
tests/Routing/fixtures/controller.php
@@ -35,6 +35,7 @@ public function store() /** * Display the specified resource. * + * @param int $id * @return Response */ public function show($id) @@ -45,6 +46,7 @@ public function show($id) /** * Show the form for editing the specified resource. * + * @param int $id * @return Respons...
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
tests/Routing/fixtures/except_controller.php
@@ -25,6 +25,7 @@ public function store() /** * Show the form for editing the specified resource. * + * @param int $id * @return Response */ public function edit($id) @@ -35,6 +36,7 @@ public function edit($id) /** * Update the specified resource in storage. * + * @param int $id * @retu...
true
Other
laravel
framework
8f3126acb7a41781f8563e08def06eb4656798a7.json
Fix some tests. Cast migrations to objects.
tests/Routing/fixtures/only_controller.php
@@ -15,6 +15,7 @@ public function index() /** * Display the specified resource. * + * @param int $id * @return Response */ public function show($id)
true
Other
laravel
framework
7410a451984c43fb5b69420b031409d51660547b.json
Add some stuff to the phpunit file.
phpunit.xml
@@ -15,4 +15,13 @@ <directory>./tests/</directory> </testsuite> </testsuites> + + <filter> + <whitelist addUncoveredFilesFromWhitelist="false"> + <directory suffix=".php">src</directory> + <exclude> + <directory suffix=".php">vendor</dire...
false
Other
laravel
framework
b0b0fb6f762f360da2e89c0267bc9ee86fa65142.json
Fix bug in database connection.
src/Illuminate/Database/Connection.php
@@ -528,7 +528,7 @@ public function getName() */ public function getConfig($option) { - return array_get($config, $option); + return array_get($this->config, $option); } /**
false
Other
laravel
framework
5493147220256090fd510cb424fb870911c28638.json
Put array helper tests in correct function
tests/Support/SupportHelpersTest.php
@@ -45,14 +45,14 @@ public function testArrayPluck() public function testArrayExcept() { $array = array('name' => 'taylor', 'age' => 26); - $this->assertEquals(array('name' => 'taylor'), array_only($array, array('name'))); + $this->assertEquals(array('age' => 26), array_except($array, array('name'))); } ...
false
Other
laravel
framework
ac5b414f988d5cd952a5749f87586ab9f1ac8d13.json
Use path and domain in session store.
src/Illuminate/Session/Store.php
@@ -461,12 +461,14 @@ public function hitsLottery() * * @param Illuminate\Cookie\CookieJar $cookie * @param string $name - * @param int $lifetime + * @param int $lifetime + * @param string $path + * @param string $domain * @return void */ - public function getCookie(CookieJar $cookie, ...
false
Other
laravel
framework
1ca831d5f646e7985c5e4b8f2497a6f3b142fd5b.json
Change config option in file driver.
src/Illuminate/Session/SessionManager.php
@@ -21,7 +21,7 @@ protected function createCookieDriver() */ protected function createFileDriver() { - $path = $this->app['config']['session.path']; + $path = $this->app['config']['session.files']; return new FileStore($this->app['files'], $path); }
false
Other
laravel
framework
b816c0d5b8fd38d4b927d766daf2d4c5f265073b.json
Give description on error handlers that bomb out.
src/Illuminate/Exception/Handler.php
@@ -65,7 +65,9 @@ public function handle($exception, $fromConsole = false) } catch (\Exception $e) { - // + $location = $e->getMessage().' in '.$e->getFile().':'.$e->getLine(); + + $response = 'Error in exception handler: '.$location; } // If the handler returns a "non-null" response, we...
false
Other
laravel
framework
87a7b5687b4c5790c210c3617b2a81722bb810cc.json
Update documentation for mixed parameters Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Routing/UrlGenerator.php
@@ -66,7 +66,7 @@ public function previous() * Generate a absolute URL to the given path. * * @param string $path - * @param array $parameters + * @param mixed $parameters * @param bool $secure * @return string */ @@ -154,7 +154,7 @@ protected function getScheme($secure) * Get the URL...
false
Other
laravel
framework
aa0d5c24fb7e1a7199628244db38697f7c6e8a66.json
Remove array dependencies from url helpers The $parameters variable is being type casted to an array in the to() function of UrlGenerator so there isn't a need to require the parameter to be an array. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Support/helpers.php
@@ -431,10 +431,10 @@ function secure_asset($path) * Generate a HTTPS url for the application. * * @param string $path - * @param array $parameters + * @param mixed $parameters * @return string */ - function secure_url($path, array $parameters = array()) + function secure_url($path, $parameters...
false
Other
laravel
framework
104396130b1795f1b7257a63740ef1db42c0d073.json
Refactor the creation of Eloquent models.
src/Illuminate/Database/Eloquent/Builder.php
@@ -175,9 +175,7 @@ public function getModels($columns = array('*')) // also set the proper connection name for the model after we create it. foreach ($results as $result) { - $models[] = $model = $this->model->newExisting(); - - $model->setRawAttributes((array) $result, true); + $models[] = $model = $th...
true
Other
laravel
framework
104396130b1795f1b7257a63740ef1db42c0d073.json
Refactor the creation of Eloquent models.
src/Illuminate/Database/Eloquent/Model.php
@@ -262,9 +262,13 @@ public function newInstance($attributes = array(), $exists = false) * @param array $attributes * @return Illuminate\Database\Eloquent\Model */ - public function newExisting($attributes = array()) + public function newFromBuilder($attributes = array()) { - return $this->newInstance($at...
true
Other
laravel
framework
104396130b1795f1b7257a63740ef1db42c0d073.json
Refactor the creation of Eloquent models.
tests/Database/DatabaseEloquentBuilderTest.php
@@ -131,12 +131,12 @@ public function testGetModelsProperlyHydratesModels() $records[] = array('name' => 'taylor', 'age' => 26); $records[] = array('name' => 'dayle', 'age' => 28); $builder->getQuery()->shouldReceive('get')->once()->with(array('foo'))->andReturn($records); - $model = m::mock('Illuminate\Datab...
true
Other
laravel
framework
eb8f512c44f8060a2f3043e6fcd6e7d1a5177c59.json
Fix bug in Eloquent model update routine.
src/Illuminate/Database/Eloquent/Model.php
@@ -659,22 +659,27 @@ public function save() */ protected function performUpdate($query) { - // If the updating event returns false, we will cancel the update operation so - // developers can hook Validation systems into their models and cancel this - // operation if the model does not pass validation. Otherw...
true
Other
laravel
framework
eb8f512c44f8060a2f3043e6fcd6e7d1a5177c59.json
Fix bug in Eloquent model update routine.
src/Illuminate/Workbench/Starter.php
@@ -13,11 +13,11 @@ public static function start($path, $finder = null, $files = null) { $finder = $finder ?: new \Symfony\Component\Finder\Finder; - $files = $files ?: new \Illuminate\Filesystem\Filesystem; - // We will use the finder to locate all "autoload.php" files in the workbench // directory...
true
Other
laravel
framework
8f80dd1aaa91834c02a963d6b352fc50efd31089.json
Fix bug in IronMQ connector.
src/Illuminate/Queue/Connectors/IronConnector.php
@@ -13,9 +13,9 @@ class IronConnector implements ConnectorInterface { */ public function connect(array $config) { - $config = array('token' => $config['token'], 'project_id' => $config['project']); + $ironConfig = array('token' => $config['token'], 'project_id' => $config['project']); - return new IronQueue...
false
Other
laravel
framework
1f58d8a3a6972eecb5bd88a4d713ee53c425cee9.json
Add support for releasing IronMQ messages.
src/Illuminate/Queue/Jobs/IronJob.php
@@ -88,7 +88,7 @@ public function delete() */ public function release($delay = 0) { - // + $this->iron->releaseMessage($this->queue, $this->job->id); } /**
false
Other
laravel
framework
68c49e5c17e8e9f6219736367f042d80d88f2c08.json
Fix Dispatcher Typos.
src/Illuminate/Database/Eloquent/Model.php
@@ -140,7 +140,7 @@ abstract class Model implements ArrayAccess, ArrayableInterface, JsonableInterfa /** * The event dispatcher instance. * - * @var Illuminate\Events\Dispacher + * @var Illuminate\Events\Dispatcher */ protected static $dispatcher; @@ -1517,7 +1517,7 @@ public static function setConnect...
false
Other
laravel
framework
e4fa40a23f71d9b9643d29d6149727a7aa3cdca3.json
Fix bug in pivot class.
src/Illuminate/Database/Eloquent/Relations/Pivot.php
@@ -65,7 +65,7 @@ protected function setKeysForSaveQuery($query) { $query->where($this->foreignKey, $this->getAttribute($this->foreignKey)); - $query->where($this->otherKey, $this->getAttribute($this->otherKey)); + return $query->where($this->otherKey, $this->getAttribute($this->otherKey)); } /**
false
Other
laravel
framework
f6f2a8c73973dc97b15b344967e4378e2905ec8a.json
Fix potential bug in fluent class.
src/Illuminate/Support/Fluent.php
@@ -61,7 +61,7 @@ public function getAttributes() */ public function __call($method, $parameters) { - $this->$method = count($parameters) > 0 ? $parameters[0] : true; + $this->attributes[$method] = count($parameters) > 0 ? $parameters[0] : true; return $this; }
false
Other
laravel
framework
b3b561e095081aeac7b1b6e293e45f7764fb9ff0.json
Update the readme file.
readme.md
@@ -30,6 +30,7 @@ - Added `URL::previous` method for getting previous URL from `referer` $_SERVER variable. - Renamed `path` helper to `url` for consistency. - Added `App::shutdown` method for registering callbacks to be fired at very end of both web and Artisan life-cycle. +- Added `saveMany` and `createMany` to 1:...
false
Other
laravel
framework
6f49fc29697fa1a33320bfbc465e71a685a41190.json
Fix bug in fluent class.
src/Illuminate/Support/Fluent.php
@@ -21,7 +21,7 @@ public function __construct($attributes = array()) { foreach ($attributes as $key => $value) { - $this->$key = $value; + $this->attributes[$key] = $value; } }
false
Other
laravel
framework
a597ed29dc35444f63c8b53273133b3838e3ea29.json
fix config option in listen command.
src/Illuminate/Queue/Console/ListenCommand.php
@@ -72,7 +72,7 @@ public function fire() */ protected function getQueue($connection) { - $queue = $this->laravel['config']->get("queue.{$connection}.queue", 'default'); + $queue = $this->laravel['config']->get("queue.connections.{$connection}.queue", 'default'); return $this->input->getOption('queue...
false
Other
laravel
framework
3017062688b79b3a2205ea9a02c6dc3986a41d1b.json
fix bug in page detection.
src/Illuminate/Pagination/Environment.php
@@ -116,7 +116,14 @@ public function getPaginationView(Paginator $paginator) */ public function getCurrentPage() { - return $this->currentPage ?: $this->request->query->get('page', 1); + $page = (int) $this->currentPage ?: $this->request->query->get('page', 1); + + if ($page < 1 or filter_var($page, FILTER_VA...
true
Other
laravel
framework
3017062688b79b3a2205ea9a02c6dc3986a41d1b.json
fix bug in page detection.
tests/Pagination/PaginationEnvironmentTest.php
@@ -44,6 +44,12 @@ public function testCurrentPageCanBeRetrieved() $env->setRequest($request); $this->assertEquals(2, $env->getCurrentPage()); + + $env = $this->getEnvironment(); + $request = Illuminate\Http\Request::create('http://foo.com?page=-1', 'GET'); + $env->setRequest($request); + + $this->assertEqu...
true
Other
laravel
framework
3017062688b79b3a2205ea9a02c6dc3986a41d1b.json
fix bug in page detection.
tests/Pagination/PaginationPaginatorTest.php
@@ -44,6 +44,17 @@ public function testPaginationContextHandlesPageLessThanOne() } + public function testPaginationContextHandlesPageLessThanOneAsString() + { + $p = new Paginator($env = m::mock('Illuminate\Pagination\Environment'), array('foo', 'bar', 'baz'), 3, 2); + $env->shouldReceive('getCurrentPage')->onc...
true
Other
laravel
framework
5997f6c0b8bf728c32650986bb2402132f6603ca.json
Pass non-named routes through Form::open() You can now pass non-named routes alongside urls to Form::open with the 'url' parameter. The UrlGenerator will validate if it's a valid url and will otherwise try to generate an url if it's a route. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Html/FormBuilder.php
@@ -530,7 +530,10 @@ protected function getAction(array $options) // We will also check for a "route" or "action" parameter on the array so that // developers can easily specify a route or controller action when creating // a form providing a convenient interface for creating the form actions. - if (isset($op...
false
Other
laravel
framework
4289e6ccb3ace1beb240390bacb6f0dbca7b2cd7.json
add last method
src/Illuminate/Support/Collection.php
@@ -48,6 +48,16 @@ public function first() return count($this->items) > 0 ? reset($this->items) : null; } + /** + * Get the last item from the collection + * + * @return mixed|null + */ + public function last() + { + return count($this->items) > 0 ? end($this->items) : null; + } + /** * Execu...
false
Other
laravel
framework
60f329b2ec008100971a7648c72b55ab0c978a88.json
replace camel_case with studly_case where needed
src/Illuminate/Database/Eloquent/Model.php
@@ -1246,7 +1246,7 @@ protected function getAttributeFromArray($key) */ public function hasGetMutator($key) { - return method_exists($this, 'get'.camel_case($key).'Attribute'); + return method_exists($this, 'get'.studly_case($key).'Attribute'); } /** @@ -1258,7 +1258,7 @@ public function hasGetMutator($k...
true
Other
laravel
framework
60f329b2ec008100971a7648c72b55ab0c978a88.json
replace camel_case with studly_case where needed
src/Illuminate/Database/Migrations/MigrationCreator.php
@@ -89,7 +89,7 @@ protected function getStub($table, $create) */ protected function populateStub($name, $stub, $table) { - $stub = str_replace('{{class}}', camel_case($name), $stub); + $stub = str_replace('{{class}}', studly_case($name), $stub); // Here we will replace the table place-holders with the tab...
true
Other
laravel
framework
60f329b2ec008100971a7648c72b55ab0c978a88.json
replace camel_case with studly_case where needed
src/Illuminate/Database/Migrations/Migrator.php
@@ -285,7 +285,7 @@ public function resolve($file) { $file = implode('_', array_slice(explode('_', $file), 4)); - $class = camel_case($file); + $class = studly_case($file); return new $class; }
true
Other
laravel
framework
60f329b2ec008100971a7648c72b55ab0c978a88.json
replace camel_case with studly_case where needed
src/Illuminate/Validation/Validator.php
@@ -1298,7 +1298,7 @@ protected function parseRule($rule) $rule = substr($rule, 0, $colon); } - return array(camel_case($rule), $parameters); + return array(studly_case($rule), $parameters); } /** @@ -1334,7 +1334,7 @@ public function addImplicitExtensions(array $extensions) foreach ($extensions a...
true
Other
laravel
framework
60f329b2ec008100971a7648c72b55ab0c978a88.json
replace camel_case with studly_case where needed
src/Illuminate/Workbench/Console/WorkbenchMakeCommand.php
@@ -95,9 +95,9 @@ protected function callComposerUpdate($path) */ protected function buildPackage() { - $vendor = camel_case($this->ask('What is vendor name of the package?')); + $vendor = studly_case($this->ask('What is vendor name of the package?')); - $name = camel_case($this->ask('What is the pack...
true
Other
laravel
framework
5e1fd17b4b1f64659799fa07076e1e4d7a67ea8d.json
fix bug in relationship hydration.
src/Illuminate/Database/Eloquent/Model.php
@@ -1146,7 +1146,13 @@ public function relationsToArray() $key = snake_case($key); } - $attributes[$key] = $relation; + // If the relation value has been set, we will set it on this attributes + // list for returning. If it was not arrayable or null, we'll not set + // the value on the array because ...
false
Other
laravel
framework
16f9cf75b9d0e869bc1995741d4bddf91267fe21.json
move view error binding to a new booted event.
src/Illuminate/Foundation/Application.php
@@ -37,12 +37,19 @@ class Application extends Container implements HttpKernelInterface { protected $booted = false; /** - * Get the booting callbacks. + * The array of booting callbacks. * * @var array */ protected $bootingCallbacks = array(); + /** + * The array of booted callbacks. + * + * @va...
true
Other
laravel
framework
16f9cf75b9d0e869bc1995741d4bddf91267fe21.json
move view error binding to a new booted event.
src/Illuminate/View/ViewServiceProvider.php
@@ -141,7 +141,7 @@ protected function registerSessionBinder() { list($app, $me) = array($this->app, $this); - $app->before(function() use ($app, $me) + $app->booted(function() use ($app, $me) { // If the current session has an "errors" variable bound to it, we will share // its value with al...
true
Other
laravel
framework
6bac1991a30edcc8782553ab860046306a259d46.json
Remove config references from ViewServiceProvider. Signed-off-by: Ben Corlett <bencorlett@me.com>
src/Illuminate/View/ViewServiceProvider.php
@@ -84,9 +84,6 @@ public function registerBladeEngine($resolver) // instance to pass into the engine so it can compile the views properly. $compiler = new BladeCompiler($app['files'], $cache); - $compiler->setContentTags($app['config']['view.content_tags']); - $compiler->setRawContentTags($app['config...
false
Other
laravel
framework
fda17884e186d1115eb30f957e28a85639899196.json
fix bug in query grammer.
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -188,6 +188,8 @@ protected function compileWheres(Builder $query) { $sql = array(); + if (is_null($query->wheres)) return ''; + // Each type of where clauses has its own compiler function which is responsible // for actually creating the where clauses SQL. This helps keep the code nice // and mainta...
false
Other
laravel
framework
ca5b9bdcde45ea49dd85be465cc62cdd0daf18b1.json
remove preference for snake case from model.
src/Illuminate/Database/Eloquent/Model.php
@@ -365,9 +365,11 @@ public function belongsTo($related, $foreignKey = null) * Define an polymorphic, inverse one-to-one or many relationship. * * @param string $name + * @param string $type + * @param string $id * @return Illuminate\Database\Eloquent\Relations\BelongsTo */ - public function morp...
false
Other
laravel
framework
28545f43611f619b7d5c79287177ee537f2416a0.json
remove script from framework.
composer.json
@@ -77,8 +77,5 @@ "dev-master": "4.0-dev" } }, - "scripts": { - "post-autoload-dump": "./vendor/bin/classpreloader.php compile --config=preload/config.php --output=preload/compiled.php --fix_dir=1" - }, "minimum-stability": "dev" }
false
Other
laravel
framework
e1800bd62de541df76945c59ad3454009a170394.json
Fix optional parameter on Form::model()
src/Illuminate/Html/FormBuilder.php
@@ -121,7 +121,7 @@ public function open(array $options = array()) * @param array $options * @return string */ - public function model($model, array $options) + public function model($model, array $options = array()) { $this->model = $model;
false
Other
laravel
framework
13b93d100e8eae06a633d07883c5f5f5220a7690.json
fix bug with eager loading.
src/Illuminate/Database/Eloquent/Relations/Relation.php
@@ -105,12 +105,17 @@ public function getAndResetWheres() */ public function removeFirstWhereClause() { - array_shift($this->getBaseQuery()->wheres); + $first = array_shift($this->getBaseQuery()->wheres); + + $bindings = $this->getBaseQuery()->getBindings(); // When resetting the relation where clause, w...
false
Other
laravel
framework
e866588a64873177530ab463c2e31da80b8e091c.json
fix argument order.
src/Illuminate/Database/DatabaseManager.php
@@ -84,7 +84,7 @@ protected function makeConnection($name) return call_user_func($this->extensions[$name], $config); } - return $this->factory->make($name, $config); + return $this->factory->make($config, $name); } /**
false
Other
laravel
framework
ee6716ec3e4fd7e1e4fe291731cfbd3e2f3cdbe2.json
pass name to db connection.
src/Illuminate/Database/Connection.php
@@ -84,25 +84,35 @@ class Connection implements ConnectionInterface { */ protected $tablePrefix = ''; + /** + * The name of the database connection. + * + * @var string + */ + protected $name; + /** * Create a new database connection instance. * * @param PDO $pdo * @param string $databas...
true
Other
laravel
framework
ee6716ec3e4fd7e1e4fe291731cfbd3e2f3cdbe2.json
pass name to db connection.
src/Illuminate/Database/Connectors/ConnectionFactory.php
@@ -11,10 +11,11 @@ class ConnectionFactory { /** * Establish a PDO connection based on the configuration. * - * @param array $config + * @param array $config + * @param string $name * @return Illuminate\Database\Connection */ - public function make(array $config) + public function make(array $c...
true
Other
laravel
framework
ee6716ec3e4fd7e1e4fe291731cfbd3e2f3cdbe2.json
pass name to db connection.
src/Illuminate/Database/DatabaseManager.php
@@ -84,7 +84,7 @@ protected function makeConnection($name) return call_user_func($this->extensions[$name], $config); } - return $this->factory->make($config); + return $this->factory->make($name, $config); } /**
true
Other
laravel
framework
ee6716ec3e4fd7e1e4fe291731cfbd3e2f3cdbe2.json
pass name to db connection.
tests/Database/DatabaseConnectionFactoryTest.php
@@ -23,8 +23,8 @@ public function testMakeCallsCreateConnection() $connector->shouldReceive('connect')->once()->with($config)->andReturn($pdo); $factory->expects($this->once())->method('createConnector')->with($config)->will($this->returnValue($connector)); $mockConnection = m::mock('stdClass'); - $factory->e...
true
Other
laravel
framework
9e9f32a4f371fdb8c18ddb21c7eabb51a8a63a78.json
implement array access on models.
src/Illuminate/Database/Eloquent/Model.php
@@ -2,6 +2,7 @@ use Closure; use DateTime; +use ArrayAccess; use Illuminate\Events\Dispatcher; use Illuminate\Database\Connection; use Illuminate\Database\Eloquent\Relations\HasOne; @@ -15,7 +16,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Database\ConnectionResolverInterface a...
false
Other
laravel
framework
105541d3540aba4485f651ff7cec27745c920b53.json
fix bug in form builder.
src/Illuminate/Html/FormBuilder.php
@@ -549,9 +549,11 @@ protected function getAction(array $options) */ protected function getAppendage($method) { + $method = strtoupper($method); + if ($method == 'PUT' or $method == 'DELETE') { - $append = $this->hidden('_method', $method); + return $this->hidden('_method', $method); } return ...
false
Other
laravel
framework
0124a458f4cd2306fef0f4989f781781d6e271bd.json
fix seed method on test case.
src/Illuminate/Foundation/Testing/TestCase.php
@@ -114,14 +114,12 @@ public function be(UserInterface $user, $driver = null) /** * Seed a given database connection. * - * @param string $connection + * @param string $class * @return void */ - public function seed($connection = null) + public function seed($class = 'DatabaseSeeder') { - $connec...
false
Other
laravel
framework
3b862b0693a4ce3e13ecd73c65a9fe81e8c752f9.json
Fix ternary expr and add a space between lines
src/Illuminate/Support/Str.php
@@ -182,7 +182,8 @@ public static function slug($title, $separator = '-') $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); // Convert all dashes/undescores into separator - $flip = ($separator == '-' ? '_' : '-'); + $flip = $separator == '-' ? '_' : '-'; + $tit...
false
Other
laravel
framework
f132e3e894ea5db842ef054759c03b0088f7c955.json
Extend Str::slug for better result consistency
src/Illuminate/Support/Str.php
@@ -181,6 +181,10 @@ public static function slug($title, $separator = '-') // Remove all characters that are not the separator, letters, numbers, or whitespace. $title = preg_replace('![^'.preg_quote($separator).'\pL\pN\s]+!u', '', mb_strtolower($title)); + // Convert all dashes/undescores into separator + $f...
false
Other
laravel
framework
add7ee07f3b2f0304c1bec56f4365a8ae5d84d63.json
pass missing methods to console artisan.
src/Illuminate/Foundation/Artisan.php
@@ -70,4 +70,16 @@ protected function getArtisan() return $this->artisan = ConsoleApplication::start($this->app); } + /** + * Dynamically pass all missing methods to console Artisan. + * + * @param string $method + * @param array $parameters + * @return mixed + */ + public function __call($method, $pa...
false
Other
laravel
framework
4035bbc94ae809005d5941514b744cfc482d92da.json
use check date in the date validator.
src/Illuminate/Validation/Validator.php
@@ -825,7 +825,11 @@ protected function validateRegex($attribute, $value, $parameters) */ protected function validateDate($attribute, $value) { - return strtotime($value) !== false; + if (strtotime($value) === false) return false; + + $date = date_parse($value); + + return checkdate($date['month'], $date['da...
false
Other
laravel
framework
37e2bd8bf1fae80641fac1da950bf7ed0f368ca0.json
make patchwork a dev dependency of support.
src/Illuminate/Support/composer.json
@@ -9,9 +9,9 @@ ], "require": { "php": ">=5.3.0", - "patchwork/utf8": "1.0.*" }, "require-dev": { + "patchwork/utf8": "1.0.*", "mockery/mockery": "0.7.2" }, "autoload": {
false
Other
laravel
framework
3d13d49f322e4319e9f74fdeef2fdb33c2c364cc.json
fix bug in facade.
src/Illuminate/Support/Facades/Facade.php
@@ -24,7 +24,7 @@ abstract class Facade { */ public static function swap($instance) { - static::$resolvedInstance = $instance; + static::$resolvedInstance[static::getFacadeAccessor()] = $instance; static::$app->instance(static::getFacadeAccessor(), $instance); } @@ -37,9 +37,11 @@ public static function...
false
Other
laravel
framework
d19064cc0882301b1c33676ec4c6bd4dbb758f61.json
use one more namespace
src/Illuminate/Foundation/Console/KeyGenerateCommand.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Foundation\Console; +use Illuminate\Support\Str; use Illuminate\Console\Command; use Illuminate\Filesystem\Filesystem; @@ -62,7 +63,7 @@ public function fire() */ protected function getRandomKey() { - return Illuminate\Support\Str::random(32); + return Str::ran...
false
Other
laravel
framework
33f6acba80dd743e173e52d1b0e1116c6700b4d3.json
add an environment method to app.
src/Illuminate/Foundation/Application.php
@@ -136,6 +136,16 @@ public function startExceptionHandling() $provider->startHandling($this); } + /** + * Get the current application environment. + * + * @return string + */ + public function environment() + { + return $this['env']; + } + /** * Detect the application's current environment. * @@ -1...
false
Other
laravel
framework
9f162064acd421275de87f5a4dfe04915323c7d4.json
improve performance of snake case.
src/Illuminate/Support/Str.php
@@ -196,11 +196,9 @@ public static function slug($title, $separator = '-') */ public static function snake($value, $delimiter = '_') { - return trim(preg_replace_callback('/[A-Z]/', function($match) use ($delimiter) - { - return $delimiter.strtolower($match[0]); + $replace = '$1'.$delimiter.'$2'; - }, $v...
false
Other
laravel
framework
33ef4462ff94c4f5916aca8b65a4d7ad4747f72d.json
Use path.public to set 'public' folder location
src/Illuminate/Foundation/Console/ServeCommand.php
@@ -32,9 +32,11 @@ public function fire() $port = $this->input->getOption('port'); + $public = $this->laravel['path.public']; + $this->info("Laravel development server started on {$host}:{$port}..."); - passthru("php -S {$host}:{$port} -t public server.php"); + passthru("php -S {$host}:{$port} -t {$publi...
false
Other
laravel
framework
eb3b10aae62d00eeed18cb069ab8dcd51a8de6bc.json
update queue service provider.
src/Illuminate/Queue/QueueServiceProvider.php
@@ -3,6 +3,7 @@ use Illuminate\Support\ServiceProvider; use Illuminate\Queue\Console\WorkCommand; use Illuminate\Queue\Console\ListenCommand; +use Illuminate\Queue\Connectors\SqsConnector; use Illuminate\Queue\Connectors\SyncConnector; use Illuminate\Queue\Connectors\BeanstalkdConnector; @@ -123,7 +124,7 ...
false
Other
laravel
framework
ab4042741027289235d22980596a7c8eeb2c7852.json
convert arrays to message bags on redirect.
src/Illuminate/Http/RedirectResponse.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Http; +use Illuminate\Support\MessageBag; use Symfony\Component\HttpFoundation\Cookie; use Illuminate\Session\Store as SessionStore; use Illuminate\Support\Contracts\MessageProviderInterface; @@ -98,7 +99,7 @@ public function withErrors($provider) } else { - $...
true
Other
laravel
framework
ab4042741027289235d22980596a7c8eeb2c7852.json
convert arrays to message bags on redirect.
tests/Http/HttpResponseTest.php
@@ -71,6 +71,16 @@ public function testFlashingErrorsOnRedirect() $response->withErrors($provider); } + public function testRedirectWithErrorsArrayConvertsToMessageBag() + { + $response = new RedirectResponse('foo.bar'); + $response->setRequest(Request::create('/', 'GET', array('name...
true
Other
laravel
framework
3a4a1ef3ac563fa803fef73410cb7bf815cbac34.json
check relations on eloquent isset and unset.
composer.json
@@ -10,7 +10,7 @@ } ], "require": { - "php": ">=5.3.0", + "php": ">=5.3.7", "ext-mcrypt": "*", "ircmaxell/password-compat": "1.0.*", "monolog/monolog": "1.3.*",
true
Other
laravel
framework
3a4a1ef3ac563fa803fef73410cb7bf815cbac34.json
check relations on eloquent isset and unset.
src/Illuminate/Database/Eloquent/Model.php
@@ -1303,7 +1303,7 @@ public function __set($key, $value) */ public function __isset($key) { - return isset($this->attributes[$key]); + return isset($this->attributes[$key]) or isset($this->relations[$key]); } /** @@ -1315,6 +1315,8 @@ public function __isset($key) public function __unset($key) { ...
true
Other
laravel
framework
58df6abe3793d5bb009601090ca3f4aa4ba09ce3.json
Require the Mcrypt extension
composer.json
@@ -11,6 +11,7 @@ ], "require": { "php": ">=5.3.0", + "ext-mcrypt": "*", "ircmaxell/password-compat": "1.0.*", "monolog/monolog": "1.3.*", "swiftmailer/swiftmailer": "4.3.*",
false
Other
laravel
framework
e121c1a6886113cd5a5ac8968160928cc02b972f.json
Remove unused variable.
src/Illuminate/View/ViewServiceProvider.php
@@ -110,9 +110,7 @@ public function registerViewFinder() */ public function registerEnvironment() { - $me = $this; - - $this->app['view'] = $this->app->share(function($app) use ($me) + $this->app['view'] = $this->app->share(function($app) { // Next we need to grab the engine resolver instance t...
false
Other
laravel
framework
46186ccbb8069514eac8b0dc5951f12afaa69dee.json
change method visibility.
src/Illuminate/Foundation/Application.php
@@ -272,7 +272,7 @@ public function register(ServiceProvider $provider, $options = array()) * * @return void */ - protected function loadDeferredProviders() + public function loadDeferredProviders() { // We will simply spin through each of the deferred providers and register each // one and boot them i...
false
Other
laravel
framework
67f70afe1f4cdb472ba6dc28b03090e5153fb167.json
update reasons and readme.
readme.md
@@ -1,5 +1,10 @@ # Laravel 4 Beta Change Log +## Beta 3 + +- Fixed a few things in the ArrayStore session driver. +- Improve reasons in Password Broker. + ## Beta 2 - Migrated to ircmaxell's [password-compat](http://github.com/ircmaxell/password_compat) library for PHP 5.5 forward compatibility on hashes. No bac...
true
Other
laravel
framework
67f70afe1f4cdb472ba6dc28b03090e5153fb167.json
update reasons and readme.
src/Illuminate/Auth/Reminders/PasswordBroker.php
@@ -197,6 +197,8 @@ protected function validNewPasswords() */ protected function makeErrorRedirect($reason = '') { + if ($reason != '') $reason = 'reminders.'.$reason; + return $this->redirect->refresh()->with('error', true)->with('reason', $reason); }
true
Other
laravel
framework
67f70afe1f4cdb472ba6dc28b03090e5153fb167.json
update reasons and readme.
tests/Auth/AuthPasswordBrokerTest.php
@@ -84,7 +84,7 @@ public function testRedirectIsReturnedByResetWhenUserCredentialsInvalid() $mocks['users']->shouldReceive('retrieveByCredentials')->once()->with(array('creds'))->andReturn(null); $mocks['redirect']->shouldReceive('refresh')->andReturn($redirect = m::mock('Illuminate\Http\RedirectResponse')); $...
true
Other
laravel
framework
bcb60d1538df19c31825d19df2d5717e329ec8b0.json
allow plain text emails only.
src/Illuminate/Mail/Mailer.php
@@ -76,6 +76,19 @@ public function alwaysFrom($address, $name = null) $this->from = compact('address', 'name'); } + /** + * Send a new message when only a plain part. + * + * @param string $view + * @param array $data + * @param mixed $callback + * @return void + */ + public function plain($view, a...
true
Other
laravel
framework
bcb60d1538df19c31825d19df2d5717e329ec8b0.json
allow plain text emails only.
tests/Mail/MailMailerTest.php
@@ -50,6 +50,27 @@ public function testMailerSendSendsMessageWithProperPlainViewContent() } + public function testMailerSendSendsMessageWithProperPlainViewContentWhenExplicit() + { + unset($_SERVER['__mailer.test']); + $mailer = $this->getMock('Illuminate\Mail\Mailer', array('createMessage'), $this->getMocks())...
true
Other
laravel
framework
651bf0125104bd655781f4889f95c1fda9fc2aa7.json
fix a couple of typos in readme.
readme.md
@@ -26,7 +26,7 @@ - Added `Config::hasGroup` method. - Added `DB::unprepared` method for running raw, unprepared queries against PDO. - Allow `:key` place-holder in MessageBag messages. -- Added `Auth::validate` method for validating credentials without logging in.fatal +- Added `Auth::validate` method for validatin...
false
Other
laravel
framework
5db2ae9b7619c5d49955ff1b964678ac29e267f4.json
remove old import.
src/Illuminate/Routing/Controllers/Controller.php
@@ -4,7 +4,6 @@ use ReflectionClass; use Illuminate\Routing\Router; use Illuminate\Container\Container; -use Doctrine\Common\Annotations\SimpleAnnotationReader; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; class Controller {
false
Other
laravel
framework
340810a187804801f078e054172750e7d998e7f4.json
pass primary to insertGetId.
src/Illuminate/Database/Eloquent/Model.php
@@ -495,7 +495,7 @@ public function save() { if ($this->incrementing) { - $this->$keyName = $query->insertGetId($this->attributes); + $this->$keyName = $query->insertGetId($this->attributes, $keyName); } else {
true
Other
laravel
framework
340810a187804801f078e054172750e7d998e7f4.json
pass primary to insertGetId.
tests/Database/DatabaseEloquentModelTest.php
@@ -174,7 +174,7 @@ public function testInsertProcess() { $model = $this->getMock('EloquentModelStub', array('newQuery', 'updateTimestamps')); $query = m::mock('Illuminate\Database\Eloquent\Builder'); - $query->shouldReceive('insertGetId')->once()->with(array('name' => 'taylor'))->andReturn(1); + $query->shou...
true
Other
laravel
framework
a55b886f08668a0aee65752be6c4c9695746c9d6.json
use getSessionStore in request class.
src/Illuminate/Http/Request.php
@@ -283,7 +283,7 @@ public function flash($filter = null, $keys = array()) { $flash = ( ! is_null($filter)) ? $this->$filter($keys) : $this->input(); - $this->sessionStore->flashInput($flash); + $this->getSessionStore()->flashInput($flash); } /** @@ -315,7 +315,7 @@ public function flashExcept() */ ...
false
Other
laravel
framework
8c47b5b8f108de1fccc70727d9c013c57dd1a4fa.json
fix bug in belongToMany when using first.
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -64,6 +64,19 @@ public function getResults() return $this->get(); } + /** + * Execute the query and get the first result. + * + * @param array $columns + * @return mixed + */ + public function first($columns = array('*')) + { + $results = $this->take(1)->get($columns); + + return count($results) > 0...
false
Other
laravel
framework
751dff74fa541ec1a832320585abd8a9060e9f39.json
fix first method on eloquent builder.
src/Illuminate/Database/Eloquent/Builder.php
@@ -70,7 +70,7 @@ public function find($id, $columns = array('*')) */ public function first($columns = array('*')) { - return $this->get($columns)->first(); + return $this->take(1)->get($columns)->first(); } /**
true
Other
laravel
framework
751dff74fa541ec1a832320585abd8a9060e9f39.json
fix first method on eloquent builder.
tests/Database/DatabaseEloquentBuilderTest.php
@@ -29,9 +29,10 @@ public function testFindMethod() public function testFirstMethod() { - $builder = $this->getMock('Illuminate\Database\Eloquent\Builder', array('get'), $this->getMocks()); + $builder = $this->getMock('Illuminate\Database\Eloquent\Builder', array('get', 'take'), $this->getMocks()); $collecti...
true
Other
laravel
framework
9fbabd3e897b3366b9a6c116e5d23768f648f5d0.json
fix doc block.
src/Illuminate/Encryption/Encrypter.php
@@ -140,7 +140,8 @@ protected function getJsonPayload($payload) /** * Create a MAC for the given value. * - * @parma + * @param string $value + * @return string */ protected function hash($value) {
false
Other
laravel
framework
28b6f2e6c9490d4d55ccdeeb6dbd8352c15bfb28.json
Add implicit extensions to validator
src/Illuminate/Validation/Factory.php
@@ -26,6 +26,13 @@ class Factory { */ protected $extensions = array(); + /** + * All of the custom implicit validator extensions. + * + * @var array + */ + protected $implicitExtensions = array(); + /** * The Validator resolver instance. * @@ -63,6 +70,8 @@ public function make(array $data, array $ru...
true
Other
laravel
framework
28b6f2e6c9490d4d55ccdeeb6dbd8352c15bfb28.json
Add implicit extensions to validator
src/Illuminate/Validation/Validator.php
@@ -1318,6 +1318,22 @@ public function addExtensions(array $extensions) $this->extensions = array_merge($this->extensions, $extensions); } + /** + * Register an array of custom implicit validator extensions. + * + * @param array $extensions + * @return void + */ + public function addImplicitExtensions(arr...
true