Found 15 issues

First time here? 👋

Welcome to Find a PR.

Find a PR is an open-source site that is built to help developers find projects so that they can submit their very first pull request.

If you're a contributor looking to find a project to contribute to, feel free to browse through the list below.

If you're a maintainer looking to list your project on Find a PR, you can read how to do this in the documentation.

help wanted

NotOrm Package

The goal is to make abstract code based on the package notorm to build a new orm system

View more
ambroisehdn

ambroisehdn

15th Jun 2022 @ 12:34

enhancement help wanted

When deleting a post I'd like to add an optional message that's emailed to the user. For example, the below post was made in a non-english language while we only allow English as our main language. Ideally we can inform them why their thread was removed.

By default, a message can be pre-filled that says the post was in violation of our forum rules (with a link to the rules).

https://laravel.io/forum/buenas-tarde-me-podrian-ayudar-con-una-relacion-de-3-tablas

View more
driesvints

driesvints

12th Oct 2021 @ 07:40

help wanted hacktoberfest good first issue documentation

We are logging activity of several models, some using SoftDeletes trait and others not.

When we set config option 'subject_returns_soft_deleted_models' => true then calling subject() on any model not using SoftDeletes trait throws an exception: Call to undefined method Illuminate\Database\Eloquent\Builder::withTrashed().

Can the subject() method below be made to check first whether the Model uses the SoftDeletes trait? Or perhaps check whether withTrashed() is a defined method on the Model? I tried a few things but couldn't figure out how to get the class of the Model..

https://github.com/spatie/laravel-activitylog/blob/68eb6e65382f94fe86ce5ff6572159f80d024ba9/src/Models/Activity.php#L28-L35

View more
25 comments
bluec

bluec

7th Nov 2018 @ 13:44

help wanted

The current @php-flasher logo was created with a logo generator.

I would like to change the logo with a more meaningful one.

Contributions are welcome and will be fully credited.

View more
1 comment
yoeunes

yoeunes

15th Jun 2022 @ 16:18

enhancement help wanted

Filter out any duplicates with:

SELECT
    github_username,
    COUNT(github_username)
FROM
    users
GROUP BY
    github_username
HAVING
    COUNT(github_username) > 1;

SELECT
    *
FROM
    users
WHERE
    github_username = 'duplicate';

These can actually be synced from their GitHub ID. We should run a queued job that goes over all accounts and syncs them. Maybe also a scheduled job or a GitHub webhook.

View more
4 comments
driesvints

driesvints

31st Jul 2021 @ 18:43

enhancement help wanted

Users should have the ability to mark threads as spam. This should notify the moderators by email with a link to the thread.

View more
1 comment 👍 1
joedixon

joedixon

2nd Apr 2020 @ 19:42

bug help wanted good first issue

media-library:regenerate doesn't seem to respect --starting-from-id

If I run artisan media-library:regenerate "App\Models\ApplicantDocument" --starting-from-id=1070 for example

It starts at ID 1 (showing 6 because I wasn't fast enough to take a screenshot).

image

The PHP gets killed at ID 1070 by something on the server, so I should be able to restart from where it was killed with --starting-from-id=1070 however it always seems to restart from 1.

View more
4 comments 😄 1
kb6673

kb6673

10th Jun 2022 @ 19:21

help wanted

Now that the site has support for being used on a mobile, I think it'd be really cool to take it a step further and add PWA functionality.

This could allow users to add the site as a PWA to their phones and PCs so that they can quickly jump in and check for open issues.

Of course, this isn't going to serve a huge amount of purpose, but could be a pretty good chance to experiment with some cool features.

View more
ash-jc-allen

ash-jc-allen

27th Jun 2022 @ 20:38

enhancement help wanted

We should allow our users to prevent abuse by blocking other users. This will allow them to not receive mentions from these users anymore. People can still mention others but they won't receive replies from them any longer.

People should be able to maintain a list of blocked users through their settings.

Depends on https://github.com/laravelio/laravel.io/issues/271

View more
2 comments
driesvints

driesvints

12th Oct 2021 @ 08:09

help wanted Next major version

We use DTOs mainly for turning form post/database/queue/etc data to a know/validated object that can be used in the rest of the code (basically decode some json/array and make a DTO from it).

This means, when a DTO is instantiated with invalid data, we want to know all invalid fields, not just the first one.

This only works on one level, validation stops at the first invalid DTO. Instead it should probably try to validate the entire structure, and throw an exception with all the properties that are wrong, instead of the first. Where the children paths could be $parent->child->collection['index']->foo->bar: error message

Example:

class Foo extends DataTransferObject
{

    #[NumberBetween(1, 100)]
    public int $a;
    #[NumberBetween(1, 100)]
    public int $b;

}

$a = new Foo(['a' => 150, 'b' => 150]);

Got what was expected

PHP Fatal error:  Uncaught Spatie\DataTransferObject\Exceptions\ValidationException: Validation errors:
         - `Foo->a`: Value should be less than or equal to 100
         - `Foo->b`: Value should be less than or equal to 100
class Baz extends DataTransferObject
{
    public Foo $f1;
    public Foo $f2;
}

$b = new Baz(
    [
        'f1' => ['a' => 150, 'b' => 150],
        'f2' => ['a' => 150, 'b' => 150],
    ]
);

Expected something along these lines.

PHP Fatal error:  Uncaught Spatie\DataTransferObject\Exceptions\ValidationException: Validation errors:
         - `Baz->f1->a`: Value should be less than or equal to 100
         - `Baz->f1->b`: Value should be less than or equal to 100
         - `Baz->f2->a`: Value should be less than or equal to 100
         - `Baz->f2->b`: Value should be less than or equal to 100

But actually got

PHP Fatal error:  Uncaught Spatie\DataTransferObject\Exceptions\ValidationException: Validation errors:
         - `Foo->a`: Value should be less than or equal to 100
         - `Foo->b`: Value should be less than or equal to 100

Note: This should probably also be the case if the DTO has allot of int properties but you try to set strings there.

View more
14 comments
ValiDrv

ValiDrv

9th Apr 2021 @ 13:08

enhancement help wanted

svgo@^1.3 has an indirect dependency on nth-check:

svgo@^1.3 > css-select@^2.0.0 > nth-check@^1.0.2

Information about the vulnerability in nth-check was recently published: https://github.com/advisories/GHSA-rp65-9cf3-cjxr This vulnerability was fixed in nth-check@2.0.1. But our dependencies use the version nth-check@^1.0.2, which most likely will not be updated due to large changes. svgo@^1.3 is also not supported since October 2019.

Therefore, in my opinion, it is necessary to prepare some plan for upgrading to svgo@^2.x.

View more
3 comments
StudioMaX

StudioMaX

24th Sep 2021 @ 19:04

bug help wanted
  • Laravel Version: 9.18.0
  • PHP Version: 8.1.7
  • Database Driver & Version: MySQL (not relevant)

Description:

When using @class in Blade, on an anonymous, nested component, it does not pick up the component and renders <x-icon></x-icon>, without any processing.

Steps To Reproduce:

https://github.com/bram-pkg/class-directive-bug

Use @class on a component, results in the component not rendering as the contents of that component, but just the raw tag. In this case <x-icon/>

View more
10 comments
bram-pkg

bram-pkg

27th Jun 2022 @ 15:25

enhancement help wanted hacktoberfest

Found the \Illuminate\Database\Eloquent\Concerns\HasAttributes::originalIsEquivalent() method during code diving and it should be usable for our trait! 🎉 This PR would be mainly reasearch when that method was added, if it's compatible with our version support rules and switching our own change detection logic with the core one.

View more
3 comments
Gummibeer

Gummibeer

20th Oct 2021 @ 10:03

bug help wanted
  • Laravel Version:9.17.0
  • PHP Version: 8.1.7

Description:

The catch callback attached to a chain of jobs is called more than once when using the sync connection. I expected the catch callback to only be called once. It's only called once for the redis and sqs queue connection. This is best illustrated as an example.

        Bus::chain([
            new TestJob(1),
            new TestJob(2),
            new TestJob(3),
            new TestJob(4, exception: true),
            new TestJob(5),
            new TestJob(6),
            new TestJob(7),
        ])->catch(function (Throwable $e): void {
            dump('A job within the chain has failed...');
        })->onConnection('sync')->dispatch();

The above chain will call catch 4 times.

"A job within the chain has failed..."
"A job within the chain has failed..."
"A job within the chain has failed..."
"A job within the chain has failed..."

   Exception

  foobar 4

The further down the exception the more times catch will be called for example if the exception at index 4 catch will be called 5 times, if it's at index 5 it will be called 6 times, etc.

Steps To Reproduce:

Here is an isolated console command to test it:

<?php

declare(strict_types=1);

namespace App\Console\Commands;

use Illuminate\Bus\Queueable;
use Illuminate\Console\Command;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Bus;

final class TestJob implements ShouldQueue
{
    use Dispatchable;
    use InteractsWithQueue;
    use Queueable;

    public function __construct(protected int $id, protected bool $exception = false)
    {
    }

    public function handle(): void
    {
        dump(__METHOD__." {$this->id}");

        if ($this->exception) {
            throw new \Exception("foobar {$this->id}");
        }
    }
}

final class TestChainCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'sandbox:chain';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Test chained job exceptions';

    /**
     * Execute the console command.
     */
    public function handle(): int
    {
        Bus::chain([
            new TestJob(1),
            new TestJob(2),
            new TestJob(3),
            new TestJob(4, exception: true),
            new TestJob(5),
            new TestJob(6),
            new TestJob(7),
        ])->catch(function (\Throwable $e): void {
            dump('A job within the chain has failed...');
        })->onConnection('sync')->dispatch();

        return 0;
    }
}
View more
3 comments
gerardroche

gerardroche

20th Jun 2022 @ 17:29

enhancement help wanted

Open a modal when clicking the ban button. This modal contains a text field that's required to be filled in to internally reference so we always know the reason why a user got banned.

View more
driesvints

driesvints

10th Jun 2022 @ 08:04