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
6cb9a0ee8ebf73838261f6c393bed7cf380ca8c8.json
Fix bug in auth.logout event.
src/Illuminate/Foundation/changes.json
@@ -7,5 +7,6 @@ {"message": "Query elapsed time is now reported as float instead of string.", "backport": null}, {"message": "Added Model::query method for generating an empty query builder.", "backport": null}, {"message": "The @yield Blade directive now accepts a default value as the second argument.", "backport": null} + {"message": "Fixed bug causing null to be passed to auth.logout event.", "backport": null} ] } \ No newline at end of file
true
Other
laravel
framework
2d351b39bf32ddb4d3ca1ea542183391b4240460.json
Add "splice" method to collection.
src/Illuminate/Support/Collection.php
@@ -331,6 +331,19 @@ public function slice($offset, $length = null, $preserveKeys = false) return new static(array_slice($this->items, $offset, $length, $preserveKeys)); } + /** + * Splice portion of the underlying collection array. + * + * @param int $offset + * @param int $length + * @param mixed $replacement + * @return \Illuminate\Support\Collection + */ + public function splice($offset, $length = 0, $replacement = array()) + { + array_splice($this->items, $offset, $length, $replacement); + } + /** * Get an array with the values of a given key. *
true
Other
laravel
framework
2d351b39bf32ddb4d3ca1ea542183391b4240460.json
Add "splice" method to collection.
tests/Support/SupportCollectionTest.php
@@ -210,4 +210,19 @@ public function testMakeMethod() $this->assertEquals(array('foo'), $collection->all()); } + public function testSplice() + { + $data = new Collection(array('foo', 'baz')); + $data->splice(1, 0, 'bar'); + $this->assertEquals(array('foo', 'bar', 'baz'), array_values($data->all())); + + $data = new Collection(array('foo', 'baz')); + $data->splice(1, 1); + $this->assertEquals(array('foo'), array_values($data->all())); + + $data = new Collection(array('foo', 'baz')); + $data->splice(1, 1, 'bar'); + $this->assertEquals(array('foo', 'bar'), array_values($data->all())); + } + }
true
Other
laravel
framework
111d4444c5ca331759d9dd2bc3a6561c9d57fbcd.json
Fix double get on cache remember.
src/Illuminate/Cache/Repository.php
@@ -108,7 +108,10 @@ public function rememberForever($key, Closure $callback) // If the item exists in the cache we will just return this immediately // otherwise we will execute the given Closure and cache the result // of that execution for the given number of minutes. It's easy. - if ($this->has($key)) return $this->get($key); + if ( ! is_null($value = $this->get($key))) + { + return $value; + } $this->forever($key, $value = $callback());
false
Other
laravel
framework
59197095a4207804251511d4b2c949aef36815cb.json
Add support to PHP5.5 since it has been released. Signed-off-by: crynobone <crynobone@gmail.com>
.travis.yml
@@ -3,6 +3,7 @@ language: php php: - 5.3 - 5.4 + - 5.5 before_script: - curl -s http://getcomposer.org/installer | php
false
Other
laravel
framework
3cdf93cbf4241ba39e5b6dad5555070bfbbd039a.json
Upgrade doctrine dependency.
composer.json
@@ -12,7 +12,7 @@ "require": { "php": ">=5.3.0", "classpreloader/classpreloader": "1.0.*", - "doctrine/dbal": "2.3.x", + "doctrine/dbal": "2.4.x", "ircmaxell/password-compat": "1.0.*", "filp/whoops": "1.0.6", "monolog/monolog": "1.5.*",
false
Other
laravel
framework
58e50d57478b1ae12dfb916758fe994cb7df0210.json
fix bug in belongs to many pagination.
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -95,9 +95,9 @@ public function first($columns = array('*')) */ public function get($columns = array('*')) { - // If we actually found models we will also eager load any relationships that - // have been specified as needing to be eager loaded. This will solve the - // n + 1 query problem for the developer and also increase performance. + // First we'll add the proper select columns onto the query so it is run with + // the proper columns. Then, we will get the results and hydrate out pivot + // models with the result of those columns as a separate model relation. $select = $this->getSelectColumns($columns); $models = $this->query->addSelect($select)->getModels(); @@ -115,6 +115,27 @@ public function get($columns = array('*')) return $this->related->newCollection($models); } + /** + * Get a paginator for the "select" statement. + * + * @param int $perPage + * @param array $columns + * @return \Illuminate\Pagination\Paginator + */ + public function paginate($perPage = null, $columns = array('*')) + { + $this->query->addSelect($this->getSelectColumns($columns)); + + // When paginating results, we need to add the pivot columns to the query and + // then hydrate into the pivot objects once the results have been gathered + // from the database since this isn't performed by the Eloquent builder. + $pager = $this->query->paginate($perPage, $columns); + + $this->hydratePivotRelation($pager->getItems()); + + return $pager; + } + /** * Hydrate the pivot table relationship on the models. * @@ -128,9 +149,7 @@ protected function hydratePivotRelation(array $models) // will set the attributes, table, and connections on so it they be used. foreach ($models as $model) { - $values = $this->cleanPivotAttributes($model); - - $pivot = $this->newExistingPivot($values); + $pivot = $this->newExistingPivot($this->cleanPivotAttributes($model)); $model->setRelation('pivot', $pivot); }
true
Other
laravel
framework
58e50d57478b1ae12dfb916758fe994cb7df0210.json
fix bug in belongs to many pagination.
src/Illuminate/Pagination/Paginator.php
@@ -305,6 +305,17 @@ public function getItems() return $this->items; } + /** + * Set the items being paginated. + * + * @param mixed $items + * @return void + */ + public function setItems($items) + { + $this->items = $items; + } + /** * Get the total number of items in the collection. *
true
Other
laravel
framework
7f9c14c26d9b09e9f8ace204fe398f49498a1388.json
Fix import on PhpSecLib.
src/Illuminate/Remote/SecLibGateway.php
@@ -1,6 +1,6 @@ <?php namespace Illuminate\Remote; -use Net_SSH2; +use Net_SFTP; use Crypt_RSA; use Illuminate\Filesystem\Filesystem;
false
Other
laravel
framework
b6d0ab1823b67153f16f0f32e81d9e869abebc26.json
Add option to skip detach on sync.
src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php
@@ -453,9 +453,10 @@ public function createMany(array $records, array $joinings = array()) * Sync the intermediate tables with a list of IDs. * * @param array $ids + * @param bool $detaching * @return void */ - public function sync(array $ids) + public function sync(array $ids, $detaching = true) { // First we need to attach any of the associated models that are not currently // in this joining table. We'll spin through the given IDs, checking to see @@ -469,7 +470,7 @@ public function sync(array $ids) // Next, we will take the differences of the currents and given IDs and detach // all of the entities that exist in the "current" array but are not in the // the array of the IDs given to the method which will complete the sync. - if (count($detach) > 0) + if ($detaching and count($detach) > 0) { $this->detach($detach); } @@ -517,6 +518,9 @@ protected function attachNew(array $records, array $current, $touch = true) { foreach ($records as $id => $attributes) { + // If the ID is not in the list of existing pivot IDs, we will insert a new pivot + // record, otherwise, we will just update this existing record on this joining + // table, so that the developers will easily update these records pain free. if ( ! in_array($id, $current)) { $this->attach($id, $attributes, $touch);
false
Other
laravel
framework
799ceb088057dd98b30a949ae515452a1b974ab7.json
Fix bug in query builder for caching. Fixes #1640.
src/Illuminate/Database/Query/Builder.php
@@ -974,6 +974,8 @@ protected function runSelect() */ public function getCached($columns = array('*')) { + if (is_null($this->columns)) $this->columns = $columns; + list($key, $minutes) = $this->getCacheInfo(); // If the query is requested ot be cached, we will cache it using a unique key
false
Other
laravel
framework
4d8cde80f54cca373c995c0ec1e6bee3aa41cc08.json
Fix bug in Remote manager.
src/Illuminate/Remote/RemoteManager.php
@@ -127,7 +127,7 @@ protected function setOutput(Connection $connection) */ protected function getAuth(array $config) { - if (isset($config['key'])) + if (isset($config['key']) and trim($config['key']) != '') { return array('key' => $config['key']); }
false
Other
laravel
framework
29e898e45886c5c4b141b3fc90e16e426f53527d.json
Remove usage of realpath and getRealPath. Signed-off-by: Jason Lewis <jason.lewis1991@gmail.com>
src/Illuminate/Filesystem/Filesystem.php
@@ -166,7 +166,7 @@ public function size($path) */ public function lastModified($path) { - return filemtime(realpath($path)); + return filemtime($path); } /** @@ -258,7 +258,7 @@ public function directories($directory) foreach (Finder::create()->in($directory)->directories()->depth(0) as $dir) { - $directories[] = $dir->getRealPath(); + $directories[] = $dir->getPathname(); } return $directories; @@ -310,7 +310,7 @@ public function copyDirectory($directory, $destination, $options = null) if ($item->isDir()) { - $path = $item->getRealPath(); + $path = $item->getPathname(); if ( ! $this->copyDirectory($path, $target, $options)) return false; } @@ -320,7 +320,7 @@ public function copyDirectory($directory, $destination, $options = null) // and return false, so the developer is aware that the copy process failed. else { - if ( ! $this->copy($item->getRealPath(), $target)) return false; + if ( ! $this->copy($item->getPathname(), $target)) return false; } } @@ -349,15 +349,15 @@ public function deleteDirectory($directory, $preserve = false) // keep iterating through each file until the directory is cleaned. if ($item->isDir()) { - $this->deleteDirectory($item->getRealPath()); + $this->deleteDirectory($item->getPathname()); } // If the item is just a file, we can go ahead and delete it since we're // just looping through and waxing all of the files in this directory // and calling directories recursively, so we delete the real path. else { - $this->delete($item->getRealPath()); + $this->delete($item->getPathname()); } }
false
Other
laravel
framework
21c86791fd6a4d3f22a4b62464e187919a72d76b.json
Tweak a few remote functions.
src/Illuminate/Remote/Connection.php
@@ -14,6 +14,13 @@ class Connection implements ConnectionInterface { */ protected $gateway; + /** + * The name of the connection. + * + * @var string + */ + protected $name; + /** * The host name of the server. * @@ -45,14 +52,16 @@ class Connection implements ConnectionInterface { /** * Create a new SSH connection instance. * + * @param string $name * @param string $host * @param string $username * @param array $auth * @param \Illuminate\Remote\GatewayInterface * @param */ - public function __construct($host, $username, array $auth, GatewayInterface $gateway = null) + public function __construct($name, $host, $username, array $auth, GatewayInterface $gateway = null) { + $this->name = $name; $this->host = $host; $this->username = $username; $this->gateway = $gateway ?: new SecLibGateway($host, $auth, new Filesystem); @@ -95,7 +104,9 @@ public function run($commands, Closure $callback = null) */ public function display($line) { - $lead = '<comment>['.$this->username.'@'.$this->host.']</comment>'; + $server = $this->username.'@'.$this->host; + + $lead = '<comment>['.$server.']</comment> <info>('.$this->name.')</info>'; $this->getOutput()->writeln($lead.' '.$line); }
true
Other
laravel
framework
21c86791fd6a4d3f22a4b62464e187919a72d76b.json
Tweak a few remote functions.
src/Illuminate/Remote/RemoteManager.php
@@ -64,7 +64,7 @@ public function resolve($name) { if ( ! isset($this->connections[$name])) { - $this->connections[$name] = $this->makeConnection($this->getConfig($name)); + $this->connections[$name] = $this->makeConnection($name, $this->getConfig($name)); } return $this->connections[$name]; @@ -73,14 +73,15 @@ public function resolve($name) /** * Make a new connection instance. * + * @param string $name * @param array $config * @return \Illuminate\Remote\Connection */ - protected function makeConnection(array $config) + protected function makeConnection($name, array $config) { $this->setOutput($connection = new Connection( - $config['host'], $config['username'], $this->getAuth($config) + $name, $config['host'], $config['username'], $this->getAuth($config) ));
true
Other
laravel
framework
3e9a451e63435b0849accfc603c4a9e63998ba34.json
Update build scripts.
build/illuminate-split-full.sh
@@ -18,6 +18,7 @@ git subsplit publish src/Illuminate/Mail:git@github.com:illuminate/mail.git git subsplit publish src/Illuminate/Pagination:git@github.com:illuminate/pagination.git git subsplit publish src/Illuminate/Queue:git@github.com:illuminate/queue.git git subsplit publish src/Illuminate/Redis:git@github.com:illuminate/redis.git +git subsplit publish src/Illuminate/Remote:git@github.com:illuminate/remote.git git subsplit publish src/Illuminate/Routing:git@github.com:illuminate/routing.git git subsplit publish src/Illuminate/Session:git@github.com:illuminate/session.git git subsplit publish src/Illuminate/Support:git@github.com:illuminate/support.git
true
Other
laravel
framework
3e9a451e63435b0849accfc603c4a9e63998ba34.json
Update build scripts.
build/illuminate-split.sh
@@ -18,6 +18,7 @@ git subsplit publish --no-tags src/Illuminate/Mail:git@github.com:illuminate/mai git subsplit publish --no-tags src/Illuminate/Pagination:git@github.com:illuminate/pagination.git git subsplit publish --no-tags src/Illuminate/Queue:git@github.com:illuminate/queue.git git subsplit publish --no-tags src/Illuminate/Redis:git@github.com:illuminate/redis.git +git subsplit publish --no-tags src/Illuminate/Remote:git@github.com:illuminate/remote.git git subsplit publish --no-tags src/Illuminate/Routing:git@github.com:illuminate/routing.git git subsplit publish --no-tags src/Illuminate/Session:git@github.com:illuminate/session.git git subsplit publish --no-tags src/Illuminate/Support:git@github.com:illuminate/support.git
true
Other
laravel
framework
0b0f90701fa49f69c67a55f8ae24b60e213ca637.json
Fix bug with paginate queries.
src/Illuminate/Database/Query/Builder.php
@@ -1185,13 +1185,20 @@ public function getPaginationCount() { list($orders, $this->orders) = array($this->orders, null); + $columns = $this->columns; + // Because some database engines may throw errors if we leave the ordering // statements on the query, we will "back them up" and remove them from // the query. Once we have the count we will put them back onto this. $total = $this->count(); $this->orders = $orders; + // Once the query is run we need to put the old select columns back on the + // instance so that the select query will run properly. Otherwise, they + // will be cleared, then the query will fire with all of the columns. + $this->columns = $columns; + return $total; } @@ -1560,7 +1567,8 @@ public function __call($method, $parameters) } $className = get_class($this); + throw new \BadMethodCallException("Call to undefined method {$className}::{$method}()"); } -} +} \ No newline at end of file
false
Other
laravel
framework
bbd95a47e1e065c821037413e5a482eb2a5cd18a.json
Simplify array creation.
src/Illuminate/Auth/Guard.php
@@ -302,7 +302,7 @@ protected function fireAttemptEvent(array $credentials, $remember, $login) { if ($this->events) { - $payload = array_values(compact('credentials', 'remember', 'login')); + $payload = array($credentials, $remember, $login); $this->events->fire('auth.attempt', $payload); } @@ -565,4 +565,4 @@ public function getRecallerName() return 'remember_'.md5(get_class($this)); } -} \ No newline at end of file +}
false
Other
laravel
framework
ddd3344d32cff300c464be04e8a577d2b48ae432.json
Remove unused variables.
src/Illuminate/Session/SessionServiceProvider.php
@@ -79,9 +79,7 @@ protected function registerSessionDriver() */ protected function registerSessionEvents() { - $app = $this->app; - - $config = $app['config']['session']; + $config = $this->app['config']['session']; // The session needs to be started and closed, so we will register a before // and after events to do all stuff for us. This will manage the loading @@ -101,8 +99,6 @@ protected function registerSessionEvents() */ protected function registerBootingEvent() { - $app = $this->app; - $this->app->booting(function($app) { $app['session']->start(); @@ -181,4 +177,4 @@ protected function getDriver() return $this->app['config']['session.driver']; } -} +}
false
Other
laravel
framework
7df9ef53f81e8d99cab2ddd30fe2c69b7fedafce.json
Remove unneeded use() statement.
src/Illuminate/Session/SessionServiceProvider.php
@@ -103,7 +103,7 @@ protected function registerBootingEvent() { $app = $this->app; - $this->app->booting(function($app) use ($app) + $this->app->booting(function($app) { $app['session']->start(); }); @@ -181,4 +181,4 @@ protected function getDriver() return $this->app['config']['session.driver']; } -} \ No newline at end of file +}
false
Other
laravel
framework
641e484097f10d8b4f8dd5d0cf84cbf2e9c5d5ce.json
Fix bug in MessageBag isEmpty method.
src/Illuminate/Support/MessageBag.php
@@ -229,7 +229,7 @@ public function setFormat($format = ':message') */ public function isEmpty() { - return $this->any(); + return ! $this->any(); } /**
false
Other
laravel
framework
eb600f8533df3b4611c1fa60a1661f2c1d0369e6.json
pull pretend value from config.
src/Illuminate/Mail/MailServiceProvider.php
@@ -35,16 +35,23 @@ public function register() $mailer->setContainer($app); - $from = $app['config']['mail.from']; - // If a "from" address is set, we will set it on the mailer so that all mail // messages sent by the applications will utilize the same "from" address // on each one, which makes the developer's life a lot more convenient. + $from = $app['config']['mail.from']; + if (is_array($from) and isset($from['address'])) { $mailer->alwaysFrom($from['address'], $from['name']); } + // Here we will determine if the mailer should be in "pretend" mode for this + // environment, which will simply write out e-mail to the logs instead of + // sending it over the web, which is useful for local dev enviornments. + $pretend = $app['config']->get('mail.pretend', false); + + $mailer->pretend($pretend); + return $mailer; }); }
false
Other
laravel
framework
7b3f3fb32ac08a72b2e91134d6bd9ad5746bf3b4.json
Add isEmpty method to MessageBag. Closes #1579.
src/Illuminate/Support/MessageBag.php
@@ -222,6 +222,16 @@ public function setFormat($format = ':message') $this->format = $format; } + /** + * Determine if the message bag has any messages. + * + * @return bool + */ + public function isEmpty() + { + return $this->any(); + } + /** * Determine if the message bag has any messages. *
false
Other
laravel
framework
9760f811904b2dab55f32c32f3fbebb2ba1b2f5d.json
Fix typo in readme.md
src/Illuminate/Database/README.md
@@ -40,7 +40,7 @@ Once the Capsule instance has been registered. You may use it like so: **Using The Query Builder** ``` -$users = Capsule::table('users')->where('votes', '>' 100)->get(); +$users = Capsule::table('users')->where('votes', '>', 100)->get(); ``` **Using The Schema Builder** @@ -62,4 +62,4 @@ class User extends Illuminate\Database\Eloquent\Model {} $users = User::where('votes', '>', 1)->get(); ``` -For further documentation on using the various database facilities this library provides, consult the [Laravel framework documentation](http://laravel.com/docs). \ No newline at end of file +For further documentation on using the various database facilities this library provides, consult the [Laravel framework documentation](http://laravel.com/docs).
false
Other
laravel
framework
38eb84b57c5cb81a1beb70ba6421635a78408174.json
Add a space between 2 lines Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Support/Collection.php
@@ -354,6 +354,7 @@ public function lists($value, $key = null) else { $itemKey = is_object($item) ? $item->{$key} : $item[$key]; + $results[$itemKey] = $itemValue; } }
false
Other
laravel
framework
440a825c454800f26344745a7cdabf44288a7400.json
Fix incorrect variable name in docblock Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Support/Collection.php
@@ -332,7 +332,7 @@ public function slice($offset, $length = null, $preserveKeys = false) /** * Get an array with the values of a given key. * - * @param string $column + * @param string $value * @param string $key * @return array */
false
Other
laravel
framework
6055f9f595f16c06881d72f5d5c6186cf03cc031.json
Add lists method to Collection class Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Support/Collection.php
@@ -329,6 +329,38 @@ public function slice($offset, $length = null, $preserveKeys = false) return new static(array_slice($this->items, $offset, $length, $preserveKeys)); } + /** + * Get an array with the values of a given key. + * + * @param string $column + * @param string $key + * @return array + */ + public function lists($value, $key = null) + { + $results = array(); + + foreach ($this->items as $item) + { + $itemValue = is_object($item) ? $item->{$value} : $item[$value]; + + // If the key is "null", we will just append the value to the array and keep + // looping. Otherwise we will key the array using the value of the key we + // received from the developer. Then we'll return the final array form. + if (is_null($key)) + { + $results[] = $itemValue; + } + else + { + $itemKey = is_object($item) ? $item->{$key} : $item[$key]; + $results[$itemKey] = $itemValue; + } + } + + return $results; + } + /** * Determine if the collection is empty or not. *
true
Other
laravel
framework
6055f9f595f16c06881d72f5d5c6186cf03cc031.json
Add lists method to Collection class Signed-off-by: Dries Vints <dries.vints@gmail.com>
tests/Support/SupportCollectionTest.php
@@ -187,4 +187,12 @@ public function testReverse() $this->assertEquals(array('alan', 'zaeed'), array_values($reversed->all())); } + + 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('email', 'name')); + $this->assertEquals(array('foo', 'bar'), $data->lists('email')); + } + }
true
Other
laravel
framework
c3e05ae4fb4b30416ef8d6e3716c3c81d0149558.json
Fix some more spaces. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Support/Facades/Response.php
@@ -39,8 +39,8 @@ public static function view($view, $data = array(), $status = 200, array $header * Return a new JSON response from the application. * * @param string|array $data - * @param int $status - * @param array $headers + * @param int $status + * @param array $headers * @return \Illuminate\Http\JsonResponse */ public static function json($data = array(), $status = 200, array $headers = array()) @@ -70,8 +70,8 @@ public static function stream($callback, $status = 200, array $headers = array() * Create a new file download response. * * @param SplFileInfo|string $file - * @param string $name - * @param array $headers + * @param string $name + * @param array $headers * @return \Symfony\Component\HttpFoundation\BinaryFileResponse */ public static function download($file, $name = null, array $headers = array())
false
Other
laravel
framework
ab5f4b1dcc2cf273339c0f1434edd810c6d8a2d1.json
Add array dependency to download function Since this needs to be an array, it's better to set it as a dependency. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Support/Facades/Response.php
@@ -74,7 +74,7 @@ public static function stream($callback, $status = 200, array $headers = array() * @param array $headers * @return \Symfony\Component\HttpFoundation\BinaryFileResponse */ - public static function download($file, $name = null, $headers = array()) + public static function download($file, $name = null, array $headers = array()) { $response = new BinaryFileResponse($file, 200, $headers, true, 'attachment');
false
Other
laravel
framework
d9a3d99ce657d5a9bde485a4027f08f5a1b7ab70.json
Add array dependencies to Translator functions The $replace array throughout the Translator functions eventually ends up as an argument for a new Collection class which has this as a dependency. We should make sure it's an array that's being passed before continuing with any of these functions. Signed-off-by: Dries Vints <dries.vints@gmail.com>
src/Illuminate/Translation/Translator.php
@@ -61,7 +61,7 @@ public function has($key, $locale = null) * @param string $locale * @return string */ - public function get($key, $replace = array(), $locale = null) + public function get($key, array $replace = array(), $locale = null) { list($namespace, $group, $item) = $this->parseKey($key); @@ -94,7 +94,7 @@ public function get($key, $replace = array(), $locale = null) * @param array $replace * @return string|null */ - protected function getLine($namespace, $group, $locale, $item, $replace) + protected function getLine($namespace, $group, $locale, $item, array $replace) { $line = array_get($this->loaded[$namespace][$group][$locale], $item); @@ -108,7 +108,7 @@ protected function getLine($namespace, $group, $locale, $item, $replace) * @param array $replace * @return string */ - protected function makeReplacements($line, $replace) + protected function makeReplacements($line, array $replace) { $replace = $this->sortReplacements($replace); @@ -126,7 +126,7 @@ protected function makeReplacements($line, $replace) * @param array $replace * @return array */ - protected function sortReplacements($replace) + protected function sortReplacements(array $replace) { return with(new Collection($replace))->sortBy(function($r) { @@ -143,7 +143,7 @@ protected function sortReplacements($replace) * @param string $locale * @return string */ - public function choice($key, $number, $replace = array(), $locale = null) + public function choice($key, $number, array $replace = array(), $locale = null) { $line = $this->get($key, $replace, $locale = $locale ?: $this->locale);
false
Other
laravel
framework
236c8e5c6955c88b9713e77c9df9b8205211fc00.json
share handlers for whoops.
src/Illuminate/Exception/ExceptionServiceProvider.php
@@ -105,7 +105,10 @@ protected function registerWhoopsHandler() { if ($this->shouldReturnJson()) { - $this->app['whoops.handler'] = function() { return new JsonResponseHandler; }; + $this->app['whoops.handler'] = $this->app->share(function() + { + return new JsonResponseHandler; + }); } else { @@ -134,7 +137,7 @@ protected function registerPrettyWhoopsHandler() { $me = $this; - $this->app['whoops.handler'] = function() use ($me) + $this->app['whoops.handler'] = $this->app->share(function() use ($me) { with($handler = new PrettyPageHandler)->setEditor('sublime'); @@ -147,7 +150,7 @@ protected function registerPrettyWhoopsHandler() } return $handler; - }; + }); } /**
false
Other
laravel
framework
e2c84468bdfd07efdefb8013e5b8ff314c2f2daf.json
fix unit tests
tests/Pagination/PaginationBootstrapPresenterTest.php
@@ -34,7 +34,7 @@ public function testGetPageRange() $presenter->setCurrentPage(1); $content = $presenter->getPageRange(1, 2); - $this->assertEquals('<li class="active"><a href="#">1</a></li><li><a href="http://foo.com?page=2">2</a></li>', $content); + $this->assertEquals('<li class="active"><span>1</span></li><li><a href="http://foo.com?page=2">2</a></li>', $content); } @@ -83,8 +83,8 @@ public function testSliderIsCreatedWhenCloseToStart() public function testPreviousLinkCanBeRendered() { $output = $this->getPresenter()->getPrevious(); - - $this->assertEquals('<li class="disabled"><a href="#">&laquo;</a></li>', $output); + + $this->assertEquals('<li class="disabled"><span>&laquo;</span></li>', $output); $presenter = $this->getPresenter(); $presenter->setCurrentPage(2); @@ -100,7 +100,7 @@ public function testNextLinkCanBeRendered() $presenter->setCurrentPage(2); $output = $presenter->getNext(); - $this->assertEquals('<li class="disabled"><a href="#">&raquo;</a></li>', $output); + $this->assertEquals('<li class="disabled"><span>&raquo;</span></li>', $output); $presenter = $this->getPresenter(); $presenter->setCurrentPage(1); @@ -115,7 +115,7 @@ public function testGetStart() $presenter = $this->getPresenter(); $output = $presenter->getStart(); - $this->assertEquals('<li class="active"><a href="#">1</a></li><li><a href="http://foo.com?page=2">2</a></li><li class="disabled"><a href="#">...</a></li>', $output); + $this->assertEquals('<li class="active"><span>1</a></li><li><a href="http://foo.com?page=2">2</a></li><li class="disabled"><span>...</span></li>', $output); } @@ -124,7 +124,7 @@ public function testGetFinish() $presenter = $this->getPresenter(); $output = $presenter->getFinish(); - $this->assertEquals('<li class="disabled"><a href="#">...</a></li><li class="active"><a href="#">1</a></li><li><a href="http://foo.com?page=2">2</a></li>', $output); + $this->assertEquals('<li class="disabled"><span>...</span></li><li class="active"><span>1</a></li><li><a href="http://foo.com?page=2">2</a></li>', $output); } @@ -154,4 +154,4 @@ protected function getPaginator() return $paginator; } -} \ No newline at end of file +}
false
Other
laravel
framework
65d9a061d9209694e8addd9c6ce94dcf5bfe7180.json
fix vulnerability in encrypter mac address.
src/Illuminate/Encryption/Encrypter.php
@@ -58,9 +58,7 @@ public function encrypt($value) // Once we have the encrypted value we will go ahead base64_encode the input // vector and create the MAC for the encrypted value so we can verify its // authenticity. Then, we'll JSON encode the data in a "payload" array. - $iv = base64_encode($iv); - - $mac = $this->hash($value); + $mac = $this->hash($iv = base64_encode($iv), $value); return base64_encode(json_encode(compact('iv', 'value', 'mac'))); } @@ -126,12 +124,12 @@ protected function getJsonPayload($payload) // to decrypt the given value. We'll also check the MAC for this encryption. if ( ! $payload or $this->invalidPayload($payload)) { - throw new DecryptException("Invalid data passed to encrypter."); + throw new DecryptException("Invalid data."); } - if ($payload['mac'] != $this->hash($payload['value'])) + if ($payload['mac'] !== $this->hash($payload['iv'], $payload['value'])) { - throw new DecryptException("MAC for payload is invalid."); + throw new DecryptException("MAC is invalid."); } return $payload; @@ -140,12 +138,13 @@ protected function getJsonPayload($payload) /** * Create a MAC for the given value. * + * @param stirng $iv * @param string $value * @return string */ - protected function hash($value) + protected function hash($iv, $value) { - return hash_hmac('sha256', $value, $this->key); + return hash_hmac('sha256', $iv.$value, $this->key); } /**
false
Other
laravel
framework
7ccba640d4fbb1bc9e3d7335c3e8405fc435b0d5.json
remove extra spaces
src/Illuminate/Pagination/Paginator.php
@@ -81,9 +81,9 @@ class Paginator implements ArrayAccess, Countable, IteratorAggregate { */ public function __construct(Environment $env, array $items, $total, $perPage) { - $this->env = $env; - $this->total = $total; - $this->items = $items; + $this->env = $env; + $this->total = $total; + $this->items = $items; $this->perPage = $perPage; }
false
Other
laravel
framework
6b7a8d8696a0c1d43ff2059e6b720d380e52f431.json
encrypt messages pushed onto iron.io. fixes #1469.
src/Illuminate/Queue/Connectors/IronConnector.php
@@ -3,9 +3,17 @@ use IronMQ; use Illuminate\Http\Request; use Illuminate\Queue\IronQueue; +use Illuminate\Encryption\Encrypter; class IronConnector implements ConnectorInterface { + /** + * The encrypter instance. + * + * @var \Illuminate\Encryption\Encrypter + */ + protected $crypt; + /** * The current request instance. * @@ -16,11 +24,13 @@ class IronConnector implements ConnectorInterface { /** * Create a new Iron connector instance. * + * @param \Illuminate\Encryption\Encrypter $crypt * @param \Illuminate\Http\Request $request * @return void */ - public function __construct(Request $request) + public function __construct(Encrypter $crypt, Request $request) { + $this->crypt = $crypt; $this->request = $request; } @@ -34,7 +44,7 @@ public function connect(array $config) { $ironConfig = array('token' => $config['token'], 'project_id' => $config['project']); - return new IronQueue(new IronMQ($ironConfig), $this->request, $config['queue']); + return new IronQueue(new IronMQ($ironConfig), $this->crypt, $this->request, $config['queue']); } } \ No newline at end of file
true
Other
laravel
framework
6b7a8d8696a0c1d43ff2059e6b720d380e52f431.json
encrypt messages pushed onto iron.io. fixes #1469.
src/Illuminate/Queue/IronQueue.php
@@ -4,6 +4,7 @@ use Illuminate\Http\Request; use Illuminate\Http\Response; use Illuminate\Queue\Jobs\IronJob; +use Illuminate\Encryption\Encrypter; class IronQueue extends Queue implements QueueInterface { @@ -14,6 +15,13 @@ class IronQueue extends Queue implements QueueInterface { */ protected $iron; + /** + * The encrypter instance. + * + * @var \Illuminate\Encryption\Encrypter + */ + protected $crypt; + /** * The current request instance. * @@ -32,13 +40,15 @@ class IronQueue extends Queue implements QueueInterface { * Create a new IronMQ queue instance. * * @param \IronMQ $iron + * @param \Illuminate\Encryption\Encrypter $crypt * @param \Illuminate\Http\Request $request * @param string $default * @return void */ - public function __construct(IronMQ $iron, Request $request, $default) + public function __construct(IronMQ $iron, Encrypter $crypt, Request $request, $default) { $this->iron = $iron; + $this->crypt = $crypt; $this->request = $request; $this->default = $default; } @@ -86,8 +96,13 @@ public function pop($queue = null) $job = $this->iron->getMessage($queue); + // If we were able to pop a message off of the queue, we will need to decrypt + // the message body, as all Iron.io messages are encrypted, since the push + // queues will be a security hazard to unsuspecting developers using it. if ( ! is_null($job)) { + $job->body = $this->crypt->decrypt($job->body); + return new IronJob($this->container, $this->iron, $job, $queue); } } @@ -113,8 +128,10 @@ protected function marshalPushedJob() { $r = $this->request; + $body = $this->crypt->decrypt($r->getContent()); + return (object) array( - 'id' => $r->header('iron-message-id'), 'body' => $r->getContent(), 'pushed' => true, + 'id' => $r->header('iron-message-id'), 'body' => $body, 'pushed' => true, ); } @@ -129,6 +146,18 @@ protected function createPushedIronJob($job) return new IronJob($this->container, $this->iron, $job, $this->default); } + /** + * Create a payload string from the given job and data. + * + * @param string $job + * @param mixed $data + * @return string + */ + protected function createPayload($job, $data = '') + { + return $this->crypt->encrypt(parent::createPayload($job, $data)); + } + /** * Get the queue or return the default. *
true
Other
laravel
framework
6b7a8d8696a0c1d43ff2059e6b720d380e52f431.json
encrypt messages pushed onto iron.io. fixes #1469.
tests/Queue/QueueIronQueueTest.php
@@ -12,35 +12,40 @@ public function tearDown() public function testPushProperlyPushesJobOntoIron() { - $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), m::mock('Illuminate\Http\Request'), 'default'); - $iron->shouldReceive('postMessage')->once()->with('default', json_encode(array('job' => 'foo', 'data' => array(1, 2, 3)))); + $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), $crypt = m::mock('Illuminate\Encryption\Encrypter'), m::mock('Illuminate\Http\Request'), 'default'); + $crypt->shouldReceive('encrypt')->once()->with(json_encode(array('job' => 'foo', 'data' => array(1, 2, 3))))->andReturn('encrypted'); + $iron->shouldReceive('postMessage')->once()->with('default', 'encrypted'); $queue->push('foo', array(1, 2, 3)); } public function testPushProperlyPushesJobOntoIronWithClosures() { - $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), m::mock('Illuminate\Http\Request'), 'default'); + $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), $crypt = m::mock('Illuminate\Encryption\Encrypter'), m::mock('Illuminate\Http\Request'), 'default'); $name = 'Foo'; $closure = new Illuminate\Support\SerializableClosure($innerClosure = function() use ($name) { return $name; }); - $iron->shouldReceive('postMessage')->once()->with('default', json_encode(array('job' => 'IlluminateQueueClosure', 'data' => array('closure' => serialize($closure))))); + $crypt->shouldReceive('encrypt')->once()->with(json_encode(array('job' => 'IlluminateQueueClosure', 'data' => array('closure' => serialize($closure)))))->andReturn('encrypted'); + $iron->shouldReceive('postMessage')->once()->with('default', 'encrypted'); $queue->push($innerClosure); } public function testDelayedPushProperlyPushesJobOntoIron() { - $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), m::mock('Illuminate\Http\Request'), 'default'); - $iron->shouldReceive('postMessage')->once()->with('default', json_encode(array('job' => 'foo', 'data' => array(1, 2, 3))), array('delay' => 5)); + $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), $crypt = m::mock('Illuminate\Encryption\Encrypter'), m::mock('Illuminate\Http\Request'), 'default'); + $crypt->shouldReceive('encrypt')->once()->with(json_encode(array('job' => 'foo', 'data' => array(1, 2, 3))))->andReturn('encrypted'); + $iron->shouldReceive('postMessage')->once()->with('default', 'encrypted', array('delay' => 5)); $queue->later(5, 'foo', array(1, 2, 3)); } public function testPopProperlyPopsJobOffOfIron() { - $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), m::mock('Illuminate\Http\Request'), 'default'); + $queue = new Illuminate\Queue\IronQueue($iron = m::mock('IronMQ'), $crypt = m::mock('Illuminate\Encryption\Encrypter'), m::mock('Illuminate\Http\Request'), 'default'); $queue->setContainer(m::mock('Illuminate\Container\Container')); $iron->shouldReceive('getMessage')->once()->with('default')->andReturn($job = m::mock('IronMQ_Message')); + $job->body = 'foo'; + $crypt->shouldReceive('decrypt')->once()->with('foo')->andReturn('foo'); $result = $queue->pop(); $this->assertInstanceOf('Illuminate\Queue\Jobs\IronJob', $result); @@ -49,9 +54,10 @@ public function testPopProperlyPopsJobOffOfIron() public function testPushedJobsCanBeMarshaled() { - $queue = $this->getMock('Illuminate\Queue\IronQueue', array('createPushedIronJob'), array($iron = m::mock('IronMQ'), $request = m::mock('Illuminate\Http\Request'), 'default')); + $queue = $this->getMock('Illuminate\Queue\IronQueue', array('createPushedIronJob'), array($iron = m::mock('IronMQ'), $crypt = m::mock('Illuminate\Encryption\Encrypter'), $request = m::mock('Illuminate\Http\Request'), 'default')); $request->shouldReceive('header')->once()->with('iron-message-id')->andReturn('message-id'); - $request->shouldReceive('getContent')->once()->andReturn(json_encode(array('foo' => 'bar'))); + $request->shouldReceive('getContent')->once()->andReturn($content = json_encode(array('foo' => 'bar'))); + $crypt->shouldReceive('decrypt')->once()->with($content)->andReturn($content); $job = (object) array('id' => 'message-id', 'body' => json_encode(array('foo' => 'bar')), 'pushed' => true); $queue->expects($this->once())->method('createPushedIronJob')->with($this->equalTo($job))->will($this->returnValue($mockIronJob = m::mock('StdClass'))); $mockIronJob->shouldReceive('fire')->once();
true
Other
laravel
framework
257f53f45a85ed4834bbb6505b4e403d64a0c2c5.json
make connection on optional.
src/Illuminate/Database/Eloquent/Model.php
@@ -352,7 +352,7 @@ public static function create(array $attributes) * @param string $connection * @return \Illuminate\Database\Eloquent\Builder */ - public static function on($connection) + public static function on($connection = null) { // First we will just create a fresh instance of this model, and then we can // set the connection on the model so that it is be used for the queries
false
Other
laravel
framework
fb9c7c13f4b393f6598f2841d084307167a7e883.json
Fix PHP 5.4 syntax.
src/Illuminate/Database/DatabaseManager.php
@@ -118,13 +118,13 @@ protected function prepare(Connection $connection) // The database connection can also utilize a cache manager instance when cache // functionality is used on queries, which provides an expressive interface // to caching both fluent queries and Eloquent queries that are executed. - $connection->setCacheManager(function() + $app = $this->app; + + $connection->setCacheManager(function() use ($app) { - return $this->app['cache']; + return $app['cache']; }); - $app = $this->app; - // We will setup a Closure to resolve the paginator instance on the connection // since the Paginator isn't sued on every request and needs quite a few of // our dependencies. It'll be more efficient to lazily resolve instances.
false
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
composer.json
@@ -82,7 +82,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Auth/composer.json
@@ -28,7 +28,7 @@ "target-dir": "Illuminate/Auth", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Cache/composer.json
@@ -24,7 +24,7 @@ "target-dir": "Illuminate/Cache", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Config/composer.json
@@ -21,7 +21,7 @@ "target-dir": "Illuminate/Config", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Console/composer.json
@@ -21,7 +21,7 @@ "target-dir": "Illuminate/Console", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Container/composer.json
@@ -21,7 +21,7 @@ "target-dir": "Illuminate/Container", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Cookie/composer.json
@@ -25,7 +25,7 @@ "target-dir": "Illuminate/Cookie", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Database/composer.json
@@ -32,7 +32,7 @@ "target-dir": "Illuminate/Database", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Encryption/composer.json
@@ -22,7 +22,7 @@ "target-dir": "Illuminate/Encryption", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Events/composer.json
@@ -24,7 +24,7 @@ "target-dir": "Illuminate/Events", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Exception/composer.json
@@ -26,7 +26,7 @@ "target-dir": "Illuminate/Exception", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Filesystem/composer.json
@@ -23,7 +23,7 @@ "target-dir": "Illuminate/Filesystem", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Hashing/composer.json
@@ -23,7 +23,7 @@ "target-dir": "Illuminate/Hashing", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Html/composer.json
@@ -25,7 +25,7 @@ "target-dir": "Illuminate/Html", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Http/composer.json
@@ -24,7 +24,7 @@ "target-dir": "Illuminate/Http", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Log/composer.json
@@ -25,7 +25,7 @@ "target-dir": "Illuminate/Log", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Mail/composer.json
@@ -28,7 +28,7 @@ "target-dir": "Illuminate/Mail", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Pagination/composer.json
@@ -27,7 +27,7 @@ "target-dir": "Illuminate/Pagination", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Queue/composer.json
@@ -31,7 +31,7 @@ "target-dir": "Illuminate/Queue", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Redis/composer.json
@@ -24,7 +24,7 @@ "target-dir": "Illuminate/Redis", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Routing/composer.json
@@ -30,7 +30,7 @@ "target-dir": "Illuminate/Routing", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Session/composer.json
@@ -28,7 +28,7 @@ "target-dir": "Illuminate/Session", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Support/composer.json
@@ -26,7 +26,7 @@ "target-dir": "Illuminate/Support", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Translation/composer.json
@@ -25,7 +25,7 @@ "target-dir": "Illuminate/Translation", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Validation/composer.json
@@ -27,7 +27,7 @@ "target-dir": "Illuminate/Validation", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/View/composer.json
@@ -26,7 +26,7 @@ "target-dir": "Illuminate/View", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
060c2f72e43af80e1fdbeabf71e7bbd8eaed9010.json
Update branch aliases.
src/Illuminate/Workbench/composer.json
@@ -25,7 +25,7 @@ "target-dir": "Illuminate/Workbench", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "minimum-stability": "dev"
true
Other
laravel
framework
6d1913b9f4d303f8464625dfef33f06cfc404328.json
Return actual receive count from SQS queue driver.
src/Illuminate/Queue/Jobs/SqsJob.php
@@ -88,7 +88,7 @@ public function release($delay = 0) */ public function attempts() { - return 1; + return (int) $this->job['Attributes']['ApproximateReceiveCount']; } /**
true
Other
laravel
framework
6d1913b9f4d303f8464625dfef33f06cfc404328.json
Return actual receive count from SQS queue driver.
src/Illuminate/Queue/SqsQueue.php
@@ -77,7 +77,9 @@ public function pop($queue = null) { $queue = $this->getQueue($queue); - $response = $this->sqs->receiveMessage(array('QueueUrl' => $queue)); + $response = $this->sqs->receiveMessage( + array('QueueUrl' => $queue, 'AttributeNames' => array('ApproximateReceiveCount')) + ); if (count($response['Messages']) > 0) {
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Auth/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/auth", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Cache/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/cache", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Config/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/config", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Console/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/console", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Container/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/container", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Cookie/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/cookie", - "description": "A cookie creation utility.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Database/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/database", - "description": "An elegant database abstraction library.", + "license": "MIT", "keywords": ["laravel", "database", "sql", "orm"], "authors": [ {
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Encryption/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/encryption", - "description": "A simple wrapper around the mcrypt library.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Events/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/events", - "description": "A simple, powerful events system.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Exception/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/exception", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Filesystem/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/filesystem", - "description": "A filesystem abstraction library.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Hashing/composer.json
@@ -1,7 +1,6 @@ { "name": "illuminate/hashing", - "description": "A password hashing library.", - "keywords": ["hashing", "password", "bcrypt"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Html/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/html", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Http/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/http", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Log/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/log", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Mail/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/mail", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Pagination/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/pagination", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Queue/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/queue", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Redis/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/redis", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Routing/composer.json
@@ -1,7 +1,6 @@ { "name": "illuminate/routing", - "description": "A swift routing and dispatch component.", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Session/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/session", - "description": "A tidy, simple session library.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Support/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/support", - "description": "Various utilities and support functions.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Translation/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/translation", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Validation/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/validation", - "description": "An amazingly simple validation library for PHP.", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/View/composer.json
@@ -1,5 +1,6 @@ { "name": "illuminate/view", + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
9bca4cb2312d597e6c1f5dd53edd76cd1c79e55f.json
Add license to composer files.
src/Illuminate/Workbench/composer.json
@@ -1,6 +1,6 @@ { "name": "illuminate/workbench", - "keywords": ["laravel"], + "license": "MIT", "authors": [ { "name": "Taylor Otwell",
true
Other
laravel
framework
d71bd108b29637d259f816f461eb122a1bd8a13f.json
Add Str::length() back in
src/Illuminate/Support/Str.php
@@ -118,6 +118,17 @@ public static function limit($value, $limit = 100, $end = '...') return mb_substr($value, 0, $limit, 'UTF-8').$end; } + /** + * Return the length of the given string. + * + * @param string $value + * @return string + */ + public static function length($value) + { + return mb_strlen($value); + } + /** * Convert the given string to lower-case. *
false
Other
laravel
framework
2edc2ea956c8d54c69a9c29dc16c9be63e5751df.json
Generate absolute URLs when testing.
src/Illuminate/Foundation/Testing/TestCase.php
@@ -96,7 +96,7 @@ public function callSecure() */ public function action($method, $action, $wildcards = array(), $parameters = array(), $files = array(), $server = array(), $content = null, $changeHistory = true) { - $uri = $this->app['url']->action($action, $wildcards, false); + $uri = $this->app['url']->action($action, $wildcards, true); return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); } @@ -116,7 +116,7 @@ public function action($method, $action, $wildcards = array(), $parameters = arr */ public function route($method, $name, $routeParameters = array(), $parameters = array(), $files = array(), $server = array(), $content = null, $changeHistory = true) { - $uri = $this->app['url']->route($name, $routeParameters, false); + $uri = $this->app['url']->route($name, $routeParameters, true); return $this->call($method, $uri, $parameters, $files, $server, $content, $changeHistory); }
false
Other
laravel
framework
6d3d1919873cabde40f2943d800dacf884d371fc.json
Remove un-needed method.
src/Illuminate/Routing/Controllers/Controller.php
@@ -279,17 +279,6 @@ public function getControllerFilters() return $this->filters; } - /** - * Handle calls to missing methods on the controller. - * - * @param array $parameters - * @return mixed - */ - public function missingMethod($parameters) - { - throw new NotFoundHttpException; - } - /** * Handle calls to missing methods on the controller. *
false
Other
laravel
framework
ad98047f612e66f14c279dd64a642c83cdc01787.json
Remove periods from optimize command.
src/Illuminate/Foundation/Console/OptimizeCommand.php
@@ -50,11 +50,11 @@ public function __construct(Composer $composer) */ public function fire() { - $this->info('Generating optimized class loader...'); + $this->info('Generating optimized class loader'); $this->composer->dumpOptimized(); - $this->info('Compiling common classes...'); + $this->info('Compiling common classes'); $this->compileClasses(); }
false