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 | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php | @@ -497,6 +497,20 @@ protected function typeDateTime(Fluent $column)
return 'datetime';
}
+ /**
+ * Create the column definition for a date-time type.
+ *
+ * Note: "SQLite does not have a storage class set aside for storing dates and/or times."
+ * @link https://www.sqlite.org/datatype3.html
+ *
+ * @para... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php | @@ -439,6 +439,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 'datetimeoffset... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Foundation/Application.php | @@ -465,7 +465,7 @@ public function registerConfiguredProviders()
$manifestPath = $this->getCachedServicesPath();
(new ProviderRepository($this, new Filesystem, $manifestPath))
- ->load($this->config['app.providers']);
+ ->load($this->config['app.providers']);
}
/**
@@ -876,6 +876,16 @@ p... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Foundation/Http/Middleware/VerifyPostSize.php | @@ -0,0 +1,53 @@
+<?php namespace Illuminate\Foundation\Http\Middleware;
+
+use Closure;
+use Illuminate\Contracts\Routing\Middleware;
+use Illuminate\Http\Exception\PostTooLargeException;
+
+class VerifyPostSize implements Middleware {
+
+ /**
+ * Handle an incoming request.
+ *
+ * @param \Illuminate\Http\Request... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Foundation/Testing/AssertionsTrait.php | @@ -14,7 +14,7 @@ public function assertResponseOk()
{
$actual = $this->response->getStatusCode();
- return PHPUnit::assertTrue($this->response->isOk(), 'Expected status code 200, got ' .$actual);
+ return PHPUnit::assertTrue($this->response->isOk(), "Expected status code 200, got {$actual}.");
}
/**
@@ ... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Http/Exception/PostTooLargeException.php | @@ -0,0 +1,5 @@
+<?php namespace Illuminate\Http\Exception;
+
+use Exception;
+
+class PostTooLargeException extends Exception {} | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Mail/MailServiceProvider.php | @@ -64,9 +64,9 @@ protected function setMailerDependencies($mailer, $app)
{
$mailer->setContainer($app);
- if ($app->bound('log'))
+ if ($app->bound('Psr\Log\LoggerInterface'))
{
- $mailer->setLogger($app['log']->getMonolog());
+ $mailer->setLogger($app->make('Psr\Log\LoggerInterface'));
}
if ($... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Mail/composer.json | @@ -32,6 +32,7 @@
}
},
"suggest": {
+ "aws/aws-sdk-php": "Required to use the SES mail driver (~2.4).",
"guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers (~5.0)."
},
"minimum-stability": "dev" | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Routing/Router.php | @@ -323,7 +323,16 @@ public function resources(array $resources)
*/
public function resource($name, $controller, array $options = array())
{
- (new ResourceRegistrar($this))->register($name, $controller, $options);
+ if ($this->container && $this->container->bound('Illuminate\Routing\ResourceRegistrar'))
+ {
... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Session/Store.php | @@ -213,9 +213,9 @@ public function setName($name)
*/
public function invalidate($lifetime = null)
{
- $this->attributes = array();
+ $this->clear();
- return $this->migrate();
+ return $this->migrate(true, $lifetime);
}
/** | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Support/Arr.php | @@ -45,6 +45,26 @@ public static function build($array, callable $callback)
return $results;
}
+ /**
+ * Collapse an array of arrays into a single array.
+ *
+ * @param array|\ArrayAccess $array
+ * @return array
+ */
+ public static function collapse($array)
+ {
+ $results = [];
+
+ foreach ($array as ... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Support/Collection.php | @@ -54,22 +54,13 @@ public function all()
}
/**
- * Collapse the collection items into a single array.
+ * Collapse the collection of items into a single array.
*
* @return static
*/
public function collapse()
{
- $results = [];
-
- foreach ($this->items as $values)
- {
- if ($values instanceo... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/Support/helpers.php | @@ -62,6 +62,20 @@ function array_build($array, callable $callback)
}
}
+if ( ! function_exists('array_collapse'))
+{
+ /**
+ * Collapse an array of arrays into a single array.
+ *
+ * @param array|\ArrayAccess $array
+ * @return array
+ */
+ function array_collapse($array)
+ {
+ return Arr::collapse($arra... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -220,7 +220,7 @@ protected function compileEchos($value)
}
/**
- * Get the echo methdos in the proper order for compilation.
+ * Get the echo methods in the proper order for compilation.
*
* @return array
*/ | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | src/Illuminate/View/Factory.php | @@ -865,6 +865,17 @@ public function getShared()
return $this->shared;
}
+ /**
+ * Check if section exists.
+ *
+ * @param string $name
+ * @return bool
+ */
+ public function hasSection($name)
+ {
+ return array_key_exists($name, $this->sections);
+ }
+
/**
* Get the entire array of sections.
* | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Database/DatabaseConnectorTest.php | @@ -120,19 +120,38 @@ public function testSqlServerConnectCallsCreateConnectionWithProperArguments()
$this->assertSame($result, $connection);
}
+ public function testSqlServerConnectCallsCreateConnectionWithOptionalArguments()
+ {
+ $config = array('host' => 'foo', 'database' => 'bar', 'port' => 111, 'appname' ... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Database/DatabaseEloquentHasOneTest.php | @@ -98,15 +98,24 @@ public function testModelsAreProperlyMatchedToParents()
public function testRelationCountQueryCanBeBuilt()
{
$relation = $this->getRelation();
- $query = m::mock('Illuminate\Database\Eloquent\Builder');
- $query->shouldReceive('select')->once()->with(m::type('Illuminate\Database\Query\Expre... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Database/DatabaseMySqlSchemaGrammarTest.php | @@ -523,6 +523,16 @@ public function testAddingDateTime()
$this->assertEquals('alter table `users` add `foo` datetime not null', $statements[0]);
}
+ public function testAddingDateTimeTz()
+ {
+ $blueprint = new Blueprint('users');
+ $blueprint->dateTimeTz('foo');
+ $statements = $blueprint->toSql($this->getC... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Database/DatabasePostgresSchemaGrammarTest.php | @@ -424,6 +424,15 @@ public function testAddingDateTime()
$this->assertEquals('alter table "users" add column "foo" timestamp(0) without time zone not null', $statements[0]);
}
+ public function testAddingDateTimeTz()
+ {
+ $blueprint = new Blueprint('users');
+ $blueprint->dateTimeTz('foo');
+ $statements = ... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Database/DatabaseSQLiteSchemaGrammarTest.php | @@ -364,6 +364,15 @@ public function testAddingDateTime()
$this->assertEquals('alter table "users" add column "foo" datetime not null', $statements[0]);
}
+ public function testAddingDateTimeTz()
+ {
+ $blueprint = new Blueprint('users');
+ $blueprint->dateTimeTz('foo');
+ $statements = $blueprint->toSql($thi... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Database/DatabaseSqlServerSchemaGrammarTest.php | @@ -392,6 +392,15 @@ public function testAddingDateTime()
$this->assertEquals('alter table "users" add "foo" datetime not null', $statements[0]);
}
+ public function testAddingDateTimeTz()
+ {
+ $blueprint = new Blueprint('users');
+ $blueprint->dateTimeTz('foo');
+ $statements = $blueprint->toSql($this->getC... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Session/SessionStoreTest.php | @@ -84,10 +84,17 @@ public function testSessionInvalidate()
{
$session = $this->getSession();
$oldId = $session->getId();
+
$session->set('foo','bar');
$this->assertGreaterThan(0, count($session->all()));
- $session->getHandler()->shouldReceive('destroy')->never();
+
+ $session->flash('name', 'Taylor');... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Support/SupportCollectionTest.php | @@ -650,6 +650,28 @@ public function testRejectRemovesElementsPassingTruthTest()
}
+ public function testSearchReturnsIndexOfFirstFoundItem()
+ {
+ $c = new Collection([1, 2, 3, 4, 5, 2, 5, 'foo' => 'bar']);
+
+ $this->assertEquals(1, $c->search(2));
+ $this->assertEquals('foo', $c->search('bar'));
+ $this->a... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/Support/SupportHelpersTest.php | @@ -94,6 +94,13 @@ public function testArrayOnly()
}
+ public function testArrayCollapse()
+ {
+ $array = [[1], [2], [3], ['foo', 'bar'], collect(['baz', 'boom'])];
+ $this->assertEquals([1, 2, 3, 'foo', 'bar', 'baz', 'boom'], array_collapse($array));
+ }
+
+
public function testArrayDivide()
{
$array = ... | true |
Other | laravel | framework | 330d11ba8cd3d6c0a54a1125943526b126147b5f.json | fix merge conflicts. | tests/View/ViewFactoryTest.php | @@ -342,6 +342,18 @@ public function testSectionFlushing()
}
+ public function testHasSection()
+ {
+ $factory = $this->getFactory();
+ $factory->startSection('foo');
+ echo 'hi';
+ $factory->stopSection();
+
+ $this->assertTrue($factory->hasSection('foo'));
+ $this->assertFalse($factory->hasSection('bar'))... | true |
Other | laravel | framework | a8236fa1efaef9c23a763068d012e53a663bfe68.json | Add blank lines between test methods | tests/View/ViewBladeCompilerTest.php | @@ -646,6 +646,7 @@ public function testRetrieveDefaultEscapedContentTags()
$this->assertEquals(['{{{', '}}}'], $compiler->getEscapedContentTags());
}
+
public function testSequentialCompileStringCalls()
{
$compiler = new BladeCompiler($this->getFiles(), __DIR__); | false |
Other | laravel | framework | f0789b5b4585076d55793e5563b948380030dfe4.json | Add blank lines between test methods | tests/View/ViewBladeCompilerTest.php | @@ -70,6 +70,7 @@ public function testCompileSetAndGetThePath()
$this->assertEquals('foo', $compiler->getPath());
}
+
public function testCompileWithPathSetBefore()
{
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
@@ -82,6 +83,7 @@ public function testCompileWithPathSetBefore()
$th... | false |
Other | laravel | framework | 1c8e24deee344668baf0bb40c78e286b361d6862.json | Fix Blade sequential compileString calls.
Clear compilation artifacts ($this->footer) before starting another compilation.
Issue is exposed when calling compileString() twice for templates with @extends directive. | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -78,8 +78,6 @@ class BladeCompiler extends Compiler implements CompilerInterface {
*/
public function compile($path = null)
{
- $this->footer = array();
-
if ($path)
{
$this->setPath($path);
@@ -123,6 +121,8 @@ public function setPath($path)
public function compileString($value)
{
$result = ... | true |
Other | laravel | framework | 1c8e24deee344668baf0bb40c78e286b361d6862.json | Fix Blade sequential compileString calls.
Clear compilation artifacts ($this->footer) before starting another compilation.
Issue is exposed when calling compileString() twice for templates with @extends directive. | tests/View/ViewBladeCompilerTest.php | @@ -646,6 +646,20 @@ public function testRetrieveDefaultEscapedContentTags()
$this->assertEquals(['{{{', '}}}'], $compiler->getEscapedContentTags());
}
+ public function testSequentialCompileStringCalls()
+ {
+ $compiler = new BladeCompiler($this->getFiles(), __DIR__);
+ $string = '@extends(\'foo\')
+tes... | true |
Other | laravel | framework | 69e5c3c1daca84549a15ce3a96021ec914bf002a.json | Add security contact to readme | 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... | false |
Other | laravel | framework | 549bd4aa94c2dddbeb74630ffb5b8ddd4f4d7fbd.json | Extract credentials retrieval to method | src/Illuminate/Foundation/Auth/AuthenticatesAndRegistersUsers.php | @@ -61,7 +61,7 @@ public function postLogin(Request $request)
'email' => 'required|email', 'password' => 'required',
]);
- $credentials = $request->only('email', 'password');
+ $credentials = $this->getCredentials($request);
if (Auth::attempt($credentials, $request->has('remember')))
{
@@ -84,6 +84,1... | false |
Other | laravel | framework | 644e13583e940bf3e76c7c74640376683fa4ad40.json | Provide collection with final models in hydrate | 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)
... | false |
Other | laravel | framework | f44f335e29dca1198814e45df473489cb18305cc.json | Add getter for the defferedService property.
Added a simple getter method for the Application's deferredServices
property. | src/Illuminate/Foundation/Application.php | @@ -940,6 +940,16 @@ public function getLoadedProviders()
return $this->loadedProviders;
}
+ /**
+ * Get the application's deferred services.
+ *
+ * @return array
+ */
+ public function getDeferredServices()
+ {
+ return $this->deferredServices;
+ }
+
/**
* Set the applicati... | false |
Other | laravel | framework | decd163efff4537ec0d2648953d8baf654901a62.json | Add method to dynamically add a deferred service.
Added a simple method onto the application class that allow users to add
an item to the application's deferredServices array. | src/Illuminate/Foundation/Application.php | @@ -951,6 +951,17 @@ public function setDeferredServices(array $services)
$this->deferredServices = $services;
}
+ /**
+ * Add a service to the application's deferred services.
+ *
+ * @param string $service
+ * @return void
+ */
+ public function addDeferredService($service)
+ {
+ $this->deferredService... | false |
Other | laravel | framework | 682d6179bf8558e93176c03d6532cd744eae8705.json | Add test case for shorter statement | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -264,7 +264,7 @@ protected function compileStatements($value)
{
$match[0] = $this->$method(array_get($match, 3));
}
- else if (isset($this->statements[$match[1]]))
+ elseif (isset($this->statements[$match[1]]))
{
$match[0] = call_user_func($this->statements[$match[1]], array_get($match, 3))... | true |
Other | laravel | framework | 682d6179bf8558e93176c03d6532cd744eae8705.json | Add test case for shorter statement | tests/View/ViewBladeCompilerTest.php | @@ -557,6 +557,19 @@ public function testCustomStatements()
}
+ public function testCustomShortStatements()
+ {
+ $compiler = new BladeCompiler($this->getFiles(), __DIR__);
+ $compiler->addStatement('customControl', function($expression) {
+ return '<?php echo custom_control(); ?>';
+ });
+
+ $string = '@cu... | true |
Other | laravel | framework | 534689d354261155afd2d0321c16afcac063537f.json | Implement new mechanism for extending Blade.
Instead of using outdated matcher methods, even custom tags
are now matched my the same powerful regex that was
contributed earlier.
Extensions are also easier to write this way. | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -9,6 +9,13 @@ class BladeCompiler extends Compiler implements CompilerInterface {
*/
protected $extensions = array();
+ /**
+ * All custom statement handlers.
+ *
+ * @var array
+ */
+ protected $statements = [];
+
/**
* The file currently being compiled.
*
@@ -250,10 +257,17 @@ protected function... | false |
Other | laravel | framework | 73c88939d7b5e554741f6913a1d94cd441678e51.json | Add failing test for new custom statement handler. | tests/View/ViewBladeCompilerTest.php | @@ -540,6 +540,23 @@ public function testCustomExtensionsAreCompiled()
}
+ public function testCustomStatements()
+ {
+ $compiler = new BladeCompiler($this->getFiles(), __DIR__);
+ $compiler->addStatement('customControl', function($expression) {
+ return "<?php echo custom_control{$expression}; ?>";
+ });
+
... | false |
Other | laravel | framework | 5d93473b56b7ce481000902ec8f2e3c426be7c03.json | Fix path for namespaced translation overrides
This change fixes #8302 | src/Illuminate/Translation/FileLoader.php | @@ -87,7 +87,7 @@ protected function loadNamespaced($locale, $group, $namespace)
*/
protected function loadNamespaceOverrides(array $lines, $locale, $group, $namespace)
{
- $file = "{$this->path}/packages/{$locale}/{$namespace}/{$group}.php";
+ $file = "{$this->path}/vendor/{$namespace}/{$locale}/{$group}.php"... | true |
Other | laravel | framework | 5d93473b56b7ce481000902ec8f2e3c426be7c03.json | Fix path for namespaced translation overrides
This change fixes #8302 | tests/Translation/TranslationFileLoaderTest.php | @@ -26,7 +26,7 @@ public function testLoadMethodWithNamespacesProperlyCallsLoader()
{
$loader = new FileLoader($files = m::mock('Illuminate\Filesystem\Filesystem'), __DIR__);
$files->shouldReceive('exists')->once()->with('bar/en/foo.php')->andReturn(true);
- $files->shouldReceive('exists')->once()->with(__DIR_... | true |
Other | laravel | framework | 2f01b93c9e918dc83532aa19a8960a3c810c0357.json | Remove old matcher methods | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -706,39 +706,6 @@ public function extend(callable $compiler)
$this->extensions[] = $compiler;
}
- /**
- * Get the regular expression for a generic Blade function.
- *
- * @param string $function
- * @return string
- */
- public function createMatcher($function)
- {
- return '/(?<!\w)(\s*)@'.$function.... | true |
Other | laravel | framework | 2f01b93c9e918dc83532aa19a8960a3c810c0357.json | Remove old matcher methods | tests/View/ViewBladeCompilerTest.php | @@ -540,50 +540,6 @@ public function testCustomExtensionsAreCompiled()
}
- public function testCreateMatcher()
- {
- $compiler = new BladeCompiler($this->getFiles(), __DIR__);
- $compiler->extend(
- function($view, BladeCompiler $compiler)
- {
- $pattern = $compiler->createMatcher('customControl');
- ... | true |
Other | laravel | framework | 118dede7e042dc1678fbfd4320471a6e0ffa1ecf.json | Add zip function to Collection
Inspired by Ruby and Python: http://apidock.com/ruby/Array/zip | src/Illuminate/Support/Collection.php | @@ -762,6 +762,28 @@ protected function valueRetriever($value)
};
}
+ /**
+ * Zip the collection together with one or more arrays
+ *
+ * e.g. new Collection([1, 2, 3])->zip([4, 5, 6]);
+ * => [[1, 4], [2, 5], [3, 6]]
+ *
+ * @param \Illuminate\Support\Collection|\Illuminate\Contracts\Support\Arrayab... | true |
Other | laravel | framework | 118dede7e042dc1678fbfd4320471a6e0ffa1ecf.json | Add zip function to Collection
Inspired by Ruby and Python: http://apidock.com/ruby/Array/zip | tests/Support/SupportCollectionTest.php | @@ -630,6 +630,35 @@ public function testPaginate()
$this->assertEquals([], $c->forPage(3, 2)->all());
}
+
+ public function testZip()
+ {
+ $c = new Collection([1, 2, 3]);
+ $c = $c->zip(new Collection([4, 5, 6]));
+ $this->assertInstanceOf('Illuminate\Support\Collection', $c);
+ $this->assertInstanceOf('Il... | true |
Other | laravel | framework | b825a3c197249f468f3525f5ffd4c2f0987e8a66.json | Enclose PostgreSQL schema name with double quotes
Schema names must be enclosed with double quotes to prevent PDOException while setting search path to a alphanumerical value. Following exception is from a production environment (v4.2.17). (Note that the first id is trimmed version of the second id)
[PDOException]
... | src/Illuminate/Database/Connectors/PostgresConnector.php | @@ -54,7 +54,7 @@ public function connect(array $config)
{
$schema = $config['schema'];
- $connection->prepare("set search_path to {$schema}")->execute();
+ $connection->prepare("set search_path to \"{$schema}\"")->execute();
}
return $connection; | true |
Other | laravel | framework | b825a3c197249f468f3525f5ffd4c2f0987e8a66.json | Enclose PostgreSQL schema name with double quotes
Schema names must be enclosed with double quotes to prevent PDOException while setting search path to a alphanumerical value. Following exception is from a production environment (v4.2.17). (Note that the first id is trimmed version of the second id)
[PDOException]
... | tests/Database/DatabaseConnectorTest.php | @@ -71,7 +71,7 @@ public function testPostgresSearchPathIsSet()
$connector->expects($this->once())->method('getOptions')->with($this->equalTo($config))->will($this->returnValue(array('options')));
$connector->expects($this->once())->method('createConnection')->with($this->equalTo($dsn), $this->equalTo($config), $... | true |
Other | laravel | framework | 7ce580c88bbfc131a5562a8913a8a3c2d8e6546e.json | Add dropIfExists() support for SQL Server
SQL Server is currently the only driver lacking dropIfExists() support, giving no warning when it is used. This solution was tested on Windows Server 2012 running SQL Server 2014 and should be compatible with SQL Server going all the way back to v7.
The other drivers use `... | src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php | @@ -132,6 +132,18 @@ public function compileDrop(Blueprint $blueprint, Fluent $command)
return 'drop table '.$this->wrapTable($blueprint);
}
+ /**
+ * Compile a drop table (if exists) command.
+ *
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $command
+... | false |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Bus/BusDispatcherTest.php | @@ -139,13 +139,6 @@ public function handle()
}
}
-class BusDispatcherTestBasicHandler {
- public function handle(BusDispatcherTestBasicCommand $command)
- {
-
- }
-}
-
class BusDispatcherTestQueuedHandler implements Illuminate\Contracts\Queue\ShouldBeQueued {
} | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Database/DatabaseEloquentBuilderTest.php | @@ -513,21 +513,13 @@ protected function getMockQueryBuilder()
}
-class EloquentBuilderTestModelStub extends Illuminate\Database\Eloquent\Model {}
-
class EloquentBuilderTestScopeStub extends Illuminate\Database\Eloquent\Model {
public function scopeApproved($query)
{
$query->where('foo', 'bar');
}
}
... | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Database/DatabaseEloquentMorphTest.php | @@ -205,13 +205,6 @@ protected function getManyRelation()
class EloquentMorphResetModelStub extends Illuminate\Database\Eloquent\Model {}
-class EloquentMorphResetBuilderStub extends Illuminate\Database\Eloquent\Builder {
- public function __construct() { $this->query = new EloquentRelationQueryStub; }
- public fu... | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Database/DatabaseEloquentPivotTest.php | @@ -91,8 +91,6 @@ public function testDeleteMethodDeletesModelByKeys()
}
-class DatabaseEloquentPivotTestModelStub extends Illuminate\Database\Eloquent\Model {}
-
class DatabaseEloquentPivotTestDateStub extends Illuminate\Database\Eloquent\Relations\Pivot {
public function getDates()
{ | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Database/DatabaseEloquentRelationTest.php | @@ -76,16 +76,6 @@ public function getQuery()
}
-class EloquentRelationResetStub extends Illuminate\Database\Eloquent\Builder {
- public function __construct() { $this->query = new EloquentRelationQueryStub; }
- public function getModel() { return new EloquentRelationResetModelStub; }
-}
-
-
-class EloquentRelatio... | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Database/DatabaseSoftDeletingScopeTest.php | @@ -107,17 +107,3 @@ public function testOnlyTrashedExtension()
}
}
-
-
-class DatabaseSoftDeletingScopeBuilderStub {
- public $extensions = [];
- public $onDelete;
- public function extend($name, $callback)
- {
- $this->extensions[$name] = $callback;
- }
- public function onDelete($callback)
- {
- $this->onDele... | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Foundation/FoundationApplicationTest.php | @@ -135,33 +135,6 @@ public function testEnvironment()
}
-class ApplicationCustomExceptionHandlerStub extends Illuminate\Foundation\Application {
-
- public function prepareResponse($value)
- {
- $response = m::mock('Symfony\Component\HttpFoundation\Response');
- $response->shouldReceive('send')->once();
- retu... | true |
Other | laravel | framework | 357c2664825911d53cbb9c43e7d5305b2161e2e8.json | Remove dead code (stubs) in test classes | tests/Validation/ValidationValidatorTest.php | @@ -1443,10 +1443,3 @@ protected function getRealTranslator()
}
}
-
-
-class ValidatorTestAfterCallbackStub {
- public function validate() {
- $_SERVER['__validator.after.test'] = true;
- }
-} | true |
Other | laravel | framework | c15fd12dc866a602dbc27a03366fa3b53bd06466.json | Remove unnecessary is_null check. | src/Illuminate/Database/Eloquent/Model.php | @@ -1622,19 +1622,16 @@ public function touchOwners()
{
$this->$relation()->touch();
- if ( ! is_null($this->$relation))
+ if ($this->$relation instanceof Model)
{
- if ($this->$relation instanceof Model)
- {
- $this->$relation->touchOwners();
- }
- elseif ($this->$relation instanceof C... | false |
Other | laravel | framework | 51249415072614aada9f2bb51d9340d687f71a24.json | Reduce is_null call. | src/Illuminate/Database/Eloquent/Model.php | @@ -1622,16 +1622,19 @@ public function touchOwners()
{
$this->$relation()->touch();
- if ( ! is_null($this->$relation) && $this->$relation instanceof Model)
+ if ( ! is_null($this->$relation))
{
- $this->$relation->touchOwners();
- }
- elseif ( ! is_null($this->$relation) && $this->$relation in... | false |
Other | laravel | framework | deebda1e4a02fe901b83bacaf35a53da9606c1e1.json | Fix touchOwners() on many to many relationship. | src/Illuminate/Database/Eloquent/Model.php | @@ -1622,10 +1622,17 @@ public function touchOwners()
{
$this->$relation()->touch();
- if ( ! is_null($this->$relation))
+ if ( ! is_null($this->$relation) && $this->$relation instanceof Model)
{
$this->$relation->touchOwners();
}
+ elseif ( ! is_null($this->$relation) && $this->$relation in... | false |
Other | laravel | framework | 8e211ead462c96929fd31392a000c417840955bc.json | fix wrong indention | src/Illuminate/Database/Schema/Builder.php | @@ -5,240 +5,240 @@
class Builder {
- /**
- * The database connection instance.
- *
- * @var \Illuminate\Database\Connection
- */
- protected $connection;
-
- /**
- * The schema grammar instance.
- *
- * @var \Illuminate\Database\Schema\Grammars\Grammar
- */
- protected ... | false |
Other | laravel | framework | 153094586e49be5d7176eba991f6cb20aa31bfd6.json | Use header() function | src/Illuminate/Http/Response.php | @@ -31,7 +31,7 @@ public function setContent($content)
// from routes that will be automatically transformed to their JSON form.
if ($this->shouldBeJson($content))
{
- $this->headers->set('Content-Type', 'application/json');
+ $this->header('Content-Type', 'application/json');
$content = $this->morph... | false |
Other | laravel | framework | ae4ff8e705ba9f3f6e6c2dc9e758ceb03446d1b9.json | Add missing curly brackets | src/Illuminate/Foundation/Application.php | @@ -479,7 +479,9 @@ public function registerConfiguredProviders()
public function register($provider, $options = array(), $force = false)
{
if ($registered = $this->getProvider($provider) && ! $force)
- return $registered;
+ {
+ return $registered;
+ }
// If the given... | true |
Other | laravel | framework | ae4ff8e705ba9f3f6e6c2dc9e758ceb03446d1b9.json | Add missing curly brackets | src/Illuminate/Routing/Route.php | @@ -125,10 +125,14 @@ public function run(Request $request)
try
{
if ( ! is_string($this->action['uses']))
+ {
return $this->runCallable($request);
+ }
if ($this->customDispatcherIsBound())
+ {
return $this->runWithCustomDispatcher($request);
+ }
return $this->runController($requ... | true |
Other | laravel | framework | 705ccb731cd65574b047c945a71a9adb60f078b9.json | Use unguarded method for forceFill and forceCreate | src/Illuminate/Database/Eloquent/Model.php | @@ -416,13 +416,15 @@ public function fill(array $attributes)
*/
public function forceFill(array $attributes)
{
- static::unguard();
-
- $this->fill($attributes);
-
- static::reguard();
+ // Since some versions of PHP have a bug that prevents it from properly
+ // binding the late static context in a closur... | true |
Other | laravel | framework | 705ccb731cd65574b047c945a71a9adb60f078b9.json | Use unguarded method for forceFill and forceCreate | tests/Database/DatabaseEloquentModelTest.php | @@ -105,6 +105,15 @@ public function testCreateMethodSavesNewModel()
}
+ public function testForceCreateMethodSavesNewModelWithGuardedAttributes()
+ {
+ $_SERVER['__eloquent.saved'] = false;
+ $model = EloquentModelSaveStub::forceCreate(['id' => 21]);
+ $this->assertTrue($_SERVER['__eloquent.saved']);
+ $this... | true |
Other | laravel | framework | dfc6bb040994806f8d56fa995b2818209fd2ad59.json | Replace some spaces with tabs | tests/Mail/MailMandrillTransportTest.php | @@ -2,44 +2,44 @@
class MailMandrillTransportTest extends PHPUnit_Framework_TestCase {
- public function testSend()
- {
- $message = new Swift_Message('Foo subject', 'Bar body');
- $message->setTo('me@example.com');
- $message->setBcc('you@example.com');
-
- $transport = new Mandr... | false |
Other | laravel | framework | cca3c44078d458e9013e6788f40744907a9af616.json | Fix some tests | tests/Cookie/CookieTest.php | @@ -69,7 +69,7 @@ public function testUnqueue()
{
$cookie = $this->getCreator();
$cookie->queue($cookie->make('foo','bar'));
- $this->assertArrayHasKey('foo',$cookie->getQueuedCookies());
+ $this->assertArrayHasKey('foo', $cookie->getQueuedCookies());
$cookie->unqueue('foo');
$this->assertEmpty($cookie-... | true |
Other | laravel | framework | cca3c44078d458e9013e6788f40744907a9af616.json | Fix some tests | tests/Database/DatabaseEloquentModelTest.php | @@ -55,7 +55,7 @@ public function testCalculatedAttributes()
$attributes = $model->getAttributes();
// ensure password attribute was not set to null
- $this->assertFalse(array_key_exists('password', $attributes));
+ $this->assertArrayNotHasKey('password', $attributes);
$this->assertEquals('******', $model-... | true |
Other | laravel | framework | cca3c44078d458e9013e6788f40744907a9af616.json | Fix some tests | tests/Database/DatabaseEloquentRelationTest.php | @@ -14,10 +14,10 @@ public function tearDown()
public function testSetRelationFail()
{
$parent = new EloquentRelationResetModelStub;
- $relation =new EloquentRelationResetModelStub;
- $parent->setRelation('test',$relation);
- $parent->setRelation('foo','bar');
- $this->assertTrue(!array_key_exists('foo', $pa... | true |
Other | laravel | framework | cca3c44078d458e9013e6788f40744907a9af616.json | Fix some tests | tests/Session/SessionStoreTest.php | @@ -70,13 +70,13 @@ public function testCantSetInvalidId()
$session = $this->getSession();
$session->setId(null);
- $this->assertFalse(null == $session->getId());
+ $this->assertNotNull($session->getId());
$session->setId(array('a'));
- $this->assertFalse(array('a') == $session->getId());
+ $this->asse... | true |
Other | laravel | framework | ff988e4290329140638cc71c054d030c9a545937.json | Fix getCountForPagination for grouped query
Signed-off-by: Graham Campbell <graham@mineuk.com> | src/Illuminate/Database/Query/Builder.php | @@ -1388,7 +1388,7 @@ public function paginate($perPage = 15, $columns = ['*'])
{
$page = Paginator::resolveCurrentPage();
- $total = $this->getCountForPagination();
+ $total = $this->getCountForPagination($columns);
$results = $this->forPage($page, $perPage)->get($columns);
@@ -1420,16 +1420,28 @@ publ... | true |
Other | laravel | framework | ff988e4290329140638cc71c054d030c9a545937.json | Fix getCountForPagination for grouped query
Signed-off-by: Graham Campbell <graham@mineuk.com> | tests/Database/DatabaseEloquentIntegrationTest.php | @@ -156,6 +156,19 @@ public function testPaginatedModelCollectionRetrieval()
}
+ public function testCountForPaginationWithGrouping()
+ {
+ EloquentTestUser::create(['id' => 1, 'email' => 'taylorotwell@gmail.com']);
+ EloquentTestUser::create(['id' => 2, 'email' => 'abigailotwell@gmail.com']);
+ EloquentTestUs... | true |
Other | laravel | framework | 08a59792be97afb598ae59ad816aae9de677f3b6.json | Add empty comments for empty functions | src/Illuminate/Database/Connection.php | @@ -182,7 +182,10 @@ public function useDefaultSchemaGrammar()
*
* @return \Illuminate\Database\Schema\Grammars\Grammar
*/
- protected function getDefaultSchemaGrammar() {}
+ protected function getDefaultSchemaGrammar()
+ {
+ //
+ }
/**
* Set the query post processor to the default implementation. | true |
Other | laravel | framework | 08a59792be97afb598ae59ad816aae9de677f3b6.json | Add empty comments for empty functions | src/Illuminate/Database/Seeder.php | @@ -24,7 +24,10 @@ class Seeder {
*
* @return void
*/
- public function run() {}
+ public function run()
+ {
+ //
+ }
/**
* Seed the given connection from the given path. | true |
Other | laravel | framework | 08a59792be97afb598ae59ad816aae9de677f3b6.json | Add empty comments for empty functions | src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php | @@ -91,7 +91,10 @@ protected function loadRoutesFrom($path)
*
* @return void
*/
- public function register() {}
+ public function register()
+ {
+ //
+ }
/**
* Pass dynamic methods onto the router instance. | true |
Other | laravel | framework | 5e905c728e4e486c8d4090d51b5037ec97a5253b.json | Fix some docblocks | src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php | @@ -242,7 +242,7 @@ public function find($id, $columns = ['*'])
/**
* Find multiple related models by their primary keys.
*
- * @param mixed $id
+ * @param mixed $ids
* @param array $columns
* @return \Illuminate\Database\Eloquent\Collection
*/
@@ -299,7 +299,7 @@ protected function getSelectCo... | true |
Other | laravel | framework | 5e905c728e4e486c8d4090d51b5037ec97a5253b.json | Fix some docblocks | src/Illuminate/Queue/Worker.php | @@ -40,7 +40,7 @@ class Worker {
/**
* The exception handler instance.
*
- * @var \Illuminate\Exception\Handler
+ * @var \Illuminate\Foundation\Exceptions\Handler
*/
protected $exceptions;
| true |
Other | laravel | framework | 080f8192b5a9531b1c54e3efa455c526e5f264ee.json | Add reset method to migrator. | src/Illuminate/Database/Console/Migrations/ResetCommand.php | @@ -56,19 +56,14 @@ public function fire()
$pretend = $this->input->getOption('pretend');
- while (true)
- {
- $count = $this->migrator->rollback($pretend);
-
- // Once the migrator has run we will grab the note output and send it out to
- // the console screen, since the migrator itself functions withou... | true |
Other | laravel | framework | 080f8192b5a9531b1c54e3efa455c526e5f264ee.json | Add reset method to migrator. | src/Illuminate/Database/Migrations/Migrator.php | @@ -175,6 +175,33 @@ public function rollback($pretend = false)
return count($migrations);
}
+ /**
+ * Rolls all of the currently applied migrations back.
+ *
+ * @param bool $pretend
+ * @return int
+ */
+ public function reset($pretend = false)
+ {
+ $this->notes = [];
+
+ $migrations = array_reverse(... | true |
Other | laravel | framework | 080f8192b5a9531b1c54e3efa455c526e5f264ee.json | Add reset method to migrator. | tests/Database/DatabaseMigrationResetCommandTest.php | @@ -16,8 +16,8 @@ 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 | 080f8192b5a9531b1c54e3efa455c526e5f264ee.json | Add reset method to migrator. | tests/Database/DatabaseMigratorTest.php | @@ -191,6 +191,114 @@ public function testNothingIsRolledBackWhenNothingInRepository()
$migrator->rollback();
}
+
+ public function testResettingMigrationsRollsBackAllMigrations()
+ {
+ $migrator = $this->getMock('Illuminate\Database\Migrations\Migrator', ['resolve'], [
+ m::mock('Illuminate\Database\Migratio... | true |
Other | laravel | framework | 3f223fba974bf56551d576618109ec50429fe0b2.json | Fix weird wording. | src/Illuminate/Database/Console/Migrations/StatusCommand.php | @@ -16,7 +16,7 @@ class StatusCommand extends BaseCommand {
*
* @var string
*/
- protected $description = 'Show a list of migrations up/down';
+ protected $description = 'Show the status of each migration';
/**
* The migrator instance. | false |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Database/Console/Migrations/MigrateCommand.php | @@ -63,7 +63,7 @@ public function fire()
// so that migrations may be run for any path within the applications.
if ( ! is_null($path = $this->input->getOption('path')))
{
- $path = $this->laravel['path.base'].'/'.$path;
+ $path = $this->laravel->basePath().'/'.$path;
}
else
{ | true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php | @@ -16,7 +16,7 @@ public function bootstrap(Application $app)
{
try
{
- Dotenv::load($app['path.base'], $app->environmentFile());
+ Dotenv::load($app->basePath(), $app->environmentFile());
}
catch (InvalidArgumentException $e)
{ | true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Foundation/Console/AppNameCommand.php | @@ -259,7 +259,7 @@ protected function getUserClassPath()
*/
protected function getBootstrapPath()
{
- return $this->laravel['path.base'].'/bootstrap/app.php';
+ return $this->laravel->basePath().'/bootstrap/app.php';
}
/**
@@ -269,7 +269,7 @@ protected function getBootstrapPath()
*/
protected funct... | true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Foundation/Console/ConfigCacheCommand.php | @@ -66,7 +66,7 @@ public function fire()
*/
protected function getFreshConfiguration()
{
- $app = require $this->laravel['path.base'].'/bootstrap/app.php';
+ $app = require $this->laravel->basePath().'/bootstrap/app.php';
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
| true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Foundation/Console/RouteCacheCommand.php | @@ -75,7 +75,7 @@ public function fire()
*/
protected function getFreshApplicationRoutes()
{
- $app = require $this->laravel['path.base'].'/bootstrap/app.php';
+ $app = require $this->laravel->basePath().'/bootstrap/app.php';
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
| true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Foundation/Providers/ComposerServiceProvider.php | @@ -21,7 +21,7 @@ public function register()
{
$this->app->singleton('composer', function($app)
{
- return new Composer($app['files'], $app['path.base']);
+ return new Composer($app['files'], $app->basePath());
});
}
| true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Foundation/helpers.php | @@ -106,7 +106,7 @@ function auth()
*/
function base_path($path = '')
{
- return app()->make('path.base').($path ? '/'.$path : $path);
+ return app()->basePath().($path ? '/'.$path : $path);
}
}
| true |
Other | laravel | framework | 0984411bda2cd2cc62a698f222b32ee991d57ff5.json | Use basePath helper. | src/Illuminate/Queue/QueueServiceProvider.php | @@ -112,7 +112,7 @@ protected function registerListener()
$this->app->singleton('queue.listener', function($app)
{
- return new Listener($app['path.base']);
+ return new Listener($app->basePath());
});
}
| true |
Other | laravel | framework | c72dc3aa2f5d072c5b6a769b4683730bf7da7179.json | Use the slice method | src/Illuminate/Support/Collection.php | @@ -408,7 +408,7 @@ public function merge($items)
*/
public function forPage($page, $perPage)
{
- return new static(array_slice($this->items, ($page - 1) * $perPage, $perPage));
+ return $this->slice(($page - 1) * $perPage, $perPage);
}
/** | false |
Other | laravel | framework | 46203676c748ac3cdb4849e75e711ca9cb1ca118.json | Create "auth" helper | src/Illuminate/Foundation/helpers.php | @@ -83,6 +83,19 @@ function asset($path, $secure = null)
}
}
+if ( ! function_exists('auth'))
+{
+ /**
+ * Get the available auth instance.
+ *
+ * @return \Illuminate\Contracts\Auth\Guard
+ */
+ function auth()
+ {
+ return app('Illuminate\Contracts\Auth\Guard');
+ }
+}
+
if ( ! function_exists('base_path')... | false |
Other | laravel | framework | 7bbc31c75f94f29f0d76a9a3ffdb500dcc2bd9d6.json | Add "unguarded" method to eloquent | src/Illuminate/Database/Eloquent/Model.php | @@ -416,13 +416,10 @@ public function fill(array $attributes)
*/
public function forceFill(array $attributes)
{
- static::unguard();
-
- $this->fill($attributes);
-
- static::reguard();
-
- return $this;
+ return $this->unguarded(function() use ($attributes)
+ {
+ return $this->fill($attributes);
+ });
... | true |
Other | laravel | framework | 7bbc31c75f94f29f0d76a9a3ffdb500dcc2bd9d6.json | Add "unguarded" method to eloquent | tests/Database/DatabaseEloquentModelTest.php | @@ -1,6 +1,7 @@
<?php
use Mockery as m;
+use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\ModelNotFoundException;
class DatabaseEloquentModelTest extends PHPUnit_Framework_TestCase {
@@ -758,6 +759,28 @@ public function testGlobalGuarded()
}
+ public function testUnguaredRunsCallba... | true |
Other | laravel | framework | bf87be23a152895ea6869f50aaaee25aac7870ac.json | Fix broken PR. | src/Illuminate/Routing/UrlGenerator.php | @@ -320,7 +320,7 @@ protected function replaceRouteParameters($path, array &$parameters)
if (count($parameters))
{
$path = preg_replace_sub(
- '/\{[^?]+?\}/', $parameters, $this->replaceNamedParameters($path, $parameters)
+ '/\{.*?\}/', $parameters, $this->replaceNamedParameters($path, $parameters)
... | true |
Other | laravel | framework | bf87be23a152895ea6869f50aaaee25aac7870ac.json | Fix broken PR. | src/Illuminate/Support/helpers.php | @@ -543,12 +543,7 @@ function preg_replace_sub($pattern, &$replacements, $subject)
{
foreach ($replacements as $key => $value)
{
- if (is_int($key))
- {
- unset($replacements[$key]);
-
- return $value;
- }
+ return array_shift($replacements);
}
}, $subject); | true |
Other | laravel | framework | bf87be23a152895ea6869f50aaaee25aac7870ac.json | Fix broken PR. | tests/Routing/RoutingUrlGeneratorTest.php | @@ -70,12 +70,6 @@ public function testBasicRouteGeneration()
$route = new Illuminate\Routing\Route(array('GET'), 'foo/bar/{baz}', array('as' => 'foobar'));
$routes->add($route);
- /**
- * Optional Parameter...
- */
- $route = new Illuminate\Routing\Route(array('GET'), 'foo/bar/{baz?}', array('as' => 'foo... | true |
Other | laravel | framework | 6a9aa29278e13274549d8205f2b21a2d2cb70e98.json | Run schedule after booting app. | src/Illuminate/Foundation/Console/Kernel.php | @@ -57,7 +57,11 @@ public function __construct(Application $app, Dispatcher $events)
{
$this->app = $app;
$this->events = $events;
- $this->defineConsoleSchedule();
+
+ $this->app->booted(function()
+ {
+ $this->defineConsoleSchedule();
+ });
}
/** | false |
Other | laravel | framework | 648826ce52981353bbfda26e53d546f9d54d101d.json | Add support for FTP adapter in filesystem | src/Illuminate/Filesystem/FilesystemManager.php | @@ -5,6 +5,7 @@
use OpenCloud\Rackspace;
use League\Flysystem\FilesystemInterface;
use League\Flysystem\Filesystem as Flysystem;
+use League\Flysystem\Adapter\Ftp as FtpAdapter;
use League\Flysystem\Rackspace\RackspaceAdapter;
use League\Flysystem\Adapter\Local as LocalAdapter;
use League\Flysystem\AwsS3v2\AwsS3A... | false |
Other | laravel | framework | 5114257478e2ee1aa53ec44573cfafdec74e7473.json | Use the rename function
Update the "move" function of the Adapter to use the "rename" function of the driver, instead of using a copy/delete combination. | src/Illuminate/Filesystem/FilesystemAdapter.php | @@ -164,9 +164,7 @@ public function copy($from, $to)
*/
public function move($from, $to)
{
- $this->driver->copy($from, $to);
-
- $this->driver->delete($from);
+ $this->driver->rename($from, $to);
}
/** | false |
Other | laravel | framework | 078697196e7f7f6c3315c8657ec2fb2310c4d423.json | Fix selected columns on hasManyThrough | src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php | @@ -203,6 +203,8 @@ public function get($columns = array('*'))
// 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.
+ $columns = $this->q... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.