Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: laravel/framework
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v6.18.21
Choose a base ref
...
head repository: laravel/framework
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v6.18.22
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Jun 24, 2020

  1. Copy the full SHA
    bf3cb6f View commit details
  2. patch

    taylorotwell committed Jun 24, 2020
    Copy the full SHA
    95f3315 View commit details
Showing with 1 addition and 20 deletions.
  1. +0 −5 src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
  2. +1 −1 src/Illuminate/Foundation/Application.php
  3. +0 −14 tests/Database/DatabaseEloquentModelTest.php
5 changes: 0 additions & 5 deletions src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
Original file line number Diff line number Diff line change
@@ -1178,11 +1178,6 @@ public function originalIsEquivalent($key, $current)
} elseif ($this->hasCast($key, ['object', 'collection'])) {
return $this->castAttribute($key, $current) ==
$this->castAttribute($key, $original);
} elseif ($this->hasCast($key, ['real', 'float', 'double'])) {
return bccomp(
$this->castAttribute($key, $current),
$this->castAttribute($key, $original)
) === 0;
} elseif ($this->hasCast($key)) {
return $this->castAttribute($key, $current) ===
$this->castAttribute($key, $original);
2 changes: 1 addition & 1 deletion src/Illuminate/Foundation/Application.php
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ class Application extends Container implements ApplicationContract, HttpKernelIn
*
* @var string
*/
const VERSION = '6.18.21';
const VERSION = '6.18.22';

/**
* The base path for the Laravel installation.
14 changes: 0 additions & 14 deletions tests/Database/DatabaseEloquentModelTest.php
Original file line number Diff line number Diff line change
@@ -148,19 +148,6 @@ public function testCleanAttributes()
$this->assertFalse($model->isClean(['foo', 'bar']));
}

public function testCleanWhenFloatUpdateAttribute()
{
$original = -16.666347;
$new = 20.1 - 36.766347;

$this->assertFalse($original === $new);
$this->assertSame(0, bccomp($original, $new));

$model = new EloquentModelStub(['castedFloat' => $original]);
$model->syncOriginal();
$this->assertTrue($model->originalIsEquivalent('castedFloat', $new));
}

public function testCalculatedAttributes()
{
$model = new EloquentModelStub;
@@ -2005,7 +1992,6 @@ class EloquentModelStub extends Model
protected $table = 'stub';
protected $guarded = [];
protected $morph_to_stub_type = EloquentModelSaveStub::class;
protected $casts = ['castedFloat' => 'float'];

public function getListItemsAttribute($value)
{