timacdonald
Repos
30
Followers
437

A drop in fake logger for testing with the Laravel framework.

359
24

A trait that allows you to pass arguments to Laravel middleware in a more PHP'ish way.

184
9

A JSON:API Resource for Laravel

213
16

A PHP testing utility that allows you to fake, capture, and assert against invocations of a callable / Closure

41
2

My dotfiles. Mine, not yours. But you're welcome to borrow them anytime.

13
2

Events

issue comment
[9.x] Handle precognition requests by default

@habibalkhabbaz I've already addressed the issue you raised: https://github.com/laravel/framework/pull/44424

Created at 16 hours ago
issue comment
[9.x] Handle precognition requests by default

In principle I'm okay with this being applied by default, however some things we should consider:

  • This does leak implementation on all routes, even when the feature is not used i.e. someone could look at response headers and see the Vary header contains Precognition and they now know this is a Laravel application powered backend.
  • It opens the application to be able to get into weird states that might not be expected.

Take this convoluted scenario:

class MyMiddleware
{
    public function handle($request, $response)
    {
    }
}
Created at 16 hours ago
pull request opened
[9.x] Fix Precognition headers for Symfony responses

The $response->header() function is only available on Laravel responses. This PR fixes usage with Symfony responses, such as BinaryFileResponse.

Created at 16 hours ago

support symfony reponse for precognition header

Created at 16 hours ago
create branch
timacdonald create branch precognition-headers
Created at 16 hours ago
issue comment
Vite watches the `vendor` folder

Hi @stebogit,

I'm unable to reproduce this with a fresh Laravel installation. I can only get Vite to watch the vendor directory if I explicitly configure it to watch it.

Can you create a reproduction repository for this and we can re-open the issue?

laravel new bug-report --github="--public"
Created at 17 hours ago
closed issue
Vite watches the `vendor` folder
  • Laravel Vite Plugin Version: 0.6.1
  • Laravel Version: 9.31.0
  • Node Version: 16.17.1
  • NPM Version: 8.15.0
  • Host operating system: Linux (Homestead, Ubuntu 18.04.5 LTS)
  • Web Browser & Version: -
  • Running in Sail / Docker: No

Description:

Just installed Breeze (php artisan breeze:install) and tried to serve the assets (npm run dev) and I got this error, suggesting vite is watching the vendor folder (which I assume should be ignored, by default):

Screen Shot 2022-09-30 at 2 56 43 PM

The command npm run build works fine anyway.

Steps To Reproduce:

This is my config, I tried to even defining a more restrictive refresh path:

export default defineConfig({
    plugins: [
        laravel({
            input: [
                'resources/css/app.css',
                'resources/js/app.js',
            ],
            // none of these work
            // refresh: true,
            // refresh: false,
            refresh: [
                'resources/**',
            ],
        }),
    ],
});

Created at 17 hours ago
issue comment
[9.x] Add Model::withoutTimestamps(...)

See @dennisprudlo suggestion above, and also see the previous PR where the method was not static for future discussion: https://github.com/laravel/framework/pull/44005

Created at 17 hours ago
issue comment
[9.x] Introduce Laravel Precognition

Documentation: https://github.com/laravel/docs/pull/8261

Created at 4 days ago
pull request opened
[9.x] Precognition

wip

Created at 4 days ago
create branch
timacdonald create branch precognition
Created at 4 days ago
issue comment
[9.x] Share WithoutOverlapping key across jobs

No troubles! Glad to hear it will be useful :)

Created at 5 days ago