Found 33 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.

enhancement help wanted

Figure our a way to show a grayed out Laravel logo as a default avatar instead of the current default GitHub one.

View more
3 comments
driesvints

driesvints

29th Sep 2021 @ 10:48

enhancement help wanted
  • standard tags
  • input fields
  • components
  • patterns

Add code snippets for each block

View more
πŸ‘ 1
willemvb

willemvb

25th Jul 2016 @ 12:49

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

Feature help wanted

Calling for help from Docker experts. We need to create the best possible docker-compose.yml file for this project. The application requirements are well defined (we use env vars, Webpack Encore, PHP 7.1, Symfony 4.1, SQLite database, etc.) so it should be possible to create that file.

View more
22 comments πŸ‘ 28
javiereguiluz

javiereguiluz

21st May 2018 @ 09:37

enhancement help wanted

Add a new settings section for notifications with a setting to globally turn off/on notifications for subscriptions to threads, including mentions.

View more
driesvints

driesvints

16th Feb 2022 @ 15:26

help wanted

Describe the bug An OutOfBoundsException exception get throws while loading my WordPress plugin which has Sentry SDK which in turns has jean85/pretty-package-versions as dependency.

Versions Ray plugin version 1.3.2

PHP version: 7.4

To Reproduce Steps to reproduce the behavior:

  1. Create a dummy plugin with composer dependency of composer require sentry/sdk
  2. Make sure the dummy plugin initialize Sentry upon plugins_loaded action hook
add_action('plugins_loaded', function() {
    Sentry\init(...)
});
  1. Install and activate Ray's plugin
  2. Activate the dummy plugin
  3. You should see a OutOfBoundsException when Sentry trying to check the installed SDK version.

Expected behavior When a plugin has jean85/pretty-package-versions it should not conflict with Ray's plugin and cause an exception

Screenshots The screenshot is from Ray app which helped me debug the problem (well done) image

Desktop (please complete the following information):

  • OS: macOS Big Sur 11.5.1
  • Version: 1.17.0

Additional context I guess this could happen with any other app, not just WordPress CMS

View more
8 comments
N-Molham

N-Molham

5th Aug 2021 @ 10:22

help wanted

When encountering nested tokens, they are parsed only during formatting, not when compiling the pattern. And the type of tokens are validated only during the rendering as well. But the native implementation detects such error during the instantiation: https://3v4l.org/Sf69D This means that the error handling required for the polyfill is not the same than for the native implementation.

View more
stof

stof

23rd Oct 2018 @ 15:58

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
2 comments
yoeunes

yoeunes

15th Jun 2022 @ 16:18

good first issue help wanted

We use bootswatch 3.* and Bootstrap 3.*.

We could upgrade bootswatch to 4., which in turns requires upgrading Bootstrap to 4.. After the upgrade, the current theme (flatly) and the current styles must remain the same.

Any volunteer to help us with this? Thanks!

View more
11 comments
javiereguiluz

javiereguiluz

17th Sep 2019 @ 09:06

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

bug help wanted

I'm playing around with this package and noticed, that when following the documentation for aggregate partials and creating a snapshot of the aggregate root, the state of the partial is not stored in the snapshot. Not sure if that is intended or a bug, as I didn't find a test for this usecase and the documentation didn't mentions snapshots and aggregate partials.

View more
3 comments
nlx-sascha

nlx-sascha

8th Jan 2022 @ 17:05

help wanted question

AST, or "abstract syntax tree", creates the expectation of a nested tree structure. In the case of a query string, the AST will only ever be one level deep; as multi nodes are combined into one.

If anyone wants to suggest a better, more clear name: you're welcome.

View more
1 comment
brendt

brendt

20th Dec 2018 @ 13:41

enhancement help wanted

Hi! If I use this package with my project I has a problem. My package.json has a "git dependency" like this:

{
  "peerDependencies": {
    "package": "git+ssh://git@bitbucket.org/team/project.git"
  }
}

And npm-install-peers breaks.

View more
πŸ‘ 5
JWo1F

JWo1F

18th Dec 2017 @ 08:52

help wanted
  • Laravel Version: 9.40.1
  • PHP Version: 8.1.10
  • Database Driver & Version: not relevant

Description:

If you run render() prior to sending the email, it will double replyTo. A bit related to #30857

Steps To Reproduce:

The below example will add info@example.com 2 times to the reply_to field.

use App\Mail\Question;

$mailTemplate = new Question( 'Hello, I have a question' );
$mail = $mailTemplate->render();
// ...store $mail in the database

Mail::to( config( 'mail.from.address' ) )
    ->locale( 'nl' )
    ->send( $mailTemplate );
<?php
namespace App\Mail\Patient;

use App\Models\Patient;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;

class Question extends Mailable implements shouldQueue
{
    use Queueable, SerializesModels;

    /**
     * Create a new message instance.
     *
     * @param Patient $patient
     * @param string  $question
     */
    public function __construct( public string $question )
    {
        $this->queue = config( 'config.queue-email' );
    }

    /**
     * Build the message.
     *
     * @return $this
     */
    public function build()
    {
        return $this->from( [
            'address' => config( 'mail.from.address' ),
            'name'    => config( 'mail.from.name' ),
        ] )
                    ->replyTo( 'info@example.com' )
                    ->subject( 'someone has a question' )
                    ->view( 'mail.question' );
    }
}
View more
3 comments
JBtje

JBtje

21st Nov 2022 @ 17:01

bug help wanted

When attempting to filter tests by test or file name pressing the "Enter" key has no effect.

Pressing "Enter" at the default screen correctly triggers a "test run" where all tests are run.

View more
4 comments
ntwb

ntwb

25th Feb 2018 @ 10:49

enhancement help wanted good first issue

Server is down with 503 error when loading big pdf(8Mb, 40 pages). It's because you puting file in construct method Imagick.

$this->imagick = new Imagick($pdfFile);

But why whole file if i need only one page. In method getImageData there is instruction that page is need use for generate preview.

$this->imagick->readImage(sprintf('%s[%s]', $this->pdfFile, $this->page - 1));

If you need read all file don't indicate index of page. Like this:

$this->imagick->readImage($this->pdfFile);

After then i deleted file from constructor Imagick

$this->imagick = new Imagick();

And all works fine. If you want pick another page there is method setPage

View more
2 comments
truechernyshov

truechernyshov

11th Jan 2020 @ 10:59

help wanted

I would be good to support normalizer_get_raw_decomposition function that appeared in PHP 7.3. I've tried to implement it but seems that existing decomposition data is already optimized to get the final decomposition. Example test case is available here. Pinging @nicolas-grekas as he is the author of Normalizer polyfill.

View more
4 comments
IonBazan

IonBazan

12th May 2018 @ 23:26

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

help wanted
  • Laravel Version: 9.39.0
  • PHP Version: 8.1.11
  • Database Driver & Version: Mysql 5.7

Description:

This bug originates in PendingDispatch destructor [1], where jobs are actually dispatched to the queues. Since the destructor method will be called as soon as there are no other references to a particular object, or in any order during the shutdown sequence, it is not guaranteed that the exception could be catched.

The problem is that when Laravel try to dispatch a job to a queue, the connection may fail (broker down, database not responding, Redis connection broken, ...) and the job should be treated as a failed job. For example in my current project we are using AMQP protocol, and in case of RabbitMQ not responding we would like to log the failure and store the job payload into the failed_job db table, without propagating the exception to the client.

[1] https://github.com/laravel/framework/blob/917abe82938ec332ceac2a2e662ccd983b6632fd/src/Illuminate/Foundation/Bus/PendingDispatch.php#L186-L195

Steps To Reproduce:

To implement this solution we wrote an abstract class from which all our jobs inherit:

abstract class BaseJob implements ShouldQueue
{
    use Dispatchable;
    use InteractsWithQueue;
    use Queueable;
    use SerializesModels;

    public static function dispatch(...$arguments): ?PendingDispatch
    {
        $self = new static(...$arguments);

        try {
            return new PendingDispatch($self);
        } catch (\Throwable $t) {
            // log failure
            // persist failed job to DB
        }

        return null;
    }
}

Unfortunately the catch will never be engaged, since the return inside the try implies that an object is instantiated, so the destructor call is delayed.

Possible workaround:

One possible solution is move the try/catch in the dispatch usage, something like that:

try {
    TestJob::dispatch();
} catch (\Throwable $t) {
    // log failure
    // persist failed job to DB
}

This solution is not optimal because:

  • delegate problem management to the framework user, who may not be aware of the problem
  • forces to duplicate the management code, we could use the Traits, but it is still not an acceptable solution
  • moreover, if for some reason the dispatch return value were assigned to a variable, the exception would not be manageable even at this point

Desired solution

I think that the best way to solve this problem is to let the user the ability to bypass the destructor trick, maybe exhuming the deprecated dispatchNow method, giving it the following meaning: push the job to the queue NOW, not later when you will be destroyed, then work on it in ASYNC mode.

View more
1 comment πŸ‘ 1
g4b0

g4b0

17th Nov 2022 @ 16:53

help wanted

In raising this issue, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked the pull requests tab for existing solutions/implementations to my issue/suggestion.
  • I have checked that the bug-fix I am reporting can be replicated.

Description of the problem

One of the important reasons for using hyperscript is that it handles escaping of characters which are reserved in html. Which prevents XSS.

spatie/html-element does not do this. Mainly because it uses strings as intermediate format instead of an object representation of the DOM.

View more
6 comments πŸ‘ 3
Erikvv

Erikvv

1st Feb 2018 @ 02:19

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
4 comments
StudioMaX

StudioMaX

24th Sep 2021 @ 19:04

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

help wanted

Currently, for plural rules, the MessageFormatter polyfills uses the English rules for all locales (it ignores the locale). To be consistent with what we do in symfony/intl (used by symfony/polyfill-intl-icu to implement NumberFormatter and DateFormatter), we should rather fail explicitly here (using the English rules for a different locale would not give the right result anyway)

View more
2 comments
stof

stof

23rd Oct 2018 @ 15:34

help wanted

Ray allows for a meta.project_name to be set for when you use a separate Ray window for each project.

View more
riasvdv

riasvdv

21st Mar 2022 @ 08:49

enhancement help wanted hacktoberfest

Describe the bug I have a table which has an order column. When I reorder the elements I update each model with the new order. Because the table has some large JSON columns I select only id and order columns for efficiency. I set the new order and save the model.

foreach (Faq::query()->get(['id', 'order']) as $faq) {
    $faq->order = $newOrder[$faq->id];
    $faq->save();
}

The diffs created in the activity_log table look like this:

{
   "old": {
      "order": 1,
      "answer": null,
      "question": null
   },
   "attributes": {
      "order": 2,
      "answer": "long JSON content",
      "question": "long JSON content"
   }
}

From what I see laravel-activitylog fetches the model with all columns from the database before creating a log entry which kind of defeats the purpose of my "select list optimization" and produces an incorrect diff.

Generally I want these large JSON columns to be logged in case a user changes them but in this case I only change the order column so I would like to see only the order column in the diff.

I have tried running these updates straight off the Eloquent builder:

Faq::query()->where('id', $id)->update(['order' => $newOrder[$id]]);

but in this case nothing is logged.

I have the following activitylog configuration for my models:

public function getActivitylogOptions(): LogOptions
{
    return LogOptions::defaults()
                     ->logAll()
                     ->logOnlyDirty()
                     ->logExcept([
                         'id',
                         'created_at',
                         'updated_at',
                     ]);
}

To Reproduce Select a subset of columns from the database, change these columns, save the model and see that other (not initially selected) columns are present in the diff.

Expected behavior Only columns that've actually been changed should be present in the diff.

Versions

  • PHP: 8.1
  • Database: MySQL 8
  • Laravel: 9.31.0
  • Package: 4.6.0
View more
KKSzymanowski

KKSzymanowski

28th Sep 2022 @ 21:53

help wanted
  • Laravel Version: 9.40.1
  • PHP Version: 8.1.11
  • Database Driver & Version: Postgres

Description:

Using unix sockets instead of a network address such as 127.0.0.1 has performance benefits when the Postgres instance is located on the same machine. This database configuration works normally, EXCEPT when inserting failed jobs.

DB_DRIVER=pgsql
DB_HOST=/var/run/postgresql
DB_DATABASE=foo
DB_USERNAME=bar
DB_PASSWORD=null
DB_PORT=null
DB_PREFIX=null

When using this configuration, failed jobs give rise to the following exception, and nothing is inserted in the failed_jobs table:

[2022-11-25 09:21:20] production.ERROR: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for /var/run/postgresql failed: Name or service not known (SQL: delete from `failed_jobs` where `failed_at` < 2022-11-24 09:21:20 limit 1000) [{"capturer":"$this->reportable"}] 
[2022-11-25 09:21:20] production.ERROR: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for /var/run/postgresql failed: Name or service not known (SQL: delete from `failed_jobs` where `failed_at` < 2022-11-24 09:21:20 limit 1000) {"exception":"[object] (Illuminate\\Database\\QueryException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for /var/run/postgresql failed: Name or service not known (SQL: delete from `failed_jobs` where `failed_at` < 2022-11-24 09:21:20 limit 1000) at /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php:760)
[stacktrace]
#0 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(899): Illuminate\\Database\\Connection->runQueryCallback()
#1 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(879): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection()
#2 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(723): Illuminate\\Database\\Connection->handleQueryException()
#3 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(577): Illuminate\\Database\\Connection->run()
#4 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(522): Illuminate\\Database\\Connection->affectingStatement()
#5 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3456): Illuminate\\Database\\Connection->delete()
#6 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php(138): Illuminate\\Database\\Query\\Builder->delete()
#7 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php(49): Illuminate\\Queue\\Failed\\DatabaseUuidFailedJobProvider->prune()
#8 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\PruneFailedJobsCommand->handle()
#9 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#10 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#11 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#12 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#13 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Command.php(178): Illuminate\\Container\\Container->call()
#14 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Command/Command.php(308): Illuminate\\Console\\Command->execute()
#15 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Command.php(148): Symfony\\Component\\Console\\Command\\Command->run()
#16 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(1014): Illuminate\\Console\\Command->run()
#17 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand()
#18 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#19 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#20 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run()
#21 /home/forge/fintable.io/releases/20221124172709/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#22 {main}

[previous exception] [object] (PDOException(code: 2002): SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for /var/run/postgresql failed: Name or service not known at /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
[stacktrace]
#0 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()
#1 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(100): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()
#2 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(50): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection()
#3 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()
#4 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect()
#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#6 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1171): call_user_func()
#7 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(566): Illuminate\\Database\\Connection->getPdo()
#8 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#9 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(899): Illuminate\\Database\\Connection->runQueryCallback()
#10 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(879): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection()
#11 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(723): Illuminate\\Database\\Connection->handleQueryException()
#12 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(577): Illuminate\\Database\\Connection->run()
#13 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(522): Illuminate\\Database\\Connection->affectingStatement()
#14 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3456): Illuminate\\Database\\Connection->delete()
#15 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php(138): Illuminate\\Database\\Query\\Builder->delete()
#16 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php(49): Illuminate\\Queue\\Failed\\DatabaseUuidFailedJobProvider->prune()
#17 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\PruneFailedJobsCommand->handle()
#18 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#19 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#20 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#21 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#22 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Command.php(178): Illuminate\\Container\\Container->call()
#23 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Command/Command.php(308): Illuminate\\Console\\Command->execute()
#24 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Command.php(148): Symfony\\Component\\Console\\Command\\Command->run()
#25 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(1014): Illuminate\\Console\\Command->run()
#26 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand()
#27 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#28 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#29 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run()
#30 /home/forge/fintable.io/releases/20221124172709/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#31 {main}

[previous exception] [object] (PDOException(code: 0): PDO::__construct(): php_network_getaddresses: getaddrinfo for /var/run/postgresql failed: Name or service not known at /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php:70)
[stacktrace]
#0 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(70): PDO->__construct()
#1 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(100): Illuminate\\Database\\Connectors\\Connector->createPdoConnection()
#2 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/Connector.php(50): Illuminate\\Database\\Connectors\\Connector->tryAgainIfCausedByLostConnection()
#3 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/MySqlConnector.php(24): Illuminate\\Database\\Connectors\\Connector->createConnection()
#4 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connectors/ConnectionFactory.php(184): Illuminate\\Database\\Connectors\\MySqlConnector->connect()
#5 [internal function]: Illuminate\\Database\\Connectors\\ConnectionFactory->Illuminate\\Database\\Connectors\\{closure}()
#6 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(1171): call_user_func()
#7 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(566): Illuminate\\Database\\Connection->getPdo()
#8 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#9 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(899): Illuminate\\Database\\Connection->runQueryCallback()
#10 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(879): Illuminate\\Database\\Connection->tryAgainIfCausedByLostConnection()
#11 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(723): Illuminate\\Database\\Connection->handleQueryException()
#12 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(577): Illuminate\\Database\\Connection->run()
#13 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Connection.php(522): Illuminate\\Database\\Connection->affectingStatement()
#14 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3456): Illuminate\\Database\\Connection->delete()
#15 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Queue/Failed/DatabaseUuidFailedJobProvider.php(138): Illuminate\\Database\\Query\\Builder->delete()
#16 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php(49): Illuminate\\Queue\\Failed\\DatabaseUuidFailedJobProvider->prune()
#17 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\\Queue\\Console\\PruneFailedJobsCommand->handle()
#18 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#19 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#20 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\\Container\\BoundMethod::callBoundMethod()
#21 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\\Container\\BoundMethod::call()
#22 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Command.php(178): Illuminate\\Container\\Container->call()
#23 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Command/Command.php(308): Illuminate\\Console\\Command->execute()
#24 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Command.php(148): Symfony\\Component\\Console\\Command\\Command->run()
#25 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(1014): Illuminate\\Console\\Command->run()
#26 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(301): Symfony\\Component\\Console\\Application->doRunCommand()
#27 /home/forge/fintable.io/releases/20221124172709/vendor/symfony/console/Application.php(171): Symfony\\Component\\Console\\Application->doRun()
#28 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\\Component\\Console\\Application->run()
#29 /home/forge/fintable.io/releases/20221124172709/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(155): Illuminate\\Console\\Application->run()
#30 /home/forge/fintable.io/releases/20221124172709/artisan(37): Illuminate\\Foundation\\Console\\Kernel->handle()
#31 {main}
"} 

   Illuminate\Database\QueryException 

  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for /var/run/postgresql failed: Name or service not known (SQL: delete from `failed_jobs` where `failed_at` < 2022-11-24 09:21:20 limit 1000)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:760
    756β–•         // If an exception occurs when attempting to run a query, we'll format the error
    757β–•         // message to include the bindings with SQL, which will make this exception a
    758β–•         // lot more helpful to the developer instead of just the database's errors.
    759β–•         catch (Exception $e) {
  ➜ 760β–•             throw new QueryException(
    761β–•                 $query, $this->prepareBindings($bindings), $e
    762β–•             );
    763β–•         }
    764β–•     }

      +31 vendor frames 
  32  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Steps To Reproduce:

  1. Use a unix socket address instead of a network address for DB_HOST, for example DB_HOST=/var/run/postgresql
  2. Let a job fail
  3. Run the php artisan queue:prune-failed --hours=0 command
  4. The exception above is thrown.
View more
2 comments
ibnIrshad

ibnIrshad

25th Nov 2022 @ 09:37

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

bug help wanted

I have multiple directories with the Controller base class like that:

  • App\Modules\Admin
    • Controller
    • DashboardController
  • App\Modules\Api
    • Controller
    • UserController

When I specified all these directories in the 'directories' parameter (route-attributes.php file) I got the following error:

Cannot declare class App\Modules\Api\Controllers\Controller, because the name is already in use

So, it is impossible to use this package when an application has controller classes with the same name.

PHP 8.0.11 Laravel 8.64

View more
2 comments πŸ‘€ 1
tekord

tekord

15th Oct 2021 @ 10:54

help wanted

Hi, I've notice a wierd phenomenon about octane (swoole), it greatly reduce it performance if let run for a while.

  • Octane Version: v1.3.8
  • Laravel Version: v9.40.1
  • PHP Version: 8.1.11
  • Server & Version: Swoole / RoadRunner: swoole-4.8.10
  • Database Driver & Version: not relevant

Description:

Octane run much lower than it capacity when let it run for a while, I've a synthetically script below to demonstrate:

Steps To Reproduce:

cd /tmp/
composer create-project laravel/laravel example-app
cd example-app
composer require laravel/octane
php artisan octane:install --server=swoole
php artisan octane:start --workers=4 --server=swoole --host=0.0.0.0 --max-requests=25000 -q

Using ab tool to test req/sec:

ab -t 5 -c 4 http://0.0.0.0:8000/

Keep re-running ab -t 5 -c 4 http://0.0.0.0:8000/, after just 5 runs, you start to see performance suffer considerably, after 10 or 15 runs, can't see advantage octane over php-fpm anymore.

(apology in advance if this the way conducting this test is bad)

View more
3 comments
kocoten1992

kocoten1992

19th Nov 2022 @ 23:10

help wanted
  • Laravel Version: 9.41.0
  • PHP Version: 8.1.11
  • Database Driver & Version: SQLite 3.37.0 and MySQL 8.0.30

Description:

Using the hasAttached() factory method to relate models, if either model $touches the relationship, the model instances will not be related correctly after being createdβ€”their relations to each other will be loaded but empty.

Steps To Reproduce:

You have two Eloquent models, e.g. User and Group, connected with a BelongsToMany relationship. We want users to have their timestamps updated any time any of their groups are updated, so the Group model contains protected $touches = ['users'].

In a test, you create a user and group and attach them:

$user = User::factory()->create();
$group = Group::factory()->hasAttached($user)->create();

$this->assertCount(1, $group->users);

That assertion fails.

The users relation is set on the new $group model, as if it was just loaded from the database, but it's an empty collection (output from dump($group) inside the above test):

This only happens when one of the models has the relationship listed in its $touches property.

View more
4 comments
bakerkretzmar

bakerkretzmar

23rd Nov 2022 @ 22:04

enhancement help wanted good first issue

Describe the bug logUnguarded() works provided that $guarded is set explicitly in the model. If it is not set explicitly but globally set, say in AppServiceProvider using Model::unguard(); then nothing is logged.

To Reproduce

  1. remove $fillable and $guarded from a model that use uses LogsActivity
  2. call Model::unguard(); in AppServiceProvider in the boot method
  3. set
    public function getActivitylogOptions() : LogOptions
    {
        return LogOptions::defaults()->logUnguarded();
    }
  1. Make some changes to a model and save them

Expected behavior Some changed properties should be logged but none are

Versions (please complete the following information)

  • PHP: 8.1
  • Database: MySql
  • Laravel: 9.38
  • Package: larvel-activitylog
View more
colinmackinlay

colinmackinlay

20th Nov 2022 @ 12:31

help wanted

Add in PHP 7.3 as Normalizer::normalize() argument for NFKC_Casefold normalization.

View more
1 comment
nicolas-grekas

nicolas-grekas

7th Feb 2019 @ 10:11

help wanted
  • Laravel Version: v9.38.0
  • PHP Version: v8.1.12
  • Database Driver & Version: Postgres

Description:

The pre-rendered maintenance mode using the php artisan down --render="errors::503" command does not show up as if it was actually in maintenance mode.

Steps To Reproduce:

  1. Create a resources/views/errors/503.blade.php with the following contents:
@extends('errors::minimal')

@if(App::isDownForMaintenance())
    @section('title', __('Down for Maintenance'))
    @section('code', '503')
    @section('message', __('Down for Maintenance'))
@else
    @section('title', __('Service Unavailable'))
    @section('code', '503')
    @section('message', __('Service Unavailable'))
@endif
  1. Run the command php artisan down --render="errors::503".
  2. View the application in a browser.
  3. You will see 'Service Unavailable' instead of desired output 'Down for Maintenance'. This only happens with the pre '--render' flag.

It would be nice to be able to differentiate between maintenance mode and otherwise to display a more detailed reason for a 503 error to the user without having to boot the entire framework.

View more
2 comments πŸ‘ 1
Cbrad24

Cbrad24

21st Nov 2022 @ 06:00