nunomaduro
Repos
219
Followers
4573
Following
4

Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation for your next big idea — freeing you to create without sweating the small things.

71104
22223

Pest is an elegant PHP Testing Framework with a focus on simplicity

5467
172

🔰 Instant PHP quality checks from your console

4740
244

💥 Collision is a beautiful error reporting tool for command-line applications

4121
120

⚗️ Adds code analysis to Laravel improving developer productivity and code quality.

4224
295

A PHP framework for console artisans

3124
166

Events

issue comment
[1.x] Ignore `Response::create` failed

@taylorotwell This looks good to me.

Created at 1 hour ago
issue comment
[1.x] Ignore `Response::create` failed

@sy-records Can you tell me how exactly reproduce this issue locally?

Created at 4 hours ago
issue comment
Generalizes the output result

@taylorotwell will give his opinion, yet, I think we already format things on the dd method. So, we could leave the measure method returning an float so it can be used for more complex use cases.

Created at 5 hours ago

Adds most common edtor's href format

Created at 5 hours ago
issue comment
[0.x] Adds `Moderations::create` typed response

@gehrisandro Left a few comments on the way I would probably tackled this.

Created at 2 days ago

Uses name instead of href

Created at 2 days ago

Fixes tests

Created at 2 days ago

Adds missing class

Merge branch 'feat/better-dd-editor-support' of github.com:laravel/framework into feat/better-dd-editor-support

Created at 2 days ago
issue comment
[9.x] Adds source file to `dd` function output 💅🏻

@decadence @Pinnokkio What operating system are you using?

Created at 2 days ago
closed issue
Memory leak using Eloquent's dynamic properties with a relationship that have `using` method.
  • Octane Version: 1.3.2
  • Laravel Version: 9.32.0
  • PHP Version: 8.1.11
  • Server & Version: Swoole 4.8.10
  • Database Driver & Version: MySQL 8.0

Description:

https://github.com/L3o-pold/laravel-bug-report / https://github.com/L3o-pold/laravel-bug-report/commits/main

Memory leak using Eloquent's dynamic properties with a relationship that have using method.

class User extends Authenticatable
{
    public function teams(): BelongsToMany
    {
        return $this->belongsToMany(Team::class)->using(TeamUser::class);
    }
}

Route::get('/', function () {
    $user = User::firstOrFail();

    return response()->json([
        'user'  => $user,
        'teams' => $user->teams,
    ]);
});

Steps To Reproduce:

composer i
./vendor/bin/sail build --no-cache
./vendor/bin/sail up -d --remove-orphans
./vendor/bin/sail artisan migrate
./vendor/bin/sail artisan db:seed 

In a terminal start querying your app

while [ true ];
do
    curl http://localhost/
    echo ""
done;

In an other terminal check the logs of the Laravel container

docker logs -f ...

  200    GET / ............................................... 22.77 mb 4.72 ms
  200    GET / ............................................... 22.78 mb 4.28 ms
  200    GET / ............................................... 22.79 mb 4.43 ms
  200    GET / ............................................. 22.80 mb 648.16 ms
  200    GET / ............................................... 22.81 mb 4.40 ms
  200    GET / ............................................... 22.82 mb 4.73 ms
  200    GET / ............................................... 22.83 mb 4.25 ms

You will see that the memory is increasing. Without the ->using(TeamUser::class) in the User model their is no memory leak.

Created at 2 days ago
issue comment
Memory leak using Eloquent's dynamic properties with a relationship that have `using` method.

@L3o-pold Can you fire thousands of requests, to see if there is indeed a memory leak? Having the memory spiking a few megabytes is not necessary a memory leak, but a peak of PHP's memory usage that will be collected once the garbage collector gets used.

You may use the wrk tool for firing thousands of requests (wrk -t100 -c100 -d60 http://127.0.0.1:8000). Please re-open the issue if there is indeed a memory leak.

Created at 2 days ago
issue comment
[9.x] Update dd function when running on virtualized dev environments

@jevouslue Do you mind of try to use the branch https://github.com/laravel/framework/pull/44406 locally, and let me know if it works for you in both the terminal and browser please.

Created at 2 days ago
issue comment
[9.x] Defineable editor href in dd

@sirmathays Do you mind of try to use the branch https://github.com/laravel/framework/pull/44406 locally, and let me know if it works for you in both the terminal and browser please.

Created at 2 days ago
pull request opened
[9.x] Adds support for `base_path` and custom `href` on `dd` source output

This pull request addresses both https://github.com/laravel/framework/pull/44378, and https://github.com/laravel/framework/pull/44360, and allows to provide the app.editor base path and, if necessary, a custom href format.

  1. So, by default, people just define their normal editor. This format is the most common, and works for the vast majority of use cases:
// config/app.php
'editor' => 'phpstorm',
// generates an url like: phpstorm://open?file=/my-work-directory/laravel/routes/web.php&line=17
  1. Yet, if people are using a operating system/terminal, that works differently (WSL2 or other), they may specify the href format:
// config/app.php
'editor' => 'vscode://vscode-remote/wsl+Ubuntu-20.04{file}:{line}',
// generates an url like: vscode://vscode-remote/wsl+Ubuntu-20.04/my-work-directory/laravel/routes/web.php:17
  1. Now, if people are using docker ( or similar ), they may need to define their project's base_path, and they can do it using:
// config/app.php
'editor' => [
    'href' => 'phpstorm',
    'base_path' => '/my-pc-directory/laravel',
]
// generates an url like: phpstorm://open?file=/my-pc-directory/laravel/routes/web.php&line=17
  1. Finally, they may also specify the href format + the base_path like so:
// config/app.php
'editor' => [
    'href' => 'vscode://vscode-remote/wsl+Ubuntu-20.04{file}:{line}',
    'base_path' => '/my-pc-directory/laravel',
]
// generates an url like: vscode://vscode-remote/wsl+Ubuntu-20.04/my-pc-directory/laravel/routes/web.php:17
Created at 2 days ago
create branch
nunomaduro create branch feat/better-dd-editor-support
Created at 2 days ago
Created at 2 days ago
issue comment
[9.x] Adds source file to `dd` function output 💅🏻

I've just used that composer.lock in a fresh Laravel, and it's working for me as expected.

Created at 3 days ago
issue comment
[9.x] Adds source file to `dd` function output 💅🏻

Can you share your "composer.lock" file?

Created at 3 days ago

Updates framework versions

Created at 3 days ago

Adds memory leak tests

Created at 3 days ago
issue comment
POC: strong typed requests and responses

@gehrisandro It's possible to focus this pull request in only on typed responses, and on a single resource method?

Created at 3 days ago