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
df01d9e85140e898f20f6ba8566ba052f80d5c5c.json
Add keys to transfrom
tests/Support/SupportCollectionTest.php
@@ -495,9 +495,9 @@ public function testGetListValueWithAccessors() public function testTransform() { - $data = new Collection(array('taylor', 'colin', 'shawn')); - $data->transform(function($item) { return strrev($item); }); - $this->assertEquals(array('rolyat', 'niloc', 'nwahs'), array_values($data->all()));...
true
Other
laravel
framework
27474ee6013a96a8a6acef5b16bf92c51ed6eadb.json
Combine sort tests
tests/Support/SupportCollectionTest.php
@@ -237,16 +237,10 @@ public function testCollapseWithNestedCollactions() public function testSort() { $data = (new Collection([5, 3, 1, 2, 4]))->sort(); + $this->assertEquals([1, 2, 3, 4, 5], $data->values()->all()); - $this->assertEquals(range(1, 5), array_values($data->all())); - } - - - public function t...
false
Other
laravel
framework
1232e5e7baf7d6faeed139ff6014bb5b5bc66e10.json
Add keys to transform
src/Illuminate/Support/Collection.php
@@ -740,7 +740,7 @@ public function take($limit = null) */ public function transform(callable $callback) { - $this->items = array_map($callback, $this->items); + $this->items = array_map($callback, $this->items, array_keys($this->items)); return $this; }
true
Other
laravel
framework
1232e5e7baf7d6faeed139ff6014bb5b5bc66e10.json
Add keys to transform
tests/Support/SupportCollectionTest.php
@@ -494,8 +494,8 @@ public function testGetListValueWithAccessors() public function testTransform() { $data = new Collection(array('taylor', 'colin', 'shawn')); - $data->transform(function($item) { return strrev($item); }); - $this->assertEquals(array('rolyat', 'niloc', 'nwahs'), array_values($data->all())); +...
true
Other
laravel
framework
e57cb0d968841bd67bf2b8eb589d4479de924ee1.json
Return a new instance from sortBy and sortByDesc
src/Illuminate/Support/Collection.php
@@ -636,7 +636,7 @@ public function sort(callable $callback) * @param callable|string $callback * @param int $options * @param bool $descending - * @return $this + * @return static */ public function sortBy($callback, $options = SORT_REGULAR, $descending = false) { @@ -663,17 +663,15 @@ public ...
true
Other
laravel
framework
e57cb0d968841bd67bf2b8eb589d4479de924ee1.json
Return a new instance from sortBy and sortByDesc
tests/Support/SupportCollectionTest.php
@@ -257,7 +257,7 @@ public function testSortBy() $this->assertEquals(array('dayle', 'taylor'), array_values($data->all())); $data = new Collection(array('dayle', 'taylor')); - $data->sortByDesc(function($x) { return $x; }); + $data = $data->sortByDesc(function($x) { return $x; }); $this->assertEquals(arr...
true
Other
laravel
framework
a0b12ce1357348f849fb00020b39e0b924dc8e73.json
Return a new collection from sort
src/Illuminate/Support/Collection.php
@@ -619,13 +619,15 @@ public function chunk($size, $preserveKeys = false) * Sort through each item with a callback. * * @param callable $callback - * @return $this + * @return static */ public function sort(callable $callback) { - uasort($this->items, $callback); + $items = $this->items; - retu...
true
Other
laravel
framework
a0b12ce1357348f849fb00020b39e0b924dc8e73.json
Return a new collection from sort
tests/Support/SupportCollectionTest.php
@@ -236,8 +236,7 @@ public function testCollapseWithNestedCollactions() public function testSort() { - $data = new Collection(array(5, 3, 1, 2, 4)); - $data->sort(function($a, $b) + $data = (new Collection([5, 3, 1, 2, 4]))->sort(function($a, $b) { if ($a === $b) {
true
Other
laravel
framework
238f638b08428a86a5fb6ee06715620bcbcf8532.json
Return a new collection from shuffle
src/Illuminate/Support/Collection.php
@@ -572,13 +572,15 @@ public function shift() /** * Shuffle the items in the collection. * - * @return $this + * @return static */ public function shuffle() { - shuffle($this->items); + $items = $this->items; - return $this; + array_shuffle($items); + + return new static($items); } /**
false
Other
laravel
framework
6c5d82c76fc50d930191217f53f9c32d0dd1c0e6.json
Seperate Auth and Registration traits. Simplifies opting out of Registration.
src/Illuminate/Foundation/Auth/AuthenticatesAndRegistersUsers.php
@@ -1,134 +1,9 @@ <?php namespace Illuminate\Foundation\Auth; -use Illuminate\Http\Request; -use Illuminate\Support\Facades\Auth; - trait AuthenticatesAndRegistersUsers { - /** - * Show the application registration form. - * - * @return \Illuminate\Http\Response - */ - public function getRegister() - { - ret...
true
Other
laravel
framework
6c5d82c76fc50d930191217f53f9c32d0dd1c0e6.json
Seperate Auth and Registration traits. Simplifies opting out of Registration.
src/Illuminate/Foundation/Auth/AuthenticatesUsers.php
@@ -0,0 +1,89 @@ +<?php namespace Illuminate\Foundation\Auth; + +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; + +trait AuthenticatesUsers { + + use Redirectable; + + /** + * Show the application login form. + * + * @return \Illuminate\Http\Response + */ + public function getLogin() + { + retu...
true
Other
laravel
framework
6c5d82c76fc50d930191217f53f9c32d0dd1c0e6.json
Seperate Auth and Registration traits. Simplifies opting out of Registration.
src/Illuminate/Foundation/Auth/Redirectable.php
@@ -0,0 +1,20 @@ +<?php namespace Illuminate\Foundation\Auth; + +trait Redirectable { + + /** + * Get the post register / login redirect path. + * + * @return string + */ + public function redirectPath() + { + if (property_exists($this, 'redirectPath')) + { + return $this->redirectPath; + } + + return propert...
true
Other
laravel
framework
6c5d82c76fc50d930191217f53f9c32d0dd1c0e6.json
Seperate Auth and Registration traits. Simplifies opting out of Registration.
src/Illuminate/Foundation/Auth/RegistersUsers.php
@@ -0,0 +1,42 @@ +<?php namespace Illuminate\Foundation\Auth; + +use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; + +trait RegistersUsers { + + use Redirectable; + + /** + * Show the application registration form. + * + * @return \Illuminate\Http\Response + */ + public function getRegister() + { +...
true
Other
laravel
framework
ce821c04a0fe042892629217701307253626cf72.json
Use self and static
src/Illuminate/Database/Eloquent/Model.php
@@ -1613,7 +1613,7 @@ public function touchOwners() { $this->$relation()->touch(); - if ($this->$relation instanceof Model) + if ($this->$relation instanceof self) { $this->$relation->touchOwners(); }
true
Other
laravel
framework
ce821c04a0fe042892629217701307253626cf72.json
Use self and static
src/Illuminate/Database/Query/Builder.php
@@ -251,7 +251,7 @@ public function selectSub($query, $as) $callback($query = $this->newQuery()); } - if ($query instanceof Builder) + if ($query instanceof self) { $bindings = $query->getBindings(); @@ -1816,7 +1816,7 @@ public function truncate() */ public function newQuery() { - return ne...
true
Other
laravel
framework
ce821c04a0fe042892629217701307253626cf72.json
Use self and static
src/Illuminate/Support/Collection.php
@@ -925,7 +925,7 @@ public function __toString() */ protected function getArrayableItems($items) { - if ($items instanceof Collection) + if ($items instanceof self) { $items = $items->all(); }
true
Other
laravel
framework
b4c81de41528e65d61e12b5959a6b24921e4c497.json
Remove duplicate linebreks
src/Illuminate/Console/Scheduling/Event.php
@@ -182,7 +182,6 @@ public function buildCommand() $command = $this->command.' > '.$this->output.' 2>&1 &'; } - return $this->user ? 'sudo -u '.$this->user.' '.$command : $command; }
true
Other
laravel
framework
b4c81de41528e65d61e12b5959a6b24921e4c497.json
Remove duplicate linebreks
src/Illuminate/Database/Eloquent/Model.php
@@ -3046,7 +3046,6 @@ public function getRelation($relation) return $this->relations[$relation]; } - /** * Determine if the given relation is loaded. *
true
Other
laravel
framework
b4c81de41528e65d61e12b5959a6b24921e4c497.json
Remove duplicate linebreks
src/Illuminate/Foundation/helpers.php
@@ -293,7 +293,6 @@ function factory() } } - if ( ! function_exists('get')) { /**
true
Other
laravel
framework
b4c81de41528e65d61e12b5959a6b24921e4c497.json
Remove duplicate linebreks
src/Illuminate/Support/helpers.php
@@ -588,7 +588,6 @@ function array_sort_recursive($array) { } } - if ( ! function_exists('snake_case')) { /**
true
Other
laravel
framework
7bd077e01692c04329c26148c54f648c3151d5d4.json
Remove unused use
src/Illuminate/Broadcasting/BroadcastEvent.php
@@ -1,6 +1,5 @@ <?php namespace Illuminate\Broadcasting; -use Pusher; use ReflectionClass; use ReflectionProperty; use Illuminate\Contracts\Queue\Job;
true
Other
laravel
framework
7bd077e01692c04329c26148c54f648c3151d5d4.json
Remove unused use
src/Illuminate/Console/Command.php
@@ -8,7 +8,6 @@ use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Question\ChoiceQuestion; -use Symfony\Component\Console\Question\ConfirmationQuestion; use Illuminate\Contracts\Foundation\Application as LaravelApplication; cla...
true
Other
laravel
framework
7bd077e01692c04329c26148c54f648c3151d5d4.json
Remove unused use
src/Illuminate/Foundation/Auth/AuthenticatesAndRegistersUsers.php
@@ -2,8 +2,6 @@ use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; -use Illuminate\Contracts\Auth\Guard; -use Illuminate\Contracts\Auth\Registrar; trait AuthenticatesAndRegistersUsers {
true
Other
laravel
framework
7bd077e01692c04329c26148c54f648c3151d5d4.json
Remove unused use
src/Illuminate/Session/SessionManager.php
@@ -1,6 +1,5 @@ <?php namespace Illuminate\Session; -use InvalidArgumentException; use Illuminate\Support\Manager; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler;
true
Other
laravel
framework
7bd077e01692c04329c26148c54f648c3151d5d4.json
Remove unused use
src/Illuminate/Support/Collection.php
@@ -1,6 +1,5 @@ <?php namespace Illuminate\Support; -use Closure; use Countable; use ArrayAccess; use ArrayIterator;
true
Other
laravel
framework
83167a14ad2a378eaf9bc8b21acc14d0f9ceb445.json
Add docblock to toIlluminateResponse
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -2,6 +2,7 @@ use Exception; use Psr\Log\LoggerInterface; +use Illuminate\Http\Response; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\Console\Application as ConsoleApplication; use Symfony\Component\Debug\ExceptionHandler as SymfonyDisplayer; @@ -93,9 +94,16 @@ public functio...
false
Other
laravel
framework
17ee7b365145d4e75ecc695159ff6e68a8e2e262.json
Fix BelongsToMany::firstOrNew logic
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -629,7 +629,7 @@ public function firstOrNew(array $attributes) { if (is_null($instance = $this->where($attributes)->first())) { - $instance = $this->related->newInstance(); + $instance = $this->related->newInstance($attributes); } return $instance;
false
Other
laravel
framework
0b94f5c6df65b31d0cd238b8ebe17554a0131290.json
Fix MorphOneOrMany::firstOrNew logic
src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php
@@ -125,7 +125,7 @@ public function firstOrNew(array $attributes) { if (is_null($instance = $this->where($attributes)->first())) { - $instance = $this->related->newInstance(); + $instance = $this->related->newInstance($attributes); // When saving a polymorphic relationship, we need to set not only the...
true
Other
laravel
framework
0b94f5c6df65b31d0cd238b8ebe17554a0131290.json
Fix MorphOneOrMany::firstOrNew logic
tests/Database/DatabaseEloquentMorphTest.php
@@ -110,7 +110,7 @@ public function testFirstOrNewMethodReturnsNewModelWithMorphKeysSet() $relation = $this->getOneRelation(); $relation->getQuery()->shouldReceive('where')->once()->with(array('foo'))->andReturn($relation->getQuery()); $relation->getQuery()->shouldReceive('first')->once()->with()->andReturn(nu...
true
Other
laravel
framework
6641ac81c635afc34111dc74e20319e62198f542.json
Add route callable test
tests/Routing/RoutingRouteTest.php
@@ -79,6 +79,10 @@ public function testBasicDispatchingOfRoutes() $router = $this->getRouter(); $router->get('foo/bar/åαф', function() { return 'hello'; }); $this->assertEquals('hello', $router->dispatch(Request::create('foo/bar/%C3%A5%CE%B1%D1%84', 'GET'))->getContent()); + + $router = $this->getRouter(); + ...
false
Other
laravel
framework
81b73380617307adb055c1ac2062da22b2007e8d.json
Use php 7 random_bytes if available
src/Illuminate/Support/Str.php
@@ -213,12 +213,18 @@ public static function plural($value, $count = 2) */ public static function random($length = 16) { - if ( ! function_exists('openssl_random_pseudo_bytes')) + if (function_exists('random_bytes')) { - throw new RuntimeException('OpenSSL extension is required.'); + $bytes = random_byt...
false
Other
laravel
framework
e057f68d5f3672ab4b63cc58b1c2d6ffd7adc4e6.json
fix method name.
src/Illuminate/Foundation/Auth/ResetsPasswords.php
@@ -89,7 +89,7 @@ public function postReset(Request $request) $response = Password::reset($credentials, function($user, $password) { - $this->passwordReset($user, $password); + $this->resetPassword($user, $password); }); switch ($response) @@ -105,12 +105,13 @@ public function postReset(Request $req...
false
Other
laravel
framework
6f4ca0ab18290f55edcba9ae16496af2dcd97b86.json
Allow specification of queue and delay.
src/Illuminate/Bus/Dispatcher.php
@@ -254,10 +254,34 @@ public function dispatchToQueue($command) } else { - $queue->push($command); + $this->pushCommandToQueue($queue, $command); } } + /** + * Push the command onto the given queue instance. + * + * @param \Illuminate\Contracts\Queue\Queue $queue + * @param mixed $command + ...
true
Other
laravel
framework
6f4ca0ab18290f55edcba9ae16496af2dcd97b86.json
Allow specification of queue and delay.
tests/Bus/BusDispatcherTest.php
@@ -52,6 +52,19 @@ public function testCommandsThatShouldBeQueuedAreQueuedUsingCustomHandler() } + public function testCommandsThatShouldBeQueuedAreQueuedUsingCustomQueueAndDelay() + { + $container = new Container; + $dispatcher = new Dispatcher($container, function() { + $mock = m::mock('Illuminate\Contracts...
true
Other
laravel
framework
fab6b0a6410158eee1d9b8939464441eea5488aa.json
Change trait name.
src/Illuminate/Foundation/Bus/DispatchesCommands.php
@@ -2,6 +2,9 @@ use ArrayAccess; +/** + * This trait is deprecated. Use the DispatchesJobs trait. + */ trait DispatchesCommands { /**
true
Other
laravel
framework
fab6b0a6410158eee1d9b8939464441eea5488aa.json
Change trait name.
src/Illuminate/Foundation/Bus/DispatchesJobs.php
@@ -0,0 +1,43 @@ +<?php namespace Illuminate\Foundation\Bus; + +use ArrayAccess; + +trait DispatchesJobs { + + /** + * Dispatch a job to its appropriate handler. + * + * @param mixed $job + * @return mixed + */ + protected function dispatch($job) + { + return app('Illuminate\Contracts\Bus\Dispatcher')->dispatch...
true
Other
laravel
framework
f75dd781e2f174e936cf900f1ebf601631c3ab5a.json
Allow easily mocking of expected jobs.
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -87,6 +87,32 @@ protected function withoutEvents() return $this; } + /** + * Specify a list of jobs that should be dispatched for the given operation. + * + * These jobs will be mocked, so that handlers will not actually be executed. + * + * @param array|dynamic $jobs + *...
false
Other
laravel
framework
90779e6318a7e115d19416da17f1440194d66f59.json
Remove unused code
src/Illuminate/Auth/Passwords/DatabaseTokenRepository.php
@@ -66,7 +66,7 @@ public function create(CanResetPasswordContract $user) // We will create a new, random token for the user so that we can e-mail them // a safe link to the password reset form. Then we will insert a record in // the database so that we can verify the token within the actual reset. - $token = ...
false
Other
laravel
framework
181810cfdacdc50d47a80eb88ae441b38ae16dc8.json
Add withSession helper.
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -87,6 +87,19 @@ protected function withoutEvents() return $this; } + /** + * Set the session to the given array. + * + * @param array $data + * @return void + */ + public function withSession(array $data) + { + $this->session($data); + + return $this; + ...
false
Other
laravel
framework
aa0d0ac1fd87ded7095c34c0c4c63a93459022f5.json
Fix wrong contribution.
src/Illuminate/Database/Migrations/DatabaseMigrationRepository.php
@@ -45,7 +45,7 @@ public function __construct(Resolver $resolver, $table) */ public function getRan() { - return $this->table()->orderBy('migration', 'asc')->lists('migration'); + return $this->table()->lists('migration'); } /**
true
Other
laravel
framework
aa0d0ac1fd87ded7095c34c0c4c63a93459022f5.json
Fix wrong contribution.
tests/Database/DatabaseMigrationRepositoryTest.php
@@ -18,7 +18,6 @@ public function testGetRanMigrationsListMigrationsByPackage() $connectionMock = m::mock('Illuminate\Database\Connection'); $repo->getConnectionResolver()->shouldReceive('connection')->with(null)->andReturn($connectionMock); $repo->getConnection()->shouldReceive('table')->once()->with('migrati...
true
Other
laravel
framework
0fdd6241f236508d24b3c09d11d054056b45254f.json
Make an Eloquent collection.
src/Illuminate/Database/Eloquent/FactoryBuilder.php
@@ -104,7 +104,7 @@ public function make(array $attributes = array()) $results[] = $this->makeInstance($attributes); } - return collect($results); + return new Collection($results); } }
false
Other
laravel
framework
a8be30e6411cdfe97d13abd497cc267ba911aae7.json
Add expectEvents method.
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -31,6 +31,32 @@ protected function refreshApplication() $this->app = $this->createApplication(); } + /** + * Specify a list of events that should be fired for the given operation. + * + * These events will be mocked, so that handlers will not actually be executed. + * + * @para...
false
Other
laravel
framework
cbda6e1d86b57751ee7dab99ee1d4c32d4abd32a.json
Remove un-used classes from import.
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -1,11 +1,6 @@ <?php namespace Illuminate\Foundation\Testing; -use Illuminate\Http\Request; -use InvalidArgumentException; -use Symfony\Component\DomCrawler\Form; -use Symfony\Component\DomCrawler\Crawler; use Illuminate\Contracts\Auth\Authenticatable as UserContract; -use PHPUnit_Framework_ExpectationFailedExcep...
false
Other
laravel
framework
8efd39e5b6d5e74928a40709ee54d7ef3c591b89.json
Commit application trait.
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -0,0 +1,111 @@ +<?php namespace Illuminate\Foundation\Testing; + +use Illuminate\Http\Request; +use InvalidArgumentException; +use Symfony\Component\DomCrawler\Form; +use Symfony\Component\DomCrawler\Crawler; +use Illuminate\Contracts\Auth\Authenticatable as UserContract; +use PHPUnit_Framework_ExpectationFailedExce...
false
Other
laravel
framework
2eed3b634937971edaf6df41c66bb799e3a7961a.json
Break crawler logic into Crawler trait.
src/Illuminate/Foundation/Testing/CrawlerTrait.php
@@ -4,32 +4,17 @@ use InvalidArgumentException; use Symfony\Component\DomCrawler\Form; use Symfony\Component\DomCrawler\Crawler; -use Illuminate\Contracts\Auth\Authenticatable as UserContract; use PHPUnit_Framework_ExpectationFailedException as PHPUnitException; -trait ApplicationTrait +trait CrawlerTrait { - ...
true
Other
laravel
framework
2eed3b634937971edaf6df41c66bb799e3a7961a.json
Break crawler logic into Crawler trait.
src/Illuminate/Foundation/Testing/TestCase.php
@@ -5,7 +5,7 @@ abstract class TestCase extends PHPUnit_Framework_TestCase { - use ApplicationTrait, AssertionsTrait; + use ApplicationTrait, AssertionsTrait, CrawlerTrait; /** * The callbacks that should be run before the application is destroyed.
true
Other
laravel
framework
a4ec4a183492b351ee1e67c2902dbe8c2b1a98a2.json
Fix method name.
src/Illuminate/Foundation/Testing/ApplicationTrait.php
@@ -116,6 +116,18 @@ public function route($method, $name, $routeParameters = [], $parameters = [], $ return $this->response = $this->call($method, $uri, $parameters, $cookies, $files, $server, $content); } + /** + * Disable middleware for the test. + * + * @return $this + */ + public function withoutMiddlew...
true
Other
laravel
framework
a4ec4a183492b351ee1e67c2902dbe8c2b1a98a2.json
Fix method name.
src/Illuminate/Foundation/Testing/WithoutMiddleware.php
@@ -0,0 +1,18 @@ +<?php namespace Illuminate\Foundation\Testing; + +use Exception; + +trait WithoutMiddleware +{ + /** + * @before + */ + public function disableMiddlewareForAllTests() + { + if (method_exists($this, 'withoutMiddleware')) { + $this->withoutMiddleware(); + } else...
true
Other
laravel
framework
0f67cf19abc74ba5ee2bdc9c946b2bf62d85149c.json
Allow disabling of middleware (for test reasons).
src/Illuminate/Foundation/Http/Kernel.php
@@ -111,9 +111,12 @@ protected function sendRequestThroughRouter($request) $this->verifySessionConfigurationIsValid(); + $shouldSkipMiddleware = $this->app->bound('middleware.disable') && + $this->app->make('middleware.disable') === true; + return (new Pipeline($this->app)) ...
true
Other
laravel
framework
0f67cf19abc74ba5ee2bdc9c946b2bf62d85149c.json
Allow disabling of middleware (for test reasons).
src/Illuminate/Routing/ControllerDispatcher.php
@@ -96,12 +96,15 @@ protected function callWithinStack($instance, $route, $request, $method) { $middleware = $this->getMiddleware($instance, $method); + $shouldSkipMiddleware = $this->container->bound('middleware.disable') && + $this->container->make('middleware.disable') === true; + ...
true
Other
laravel
framework
0f67cf19abc74ba5ee2bdc9c946b2bf62d85149c.json
Allow disabling of middleware (for test reasons).
src/Illuminate/Routing/Router.php
@@ -691,9 +691,12 @@ protected function runRouteWithinStack(Route $route, Request $request) { $middleware = $this->gatherRouteMiddlewares($route); + $shouldSkipMiddleware = $this->container->bound('middleware.disable') && + $this->container->make('middleware.disable') === true; + ret...
true
Other
laravel
framework
55f7981c51a658bcdfb3ab66b1a3c63998fc998e.json
Simplify resets password trait.
src/Illuminate/Foundation/Auth/ResetsPasswords.php
@@ -2,26 +2,12 @@ use Illuminate\Http\Request; use Illuminate\Mail\Message; -use Illuminate\Contracts\Auth\Guard; -use Illuminate\Contracts\Auth\PasswordBroker; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Password; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; trait...
false
Other
laravel
framework
5c77de1cc2ea9ecfbcf77c53643aabc3e1ca6da3.json
Add support for broadcastAs.
src/Illuminate/Broadcasting/BroadcastEvent.php
@@ -39,8 +39,11 @@ public function fire(Job $job, array $data) { $event = unserialize($data['event']); + $name = method_exists($event, 'broadcastAs') + ? $event->broadcastAs() : get_class($event); + $this->broadcaster->broadcast( - $event->broadcastOn(), get_cla...
false
Other
laravel
framework
791dcdbf9c250ad064cad5264bf29069406cfc5d.json
Remove Echo :)
src/Illuminate/Redis/Database.php
@@ -116,7 +116,6 @@ public function subscribe($channels, Closure $callback, $connection = null, $met call_user_func_array([$loop, $method], (array) $channels); foreach ($loop as $message) { - echo $message->kind.PHP_EOL; if ($message->kind === 'message' || $message->kind === 'pmessage') { call_user_f...
false
Other
laravel
framework
5b03efd7958274b43b3a41811f94025ec77843a0.json
Unserialize the data key within the data parameter The serialized job information is held within the data parameter's 'data' key, not the parameter itself.
src/Illuminate/Events/CallQueuedHandler.php
@@ -75,7 +75,7 @@ public function failed(array $data) if (method_exists($handler, 'failed')) { - call_user_func_array([$handler, 'failed'], unserialize($data)); + call_user_func_array([$handler, 'failed'], unserialize($data['data'])); } }
false
Other
laravel
framework
fa36872d817112c72d96ad5d5f45c901d262fe5f.json
Filter public properties
src/Illuminate/Broadcasting/BroadcastEvent.php
@@ -2,6 +2,7 @@ use Pusher; use ReflectionClass; +use ReflectionProperty; use Illuminate\Contracts\Queue\Job; use Illuminate\Contracts\Support\Arrayable; use Illuminate\Contracts\Broadcasting\Broadcaster; @@ -59,10 +60,8 @@ protected function getPayloadFromEvent($event) $payload = []; - forea...
false
Other
laravel
framework
becb439ce4a85e54979feff29886276ad180c232.json
Add support for easy SUBSCRIBE.
src/Illuminate/Redis/Database.php
@@ -106,23 +106,38 @@ public function command($method, array $parameters = array()) * @param array|string $channels * @param \Closure $callback * @param string $connection + * @param string $method * @return void */ - public function subscribe($channels, Closure $callback, $connection = null) + ...
false
Other
laravel
framework
fcf13f69ae2b6331b6780e495fe09cf88ebedc6d.json
Pass exception variable.
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -117,7 +117,7 @@ protected function renderHttpException(HttpException $e) if (view()->exists("errors.{$status}")) { - return response()->view("errors.{$status}", ['e' => $e], $status); + return response()->view("errors.{$status}", ['exception' => $e], $status); } else {
false
Other
laravel
framework
a021cf29b8cfdceb28b37e36425acf8067297eae.json
Pass Exception object to view Sometimes when making a custom error view you'd like to be able to show the very error message thrown by the framework. Or sometimes you yourself break the application with a App::abort(404, 'User not found'), rather than just a default 404. By passing the Exception object, you allow ...
src/Illuminate/Foundation/Exceptions/Handler.php
@@ -117,7 +117,7 @@ protected function renderHttpException(HttpException $e) if (view()->exists("errors.{$status}")) { - return response()->view("errors.{$status}", [], $status); + return response()->view("errors.{$status}", ['e' => $e], $status); } else {
false
Other
laravel
framework
378a4bff5f38f670a0c1a5978be523d70b00e0e3.json
Throw exception on Cookie session driver.
src/Illuminate/Session/SessionManager.php
@@ -1,5 +1,6 @@ <?php namespace Illuminate\Session; +use InvalidArgumentException; use Illuminate\Support\Manager; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; @@ -33,9 +34,9 @@ protected function createArrayDriver() */ protected function createCookieDriver() { - $life...
false
Other
laravel
framework
78c3357578dc83984f82bb88d0c15d23311f3d28.json
Batch insert correction No longer uses the first element to define the values of all inserting records. This was a bug because if one of the parameters was an expression then the same expression value would be inserted for all records. Test included.
src/Illuminate/Database/Query/Grammars/Grammar.php
@@ -624,12 +624,12 @@ public function compileInsert(Builder $query, array $values) $columns = $this->columnize(array_keys(reset($values))); - // We need to build a list of parameter place-holders of values that are bound - // to the query. Each insert should have the exact same amount of parameter - // bindin...
true
Other
laravel
framework
78c3357578dc83984f82bb88d0c15d23311f3d28.json
Batch insert correction No longer uses the first element to define the values of all inserting records. This was a bug because if one of the parameters was an expression then the same expression value would be inserted for all records. Test included.
tests/Database/DatabaseQueryBuilderTest.php
@@ -926,6 +926,15 @@ public function testInsertMethodRespectsRawBindings() } + public function testMultipleInsertsWithExpressionValues() + { + $builder = $this->getBuilder(); + $builder->getConnection()->shouldReceive('insert')->once()->with('insert into "users" ("email") values (UPPER(\'Foo\')), (LOWER(\'Foo\'...
true
Other
laravel
framework
7dca817417ef3db4812814b61e480563bb45cf0d.json
Fix empty morph to relationship
src/Illuminate/Database/Eloquent/Relations/MorphTo.php
@@ -53,6 +53,18 @@ public function __construct(Builder $query, Model $parent, $foreignKey, $otherKe parent::__construct($query, $parent, $foreignKey, $otherKey, $relation); } + /** + * Get the results of the relationship. + * + * @return mixed + */ + public function getResults() + { + if ( ! $this->otherKey...
true
Other
laravel
framework
7dca817417ef3db4812814b61e480563bb45cf0d.json
Fix empty morph to relationship
tests/Database/DatabaseEloquentIntegrationTest.php
@@ -324,6 +324,14 @@ public function testBasicMorphManyRelationship() } + public function testEmptyMorphToRelationship() + { + $photo = EloquentTestPhoto::create(['name' => 'Avatar 1']); + + $this->assertNull($photo->imageable); + } + + public function testMultiInsertsWithDifferentValues() { $date = '1...
true
Other
laravel
framework
2e8d837e72375e6c2c1b4cb91cd65bb16dd6e0af.json
Add short-cuts for status and content.
src/Illuminate/Http/ResponseTrait.php
@@ -4,6 +4,26 @@ trait ResponseTrait { + /** + * Get the status code for the response. + * + * @return int + */ + public function status() + { + return $this->getStatusCode(); + } + + /** + * Get the content of the response. + * + * @return string + */ + public function content() + { + return $this->getC...
false
Other
laravel
framework
4fd9aafa15c85a36eb4e61b873ef1188d11a769d.json
Add check for migration table in reset command
src/Illuminate/Database/Console/Migrations/ResetCommand.php
@@ -54,6 +54,13 @@ public function fire() $this->migrator->setConnection($this->input->getOption('database')); + if ( ! $this->migrator->repositoryExists()) + { + $this->output->writeln('<comment>Migration table not found.</comment>'); + + return; + } + $pretend = $this->input->getOption('pretend'); ...
true
Other
laravel
framework
4fd9aafa15c85a36eb4e61b873ef1188d11a769d.json
Add check for migration table in reset command
tests/Database/DatabaseMigrationResetCommandTest.php
@@ -16,6 +16,7 @@ public function testResetCommandCallsMigratorWithProperArguments() $command = new ResetCommand($migrator = m::mock('Illuminate\Database\Migrations\Migrator')); $command->setLaravel(new AppDatabaseMigrationStub()); $migrator->shouldReceive('setConnection')->once()->with(null); + $migrator->sh...
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/command-queued-with-handler.stub
@@ -3,9 +3,9 @@ use DummyRootNamespaceCommands\Command; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; -class DummyClass extends Command implements ShouldBeQueued +class DummyClass extends ...
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/command-queued.stub
@@ -4,9 +4,9 @@ use DummyRootNamespaceCommands\Command; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Bus\SelfHandling; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; -class DummyClass extends Command implement...
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/event-handler-queued.stub
@@ -2,9 +2,9 @@ use DummyFullEvent; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; -class DummyClass implements ShouldBeQueued +class DummyClass implements ShouldQueue { use InteractsWithQueue;
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/event-handler.stub
@@ -2,7 +2,7 @@ use DummyFullEvent; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; class DummyClass {
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/event.stub
@@ -2,6 +2,7 @@ use DummyRootNamespaceEvents\Event; use Illuminate\Queue\SerializesModels; +use Illuminate\Contracts\Broadcasting\ShouldBroadcast; class DummyClass extends Event { @@ -16,4 +17,14 @@ class DummyClass extends Event { // } + + /** + * Get the channels the event should be ...
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/job-queued.stub
@@ -4,9 +4,9 @@ use DummyRootNamespaceJobs\Job; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Bus\SelfHandling; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; -class DummyClass extends Job implements SelfHandli...
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/listener-queued.stub
@@ -2,9 +2,9 @@ use DummyFullEvent; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; -class DummyClass implements ShouldBeQueued +class DummyClass implements ShouldQueue { use InteractsWithQueue;
true
Other
laravel
framework
81bc3da45d44230ee1cfeab27e9d080df0f41313.json
Tweak some stubs.
src/Illuminate/Foundation/Console/stubs/listener.stub
@@ -2,7 +2,7 @@ use DummyFullEvent; use Illuminate\Queue\InteractsWithQueue; -use Illuminate\Contracts\Queue\ShouldBeQueued; +use Illuminate\Contracts\Queue\ShouldQueue; class DummyClass {
true
Other
laravel
framework
bb8d3755184246a91b22b270dd61631ae8c27228.json
add typehint and remove no need new line add typehint and remove no need new line
src/Illuminate/Redis/Database.php
@@ -40,7 +40,7 @@ public function __construct(array $servers = array()) * @param array $options * @return array */ - protected function createAggregateClient(array $servers, $options = []) + protected function createAggregateClient(array $servers, array $options = []) { return array('default' => new Cli...
true
Other
laravel
framework
bb8d3755184246a91b22b270dd61631ae8c27228.json
add typehint and remove no need new line add typehint and remove no need new line
tests/Redis/RedisConnectionTest.php
@@ -1,6 +1,5 @@ <?php - class RedisConnectionTest extends PHPUnit_Framework_TestCase { public function testRedisNotCreateClusterAndOptionsServer()
true
Other
laravel
framework
fde58c362d2f736040d3601920c711a9ae1555a7.json
Use SymfonyStyle in Command
src/Illuminate/Console/Command.php
@@ -4,6 +4,7 @@ use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; use Symfony\Component\Console\Question\Question; +use Symfony\Component\Console\Style\SymfonyStyle; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterfa...
false
Other
laravel
framework
9f9a692f724c538e30701877f9073297856c5763.json
Fix Total Downloads url
readme.md
@@ -1,7 +1,7 @@ ## Laravel Framework (Kernel) [![Build Status](https://travis-ci.org/laravel/framework.svg)](https://travis-ci.org/laravel/framework) -[![Total Downloads](https://poser.pugx.org/laravel/framework/downloads.svg)](https://packagist.org/packages/laravel/framework) +[![Total Downloads](https://poser.pug...
false
Other
laravel
framework
f1e45c60628da3340afc77b2b425870db7fb60b9.json
Return a collection from lists()
src/Illuminate/Database/Query/Builder.php
@@ -1503,7 +1503,7 @@ public function lists($column, $key = null) $results = new Collection($this->get($columns)); - return $results->lists($columns[0], array_get($columns, 1)); + return $results->lists($columns[0], array_get($columns, 1))->all(); } /**
true
Other
laravel
framework
f1e45c60628da3340afc77b2b425870db7fb60b9.json
Return a collection from lists()
src/Illuminate/Support/Collection.php
@@ -311,7 +311,7 @@ public function implode($value, $glue = null) if (is_array($first) || is_object($first)) { - return implode($glue, $this->lists($value)); + return implode($glue, $this->lists($value)->all()); } return implode($value, $this->items); @@ -374,11 +374,11 @@ public function last() ...
true
Other
laravel
framework
f1e45c60628da3340afc77b2b425870db7fb60b9.json
Return a collection from lists()
tests/Database/DatabaseEloquentCollectionTest.php
@@ -205,8 +205,8 @@ public function testCollectionReturnsUniqueItems() public function testLists() { $data = new Collection(array((object) array('name' => 'taylor', 'email' => 'foo'), (object) array('name' => 'dayle', 'email' => 'bar'))); - $this->assertEquals(array('taylor' => 'foo', 'dayle' => 'bar'), $data->...
true
Other
laravel
framework
f1e45c60628da3340afc77b2b425870db7fb60b9.json
Return a collection from lists()
tests/Database/DatabaseEloquentModelTest.php
@@ -559,7 +559,7 @@ public function testPushManyRelation() $this->assertEquals(1, $model->id); $this->assertTrue($model->exists); $this->assertEquals(2, count($model->relationMany)); - $this->assertEquals([2, 3], $model->relationMany->lists('id')); + $this->assertEquals([2, 3], $model->relationMany->lists('i...
true
Other
laravel
framework
f1e45c60628da3340afc77b2b425870db7fb60b9.json
Return a collection from lists()
tests/Support/SupportCollectionTest.php
@@ -305,8 +305,8 @@ public function testChunk() public function testListsWithArrayAndObjectValues() { $data = new Collection(array((object) array('name' => 'taylor', 'email' => 'foo'), array('name' => 'dayle', 'email' => 'bar'))); - $this->assertEquals(array('taylor' => 'foo', 'dayle' => 'bar'), $data->lists('e...
true
Other
laravel
framework
588f28290c0c4b7948d8ec69d1c7611a99258f2b.json
Add support for parameters to middleware
src/Illuminate/Pipeline/Pipeline.php
@@ -121,8 +121,10 @@ protected function getSlice() } else { - return $this->container->make($pipe) - ->{$this->method}($passable, $stack); + list($name, $parameters) = $this->parsePipeString($pipe); + + return call_user_func_array([$this->container->make($name), $this->method], + ...
true
Other
laravel
framework
588f28290c0c4b7948d8ec69d1c7611a99258f2b.json
Add support for parameters to middleware
src/Illuminate/Routing/ControllerDispatcher.php
@@ -117,15 +117,13 @@ protected function callWithinStack($instance, $route, $request, $method) */ protected function getMiddleware($instance, $method) { - $middleware = $this->router->getMiddleware(); - $results = []; foreach ($instance->getMiddleware() as $name => $options) { if ( ! $this->metho...
true
Other
laravel
framework
588f28290c0c4b7948d8ec69d1c7611a99258f2b.json
Add support for parameters to middleware
src/Illuminate/Routing/Router.php
@@ -711,11 +711,26 @@ protected function runRouteWithinStack(Route $route, Request $request) */ public function gatherRouteMiddlewares(Route $route) { - return Collection::make($route->middleware())->map(function($m) + return Collection::make($route->middleware())->map(function($name) { - return Collectio...
true
Other
laravel
framework
588f28290c0c4b7948d8ec69d1c7611a99258f2b.json
Add support for parameters to middleware
tests/Pipeline/PipelineTest.php
@@ -26,6 +26,23 @@ public function testPipelineBasicUsage() unset($_SERVER['__test.pipe.two']); } + public function testPipelineUsageWithParameters() + { + $parameters = ['one','two']; + + $result = (new Pipeline(new Illuminate\Container\Container)) + ->send('foo') + ->through('PipelineTestParameterPipe:'....
true
Other
laravel
framework
588f28290c0c4b7948d8ec69d1c7611a99258f2b.json
Add support for parameters to middleware
tests/Routing/RoutingRouteTest.php
@@ -804,7 +804,8 @@ public function testControllerRouting() { unset( $_SERVER['route.test.controller.before.filter'], $_SERVER['route.test.controller.after.filter'], - $_SERVER['route.test.controller.middleware'], $_SERVER['route.test.controller.except.middleware'] + $_SERVER['route.test.controller.middlew...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
composer.json
@@ -98,7 +98,7 @@ } }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver (~2.4).", + "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~2.4).", "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", ...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
readme.md
@@ -22,6 +22,10 @@ Documentation for the framework can be found on the [Laravel website](http://lar Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). +## Security Vulnerabilities + +If you disc...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Connectors/SqlServerConnector.php
@@ -58,9 +58,16 @@ protected function getDsn(array $config) */ protected function getDblibDsn(array $config) { - $port = isset($config['port']) ? ':'.$config['port'] : ''; + $arguments = array( + 'host' => $this->buildHostString($config, ':'), + 'dbname' => $config['database'] + ); - return "dblib:host...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Eloquent/Model.php
@@ -491,12 +491,12 @@ public static function hydrate(array $items, $connection = null) { $instance = (new static)->setConnection($connection); - $collection = $instance->newCollection($items); - - return $collection->map(function ($item) use ($instance) + $items = array_map(function ($item) use ($instance) ...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Eloquent/Relations/BelongsTo.php
@@ -84,13 +84,48 @@ public function addConstraints() */ public function getRelationCountQuery(Builder $query, Builder $parent) { + if ($parent->getQuery()->from == $query->getQuery()->from) + { + return $this->getRelationCountQueryForSelfRelation($query, $parent); + } + $query->select(new Expression('cou...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Eloquent/Relations/HasOneOrMany.php
@@ -2,6 +2,7 @@ use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Database\Query\Expression; use Illuminate\Database\Eloquent\Collection; abstract class HasOneOrMany extends Relation { @@ -52,6 +53,53 @@ public function addConstraints() } } + /** + * Add t...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Query/Builder.php
@@ -421,7 +421,7 @@ public function rightJoinWhere($table, $one, $operator, $two) /** * Add a basic where clause to the query. * - * @param string $column + * @param string|array|\Closure $column * @param string $operator * @param mixed $value * @param string $boolean
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Schema/Blueprint.php
@@ -627,6 +627,17 @@ public function dateTime($column) return $this->addColumn('dateTime', $column); } + /** + * Create a new date-time column (with time zone) on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function dateTimeTz($column) + { + return $this-...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
@@ -491,6 +491,17 @@ protected function typeDateTime(Fluent $column) return 'datetime'; } + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTimeTz(Fluent $column) + { + return 'datetime'; + }...
true
Other
laravel
framework
330d11ba8cd3d6c0a54a1125943526b126147b5f.json
fix merge conflicts.
src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php
@@ -433,6 +433,17 @@ protected function typeDateTime(Fluent $column) return 'timestamp(0) without time zone'; } + /** + * Create the column definition for a date-time type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeDateTimeTz(Fluent $column) + { + ...
true