Found 34 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
  • Laravel Version: v9.36.4
  • PHP Version: 8.1
  • Database Driver & Version: not relevant

Description:

Delaying a job like this works:

SomeJob::dispatch()->delay(now()->addMinute());

But this doesn't work, it ignores the delay and instantly processes the job:

$job = new SomeJob();

$job->delay(now()->addMinute());

Queue::push($job);

As far as I can tell, this happens because Queue::push() doesn't pass down the $job->delay to the EnqueueUsing method.

Steps To Reproduce:

  1. Make sure your queue connection supports delay (so anything except sync)
  2. Make a job that implements ShouldQueue
  3. Dispatch the job with a delay like shown above
  4. Watch the job get processed instantly without a delay
View more
1 comment
SjorsO

SjorsO

24th Mar 2023 @ 07:49

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
  • 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

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

If a pack lists things in its "replace" section, unpacking this pack should copy these rules into the "replace" section of the root composer.json.

I think that implementing this requires patching the Unpacker class only.

Anyone up to give it a try?

View more
2 comments
nicolas-grekas

nicolas-grekas

8th Jul 2020 @ 18:35

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

KKSzymanowski

28th Sep 2022 @ 21:53

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

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

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

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

Summary

It seems that this polyfill incorrectly case-folds the ẞ character to ß instead of ss.

Details

Running this code on PHP 7.3 with mbstring installed:

echo mb_convert_case('ẞ', MB_CASE_FOLD);

Will produce this output: ss

However, when I run that same input through this polyfill (master branch):

echo \Symfony\Polyfill\Mbstring\Mbstring::mb_convert_case('ẞ', \Symfony\Polyfill\Mbstring\Mbstring::MB_CASE_FOLD);

I instead get ß. This does not match mbstring's behavior on PHP 7.3.

View more
2 comments
colinodell

colinodell

1st May 2019 @ 07:50

help wanted
  • Laravel Version: 9.39.0
  • PHP Version: 8.1.8
  • Database Driver & Version: MariaDB

Description:

Queue job implementing ShouldQueue and ShouldBeUnique and dispatched via Job::dispatch()->afterResponse() acquires lock using UniqueLock in PendingDispatch::shouldDispatch(). Then job is run using app(Dispatcher::class)->dispatchAfterResponse($this->job). After job is done there is nothing that runs something similar to CallQueuedHandler::ensureUniqueJobLockIsReleased().

Steps To Reproduce:

  1. Create queue job implementing ShouldQueue, ShouldBeUnique
  2. Implement uniqueId()
  3. Dispatch via Job::dispatch()->afterResponse()
  4. Dispatch again via Job::dispatch()->afterResponse() and it will not work since lock is still acquired.
View more
1 comment πŸ‘ 2 πŸš€ 1
spiechu

spiechu

21st Mar 2023 @ 15:05

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

driesvints

16th Feb 2022 @ 15:26

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
  • Laravel Version: 9.52.4
  • PHP Version: 8.2.3
  • Database Driver & Version:
    • MySQL 8.0.29

Description:

$this->getHttpClient()
            ->withUrlParameters([
                'node' => $this->node->cluster,
                'server' => $this->server->vmid
            ])
            ->delete('/api2/json/nodes/{node}/qemu/{server}', [
                'destroy-unreferenced-disks' => true, 'purge' => true, 'skiplock' => true,
            ])
            ->json();

The Laravel HTTP Client doesn't appear to add the payload in the second argument to the delete method as query parameters to the request. Though, I am not completely sure that this is the case from my superficial analysis (I can't seem to make sense of the Http Client's code nor am I getting enough information from the dd method on the Http Client to properly determine the issue).

When I send the request to the API service (Proxmox Virtual Environment), I receive a HTTP error 501. Here's the contents of the dd method on the Http Client. Information like the base_uri and any confidential information was redacted and filled with placeholder data.

array:13 [ // vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php:1102
  "connect_timeout" => 5
  "http_errors" => false
  "timeout" => 15
  "verify" => false
  "base_uri" => "https://redacted.com:8006/"
  "laravel_data" => array:3 [
    "destroy-unreferenced-disks" => true
    "purge" => true
    "skiplock" => true
  ]
  "on_stats" => Closure($transferStats)^ {#5048
    class: "Illuminate\Http\Client\PendingRequest"
    this: Illuminate\Http\Client\PendingRequest {#5019 …}
  }
  "synchronous" => true
  "handler" => GuzzleHttp\HandlerStack^ {#5033
    -handler: Closure(RequestInterface $request, array $options): PromiseInterface^ {#5039
      returnType: "GuzzleHttp\Promise\PromiseInterface"
      class: "GuzzleHttp\Handler\Proxy"
      use: {
        $default: Closure(RequestInterface $request, array $options): PromiseInterface^ {#5026 …}
        $streaming: GuzzleHttp\Handler\StreamHandler {#5036 …}
      }
    }
    -stack: array:7 [
      0 => array:2 [
        0 => Closure(callable $handler): callable^ {#5040
          returnType: "callable"
          class: "GuzzleHttp\Middleware"
          use: {
            $bodySummarizer: null
          }
        }
        1 => "http_errors"
      ]
      1 => array:2 [
        0 => Closure(callable $handler): RedirectMiddleware^ {#5041
          returnType: "GuzzleHttp\RedirectMiddleware"
          class: "GuzzleHttp\Middleware"
        }
        1 => "allow_redirects"
      ]
      2 => array:2 [
        0 => Closure(callable $handler): callable^ {#5042
          returnType: "callable"
          class: "GuzzleHttp\Middleware"
        }
        1 => "cookies"
      ]
      3 => array:2 [
        0 => Closure(callable $handler): PrepareBodyMiddleware^ {#5043
          returnType: "GuzzleHttp\PrepareBodyMiddleware"
          class: "GuzzleHttp\Middleware"
        }
        1 => "prepare_body"
      ]
      4 => array:2 [
        0 => Closure($handler)^ {#5045
          class: "Illuminate\Http\Client\PendingRequest"
          this: Illuminate\Http\Client\PendingRequest {#5019 …}
        }
        1 => ""
      ]
      5 => array:2 [
        0 => Closure($handler)^ {#5046
          class: "Illuminate\Http\Client\PendingRequest"
          this: Illuminate\Http\Client\PendingRequest {#5019 …}
        }
        1 => ""
      ]
      6 => array:2 [
        0 => Closure($handler)^ {#5047
          class: "Illuminate\Http\Client\PendingRequest"
          this: Illuminate\Http\Client\PendingRequest {#5019 …}
        }
        1 => ""
      ]
    ]
    -cached: Closure($request, array $options)^ {#5060
      class: "GuzzleHttp\Middleware"
      use: {
        $handler: GuzzleHttp\RedirectMiddleware {#5059 …}
        $bodySummarizer: null
      }
    }
  }
  "cookies" => GuzzleHttp\Cookie\CookieJar^ {#5049
    -cookies: []
    -strictMode: false
  }
  "allow_redirects" => array:5 [
    "max" => 5
    "protocols" => array:2 [
      0 => "http"
      1 => "https"
    ]
    "strict" => false
    "referer" => false
    "track_redirects" => false
  ]
  "decode_content" => true
  "idn_conversion" => false
]

Although MDN specifies that a DELETE request may have a body, it seems like many (from my limited search) prefer to use query parameters over using a body.

A workaround I am using is:

$this->getHttpClient(options: [
            'query' => [
                'destroy-unreferenced-disks' => true,
                'purge' => true,
            ]
        ])
            ->withUrlParameters([
                'node' => $this->node->cluster,
                'server' => $this->server->vmid
            ])
            ->delete('/api2/json/nodes/{node}/qemu/{server}')
            ->json();

I don't feel like this is an ideal workaround and would love to use the expressive syntax of Laravel.

Here are links to the code containing the mentioned snippets.

Steps To Reproduce:

A reproduction is possible by running

$httpClient = Http::withOptions([
            'verify' => false,
            'base_uri' => "https://YOUR_DOMAIN/",
            'timeout' => 15,
            'connect_timeout' => 5,
            'headers' => [
                'Authorization' => 'DUMMY AUTHORiZATION HEADER',
                'Accept' => 'application/json',
                'Content-Type' => 'application/json',
                'User-Agent' => null,
            ],
        ]);

$httpClient->delete('/route', [
    'query-parameter' => 'test'
]);

If you want a complete reproduction, please install my app using my documentation. It uses Docker containers and the installation process is mostly copy-paste with few interventions to add your desired configuration.

Since my app interacts with an external service, you need to also create a VM, dedicated server, or bare metal that's running (Proxmox Virtual Environment). If you have my app APP_ENV to production, make sure you generate trusted TLS certificates on the Proxmox Virtual Environment server.

You can then add the Proxmox node to my app using these documentation.

View more
3 comments
ericwang401

ericwang401

17th Mar 2023 @ 18:00

help wanted
  • Laravel Version: 9.50.1
  • PHP Version: 8.1.14
  • Database Driver & Version: MariaDB 10.6.11

Description:

I have multiple database connections configured in my application. I have also configured a separate connection for migrations and that user has the necessary elevated privileges to perform these types of queries.

Laravel supports defining the database connection to use as a property of the Migration class. When writing migrations for the various databases we have configured, we use this connection property and also specify the database with the table name.

When a migration requires DBAL, the specification of the database is ignored and the database of the $connection property is used.

Steps To Reproduce:

return new class extends Migration
{

    //database connection, configured with a different database name (e.g. new_database) than below (database_name)
    protected $connection = 'migrations';

    public function up()
    {
        //will work because does not use DBAL
        Schema::table('database_name.table_name', function (Blueprint $table) {
            $table->boolean('new_column');
        });
        //will not work, database is ignored when passed to DBAL
        Schema::table('database_name.table_name', function (Blueprint $table) {
            $table->boolean('new_column')->default(0)->change();
        });
    }

};

An example database configuration (config/database.php) for added clarity:

return [
    'connections' => [
        'migrations' => [
            'driver' => 'mysql',
            'host' => '127.0.0.1',
            'port' => '3306',
            'database' => 'new_database',
            //this user also has required privileges on 'database_name' below
            'username' => 'migrations_user',
            'password' => '*****',
            'unix_socket' => '',
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'prefix_indexes' => true,
            'strict' => false,
            'engine' => null
        ],
        'main' => [
            'driver' => 'mysql',
            'host' => '127.0.0.1',
            'port' => '3306',
            'database' => 'database_name',
            'username' => 'database_user',
            'password' => '***',
            'unix_socket' => '',
            'charset' => 'utf8mb4',
            'collation' => 'utf8mb4_unicode_ci',
            'prefix' => '',
            'prefix_indexes' => true,
            'strict' => true,
            'engine' => null,
        ]
    ]
];

This will produce the error that the column does not exist, because it checks for the column on the table in the default database for the migrations connection.

 Doctrine\DBAL\Schema\Exception\ColumnDoesNotExist 

  There is no column with name "new_column" on table "table_name".

  at vendor/doctrine/dbal/src/Schema/Exception/ColumnDoesNotExist.php:16
View more
2 comments
asiral

asiral

8th Feb 2023 @ 10:09

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

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

krisc78

9th Mar 2023 @ 14:49

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

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

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

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

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

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

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

help wanted
  • Laravel Version: 9.50.2
  • PHP Version: 8.0.27
  • Database Driver & Version: PostgreSQL 15

Description:

When an exception is thrown inside a Monolog handler and ignore_exceptions => false is set in logging.php then artisan commands will return with a 0 as exit code. This should not be zero.

As an example, see here a seeder that fails for some reason. There is no existing Redis connection, so the GraylogHandler fails to log the error and an exception is thrown. This exception is uncaught and the command exits. However, it does so with a 0 exit code.

It can be solved by setting ignore_exceptions = true, however I think the command should always exit with a non-zero exit code in case of an uncaught exception.

user@c8af5d5c3c28:/usr/src/app$ php artisan db:seed

   INFO  Seeding database.

  Database\Seeders\UsersTableSeeder .......................................................... RUNNING

   RedisException

  php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

  at [internal]:0
      1β–•

      +16 vendor frames
  17  app/Services/Logging/GraylogHandler.php:45
      Illuminate\Support\Facades\Facade::__callStatic("attempt")

      +7 vendor frames
  25  app/Exceptions/Handler.php:52
      Illuminate\Foundation\Exceptions\Handler::report(Object(RedisException))
user@c8af5d5c3c28:/usr/src/app$ echo $?
0

Steps To Reproduce:

  • Write an artisan command that throws an exception that is caught by your logging stack
  • Ensure a Monolog handler in the stack also throws an exception
  • Set ignore_exceptions => false in logging.php
  • Run artisan command
View more
5 comments
fherenius

fherenius

1st Mar 2023 @ 09:02

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.3.3
  • PHP Version: 8.2.4
  • Database Driver & Version: Mysql 8

Description:

similar to https://github.com/laravel/framework/issues/46327 this is basically related to : $batch->failed_job_ids is null thus array_diff will fail on null

 public function decrementPendingJobs(string $batchId, string $jobId)
    {
        $values = $this->updateAtomicValues($batchId, function ($batch) use ($jobId) {
            return [
                'pending_jobs' => $batch->pending_jobs - 1,
                'failed_jobs' => $batch->failed_jobs,
                'failed_job_ids' => json_encode(array_values(array_diff(json_decode($batch->failed_job_ids, true), [$jobId]))),
            ];
        });

        return new UpdatedBatchJobCounts(
            $values['pending_jobs'],
            $values['failed_jobs']
        );
    }

and also here with same case

 /**
     * Increment the total number of failed jobs for the batch.
     *
     * @param  string  $batchId
     * @param  string  $jobId
     * @return \Illuminate\Bus\UpdatedBatchJobCounts
     */
    public function incrementFailedJobs(string $batchId, string $jobId)
    {
        $values = $this->updateAtomicValues($batchId, function ($batch) use ($jobId) {
            return [
                'pending_jobs' => $batch->pending_jobs,
                'failed_jobs' => $batch->failed_jobs + 1,
                'failed_job_ids' => json_encode(array_values(array_unique(array_merge(json_decode($batch->failed_job_ids, true), [$jobId])))),
            ];
        });

        return new UpdatedBatchJobCounts(
            $values['pending_jobs'],
            $values['failed_jobs']
        );
    }

Steps To Reproduce:

  • Cannot easily reproduced since it doesn't occur only on interruptions but can be reproduced as below manually:
  • Create a batch and run it through cli or whatever
  • Run the queue worker for a couple of seconds (until one of the jobs was executed at least)
  • stop the worker
  • Check the database table and overwrite the failed_job_ids column in job_batches table and set it to NULL or empty string
  • Make the next job to run fail explicitly
  • Run the queue worker
  • Check the failed_jobs table or the logs file you 'll get the same exception as mentioned above in description
View more
2 comments
naciriii

naciriii

24th Mar 2023 @ 15:02

help wanted

Hi,

With the polyfill, var_dump(mb_strlen(chr(254))) return 0. With the php8.0-mbstring extension, var_dump(mb_strlen(chr(254))) return 1;

versions : * v1.26.0

Thanks, Alex

View more
7 comments
alexchuin

alexchuin

18th Oct 2022 @ 12:51

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