Found 41 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

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

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 findapr

I'm using Laravel 10. I've installed the package via "composer require php-flasher/flasher-laravel" Now I'm able to fire flash messages in my controller. I see them in the session data (in flasher::envelopes). But they aren't showing up in my views. In my config file I have 'auto_render' => true. If I put @flasher_render in my blade view, the only thing that's happens is, a notification to warn that this method wil be deprecated.

How can I fix this? I really like to use this package ;-)

View more
3 comments
krisc78

krisc78

9th Mar 2023 @ 14:49

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
26 comments
bluec

bluec

7th Nov 2018 @ 13:44

good first issue help wanted

I'm getting thousands of these messages since upgrading to PHP8.2:

Creation of dynamic property Illuminate\Console\Scheduling\Event::$graceTimeInMinutes is deprecated in ...

I'm sorry that I don't really have much to offer other than our usage which is:

protected function schedule(Schedule $schedule)
    {
        $schedule->command('sendEmails')->everyMinute()->graceTimeInMinutes(10);
        $schedule->command('sendPartnerEmails')->everyMinute()->graceTimeInMinutes(45);
    }
View more
4 comments
raray

raray

21st Aug 2023 @ 18:58

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

help wanted findapr

I have a problem when customizing User Authentication in Laravel Fortify, where the flash messages appear twice instead of once. What is wrong with my code?

// if login success redirect to home / dashboard page and show flash message

        Fortify::authenticateUsing(function (Request $request) {
            $user = User::where('email', $request->email)->first();

            if ($user && Hash::check($request->password, $user->password)) {
                flash()->AddSuccess('Welcome, '.$user->name);
                return $user;
            }
            flash()->addError('Invalid credentials');
        });
View more
3 comments
arewtech

arewtech

6th Nov 2023 @ 15:32

help wanted

Laravel Version

10.14.1

PHP Version

8.1.2

Database Driver & Version

psql (PostgreSQL) 15.3 (Debian 15.3-1.pgdg110+1)

Description

Using a PostgreSQL connection, a previously created type won't be dropped when artisan db:wipe --drop-types is called. As a result, when artisan migrate:fresh --drop-types is being called and a type is being defined in a migration, it will result in an error:

SQLSTATE[42710]: Duplicate object: 7 ERROR:  type "foo" already exists

Looking at \Illuminate\Database\Schema\Grammars\PostgresGrammar::compileGetAllTypes the root cause is obvious:

https://github.com/illuminate/database/blob/ae346d0a75aa87b83783d44b926d3fcc2d18f430/Schema/Grammars/PostgresGrammar.php#L455

select distinct pg_type.typname from pg_type inner join pg_enum on pg_enum.enumtypid = pg_type.oid

This statement will only select enum types. If you replace this statement by following statement, everything works fine:

SELECT      n.nspname as schema, t.typname as type
FROM        pg_type t
LEFT JOIN   pg_catalog.pg_namespace n ON n.oid = t.typnamespace
WHERE       (t.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = t.typrelid))
AND     NOT EXISTS(SELECT 1 FROM pg_catalog.pg_type el WHERE el.oid = t.typelem AND el.typarray = t.oid)
AND     n.nspname NOT IN ('pg_catalog', 'information_schema');

Steps To Reproduce

Create a migration:

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        DB::unprepared(<<<'EOF'
CREATE TYPE "foo" AS (
    bar TEXT
);
EOF);
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        DB::unprepared(<<<'EOF'
DROP TYPE "foo";
EOF
);
    }
};

Call artisan migrate:fresh --drop-types TWICE, the second time you will get this error:

   Illuminate\Database\QueryException 

  SQLSTATE[42710]: Duplicate object: 7 ERROR:  type "foo" already exists (Connection: pgsql, SQL: CREATE TYPE "foo" AS (
    bar TEXT
);)

  at vendor/laravel/framework/src/Illuminate/Database/Connection.php:795
    791▕         // If an exception occurs when attempting to run a query, we'll format the error
    792▕         // message to include the bindings with SQL, which will make this exception a
    793▕         // lot more helpful to the developer instead of just the database's errors.
    794▕         catch (Exception $e) {
  ➜ 795▕             throw new QueryException(
    796▕                 $this->getName(), $query, $this->prepareBindings($bindings), $e
    797▕             );
    798▕         }
    799▕     }

      +7 vendor frames 
  8   database/migrations/2023_11_30_144022_foo.php:15
      Illuminate\Support\Facades\Facade::__callStatic()

      +36 vendor frames 
  45  artisan:35
      Illuminate\Found

Let's try something:

$ sail tinker
> DB::unprepared(<<<'EOF'
. CREATE TYPE "foo" AS (
.     bar TEXT
. );
. EOF);
= true
> DB::select("select distinct pg_type.typname from pg_type inner join pg_enum on pg_enum.enumtypid = pg_type.oid");
= []
> DB::select(<<<'EOF'
. SELECT      n.nspname as schema, t.typname as type
. FROM        pg_type t
. LEFT JOIN   pg_catalog.pg_namespace n ON n.oid = t.typnamespace
. WHERE       (t.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = t.typrelid))
. AND     NOT EXISTS(SELECT 1 FROM pg_catalog.pg_type el WHERE el.oid = t.typelem AND el.typarray = t.oid)
. AND     n.nspname NOT IN ('pg_catalog', 'information_schema');
. EOF);
= [
    {#8178
      +"schema": "public",
      +"type": "foo",
    }
  ]
View more
3 comments
andreas-eisenmann

andreas-eisenmann

30th Nov 2023 @ 13:44

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

When calling mb_convert_encoding() with $fromEncoding === 'HTML-ENTITIES', the polyfill does not return functionally equivalent strings to the native function. This is because mb_convert_encoding() uses html_entity_decode() when $fromEncoding === 'HTML-ENTITIES' and that function does not return characters for many numeric entities 0-31 and 127-159. For example:

<?php

require "vendor/symfony/polyfill-mbstring/Mbstring.php";

use Symfony\Polyfill\Mbstring as p;

for($i = 0; $i < 1024; $i++) {
	$string = "&#" . $i . ";";
	$mbstring = mb_convert_encoding($string, 'UTF-8', 'HTML-ENTITIES');
	$polyfill = p\Mbstring::mb_convert_encoding($string, 'UTF-8', 'HTML-ENTITIES');
	if($mbstring != $polyfill) {
		echo "Mismatch: $string - mbstring: $mbstring; polyfill: $polyfill\n";
	}
}

outputs:

Mismatch: &#0; - mbstring: ; polyfill: &#0;
Mismatch: &#1; - mbstring: ; polyfill: &#1;
Mismatch: &#2; - mbstring: ; polyfill: &#2;
Mismatch: &#3; - mbstring: ; polyfill: &#3;
Mismatch: &#4; - mbstring: ; polyfill: &#4;
Mismatch: &#5; - mbstring: ; polyfill: &#5;
Mismatch: &#6; - mbstring: ; polyfill: &#6;
Mismatch: &#7; - mbstring: ; polyfill: &#7;
Mismatch: &#8; - mbstring:; polyfill: &#8;
Mismatch: &#11; - mbstring:
                            ; polyfill: &#11;
Mismatch: &#12; - mbstring:
                            ; polyfill: &#12;
Mismatch: &#14; - mbstring: ; polyfill: &#14;
Mismatch: &#15; - mbstring: ; polyfill: &#15;
Mismatch: &#16; - mbstring: ; polyfill: &#16;
Mismatch: &#17; - mbstring: ; polyfill: &#17;
Mismatch: &#18; - mbstring: ; polyfill: &#18;
Mismatch: &#19; - mbstring: ; polyfill: &#19;
Mismatch: &#20; - mbstring: ; polyfill: &#20;
Mismatch: &#21; - mbstring: ; polyfill: &#21;
Mismatch: &#22; - mbstring: ; polyfill: &#22;
Mismatch: &#23; - mbstring: ; polyfill: &#23;
Mismatch: &#24; - mbstring: ; polyfill: &#24;
Mismatch: &#25; - mbstring: ; polyfill: &#25;
Mismatch: &#26; - mbstring: ; polyfill: &#26;
Mismatch: &#27; - mbstring:  polyfill: &#27;
Mismatch: &#28; - mbstring: ; polyfill: &#28;
Mismatch: &#29; - mbstring: ; polyfill: &#29;
Mismatch: &#30; - mbstring: ; polyfill: &#30;
Mismatch: &#31; - mbstring: ; polyfill: &#31;
Mismatch: &#39; - mbstring: '; polyfill: &#39;
Mismatch: &#127; - mbstring: ; polyfill: &#127;
Mismatch: &#128; - mbstring: €; polyfill: &#128;
Mismatch: &#129; - mbstring: ; polyfill: &#129;
Mismatch: &#130; - mbstring: ‚; polyfill: &#130;
Mismatch: &#131; - mbstring: ƒ; polyfill: &#131;
Mismatch: &#132; - mbstring: „; polyfill: &#132;
Mismatch: &#133; - mbstring: …; polyfill: &#133;
Mismatch: &#134; - mbstring: †; polyfill: &#134;
Mismatch: &#135; - mbstring: ‡; polyfill: &#135;
Mismatch: &#136; - mbstring: ˆ; polyfill: &#136;
Mismatch: &#137; - mbstring: ‰; polyfill: &#137;
Mismatch: &#138; - mbstring: Š; polyfill: &#138;
Mismatch: &#139; - mbstring: ‹; polyfill: &#139;
Mismatch: &#140; - mbstring: Œ; polyfill: &#140;
Mismatch: &#141; - mbstring: ; polyfill: &#141;
Mismatch: &#142; - mbstring: Ž; polyfill: &#142;
Mismatch: &#143; - mbstring: ; polyfill: &#143;
Mismatch: &#144; - mbstring: ; polyfill: &#144;
Mismatch: &#145; - mbstring: ‘; polyfill: &#145;
Mismatch: &#146; - mbstring: ’; polyfill: &#146;
Mismatch: &#147; - mbstring: “; polyfill: &#147;
Mismatch: &#148; - mbstring: ”; polyfill: &#148;
Mismatch: &#149; - mbstring: •; polyfill: &#149;
Mismatch: &#150; - mbstring: –; polyfill: &#150;
Mismatch: &#151; - mbstring: —; polyfill: &#151;
Mismatch: &#152; - mbstring: ˜; polyfill: &#152;
Mismatch: &#153; - mbstring: ™; polyfill: &#153;
Mismatch: &#154; - mbstring: š; polyfill: &#154;
Mismatch: &#155; - mbstring: ›; polyfill: &#155;
Mismatch: &#156; - mbstring: œ; polyfill: &#156;
Mismatch: &#157; - mbstring: ; polyfill: &#157;
Mismatch: &#158; - mbstring: ž; polyfill: &#158;
Mismatch: &#159; - mbstring: Ÿ; polyfill: &#159;

While many of these are control characters (and the native function does return them), the single quote (dec 39) is particularly problematic.

View more
1 comment
cpeel

cpeel

18th Mar 2021 @ 04:11

help wanted

Laravel Version

10.27.0

PHP Version

8.1.11

Database Driver & Version

MySQL

Description

The DB connector code is meant to retry failed connections, but failing to connect due to a connect timeout is not retried. I have observed this on MySQL, but possibly other drivers suffer the same issue.

Steps To Reproduce

Using the mysql driver, set the host to google.com. Only one attempt is made to connect to the DB because tryAgainIfCausedByLostConnection determines that message SQLSTATE[HY000] [2002] Operation timed out should not be re-tried. I think the tryAgainIfCausedByLostConnection logic is great for re-connecting post-connect, but is not so good for retrying the initial connect. I think we need to add additional message matching specifically for the connector code, only. A timeout should not otherwise be retried, since that could result in double inserts, for example.

View more
2 comments 👍 2
GrahamCampbell

GrahamCampbell

10th Oct 2023 @ 11:56

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

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

bug help wanted good first issue

Bug Report

Summary:

When running the php artisan media-library:clean --dry-run command in a production environment, an error occurs due to an undefined variable $model. This error prevents the command from executing successfully.

Steps to Reproduce:

  1. Run the following command in a Laravel application with the Spatie Media Library package installed:
php artisan media-library:clean --dry-run
  1. When prompted with the question, "Do you really wish to run this command? (yes/no) [no]," respond with "yes."

Expected Results:

The media-library:clean command should run in dry-run mode without errors and provide a summary of the media files that would be deleted without actually deleting them.

Actual Results:

An ErrorException occurs with the message "Undefined variable $model" as shown below:

ErrorException

  Undefined variable $model

  at vendor/spatie/laravel-medialibrary/src/Conversions/ConversionCollection.php:65
     61▕          * In some cases the user might want to get the actual model
     62▕          * instance so conversion parameters can depend on model
     63▕          * properties. This will causes extra queries.
     64▕          */
  ➜  65▕         if ($model->registerMediaConversionsUsingModelInstance && $media->model) {
     66▕             $model = $media->model;
     67▕
     68▕             $model->mediaConversions = [];
     69▕         }

      +21 vendor frames
  22  artisan:37
      Illuminate\Foundation\Console\Kernel::handle()

Additional Information:

  • Laravel version: 9.49
  • Spatie Media Library version: 10.7.10
  • PHP version: 8.0.27
  • Operating System: RHEL 8.8
View more
4 comments
eisler

eisler

20th Sep 2023 @ 09:09

help wanted

Laravel Version

10.34.2

PHP Version

8.2.3

Database Driver & Version

3.39

Description

When testing I am using sqlite.

When now trying to use the "whenJsonContains" method or any derived method, it throws the error message: "This database engine does not support JSON contains operations."

In the docs on the other hand you can find this example:

$users = DB::table('users') ->whereJsonContains('options->languages', 'en') ->get(); Right above you can find this text: "You may use whereJsonContains to query JSON arrays. This feature is not supported by SQLite database versions less than 3.38.0:"

SQLite still has no "json_contains" method. Another approach would be to use the json_each method as follows:

SELECT * from {table}, json_each({table}.{column}, {path}) WHERE json_each.value = {value};

It would still have the same restriction, that you can only search for a non array value but it should work

Steps To Reproduce

https://github.com/laravel/framework/blob/10.x/src/Illuminate/Database/Query/Grammars/SQLiteGrammar.php

View more
4 comments
Sagmedjo

Sagmedjo

1st Dec 2023 @ 22:18

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

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
8 comments
driesvints

driesvints

29th Sep 2021 @ 10:48

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

10.x

PHP Version

8.2.11

Database Driver & Version

MySQL 8.1.0

Description

https://github.com/laravel/framework/blob/10.x/src/Illuminate/Validation/Rules/DatabaseRule.php#L235

When creating a unique validation rule and adding a NULL where clause the resulting formatted string wraps NULL values in quotes as "NULL" which doesn't match NULL column values.

Example:

use Illuminate/Validation/Rules;

$unique = Rule::unique('users', 'email')->withoutTrashed()->ignore($model->id);

echo (string) $unique; // unique:users,email,NULL,id,deleted_at,"NULL"

The string value should in fact be:

echo (string) $unique; // unique:users,email,NULL,id,deleted_at,NULL

Similarly for NOT_NULL.

Possible fix:

/**
 * Format the where clauses.
 *
 * @return string
 */
protected function formatWheres()
{
    return collect($this->wheres)->map(function ($where) {
        if ($where['value'] === 'NULL') {
            return $where['column'].',NULL';
        } elseif ($where['value'] === 'NOT_NULL') {
            return $where['column'].',NOT_NULL';
        } else {
            return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
        }
    })->implode(',');
}

Steps To Reproduce

use Illuminate/Validation/Rules;

$unique = Rule::unique('users', 'email')->whereNull('deleted_at')->ignore($model->id);

echo (string) $unique;
View more
6 comments
tomblakemore

tomblakemore

1st Dec 2023 @ 13:23

help wanted

Laravel Version

10.29.0

PHP Version

8.2.2

Database Driver & Version

No response

Description

One of my sites has been getting attacked today and one of the things they did is posted _method as an array to a form endpoint. Which throws an error(stack trace removed for security): https://flareapp.io/share/DPyKdV65

This is the relevant line:

// vendor/symfony/http-foundation/Request.php
1213     if (!$method && self::$httpMethodParameterOverride) {
1214            $method = $this->request->get('_method', $this->query->get('_method', 'POST'));
1215     }

Steps To Reproduce

In a new Laravel install (with Pest) make a test like:

it('validates _method', function () {
    $this->post('/', ['_method' => ['invalid']])
        ->assertInvalid('_method');
});
View more
4 comments
tobz-nz

tobz-nz

1st Nov 2023 @ 00:50

help wanted

Octane Version

2.1.0

Laravel Version

10.28.0

PHP Version

8.2.10

What server type are you using?

Swoole

Server Version

5.0.3

Database Driver & Version

No response

Description

When using Swoole or Open swoole, streaming a video file (mp4 hevc) and trying to display it in a video html tag result in an empty video player.

Using the same code without Octane works as expected (video player displayed and able to play the video)

Steps To Reproduce

git clone https://github.com/L3o-pold/bug-report.git
php artisan octane:start

Open http://127.0.0.1:8000 on a Chrome browser.

Video fails to load with following error:

FFmpegDemuxer: open context failed
Error Group: PipelineStatus
Error Code: 12
Stacktrace: media/filters/ffmpeg_demuxer.cc:1256

Without Octane (php artisan serve) the video is playable without any issue

View more
3 comments
L3o-pold

L3o-pold

23rd Oct 2023 @ 18:32

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

10.30.1

PHP Version

8.2.6

Database Driver & Version

No response

Description

Situation:

We have a schedule:

$schedule->command(ExampleCommand::class)->lastDayOfMonth('23:30');

We also have set the timezone to for the kernel to CET:

'schedule_timezone' => 'Europe/Amsterdam',

The server itself runs in UTC.

The lastDayOfMonth uses Carbon::now(), but I believe it didn't take the timezone into account.

Possible solution:

Add timezone when getting the last day of the month, like in the inTimeInterval method :

// In src/Illuminate/Console/Scheduling/ManagesFrequencies.php:562
public function lastDayOfMonth($time = '0:0')
{
    $this->dailyAt($time);

    return $this->spliceIntoPosition(3, Carbon::now($this->timezone)->endOfMonth()->day);
}

Steps To Reproduce

  1. Add scheduled command: $schedule->command(ExampleCommand::class)->lastDayOfMonth('23:30');
  2. Make sure the server runs in UTC
  3. Make sure the commands are scheduled in CET via config/app.php => 'schedule_timezone' => 'Europe/Amsterdam',
  4. Somehow try to trigger this schedule naturally
  5. Assert that it did not execute
View more
3 comments
pascalvgemert

pascalvgemert

1st Dec 2023 @ 13:26

help wanted

Laravel Version

10.34.2

PHP Version

8.2.12

Database Driver & Version

MySQL

Description

When running php artisan test, each test is now taking significantly longer to run since updating from v10.33.0 to v10.34.2. I'm using assertJsonFragment in my test cases.

The screenshots attached highlight the differences where all I did was both upgrade & downgrade. I have in excess of 50 tests, and here's the comparison of test times between framework versions:

  • v10.33.0 = takes less than 60 seconds
  • v10.34.2 = takes 155 seconds to run

I suspect that this change might be responsible for the performance bottle neck.

Steps To Reproduce

  1. Create a Feature test that asserts JSON fragment
/**
 * A basic feature test example.
 */
public function test_user_notifications_endpoint_returns_correct_response_when_deleting(): void
{
    $userId = $this->user->id;

    $this->loginAs($this->user);

    $response = $this->delete("/api/account/$userId/notifications/99999");

    $response->assertStatus(404)
                ->assertJsonFragment([
                'metadata' => [
                    'message' => 'Notification not found or already marked as read.'
                ]
            ]);
}
  1. Run php artisan test
  2. Observe the performance outcome of both

Framework v10.33.0

laravel-framework-v10 33 0

Framework v10.34.2

laravel-framework-v10 34 2

Here's my composer.json file:

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^8.1",
        "deployer/deployer": "7.3.3",
        "doctrine/dbal": "^3.6",
        "guzzlehttp/guzzle": "^7.2",
        "lab404/laravel-impersonate": "1.7.4",
        "laravel-notification-channels/webhook": "2.5.0",
        "laravel/fortify": "1.19.0",
        "laravel/framework": "10.34.2",
        "laravel/horizon": "5.21.4",
        "laravel/sanctum": "3.3.2",
        "laravel/slack-notification-channel": "3.1.0",
        "laravel/telescope": "4.17.2",
        "laravel/tinker": "^2.8",
        "mongodb/laravel-mongodb": "4.0.2",
        "mtownsend/collection-xml": "^1.7",
        "mtownsend/request-xml": "2.3.0",
        "mtownsend/response-xml": "2.2.0",
        "nesbot/carbon": "2.71.*",
        "php-http/message-factory": "^1.1",
        "propaganistas/laravel-disposable-email": "2.2.15",
        "propaganistas/laravel-phone": "5.0.3",
        "psr/http-factory-implementation": "*",
        "rappasoft/laravel-authentication-log": "3.0.0",
        "rinvex/countries": "9.0.1",
        "sentry/sentry-laravel": "4.1.0",
        "spatie/cpu-load-health-check": "1.0.4",
        "spatie/laravel-health": "1.23.7",
        "spatie/laravel-permission": "6.1.0",
        "spatie/laravel-schedule-monitor": "3.4.1",
        "square1/laravel-collection-rolling-average": "1.0.0",
        "staudenmeir/laravel-adjacency-list": "1.13.11",
        "thomasjohnkane/snooze": "2.3.1",
        "torann/geoip": "3.0.5",
        "yoeriboven/laravel-log-db": "1.1.1"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/pint": "^1.0",
        "phpspec/prophecy": "~1.0",
        "laravel/sail": "1.26.2",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^7.0",
        "php-mock/php-mock": "^2.4",
        "phpunit/phpunit": "^10.0",
        "spatie/laravel-ignition": "^2.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
            "app/helpers.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}
View more
26 comments 👍 2
sts-ryan-holton

sts-ryan-holton

5th Dec 2023 @ 10:17

help wanted
View more
2 comments
nicolas-grekas

nicolas-grekas

19th Sep 2023 @ 10:56

help wanted

Laravel Version

10.34.2

PHP Version

8.1.26

Database Driver & Version

mariadb 10.5.8 (Laravel Sail)

Description

When dispatching jobs as part of a chain (using Bus::chain()) the uniqueness is not guaranteed.

Steps To Reproduce

  1. Create a new job
  2. Implement the Illuminate\Contracts\Queue\ShouldBeUnique interface
  3. Dispatch the job as part of a chain multiple times
  4. Check that job is in the queue multiple times instead of just once

Dispatch example:

Bus::chain([
    new NewUniqueJob(),
])->dispatch();

Some details about why I could use this right now (also in case someone can suggest a better way): I have an application that acts as a proxy between two other systems (A and B). System A sends an update request for one, multiple or all entities (e.g. entity 1 has been updated). The application then fetches those changes from System A and saves them to the database. Then the application sends a general "change" request to System B, which will then load and import all entities from the application.

Here's a simple sequence diagram:

In the end I have three jobs that have to be run in sequence:

  1. Load the new data from System A and save to database
  2. Clean up database (e.g. removing entities which were deleted in System A)
  3. Trigger import in System B.

Additional notes:

  • The reason for this complex system is the rigidity of the other systems: Both their APIs are built using no-code tools and are therefore quite inflexible. Both in their data structure and extensibility.
  • They're separate jobs because the first one could be scoped to one, multiple or all entities, whereas the third one is always the same.
  • In the third job I'm actually using ShouldBeUniqueUntilProcessing, but since that interface extends ShouldQueue I assume that's not relevant here.
  • Previously those steps were done synchronously, because response time wasn't a concern, since it's just APIs. The main reason I refactored to using Jobs is to take advantage of the uniqueness feature.

I'm hoping this will be implemented. If not, I suggest explicitly mentioning that in the docs.

View more
2 comments
tricki

tricki

6th Dec 2023 @ 15:11

bug help wanted

What happened?

After installation, I noticed that in the browser console it outputs an error of wireEl is undefined.

How to reproduce the bug

Just install this package in a livewire project, preferable with Filament's admin package. And see the browser console.

composer create-project laravel/laravel test;
composer require filamentphp/filament;
composer require spatie/laravel-blade-comments;

Then go through the browser console and see the error

Package Version

1.0.1

PHP Version

8.2.0

Laravel Version

10.13.0

Which operating systems does with happen with?

macOS

Notes

Filament ......................................................
Packages ...... filament, forms, notifications, support, tables
Version .............................................. v2.17.44
Views ..................................... PUBLISHED: filament

View more
4 comments 👍 1
sawirricardo

sawirricardo

2nd Jun 2023 @ 07:15

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

findapr

Im using PHPFlasher in a symfony application however it adds session state when not in use. I am combining it with API Platform and my API itself it stateless so it should not hold any session data (causes errors).

How should i handle this (if even possible?)

View more
13 comments
pimjansen

pimjansen

2nd Jun 2023 @ 12:24

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
1 comment
colinmackinlay

colinmackinlay

20th Nov 2022 @ 12:31

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

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
6 comments
driesvints

driesvints

31st Jul 2021 @ 18:43

bug help wanted good first issue

Describe the bug Trait Spatie\Activitylog\Traits\LogsActivity on line 371 tries to call getStorableEnumValue method on an Eloquent model. package.json file of the spatie/laravel-activitylog repository requires Laravel version ^8.0 || ^9.0 || ^10.0, but for example in Laravel 9.26.0 there was no getStorableEnumValue method implemented yet. It was added later. For example it is present in Laravel 9.52.15.

To Reproduce Create a new Laravel 9.0.0 app (not newer version!) Then install Spatie Laravel Activity Log. Then reproduce steps here: https://spatie.be/docs/laravel-activitylog/v4/advanced-usage/logging-model-events You will end up with the Call to undefined method App\\Models\\SomeModel::getStorableEnumValue() exception.

Expected behavior It should automatically upgrade my Laravel app to proper version. 9.0.0 is not new enough. You should change the minimal Laravel version in package.json.

Versions (please complete the following information)

  • PHP: 8.1
  • Laravel: 9.26.0
  • Package: spatie/laravel-activitylog

Additional context I faced this issue in Laravel 9.26.0. Then I simply upgraded my app with $ composer update. Then my Laravel version raised to 9.52.15 and the problem disappeared. So I suppose that the Laravel developers added getStorableEnumValue somewhere between version 9.26.0 and 9.52.15.

View more
3 comments
mspiderv

mspiderv

22nd Aug 2023 @ 17:12

help wanted

Hello,

I noticed that there is an incompatibility with the mbstring polyfill and PHP 8.1 / Alpine Linux, which breaks a lot of my projects as soon as the php81-mbstring is not installed, but php81-iconv is installed:

Example:

Warning: iconv(): Wrong encoding, conversion from "ASCII" to "UTF-8//IGNORE" is not allowed in phar:///var/www/localhost/htdocs/phpstan.phar/vendor/symfony/polyfill-mbstring/Mbstring.php on line 736

It looks like //IGNORE is not accepted since echo iconv('UTF-8', 'UTF-8', 'test'); works, while echo iconv('UTF-8', 'UTF-8//IGNORE', 'test'); doesn't

View more
2 comments
danielmarschall

danielmarschall

7th Jan 2022 @ 00:12

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