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 | 4d09a3c46aac7e765710d51dfea3e800ea978a13.json | Allow easy extension of user providers. | src/Illuminate/Auth/AuthManager.php | @@ -207,7 +207,7 @@ public function viaRequest($name, callable $callback)
/**
* Register a custom driver creator Closure.
*
- * @param string $driver
+ * @param string $driver
* @param \Closure $callback
* @return $this
*/
@@ -218,11 +218,25 @@ public function extend($... | true |
Other | laravel | framework | 4d09a3c46aac7e765710d51dfea3e800ea978a13.json | Allow easy extension of user providers. | src/Illuminate/Auth/CreatesUserProviders.php | @@ -6,6 +6,13 @@
trait CreatesUserProviders
{
+ /**
+ * The registered custom provider creators.
+ *
+ * @var array
+ */
+ protected $customProviderCreators = [];
+
/**
* Create the user provider implementation for the driver.
*
@@ -18,6 +25,12 @@ protected function createUser... | true |
Other | laravel | framework | e271b486d86f4b7c428371a800e64050692fd606.json | Remove some customization. | src/Illuminate/Auth/AuthManager.php | @@ -137,8 +137,6 @@ public function createTokenDriver($name, $config)
$guard = new TokenGuard(
$this->createUserProvider($config['source']),
$this->app['request'],
- Arr::get($config, 'input', 'api_token'),
- Arr::get($config, 'token', 'api_token')
);
... | true |
Other | laravel | framework | e271b486d86f4b7c428371a800e64050692fd606.json | Remove some customization. | src/Illuminate/Auth/TokenGuard.php | @@ -36,19 +36,15 @@ class TokenGuard implements Guard
*
* @param \Illuminate\Contracts\Auth\UserProvider $provider
* @param \Symfony\Component\HttpFoundation\Request $request
- * @param string $inputKey
- * @param string $storageKey
* @return void
*/
public function __... | true |
Other | laravel | framework | ec4f6ae66e7792e3703d82b47eefb96fced0890e.json | Write tests for token guard. | tests/Auth/AuthTokenGuardTest.php | @@ -0,0 +1,92 @@
+<?php
+
+use Illuminate\Http\Request;
+use Illuminate\Auth\TokenGuard;
+use Illuminate\Contracts\Auth\UserProvider;
+
+class AuthTokenGuardTest extends PHPUnit_Framework_TestCase
+{
+ public function tearDown()
+ {
+ Mockery::close();
+ }
+
+ public function testUserCanBeRetrievedBy... | false |
Other | laravel | framework | 9f5050bab13d40f62a2c1db9c98c659bf1bd25c7.json | Fix bug in validate | src/Illuminate/Auth/TokenGuard.php | @@ -156,12 +156,10 @@ public function id()
*/
public function validate(array $credentials = [])
{
- if (! is_null($token)) {
- $credentials = [$this->storageKey => $credentials[$this->inputKey]];
+ $credentials = [$this->storageKey => $credentials[$this->inputKey]];
- ... | false |
Other | laravel | framework | 939cc94812c1f2e6be155410681de1ddbd7d6b82.json | Allow various methods of passing token. | src/Illuminate/Auth/TokenGuard.php | @@ -2,6 +2,7 @@
namespace Illuminate\Auth;
+use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\UserProvider;
@@ -100,9 +101,9 @@ public function user()
$user = null;
- $token = $this->request->input($this->inputKey);
+ ... | false |
Other | laravel | framework | b44d34056e932898a295e7e58b8c48ce6057324d.json | fix timeout and sleep | src/Illuminate/Queue/Console/ListenCommand.php | @@ -2,6 +2,7 @@
namespace Illuminate\Queue\Console;
+use InvalidArgumentException;
use Illuminate\Queue\Listener;
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
@@ -63,6 +64,12 @@ public function fire()
$timeout = $this->input->getOption('timeout');
+ if ($t... | false |
Other | laravel | framework | 7b6600ba4fc97fd1eb6549913961cd0020d02e56.json | Fix cache events not being fired when using tags. | src/Illuminate/Cache/RedisTaggedCache.php | @@ -13,9 +13,9 @@ class RedisTaggedCache extends TaggedCache
*/
public function forever($key, $value)
{
- $this->pushForeverKeys($namespace = $this->tags->getNamespace(), $key);
+ $this->pushForeverKeys($this->tags->getNamespace(), $key);
- $this->store->forever(sha1($namespace).'... | true |
Other | laravel | framework | 7b6600ba4fc97fd1eb6549913961cd0020d02e56.json | Fix cache events not being fired when using tags. | src/Illuminate/Cache/Repository.php | @@ -6,6 +6,7 @@
use DateTime;
use ArrayAccess;
use Carbon\Carbon;
+use BadMethodCallException;
use Illuminate\Contracts\Cache\Store;
use Illuminate\Support\Traits\Macroable;
use Illuminate\Contracts\Events\Dispatcher;
@@ -255,6 +256,43 @@ public function forget($key)
return $success;
}
+ /**
+ ... | true |
Other | laravel | framework | 7b6600ba4fc97fd1eb6549913961cd0020d02e56.json | Fix cache events not being fired when using tags. | src/Illuminate/Cache/TagSet.php | @@ -97,4 +97,14 @@ public function tagKey($name)
{
return 'tag:'.$name.':key';
}
+
+ /**
+ * Get all of the names in the set.
+ *
+ * @return array
+ */
+ public function getNames()
+ {
+ return $this->names;
+ }
} | true |
Other | laravel | framework | 7b6600ba4fc97fd1eb6549913961cd0020d02e56.json | Fix cache events not being fired when using tags. | src/Illuminate/Cache/TaggedCache.php | @@ -2,20 +2,10 @@
namespace Illuminate\Cache;
-use Closure;
-use DateTime;
-use Carbon\Carbon;
use Illuminate\Contracts\Cache\Store;
-class TaggedCache implements Store
+class TaggedCache extends Repository
{
- /**
- * The cache store implementation.
- *
- * @var \Illuminate\Contracts\Cache\Stor... | true |
Other | laravel | framework | 7b6600ba4fc97fd1eb6549913961cd0020d02e56.json | Fix cache events not being fired when using tags. | tests/Cache/CacheEventsTest.php | @@ -0,0 +1,163 @@
+<?php
+
+use Mockery as m;
+
+class CacheEventTest extends PHPUnit_Framework_TestCase
+{
+ public function tearDown()
+ {
+ m::close();
+ }
+
+ public function testHasTriggersEvents()
+ {
+ $dispatcher = $this->getDispatcher();
+ $repository = $this->getRepository(... | true |
Other | laravel | framework | 7b6600ba4fc97fd1eb6549913961cd0020d02e56.json | Fix cache events not being fired when using tags. | tests/Cache/CacheTaggedCacheTest.php | @@ -70,6 +70,7 @@ public function testRedisCacheTagsPushForeverKeysCorrectly()
$store = m::mock('Illuminate\Contracts\Cache\Store');
$tagSet = m::mock('Illuminate\Cache\TagSet', [$store, ['foo', 'bar']]);
$tagSet->shouldReceive('getNamespace')->andReturn('foo|bar');
+ $tagSet->shouldRe... | true |
Other | laravel | framework | 6b5571b08d7696b02844f8b211fa2cd52c46c585.json | Escape path in sendOutputTo() | src/Illuminate/Console/Scheduling/Event.php | @@ -9,6 +9,7 @@
use GuzzleHttp\Client as HttpClient;
use Illuminate\Contracts\Mail\Mailer;
use Symfony\Component\Process\Process;
+use Symfony\Component\Process\ProcessUtils;
use Illuminate\Contracts\Container\Container;
use Illuminate\Contracts\Foundation\Application;
@@ -652,7 +653,7 @@ public function skip(Cl... | true |
Other | laravel | framework | 6b5571b08d7696b02844f8b211fa2cd52c46c585.json | Escape path in sendOutputTo() | tests/Console/Scheduling/EventTest.php | @@ -12,11 +12,24 @@ public function testBuildCommand()
$this->assertSame("php -i > {$defaultOutput} 2>&1 &", $event->buildCommand());
}
+ public function testBuildCommandSendOutputTo()
+ {
+ $event = new Event('php -i');
+
+ $event->sendOutputTo('/dev/null');
+ $this->assertSa... | true |
Other | laravel | framework | 38d5d28b1afe33f22fde12c4c463b703f8461285.json | Remove 5.5 bug workaround | src/Illuminate/Database/Eloquent/Model.php | @@ -459,13 +459,8 @@ public function fill(array $attributes)
*/
public function forceFill(array $attributes)
{
- // Since some versions of PHP have a bug that prevents it from properly
- // binding the late static context in a closure, we will first store
- // the model in a variabl... | false |
Other | laravel | framework | 32654386eb4a6b000931b93582139e762a9fa7e4.json | remove file that doesn't exist | src/Illuminate/Foundation/Console/Optimize/config.php | @@ -84,7 +84,6 @@
$basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Http/FormRequest.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Bus/DispatchesJobs.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Foundation/Providers/FoundationServiceProvider.php',
- $ba... | false |
Other | laravel | framework | bed1159e201d5126e7246497e9265e37d2270932.json | Use isset() to improve consistency | src/Illuminate/Auth/SessionGuard.php | @@ -412,7 +412,7 @@ protected function hasValidCredentials($user, $credentials)
*/
protected function fireAttemptEvent(array $credentials, $remember, $login)
{
- if ($this->events) {
+ if (isset($this->events)) {
$this->events->fire(new Events\Attempting(
$cre... | false |
Other | laravel | framework | 7310ce44efc018a157ddbaf3aa2b8b768b617cab.json | Return sqlsrv in place of dblib driver | src/Illuminate/Database/DatabaseManager.php | @@ -270,7 +270,7 @@ public function setDefaultConnection($name)
*/
public function supportedDrivers()
{
- return ['mysql', 'pgsql', 'sqlite', 'dblib', 'sqlsrv'];
+ return ['mysql', 'pgsql', 'sqlite', 'sqlsrv'];
}
/**
@@ -280,7 +280,7 @@ public function supportedDrivers()
... | false |
Other | laravel | framework | 3249c620a19cb97f6f2ff55b9712ac4d3326996a.json | Use routable key name. | src/Illuminate/Routing/Router.php | @@ -801,10 +801,14 @@ protected function substituteImplicitBindings($route)
if (array_key_exists($parameter->name, $parameters) &&
! $route->getParameter($parameter->name) instanceof Model) {
- $method = $parameter->isDefaultValueAvailable() ? 'find' : 'findOrFail';
+ ... | false |
Other | laravel | framework | 12a9358b0aedb323ee4fd0bba4a30af6c6342e00.json | Fix undefined index | src/Illuminate/Database/Eloquent/Model.php | @@ -379,7 +379,7 @@ public static function hasGlobalScope($scope)
*/
public static function getGlobalScope($scope)
{
- $modelScopes = static::$globalScopes[get_called_class()];
+ $modelScopes = Arr::get(static::$globalScopes, get_called_class(), []);
if (is_string($scope)) {
... | false |
Other | laravel | framework | c711448531244bb2b6d619469d145e12134a96a4.json | Extend pipeline at routing layer. | src/Illuminate/Pipeline/Pipeline.php | @@ -3,12 +3,7 @@
namespace Illuminate\Pipeline;
use Closure;
-use Exception;
-use Throwable;
-use Illuminate\Http\Request;
use Illuminate\Contracts\Container\Container;
-use Illuminate\Contracts\Debug\ExceptionHandler;
-use Symfony\Component\Debug\Exception\FatalThrowableError;
use Illuminate\Contracts\Pipeline\P... | true |
Other | laravel | framework | c711448531244bb2b6d619469d145e12134a96a4.json | Extend pipeline at routing layer. | src/Illuminate/Pipeline/composer.json | @@ -28,8 +28,5 @@
"dev-master": "5.2-dev"
}
},
- "suggest": {
- "symfony/debug": "Required to handle Throwables during exception handling (2.8.*|3.0.*).",
- },
"minimum-stability": "dev"
} | true |
Other | laravel | framework | c711448531244bb2b6d619469d145e12134a96a4.json | Extend pipeline at routing layer. | src/Illuminate/Routing/ControllerDispatcher.php | @@ -3,7 +3,6 @@
namespace Illuminate\Routing;
use Illuminate\Http\Request;
-use Illuminate\Pipeline\Pipeline;
use Illuminate\Support\Collection;
use Illuminate\Container\Container;
@@ -85,7 +84,6 @@ protected function callWithinStack($instance, $route, $request, $method)
$this->... | true |
Other | laravel | framework | c711448531244bb2b6d619469d145e12134a96a4.json | Extend pipeline at routing layer. | src/Illuminate/Routing/Pipeline.php | @@ -0,0 +1,52 @@
+<?php
+
+namespace Illuminate\Routing;
+
+use Exception;
+use Illuminate\Http\Request;
+use Illuminate\Contracts\Debug\ExceptionHandler;
+use Illuminate\Pipeline\Pipeline as BasePipeline;
+use Symfony\Component\Debug\Exception\FatalThrowableError;
+
+class Pipeline extends BasePipeline
+{
+ /**
+ ... | true |
Other | laravel | framework | c711448531244bb2b6d619469d145e12134a96a4.json | Extend pipeline at routing layer. | src/Illuminate/Routing/Router.php | @@ -7,7 +7,6 @@
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
-use Illuminate\Pipeline\Pipeline;
use Illuminate\Support\Collection;
use Illuminate\Container\Container;
use Illuminate\Database\Eloquent\Model;
@@ -696,7 +695,6 @@ protected function runRouteWithinStack(Route ... | true |
Other | laravel | framework | c711448531244bb2b6d619469d145e12134a96a4.json | Extend pipeline at routing layer. | src/Illuminate/Routing/composer.json | @@ -21,6 +21,7 @@
"illuminate/pipeline": "5.2.*",
"illuminate/session": "5.2.*",
"illuminate/support": "5.2.*",
+ "symfony/debug": "2.8.*|3.0.*",
"symfony/http-foundation": "2.8.*|3.0.*",
"symfony/http-kernel": "2.8.*|3.0.*",
"symfony/routing": "2.8.*|3.0.*" | true |
Other | laravel | framework | 03980778c030736702454ae65aa6c60433b5d4cc.json | fix basic auth middleware. | src/Illuminate/Auth/Middleware/AuthenticateWithBasicAuth.php | @@ -3,24 +3,24 @@
namespace Illuminate\Auth\Middleware;
use Closure;
-use Illuminate\Contracts\Auth\Guard;
+use Illuminate\Contracts\Auth\Factory as AuthFactory;
class AuthenticateWithBasicAuth
{
/**
- * The guard instance.
+ * The guard factory instance.
*
- * @var \Illuminate\Contracts\... | false |
Other | laravel | framework | bcb8a98e22e270824cca8b7c7898acefd537aedb.json | Remove unused variable | src/Illuminate/Auth/SessionGuard.php | @@ -413,8 +413,6 @@ protected function hasValidCredentials($user, $credentials)
protected function fireAttemptEvent(array $credentials, $remember, $login)
{
if ($this->events) {
- $payload = [$credentials, $remember, $login];
-
$this->events->fire(new Events\Attempting(
... | false |
Other | laravel | framework | 6884c5442095175cc042f42ef2066204c0d35a96.json | Add missing docblock | src/Illuminate/Auth/CreatesUserProviders.php | @@ -11,6 +11,8 @@ trait CreatesUserProviders
*
* @param string $provider
* @return \Illuminate\Contracts\Auth\UserProvider
+ *
+ * @throws \InvalidArgumentException
*/
protected function createUserProvider($provider)
{ | false |
Other | laravel | framework | 737ee84cc2f5a71ae359a1fc7c5ced6d741e901d.json | Add support for middleware groups. | src/Illuminate/Foundation/Http/Kernel.php | @@ -49,6 +49,13 @@ class Kernel implements KernelContract
*/
protected $middleware = [];
+ /**
+ * The application's route middleware groups.
+ *
+ * @var array
+ */
+ protected $middlewareGroups = [];
+
/**
* The application's route middleware.
*
@@ -68,6 +75,10 @@ p... | true |
Other | laravel | framework | 737ee84cc2f5a71ae359a1fc7c5ced6d741e901d.json | Add support for middleware groups. | src/Illuminate/Routing/ControllerDispatcher.php | @@ -4,6 +4,7 @@
use Illuminate\Http\Request;
use Illuminate\Pipeline\Pipeline;
+use Illuminate\Support\Collection;
use Illuminate\Container\Container;
class ControllerDispatcher
@@ -102,15 +103,15 @@ protected function callWithinStack($instance, $route, $request, $method)
*/
protected function getMid... | true |
Other | laravel | framework | 737ee84cc2f5a71ae359a1fc7c5ced6d741e901d.json | Add support for middleware groups. | src/Illuminate/Routing/Router.php | @@ -65,6 +65,13 @@ class Router implements RegistrarContract
*/
protected $middleware = [];
+ /**
+ * All of the middleware groups.
+ *
+ * @var array
+ */
+ protected $middlewareGroups = [];
+
/**
* The registered route value binders.
*
@@ -708,24 +715,35 @@ protecte... | true |
Other | laravel | framework | 737ee84cc2f5a71ae359a1fc7c5ced6d741e901d.json | Add support for middleware groups. | tests/Routing/RoutingRouteTest.php | @@ -92,6 +92,38 @@ public function testBasicDispatchingOfRoutes()
$this->assertEquals('closure', $router->dispatch(Request::create('foo/bar', 'GET'))->getContent());
}
+ public function testClosureMiddleware()
+ {
+ $router = $this->getRouter();
+ $router->get('foo/bar', ['middleware... | true |
Other | laravel | framework | b28b995337c20aae42f0847bdca36e581f41eb5e.json | Remove class from compilation. | src/Illuminate/Foundation/Console/Optimize/config.php | @@ -76,7 +76,6 @@
$basePath.'/vendor/laravel/framework/src/Illuminate/Support/ServiceProvider.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Support/AggregateServiceProvider.php',
$basePath.'/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php',
- $basePath.'/vendor/l... | false |
Other | laravel | framework | ecd54a9ad42423e66ff7e55bb1ad7095e5c63977.json | Use the variable. | src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php | @@ -38,8 +38,8 @@ public function bootstrap(Application $app)
$this->loadConfigurationFiles($app, $config);
}
- $app->detectEnvironment(function () {
- return config('app.env', 'production');
+ $app->detectEnvironment(function () use ($config) {
+ return $conf... | false |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | src/Illuminate/Auth/SessionGuard.php | @@ -760,7 +760,7 @@ public function getLastAttempted()
*/
public function getName()
{
- return 'login_'.$this->name.'_'.md5(get_class($this));
+ return 'login_'.$this->name.'_'.sha1(get_class($this));
}
/**
@@ -770,7 +770,7 @@ public function getName()
*/
public func... | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | src/Illuminate/Cache/FileStore.php | @@ -198,7 +198,7 @@ public function flush()
*/
protected function path($key)
{
- $parts = array_slice(str_split($hash = md5($key), 2), 0, 2);
+ $parts = array_slice(str_split($hash = sha1($key), 2), 0, 2);
return $this->directory.'/'.implode('/', $parts).'/'.$hash;
} | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | src/Illuminate/Console/Scheduling/CallbackEvent.php | @@ -103,7 +103,7 @@ public function withoutOverlapping()
*/
protected function mutexPath()
{
- return storage_path('framework/schedule-'.md5($this->description));
+ return storage_path('framework/schedule-'.sha1($this->description));
}
/** | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | src/Illuminate/Console/Scheduling/Event.php | @@ -228,7 +228,7 @@ public function buildCommand()
*/
protected function mutexPath()
{
- return storage_path('framework/schedule-'.md5($this->expression.$this->command));
+ return storage_path('framework/schedule-'.sha1($this->expression.$this->command));
}
/** | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | src/Illuminate/View/Compilers/Compiler.php | @@ -41,7 +41,7 @@ public function __construct(Filesystem $files, $cachePath)
*/
public function getCompiledPath($path)
{
- return $this->cachePath.'/'.md5($path).'.php';
+ return $this->cachePath.'/'.sha1($path).'.php';
}
/** | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | tests/Cache/CacheFileStoreTest.php | @@ -17,10 +17,10 @@ public function testNullIsReturnedIfFileDoesntExist()
public function testPutCreatesMissingDirectories()
{
$files = $this->mockFilesystem();
- $md5 = md5('foo');
- $full_dir = __DIR__.'/'.substr($md5, 0, 2).'/'.substr($md5, 2, 2);
+ $hash = sha1('foo');
+ ... | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | tests/Database/DatabaseEloquentModelTest.php | @@ -54,8 +54,11 @@ public function testCalculatedAttributes()
// ensure password attribute was not set to null
$this->assertArrayNotHasKey('password', $attributes);
$this->assertEquals('******', $model->password);
- $this->assertEquals('5ebe2294ecd0e0f08eab7690d2a6ee69', $attributes['p... | true |
Other | laravel | framework | 2a4acfb65f8fb69cec32cd9f4ccda4566524d5e2.json | Use sha1 rather than md5 | tests/View/ViewBladeCompilerTest.php | @@ -13,7 +13,7 @@ public function tearDown()
public function testIsExpiredReturnsTrueIfCompiledFileDoesntExist()
{
$compiler = new BladeCompiler($files = $this->getFiles(), __DIR__);
- $files->shouldReceive('exists')->once()->with(__DIR__.'/'.md5('foo').'.php')->andReturn(false);
+ $fil... | true |
Other | laravel | framework | af31256a55b36a8576a6c8f4ea3ed39c97bdc2c8.json | fix logic as per comment from @GrahamCampbell | src/Illuminate/Validation/Validator.php | @@ -1235,11 +1235,11 @@ protected function validateUrl($attribute, $value)
*/
protected function validateActiveUrl($attribute, $value)
{
- if (! ($url = parse_url($value, PHP_URL_HOST))) {
- return false;
+ if ($url = parse_url($value, PHP_URL_HOST)) {
+ return checkd... | false |
Other | laravel | framework | 255f63be82208a86ab280464638861df38f0b279.json | Use random_int rather than mt_rand | src/Illuminate/Session/Middleware/StartSession.php | @@ -159,7 +159,7 @@ protected function collectGarbage(SessionInterface $session)
*/
protected function configHitsLottery(array $config)
{
- return mt_rand(1, $config['lottery'][1]) <= $config['lottery'][0];
+ return random_int(1, $config['lottery'][1]) <= $config['lottery'][0];
}
... | false |
Other | laravel | framework | 70052b2f5eec8859f1fdb0a84b7705ed464a74de.json | Move method to trait. | src/Illuminate/Http/Response.php | @@ -54,21 +54,6 @@ public function setContent($content)
return parent::setContent($content);
}
- /**
- * Add an array of headers to the response.
- *
- * @param array $headers
- * @return $this
- */
- public function withHeaders(array $headers)
- {
- foreach ($heade... | true |
Other | laravel | framework | 70052b2f5eec8859f1fdb0a84b7705ed464a74de.json | Move method to trait. | src/Illuminate/Http/ResponseTrait.php | @@ -39,6 +39,21 @@ public function header($key, $value, $replace = true)
return $this;
}
+ /**
+ * Add an array of headers to the response.
+ *
+ * @param array $headers
+ * @return $this
+ */
+ public function withHeaders(array $headers)
+ {
+ foreach ($headers as ... | true |
Other | laravel | framework | be225adf0c54f87f14a686141d1bf8126cfad9d1.json | fix problems with rate limiter | src/Illuminate/Foundation/Auth/ThrottlesLogins.php | @@ -17,7 +17,7 @@ trait ThrottlesLogins
protected function hasTooManyLoginAttempts(Request $request)
{
return app(RateLimiter::class)->tooManyAttempts(
- $request->input($this->loginUsername()).$request->ip(),
+ $this->getThrottleKey($request),
$this->maxLoginAttemp... | false |
Other | laravel | framework | 83ad23cbd3b7d1b3930cd68d57776aae331ce7f5.json | fix bug in pagination page resolution | src/Illuminate/Pagination/PaginationServiceProvider.php | @@ -18,7 +18,13 @@ public function register()
});
Paginator::currentPageResolver(function ($pageName = 'page') {
- return $this->app['request']->input($pageName);
+ $page = $this->app['request']->input($pageName);
+
+ if (filter_var($page, FILTER_VALIDATE_INT) !== fa... | false |
Other | laravel | framework | a38e4201e19b7e7e7ec7356031d3f12abb381e6f.json | fix bad tests | tests/Database/DatabaseEloquentModelTest.php | @@ -1162,115 +1162,115 @@ public function testModelAttributesAreCastedWhenPresentInCastsArray()
{
$model = new EloquentModelCastingStub;
$model->setDateFormat('Y-m-d H:i:s');
- $model->first = '3';
- $model->second = '4.0';
- $model->third = 2.5;
- $model->fourth = 1;
... | false |
Other | laravel | framework | 52b3b29aff760e93ef85017fc51e0e6db0419a2b.json | add methods for supported and available drivers. | src/Illuminate/Database/DatabaseManager.php | @@ -2,6 +2,7 @@
namespace Illuminate\Database;
+use PDO;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use InvalidArgumentException;
@@ -262,6 +263,26 @@ public function setDefaultConnection($name)
$this->app['config']['database.default'] = $name;
}
+ /**
+ * Get all of the supp... | false |
Other | laravel | framework | e70d9d51351bded6e90e81d883bad203c3759a9c.json | fix line length | src/Illuminate/Routing/Router.php | @@ -773,7 +773,8 @@ protected function substituteImplicitBindings($route)
foreach ($route->signatureParameters(Model::class) as $parameter) {
$class = $parameter->getClass();
- if (array_key_exists($parameter->name, $parameters) && ! $route->getParameter($parameter->name) instanceof M... | false |
Other | laravel | framework | e78906081007c9a35db575bc2bc46e163199179f.json | Fix implicit binding logic | src/Illuminate/Routing/Router.php | @@ -773,7 +773,7 @@ protected function substituteImplicitBindings($route)
foreach ($route->signatureParameters(Model::class) as $parameter) {
$class = $parameter->getClass();
- if (array_key_exists($parameter->name, $parameters)) {
+ if (array_key_exists($parameter->name, $... | false |
Other | laravel | framework | de1ff69da097f8c37e41b32fbb494f8a40aacebc.json | remove extraneous word | src/Illuminate/Foundation/Console/ListenerMakeCommand.php | @@ -103,7 +103,7 @@ protected function getDefaultNamespace($rootNamespace)
protected function getOptions()
{
return [
- ['event', null, InputOption::VALUE_REQUIRED, 'The event class the being listened for.'],
+ ['event', null, InputOption::VALUE_REQUIRED, 'The event class being ... | false |
Other | laravel | framework | 5367c5df186aa29a0bf2b3a590f6a697d5e0ae1e.json | add session to suggestions on auth | src/Illuminate/Auth/composer.json | @@ -17,7 +17,6 @@
"php": ">=5.5.9",
"illuminate/contracts": "5.2.*",
"illuminate/http": "5.2.*",
- "illuminate/session": "5.2.*",
"illuminate/support": "5.2.*",
"nesbot/carbon": "~1.20"
},
@@ -32,7 +31,8 @@
}
},
"suggest": {
- "illuminat... | false |
Other | laravel | framework | 96cc81037f25b99c4a3e9dc3ff7194277240a9f3.json | update auth helper | src/Illuminate/Foundation/helpers.php | @@ -3,10 +3,10 @@
use Illuminate\Support\Str;
use Illuminate\Support\HtmlString;
use Illuminate\Container\Container;
-use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Access\Gate;
use Illuminate\Contracts\Routing\UrlGenerator;
use Illuminate\Contracts\Routing\ResponseFactory;
+use Illuminate\Con... | false |
Other | laravel | framework | 38420603d81b6f5cd763f602eb35d7a30f24726c.json | add contract for BC | src/Illuminate/Contracts/Bus/SelfHandling.php | @@ -0,0 +1,11 @@
+<?php
+
+namespace Illuminate\Contracts\Bus;
+
+/**
+ * @deprecated since version 5.2. Remove from jobs since self-handling is default.
+ */
+interface SelfHandling
+{
+ //
+} | false |
Other | laravel | framework | 4a70fd555b6dd0c81acf5a45955c1b7e82ea375b.json | Apply scopes on increment/decrement | src/Illuminate/Database/Eloquent/Builder.php | @@ -385,7 +385,7 @@ public function increment($column, $amount = 1, array $extra = [])
{
$extra = $this->addUpdatedAtColumn($extra);
- return $this->query->increment($column, $amount, $extra);
+ return $this->toBase()->increment($column, $amount, $extra);
}
/**
@@ -400,7 +400,7... | true |
Other | laravel | framework | 4a70fd555b6dd0c81acf5a45955c1b7e82ea375b.json | Apply scopes on increment/decrement | tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php | @@ -113,6 +113,9 @@ public function testSoftDeletesAreNotRetrievedFromBuilderHelpers()
$query = SoftDeletesTestUser::query();
$this->assertCount(1, $query->simplePaginate(2)->all());
+
+ $this->assertEquals(0, SoftDeletesTestUser::where('email', 'taylorotwell@gmail.com')->increment('id'));
+ ... | true |
Other | laravel | framework | 5d4a492e5816227389de4e42fbe8e12e89ce2c7d.json | Fix scopes on Builder helpers | src/Illuminate/Database/Eloquent/Builder.php | @@ -282,7 +282,7 @@ public function chunk($count, callable $callback)
*/
public function pluck($column, $key = null)
{
- $results = $this->query->pluck($column, $key);
+ $results = $this->toBase()->pluck($column, $key);
// If the model has a mutator for the requested column, we ... | true |
Other | laravel | framework | 5d4a492e5816227389de4e42fbe8e12e89ce2c7d.json | Fix scopes on Builder helpers | tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php | @@ -2,6 +2,7 @@
use Carbon\Carbon;
use Illuminate\Database\Connection;
+use Illuminate\Pagination\Paginator;
use Illuminate\Database\Query\Builder;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Capsule\Manager as DB;
@@ -91,6 +92,29 @@ public function testSoftDeletesAreNotRetrievedFromBas... | true |
Other | laravel | framework | 6982865171c67d73ec0bdf60182c4f75c74180fd.json | Newline all the things | src/Illuminate/Bus/Dispatcher.php | @@ -105,6 +105,7 @@ protected function commandShouldBeQueued($command)
public function dispatchToQueue($command)
{
$connection = isset($command->connection) ? $command->connection : null;
+
$queue = call_user_func($this->queueResolver, $connection);
if (! $queue instanceof Queue) ... | false |
Other | laravel | framework | f00fb8c92285f1e9eeb087d25f8058f173159f5e.json | Make line shorter | src/Illuminate/Bus/Dispatcher.php | @@ -104,7 +104,8 @@ protected function commandShouldBeQueued($command)
*/
public function dispatchToQueue($command)
{
- $queue = call_user_func($this->queueResolver, isset($command->connection) ? $command->connection : null);
+ $connection = isset($command->connection) ? $command->connecti... | false |
Other | laravel | framework | 777efcdf458edaffbe759cb633ab847788a336fa.json | Add missing import.
Signed-off-by: crynobone <crynobone@gmail.com> | src/Illuminate/Database/Eloquent/Model.php | @@ -4,6 +4,7 @@
use DateTime;
use Exception;
+use Throwable;
use ArrayAccess;
use Carbon\Carbon;
use LogicException; | false |
Other | laravel | framework | 478076b1c61a637acfee137cbfc3862f22cc573c.json | show all commands in dev | src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php | @@ -106,9 +106,9 @@ public function register()
{
$this->registerCommands($this->commands);
- if (! $this->app->environment('production')) {
+ //if (! $this->app->environment('production')) {
$this->registerCommands($this->devCommands);
- }
+ //}
}
/** | false |
Other | laravel | framework | 19958d826c6e8a83dc50dc256f6ce669424f3410.json | Add toBase method to the eloquent builder | src/Illuminate/Database/Eloquent/Builder.php | @@ -920,6 +920,16 @@ public function getQuery()
return $this->query;
}
+ /**
+ * Get a base query builder instance.
+ *
+ * @return \Illuminate\Database\Query\Builder
+ */
+ public function toBase()
+ {
+ return $this->applyScopes()->getQuery();
+ }
+
/**
* ... | true |
Other | laravel | framework | 19958d826c6e8a83dc50dc256f6ce669424f3410.json | Add toBase method to the eloquent builder | tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php | @@ -2,6 +2,7 @@
use Carbon\Carbon;
use Illuminate\Database\Connection;
+use Illuminate\Database\Query\Builder;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Eloquent\Model as Eloquent;
@@ -80,6 +81,16 @@ public function testSoftDeletesAreNotR... | true |
Other | laravel | framework | 528e4381af27a16eb59082b53c0e21a30e42dc1a.json | Avoid unexpected removal of items with null key. | src/Illuminate/Support/Arr.php | @@ -197,20 +197,20 @@ public static function forget(&$array, $keys)
foreach ($keys as $key) {
$parts = explode('.', $key);
+ // clean up before each pass
+ $array = &$original;
+
while (count($parts) > 1) {
$part = array_shift($parts);
... | true |
Other | laravel | framework | 528e4381af27a16eb59082b53c0e21a30e42dc1a.json | Avoid unexpected removal of items with null key. | tests/Support/SupportArrTest.php | @@ -307,5 +307,9 @@ public function testForget()
$array = ['products' => ['desk' => ['price' => ['original' => 50, 'taxes' => 60]]]];
Arr::forget($array, 'products.desk.final.taxes');
$this->assertEquals(['products' => ['desk' => ['price' => ['original' => 50, 'taxes' => 60]]]], $array);
+
+ ... | true |
Other | laravel | framework | 59afdd44acda9ab4960e0819ed1ddc7364877806.json | fix bug in user provider creator. | src/Illuminate/Auth/CreatesUserProviders.php | @@ -14,15 +14,15 @@ trait CreatesUserProviders
*/
protected function createUserProvider($provider)
{
- $config = $this->app['config']['auth.providers.'.$provider];
+ $config = $this->app['config']['auth.sources.'.$provider];
switch ($config['driver']) {
case 'databa... | false |
Other | laravel | framework | 19e4b7da688b2ea3aa2110a82d037ec2e72a69e2.json | fix wrong method | src/Illuminate/Auth/AuthServiceProvider.php | @@ -42,7 +42,7 @@ protected function registerAuthenticator()
});
$this->app->singleton('auth.driver', function ($app) {
- return $app['auth']->driver();
+ return $app['auth']->guard();
});
}
| false |
Other | laravel | framework | 104e138f4dd65e9cd0d4cc6fc6c3f6d5327880af.json | remove old drivers | src/Illuminate/Cache/CacheManager.php | @@ -168,28 +168,6 @@ protected function createNullDriver()
return $this->repository(new NullStore);
}
- /**
- * Create an instance of the WinCache cache driver.
- *
- * @param array $config
- * @return \Illuminate\Cache\WinCacheStore
- */
- protected function createWincacheDr... | false |
Other | laravel | framework | 7b586da6619b043fa79b6711c08a1c17cdca5a76.json | break guard into two interfaces | src/Illuminate/Contracts/Auth/Guard.php | @@ -2,44 +2,8 @@
namespace Illuminate\Contracts\Auth;
-interface Guard
+interface Guard extends StatelessGuard
{
- /**
- * Determine if the current user is authenticated.
- *
- * @return bool
- */
- public function check();
-
- /**
- * Determine if the current user is a guest.
- *... | true |
Other | laravel | framework | 7b586da6619b043fa79b6711c08a1c17cdca5a76.json | break guard into two interfaces | src/Illuminate/Contracts/Auth/StatelessGuard.php | @@ -0,0 +1,66 @@
+<?php
+
+namespace Illuminate\Contracts\Auth;
+
+interface StatelessGuard
+{
+ /**
+ * Determine if the current user is authenticated.
+ *
+ * @return bool
+ */
+ public function check();
+
+ /**
+ * Determine if the current user is a guest.
+ *
+ * @return bool
+ ... | true |
Other | laravel | framework | 7e446b5056013af842e4fa6f26c45e762eedc997.json | check length in env function. | src/Illuminate/Foundation/helpers.php | @@ -322,7 +322,7 @@ function env($key, $default = null)
return;
}
- if (Str::startsWith($value, '"') && Str::endsWith($value, '"')) {
+ if (strlen($value) > 1 && Str::startsWith($value, '"') && Str::endsWith($value, '"')) {
return substr($value, 1, -1);
}
... | false |
Other | laravel | framework | 491fdb07e78325b50f805df55c6c428718117a71.json | add new integration test to soft deletes | tests/Database/DatabaseEloquentSoftDeletesIntegrationTest.php | @@ -3,48 +3,47 @@
use Carbon\Carbon;
use Illuminate\Database\Connection;
use Illuminate\Database\Eloquent\SoftDeletes;
+use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Eloquent\Model as Eloquent;
class DatabaseEloquentSoftDeletesIntegrationTest extends PHPUnit_Framework_TestCase
{
- /*... | false |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | src/Illuminate/Database/Eloquent/Builder.php | @@ -58,6 +58,13 @@ class Builder
'exists', 'count', 'min', 'max', 'avg', 'sum',
];
+ /**
+ * Applied global scopes.
+ *
+ * @var array
+ */
+ protected $scopes = [];
+
/**
* Create a new Eloquent query builder instance.
*
@@ -69,6 +76,55 @@ public function __constr... | true |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | src/Illuminate/Database/Eloquent/Model.php | @@ -2,6 +2,7 @@
namespace Illuminate\Database\Eloquent;
+use Closure;
use DateTime;
use Exception;
use ArrayAccess;
@@ -10,6 +11,7 @@
use JsonSerializable;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
+use InvalidArgumentException;
use Illuminate\Contracts\Support\Jsonable;
use Illuminate\Contra... | true |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | src/Illuminate/Database/Eloquent/ScopeInterface.php | @@ -12,14 +12,4 @@ interface ScopeInterface
* @return void
*/
public function apply(Builder $builder, Model $model);
-
- /**
- * Remove the scope from the given Eloquent query builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @param \Illuminate\Database\El... | true |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | src/Illuminate/Database/Eloquent/SoftDeletingScope.php | @@ -25,24 +25,6 @@ public function apply(Builder $builder, Model $model)
$this->extend($builder);
}
- /**
- * Remove the scope from the given Eloquent query builder.
- *
- * @param \Illuminate\Database\Eloquent\Builder $builder
- * @param \Illuminate\Database\Eloquent\Model $model... | true |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | tests/Database/DatabaseEloquentBuilderTest.php | @@ -399,7 +399,7 @@ public function testRealNestedWhereWithScopes()
$model = new EloquentBuilderTestNestedStub;
$this->mockConnectionForModel($model, 'SQLite');
$query = $model->newQuery()->where('foo', '=', 'bar')->where(function ($query) { $query->where('baz', '>', 9000); });
- $this... | true |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | tests/Database/DatabaseEloquentGlobalScopesTest.php | @@ -0,0 +1,107 @@
+<?php
+
+use Mockery as m;
+
+class DatabaseEloquentGlobalScopesTest extends PHPUnit_Framework_TestCase
+{
+ public function tearDown()
+ {
+ m::close();
+ }
+
+ public function testGlobalScopeIsApplied()
+ {
+ $model = new EloquentGlobalScopesTestModel();
+ $query... | true |
Other | laravel | framework | 59ed03c2c1ecb50cf1c6a10c4506d06535ebe3a4.json | Simplify global scopes | tests/Database/DatabaseSoftDeletingScopeTest.php | @@ -21,20 +21,6 @@ public function testApplyingScopeToABuilder()
$scope->apply($builder, $model);
}
- public function testScopeCanRemoveDeletedAtConstraints()
- {
- $scope = new Illuminate\Database\Eloquent\SoftDeletingScope;
- $builder = m::mock('Illuminate\Database\Eloquent\Builder... | true |
Other | laravel | framework | eb762a14227924d16f8af5a6b4bb27cd5917135c.json | fix a bunch of boo boo tests. | tests/Database/DatabaseEloquentIntegrationTest.php | @@ -1,10 +1,10 @@
<?php
use Illuminate\Database\Connection;
+use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Database\Eloquent\Relations\Relation;
use Illuminate\Pagination\AbstractPaginator as Paginator;
-use Illuminate\Database\Capsule\Manager a... | true |
Other | laravel | framework | eb762a14227924d16f8af5a6b4bb27cd5917135c.json | fix a bunch of boo boo tests. | tests/Database/DatabaseEloquentIntegrationWithTablePrefixTest.php | @@ -1,23 +1,78 @@
<?php
+use Illuminate\Database\Capsule\Manager as DB;
use Illuminate\Database\Eloquent\Model as Eloquent;
-class DatabaseEloquentIntegrationWithTablePrefixTest extends DatabaseEloquentIntegrationTest
+class DatabaseEloquentIntegrationWithTablePrefixTest
{
/**
* Bootstrap Eloquent.
... | true |
Other | laravel | framework | 8fc1942fcb11fdd5f501a959accd23f3c10ca1e7.json | fix merge conflicts | src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php | @@ -106,12 +106,18 @@ protected function runningUnitTests()
*/
protected function tokensMatch($request)
{
+ $sessionToken = $request->session()->token();
+
$token = $request->input('_token') ?: $request->header('X-CSRF-TOKEN');
if (! $token && $header = $request->header('X-XSR... | true |
Other | laravel | framework | 8fc1942fcb11fdd5f501a959accd23f3c10ca1e7.json | fix merge conflicts | src/Illuminate/Queue/Connectors/SqsConnector.php | @@ -16,18 +16,31 @@ class SqsConnector implements ConnectorInterface
*/
public function connect(array $config)
{
- $config = array_merge([
+ $config = $this->getDefaultConfiguration($config);
+
+ if ($config['key'] && $config['secret']) {
+ $config['credentials'] = Arr::o... | true |
Other | laravel | framework | 8fc1942fcb11fdd5f501a959accd23f3c10ca1e7.json | fix merge conflicts | src/Illuminate/Queue/SqsQueue.php | @@ -22,6 +22,13 @@ class SqsQueue extends Queue implements QueueContract
*/
protected $default;
+ /**
+ * The sqs prefix url.
+ *
+ * @var string
+ */
+ protected $prefix;
+
/**
* The job creator callback.
*
@@ -34,11 +41,13 @@ class SqsQueue extends Queue implements ... | true |
Other | laravel | framework | 8fc1942fcb11fdd5f501a959accd23f3c10ca1e7.json | fix merge conflicts | tests/Queue/QueueSqsQueueTest.php | @@ -97,4 +97,12 @@ public function testPushProperlyPushesJobOntoSqs()
$id = $queue->push($this->mockedJob, $this->mockedData, $this->queueName);
$this->assertEquals($this->mockedMessageId, $id);
}
+
+ public function testGetQueueProperlyResolvesName()
+ {
+ $queue = new Illuminate\Qu... | true |
Other | laravel | framework | 334f1580e21439808567f6ecb200adf3a3670fb0.json | remove unneeded import. | src/Illuminate/Foundation/Bus/DispatchesJobs.php | @@ -2,7 +2,6 @@
namespace Illuminate\Foundation\Bus;
-use ArrayAccess;
use Illuminate\Contracts\Bus\Dispatcher;
trait DispatchesJobs | false |
Other | laravel | framework | 9a4c071fb2a50b364b3cc0128364bc35bc84d9d7.json | Remove unintentional whitespace from docblocks | src/Illuminate/Session/Store.php | @@ -307,7 +307,7 @@ public function ageFlashData()
/**
* Remove data that was flashed on last request
- *
+ *
* @return void
*/
public function removeFlashNowData()
@@ -438,7 +438,7 @@ public function flash($key, $value)
/**
* Flash a key / value pair to the session
... | false |
Other | laravel | framework | 2aecef2e625be2e93bc05874feaf24041a8eafab.json | Add flashNow functionality
Useful for writing flash data without redirecting. | src/Illuminate/Session/Store.php | @@ -95,6 +95,8 @@ public function start()
$this->regenerateToken();
}
+ $this->removeFlashNowData();
+
return $this->started = true;
}
@@ -303,6 +305,20 @@ public function ageFlashData()
$this->put('flash.new', []);
}
+ /**
+ * Remove data that was f... | true |
Other | laravel | framework | 2aecef2e625be2e93bc05874feaf24041a8eafab.json | Add flashNow functionality
Useful for writing flash data without redirecting. | tests/Session/SessionStoreTest.php | @@ -160,6 +160,22 @@ public function testDataFlashing()
$this->assertNull($session->get('foo'));
}
+ public function testDataFlashingNow()
+ {
+ $session = $this->getSession();
+ $session->flashNow('foo', 'bar');
+ $session->flashNow('bar', 0);
+
+ $this->assertTrue($se... | true |
Other | laravel | framework | 46c8180b8e248fe18d7a39063080f25fd8874fec.json | Remove a useless isset | src/Illuminate/Bus/Dispatcher.php | @@ -254,7 +254,7 @@ public function dispatchToQueue($command)
*/
protected function pushCommandToQueue($queue, $command)
{
- if (isset($command->queue) && isset($command->delay)) {
+ if (isset($command->queue, $command->delay)) {
return $queue->laterOn($command->queue, $comman... | false |
Other | laravel | framework | b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json | Use expectedException annotations in the tests | tests/Cache/ClearCommandTest.php | @@ -45,6 +45,9 @@ public function testClearWithStoreOption()
$this->runCommand($command, ['store' => 'foo']);
}
+ /**
+ * @expectedException InvalidArgumentException
+ */
public function testClearWithInvalidStoreOption()
{
$command = new ClearCommandTestStub(
@@ -56,9 +59,8... | true |
Other | laravel | framework | b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json | Use expectedException annotations in the tests | tests/Container/ContainerTest.php | @@ -318,12 +318,14 @@ public function testCreatingBoundConcreteClassPassesParameters()
$this->assertEquals($parameters, $instance->receivedParameters);
}
+ /**
+ * @expectedException Illuminate\Contracts\Container\BindingResolutionException
+ * @expectedExceptionMessage Unresolvable dependenc... | true |
Other | laravel | framework | b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json | Use expectedException annotations in the tests | tests/Http/HttpRedirectResponseTest.php | @@ -116,9 +116,11 @@ public function testMagicCall()
$response->withFoo('bar');
}
+ /**
+ * @expectedException BadMethodCallException
+ */
public function testMagicCallException()
{
- $this->setExpectedException('BadMethodCallException');
$response = new RedirectResp... | true |
Other | laravel | framework | b106c76dee0f7f2a40ab7c46428d2e69ed4b4fba.json | Use expectedException annotations in the tests | tests/Http/HttpRequestTest.php | @@ -507,9 +507,11 @@ public function testFormatReturnsAcceptsCharset()
$this->assertTrue($request->accepts('application/baz+json'));
}
+ /**
+ * @expectedException RuntimeException
+ */
public function testSessionMethod()
{
- $this->setExpectedException('RuntimeException');
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.