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 | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php | @@ -311,7 +311,7 @@ public function compileGetAllTables($searchPath)
/**
* Compile the SQL needed to retrieve all view names.
*
- * @param string|array $schema
+ * @param string|array $searchPath
* @return string
*/
public function compileGetAllViews($searchPath) | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Filesystem/FilesystemAdapter.php | @@ -245,7 +245,7 @@ public function get($path)
*
* @param string $path
* @param string|null $name
- * @param array|null $headers
+ * @param array $headers
* @param string|null $disposition
* @return \Symfony\Component\HttpFoundation\StreamedResponse
*/
@@ -279,7 +27... | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Foundation/Console/RouteListCommand.php | @@ -399,7 +399,7 @@ public static function getTerminalWidth()
/**
* Set a callback that should be used when resolving the terminal width.
*
- * @param \Closure|null $callback
+ * @param \Closure|null $resolver
* @return void
*/
public static function resolveTerminalWidthUsi... | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Http/Request.php | @@ -139,7 +139,7 @@ public function fullUrlWithQuery(array $query)
/**
* Get the full URL for the request without the given query string parameters.
*
- * @param array|string $query
+ * @param array|string $keys
* @return string
*/
public function fullUrlWithoutQuery($keys) | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Queue/Middleware/ThrottlesExceptions.php | @@ -69,7 +69,6 @@ class ThrottlesExceptions
*
* @param int $maxAttempts
* @param int $decayMinutes
- * @param string $key
* @return void
*/
public function __construct($maxAttempts = 10, $decayMinutes = 10) | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Routing/Console/ControllerMakeCommand.php | @@ -243,7 +243,7 @@ protected function buildFormRequestReplacements(array $replace, $modelClass)
/**
* Generate the form requests for the given model and classes.
*
- * @param string $modelName
+ * @param string $modelClass
* @param string $storeRequestClass
* @param string ... | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Testing/ParallelTesting.php | @@ -77,7 +77,7 @@ public function __construct(Container $container)
/**
* Set a callback that should be used when resolving options.
*
- * @param \Closure|null $callback
+ * @param \Closure|null $resolver
* @return void
*/
public function resolveOptionsUsing($resolver)
@@ -... | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1530,7 +1530,6 @@ public function validateRequiredIf($attribute, $value, $parameters)
*
* @param string $attribute
* @param mixed $value
- * @param mixed $parameters
* @return bool
*/
public function validateProhibited($attribute, $value) | true |
Other | laravel | framework | 7880ba75248c849e3137ae9832ec2220ca62d6c6.json | Fix many docblocks (#40589) | src/Illuminate/Validation/Validator.php | @@ -667,7 +667,6 @@ protected function getPrimaryAttribute($attribute)
* Replace each field parameter which has an escaped dot with the dot placeholder.
*
* @param array $parameters
- * @param array $keys
* @return array
*/
protected function replaceDotInParameters(array $para... | true |
Other | laravel | framework | ea22e103278516528afceacdaba1bd666ae36139.json | Remove useless imports (#40591) | src/Illuminate/Database/Eloquent/Relations/Concerns/AsPivot.php | @@ -2,7 +2,6 @@
namespace Illuminate\Database\Eloquent\Relations\Concerns;
-use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
| true |
Other | laravel | framework | ea22e103278516528afceacdaba1bd666ae36139.json | Remove useless imports (#40591) | src/Illuminate/Support/Pluralizer.php | @@ -2,7 +2,6 @@
namespace Illuminate\Support;
-use Doctrine\Inflector\Inflector;
use Doctrine\Inflector\InflectorFactory;
class Pluralizer | true |
Other | laravel | framework | ea22e103278516528afceacdaba1bd666ae36139.json | Remove useless imports (#40591) | src/Illuminate/Testing/TestComponent.php | @@ -4,7 +4,6 @@
use Illuminate\Testing\Assert as PHPUnit;
use Illuminate\Testing\Constraints\SeeInOrder;
-use Illuminate\View\Component;
class TestComponent
{ | true |
Other | laravel | framework | ea22e103278516528afceacdaba1bd666ae36139.json | Remove useless imports (#40591) | tests/Container/ContainerTest.php | @@ -5,7 +5,6 @@
use Illuminate\Container\Container;
use Illuminate\Container\EntryNotFoundException;
use Illuminate\Contracts\Container\BindingResolutionException;
-use Illuminate\Contracts\Container\CircularDependencyException;
use PHPUnit\Framework\TestCase;
use Psr\Container\ContainerExceptionInterface;
use st... | true |
Other | laravel | framework | ea22e103278516528afceacdaba1bd666ae36139.json | Remove useless imports (#40591) | tests/Routing/RouteRegistrarTest.php | @@ -7,7 +7,6 @@
use Illuminate\Container\Container;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Http\Request;
-use Illuminate\Routing\Route;
use Illuminate\Routing\Router;
use Mockery as m;
use PHPUnit\Framework\TestCase; | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Cache/CacheMemcachedStoreTest.php | @@ -71,10 +71,8 @@ public function testSetMethodProperlyCallsMemcache()
public function testIncrementMethodProperlyCallsMemcache()
{
- /* @link https://github.com/php-memcached-dev/php-memcached/pull/468 */
- if (version_compare(phpversion(), '8.0.0', '>=')) {
- $this->markTestSkipp... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Database/DatabaseEloquentBelongsToTest.php | @@ -78,16 +78,10 @@ public function testEagerConstraintsAreProperlyAdded()
public function testIdsInEagerConstraintsCanBeZero()
{
- $keys = ['foreign.value', 0];
-
- if (version_compare(PHP_VERSION, '8.0.0-dev', '>=')) {
- sort($keys);
- }
-
$relation = $this->getRel... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Database/DatabaseEloquentMorphToTest.php | @@ -20,24 +20,23 @@ protected function tearDown(): void
m::close();
}
+ /**
+ * @requires PHP >= 8.1
+ */
public function testLookupDictionaryIsProperlyConstructedForEnums()
{
- if (version_compare(PHP_VERSION, '8.1') < 0) {
- $this->markTestSkipped('PHP 8.1 is req... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Integration/Database/EloquentModelEnumCastingTest.php | @@ -12,7 +12,7 @@
}
/**
- * @requires PHP 8.1
+ * @requires PHP >= 8.1
*/
class EloquentModelEnumCastingTest extends DatabaseTestCase
{ | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Integration/Foundation/DiscoverEventsTest.php | @@ -32,9 +32,6 @@ class_alias(ListenerInterface::class, 'Tests\Integration\Foundation\Fixtures\Eve
], $events);
}
- /**
- * @requires PHP >= 8
- */
public function testUnionEventsCanBeDiscovered()
{
class_alias(UnionListener::class, 'Tests\Integration\Foundation\Fixtures\Ev... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Integration/Queue/ModelSerializationTest.php | @@ -274,9 +274,6 @@ public function testItCanUnserializeCustomCollection()
$this->assertInstanceOf(ModelSerializationTestCustomUserCollection::class, $unserialized->users);
}
- /**
- * @requires PHP >= 7.4
- */
public function testItSerializesTypedProperties()
{
require_onc... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Integration/Routing/ImplicitBackedEnumRouteBindingTest.php | @@ -10,7 +10,7 @@
}
/**
- * @requires PHP 8.1
+ * @requires PHP >= 8.1
*/
class ImplicitBackedEnumRouteBindingTest extends TestCase
{ | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Routing/ImplicitRouteBindingTest.php | @@ -16,7 +16,7 @@
class ImplicitRouteBindingTest extends TestCase
{
/**
- * @requires PHP 8.1
+ * @requires PHP >= 8.1
*/
public function test_it_can_resolve_the_implicit_backed_enum_route_bindings_for_the_given_route()
{
@@ -37,7 +37,7 @@ public function test_it_can_resolve_the_implicit_... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Support/SupportReflectorTest.php | @@ -48,9 +48,6 @@ public function testParentClassName()
$this->assertSame(A::class, Reflector::getParameterClassName($method->getParameters()[0]));
}
- /**
- * @requires PHP >= 8
- */
public function testUnionTypeName()
{
$method = (new ReflectionClass(C::class))->getMethod... | true |
Other | laravel | framework | 6bb9b4d992e2914a5c94787144138413411ee748.json | Remove old PHP 7 workarounds (#40558) | tests/Support/SupportReflectsClosuresTest.php | @@ -64,9 +64,6 @@ public function testItThrowsWhenNoFirstParameterType()
});
}
- /**
- * @requires PHP >= 8
- */
public function testItWorksWithUnionTypes()
{
$types = ReflectsClosuresClass::reflectFirstAll(function (ExampleParameter $a, $b) { | true |
Other | laravel | framework | 7fd7ad17cf5077fcbdd12b3d39003b4726afa447.json | Add extra tests for validation (#40543) | tests/Validation/ValidationValidatorTest.php | @@ -4225,6 +4225,12 @@ public function testBeforeAndAfterWithFormat()
$v = new Validator($trans, ['start' => '31/12/2012', 'ends' => null], ['start' => 'date_format:d/m/Y|before:ends', 'ends' => 'nullable|date_format:d/m/Y|after:start']);
$this->assertTrue($v->passes());
+ $v = new Validator(... | false |
Other | laravel | framework | a9c50095980e6f24ca23c811fa55752e0f50dd6c.json | Add better bitwise operators support | src/Illuminate/Database/Query/Builder.php | @@ -203,6 +203,15 @@ class Builder
'not similar to', 'not ilike', '~~*', '!~~*',
];
+ /**
+ * All of the available binary operators.
+ *
+ * @var string[]
+ */
+ public $binaryOperators = [
+ '&', '|', '^', '<<', '>>', '&~',
+ ];
+
/**
* Whether to use write pd... | true |
Other | laravel | framework | a9c50095980e6f24ca23c811fa55752e0f50dd6c.json | Add better bitwise operators support | src/Illuminate/Database/Query/Grammars/Grammar.php | @@ -18,6 +18,13 @@ class Grammar extends BaseGrammar
*/
protected $operators = [];
+ /**
+ * The grammar specific binary operators.
+ *
+ * @var array
+ */
+ protected $binaryOperators = [];
+
/**
* The components that make up a select clause.
*
@@ -255,6 +262,15 @@ p... | true |
Other | laravel | framework | a9c50095980e6f24ca23c811fa55752e0f50dd6c.json | Add better bitwise operators support | src/Illuminate/Database/Query/Grammars/PostgresGrammar.php | @@ -21,6 +21,15 @@ class PostgresGrammar extends Grammar
'is distinct from', 'is not distinct from',
];
+ /**
+ * The grammar specific binary operators.
+ *
+ * @var array
+ */
+ protected $binaryOperators = [
+ '~', '&', '|', '#', '<<', '>>', '<<=', '>>=',
+ ];
+
/*... | true |
Other | laravel | framework | a9c50095980e6f24ca23c811fa55752e0f50dd6c.json | Add better bitwise operators support | tests/Database/DatabaseQueryBuilderTest.php | @@ -3209,6 +3209,25 @@ public function testMySqlSoundsLikeOperator()
$this->assertEquals(['John Doe'], $builder->getBindings());
}
+ public function testBinaryOperators()
+ {
+ $builder = $this->getBuilder();
+ $builder->select('*')->from('users')->where('bar', '&', 1);
+ $thi... | true |
Other | laravel | framework | 9d19d1ece898ccbc0193a89a58a6500b5fb6c146.json | Add ability to nested validation rules | src/Illuminate/Validation/NestedRules.php | @@ -0,0 +1,55 @@
+<?php
+
+namespace Illuminate\Validation;
+
+use Illuminate\Support\Arr;
+
+class NestedRules
+{
+ /**
+ * The callback to execute.
+ *
+ * @var callable
+ */
+ protected $callback;
+
+ /**
+ * Create a new nested rule instance.
+ *
+ * @param callable $callback
... | true |
Other | laravel | framework | 9d19d1ece898ccbc0193a89a58a6500b5fb6c146.json | Add ability to nested validation rules | src/Illuminate/Validation/Rule.php | @@ -28,6 +28,17 @@ public static function when($condition, $rules, $defaultRules = [])
return new ConditionalRules($condition, $rules, $defaultRules);
}
+ /**
+ * Create a new nested rule set.
+ *
+ * @param callable $callback
+ * @return \Illuminate\Validation\NestedRules
+ */
... | true |
Other | laravel | framework | 9d19d1ece898ccbc0193a89a58a6500b5fb6c146.json | Add ability to nested validation rules | src/Illuminate/Validation/ValidationRuleParser.php | @@ -68,7 +68,7 @@ protected function explodeRules($rules)
unset($rules[$key]);
} else {
- $rules[$key] = $this->explodeExplicitRule($rule);
+ $rules[$key] = $this->explodeExplicitRule($rule, $key);
}
}
@@ -79,26 +79,34 @@ protected fu... | true |
Other | laravel | framework | 9d19d1ece898ccbc0193a89a58a6500b5fb6c146.json | Add ability to nested validation rules | tests/Validation/ValidationNestedRulesTest.php | @@ -0,0 +1,215 @@
+<?php
+
+namespace Illuminate\Tests\Validation;
+
+use Illuminate\Translation\ArrayLoader;
+use Illuminate\Translation\Translator;
+use Illuminate\Validation\Rule;
+use Illuminate\Validation\Validator;
+use Mockery as m;
+use PHPUnit\Framework\TestCase;
+
+class ValidationNestedRulesTest extends Test... | true |
Other | laravel | framework | 9d19d1ece898ccbc0193a89a58a6500b5fb6c146.json | Add ability to nested validation rules | tests/Validation/ValidationRuleParserTest.php | @@ -9,7 +9,7 @@
class ValidationRuleParserTest extends TestCase
{
- public function test_conditional_rules_are_properly_expanded_and_filtered()
+ public function testConditionalRulesAreProperlyExpandedAndFiltered()
{
$rules = ValidationRuleParser::filterConditionalRules([
'name' => ... | true |
Other | laravel | framework | 1f8e0081a384e82098605826b4d4c3d5c7c184d7.json | Add controller method (#40492) | src/Illuminate/Support/Facades/Route.php | @@ -22,6 +22,7 @@
* @method static \Illuminate\Routing\Route substituteBindings(\Illuminate\Support\Facades\Route $route)
* @method static \Illuminate\Routing\Route view(string $uri, string $view, array $data = [], int|array $status = 200, array $headers = [])
* @method static \Illuminate\Routing\RouteRegistrar a... | false |
Other | laravel | framework | 8dd5728d71a4374fa553af542f3754d9be23aafb.json | Add render method (#40480) | src/Illuminate/Support/Facades/Blade.php | @@ -8,6 +8,7 @@
* @method static array getExtensions()
* @method static bool check(string $name, array ...$parameters)
* @method static string compileString(string $value)
+ * @method static string render(string $string, array $data, bool $deleteCachedView)
* @method static string getPath()
* @method static s... | false |
Other | laravel | framework | ac6fc32c2933d5868a2c0d2aea4af9405d710378.json | fix bad merge | src/Illuminate/Http/Concerns/InteractsWithInput.php | @@ -60,11 +60,7 @@ public function bearerToken()
if ($position !== false) {
$header = substr($header, $position + 7);
-<<<<<<< HEAD
- return str_contains($header, ',') ? strstr(',', $header, true) : $header;
-=======
- return strpos($header, ',') !== false ? strstr($header,... | false |
Other | laravel | framework | c268e2756defc9561207a2c4b4f7400f777751f8.json | Make use of new getConnection method signature | src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php | @@ -26,7 +26,7 @@ trait InteractsWithDatabase
protected function assertDatabaseHas($table, array $data, $connection = null)
{
$this->assertThat(
- $this->getTable($table), new HasInDatabase($this->getConnection($connection), $data)
+ $this->getTable($table), new HasInDatabase($t... | false |
Other | laravel | framework | ff907d5f7bfc8d76811eb587158f837604750572.json | Apply fixes from StyleCI | tests/Mail/MailMailableAssertionsTest.php | @@ -3,8 +3,8 @@
namespace Illuminate\Tests\Mail;
use Illuminate\Mail\Mailable;
-use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\AssertionFailedError;
+use PHPUnit\Framework\TestCase;
class MailMailableAssertionsTest extends TestCase
{
@@ -125,14 +125,14 @@ class MailableAssertionsStub extends Mailable
{... | false |
Other | laravel | framework | 5ce33c0c2d3f6080c6abe610660db48c5899112f.json | Apply fixes from StyleCI | src/Illuminate/View/Compilers/BladeCompiler.php | @@ -280,7 +280,8 @@ public function compileString($value)
*/
public static function render($string, $data = [], $deleteCachedView = false)
{
- $component = new class($string) extends Component {
+ $component = new class($string) extends Component
+ {
protected $template... | false |
Other | laravel | framework | dc68fb490d6557d33414ce22a5a38ad0ee3e5bda.json | Apply fixes from StyleCI | tests/Database/DatabaseEloquentMorphToTest.php | @@ -406,4 +406,4 @@ public function relation()
class EloquentMorphToRelatedStub extends Model
{
public $table = 'eloquent_morph_to_related_stubs';
-}
\ No newline at end of file
+} | false |
Other | laravel | framework | 78041a1529e2b11146939d4a0e9b607b98a9a5b6.json | remove function import | src/Illuminate/Routing/ControllerDispatcher.php | @@ -4,7 +4,6 @@
use Illuminate\Container\Container;
use Illuminate\Routing\Contracts\ControllerDispatcher as ControllerDispatcherContract;
-use function method_exists;
class ControllerDispatcher implements ControllerDispatcherContract
{ | false |
Other | laravel | framework | 73d0ee647dc10f7f8fd452e15c171239a1f59e59.json | Add Bootstrap 5 styled pagination | src/Illuminate/Pagination/AbstractPaginator.php | @@ -602,6 +602,17 @@ public static function useTailwind()
static::defaultSimpleView('pagination::simple-tailwind');
}
+ /**
+ * Indicate that Bootstrap 5 styling should be used for generated links.
+ *
+ * @return void
+ */
+ public static function useBootstrapFive()
+ {
+ ... | true |
Other | laravel | framework | 73d0ee647dc10f7f8fd452e15c171239a1f59e59.json | Add Bootstrap 5 styled pagination | src/Illuminate/Pagination/resources/views/bootstrap-5.blade.php | @@ -0,0 +1,88 @@
+@if ($paginator->hasPages())
+ <nav class="d-flex justify-items-center justify-content-between">
+ <div class="d-flex justify-content-between flex-fill d-sm-none">
+ <ul class="pagination">
+ {{-- Previous Page Link --}}
+ @if ($paginator->onFirstPage... | true |
Other | laravel | framework | 73d0ee647dc10f7f8fd452e15c171239a1f59e59.json | Add Bootstrap 5 styled pagination | src/Illuminate/Pagination/resources/views/simple-bootstrap-5.blade.php | @@ -0,0 +1,29 @@
+@if ($paginator->hasPages())
+ <nav role="navigation" aria-label="Pagination Navigation">
+ <ul class="pagination">
+ {{-- Previous Page Link --}}
+ @if ($paginator->onFirstPage())
+ <li class="page-item disabled" aria-disabled="true">
+ ... | true |
Other | laravel | framework | d464ff5f594a4f8183520d30c807680384e84571.json | Apply fixes from StyleCI | src/Illuminate/Database/Query/Builder.php | @@ -1828,14 +1828,14 @@ protected function addDynamic($segment, $connector, $parameters, $index)
$this->where(Str::snake($segment), '=', $parameters[$index], $bool);
}
- /**
- * Add a "where fulltext" clause to the query.
- *
- * @param string|string[] $columns
- * @param stri... | false |
Other | laravel | framework | 4ec36ec17ecb3b54aab38fb232a8260a238ce0bc.json | Fix some docblocks | src/Illuminate/Database/DBAL/TimestampType.php | @@ -11,8 +11,6 @@ class TimestampType extends Type implements PhpDateTimeMappingType
{
/**
* {@inheritdoc}
- *
- * @return string
*/
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{
@@ -89,8 +87,6 @@ protected function getSQLitePlatformSQLDecla... | true |
Other | laravel | framework | 4ec36ec17ecb3b54aab38fb232a8260a238ce0bc.json | Fix some docblocks | src/Illuminate/Database/Query/Builder.php | @@ -847,7 +847,6 @@ protected function invalidOperator($operator)
* @param mixed $operator
* @param mixed $value
* @return $this
- * {@inheritdoc}
*/
public function orWhere($column, $operator = null, $value = null)
{
@@ -1829,9 +1828,14 @@ protected function addD... | true |
Other | laravel | framework | 4ec36ec17ecb3b54aab38fb232a8260a238ce0bc.json | Fix some docblocks | src/Illuminate/Database/Query/Grammars/PostgresGrammar.php | @@ -22,7 +22,7 @@ class PostgresGrammar extends Grammar
];
/**
- * {@inheritdoc}
+ * Compile a basic where clause.
*
* @param \Illuminate\Database\Query\Builder $query
* @param array $where | true |
Other | laravel | framework | a5a01581871ab0fdf35f009cb9da01fa0a2a6107.json | Apply fixes from StyleCI | src/Illuminate/Database/Query/Builder.php | @@ -847,7 +847,7 @@ protected function invalidOperator($operator)
* @param mixed $operator
* @param mixed $value
* @return $this
- * {@inheritdoc}
+ * {@inheritdoc}
*/
public function orWhere($column, $operator = null, $value = null)
{
@@ -1443,7 +1443,6 @@ pu... | false |
Other | laravel | framework | ef049b3bf5b99bc414f84894b4f48d6ce0eeda55.json | remove empty line | tests/Database/DatabaseEloquentMorphToTest.php | @@ -406,5 +406,4 @@ public function relation()
class EloquentMorphToRelatedStub extends Model
{
public $table = 'eloquent_morph_to_related_stubs';
-}
-
+}
\ No newline at end of file | false |
Other | laravel | framework | c9101668667c517bc1bdc5324283d4d4a3b159fa.json | Fix namesapce in test (#40395) | tests/Testing/Console/RouteListCommandTest.php | @@ -1,6 +1,6 @@
<?php
-namespace Illuminate\Tests\Testing;
+namespace Illuminate\Tests\Testing\Console;
use Illuminate\Contracts\Routing\Registrar;
use Illuminate\Foundation\Auth\User;
@@ -51,8 +51,8 @@ public function testDisplayRoutesForCli()
->assertSuccessful()
->expectsOutput('')
... | false |
Other | laravel | framework | 94d9824a218098b6e1277bf1b7997fee031d9b27.json | restore old exception message | src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithDictionary.php | @@ -25,9 +25,7 @@ protected function getDictionaryKey($attribute)
return $attribute->value;
}
- $msg = 'Model attribute value is an object but does not have a __toString method '.
- 'and does not implement \Illuminate\Contracts\Database\Eloquent\StringableAttrib... | false |
Other | laravel | framework | d3e10fc137d997015e888e098845d8493af617e8.json | fix style ci | tests/Database/DatabaseEloquentMorphToTest.php | @@ -2,7 +2,6 @@
namespace Illuminate\Tests\Database;
-use Doctrine\Instantiator\Exception\InvalidArgumentException;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
@@ -23,20 +22,18 @@ protected function tearDown(): void
... | true |
Other | laravel | framework | d3e10fc137d997015e888e098845d8493af617e8.json | fix style ci | tests/Database/stubs/TestEnum.php | @@ -4,6 +4,6 @@
enum TestEnum: string
{
- case test = "test";
+ case test = 'test';
} | true |
Other | laravel | framework | 1eb0ac85aaded5b80cfc7b480fb37b1c1c3d9663.json | update split script | bin/split.sh | @@ -3,7 +3,7 @@
set -e
set -x
-CURRENT_BRANCH="master"
+CURRENT_BRANCH="9.x"
function split()
{ | false |
Other | laravel | framework | 9dd4b5e052004e37a1af3079cc22f1ba3fd855f7.json | fix tests for php < 8.1 | tests/Database/DatabaseEloquentMorphToTest.php | @@ -24,27 +24,31 @@ public function testLookupDictionaryIsProperlyConstructedForStringableEnums()
{
if (PHP_VERSION < "8.1") {
$this->markTestSkipped('PHP 8.1 is required');
+ } else {
+ $relation = $this->getRelation();
+ $relation->addEagerConstraints([
+ ... | false |
Other | laravel | framework | 8a728465360f402f6d4b6c1004cd35f5f7d97ab7.json | allow enums as entity_type in morphs | src/Illuminate/Contracts/Database/Eloquent/StringableAttribute.php | @@ -0,0 +1,12 @@
+<?php
+
+namespace Illuminate\Contracts\Database\Eloquent;
+
+interface StringableAttribute
+{
+ /**
+ * Allows enums to be used as morthed entity type
+ * @return string
+ */
+ public function toString(): string;
+} | true |
Other | laravel | framework | 8a728465360f402f6d4b6c1004cd35f5f7d97ab7.json | allow enums as entity_type in morphs | src/Illuminate/Database/Eloquent/Relations/Concerns/InteractsWithDictionary.php | @@ -3,6 +3,7 @@
namespace Illuminate\Database\Eloquent\Relations\Concerns;
use Doctrine\Instantiator\Exception\InvalidArgumentException;
+use Illuminate\Contracts\Database\Eloquent\StringableAttribute;
trait InteractsWithDictionary
{
@@ -21,7 +22,13 @@ protected function getDictionaryKey($attribute)
... | true |
Other | laravel | framework | 8a728465360f402f6d4b6c1004cd35f5f7d97ab7.json | allow enums as entity_type in morphs | tests/Database/DatabaseEloquentMorphToTest.php | @@ -2,6 +2,8 @@
namespace Illuminate\Tests\Database;
+use Doctrine\Instantiator\Exception\InvalidArgumentException;
+use Illuminate\Contracts\Database\Eloquent\StringableAttribute;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphT... | true |
Other | laravel | framework | 20d9fffe5ea845db6336d089a4d6e5b6c85a9d9c.json | Apply fixes from StyleCI | src/Illuminate/Support/Pluralizer.php | @@ -2,9 +2,8 @@
namespace Illuminate\Support;
-use Doctrine\Inflector\InflectorFactory;
use Doctrine\Inflector\Inflector;
-use Doctrine\Inflector\RulesetInflector;
+use Doctrine\Inflector\InflectorFactory;
class Pluralizer
{ | false |
Other | laravel | framework | f3b7651bd0ea0fcd4261c4669aadf1d1d5d5382f.json | Apply fixes from StyleCI | src/Illuminate/Collections/Collection.php | @@ -1663,11 +1663,12 @@ public function offsetSet($key, $value)
/**
* Unset the item at a given offset.
*
-<<<<<<< HEAD
+ * <<<<<<< HEAD
+ *
* @param TKey $key
-=======
+ * =======
* @param mixed $key
->>>>>>> 8.x
+ * >>>>>>> 8.x
... | false |
Other | laravel | framework | 29a6692fb0f0d14e5109ae5f02ed70065f10e966.json | fix virtual attributes | src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php | @@ -1637,7 +1637,13 @@ protected function mergeAttributesFromClassCasts()
protected function mergeAttributesFromAttributeCasts()
{
foreach ($this->attributeCastCache as $key => $value) {
- $callback = $this->{Str::camel($key)}()->set ?: function ($value) use ($key) {
+ $attribut... | true |
Other | laravel | framework | 29a6692fb0f0d14e5109ae5f02ed70065f10e966.json | fix virtual attributes | tests/Integration/Database/DatabaseEloquentModelAttributeCastingTest.php | @@ -177,6 +177,17 @@ public function testSettingRawAttributesClearsTheCastCache()
$this->assertSame('117 Spencer St.', $model->address->lineOne);
}
+
+ public function testCastsThatOnlyHaveGetterDoNotPeristAnythingToModelOnSave()
+ {
+ $model = new TestEloquentModelWithAttributeCast;
+
+ ... | true |
Other | laravel | framework | 66c5afc3cb14f914990d8b8cbf79fa077887cb26.json | Fix cursor pagination with HasManyThrough (#40300) | src/Illuminate/Database/Eloquent/Relations/HasManyThrough.php | @@ -431,6 +431,22 @@ public function simplePaginate($perPage = null, $columns = ['*'], $pageName = 'p
return $this->query->simplePaginate($perPage, $columns, $pageName, $page);
}
+ /**
+ * Paginate the given query into a cursor paginator.
+ *
+ * @param int|null $perPage
+ * @param ... | false |
Other | laravel | framework | 1563361e1a4f786e2ddfc24914d579639782893d.json | Use Swift_TransportException for Mailgun & SES | src/Illuminate/Mail/Transport/MailgunTransport.php | @@ -3,7 +3,9 @@
namespace Illuminate\Mail\Transport;
use GuzzleHttp\ClientInterface;
+use GuzzleHttp\Exception\GuzzleException;
use Swift_Mime_SimpleMessage;
+use Swift_TransportException;
class MailgunTransport extends Transport
{
@@ -68,11 +70,15 @@ public function send(Swift_Mime_SimpleMessage $message, &$f... | true |
Other | laravel | framework | 1563361e1a4f786e2ddfc24914d579639782893d.json | Use Swift_TransportException for Mailgun & SES | src/Illuminate/Mail/Transport/SesTransport.php | @@ -2,8 +2,10 @@
namespace Illuminate\Mail\Transport;
+use Aws\Exception\AwsException;
use Aws\Ses\SesClient;
use Swift_Mime_SimpleMessage;
+use Swift_TransportException;
class SesTransport extends Transport
{
@@ -43,16 +45,20 @@ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = nu... | true |
Other | laravel | framework | ad24bc3422261dc204dd5bab6d7a69cb389fce56.json | Add allowed plugins (#40246) | composer.json | @@ -155,7 +155,10 @@
"wildbit/swiftmailer-postmark": "Required to use Postmark mail driver (^3.0)."
},
"config": {
- "sort-packages": true
+ "sort-packages": true,
+ "allow-plugins": {
+ "composer/package-versions-deprecated": true
+ }
},
"minimum-stab... | false |
Other | laravel | framework | 8d745f19a8cb0e93c89798406b33dc789219d2f9.json | Fix code style. (#40241) | src/Illuminate/Support/Reflector.php | @@ -135,8 +135,8 @@ public static function isParameterSubclassOf($parameter, $className)
{
$paramClassName = static::getParameterClassName($parameter);
- return ($paramClassName && class_exists($paramClassName))
- ? (new ReflectionClass($paramClassName))->isSubclassOf($className)
- ... | false |
Other | laravel | framework | 972538f7071e73dcff429c1cb0ec143d66d82dc1.json | Apply fixes from StyleCI | tests/Integration/Support/Fixtures/MultipleInstanceManager.php | @@ -10,7 +10,8 @@ class MultipleInstanceManager extends BaseMultipleInstanceManager
protected function createFooDriver(array $config)
{
- return new class($config) {
+ return new class($config)
+ {
public $config;
public function __construct($config)
@@ -22,7... | false |
Other | laravel | framework | ca53127994dda58a2dc4a4fe70f1528a1631bb02.json | Add observer mapping | src/Illuminate/Foundation/Support/Providers/EventServiceProvider.php | @@ -22,6 +22,13 @@ class EventServiceProvider extends ServiceProvider
*/
protected $subscribe = [];
+ /**
+ * The observers mapping for the application models.
+ *
+ * @var array
+ */
+ protected $observers = [];
+
/**
* Register the application's event listeners.
*
@... | false |
Other | laravel | framework | 891c0140f33a42eafeaa34477243782de325c52e.json | Apply fixes from StyleCI | src/Illuminate/Database/Console/PruneCommand.php | @@ -91,7 +91,7 @@ protected function models()
}
if (! empty($models) && ! empty($except = $this->option('except'))) {
- throw new InvalidArgumentException("The --models and --except options cannot be combined.");
+ throw new InvalidArgumentException('The --models and --except o... | false |
Other | laravel | framework | 69179b843b2b43abd28744a0f25656455870a44e.json | add validate Mac Address (#40098) | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1230,6 +1230,18 @@ public function validateIpv6($attribute, $value)
return filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) !== false;
}
+ /**
+ * Validate that an attribute is a valid MAC address.
+ *
+ * @param string $attribute
+ * @param mixed $value
+ * @retur... | true |
Other | laravel | framework | 69179b843b2b43abd28744a0f25656455870a44e.json | add validate Mac Address (#40098) | tests/Validation/ValidationValidatorTest.php | @@ -3023,6 +3023,49 @@ public function testValidateIp()
$this->assertTrue($v->fails());
}
+ public function testValidateMacAddress()
+ {
+ $trans = $this->getIlluminateArrayTranslator();
+ $v = new Validator($trans, ['mac' => 'foo'], ['mac' => 'mac_address']);
+ $this->assertF... | true |
Other | laravel | framework | 66e69a2f674515cd0aa18fc596d228e4d96a959e.json | Apply fixes from StyleCI | src/Illuminate/Foundation/Providers/FoundationServiceProvider.php | @@ -4,7 +4,6 @@
use Illuminate\Contracts\Foundation\MaintenanceMode as MaintenanceModeContract;
use Illuminate\Foundation\FileBasedMaintenanceMode;
-use Illuminate\Foundation\MaintenanceMode;
use Illuminate\Http\Request;
use Illuminate\Log\Events\MessageLogged;
use Illuminate\Support\AggregateServiceProvider; | false |
Other | laravel | framework | bcf9ed1d415fc11b4ba7d956b44284938d2ce467.json | Fix vendor publish command (#40081) | src/Illuminate/Foundation/Console/VendorPublishCommand.php | @@ -7,6 +7,7 @@
use Illuminate\Foundation\Events\VendorTagPublished;
use Illuminate\Support\Arr;
use Illuminate\Support\ServiceProvider;
+use Illuminate\Support\Str;
use League\Flysystem\Filesystem as Flysystem;
use League\Flysystem\Local\LocalFilesystemAdapter as LocalAdapter;
use League\Flysystem\MountManager;
... | false |
Other | laravel | framework | 739d8472eb2c97c4a8d8f86eb699c526e42f57fa.json | fix arg passing in doesntContain | src/Illuminate/Collections/Collection.php | @@ -186,7 +186,7 @@ public function contains($key, $operator = null, $value = null)
*/
public function doesntContain($key, $operator = null, $value = null)
{
- return ! $this->contains($key, $operator, $value);
+ return ! $this->contains(...func_get_args());
}
/** | true |
Other | laravel | framework | 739d8472eb2c97c4a8d8f86eb699c526e42f57fa.json | fix arg passing in doesntContain | src/Illuminate/Collections/LazyCollection.php | @@ -215,7 +215,7 @@ public function contains($key, $operator = null, $value = null)
*/
public function doesntContain($key, $operator = null, $value = null)
{
- return ! $this->contains($key, $operator, $value);
+ return ! $this->contains(...func_get_args());
}
/** | true |
Other | laravel | framework | 09689f2bb14ad2cc014c3756db76b10239afcee9.json | Fix code style | src/Illuminate/Collections/Collection.php | @@ -186,7 +186,7 @@ public function contains($key, $operator = null, $value = null)
*/
public function missing($key, $operator = null, $value = null)
{
- return !$this->contains($key, $operator, $value);
+ return ! $this->contains($key, $operator, $value);
}
/** | true |
Other | laravel | framework | 09689f2bb14ad2cc014c3756db76b10239afcee9.json | Fix code style | src/Illuminate/Collections/LazyCollection.php | @@ -215,7 +215,7 @@ public function contains($key, $operator = null, $value = null)
*/
public function missing($key, $operator = null, $value = null)
{
- return !$this->contains($key, $operator, $value);
+ return ! $this->contains($key, $operator, $value);
}
/** | true |
Other | laravel | framework | 985b2cf1845b544cdfd744ee68be2dfa95652c51.json | Fix ThrottleRequestsException (#39951) | src/Illuminate/Http/Exceptions/ThrottleRequestsException.php | @@ -10,13 +10,13 @@ class ThrottleRequestsException extends TooManyRequestsHttpException
/**
* Create a new throttle requests exception instance.
*
- * @param string|null $message
+ * @param string $message
* @param \Throwable|null $previous
* @param array $headers
* @... | false |
Other | laravel | framework | d5e66bab3df8a90df3ca4ea7e7d789fe39fd65ac.json | Use real return value (#39915) | src/Illuminate/Database/Eloquent/Factories/Sequence.php | @@ -44,8 +44,7 @@ public function __construct(...$sequence)
*
* @return int
*/
- #[\ReturnTypeWillChange]
- public function count()
+ public function count(): int
{
return $this->count;
} | false |
Other | laravel | framework | 6b849d116167d57be4d0ac9c6e49be85602381db.json | Apply fixes from StyleCI | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1264,7 +1264,7 @@ protected function shouldBlockPhpUpload($value, $parameters)
}
$phpExtensions = [
- 'php', 'php3', 'php4', 'php5', 'phtml', 'phar'
+ 'php', 'php3', 'php4', 'php5', 'phtml', 'phar',
];
return ($value instanceof UploadedFile) | false |
Other | laravel | framework | 1638472a7a5ee02dc9e808bc203b733785ac1468.json | Add ReturnTypeWillChange to count method | src/Illuminate/Database/Eloquent/Factories/Sequence.php | @@ -44,6 +44,7 @@ public function __construct(...$sequence)
*
* @return int
*/
+ #[\ReturnTypeWillChange]
public function count()
{
return $this->count; | false |
Other | laravel | framework | a69db4280d39d09cf3494462d7e1d26206a86d49.json | Fix non-model children support | src/Illuminate/Database/Eloquent/Model.php | @@ -1895,7 +1895,7 @@ public function resolveSoftDeletableRouteBinding($value, $field = null)
/**
* Retrieve the model for a bound value.
*
- * @param Model|Relation $query
+ * @param Model|Relation $query
* @param mixed $value
* @param string|null $field
* @return Model|... | false |
Other | laravel | framework | 81d3587437bb67425ea57dad22b00648f46bc5c4.json | Set the PHP version on StyleCI to 8.1 (#39896) | .styleci.yml | @@ -1,9 +1,6 @@
php:
preset: laravel
- version: 8
- finder:
- not-name:
- - Enums.php
+ version: 8.1
js:
finder:
not-name: | false |
Other | laravel | framework | 49aac46f7c1bb9d9e635b1542cfb9925073f8244.json | Use Laravel call for retrieving Session (#39830) | src/Illuminate/Http/Request.php | @@ -421,7 +421,7 @@ public static function createFrom(self $from, $to = null)
$request->setJson($from->json());
- if ($from->hasSession() && $session = $from->getSession()) {
+ if ($from->hasSession() && $session = $from->session()) {
$request->setLaravelSession($session);
... | false |
Other | laravel | framework | 63bb589b760b6497c840858409e3b5da0ee287de.json | Add callOnce to Seeder (#39812) | src/Illuminate/Database/Seeder.php | @@ -23,6 +23,13 @@ abstract class Seeder
*/
protected $command;
+ /**
+ * Seeders that have been called at least one time.
+ *
+ * @var array
+ */
+ protected static $called = [];
+
/**
* Run the given seeder class.
*
@@ -53,6 +60,8 @@ public function call($class, $si... | false |
Other | laravel | framework | 9d902d3581ac32549d02058b04b6a1944ff198ed.json | Update DispatchesJobs.php (#39767)
rename "dispatch a command" to "dispatch a job" to be in sync with other docs | src/Illuminate/Foundation/Bus/DispatchesJobs.php | @@ -31,7 +31,7 @@ public function dispatchNow($job)
}
/**
- * Dispatch a command to its appropriate handler in the current process.
+ * Dispatch a job to its appropriate handler in the current process.
*
* Queueable jobs will be dispatched to the "sync" queue.
* | false |
Other | laravel | framework | 097ca1ac101622b3b0769a8970a0509aa898165e.json | Add aggregate method to Eloquent passthru (#39772) | src/Illuminate/Database/Eloquent/Builder.php | @@ -79,6 +79,7 @@ class Builder
* @var string[]
*/
protected $passthru = [
+ 'aggregate',
'average',
'avg',
'count', | false |
Other | laravel | framework | e4b54ba7d3105e8966bade0080c8d9afe556376e.json | Apply fixes from StyleCI | src/Illuminate/Queue/QueueManager.php | @@ -148,7 +148,7 @@ public function connection($name = null)
*
* @param string $name
* @return \Illuminate\Contracts\Queue\Queue
- *
+ *
* @throws \InvalidArgumentException
*/
protected function resolve($name) | false |
Other | laravel | framework | d3c8c8ea83ad82c7bc13ef37fcb99f90b9d3fdee.json | Improve Tappable::tap() return type (#39685) | src/Illuminate/Support/Traits/Tappable.php | @@ -8,7 +8,7 @@ trait Tappable
* Call the given Closure with this instance then return the instance.
*
* @param callable|null $callback
- * @return mixed
+ * @return $this|\Illuminate\Support\HigherOrderTapProxy
*/
public function tap($callback = null)
{ | false |
Other | laravel | framework | f647a24b918648c2b8a17c122b855bc0b2bf5b86.json | add phar to list | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1264,7 +1264,7 @@ protected function shouldBlockPhpUpload($value, $parameters)
}
$phpExtensions = [
- 'php', 'php3', 'php4', 'php5', 'phtml',
+ 'php', 'php3', 'php4', 'php5', 'phtml', 'phar'
];
return ($value instanceof UploadedFile) | false |
Other | laravel | framework | 417bfdb24d703fd75e256fc1f070ec12c526b215.json | Apply fixes from StyleCI | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1254,7 +1254,7 @@ protected function shouldBlockPhpUpload($value, $parameters)
}
$phpExtensions = [
- 'php', 'php3', 'php4', 'php5', 'phtml', 'phar'
+ 'php', 'php3', 'php4', 'php5', 'phtml', 'phar',
];
return ($value instanceof UploadedFile) | false |
Other | laravel | framework | 2d1f76ab752ced011da05cf139799eab2a36ef90.json | add phar to list | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1254,7 +1254,7 @@ protected function shouldBlockPhpUpload($value, $parameters)
}
$phpExtensions = [
- 'php', 'php3', 'php4', 'php5', 'phtml',
+ 'php', 'php3', 'php4', 'php5', 'phtml', 'phar'
];
return ($value instanceof UploadedFile) | false |
Other | laravel | framework | 030e9a886bfea56f90dc911471f55b5b4c36e3ce.json | Apply fixes from StyleCI | tests/Cache/CacheRepositoryTest.php | @@ -113,7 +113,7 @@ public function testRememberMethodCallsPutAndReturnsDefault()
return 'qux';
});
$this->assertSame('qux', $result);
-
+
/*
* Use a callable...
*/ | false |
Other | laravel | framework | 969f1014ec07efba803f887a33fde29e305c9cb1.json | fix breaking change | src/Illuminate/Auth/Notifications/ResetPassword.php | @@ -59,13 +59,11 @@ public function via($notifiable)
*/
public function toMail($notifiable)
{
- $resetUrl = $this->resetUrl($notifiable);
-
if (static::$toMailCallback) {
- return call_user_func(static::$toMailCallback, $notifiable, $this->token, $resetUrl);
+ retur... | false |
Other | laravel | framework | ccea1bfcbb37cf923dc1bb30cdbf2effbfb1619c.json | Add .phar to blocked PHP extensions (#39666)
By default Debian includes support for executing .phar files alongside
.php and .phtml files, and should be included in the blocked list. | src/Illuminate/Validation/Concerns/ValidatesAttributes.php | @@ -1329,7 +1329,7 @@ protected function shouldBlockPhpUpload($value, $parameters)
}
$phpExtensions = [
- 'php', 'php3', 'php4', 'php5', 'phtml',
+ 'php', 'php3', 'php4', 'php5', 'phtml', 'phar',
];
return ($value instanceof UploadedFile) | false |
Other | laravel | framework | 5e0b273ae3012cbb1e959efe4627f03811b705cd.json | use jsonb type for pgsql whereJsonLength (#39619) | src/Illuminate/Database/Query/Grammars/PostgresGrammar.php | @@ -138,7 +138,7 @@ protected function compileJsonLength($column, $operator, $value)
{
$column = str_replace('->>', '->', $this->wrap($column));
- return 'json_array_length(('.$column.')::json) '.$operator.' '.$value;
+ return 'jsonb_array_length(('.$column.')::jsonb) '.$operator.' '.$valu... | true |
Other | laravel | framework | 5e0b273ae3012cbb1e959efe4627f03811b705cd.json | use jsonb type for pgsql whereJsonLength (#39619) | tests/Database/DatabaseQueryBuilderTest.php | @@ -4170,22 +4170,22 @@ public function testWhereJsonLengthPostgres()
{
$builder = $this->getPostgresBuilder();
$builder->select('*')->from('users')->whereJsonLength('options', 0);
- $this->assertSame('select * from "users" where json_array_length(("options")::json) = ?', $builder->toSql()... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.