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 | 01541893d20a5540d1f8e911e780f907103bfb60.json | Use alternative for array_add | src/Illuminate/Container/Container.php | @@ -388,7 +388,7 @@ public function tag($abstracts, $tags)
foreach ($tags as $tag)
{
- array_add($this->tags, $tag, []);
+ if ( ! isset($this->tags[$tag])) $this->tags[$tag] = [];
foreach ((array) $abstracts as $abstract)
{ | false |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | src/Illuminate/Cache/DatabaseStore.php | @@ -73,7 +73,7 @@ public function get($key)
{
$this->forget($key);
- return null;
+ return;
}
return $this->encrypter->decrypt($cache->value); | true |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | src/Illuminate/Filesystem/FilesystemAdapter.php | @@ -294,7 +294,7 @@ protected function filterContentsByType($contents, $type)
*/
protected function parseVisibility($visibility)
{
- if (is_null($visibility)) return null;
+ if (is_null($visibility)) return;
switch ($visibility)
{ | true |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | src/Illuminate/Foundation/Console/RouteListCommand.php | @@ -183,7 +183,7 @@ protected function filterRoute(array $route)
if (($this->option('name') && ! str_contains($route['name'], $this->option('name'))) ||
$this->option('path') && ! str_contains($route['uri'], $this->option('path')))
{
- return null;
+ return;
}
return $route; | true |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | src/Illuminate/Routing/Router.php | @@ -792,7 +792,7 @@ public function model($key, $class, Closure $callback = null)
{
$this->bind($key, function($value) use ($class, $callback)
{
- if (is_null($value)) return null;
+ if (is_null($value)) return;
// For model binders, we will attempt to retrieve the models using the first
// method... | true |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | src/Illuminate/Support/Collection.php | @@ -431,7 +431,7 @@ public function put($key, $value)
*/
public function random($amount = 1)
{
- if ($this->isEmpty()) return null;
+ if ($this->isEmpty()) return;
$keys = array_rand($this->items, $amount);
| true |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | src/Illuminate/Validation/Validator.php | @@ -1413,7 +1413,7 @@ protected function getDateTimeWithOptionalFormat($format, $value)
}
catch (\Exception $e)
{
- return null;
+ return;
}
}
| true |
Other | laravel | framework | 074c00d5d1584e27d407e2e4cae9f504727b709f.json | Standardize return null; | tests/Routing/RoutingRouteTest.php | @@ -229,7 +229,7 @@ public function testBasicBeforeFilters()
$router = $this->getRouter();
$router->get('foo/bar', array('before' => 'foo:bar,baz|bar:boom', function() { return 'hello'; }));
- $router->filter('foo', function($route, $request, $bar, $baz) { return null; });
+ $router->filter('foo', function($r... | true |
Other | laravel | framework | 6b167368c96ad146cdeab9c67ede66e5f9759ac8.json | Remove unneeded class. | src/Illuminate/Foundation/Artisan.php | @@ -1,60 +0,0 @@
-<?php namespace Illuminate\Foundation;
-
-use Illuminate\Console\Application as ConsoleApplication;
-
-class Artisan {
-
- /**
- * The application instance.
- *
- * @var \Illuminate\Foundation\Application
- */
- protected $app;
-
- /**
- * The Artisan console instance.
- *
- * @var \Illuminate... | false |
Other | laravel | framework | 6b185832af11badaef1c47547db435a5124e0b88.json | Add lastOutput property. | src/Illuminate/Console/Application.php | @@ -26,6 +26,13 @@ class Application extends SymfonyApplication implements ApplicationContract {
*/
protected $events;
+ /**
+ * The output from the previous command.
+ *
+ * @var \Symfony\Component\Console\Output\OutputInterface
+ */
+ protected $lastOutput;
+
/**
* Create a new Artisan console applica... | false |
Other | laravel | framework | 95d4f703f6a0b2c5e3f9d24412dd0049dae9c20b.json | Tweak some bootstrapping logic. | src/Illuminate/Foundation/Application.php | @@ -28,6 +28,13 @@ class Application extends Container implements ApplicationContract {
*/
protected $basePath;
+ /**
+ * Indicates if the application has been bootstrapped before.
+ *
+ * @var bool
+ */
+ protected $hasBeenBootstrapped = false;
+
/**
* Indicates if the application has "booted".
*
@@... | true |
Other | laravel | framework | 95d4f703f6a0b2c5e3f9d24412dd0049dae9c20b.json | Tweak some bootstrapping logic. | src/Illuminate/Foundation/Console/Kernel.php | @@ -27,21 +27,13 @@ class Kernel implements KernelContract {
* @return void
*/
protected $bootstrappers = [
- 'Illuminate\Foundation\Bootstrap\DetectEnvironment',
+ 'Illuminate\Foundation\Bootstrap\LoadEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
- 'Illuminate\Foundation\Bootstrap\Co... | true |
Other | laravel | framework | 95d4f703f6a0b2c5e3f9d24412dd0049dae9c20b.json | Tweak some bootstrapping logic. | src/Illuminate/Foundation/Http/Kernel.php | @@ -21,22 +21,14 @@ class Kernel implements KernelContract {
*/
protected $router;
- /**
- * Indicates if the bootstrap process has run.
- *
- * @var bool
- */
- protected $bootstrapped = false;
-
/**
* The bootstrap classes for the application.
*
* @return void
*/
protected $bootstrappers = ... | true |
Other | laravel | framework | a83c3f2f471b9ba78e3f9500caf1673cac7f413d.json | Fix model typo in Eloquent/Model.php | src/Illuminate/Database/Eloquent/Model.php | @@ -336,7 +336,7 @@ public static function hasGlobalScope($scope)
}
/**
- * Get a global scope registered with the modal.
+ * Get a global scope registered with the model.
*
* @param \Illuminate\Database\Eloquent\ScopeInterface $scope
* @return \Illuminate\Database\Eloquent\ScopeInterface|null | false |
Other | laravel | framework | c1e751f5f4d9dcd4af879b76bff706cb8d9d9090.json | Fix app:name Command | src/Illuminate/Foundation/Console/AppNameCommand.php | @@ -70,6 +70,8 @@ public function fire()
{
$this->currentRoot = trim($this->getAppNamespace(), '\\');
+ $this->setBootstrapNamespaces();
+
$this->setAppDirectoryNamespace();
$this->setConfigNamespaces();
@@ -89,15 +91,13 @@ public function fire()
protected function setAppDirectoryNamespace()
{
$f... | false |
Other | laravel | framework | 10c405725f153670645d5b5657965698149a8f34.json | Add a comment. | src/Illuminate/Foundation/Bootstrap/ConfigureLogging.php | @@ -14,8 +14,13 @@ class ConfigureLogging {
*/
public function bootstrap(Application $app)
{
- $app->instance('log', new Writer(new Monolog($app->environment()), $app['events']));
+ $app->instance('log', new Writer(
+ new Monolog($app->environment()), $app['events'])
+ );
+ // Next we will bind the a Clo... | false |
Other | laravel | framework | b83b9c26a193369361b7c7fef3bcd5220bb49934.json | Add configure logging to bootstrappers. | src/Illuminate/Foundation/Bootstrap/ConfigureLogging.php | @@ -0,0 +1,27 @@
+<?php namespace Illuminate\Foundation\Bootstrap;
+
+use Illuminate\Log\Writer;
+use Monolog\Logger as Monolog;
+use Illuminate\Contracts\Foundation\Application;
+
+class ConfigureLogging {
+
+ /**
+ * Bootstrap the given application.
+ *
+ * @param \Illuminate\Contracts\Foundation\Application $ap... | true |
Other | laravel | framework | b83b9c26a193369361b7c7fef3bcd5220bb49934.json | Add configure logging to bootstrappers. | src/Illuminate/Foundation/Bootstrap/DetectEnvironment.php | @@ -3,7 +3,7 @@
use Dotenv;
use Illuminate\Contracts\Foundation\Application;
-class LoadEnvironment {
+class DetectEnvironment {
/**
* Bootstrap the given application. | true |
Other | laravel | framework | b83b9c26a193369361b7c7fef3bcd5220bb49934.json | Add configure logging to bootstrappers. | src/Illuminate/Foundation/Console/Kernel.php | @@ -27,8 +27,9 @@ class Kernel implements KernelContract {
* @return void
*/
protected $bootstrappers = [
- 'Illuminate\Foundation\Bootstrap\LoadEnvironment',
+ 'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
+ 'Illuminate\Foundation\Bootstrap\Conf... | true |
Other | laravel | framework | b83b9c26a193369361b7c7fef3bcd5220bb49934.json | Add configure logging to bootstrappers. | src/Illuminate/Foundation/Http/Kernel.php | @@ -34,8 +34,9 @@ class Kernel implements KernelContract {
* @return void
*/
protected $bootstrappers = [
- 'Illuminate\Foundation\Bootstrap\LoadEnvironment',
+ 'Illuminate\Foundation\Bootstrap\DetectEnvironment',
'Illuminate\Foundation\Bootstrap\LoadConfiguration',
+ 'Illuminate\Foundation\Bootstrap\Conf... | true |
Other | laravel | framework | e8baa62405001f22ae0f7080550882c4d8edb9a2.json | Add tests for single parameter routing | tests/Routing/RoutingUrlGeneratorTest.php | @@ -64,6 +64,12 @@ public function testBasicRouteGeneration()
$route = new Illuminate\Routing\Route(array('GET'), 'foo/bar/{baz}/breeze/{boom}', array('as' => 'bar'));
$routes->add($route);
+ /**
+ * Single Parameter...
+ */
+ $route = new Illuminate\Routing\Route(array('GET'), 'foo/bar/{baz}', array('as'... | false |
Other | laravel | framework | 19690e94b1b14d6cccf3d5ffb3484ba680464c57.json | Add realpath to app_path()
Fix issues when comparing paths for namespace detection on Windows environments. | src/Illuminate/Console/AppNamespaceDetectorTrait.php | @@ -14,7 +14,7 @@ protected function getAppNamespace()
foreach ((array) data_get($composer, 'autoload.psr-4') as $namespace => $path)
{
- if (app_path() == realpath(base_path().'/'.$path)) return $namespace;
+ if (realpath(app_path()) == realpath(base_path().'/'.$path)) return $namespace;
}
throw ne... | false |
Other | laravel | framework | 308c01f927aff04d0958d8167d64e1beb17398cd.json | Use "middleware" term. | src/Illuminate/Foundation/Http/Kernel.php | @@ -46,7 +46,7 @@ class Kernel implements KernelContract {
*
* @var array
*/
- protected $stack = [];
+ protected $middleware = [];
/**
* Create a new HTTP kernel instance.
@@ -74,7 +74,7 @@ public function handle($request)
return (new Stack($this->app))
->send($request)
- ... | false |
Other | laravel | framework | 319de5a80a3bddf64489d2935ddd47e70e0274ce.json | Remove type hinting in toRoute
`toRoute()` used in `action()` and `route()` which can accept simple value __or__ array. Thus the
```php
link_to_route('resource.edit', 'Edit', 1);
```
will throw an exception `Argument 2 passed to Illuminate\Routing\UrlGenerator::toRoute() must be of the type array, integer given`. | src/Illuminate/Routing/UrlGenerator.php | @@ -241,11 +241,11 @@ public function route($name, $parameters = array(), $absolute = true)
* Get the URL for a given route instance.
*
* @param \Illuminate\Routing\Route $route
- * @param array $parameters
- * @param bool $absolute
+ * @param mixed $parameters
+ * @param bool $absolute
* @re... | false |
Other | laravel | framework | 9a6b77518d16c7a4933cd4f25fe544a2c5325151.json | fix phpdoc block for Eloquent Model find method
add null | src/Illuminate/Database/Eloquent/Model.php | @@ -633,7 +633,7 @@ public static function all($columns = array('*'))
*
* @param mixed $id
* @param array $columns
- * @return \Illuminate\Support\Collection|static
+ * @return \Illuminate\Support\Collection|static|null
*/
public static function find($id, $columns = array('*'))
{ | false |
Other | laravel | framework | 4ef2c071dcf7a6cdffdcc9e0a4e6a5d90ebf88d4.json | Fix a Str::snake Function | src/Illuminate/Support/Str.php | @@ -279,15 +279,17 @@ public static function slug($title, $separator = '-')
*
* @param string $value
* @param string $delimiter
+ * @param bool $each
* @return string
*/
- public static function snake($value, $delimiter = '_')
+ public static function snake($value, $delimiter = '_', $each = true... | true |
Other | laravel | framework | 4ef2c071dcf7a6cdffdcc9e0a4e6a5d90ebf88d4.json | Fix a Str::snake Function | tests/Support/SupportStrTest.php | @@ -149,4 +149,10 @@ public function testRandom()
$this->assertInternalType('string', Str::random());
}
+ public function testSnake()
+ {
+ $this->assertEquals('laravel_p_h_p_framework', Str::snake('LaravelPHPFramework'));
+ $this->assertEquals('laravel-phpframework', Str::snake('LaravelPHPFramework', '-', fal... | true |
Other | laravel | framework | 3a01c535cd1cc272a523558bb4b9b7d250b28387.json | Use default request if necessary. | src/Illuminate/Foundation/Application.php | @@ -706,6 +706,8 @@ public function stack(Closure $stack)
*/
public function run(SymfonyRequest $request = null)
{
+ $request = $request ?: $this['request'];
+
with($response = $this->handleRequest($request))->send();
$this->terminate($request, $response); | false |
Other | laravel | framework | 60f1b62e8209350e8ceaa0407e5e2cfc0ea79f5c.json | Remove the extra space. | src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php | @@ -40,7 +40,6 @@ public function boot()
{
$this->loadRoutes();
}
-
}
/** | false |
Other | laravel | framework | ab6bd591304b87720ea39401a090db0b6e71ba55.json | Move view error binding to a service provider. | src/Illuminate/View/Middleware/ErrorBinder.php | @@ -0,0 +1,58 @@
+<?php namespace Illuminate\View\Middleware;
+
+use Closure;
+use Illuminate\Support\ViewErrorBag;
+use Illuminate\Contracts\Routing\Middleware;
+use Illuminate\Contracts\View\Factory as ViewFactory;
+
+class ErrorBinder implements Middleware {
+
+ /**
+ * The view factory implementation.
+ *
+ * @v... | true |
Other | laravel | framework | ab6bd591304b87720ea39401a090db0b6e71ba55.json | Move view error binding to a service provider. | src/Illuminate/View/ViewServiceProvider.php | @@ -20,12 +20,7 @@ public function register()
$this->registerViewFinder();
- // Once the other components have been registered we're ready to include the
- // view environment and session binder. The session binder will bind onto
- // the "before" application event and add errors into shared view data.
... | true |
Other | laravel | framework | 60b184ef67ab878df450ba2c7f417b1b95075e6a.json | Remove container property. | src/Illuminate/Routing/Controller.php | @@ -27,13 +27,6 @@ abstract class Controller {
*/
protected $afterFilters = array();
- /**
- * The container instance.
- *
- * @var \Illuminate\Container\Container
- */
- protected $container;
-
/**
* The router instance.
* | false |
Other | laravel | framework | 789a9b3667d4b6a70d2c4892cc2c675e6129a40b.json | Set the router on the controller. | src/Illuminate/Routing/ControllerServiceProvider.php | @@ -13,6 +13,8 @@ public function register()
{
$this->app->singleton('illuminate.route.dispatcher', function($app)
{
+ Controller::setRouter($app['router']);
+
return new ControllerDispatcher($app['router'], $app);
});
} | false |
Other | laravel | framework | fe244ae1d623e53dcffa88202d3a425a2979f5f5.json | Use annotations for auth controller. | src/Illuminate/Auth/Console/stubs/controller.stub | @@ -1,12 +1,15 @@
<?php namespace {{namespace}};
-use Illuminate\Routing\Controller;
use Illuminate\Contracts\Auth\Authenticator;
use {{request.namespace}}Auth\LoginRequest;
use {{request.namespace}}Auth\RegisterRequest;
-class AuthController extends Controller {
+/**
+ * @Middleware("csrf")
+ * @Middleware("... | false |
Other | laravel | framework | 4492b52ca5b8d2e5220b82de0630a147e9ad1357.json | Convert frame guard to middleware. | src/Illuminate/Http/FrameGuard.php | @@ -1,41 +1,20 @@
-<?php namespace Illuminate\Http;
+<?php namespace Illuminate\Http\Middleware;
-use Symfony\Component\HttpKernel\HttpKernelInterface;
-use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
+use Closure;
+use Illuminate\Contracts\Routing\Middleware;
-class FrameGuard implements HttpKernel... | false |
Other | laravel | framework | cf1d3f289b345b9e8da636887cf5f19219dd86f9.json | Remove all references to EnvironmentVariables.
Signed-off-by: crynobone <crynobone@gmail.com> | src/Illuminate/Foundation/Application.php | @@ -13,7 +13,6 @@
use Illuminate\Routing\RoutingServiceProvider;
use Illuminate\Contracts\Support\ResponsePreparer;
use Illuminate\Exception\ExceptionServiceProvider;
-use Illuminate\Config\FileEnvironmentVariablesLoader;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Termin... | true |
Other | laravel | framework | cf1d3f289b345b9e8da636887cf5f19219dd86f9.json | Remove all references to EnvironmentVariables.
Signed-off-by: crynobone <crynobone@gmail.com> | src/Illuminate/Foundation/Console/Optimize/config.php | @@ -69,9 +69,6 @@
$basePath.'/vendor/laravel/framework/src/Illuminate/Support/NamespacedItemResolver.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Config/FileLoader.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Config/LoaderInterface.php',
- $basePath.'/vendor/laravel/framework... | true |
Other | laravel | framework | bc185edd184b220ee115c9b1f8c1d2dc20ae1e2f.json | Respect $catch argument in handle() | src/Illuminate/Foundation/Application.php | @@ -746,7 +746,7 @@ public function handle(SymfonyRequest $request, $type = HttpKernelInterface::MAS
}
catch (\Exception $e)
{
- if ($this->runningUnitTests()) throw $e;
+ if (!$catch || $this->runningUnitTests()) throw $e;
return $this['exception']->handleException($e);
} | true |
Other | laravel | framework | bc185edd184b220ee115c9b1f8c1d2dc20ae1e2f.json | Respect $catch argument in handle() | tests/Foundation/FoundationApplicationTest.php | @@ -123,6 +123,20 @@ public function testSingleProviderCanProvideMultipleDeferredServices()
$this->assertEquals('foobar', $app->make('bar'));
}
+ public function testHandleRespectsCatchArgument()
+ {
+ $this->setExpectedException('Exception');
+ $app = new Application;
+ $app['router'] = $router = m::mock('St... | true |
Other | laravel | framework | ee347278e625b3d07cacc70ffa1747ee53542af3.json | Check url as 'A' type record in DNS instead 'MX'
Example,
```
checkdnsrr('www.laravel.com'); // false
but
checkdnsrr('www.laravel.com', 'A'); //true
``` | src/Illuminate/Validation/Validator.php | @@ -1165,7 +1165,7 @@ protected function validateActiveUrl($attribute, $value)
{
$url = str_replace(array('http://', 'https://', 'ftp://'), '', strtolower($value));
- return checkdnsrr($url);
+ return checkdnsrr($url, 'A');
}
/** | false |
Other | laravel | framework | cd46f5fcf99d448d96a9066aff39cb69e20c0c62.json | Make route:list work with middleware | src/Illuminate/Foundation/Console/RouteListCommand.php | @@ -42,7 +42,7 @@ class RouteListCommand extends Command {
* @var array
*/
protected $headers = array(
- 'Domain', 'URI', 'Name', 'Action', 'Before Filters', 'After Filters'
+ 'Domain', 'URI', 'Name', 'Action', 'Middleware'
);
/**
@@ -107,8 +107,7 @@ protected function getRouteInformation(Route $route)
... | false |
Other | laravel | framework | 833a0e2dd9b85ba1d6cb7a925fcc353f319af2f4.json | Use short array here. | src/Illuminate/Routing/Router.php | @@ -561,7 +561,7 @@ public function dispatchToRoute(Request $request, $runMiddleware = true)
return $route;
});
- $this->events->fire('router.matched', array($route, $request));
+ $this->events->fire('router.matched', [$route, $request]);
// Once we have successfully matched the incoming request to a gi... | false |
Other | laravel | framework | 80a06259ff82f2818c6c764d752b817a74eae9d3.json | Assign the route to the request after routing. | src/Illuminate/Foundation/Providers/FormRequestServiceProvider.php | @@ -61,6 +61,8 @@ protected function initializeRequest(FormRequest $form, Request $current)
);
$form->setUserResolver($current->getUserResolver());
+
+ $form->setRouteResolver($current->getRouteResolver());
}
} | true |
Other | laravel | framework | 80a06259ff82f2818c6c764d752b817a74eae9d3.json | Assign the route to the request after routing. | src/Illuminate/Http/Request.php | @@ -21,6 +21,20 @@ class Request extends SymfonyRequest {
*/
protected $sessionStore;
+ /**
+ * The user resolver callback.
+ *
+ * @var \Closure
+ */
+ protected $userResolver;
+
+ /**
+ * The route resolver callback.
+ *
+ * @var \Closure
+ */
+ protected $routeResolver;
+
/**
* Return the Request... | true |
Other | laravel | framework | 80a06259ff82f2818c6c764d752b817a74eae9d3.json | Assign the route to the request after routing. | src/Illuminate/Routing/Router.php | @@ -551,8 +551,16 @@ public function dispatchWithoutMiddleware(Request $request)
*/
public function dispatchToRoute(Request $request, $runMiddleware = true)
{
+ // First we will find a route that matches this request. We will also set the
+ // route resolver on the request so middlewares assigned to the route ... | true |
Other | laravel | framework | 6892e6bf4620e3bda723869602f0e5b7bc4873e6.json | Remove unused ReflectionMethod in Scanners | src/Illuminate/Events/Annotations/Scanner.php | @@ -2,7 +2,6 @@
use SplFileInfo;
use ReflectionClass;
-use ReflectionMethod;
use Symfony\Component\Finder\Finder;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\SimpleAnnotationReader; | true |
Other | laravel | framework | 6892e6bf4620e3bda723869602f0e5b7bc4873e6.json | Remove unused ReflectionMethod in Scanners | src/Illuminate/Routing/Annotations/Scanner.php | @@ -2,7 +2,6 @@
use SplFileInfo;
use ReflectionClass;
-use ReflectionMethod;
use Symfony\Component\Finder\Finder;
use Doctrine\Common\Annotations\AnnotationRegistry;
use Doctrine\Common\Annotations\SimpleAnnotationReader; | true |
Other | laravel | framework | 4a0b0569c860fd364e860471d730c1021fe4b517.json | Use braces around one-liner. | src/Illuminate/Events/Annotations/Scanner.php | @@ -36,7 +36,9 @@ public function __construct($scan, $rootNamespace)
$this->rootNamespace = rtrim($rootNamespace, '\\').'\\';
foreach (Finder::create()->files()->in(__DIR__.'/Annotations') as $file)
+ {
AnnotationRegistry::registerFile($file->getRealPath());
+ }
}
/** | false |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Capsule/Manager.php | @@ -2,7 +2,6 @@
use PDO;
use Illuminate\Support\Fluent;
-use Illuminate\Cache\CacheManager;
use Illuminate\Container\Container;
use Illuminate\Database\DatabaseManager;
use Illuminate\Contracts\Events\Dispatcher;
@@ -189,30 +188,6 @@ public function setEventDispatcher(Dispatcher $dispatcher)
$this->container-... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Connection.php | @@ -58,20 +58,6 @@ class Connection implements ConnectionInterface {
*/
protected $events;
- /**
- * The paginator environment instance.
- *
- * @var \Illuminate\Pagination\Paginator
- */
- protected $paginator;
-
- /**
- * The cache manager instance.
- *
- * @var \Illuminate\Cache\CacheManager
- */
- pr... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/DatabaseManager.php | @@ -191,23 +191,8 @@ protected function prepare(Connection $connection)
$connection->setEventDispatcher($this->app['events']);
}
- // The database connection can also utilize a cache manager instance when cache
- // functionality is used on queries, which provides an expressive interface
- // to cachin... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Eloquent/Builder.php | @@ -225,86 +225,6 @@ public function lists($column, $key = null)
return $results;
}
- /**
- * Get a paginator for the "select" statement.
- *
- * @param int $perPage
- * @param array $columns
- * @return \Illuminate\Pagination\Paginator
- */
- public function paginate($perPage = null, $columns = arra... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Eloquent/Model.php | @@ -47,13 +47,6 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab
*/
protected $primaryKey = 'id';
- /**
- * The number of models to return for pagination.
- *
- * @var int
- */
- protected $perPage = 15;
-
/**
* Indicates if the IDs are auto-incrementing.
*
@@ -2017... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Eloquent/Relations/BelongsToMany.php | @@ -159,27 +159,6 @@ 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($pe... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php | @@ -233,22 +233,6 @@ protected function getSelectColumns(array $columns = array('*'))
return array_merge($columns, array($this->parent->getTable().'.'.$this->firstKey));
}
- /**
- * Get a paginator for the "select" statement.
- *
- * @param int $perPage
- * @param array $columns
- * @return \Illuminat... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/Query/Builder.php | @@ -133,41 +133,6 @@ class Builder {
*/
public $lock;
- /**
- * The backups of fields while doing a pagination count.
- *
- * @var array
- */
- protected $backups = array();
-
- /**
- * The key that should be used when caching the query.
- *
- * @var string
- */
- protected $cacheKey;
-
- /**
- * The nu... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/README.md | @@ -27,9 +27,6 @@ use Illuminate\Events\Dispatcher;
use Illuminate\Container\Container;
$capsule->setEventDispatcher(new Dispatcher(new Container));
-// Set the cache manager instance used by connections... (optional)
-$capsule->setCacheManager(...);
-
// Make this Capsule instance available globally via static me... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Database/composer.json | @@ -18,8 +18,6 @@
"require-dev": {
"illuminate/console": "5.0.*",
"illuminate/filesystem": "5.0.*",
- "illuminate/pagination": "5.0.*",
- "illuminate/support": "5.0.*"
},
"autoload": {
"psr-4": { | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | src/Illuminate/Pagination/composer.json | @@ -9,10 +9,8 @@
],
"require": {
"php": ">=5.4.0",
- "illuminate/http": "5.0.*",
+ "illuminate/contracts": "5.0.*",
"illuminate/support": "5.0.*",
- "symfony/http-foundation": "2.6.*",
- "symfony/translation": "2.6.*"
},
"autoload": {
"psr-4": { | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | tests/Database/DatabaseConnectionTest.php | @@ -239,29 +239,6 @@ public function testSchemaBuilderCanBeCreated()
}
- public function testResolvingPaginatorThroughClosure()
- {
- $connection = $this->getMockConnection();
- $paginator = m::mock('Illuminate\Pagination\Factory');
- $connection->setPaginator(function() use ($paginator)
- {
- return $pagi... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | tests/Database/DatabaseEloquentBuilderTest.php | @@ -216,73 +216,6 @@ public function testMacrosAreCalledOnBuilder()
}
- public function testPaginateMethod()
- {
- $builder = m::mock('Illuminate\Database\Eloquent\Builder[get]', array($this->getMockQueryBuilder()));
- $builder->setModel($this->getMockModel());
- $builder->getModel()->shouldReceive('getPerPage... | true |
Other | laravel | framework | ea6b9589514b0139508b35166b63e9fbc045c285.json | Remove caching and pagination from database. | tests/Database/DatabaseQueryBuilderTest.php | @@ -59,65 +59,6 @@ public function testBasicSelectDistinct()
}
- public function testSelectWithCaching()
- {
- $cache = m::mock('stdClass');
- $driver = m::mock('stdClass');
- $query = $this->setupCacheTestQuery($cache, $driver);
-
- $query = $query->remember(5);
-
- $driver->shouldReceive('remember')
- ... | true |
Other | laravel | framework | 9acf685b749ac065f7b4ba52ded5eb5bcbc2bf4e.json | Fix a few bugs. | src/Illuminate/Exception/Handler.php | @@ -6,6 +6,7 @@
use ReflectionFunction;
use Illuminate\Contracts\Support\ResponsePreparer;
use Illuminate\Contracts\Exception\Handler as HandlerContract;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
use Symfony\Component\Debug... | true |
Other | laravel | framework | 9acf685b749ac065f7b4ba52ded5eb5bcbc2bf4e.json | Fix a few bugs. | src/Illuminate/Foundation/Application.php | @@ -714,8 +714,6 @@ public function run(SymfonyRequest $request = null)
$response = with($stack = $this->call($this->stack))->setContainer($this)->run($request);
$response->send();
-
- $stack->terminate($request, $response);
}
/**
@@ -903,20 +901,6 @@ public function abort($code, $message = '', array $he... | true |
Other | laravel | framework | 638b63a7471d451251b0cd7a3914677d2715575d.json | Add helper methods for events. | src/Illuminate/Foundation/Application.php | @@ -666,6 +666,26 @@ public function getScannedRoutesPath()
return $this['path.storage'].'/framework/routes.scanned.php';
}
+ /**
+ * Determine if the application events have been scanned.
+ *
+ * @return bool
+ */
+ public function eventsAreScanned()
+ {
+ return $this['files']->exists($this->getScannedEve... | true |
Other | laravel | framework | 638b63a7471d451251b0cd7a3914677d2715575d.json | Add helper methods for events. | src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php | @@ -13,9 +13,9 @@ class EventServiceProvider extends ServiceProvider {
*/
public function boot(DispatcherContract $events)
{
- if (file_exists($scanned = $this->app['path.storage'].'/framework/events.scanned.php'))
+ if ($this->app->eventsAreScanned())
{
- require $scanned;
+ require $this->app->getScan... | true |
Other | laravel | framework | 964c28e128a72ae4c580b7a83a3e13fa7a7c7d76.json | change Middlewares to Middleware | src/Illuminate/Foundation/Console/Optimize/config.php | @@ -103,8 +103,8 @@
$basePath.'/vendor/laravel/framework/src/Illuminate/Database/ConnectionResolverInterface.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Session/SessionInterface.php',
- $baseP... | false |
Other | laravel | framework | cbc1b73ea9284dcc056bb11c68c76f4fd7940e8e.json | Set the container before running. | src/Illuminate/Routing/Router.php | @@ -591,7 +591,7 @@ protected function runRouteWithinStack(Route $route, Request $request, $runMiddl
{
return $route->run($request);
- }, $runMiddleware ? $this->gatherRouteMiddlewares($route) : []))->run($request);
+ }, $runMiddleware ? $this->gatherRouteMiddlewares($route) : []))->setContainer($this->conta... | false |
Other | laravel | framework | 318e39278831a9d8f95b9d1ebfa3cc9cf8c7fd82.json | Remove old file. | src/Illuminate/Foundation/Console/Optimize/config.php | @@ -56,7 +56,6 @@
$basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/EventServiceProvider.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FormReque... | false |
Other | laravel | framework | b0bd7da50d2d4923734e9c3f865d2988954fc536.json | Fix app:name for middleware. | src/Illuminate/Foundation/Console/AppNameCommand.php | @@ -127,23 +127,23 @@ protected function replaceNamespace($path)
*/
protected function setServiceProviderNamespaceReferences()
{
- $this->setReferencedFilterNamespaces();
+ $this->setReferencedMiddlewareNamespaces();
$this->setReferencedConsoleNamespaces();
$this->setReferencedRouteNamespaces();
}
... | false |
Other | laravel | framework | b35bbe22db5911dc76300faed857ca268b67991e.json | Remove unneeded files. | src/Illuminate/Routing/Console/stubs/filter.after.stub | @@ -1,22 +0,0 @@
-<?php namespace {{namespace}};
-
-use Illuminate\Http\Request;
-use Illuminate\Http\Response;
-use Illuminate\Routing\Route;
-
-class {{class}} {
-
- /**
- * Run the request filter.
- *
- * @param Route $route
- * @param Request $request
- * @param Response $response
- * @return mixed
- *... | true |
Other | laravel | framework | b35bbe22db5911dc76300faed857ca268b67991e.json | Remove unneeded files. | src/Illuminate/Routing/Console/stubs/filter.global.after.stub | @@ -1,20 +0,0 @@
-<?php namespace {{namespace}};
-
-use Illuminate\Http\Request;
-use Illuminate\Http\Response;
-
-class {{class}} {
-
- /**
- * Run the request filter.
- *
- * @param Request $request
- * @param Response $response
- * @return mixed
- */
- public function filter(Request $request, Response $res... | true |
Other | laravel | framework | b35bbe22db5911dc76300faed857ca268b67991e.json | Remove unneeded files. | src/Illuminate/Routing/Console/stubs/filter.global.stub | @@ -1,18 +0,0 @@
-<?php namespace {{namespace}};
-
-use Illuminate\Http\Request;
-
-class {{class}} {
-
- /**
- * Run the request filter.
- *
- * @param Request $request
- * @return mixed
- */
- public function filter(Request $request)
- {
- //
- }
-
-} | true |
Other | laravel | framework | b35bbe22db5911dc76300faed857ca268b67991e.json | Remove unneeded files. | src/Illuminate/Routing/Console/stubs/filter.stub | @@ -1,20 +0,0 @@
-<?php namespace {{namespace}};
-
-use Illuminate\Http\Request;
-use Illuminate\Routing\Route;
-
-class {{class}} {
-
- /**
- * Run the request filter.
- *
- * @param Route $route
- * @param Request $request
- * @return mixed
- */
- public function filter(Route $route, Request $request)
- {
-... | true |
Other | laravel | framework | c29a38f3180e60eb2482f6083f993ecd4f012030.json | Fix a couple of bugs. | src/Illuminate/Routing/Console/stubs/middleware.stub | @@ -1,7 +1,7 @@
<?php namespace {{namespace}};
use Closure;
-use Illuminate\Routing\Contracts\Middleware;
+use Illuminate\Contracts\Routing\Middleware;
class {{class}} implements Middleware {
| true |
Other | laravel | framework | c29a38f3180e60eb2482f6083f993ecd4f012030.json | Fix a couple of bugs. | src/Illuminate/Routing/Router.php | @@ -710,7 +710,7 @@ protected function addGlobalFilter($filter, $callback)
*/
public function middleware($name, $class)
{
- $this->middlewares[$name] = $class;
+ $this->middleware[$name] = $class;
return $this;
} | true |
Other | laravel | framework | 2fee0ed98563ad207b3467edc2be6ce68dc9fa93.json | Set doc blocks. | src/Illuminate/Contracts/Routing/Middleware.php | @@ -7,9 +7,9 @@ interface Middleware {
/**
* Handle an incoming request.
*
- * @param \Symfony\Component\HttpFoundation\Request $request
+ * @param \Illuminate\Http\Request $request
* @param \Closure $next
- * @return \Symfony\Component\HttpFoundation\Response
+ * @return mixed
*/
public funct... | true |
Other | laravel | framework | 2fee0ed98563ad207b3467edc2be6ce68dc9fa93.json | Set doc blocks. | src/Illuminate/Cookie/Guard.php | @@ -31,9 +31,9 @@ public function __construct(EncrypterContract $encrypter)
/**
* Handle an incoming request.
*
- * @param \Symfony\Component\HttpFoundation\Request $request
+ * @param \Illuminate\Http\Request $request
* @param \Closure $next
- * @return \Symfony\Component\HttpFoundation\Response
+ ... | true |
Other | laravel | framework | 2fee0ed98563ad207b3467edc2be6ce68dc9fa93.json | Set doc blocks. | src/Illuminate/Cookie/Queue.php | @@ -28,9 +28,9 @@ public function __construct(CookieJar $cookies)
/**
* Handle an incoming request.
*
- * @param \Symfony\Component\HttpFoundation\Request $request
+ * @param \Illuminate\Http\Request $request
* @param \Closure $next
- * @return \Symfony\Component\HttpFoundation\Response
+ * @return... | true |
Other | laravel | framework | 2fee0ed98563ad207b3467edc2be6ce68dc9fa93.json | Set doc blocks. | src/Illuminate/Session/Middleware/Reader.php | @@ -30,9 +30,9 @@ public function __construct(SessionManager $manager)
/**
* Handle an incoming request.
*
- * @param \Symfony\Component\HttpFoundation\Request $request
+ * @param \Illuminate\Http\Request $request
* @param \Closure $next
- * @return \Symfony\Component\HttpFoundation\Response
+ * @r... | true |
Other | laravel | framework | 2fee0ed98563ad207b3467edc2be6ce68dc9fa93.json | Set doc blocks. | src/Illuminate/Session/Middleware/Writer.php | @@ -33,9 +33,9 @@ public function __construct(SessionManager $manager)
/**
* Handle an incoming request.
*
- * @param \Symfony\Component\HttpFoundation\Request $request
+ * @param \Illuminate\Http\Request $request
* @param \Closure $next
- * @return \Symfony\Component\HttpFoundation\Response
+ * @r... | true |
Other | laravel | framework | dfdee189937da40ac48276b270aa7b8c0ab81a24.json | Adapt test to new behavior. | tests/Foundation/FoundationApplicationTest.php | @@ -95,7 +95,7 @@ public function testDeferredServicesAreLazilyInitialized()
$this->assertTrue($app->bound('foo'));
$this->assertFalse(ApplicationDeferredServiceProviderStub::$initialized);
$app->extend('foo', function($instance, $container) { return $instance.'bar'; });
- $this->assertTrue(ApplicationDeferre... | false |
Other | laravel | framework | a8bd58218b3617a6a3fbdbae7dc929d674968d2d.json | Remove extend() overwriting in application. | src/Illuminate/Foundation/Application.php | @@ -483,29 +483,6 @@ public function bound($abstract)
return isset($this->deferredServices[$abstract]) || parent::bound($abstract);
}
- /**
- * "Extend" an abstract type in the container.
- *
- * (Overriding Container::extend)
- *
- * @param string $abstract
- * @param \Closure $closure
- * @return v... | false |
Other | laravel | framework | a9dd69087a5c5a39d02b1306809211e4d230fb66.json | Add a test case for extend() before bind(). | tests/Container/ContainerTest.php | @@ -214,6 +214,19 @@ public function testExtendIsLazyInitialized()
}
+ public function testExtendCanBeCalledBeforeBind()
+ {
+ $container = new Container;
+ $container->extend('foo', function($old, $container)
+ {
+ return $old.'bar';
+ });
+ $container['foo'] = 'foo';
+
+ $this->assertEquals('foobar', $c... | false |
Other | laravel | framework | 669c5356e65f0712d4f71f2cd8c6345838401ccb.json | Set morphs directly | src/Illuminate/Database/Eloquent/Relations/MorphOneOrMany.php | @@ -101,32 +101,29 @@ public function save(Model $model)
*/
public function create(array $attributes)
{
- $foreign = $this->getForeignAttributesForCreate();
+ $instance = $this->related->newInstance($attributes);
// When saving a polymorphic relationship, we need to set not only the foreign
// key, but... | true |
Other | laravel | framework | 669c5356e65f0712d4f71f2cd8c6345838401ccb.json | Set morphs directly | tests/Database/DatabaseEloquentMorphTest.php | @@ -60,8 +60,10 @@ public function testCreateFunctionOnMorph()
{
// Doesn't matter which relation type we use since they share the code...
$relation = $this->getOneRelation();
- $created = m::mock('stdClass');
- $relation->getRelated()->shouldReceive('newInstance')->once()->with(array('name' => 'taylor', 'mor... | true |
Other | laravel | framework | 059656e04a4ab0ea1fd1fe6afb2dba1cc6cfd7b4.json | Add "redirector" property on "FormRequest"
Adding missing "redirector" property, that is accessed from "FormRequest::setRedirector" method. This would allow to have correct IDE auto-complete on that property within that class. | src/Illuminate/Foundation/Http/FormRequest.php | @@ -22,6 +22,13 @@ class FormRequest extends Request implements ValidatesWhenResolved {
*/
protected $container;
+ /**
+ * The redirector instance.
+ *
+ * @var Redirector
+ */
+ protected $redirector;
+
/**
* The route instance the request is dispatched to.
*
@@ -102,7 +109,7 @@ protected function f... | false |
Other | laravel | framework | 68b2fd0ae1e996ff9faac977eea8dda265797745.json | Tweak a method. | src/Illuminate/Routing/ResourceRegistrar.php | @@ -194,7 +194,7 @@ protected function getResourceName($resource, $method, $options)
// the resource action. Otherwise we'll just use an empty string for here.
$prefix = isset($options['as']) ? $options['as'].'.' : '';
- if (empty($this->router->getGroupStack()))
+ if ( ! $this->router->hasGroupStack())
{
... | true |
Other | laravel | framework | 68b2fd0ae1e996ff9faac977eea8dda265797745.json | Tweak a method. | src/Illuminate/Routing/Router.php | @@ -1031,6 +1031,16 @@ protected function prepareResponse($request, $response)
return $response->prepare($request);
}
+ /**
+ * Determine if the router currently has a group stack.
+ *
+ * @return bool
+ */
+ public function hasGroupStack()
+ {
+ return ! empty($this->groupStack);
+ }
+
/**
* Get the c... | true |
Other | laravel | framework | 9873d6fb33406f149897e75bd6fbabdd020735b8.json | Extract resource registration into its own class. | src/Illuminate/Routing/ResourceRegistrar.php | @@ -0,0 +1,388 @@
+<?php namespace Illuminate\Routing;
+
+class ResourceRegistrar {
+
+ /**
+ * Create a new resource registrar.
+ *
+ * @param \Illuminate\Routing\Router
+ */
+ protected $router;
+
+ /**
+ * The default actions for a resourceful controller.
+ *
+ * @var array
+ */
+ protected $resourceDefault... | true |
Other | laravel | framework | 9873d6fb33406f149897e75bd6fbabdd020735b8.json | Extract resource registration into its own class. | src/Illuminate/Routing/Router.php | @@ -112,13 +112,6 @@ class Router implements HttpKernelInterface, RegistrarContract, RouteFiltererInt
*/
public static $verbs = array('GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS');
- /**
- * The default actions for a resourceful controller.
- *
- * @var array
- */
- protected $resourceDefaults ... | true |
Other | laravel | framework | 16f1e53a47f3edc3d7cc1c73fe1dd0e7622a4a56.json | Use the compiled config path. | src/Illuminate/View/ViewServiceProvider.php | @@ -77,7 +77,7 @@ public function registerBladeEngine($resolver)
// instance to pass into the engine so it can compile the views properly.
$app->bindShared('blade.compiler', function($app)
{
- $cache = $app['path.storage'].'/views';
+ $cache = $app['config']['view.compiled'];
return new BladeCo... | false |
Other | laravel | framework | 46aedf54af4a5c495b7c463874e3f3eb0ecb3691.json | Change some paths. | src/Illuminate/Foundation/Application.php | @@ -759,7 +759,7 @@ public function routesAreCached()
*/
public function getRouteCachePath()
{
- return $this['path.storage'].'/meta/routes.php';
+ return $this['path.storage'].'/framework/routes.php';
}
/** | true |
Other | laravel | framework | 46aedf54af4a5c495b7c463874e3f3eb0ecb3691.json | Change some paths. | src/Illuminate/Foundation/Console/ClearCompiledCommand.php | @@ -25,7 +25,7 @@ class ClearCompiledCommand extends Command {
*/
public function fire()
{
- if (file_exists($path = $this->laravel['path.storage'].'/meta/compiled.php'))
+ if (file_exists($path = $this->laravel['path.storage'].'/framework/compiled.php'))
{
@unlink($path);
} | true |
Other | laravel | framework | 46aedf54af4a5c495b7c463874e3f3eb0ecb3691.json | Change some paths. | src/Illuminate/Foundation/Console/OptimizeCommand.php | @@ -85,7 +85,7 @@ protected function compileClasses()
{
$this->registerClassPreloaderCommand();
- $outputPath = $this->laravel['path.storage'].'/meta/compiled.php';
+ $outputPath = $this->laravel['path.storage'].'/framework/compiled.php';
$this->callSilent('compile', array(
'--config' => implode(',', ... | true |
Other | laravel | framework | 2e3f5533a77837aa1b2781bc5ffa9fce01846827.json | Add a method to forget all queued event handlers. | src/Illuminate/Events/Dispatcher.php | @@ -335,4 +335,17 @@ public function forget($event)
unset($this->listeners[$event], $this->sorted[$event]);
}
+ /**
+ * Forget all of the queued listeners.
+ *
+ * @return void
+ */
+ public function forgetQueued()
+ {
+ foreach ($this->listeners as $key => $value)
+ {
+ if (ends_with($key, '_queue')) $t... | true |
Other | laravel | framework | 2e3f5533a77837aa1b2781bc5ffa9fce01846827.json | Add a method to forget all queued event handlers. | tests/Events/EventsDispatcherTest.php | @@ -57,6 +57,22 @@ public function testQueuedEventsAreFired()
}
+ public function testQueuedEventsCanBeForgotten()
+ {
+ $_SERVER['__event.test'] = 'unset';
+ $d = new Dispatcher;
+ $d->queue('update', array('name' => 'taylor'));
+ $d->listen('update', function($name)
+ {
+ $_SERVER['__event.test'] = $name... | true |
Other | laravel | framework | d2b1bfbbe17bd06c5af8385d1c9e336bfabc834b.json | Fix broken transaction logic when PDO changes | src/Illuminate/Database/Connection.php | @@ -831,6 +831,8 @@ public function getReadPdo()
*/
public function setPdo($pdo)
{
+ if ($this->transactions >= 1) throw new \RuntimeException("Attempt to change PDO inside running transaction");
+
$this->pdo = $pdo;
return $this; | false |
Other | laravel | framework | 0735f1d658f2bf3b2f6672bf8f964890e14ed44d.json | Enable the query log for tests. DRY up code. | src/Illuminate/Container/Container.php | @@ -598,26 +598,19 @@ protected function getDependencyForCallParameter(ReflectionParameter $parameter,
*/
protected function callClass($target, array $parameters = array(), $defaultMethod = null)
{
+ $segments = explode('@', $target);
+
// If the listener has an @ sign, we will assume it is being used to del... | true |
Other | laravel | framework | 0735f1d658f2bf3b2f6672bf8f964890e14ed44d.json | Enable the query log for tests. DRY up code. | tests/Database/DatabaseConnectionTest.php | @@ -267,7 +267,9 @@ protected function getMockConnection($methods = array(), $pdo = null)
{
$pdo = $pdo ?: new DatabaseConnectionTestMockPDO;
$defaults = array('getDefaultQueryGrammar', 'getDefaultPostProcessor', 'getDefaultSchemaGrammar');
- return $this->getMock('Illuminate\Database\Connection', array_merge(... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.