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] Siesta #46904

Merged
merged 25 commits into from
May 3, 2023
Merged

[10.x] Siesta #46904

merged 25 commits into from
May 3, 2023

Conversation

timacdonald
Copy link
Member

@timacdonald timacdonald commented Apr 28, 2023

This PR proposes a new utility class that wraps up the native sleep and usleep PHP functions into a "fakeable" and testable class.

The motivation behind this PR is to improve testing of sleeping and while also removing the duration of the sleep from the test itself while maintaining confidence in the test.

Often when an application interacts with a 3rd party library it will need to retry interactions after pausing execution.

An example of this may be a HTTP endpoint. The API may be down for a brief moment. Instead of failing, the application may use a "retry":

Http::retry(3, 500)->post(/* ... */);

When attempting to test the failure / retry logic, a test would take a minimum of 1.5 seconds.

More generally, when using the retry helper, this is also a (minor) annoyance.

return retry(5, function () {
    // Attempt 5 times while resting 100ms between attempts...
}, 100);

To address this, we now use the Siesta helper in a few places throughout the Framework. The helper may the be "faked" in tests and some basic assertions may also be made.

API

Fluent API

// minutes...

Siesta::for(3)->minutes();

Siesta::for(1)->minute();

// seconds...

Siesta::for(3)->seconds();

Siesta::for(1)->second();

// milliseconds...

Siesta::for(30000)->milliseconds();

Siesta::for(1)->millisecond();

// microseconds...

Siesta::for(30000)->microseconds();

Siesta::for(1)->microsecond();

Composed durations

Siesta::for(3)->minutes()
      ->and(5)->seconds()
      ->and(9)->milliseconds();

Siesta until a given time

Siesta::until(now()->addMinute());

1:1 replacement API

// usleep(30000);

Siesta::usleep(30000);

// sleep(2);

Siesta::sleep(2);

// time_sleep_until(1682641623)

Siesta::until(1682641623);

Testing

As mentioned, the motivation here is to improve testing. If an application simply wants tests to not "sleep", then the following could be added to any test that uses Siesta:

protected function setUp(): void
{
    parent::setUp();

    Siesta::fake();
}

It is also possible to make assertions:

public function testItSendsWebhookSuccessfluly()
{
    Siesta::fake();
    Http::fake(['https://laravel.com' => Http::response('', 200)]);

    Webhook::send('https://laravel.com');

    Siesta::assertInsomniac(); // too much?! 😅
}

public function testItRetriesWithBackoffForFailedWebhooks()
{
    $attempts = 0;
    Siesta::fake();
    Http::fake(['https://laravel.com' => function () use (&$attempts) {
        $attempts++;

        return $attempts++ === 3
            ? Http::response('', 200)
            : Http::response('', 500);
    }]);


    Webhook::send('https://laravel.com');

    $this->assertSame(3, $attempts);
    Siesta::assertSleptTimes(3);
    Siesta::assertSequence([
        Siesta::for(100)->milliseconds(),
        Siesta::for(200)->milliseconds(),
        Siesta::for(300)->milliseconds(),
    ]);
}

// Full API

Siesta::assertSlept(fn (CarbonInterval $duration): bool => /* ... */);

Siesta::assertSlept(fn (CarbonInterval $duration): bool => /* ... */, $times = 5);

// asserts the number of times Siesta was used...
Siesta::assertSleptTimes(5);

// asserts that even if Siesta was used that zero time was spent sleeping...
Siesta::assertInsomniac();

Now any call to sleep via Siesta will not actually pause execution throughout the testsuite.

Naming alternatives

If the framework doesn't jive with "Siesta":

  • Sleep
  • Pause
  • Rest
  • Something else?

…but lowkey “Siesta” is the best option 🙉

Use of Siesta within the Framework

I feel that the places I've used Siesta throughout the framework make sense. If we feel any of them don't make sense, I'm happy to remove any.

📌 Notes

The native time_sleep_until function will throw an error if the time has already passed; we just do not sleep. When testing, you would need to assert that it slept for zero seconds.


The native sleep function will cast a float to an int. Our implementation does not do this:

sleep(1.5); // only sleeps for 1 second

Siesta::for(1.5)->seconds(); // sleeps for 1 second and 500 milliseconds

Siesta::sleep(1.5); // sleeps for 1 second and 500 milliseconds

The native usleep function may not support values larger than 1000000. Our implementation fixes this by using a combination of sleep and usleep.


Although PHP does have the ability to sleep for nanoseconds, via the native time_nanosleep function, I didn't feel the need to add an affordance to this.

An implementation would be possible, however I'm not sure it is worth it. If you need something that fine-grained, even our PHP code in-between things is probably going to be problematic.


Warning: Time is hard. We do execute some PHP between sleeps, so this will never be perfect, although computers also aren't great at time, so it is already unreliable to some degree. YOLO.

@thefelipevega
Copy link

Thoughts on Rest for the name?

@LasseRafn
Copy link
Contributor

I think there is a typo in the last example regarding float and rounding, it says that Siesta sleeps for 90 seconds when passing 1.5? 👀 or am I misunderstanding something. But I’m loving this idea!

sleep(1.5); // only sleeps for 1 second

Siesta::for(1.5)->seconds(); // sleeps for 90 seconds

Siesta::sleep(1.5); // sleeps for 90 seconds

@timacdonald
Copy link
Member Author

@LasseRafn corrected. thank you! Time is hard. Math is hard. Math + Time = 🫠

@axlon
Copy link
Contributor

axlon commented Apr 28, 2023

Would personally prefer a name like Sleep, Wait or Rest. Otherwise love this!

@timacdonald timacdonald marked this pull request as ready for review April 28, 2023 05:32
@antonkomarev
Copy link
Contributor

Rest might add confusion because of the REST.

@fourstacks
Copy link

Love it! Would humbly submit Snooze as a name. Does what it says on the tin and sounds slightly weirder every time you say it

@timacdonald
Copy link
Member Author

@fourstacks I actually used Snooze when I first conceptualised this - but realised it conflicted with https://github.com/thomasjohnkane/snooze

@Sammyjo20
Copy link
Contributor

I absolutely love this 😆 I have a few tests for my own that last 5-10 seconds because of a sleep, would be cool to fake it!

@Sammyjo20
Copy link
Contributor

I also agree with @fourstacks I do like Snooze too 🤔

Or even being boring and having Sleep::until() as to not confuse devs too much

@dsazup
Copy link
Contributor

dsazup commented Apr 28, 2023

Done this a few times by just creating sleep method and using $this->sleep(5) and mocking that in tests. So really love this idea. But would prefer Sleep::for(5) as the name (or Wait::for(5)). Siesta is a great name, but a bit too fancy imho. 😄

@timacdonald
Copy link
Member Author

timacdonald commented Apr 28, 2023

11th hour realisation which I can’t implement right now: we need…

Siesta::assertSlept(Siesta::for(1)->second());

that doesn’t care about order.

@@ -114,7 +115,7 @@ public function block($seconds, $callback = null)
$starting = $this->currentTime();

while (! $this->acquire()) {
usleep($this->sleepMilliseconds * 1000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of the complexity of the Siest class, I would rather not introduce it into the existing src code, as is very risky and it could potentially disrupt the current behavior, even if it appears otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think at a bare minimum we want it used in the retry helper. After that, in order of what I would want to optionally see:

  • Timebox
  • Cache stuff

src/Illuminate/Support/Siesta.php Outdated Show resolved Hide resolved
src/Illuminate/Support/Siesta.php Outdated Show resolved Hide resolved
src/Illuminate/Support/Siesta.php Outdated Show resolved Hide resolved
src/Illuminate/Support/Siesta.php Outdated Show resolved Hide resolved
src/Illuminate/Support/Siesta.php Outdated Show resolved Hide resolved
@buismaarten
Copy link
Contributor

I actually like Sleep::for(1)->second() more than Siesta::for(1)->second().

timacdonald and others added 2 commits April 29, 2023 06:41
Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>
Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>
@timacdonald timacdonald marked this pull request as draft April 28, 2023 22:38
@timacdonald
Copy link
Member Author

Draft as there are some final tweaks I wanna make.

@bert-w
Copy link
Contributor

bert-w commented Apr 29, 2023

I prefer just a regular Sleep as the class name, that makes the most sense to me. Also a rename for assertInsomniac would be fitting.

I don't think I'll ever need this class myself though since I can't think of many practical usecases where I need complex sleep behaviour like in this Siesta class. But for internal/testing usecases it might be handy.

@innocenzi
Copy link
Contributor

I don't think I'll ever need this class myself though since I can't think of many practical usecases where I need complex sleep behaviour like in this Siesta class. But for internal/testing usecases it might be handy.

Definitely has potential use cases for third-party integrations and retry. Specifically, the ability to remove the sleep calls during testing would be great.

@Sammyjo20
Copy link
Contributor

Sammyjo20 commented Apr 30, 2023

@timacdonald There are quite a number of people who prefer “sleep” over “siesta”. Have you considered the name change? It’s a great name but I understand people’s feelings against it.

Edit: Perhaps a poll in the PR or maybe a Twitter poll?

@timacdonald
Copy link
Member Author

@Sammyjo20 naming considerations and alternatives are part of the description. I lowkey like "Siesta". If Taylor decides this feature is suitable for the framework and wants a name change, I'm happy to change it. No need for polls.

@timacdonald timacdonald marked this pull request as ready for review May 1, 2023 03:03
@henzeb
Copy link
Contributor

henzeb commented May 1, 2023

I'd suggest the assertSleptTimes to be assertTimesSlept. Otherwise, love it.

@timacdonald timacdonald marked this pull request as draft May 1, 2023 23:24
@timacdonald timacdonald marked this pull request as ready for review May 1, 2023 23:28
@timacdonald
Copy link
Member Author

If we are keen for this feature, but are not keen on the __destruct magic, I believe I can maintain the same API without leaning on destruction.

Won't implement it until we are sure we want the feature in the framework.

Comment on lines 245 to 255
if ($seconds > 0) {
sleep($seconds);

$remaining = $remaining->subSeconds($seconds);
}

$microseconds = (int) $remaining->totalMicroseconds;

if ($microseconds > 0) {
usleep($microseconds);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified imo. In one of my projects I have added a helper that combines sleep() and usleep() so i can do fractional sleep easily like so:

function my_sleep($microseconds)
    {
        if ($microseconds <= 0) {
            return;
        }
        if ($usleep = $microseconds % 1000000) {
            usleep($usleep);
        }

        if ($sleep = ($microseconds - $usleep) / 1000000) {
            sleep($sleep);
        }
    }

Then you can call that method (maybe even expose it as public/static since it is very handy) and be done with it. The CarbonInterval $duration property in your class is probably too complex since you can just use a microseconds integer instead. We are mostly talking about times in that neighborhood anyway (maybe up to a few seconds).

@NickSdot
Copy link
Contributor

NickSdot commented May 2, 2023

Copying this over from Twitter. My bad for not keeping it in the PR.🙏

Context:
#46904 (review)

https://twitter.com/timacdonald87/status/1653151918863302656?s=46&t=zY_3ch9pBvnnjyXjsgTbnQ

I see where you are coming from, @timacdonald

I still believe it’s possible to use it wrong.

Actually, imho, there should/must be some enforcement of calling minutes() or whatever else calls pullPending() before the method and() can be chained again.

Let’s say I do something ‚weird‘ like:

$siesta = Siesta::for(2)->minutes();

if($bigWhateverAmountHereOne) {
 // and(2)
}

if($bigWhateverAmountHereTwo) {
 // and(5)
}

$siesta->minutes()

Theoretically, because both if(//) can be true, I can mess it up. And I believe this shouldn’t be possible.

There should be a check in and() that there is no pending values, and otherwise throw an error.

Disclaimer: on my phone and not able to actually playing around with it. So it’s all theoretical. 🙏

Appreciate your work, Tim! ❤️

@Angel5a
Copy link
Contributor

Angel5a commented May 2, 2023

@NickSdot, I think, there is no need on exceptions. Just add every add() to accumulator should be ok. Siesta class (or Sleep if smb wish), shouldn't be responsible on watching for errors in your code.

@NickSdot
Copy link
Contributor

NickSdot commented May 3, 2023

@NickSdot, I think, there is no need on exceptions. Just add every add() to accumulator should be ok.

@Angel5a at first I was thinking that too, as my initial note on it shows. But it allows to accumulate time without defining which unit the time has.

Siesta class (or Sleep if smb wish), shouldn't be responsible on watching for errors in your code.

Whether or not the class should be responsible to allow or disallow me to write wrong code is a good question -- I tend to the latter, but also understand why you see it different. Tim and team will have their take on it, I guess.

@taylorotwell
Copy link
Member

Renamed to Sleep. Added assertNeverSlept as alias for assertInsomniac (but kept insomniac method since it's a nice Easter egg). 🥚

@taylorotwell taylorotwell merged commit c164078 into laravel:10.x May 3, 2023
@timacdonald timacdonald deleted the siesta branch May 3, 2023 23:36
@timacdonald
Copy link
Member Author

Appreciate all the feedback from everyone ❤️. I hope the feature comes in handy.

Also: On the day of release I'll be all like...

use Illuminate\Support\Sleep as Siesta;

😎

bert-w added a commit to bert-w/framework that referenced this pull request May 5, 2023
commit 025c912
Author: Taylor Otwell <taylor@laravel.com>
Date:   Fri May 5 14:47:22 2023 -0500

    respect parents on middleware priority (laravel#46972)

commit 07a5e09
Author: Saya <379924+chu121su12@users.noreply.github.com>
Date:   Sat May 6 01:36:04 2023 +0800

    [10.x] Add url support for mail config (laravel#46964)

    * Add url support for mail config

    * ci fix

    * formatting

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 1e6b467
Author: Tim MacDonald <hello@timacdonald.me>
Date:   Sat May 6 03:00:49 2023 +1000

    wip (laravel#46963)

commit 1c783fe
Author: Günther Debrauwer <gunther@nextapps.be>
Date:   Thu May 4 17:27:41 2023 +0200

    [10.x] Add 'hashed' cast (laravel#46947)

    * Add 'hashed' cast

    * Fix linting issues

commit 51251d4
Author: taylorotwell <taylorotwell@users.noreply.github.com>
Date:   Thu May 4 14:54:58 2023 +0000

    Update facade docblocks

commit 82a8da7
Author: Anjorin Damilare <damilareanjorin1@gmail.com>
Date:   Thu May 4 15:54:23 2023 +0100

    [10.x] add expression to DB table doctype (laravel#46955)

commit 65f6426
Author: Wouter de Jong <wouterj@users.noreply.github.com>
Date:   Thu May 4 14:41:20 2023 +0200

    Fix typo in PHPdoc tag (laravel#46960)

commit c164078
Author: Tim MacDonald <hello@timacdonald.me>
Date:   Thu May 4 05:17:54 2023 +1000

    [10.x] Siesta (laravel#46904)

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * Update src/Illuminate/Support/Siesta.php

    Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>

    * Update src/Illuminate/Support/Siesta.php

    Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>

    * Update src/Illuminate/Support/Siesta.php

    Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * wip

    * formatting and rename to sleep

    ---------

    Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>
    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 6e8b883
Author: Volodya Kurshudyan <70023120+xurshudyan@users.noreply.github.com>
Date:   Wed May 3 22:19:29 2023 +0400

    Add sortRecursiveDesc() method (laravel#46945)

    Co-authored-by: Volodya Khurshudyan <volodya.khurshudyan@softconstruct.com>

commit d800f9e
Author: Abu Sayed Jobayer <aszubayr@gmail.com>
Date:   Wed May 3 19:51:21 2023 +0600

    Update doc block to make array notation more consist. (laravel#46942)

commit ba46acb
Author: Bert <bertwijnhoven@hotmail.com>
Date:   Tue May 2 23:24:37 2023 +0200

    [10.x] Expose `Js::json()` helper (laravel#46935)

    * change to static

    * Update Js.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 2aff286
Author: StyleCI Bot <bot@styleci.io>
Date:   Mon May 1 16:09:32 2023 +0000

    Apply fixes from StyleCI

commit f8dd01a
Author: Italo <DarkGhostHunter@Gmail.com>
Date:   Mon May 1 12:09:09 2023 -0400

    [10.x] Adds ability to restore/set Global Scopes (laravel#46922)

    * [10.x] Adds ability to restore/set Global Scopes

    * Update HasGlobalScopes.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit a2f35fa
Author: Günther Debrauwer <gunther@nextapps.be>
Date:   Mon May 1 18:07:12 2023 +0200

    [10.x] Use method on UploadedFile to validate image dimensions (laravel#46912)

    * imageSize method on uploadedfile

    * formatting

    * fix variable

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 8de1aa2
Author: Kieran <kieran@supportpal.com>
Date:   Mon May 1 17:05:23 2023 +0100

    [10.x] Mark commands as isolatable (laravel#46925)

    * Ability to set default for --isolated option

    * set default exit code

    * Update Command.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 812ef55
Author: Christian Rishøj <christian@rishoj.net>
Date:   Mon May 1 17:52:24 2023 +0200

    follow default PHP behavior and replace invalid codepoints (laravel#46914)

commit 96f0d0e
Author: Choraimy Kroonstuiver <3661474+axlon@users.noreply.github.com>
Date:   Mon May 1 17:41:14 2023 +0200

    Add missing typehint to cache repository contract (laravel#46929)

commit 89ac58a
Author: Taylor Otwell <taylor@laravel.com>
Date:   Thu Apr 27 10:29:15 2023 -0500

    fix replace missing_unless

commit 5f30445
Merge: 9cd734c f43355f
Author: Tetiana Blindaruk <t.blindaruk@gmail.com>
Date:   Tue Apr 25 20:33:53 2023 +0300

    Merge remote-tracking branch 'origin/10.x' into 10.x

    # Conflicts:
    #	CHANGELOG.md

commit 9cd734c
Author: Tetiana Blindaruk <t.blindaruk@gmail.com>
Date:   Tue Apr 25 20:33:29 2023 +0300

    [10.x] Update CHANGELOG.md

commit f43355f
Author: TBlindaruk <TBlindaruk@users.noreply.github.com>
Date:   Tue Apr 25 16:47:37 2023 +0000

    Update CHANGELOG

commit 3507812
Merge: e2a65b3 675ea86
Author: Taylor Otwell <taylor@laravel.com>
Date:   Tue Apr 25 08:47:18 2023 -0500

    fix conflicts

commit 675ea86
Author: Taylor Otwell <taylor@laravel.com>
Date:   Tue Apr 25 08:44:05 2023 -0500

    version

commit e2a65b3
Author: Bogdan Lotarev <bogdanlotar@gmail.com>
Date:   Tue Apr 25 15:40:49 2023 +0200

    [10.x] Use foreignUlid if model uses HasUlids trait when call foreignIdFor  (laravel#46876)

    * fix: use foreignUlid if model uses HasUlids

    * test: add assert for MySql

    * Update Blueprint.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit b5bef6b
Author: StyleCI Bot <bot@styleci.io>
Date:   Mon Apr 24 19:32:27 2023 +0000

    Apply fixes from StyleCI

commit 846d1a0
Author: Anjorin Damilare <damilareanjorin1@gmail.com>
Date:   Mon Apr 24 20:32:06 2023 +0100

    [10.x]: improve job release method to accept date instance (laravel#46854)

    * [10.x]: improve job release method to accept date instance

    * Update InteractsWithQueue.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 7136338
Author: Tim MacDonald <hello@timacdonald.me>
Date:   Tue Apr 25 05:16:49 2023 +1000

    [10.x] Named static methods for middleware (laravel#46362)

    * wip

    * Standardise of `using` for Authorization middleware

    * Update ValidateSignature.php

    * Update ThrottleRequests.php

    * Update ThrottleRequests.php

    * Update RequirePassword.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 2922575
Author: Nuno Maduro <enunomaduro@gmail.com>
Date:   Mon Apr 24 19:49:40 2023 +0100

    [10.x] Uses `@template-covariant` in collections (laravel#46872)

    * docs: update collection docs to use template-covariant for the values

    This allows developers to use classes with inheritance on collections. See types/Support/Collection.php for an example

    * Revert `@template-covariant` on Arrayable

    * Apply fixes from StyleCI

    ---------

    Co-authored-by: rvanvelzen <rvanvelzen@swis.nl>
    Co-authored-by: StyleCI Bot <bot@styleci.io>

commit 1793066
Author: Finn <71390226+FinnPaes@users.noreply.github.com>
Date:   Mon Apr 24 17:59:54 2023 +0200

    Fix implode docblock to accept callable as parameter (laravel#46869)

    Co-authored-by: Finn Paes <finn@justbetter.nl>

commit 89a5468
Author: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>
Date:   Mon Apr 24 09:43:14 2023 -0400

    [10.x] Throw LogicException when calling `FileFactory@image()` if mimetype is not supported (laravel#46859)

    * throw exception if FileFactory does not support mimetype

    * style

    * formatting

    * rely on $functionName

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 9cfd7e1
Author: Niclas <NiclasvanEyk@users.noreply.github.com>
Date:   Mon Apr 24 15:25:43 2023 +0200

    Pass through IGNITION_LOCAL_SITES_PATH environment variable when serving (laravel#46857)

    Enables correct link generation for opening files from the error page when running inside docker.

commit d199af3
Author: s4muel <s4muel@users.noreply.github.com>
Date:   Fri Apr 21 17:14:58 2023 +0200

    [10.x] update return type in docblock for Process pipe method (laravel#46848)

    * update return type in docblock for Process pipe method

    * update the Process.php docblock as well

    * Update Factory.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit 0c9b3e9
Author: Dries Vints <dries@vints.io>
Date:   Fri Apr 21 15:14:53 2023 +0200

    Make rules method in FormRequest optional (laravel#46846)

commit 3d28bdc
Author: James Hulse <jameshulse@users.noreply.github.com>
Date:   Thu Apr 20 18:37:59 2023 +0100

    [10.x] Allow pruning all cancelled and unfinished queue batches (laravel#46833)

    * Allow pruning all cancelled and unfinished batches

    * Apply fixes from StyleCI

commit 2b463dd
Author: Miran AL Mehrab <miranalmehrab@protonmail.com>
Date:   Thu Apr 20 22:29:37 2023 +0600

    Add new HTTP status assertions (laravel#46841)

    * Adds gone status check

    * Adds service unavailable status check

    * Adds internal server error status check

commit a3cfd2d
Author: Tsuguya Toma <tsuguya.toma@tgy.io>
Date:   Wed Apr 19 22:54:02 2023 +0900

    fix date_format rule throw ValueError (laravel#46824)

commit ed75852
Author: Rudie Dirkx <168024+rudiedirkx@users.noreply.github.com>
Date:   Tue Apr 18 21:06:23 2023 +0200

    Use pivot model fromDateTime instead of assuming Carbon (laravel#46822)

commit 6f575fc
Merge: 3259360 95ffddc
Author: Tetiana Blindaruk <t.blindaruk@gmail.com>
Date:   Tue Apr 18 21:54:43 2023 +0300

    Merge remote-tracking branch 'origin/10.x' into 10.x

commit 3259360
Author: Tetiana Blindaruk <t.blindaruk@gmail.com>
Date:   Tue Apr 18 21:54:23 2023 +0300

    [10.x] Update CHANGELOG.md

commit 95ffddc
Author: masoud derakhshi <59544612+mderakhshi@users.noreply.github.com>
Date:   Tue Apr 18 22:00:04 2023 +0330

    [10.x] whereMorphedTo null (laravel#46821)

    * Update QueriesRelationships.php

    * Update DatabaseEloquentBuilderTest.php

    * Update DatabaseEloquentBuilderTest.php

    * Update DatabaseEloquentBuilderTest.php

commit 7aab67d
Author: Gaitholabi <24876890+Gaitholabi@users.noreply.github.com>
Date:   Tue Apr 18 21:18:06 2023 +0300

    [10.x] Allow separate directory for locks on filestore (laravel#46811)

    * allow separate directory for locks on filestore

    * fix style

    * fix method signature

    * Update src/Illuminate/Cache/FileStore.php

    Co-authored-by: Dries Vints <dries@vints.be>

    * apply styleci

    * formatting

    ---------

    Co-authored-by: Dries Vints <dries@vints.be>
    Co-authored-by: Taylor Otwell <taylor@laravel.com>

commit e838b1d
Author: TBlindaruk <TBlindaruk@users.noreply.github.com>
Date:   Tue Apr 18 17:52:33 2023 +0000

    Update CHANGELOG

commit 9747b8c
Author: Tetiana Blindaruk <t.blindaruk@gmail.com>
Date:   Tue Apr 18 20:48:03 2023 +0300

    [9.x] Update CHANGELOG.md

commit 5d8416e
Merge: 317d7cc 16454f1
Author: Dries Vints <dries@vints.be>
Date:   Tue Apr 18 17:01:19 2023 +0200

    Merge branch '9.x' into 10.x

    # Conflicts:
    #	src/Illuminate/Foundation/Application.php

commit 317d7cc
Author: Taylor Otwell <taylor@laravel.com>
Date:   Tue Apr 18 08:45:33 2023 -0500

    version

commit 16454f1
Author: Taylor Otwell <taylor@laravel.com>
Date:   Tue Apr 18 08:44:55 2023 -0500

    version

commit 8ef7a8d
Merge: a56d748 2a6713f
Author: Taylor Otwell <taylor@laravel.com>
Date:   Tue Apr 18 08:44:34 2023 -0500

    Merge branch '9.x' into 10.x

commit 2a6713f
Author: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>
Date:   Tue Apr 18 09:42:14 2023 -0400

    [9.x] Release lock for job implementing `ShouldBeUnique` that is dispatched `afterResponse()` (laravel#46806)

    * failing test

    * rely on PendingDispatch@afterResponse so that ShouldBeUnique is checked

    * modifications to failing test

    * move lock/middleware handling to CallQueuedHandler@handle()

    * use CallQueuedHandler@handle if job employs InteractsWithQueue

    * style

    * revert changes to CallQueuedHandler & PendingDispatch

    * switch Bus\Dispatcher@dispatchAfterResponse to rely on Dispatcher@dispatchSync()

    * add `dispatchAfterResponse` test

commit a56d748
Author: Mohd Hafizuddin M Marzuki <hafizuddin_83@yahoo.com>
Date:   Tue Apr 18 01:41:32 2023 +0800

    Fix `validateDecimal()` (laravel#46809)

commit 88c28e2
Author: Anjorin Damilare <damilareanjorin1@gmail.com>
Date:   Mon Apr 17 17:13:04 2023 +0100

    [10.x]: add max exceptions to broadcast event (laravel#46800)

commit 17ad285
Author: kazunari.ueeda <34956483+UserKazun@users.noreply.github.com>
Date:   Tue Apr 18 01:01:53 2023 +0900

    Fix return value to int or null. (laravel#46802)

commit 997218b
Author: Luke Kuzmish <42181698+cosmastech@users.noreply.github.com>
Date:   Sun Apr 16 09:35:36 2023 -0400

    fixes test timestamp properties (laravel#46795)

commit 3e5a6b3
Author: teamradhq <14055161+teamradhq@users.noreply.github.com>
Date:   Sun Apr 16 07:55:40 2023 +1000

    Fix deprecated class in request.stub (laravel#46787)

    * Replace deprecated Illuminate\Contracts\Validation\Rule with
      ValidationRule.`

commit 0720d08
Author: Taylor Otwell <taylor@laravel.com>
Date:   Sat Apr 15 16:53:23 2023 -0500

    [10.x] Minor skeleton slimming (framework edition) (laravel#46786)

    * allow web and api named args on routes method

    * add app skeleton broadcast provider in core

    * add default provider collection

    * remove base broadcast service provider

    * Apply fixes from StyleCI

    * revert route provider change

    ---------

    Co-authored-by: StyleCI Bot <bot@styleci.io>

commit d95f865
Author: Sobhan <44964722+sobhan-m94@users.noreply.github.com>
Date:   Fri Apr 14 17:31:33 2023 +0330

    Add headers (laravel#46780)

    * add headers

    * Update Application.php

    ---------

    Co-authored-by: Taylor Otwell <taylor@laravel.com>
milwad-dev pushed a commit to milwad-dev/framework that referenced this pull request May 12, 2023
* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* Update src/Illuminate/Support/Siesta.php

Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>

* Update src/Illuminate/Support/Siesta.php

Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>

* Update src/Illuminate/Support/Siesta.php

Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* formatting and rename to sleep

---------

Co-authored-by: Nuno Maduro <enunomaduro@gmail.com>
Co-authored-by: Taylor Otwell <taylor@laravel.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.