Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.x] Improve Arr::dot performance #49386

Merged
merged 8 commits into from Dec 15, 2023

Conversation

bastien-phi
Copy link
Contributor

@bastien-phi bastien-phi commented Dec 15, 2023

Re submission of #49380 by @comes

Original description :

This PR improves the speed of Arr::dot() by using the array union operator instead of the slower array_merge

The reason why we can use the union operator here is, that an array always has unique keys.

the + operator will only add the elements of the right side operand, if their key doesn't exist in the leftside operand, while array_merge will override existing keys.

see https://stitcher.io/blog/array-merge-vs+

But this is not a problem here, because, as I already noticed, the keys in an array are unique.

I've attached some benchmarks running the current Arr::dot() implementation agains my new implementation. As you can see, the new implementation solves a significant runtime issue.

Items: 100
old Arr::dot: 0.0003 seconds / 20.00 memory
new Arr::dot: 0.0001 seconds / 20.00 memory


Items: 1000
old Arr::dot: 0.0218 seconds / 22.00 memory
new Arr::dot: 0.0010 seconds / 24.00 memory


Items: 10000
old Arr::dot: 3.5038 seconds / 46.00 memory
new Arr::dot: 0.0129 seconds / 48.50 memory


Items: 15000
old Arr::dot: 10.4789 seconds / 64.00 memory
new Arr::dot: 0.0155 seconds / 68.50 memory

for futher information about the union operator see: https://www.php.net/manual/en/language.operators.array.php

I don't add my benchmark results as they are similar to the original ones

After some tweak and suggestions (thanks @donnysim and @comes), heres an updated version of the benchmark.

Items: 100
original Arr::dot: 0.0003 seconds / 40.50 memory
new Arr::dot: 0.0002 seconds / 40.50 memory
Items: 1000
original Arr::dot: 0.0213 seconds / 42.50 memory
new Arr::dot: 0.0016 seconds / 42.50 memory
Items: 10000
original Arr::dot: 5.0146 seconds / 68.50 memory
new Arr::dot: 0.0201 seconds / 72.50 memory
Items: 15000
original Arr::dot: 12.8689 seconds / 100.50 memory
new Arr::dot: 0.0272 seconds / 97.50 memory

Note : do not compare with original benchmark, it was not run on the same machine

I also updated the tests with assertSame instead of assertEquals to ensure that the order of the arrays are respected.

@jbrooksuk
Copy link
Member

I think it'd be useful to prove that this PR doesn't change existing behaviour, with an additional test.

@bastien-phi
Copy link
Contributor Author

@jbrooksuk I guessed that existing tests were enough but I added some based on Arr::undot tests

@comes
Copy link
Contributor

comes commented Dec 15, 2023

@bastien-phi, I appreciate your support here.

I've attached my script to reproduce the results with an unmodified version of laravel.

class ArrDotBench extends Command
{
    protected $signature = 'dot:bench';

    public function handle(): void
    {
        foreach ([100, 1_000, 10_000, 15_000] as $itemCount) {
            $data = $this->data($itemCount);

            $this->framework($data);
            $this->newdot($data);
        }

    }

    protected function data(int $itemCount): array
    {
        $subset = [];
        for ($i=0; $i < $itemCount; $i++) {
            $subset[] = [
                'id' => $i,
                'name' => 'Name ' . $i,
                'email' => 'email' . $i . '@example.com',
                'date' => now()->addDays($i)->format('Y-m-d'),
                'another_sub_array' => [
                    'street' => 'Street ' . $i,
                    'city' => 'City ' . $i,
                    'country' => 'Country ' . $i,
                ],
            ];
        }

        $data = ['items' => $subset];

        $this->info('Items: ' . count($data['items']));

        return $data;
    }

    protected function framework(array $data): array
    {
        $start = $this->start();

        $dottedArr = Arr::dot($data);

        $this->finish('framework dot', $start);

        return $dottedArr;
    }

    protected function newdot(array $data): array
    {
        $start = $this->start();

        $dottedArr = $this->fastdot($data);

        $this->finish('fastdot', $start);

        return $dottedArr;
    }

    protected function start(): float
    {
        memory_reset_peak_usage();

        return microtime(true);
    }

    protected function finish(string $title, float $start): void
    {
        $this->info(sprintf($title . ': %.4f seconds / %.2f memory', microtime(true) - $start, memory_get_peak_usage(true) / 1024 / 1024)).PHP_EOL;
    }

    public static function fastdot($array, $prepend = '')
    {
        $results = [];

        foreach ($array as $key => $value) {
            if (is_array($value) && !empty($value)) {
                $results += static::fastdot($value, $prepend . $key . ".");
            } else {
                $results[$prepend . $key] = $value;
            }
        };

        return $results;
    }
}

@donnysim
Copy link
Contributor

donnysim commented Dec 15, 2023

You can also do the usual array_merge spread, which is a fraction slower than the union operator, but at a way lower memory cost:

    public function spread($array, $prepend = '')
    {
        $results = [[]];

        foreach ($array as $key => $value) {

            if (is_array($value) && !empty($value)) {
                $results[] = $this->spread($value, $prepend . $key . '.');
            } else {
                $results[0][$prepend . $key] = $value;
            }
        }

        return array_merge(...$results);
    }

out based on @comes bench:

Items: 100
framework dot: 0.0007 seconds / 32.00 memory
fastdot: 0.0003 seconds / 32.00 memory
mergespread: 0.0003 seconds / 32.00 memory
Items: 1000
framework dot: 0.0280 seconds / 34.00 memory
fastdot: 0.0026 seconds / 34.00 memory
mergespread: 0.0031 seconds / 34.00 memory
Items: 10000
framework dot: 4.5470 seconds / 60.00 memory
fastdot: 0.0317 seconds / 66.00 memory
mergespread: 0.0378 seconds / 58.00 memory
Items: 15000
framework dot: 12.1578 seconds / 78.00 memory
fastdot: 0.0468 seconds / 80.00 memory
mergespread: 0.0617 seconds / 72.00 memory

@comes
Copy link
Contributor

comes commented Dec 15, 2023

@donnysim awesome, I prefer your solution. based on a benchmark with up to 1M items it's faster and uses less memory.

Items: 100
fastdot: 0.0001 seconds / 20.00 memory
spread: 0.0001 seconds / 20.00 memory
Items: 1000
fastdot: 0.0009 seconds / 24.00 memory
spread: 0.0009 seconds / 22.00 memory
Items: 10000
fastdot: 0.0129 seconds / 48.50 memory
spread: 0.0127 seconds / 45.00 memory
Items: 15000
fastdot: 0.0204 seconds / 66.50 memory
spread: 0.0168 seconds / 59.00 memory
Items: 50000
fastdot: 0.0952 seconds / 162.00 memory
spread: 0.0705 seconds / 142.00 memory
Items: 100000
fastdot: 0.1972 seconds / 326.02 memory
spread: 0.1685 seconds / 270.03 memory
Items: 500000
fastdot: 1.7555 seconds / 1286.02 memory
spread: 1.3012 seconds / 1169.78 memory
Items: 1000000
fastdot: 3.7078 seconds / 2878.02 memory
spread: 2.7969 seconds / 2429.53 memory

@bastien-phi
Copy link
Contributor Author

Agree with that, this version is also faster on my benchmarks. I update this PR

@donnysim
Copy link
Contributor

donnysim commented Dec 15, 2023

Windows user casually getting destroyed even with arrays bench. That's me 🥲

@comes
Copy link
Contributor

comes commented Dec 15, 2023

Agree with that, this version is also faster on my benchmarks. I update this PR

Thank you for your support and improvement. Like your solution more than mine.

@donnysim
Copy link
Contributor

donnysim commented Dec 15, 2023

Oh, i didn't think of ordering, nice catch 👍 it's possible to optimize it a bit more in this case to group attribute batches instead of array per attribute:

    public function spread($array, $prepend = '')
    {
        $results = [];
        $attrs = [];

        foreach ($array as $key => $value) {
            if (is_array($value) && !empty($value)) {
                if ($attrs) {
                    $results[] = $attrs;
                    $attrs = [];
                }

                $results[] = $this->mergespread($value, $prepend . $key . '.');
            } else {
                $attrs[$prepend . $key] = $value;
            }
        }

        if ($attrs) {
            $results[] = $attrs;
        }

        return array_merge(...$results);
    }

haven't tested it fully how much it makes a diff, but it should be little bit better performance and maybe memory wise.

@comes
Copy link
Contributor

comes commented Dec 15, 2023

Oh, i didn't think of ordering, nice catch 👍 it's possible to optimize it a bit more in this case to group attribute batches instead of array per attribute:

    public function spread($array, $prepend = '')
    {
        $results = [];
        $attrs = [];

        foreach ($array as $key => $value) {
            if (is_array($value) && !empty($value)) {
                if ($attrs) {
                    $results[] = $attrs;
                    $attrs = [];
                }

                $results[] = $this->mergespread($value, $prepend . $key . '.');
            } else {
                $attrs[$prepend . $key] = $value;
            }
        }

        if ($attrs) {
            $results[] = $attrs;
        }

        return array_merge(...$results);
    }

haven't tested it fully how much it makes a diff, but it should be little bit better performance and maybe memory wise.

this 'improved' version, did not perform very well:

Items: 100
fastdot: 0.0001 seconds / 20.00 memory
dospread: 0.0001 seconds / 20.00 memory
dospreadImproved: 0.0001 seconds / 20.00 memory
Items: 1000
fastdot: 0.0012 seconds / 24.00 memory
dospread: 0.0013 seconds / 22.00 memory
dospreadImproved: 0.0012 seconds / 24.00 memory
Items: 10000
fastdot: 0.0182 seconds / 48.50 memory
dospread: 0.0149 seconds / 45.00 memory
dospreadImproved: 0.0134 seconds / 50.00 memory
Items: 15000
fastdot: 0.0229 seconds / 66.50 memory
dospread: 0.0183 seconds / 59.00 memory
dospreadImproved: 0.0231 seconds / 64.00 memory
Items: 25000
fastdot: 0.0435 seconds / 99.00 memory
dospread: 0.0375 seconds / 84.00 memory
dospreadImproved: 0.0330 seconds / 94.00 memory
Items: 50000
fastdot: 0.0909 seconds / 172.00 memory
dospread: 0.0792 seconds / 146.00 memory
dospreadImproved: 0.1138 seconds / 162.00 memory
Items: 100000
fastdot: 0.2218 seconds / 326.02 memory
dospread: 0.1973 seconds / 270.03 memory
dospreadImproved: 0.2313 seconds / 306.02 memory

@bastien-phi
Copy link
Contributor Author

AFK, I convert this PR to draft and will try your version when I can

@bastien-phi bastien-phi marked this pull request as draft December 15, 2023 11:25
@bastien-phi bastien-phi marked this pull request as ready for review December 15, 2023 16:28
@taylorotwell taylorotwell merged commit 03dbd3a into laravel:10.x Dec 15, 2023
24 checks passed
@bastien-phi bastien-phi deleted the improve_arr_dot branch December 21, 2023 07:21
renovate bot added a commit to RadioRoster/backend that referenced this pull request Feb 10, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [laravel/framework](https://laravel.com)
([source](https://togithub.com/laravel/framework)) | `10.33.0` ->
`10.43.0` |
[![age](https://developer.mend.io/api/mc/badges/age/packagist/laravel%2fframework/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/laravel%2fframework/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/laravel%2fframework/10.33.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/laravel%2fframework/10.33.0/10.43.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>laravel/framework (laravel/framework)</summary>

###
[`v10.43.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10430---2024-01-30)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.42.0...v10.43.0)

- \[10.x] Add storage:unlink command by
[@&#8203;salkovmx](https://togithub.com/salkovmx) in
[laravel/framework#49795
- \[10.x] Unify `\Illuminate\Log\LogManager` method definition comments
with `\Psr\Logger\Interface` by
[@&#8203;eusonlito](https://togithub.com/eusonlito) in
[laravel/framework#49805
- \[10.x] class-name string argument for global scopes by
[@&#8203;emargareten](https://togithub.com/emargareten) in
[laravel/framework#49802
- \[10.x] Add `hasIndex()` and minor Schema enhancements by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49796
- \[10.x] Do not touch `BelongsToMany` relation when using
`withoutTouching` by
[@&#8203;mateusjunges](https://togithub.com/mateusjunges) in
[laravel/framework#49798
- \[10.x] Check properties on mailables are initialized before sharing
with the view by [@&#8203;j3j5](https://togithub.com/j3j5) in
[laravel/framework#49813
- \[10.x] Remove duplicate actions/checkout from queue workflow by
[@&#8203;Jubeki](https://togithub.com/Jubeki) in
[laravel/framework#49828
- \[10.x] Add `insertOrIgnoreUsing` for Eloquent by
[@&#8203;trovster](https://togithub.com/trovster) in
[laravel/framework#49827
- \[10.x] Make `hasIndex()` Order-sensitive by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49840
- \[10.x] Release action by
[@&#8203;driesvints](https://togithub.com/driesvints) in
[laravel/framework#49838
- \[10.x] Add MariaDb1060Platform by
[@&#8203;driesvints](https://togithub.com/driesvints) in
[laravel/framework#49848
- \[10.x] Unified Pivot and Model Doc Block `$guarded` by
[@&#8203;eusonlito](https://togithub.com/eusonlito) in
[laravel/framework#49851
- \[10.x] Introducing `beforeStartingTransaction` callback and use it in
`LazilyRefreshDatabase` by
[@&#8203;pascalbaljet](https://togithub.com/pascalbaljet) in
[laravel/framework#49853
- \[10.x] fix password max validation message by
[@&#8203;MrPunyapal](https://togithub.com/MrPunyapal) in
[laravel/framework#49861
- \[10.x] Fix validation message used for max file size by
[@&#8203;mateusjunges](https://togithub.com/mateusjunges) in
[laravel/framework#49879
- Update README.md by
[@&#8203;foremtehan](https://togithub.com/foremtehan) in
[laravel/framework#49878
- \[10.x] Adds
`FormRequest[@&#8203;getRules](https://togithub.com/getRules)()` method
by [@&#8203;cosmastech](https://togithub.com/cosmastech) in
[laravel/framework#49860
- \[10.x] add addGlobalScopes method by
[@&#8203;emargareten](https://togithub.com/emargareten) in
[laravel/framework#49880
- \[10.x] Allow brick/math 0.12 by
[@&#8203;LogicSatinn](https://togithub.com/LogicSatinn) in
[laravel/framework#49883
- \[10.x] Add support for streamed JSON Response by
[@&#8203;pelmered](https://togithub.com/pelmered) in
[laravel/framework#49873
- \[10.x] Using the native fopen exception in LockableFile.php by
[@&#8203;eusonlito](https://togithub.com/eusonlito) in
[laravel/framework#49895
- \[10.x] Fix LazilyRefreshDatabase when testing artisan commands by
[@&#8203;iamgergo](https://togithub.com/iamgergo) in
[laravel/framework#49914
- \[10.x] Fix expressions in with-functions doing aggregates by
[@&#8203;tpetry](https://togithub.com/tpetry) in
[laravel/framework#49912
- \[10.x] Fix redis tag entries never becoming stale if cache ttl is
past time by [@&#8203;jagers](https://togithub.com/jagers) in
[laravel/framework#49864
- \[10.x] Fix - The `Translator` may incorrectly report the locale of a
missing translation key by
[@&#8203;VicGUTT](https://togithub.com/VicGUTT) in
[laravel/framework#49900
- \[10.x] fix Before/After validation rules by
[@&#8203;MrPunyapal](https://togithub.com/MrPunyapal) in
[laravel/framework#49871

###
[`v10.42.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10420---2024-01-23)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.41.0...v10.42.0)

- \[10.x] Switch to hash_equals in `File::hasSameHash()` by
[@&#8203;simonhamp](https://togithub.com/simonhamp) in
[laravel/framework#49721
- \[10.x] fix Rule::unless for callable $condition by
[@&#8203;dbakan](https://togithub.com/dbakan) in
[laravel/framework#49726
- \[10.x] Adds JobQueueing event by
[@&#8203;dmason30](https://togithub.com/dmason30) in
[laravel/framework#49722
- \[10.x] Fix decoding issue in MailLogTransport by
[@&#8203;rojtjo](https://togithub.com/rojtjo) in
[laravel/framework#49727
- \[10.x] Implement "max" validation rule for passwords by
[@&#8203;angelej](https://togithub.com/angelej) in
[laravel/framework#49739
- \[10.x] Add multiple channels/routes to AnonymousNotifiable at once by
[@&#8203;iamgergo](https://togithub.com/iamgergo) in
[laravel/framework#49745
- \[10.x] Sort service providers alphabetically by
[@&#8203;buismaarten](https://togithub.com/buismaarten) in
[laravel/framework#49762
- \[10.x] Global default options for the http factory by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49767
- \[10.x] Only use `Carbon` if accessed from Laravel or also uses
`illuminate/support` by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49772
- \[10.x] Add `Str::unwrap` by
[@&#8203;stevebauman](https://togithub.com/stevebauman) in
[laravel/framework#49779
- \[10.x] Allow Uuid and Ulid in Carbon::createFromId() by
[@&#8203;kylekatarnls](https://togithub.com/kylekatarnls) in
[laravel/framework#49783
- \[10.x] Test Improvements by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49785

###
[`v10.41.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10410---2024-01-16)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.40.0...v10.41.0)

- \[10.x] Add a `threshold` parameter to the `Number::spell` helper by
[@&#8203;caendesilva](https://togithub.com/caendesilva) in
[laravel/framework#49610
- Revert "\[10.x] Make ComponentAttributeBag Arrayable" by
[@&#8203;luanfreitasdev](https://togithub.com/luanfreitasdev) in
[laravel/framework#49623
- \[10.x] Fix return value and docblock by
[@&#8203;dwightwatson](https://togithub.com/dwightwatson) in
[laravel/framework#49627
- \[10.x] Add an option to specify the default path to the models
directory for `php artisan model:prune` by
[@&#8203;dbhynds](https://togithub.com/dbhynds) in
[laravel/framework#49617
- \[10.x] Allow job chains to be conditionally dispatched by
[@&#8203;fjarrett](https://togithub.com/fjarrett) in
[laravel/framework#49624
- \[10.x] Add test for existing empty test by
[@&#8203;lioneaglesolutions](https://togithub.com/lioneaglesolutions) in
[laravel/framework#49632
- \[10.x] Add additional context to Mailable assertion messages by
[@&#8203;lioneaglesolutions](https://togithub.com/lioneaglesolutions) in
[laravel/framework#49631
- \[10.x] Allow job batches to be conditionally dispatched by
[@&#8203;fjarrett](https://togithub.com/fjarrett) in
[laravel/framework#49639
- \[10.x] Revert parameter name change by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49659
- \[10.x] Printing Name of The Method that Calls
`ensureIntlExtensionIsInstalled` in `Number` class. by
[@&#8203;devajmeireles](https://togithub.com/devajmeireles) in
[laravel/framework#49660
- \[10.x] Update pagination tailwind.blade.php by
[@&#8203;anasmorahhib](https://togithub.com/anasmorahhib) in
[laravel/framework#49665
- \[10.x] feat: add base argument to Stringable->toInteger() by
[@&#8203;adamczykpiotr](https://togithub.com/adamczykpiotr) in
[laravel/framework#49670
- \[10.x]: Remove unused class ShouldBeUnique when make a job by
[@&#8203;Kenini1805](https://togithub.com/Kenini1805) in
[laravel/framework#49669
- \[10.x] Add tests for Eloquent methods by
[@&#8203;milwad-dev](https://togithub.com/milwad-dev) in
[laravel/framework#49673
- Implement draft workflow by
[@&#8203;driesvints](https://togithub.com/driesvints) in
[laravel/framework#49683
- \[10.x] Fixing Types, Word and Returns of `Number`class. by
[@&#8203;devajmeireles](https://togithub.com/devajmeireles) in
[laravel/framework#49681
- \[10.x] Test Improvements by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49679
- \[10.x] Officially support floats in trans_choice and
Translator::choice by
[@&#8203;philbates35](https://togithub.com/philbates35) in
[laravel/framework#49693
- \[10.x] Use static function by
[@&#8203;michaelnabil230](https://togithub.com/michaelnabil230) in
[laravel/framework#49696
- \[10.x] Revert "\[10.x] Improve numeric comparison for custom casts"
by [@&#8203;driesvints](https://togithub.com/driesvints) in
[laravel/framework#49702
- \[10.x] Add exit code to queue:clear, and queue:forget commands by
[@&#8203;bytestream](https://togithub.com/bytestream) in
[laravel/framework#49707
- \[10.x] Allow StreamInterface as raw HTTP Client body by
[@&#8203;janolivermr](https://togithub.com/janolivermr) in
[laravel/framework#49705

###
[`v10.40.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10400---2024-01-09)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.39.0...v10.40.0)

- \[10.x] `Model::preventAccessingMissingAttributes()` raises exception
for enums & primitive castable attributes that were not retrieved by
[@&#8203;cosmastech](https://togithub.com/cosmastech) in
[laravel/framework#49480
- \[10.x] Include system versioned tables for MariaDB by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49509
- \[10.x] Fixes the `Arr::dot()` method to properly handle indexes array
by [@&#8203;kayw-geek](https://togithub.com/kayw-geek) in
[laravel/framework#49507
- \[10.x] Expand Gate::allows & Gate::denies signature by
[@&#8203;antonkomarev](https://togithub.com/antonkomarev) in
[laravel/framework#49503
- \[10.x] Improve numeric comparison for custom casts by
[@&#8203;imahmood](https://togithub.com/imahmood) in
[laravel/framework#49504
- \[10.x] Add session except method by
[@&#8203;xurshudyan](https://togithub.com/xurshudyan) in
[laravel/framework#49520
- \[10.x] Add `Number::clamp` by
[@&#8203;jbrooksuk](https://togithub.com/jbrooksuk) in
[laravel/framework#49512
- \[10.x] Fix Schedule test by
[@&#8203;michaelnabil230](https://togithub.com/michaelnabil230) in
[laravel/framework#49538
- \[10.x] Use correct format of date by
[@&#8203;buismaarten](https://togithub.com/buismaarten) in
[laravel/framework#49541
- \[10.x] Clean Arr by
[@&#8203;michaelnabil230](https://togithub.com/michaelnabil230) in
[laravel/framework#49530
- \[10.x] Make ComponentAttributeBag Arrayable by
[@&#8203;iamgergo](https://togithub.com/iamgergo) in
[laravel/framework#49524
- \[10.x] Fix whenAggregated when default is not specified by
[@&#8203;lovePizza](https://togithub.com/lovePizza) in
[laravel/framework#49521
- \[10.x] Update AsArrayObject.php to use ARRAY_AS_PROPS flag by
[@&#8203;pintend](https://togithub.com/pintend) in
[laravel/framework#49534
- \[10.x] Remove invalid `RedisCluster::client()` call by
[@&#8203;tillkruss](https://togithub.com/tillkruss) in
[laravel/framework#49560
- \[10.x] Remove unused code from `PhpRedisConnector` by
[@&#8203;tillkruss](https://togithub.com/tillkruss) in
[laravel/framework#49559
- \[10.x] Flush about command during test runs by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49557
- \[10.x] Fix parentOfParameter method by
[@&#8203;iamgergo](https://togithub.com/iamgergo) in
[laravel/framework#49548
- \[10.x] Make the Schema Builder macroable by
[@&#8203;kevinb1989](https://togithub.com/kevinb1989) in
[laravel/framework#49547
- \[10.x] Remove unused code from tests by
[@&#8203;imahmood](https://togithub.com/imahmood) in
[laravel/framework#49566
- \[10.x] Update Query/Builder.php $columns typehint by
[@&#8203;Grldk](https://togithub.com/Grldk) in
[laravel/framework#49563
- \[10.x] Add assertViewEmpty to TestView by
[@&#8203;dwightwatson](https://togithub.com/dwightwatson) in
[laravel/framework#49558
- \[10.x] Update tailwind.blade.php for dark mode by
[@&#8203;sabinchacko03](https://togithub.com/sabinchacko03) in
[laravel/framework#49515
- \[10.x] Fix deprecation with null value in cache FileStore by
[@&#8203;driesvints](https://togithub.com/driesvints) in
[laravel/framework#49578
- \[10.x] Allow Vite asset path customization by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49437
- \[10.x] Type hinting of the second parameter of date- and time-related
`where*()` methods of `Illuminate\Database\Query\Builder` by
[@&#8203;lorenzolosa](https://togithub.com/lorenzolosa) in
[laravel/framework#49599
- \[10.x] Fix Stringable::convertCase() return type by
[@&#8203;vaites](https://togithub.com/vaites) in
[laravel/framework#49590
- Allow \Blade::stringable() to be called on native Iterables by
[@&#8203;tsjason](https://togithub.com/tsjason) in
[laravel/framework#49591
- \[10.x] Refactor time handling using `InteractsWithTime` trait method
by [@&#8203;xurshudyan](https://togithub.com/xurshudyan) in
[laravel/framework#49601
- \[10.x] Add `assertCount` test helper by
[@&#8203;xurshudyan](https://togithub.com/xurshudyan) in
[laravel/framework#49609
- \[10.x] Ability to establish connection without using Config
Repository by [@&#8203;deleugpn](https://togithub.com/deleugpn) in
[laravel/framework#49527
- \[10.x] Add APA style title helper by
[@&#8203;hotmeteor](https://togithub.com/hotmeteor) in
[laravel/framework#49572
- \[10.x] Fix usage of alternatives in error output by
[@&#8203;Mrjavaci](https://togithub.com/Mrjavaci) in
[laravel/framework#49614
- \[10.x] Use locks for queue job popping for PlanetScale's
MySQL-compatible Vitess 19 engine by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49561

###
[`v10.39.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10390---2023-12-27)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.38.2...v10.39.0)

- \[9.x] Support for phpredis 6.0.0 by
[@&#8203;MichalHubatka](https://togithub.com/MichalHubatka) in
[laravel/framework#48380
- \[10.x] Dynamic `maxTries` for queued jobs by
[@&#8203;mechelon](https://togithub.com/mechelon) in
[laravel/framework#49473
- \[10.x] Avoid TypeError when using json validation rule when PHP < 8.3
by [@&#8203;Xint0](https://togithub.com/Xint0) in
[laravel/framework#49474
- \[10.x] Fix use statement compilation in Blade templates by
[@&#8203;MrPunyapal](https://togithub.com/MrPunyapal) in
[laravel/framework#49479
- \[10.x] Allow testing prompts validation by
[@&#8203;cerbero90](https://togithub.com/cerbero90) in
[laravel/framework#49447
- \[10.x] Add 'Roundrobin' Symfony mailer transport driver by
[@&#8203;me-shaon](https://togithub.com/me-shaon) in
[laravel/framework#49435

###
[`v10.38.2`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10382---2023-12-22)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.38.1...v10.38.2)

- \[10.x] Add `conflict` for `doctrine/dbal:^4.0` to
`illuminate/database` by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49456
- \[10.x] Simplify Arr::dot by
[@&#8203;bastien-phi](https://togithub.com/bastien-phi) in
[laravel/framework#49461
- \[10.x] Illuminate\Filesystem\join_paths(): Argument
[#&#8203;2](https://togithub.com/laravel/framework/issues/2) must be of
type string, null given by
[@&#8203;tylernathanreed](https://togithub.com/tylernathanreed) in
[laravel/framework#49467
- \[10.x] Allow deprecation logging in tests by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49457
- \[10.x] Fix missing Validation rules not working with nested array by
[@&#8203;aabadawy](https://togithub.com/aabadawy) in
[laravel/framework#49449

###
[`v10.38.1`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10381---2023-12-20)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.38.0...v10.38.1)

- \[10.x] Adds support for parse callbacks from anonymous classes by
[@&#8203;nunomaduro](https://togithub.com/nunomaduro) in
[laravel/framework#49432
- Revert "\[10.x] Drop the primary key if it exists when adding a new
primary key" by
[@&#8203;taylorotwell](https://togithub.com/taylorotwell) in
[laravel/framework#49448
- \[10.x] Fix installing DBAL on a fresh app by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49438
- \[10.x] Add method to create request by
[@&#8203;dododedodonl](https://togithub.com/dododedodonl) in
[laravel/framework#49446
- \[10.x] Move `Illuminate\Foundation\Application::joinPaths()` to
`Illuminate\Filesystem\join_paths()` by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49433

###
[`v10.38.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10380---2023-12-19)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.37.3...v10.38.0)

- \[10.x] Add routeRoute method to test request by
[@&#8203;fragkp](https://togithub.com/fragkp) in
[laravel/framework#49366
- \[10.x] Update import & typo by
[@&#8203;chu121su12](https://togithub.com/chu121su12) in
[laravel/framework#49370
- \[10.x] Show default `false` values in `db:table` command by
[@&#8203;PerryvanderMeer](https://togithub.com/PerryvanderMeer) in
[laravel/framework#49379
- \[10.x] Fix primary key creation for MySQL with
`sql_require_primary_key` enabled by
[@&#8203;mtawil](https://togithub.com/mtawil) in
[laravel/framework#49374
- \[10.x] Add `charset` and `collation` method to `Blueprint` by
[@&#8203;gcazin](https://togithub.com/gcazin) in
[laravel/framework#49396
- Fixes second run of `about` command on Octane by
[@&#8203;josecl](https://togithub.com/josecl) in
[laravel/framework#49387
- \[10.x] Fix bug in ArrayLock getCurrentOwner by
[@&#8203;Joostb](https://togithub.com/Joostb) in
[laravel/framework#49393
- \[10.x] Dynamo Batch Repository - Match Default Horizon Sort by
[@&#8203;evan-burrell](https://togithub.com/evan-burrell) in
[laravel/framework#49391
- \[10.x] Add Blade `[@session](https://togithub.com/session)` Directive
by [@&#8203;jrd-lewis](https://togithub.com/jrd-lewis) in
[laravel/framework#49339
- \[10.x] Improve `Arr::dot` performance by
[@&#8203;bastien-phi](https://togithub.com/bastien-phi) in
[laravel/framework#49386
- \[10.x] Fix assertStatus() parameter order by
[@&#8203;marcovo](https://togithub.com/marcovo) in
[laravel/framework#49404
- \[10.x] Only set `defaultCasters` if not previously set by
[@&#8203;inxilpro](https://togithub.com/inxilpro) in
[laravel/framework#49402
- \[10.x] Fixes parameter type in `ManagesFrequencies` by
[@&#8203;Lucas-Schmukas](https://togithub.com/Lucas-Schmukas) in
[laravel/framework#49399
- \[10.x] Add SQLite support for `whereJsonContains` method by
[@&#8203;danieleambrosino](https://togithub.com/danieleambrosino) in
[laravel/framework#49401
- \[10x.] Use native json_validate in Validation by
[@&#8203;gtjamesa](https://togithub.com/gtjamesa) in
[laravel/framework#49413
- \[10.x] Introducing `isEmpty` and `isNotEmpty` to
`ComponentAttributeBag` by
[@&#8203;devajmeireles](https://togithub.com/devajmeireles) in
[laravel/framework#49408
- \[10.x] Drop the primary key if it exists when adding a new primary
key by [@&#8203;KieranFYI](https://togithub.com/KieranFYI) in
[laravel/framework#49392
- \[10.x] Improve schema builder `getColumns()` method by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49416
- \[10.x] Add `MailMessage` helpers for plain text email notifications
by [@&#8203;onlime](https://togithub.com/onlime) in
[laravel/framework#49407
- \[10.x] Test Improvements by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49426
- \[10.x] Add Conditionable to Pipeline by
[@&#8203;shane-zeng](https://togithub.com/shane-zeng) in
[laravel/framework#49429

###
[`v10.37.3`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10373---2023-12-13)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.37.2...v10.37.3)

- Flush middleware callbacks by
[@&#8203;taylorotwell](https://togithub.com/taylorotwell) in
laravel/framework@bb49a72

###
[`v10.37.2`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10372---2023-12-13)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.37.1...v10.37.2)

- Ability to test chained job via closure by
[@&#8203;jasonmccreary](https://togithub.com/jasonmccreary) in
[laravel/framework#49337
- \[10.x] Add `progress` option to `PendingBatch` by
[@&#8203;orkhanahmadov](https://togithub.com/orkhanahmadov) in
[laravel/framework#49273
- \[10.x] Test Improvements by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49338
- \[10.x] Avoid using `rescue()` in standalone `illuminate/database`
component. by [@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49355
- \[10.x] Exclude extension types on PostgreSQL when retrieving types by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49358
- \[10.x] Revert "\[10.x] Disconnecting the database connection after
testing" by [@&#8203;driesvints](https://togithub.com/driesvints) in
[laravel/framework#49361

###
[`v10.37.1`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10371---2023-12-12)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.37.0...v10.37.1)

- \[10.x] Disconnecting the database connection after testing by
[@&#8203;KentarouTakeda](https://togithub.com/KentarouTakeda) in
[laravel/framework#49327
- \[10.x] Get user-defined types on PostgreSQL by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49303

###
[`v10.37.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10370---2023-12-12)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.36.0...v10.37.0)

- \[10.x] Add `engine` method to `Blueprint` by
[@&#8203;jbrooksuk](https://togithub.com/jbrooksuk) in
[laravel/framework#49250
- \[10.x] Use translator from validator in `Can` and `Enum` rules by
[@&#8203;fancyweb](https://togithub.com/fancyweb) in
[laravel/framework#49251
- \[10.x] Get indexes of a table by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49204
- \[10.x] Filesystem : can lock file on append of content by
[@&#8203;StephaneBour](https://togithub.com/StephaneBour) in
[laravel/framework#49262
- \[10.x] Test Improvements by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49266
- \[10.x] Fixes generating facades documentation shouldn't be affected
by `php-psr` extension by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49268
- \[10.x] Fixes `AboutCommand::format()` docblock by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49274
- \[10.x] `Route::getController()` should return `null` when the
accessing closure based route by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49269
- \[10.x] Add "noActionOnUpdate" method in
Illuminate/Database/Schema/ForeignKeyDefinition by
[@&#8203;hrsa](https://togithub.com/hrsa) in
[laravel/framework#49297
- \[10.x] Fixing number helper for floating 0.0 by
[@&#8203;mr-punyapal](https://togithub.com/mr-punyapal) in
[laravel/framework#49277
- \[10.x] Allow checking if lock succesfully restored by
[@&#8203;Joostb](https://togithub.com/Joostb) in
[laravel/framework#49272
- \[10.x] Enable DynamoDB as a backend for Job Batches by
[@&#8203;khepin](https://togithub.com/khepin) in
[laravel/framework#49169
- \[10.x] Removed deprecated and not used argument by
[@&#8203;Muetze42](https://togithub.com/Muetze42) in
[laravel/framework#49304
- \[10.x] Add Conditionable to Batched and Chained jobs by
[@&#8203;bretto36](https://togithub.com/bretto36) in
[laravel/framework#49310
- \[10.x] Include partitioned tables on PostgreSQL when retrieving
tables by [@&#8203;hafezdivandari](https://togithub.com/hafezdivandari)
in
[laravel/framework#49326
- \[10.x] Allow to pass `Arrayable` or `Stringble` in rules `In` and
`NotIn` by
[@&#8203;michaelnabil230](https://togithub.com/michaelnabil230) in
[laravel/framework#49055
- \[10.x] Display error message if json_encode() fails by
[@&#8203;aimeos](https://togithub.com/aimeos) in
[laravel/framework#48856
- \[10.x] Allow error list per field by
[@&#8203;timacdonald](https://togithub.com/timacdonald) in
[laravel/framework#49309
- \[10.x] Get foreign keys of a table by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49264
- \[10.x] PHPStan Improvements by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49343
- \[10.x] Handle missing translations: more robust handling of callback
return value by [@&#8203;DeanWunder](https://togithub.com/DeanWunder) in
[laravel/framework#49341

###
[`v10.36.0`](https://togithub.com/laravel/framework/compare/v10.35.0...v10.36.0)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.35.0...v10.36.0)

###
[`v10.35.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10350---2023-12-05)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.34.2...v10.35.0)

- \[10.x] Add `Conditionable` trait to `AssertableJson` by
[@&#8203;khalilst](https://togithub.com/khalilst) in
[laravel/framework#49172
- \[10.x] Add `--with-secret` option to Artisan `down` command. by
[@&#8203;jj15asmr](https://togithub.com/jj15asmr) in
[laravel/framework#49171
- \[10.x] Add support for `Number::summarize` by
[@&#8203;jcsoriano](https://togithub.com/jcsoriano) in
[laravel/framework#49197
- \[10.x] Add Blade [@&#8203;use](https://togithub.com/use) directive by
[@&#8203;simonhamp](https://togithub.com/simonhamp) in
[laravel/framework#49179
- \[10.x] Fixes retrying failed jobs causes PHP memory exhaustion errors
when dealing with thousands of failed jobs by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49186
- \[10.x] Add "substituteImplicitBindingsUsing" method to router by
[@&#8203;calebporzio](https://togithub.com/calebporzio) in
[laravel/framework#49200
- \[10.x] Cookies Having Independent Partitioned State (CHIPS) by
[@&#8203;fabricecw](https://togithub.com/fabricecw) in
[laravel/framework#48745
- \[10.x] Update InteractsWithDictionary.php to use base
InvalidArgumentException by [@&#8203;Grldk](https://togithub.com/Grldk)
in
[laravel/framework#49209
- \[10.x] Fix docblock for wasRecentlyCreated by
[@&#8203;stancl](https://togithub.com/stancl) in
[laravel/framework#49208
- \[10.x] Fix loss of attributes after calling child component by
[@&#8203;rojtjo](https://togithub.com/rojtjo) in
[laravel/framework#49216
- \[10.x] Fix typo in PHPDoc comment by
[@&#8203;caendesilva](https://togithub.com/caendesilva) in
[laravel/framework#49234
- \[10.x] Determine if the given view exists. by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49231

###
[`v10.34.2`](https://togithub.com/laravel/framework/compare/v10.34.1...v10.34.2)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.34.1...v10.34.2)

###
[`v10.34.1`](https://togithub.com/laravel/framework/compare/v10.34.0...v10.34.1)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.34.0...v10.34.1)

###
[`v10.34.0`](https://togithub.com/laravel/framework/blob/HEAD/CHANGELOG.md#v10340---2023-11-28)

[Compare
Source](https://togithub.com/laravel/framework/compare/v10.33.0...v10.34.0)

- \[10.x] Fix `hex_color` validation rule by
[@&#8203;apih](https://togithub.com/apih) in
[laravel/framework#49070
- \[10.x] Prevent passing null to base64\_decode in Encrypter by
[@&#8203;robtesch](https://togithub.com/robtesch) in
[laravel/framework#49071
- \[10.x] Alias Number class by
[@&#8203;ziadoz](https://togithub.com/ziadoz) in
[laravel/framework#49073
- \[10.x] Added File Validation `extensions` by
[@&#8203;eusonlito](https://togithub.com/eusonlito) in
[laravel/framework#49082
- \[10.x] Add [@&#8203;throws](https://togithub.com/throws) in
doc-blocks by
[@&#8203;imanghafoori1](https://togithub.com/imanghafoori1) in
[laravel/framework#49091
- \[10.x] Update docblocks for consistency by
[@&#8203;dwightwatson](https://togithub.com/dwightwatson) in
[laravel/framework#49092
- \[10.x] Throw exception when trying to initiate `Collection` using
`WeakMap` by [@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49095
- \[10.x] Only stage committed transactions by
[@&#8203;hansnn](https://togithub.com/hansnn) in
[laravel/framework#49093
- Better transaction manager object design by
[@&#8203;taylorotwell](https://togithub.com/taylorotwell) in
[laravel/framework#49103
- \[10.x] use php 8.3 `mb_str_pad()` for `Str::pad*` by
[@&#8203;amacado](https://togithub.com/amacado) in
[laravel/framework#49108
- \[10.x] Add Conditionable to TestResponse by
[@&#8203;nshiro](https://togithub.com/nshiro) in
[laravel/framework#49112
- \[10.x] Allow multiple types in Collection's `ensure` method by
[@&#8203;ash-jc-allen](https://togithub.com/ash-jc-allen) in
[laravel/framework#49127
- \[10.x] Fix middleware "SetCacheHeaders" with download responses by
[@&#8203;clementbirkle](https://togithub.com/clementbirkle) in
[laravel/framework#49138
- \[10.x]\[Cache] Fix handling of `false` values in apc by
[@&#8203;simivar](https://togithub.com/simivar) in
[laravel/framework#49145
- \[10.x] Reset numeric rules after each attribute's validation by
[@&#8203;apih](https://togithub.com/apih) in
[laravel/framework#49142
- \[10.x] Extract dirty getter for `performUpdate` by
[@&#8203;taka-oyama](https://togithub.com/taka-oyama) in
[laravel/framework#49141
- \[10.x] `ensure`: Resolve `$itemType` outside the closure by
[@&#8203;lucasmichot](https://togithub.com/lucasmichot) in
[laravel/framework#49137
- Allow "missing" method to be used on route groups by
[@&#8203;redelschaap](https://togithub.com/redelschaap) in
[laravel/framework#49144
- \[10.x] Get tables and views info by
[@&#8203;hafezdivandari](https://togithub.com/hafezdivandari) in
[laravel/framework#49020
- \[10.x] Fix `MorphTo::associate()` PHPDoc parameter by
[@&#8203;devfrey](https://togithub.com/devfrey) in
[laravel/framework#49162
- \[10.x] Make test error messages more multi-byte readable by
[@&#8203;nshiro](https://togithub.com/nshiro) in
[laravel/framework#49160
- \[10.x] Generate a unique hash for anonymous components by
[@&#8203;billyonecan](https://togithub.com/billyonecan) in
[laravel/framework#49156
- \[10.x] Improves output when using `php artisan about --json` by
[@&#8203;crynobone](https://togithub.com/crynobone) in
[laravel/framework#49154
- \[10.x] Make fake instance inherit from `Vite` when using
`withoutVite()` by
[@&#8203;orkhanahmadov](https://togithub.com/orkhanahmadov) in
[laravel/framework#49150

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/RadioRoster/backend).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy45My4xIiwidXBkYXRlZEluVmVyIjoiMzcuMTUzLjIiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants