- standard tags
- input fields
- components
- patterns
Add code snippets for each block
Repositories:
(698)
Labels:
(5)
findapr
good first issue
first issue
first pr
help wanted
Found 46 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.
Add code snippets for each block
willemvb
25th Jul 2016 @ 12:49
10.46.0
8.1.27
No response
We've identified an issue whereby in multi-server environments where commands are scheduled to run using withoutOverlapping()
and onOneServer()
, the commands will very occasionally not run at all on any server (about 0.2% of the time in our environment). Not a problem for things running every minute where we first spotted the problem, but more impactful when things running a few times or once per day are skipped.
Just going to start with outlining my understanding of how scheduled commands get run when withoutOverlapping()
and onOneServer()
are used:
withoutOverlapping()
a check is added to the filters to ensure the event mutex lock does not currently exist (Event::withoutOverlapping, L713)serverShouldRun()
is then called to check for and take a scheduling lock for the current server to run the command for the current hour/minute (ScheduleRunCommand::runSingleServerEvent, L156)Event::run
is called (Event::run, L217)shouldSkipDueToOverlapping()
is called which checks whether withoutOverlapping()
was used and checks that the event lock can be obtained (Event::shouldSkipDueToOverlapping, L237)Just for clarity, there's two locks in play;
withoutOverlapping()
to identify whether a command is already being run.onOneSever()
to check whether a command has already been run on a server for the current schedule run (identified by the current hour and minute.)The problem stems from the way in which the event mutex lock is checked for existence, which was introduced in PR #45963.
Originally, the CacheEventMutex would just check if the cache had an entry for the lock (CacheEventMutex::exists, L69) which worked fine, but PR #45963 changed that behavior. For cache stores that implement the LockProvider interface (Redis, Memcached) it now attempts to get the lock and then immediately releases it again (but this is not done atomically.)
So the race condition looks something like this if Server B's system clock is just slightly slower than Server A:
Time | Server A | Server B |
---|---|---|
12:00:00 | Checking that Event A is not currently running, takes event lock for Event A | |
12:00:01 | Releases event lock for Event A, determining that it is not currently running so should be run | |
12:00:02 | Takes scheduling lock for Event A to run on Server A | |
12:00:03 | Checking that Event A is not currently running, takes event lock for Event A | |
12:00:04 | Attempts to take the event lock for Event A to run it, fails because Server B has the lock, then skips due to overlapping | |
12:00:05 | Releases event lock for Event A, determining that it is not currently running so should be run | |
12:00:06 | Attempts to take scheduling lock for Event A to run on Server B, fails as the scheduling lock was already taken by Server A, skips assuming command was run on another server already |
So in this scenario the scheduled command is never run, there's no error message, and the ScheduledTaskSkipped
doesn't even get fired because the call to run()
just returns if shouldSkipDueToOverlapping()
returns true
.
In terms of a solution, it might make sense to be able to check for the existence of a lock without taking and releasing it, maybe a new abstract exists()
on Lock (https://github.com/laravel/framework/blob/10.x/src/Illuminate/Cache/Lock.php) which CacheEventMutex could use and RedisLock/MemcachedLock could implement their own atomic means of checking for lock existence, although that probably constitutes a backwards-compatibility break. Happy to put together a PR for whatever the agreed solution is.
As a workaround, I've just bound an older version of CacheEventMutex to Illuminate\Console\Scheduling\EventMutex
to override the changes implemented in #45963 which has solved the issue in our project for now.
Given its a race condition its very hard to reproduce, but hopefully there's enough details in the description to understand what's going on.
nickma42
1st Mar 2024 @ 15:30
10.45.1
8.1.27
No response
The getPrefix()
method of the Illuminate\Routing\Route
returns different values for non-cached and cached routes:
/{locale}
- the return value of the getPrefix() method for a non-cached route{locale}
- the return value of the getPrefix() method for a cached routeThis discrepancy in the results for non-cached/cached routes seems a sort of bug to me.
This issue might be related with #43882 and #43997.
After installing a new Laravel project, just add a route group to the web
routes (the /routes/web.php
file). For example:
Route::group([
'prefix' => '{locale}',
'where' => ['locale' => 'en|fr|de'],
], function () {
Route::get('/', function () {
return view('welcome');
});
});
Then, use the tinker
tool to get the registered routes and check the getPrefix()
return values.
Let's check the non-cacned routes:
$routes = app('router')->getRoutes()->get('GET');
foreach ($routes as $route) {
dump($route->getPrefix());
}
The result is going to be:
Then, we can cache the routes with artisan route:cache
command and use tinker
again.
$routes = app('router')->getRoutes()->get('GET');
foreach ($routes as $route) {
dump($route->getPrefix());
}
The result is going to be:
kudashevs
25th Feb 2024 @ 12:39
Figure our a way to show a grayed out Laravel logo as a default avatar instead of the current default GitHub one.
driesvints
29th Sep 2021 @ 10:48
filament/filament
v3.2.57
v11.0.7
v3.4.9
PHP 8.2.16
I split my form in multi sections, in first one, Select and Datepicker are ->native(false)
and ->live()
to permit to see a third component (another Select) when values are set.
When I choose an option on first Select, many errors occur in browser console
Alpine Expression Error: displayText is not defined...
Alpine Expression Error: focusedMonth is not defined...
Alpine Expression Error: months is not defined...
Alpine Expression Error: focusedYear is not defined...
Alpine Expression Error: dayLabels is not defined...
Alpine Expression Error: emptyDaysInFocusedMonth is not defined...
Alpine Expression Error: daysInFocusedMonth is not defined...
Same problem when I edit a record, when I change option, same errors appear
->native(false)
of all Datepicker, no errors but I need minDate, maxDate etc.->spa()
in AdminPanelProvider
, no errors->spa()
->spaUrlExceptions(fn (): array => [
url('/admin'),
PostResource::getUrl(),
])
erros occur too
No error should appears
You can see this problem by cloning reproduction repository
https://github.com/agencetwogether/spa-datepicker
No response
agencetwogether
20th Mar 2024 @ 21:22
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.
JWo1F
18th Dec 2017 @ 08:52
The goal is to make abstract code based on the package notorm to build a new orm system
ambroisehdn
15th Jun 2022 @ 12:34
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.
ntwb
25th Feb 2018 @ 10:49
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: � - mbstring: ; polyfill: �
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring:; polyfill: 
Mismatch:  - mbstring:
; polyfill: 
Mismatch:  - mbstring:
; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch: ' - mbstring: '; polyfill: '
Mismatch:  - mbstring: ; polyfill: 
Mismatch: € - mbstring: ; polyfill: €
Mismatch:  - mbstring: ; polyfill: 
Mismatch: ‚ - mbstring: ; polyfill: ‚
Mismatch: ƒ - mbstring: ; polyfill: ƒ
Mismatch: „ - mbstring: ; polyfill: „
Mismatch: … - mbstring:
; polyfill: …
Mismatch: † - mbstring: ; polyfill: †
Mismatch: ‡ - mbstring: ; polyfill: ‡
Mismatch: ˆ - mbstring: ; polyfill: ˆ
Mismatch: ‰ - mbstring: ; polyfill: ‰
Mismatch: Š - mbstring: ; polyfill: Š
Mismatch: ‹ - mbstring: ; polyfill: ‹
Mismatch: Œ - mbstring: ; polyfill: Œ
Mismatch:  - mbstring: ; polyfill: 
Mismatch: Ž - mbstring: ; polyfill: Ž
Mismatch:  - mbstring: ; polyfill: 
Mismatch:  - mbstring: ; polyfill: 
Mismatch: ‘ - mbstring: ; polyfill: ‘
Mismatch: ’ - mbstring: ; polyfill: ’
Mismatch: “ - mbstring: ; polyfill: “
Mismatch: ” - mbstring: ; polyfill: ”
Mismatch: • - mbstring: ; polyfill: •
Mismatch: – - mbstring: ; polyfill: –
Mismatch: — - mbstring: ; polyfill: —
Mismatch: ˜ - mbstring: ; polyfill: ˜
Mismatch: ™ - mbstring: ; polyfill: ™
Mismatch: š - mbstring: ; polyfill: š
Mismatch: › - mbstring: ; polyfill: ›
Mismatch: œ - mbstring: ; polyfill: œ
Mismatch:  - mbstring: ; polyfill: 
Mismatch: ž - mbstring: ; polyfill: ž
Mismatch: Ÿ - mbstring: ; polyfill: Ÿ
While many of these are control characters (and the native function does return them), the single quote (dec 39) is particularly problematic.
cpeel
18th Mar 2021 @ 04:11
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
truechernyshov
11th Jan 2020 @ 10:59
11.0.7
8.3.3
No response
This is a little tricky, but I ran into this issue after upgrading to Laravel 11 and first suspected it was a problem with Blade Heroicons Kit.
In Laravel 11 the optimize
command was extended to cache events and views.
When running optimize on a fresh app with the Heroicons kit it blew up:
➜ heroicons php artisan optimize
INFO Caching framework bootstrap, configuration, and metadata.
config ............................................................................................................................... 7.62ms DONE
events ............................................................................................................................... 0.71ms DONE
routes ............................................................................................................................... 5.56ms DONE
views ............................................................................................................................... 28.61ms FAIL
InvalidArgumentException
Unable to locate a class or view for component [heroicon-s-bars-3].
at vendor/laravel/framework/src/Illuminate/View/Compilers/ComponentTagCompiler.php:311
307▕ if (Str::startsWith($component, 'mail::')) {
308▕ return $component;
309▕ }
310▕
➜ 311▕ throw new InvalidArgumentException(
312▕ "Unable to locate a class or view for component [{$component}]."
313▕ );
314▕ }
315▕
+2 vendor frames
3 [internal]:0
Illuminate\View\Compilers\ComponentTagCompiler::Illuminate\View\Compilers\{closure}(["<x-heroicon-s-bars-3 />", "heroicon-s-bars-3", "", ""])
+7 vendor frames
11 [internal]:0
Illuminate\Foundation\Console\ViewCacheCommand::Illuminate\Foundation\Console\{closure}(Object(Symfony\Component\Finder\SplFileInfo), "/Users/dwight/Sites/heroicons/resources/views/welcome.blade.php")
However, running php artisan view:cache
runs fine.
Through playing with the optimize
command I realised two things:
config
or route
caching from optimize
then it works fine. Something that happens in the config:cache
or route:cache
command is affecting what happens in the view:cache
command.BladeCompiler
from the container and the one that is received inside the ViewCacheCommand
appear to be different (and the second doesn't have the Heroicon aliases available)laravel new heroicons
cd heroicons
composer require blade-ui-kit/blade-heroicons
Add an icon to the welcome page: <x-heroicon-s-bars-3 />
dwightwatson
18th Mar 2024 @ 08:58
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.
IonBazan
12th May 2018 @ 23:26
Add in PHP 7.3 as Normalizer::normalize() argument for NFKC_Casefold normalization.
nicolas-grekas
7th Feb 2019 @ 10:11
10.45.0
8.3.1
No response
When using Tailwind's container queries plugin with the @class
directive, Blade either throws exceptions about unexpected endif or simply doesn't compile the classes correct. Using Arr::toCssClasses
directly works as expected.
The following examples are in the reproduction repo. (Note: Tailwind isn't installed and configured, but it isn't necessary to show the issues with the Blade compiler.)
/success
shows everything working as expected with the Arr::toCssClasses
I suspect this is working due to Blade wrapping everything in e()
.
Here's a snippet of the code that works (full example in the repo):
@if (filled($heading))
<h1
class="{{
Illuminate\Support\Arr::toCssClasses([
'font-bold tracking-tight text-gray-900 @xs:text-4xl @md:text-6xl',
'mt-10' => filled($callout),
'@xs:mt-24 @md:mt-32 @xl:mt-16' => blank($callout)
])
}}"
>
{{ $heading }}
</h1>
@endif
@if (filled($description))
<div
class="{{
Illuminate\Support\Arr::toCssClasses([
'text-lg/8 text-gray-600',
'mt-6' => filled($heading),
'mt-10' => filled($callout) && blank($heading),
'@xs:mt-24 @md:mt-32 @xl:mt-16' => blank($callout) && blank($heading),
])
}}"
>
{{ $description }}
</div>
@endif
/failure
shows the exception (though this may be compounded by wrapping the HTML in conditionals)
Here's a snippet of the code that throws an exception (full example in the repo):
@if (filled($heading))
<h1
@class([
'font-bold tracking-tight text-gray-900 @xs:text-4xl @md:text-6xl',
'mt-10' => filled($callout),
'@xs:mt-24 @md:mt-32 @xl:mt-16' => blank($callout)
])
>
{{ $heading }}
</h1>
@endif
@if (filled($description))
<div
@class([
'text-lg/8 text-gray-600',
'mt-6' => filled($heading),
'mt-10' => filled($callout) && blank($heading),
'@xs:mt-24 @md:mt-32 @xl:mt-16' => blank($callout) && blank($heading),
])
>
{{ $description }}
</div>
@endif
/incorrect
is the same thing as /failure
but without the conditionals (you can see that the content of the @class
call is simply output on the page)
Here's a snippet of the code that compiles incorrectly (full example in the repo):
<h1
@class([
'font-bold tracking-tight text-gray-900 @xs:text-4xl @md:text-6xl',
'mt-10' => filled($callout),
'@xs:mt-24 @md:mt-32 @xl:mt-16' => blank($callout)
])
>
{{ $heading }}
</h1>
<div
@class([
'text-lg/8 text-gray-600',
'mt-6' => filled($heading),
'mt-10' => filled($callout) && blank($heading),
'@xs:mt-24 @md:mt-32 @xl:mt-16' => blank($callout) && blank($heading),
])
>
{{ $description }}
</div>
agentphoenix
21st Feb 2024 @ 02:24
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.
javiereguiluz
21st May 2018 @ 09:37
Let's put something more beautiful here than the current layout. Maybe something similar than the Tailwind UI empty state pages.
https://tailwindui.com/components/application-ui/feedback/empty-states
driesvints
12th Mar 2024 @ 10:20
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
danielmarschall
7th Jan 2022 @ 00:12
filament/spatie-laravel-translatable-plugin
v3.2
v10.10
v3.0
PHP 8.2
I have topic_id in Post & Articles connected with topic_id with relation topic, but when I tried to set locales for the Article & Post Title and other content that was added worked perfectly, but topic related data does not work I mean it does not change the translation When I tried to debug it is working perfectly but in view it does not change
Forms\Components\Select::make('topic_id')
->relationship('topic')
->getOptionLabelFromRecordUsing(function (Topic $topic, $livewire) {
Log::info('Active Locale: ' . $livewire->activeLocale);
$translatedTitle = $topic->getTranslation('title', $livewire->activeLocale);
Log::info('Translated Title: ' . $translatedTitle);
return $translatedTitle ?? $topic->title; // Fallback to default title if translation is not available
})
->searchable()
->live()
->required(),
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Deserunt.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Incidunt sunt est animi.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Totam libero aspernatur est.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Et tempore voluptatum.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Nemo et sint.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Repellat consequatur dolores nostrum numquam.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Earum tenetur.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Aut sunt blanditiis blanditiis ut.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Provident vel.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Qui voluptas ut.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Sapiente ut exercitationem assumenda nesciunt.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Eveniet voluptatem consequuntur eum.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Ipsa ipsa dicta corrupti.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Qui veniam nulla ut earum.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: At asperiores consequuntur.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Ut.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Voluptatibus quisquam laboriosam eligendi dolores provident distinctio id deserunt.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Earum soluta.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Voluptatem voluptatibus dolores.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Rerum esse aut.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Dolore.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Quos modi illo est et molestiae.
[2024-01-31 12:53:57] local.INFO: Active Locale: en
[2024-01-31 12:53:57] local.INFO: Translated Title: Hic cum.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Eum et rerum.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Nihil voluptate voluptas est aliquid debitis qui doloremque non voluptate corporis.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Alias in consequuntur officiis.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Iste qui sunt omnis et eaque in.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Quas hic.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Incidunt animi perspiciatis natus doloremque commodi aut delectus.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Et ut.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Voluptatem qui inventore nobis itaque et magni.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Voluptatem libero.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Vero et modi veniam quidem.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Dolorum architecto ut deleniti repudiandae quidem sit non.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Rem dolorum rerum pariatur libero rerum.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Tempore distinctio autem commodi.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Ut sequi perferendis distinctio consequatur accusantium.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Esse hic eum saepe officiis sapiente.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Eveniet consectetur numquam architecto consectetur architecto quo nostrum.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Maiores qui ut non.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Blanditiis dolorum provident non suscipit.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Impedit sunt odio illo.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Ea reiciendis facere eligendi dignissimos voluptate architecto.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Quo corrupti ut illum.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Delectus eaque.
[2024-01-31 12:54:05] local.INFO: Active Locale: ar
[2024-01-31 12:54:05] local.INFO: Translated Title: Omnis dignissimos exercitationem praesentium.
It should have changed the select locale title
Installed Package filament/spatie-laravel-translatable-plugin
Set up the Models and Migrations Accordingly: Article Model:
<?php
namespace App\Models;
use App\Concerns\HasMeta;
use App\Concerns\Sluggable;
use App\Concerns\HasFeaturedImage;
use App\Concerns\HasPublishedScope;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Spatie\Translatable\HasTranslations;
class Article extends Model
{
use HasPublishedScope, Sluggable, HasFactory, HasMeta, SoftDeletes, HasFeaturedImage, HasTranslations;
public $translatable = ['title', 'content', 'excerpt'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title',
'slug',
'status',
'author_id',
'content',
'excerpt',
'published_at',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'published_at' => 'datetime',
'content' => 'array',
];
protected $with = [
'meta',
];
public function getPublicUrl()
{
return route('articles.show', $this);
}
public function topic(): BelongsTo
{
return $this->belongsTo(Topic::class, 'topic_id', 'id');
}
public function author(): BelongsTo
{
return $this->belongsTo(User::class, 'author_id');
}
}
Topic Model:
<?php
namespace App\Models;
use App\Concerns\HasMeta;
use App\Concerns\Sluggable;
use App\Concerns\HasFeaturedImage;
use App\Concerns\HasPublishedScope;
use Illuminate\Database\Eloquent\Model;
use Spatie\Translatable\HasTranslations;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Topic extends Model
{
use HasPublishedScope, Sluggable, HasFactory, HasMeta, SoftDeletes, HasFeaturedImage, HasTranslations;
public $translatable = ['title', 'content', 'excerpt'];
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'title',
'slug',
'status',
'excerpt',
'content',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'id' => 'integer',
'indexable' => 'boolean',
'content' => 'array',
];
protected $with = [
'meta',
];
public function getPublicUrl()
{
return route('topics.show', $this);
}
public function articles()
{
return $this->hasMany(Article::class);
}
}
Images: English Arabic
https://github.com/abbasmashaddy72/filament-starter-kit
No response
abbasmashaddy72
31st Jan 2024 @ 07:42
In raising this issue, I confirm the following (please check boxes):
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.
Erikvv
1st Feb 2018 @ 02:19
After installation, I noticed that in the browser console it outputs an error of wireEl is undefined.
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
1.0.1
8.2.0
10.13.0
macOS
Filament ......................................................
Packages ...... filament, forms, notifications, support, tables
Version .............................................. v2.17.44
Views ..................................... PUBLISHED: filament
sawirricardo
2nd Jun 2023 @ 07:15
Hi,
I have an issue in my dockerized Laravel 10 app and flasher 1.15.3
. The issue is that notifications are not displayed when I'm using something like this:
public function customRoute(Request $request): RedirectResponse
{
// action
flash()->addSuccess('Success notification.');
return redirect()->back();
}
When I'm redirecting notification won't be displayed, but when directly returning view it works. It behaves like that because of this part of code in your package:
final class StorageBag implements StorageInterface
{
/**
* @var BagInterface
*/
private $bag;
public function __construct(BagInterface $bag = null)
{
$this->bag = null !== $bag && 'cli' !== \PHP_SAPI ? $bag : new ArrayBag();
}
especially this 'cli' !== \PHP_SAPI
because since we are using docker our app is in CLI mode. Can anoyone tell my why this PHP_SAPI check has to be present here?
forexknight
13th Sep 2023 @ 05:19
10.42.0
8.3.2
Redis 7.2.4
Queued jobs with ShouldBeUnique may cause stale unique locks in the case when the dependent model is missing.
According to the source code of the CallQueuedHandler::call() unique lock cleanup may never be reached in case if the job depends on the missing model AND the job is configured to be deleted when the model is missing (public $deleteWhenMissingModels = true
).
The PoC is made using Redis queue, a similar approach may work with other drivers.
laravel new poc
..env
file. WARNING: PoC will flush all keys.<?php
use Illuminate\Bus\Queueable;
use Illuminate\Queue\WorkerOptions;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\Facades\Redis;
use Illuminate\Queue\SerializesModels;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
require 'vendor/autoload.php';
$app = require __DIR__.'/bootstrap/app.php';
$cli = $app->make(Kernel::class);
$cli->bootstrap();
config([
'database.default' => 'sqlite',
'queue.default' => 'redis',
'cache.default' => 'redis',
]);
@unlink(config('database.connections.sqlite.database'));
$cli->call('migrate', ['--force' => true]);
DB::unprepared("
CREATE TABLE IF NOT EXISTS main (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(255) UNIQUE
)
");
DB::unprepared("
CREATE TABLE IF NOT EXISTS secondary (
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL
)
");
// ensure there are no keys in the DB
Redis::flushdb();
class Main extends Model {
public $table = 'main';
public $timestamps = false;
public $fillable = ['name'];
}
class Secondary extends Model {
public $table = 'secondary';
public $timestamps = false;
public $fillable = ['name'];
}
class MyJob implements ShouldQueue, ShouldBeUnique {
use Dispatchable, Queueable, SerializesModels;
public $tries = 1;
public $maxExceptions = 1;
public $deleteWhenMissingModels = true;
public function __construct(
public Main $main,
public Secondary $secondary,
)
{
}
public function handle() {
}
public function uniqueId() {
return 'job-for-' . $this->main->id;
}
}
// create 2 instances
$main = Main::create(['name' => 'main model']);
$secondary = Secondary::create(['name' => 'secondary model']);
// and schedule a job for them
MyJob::dispatch($main, $secondary);
// delete the secondary model
$secondary->delete();
// run the job
app('queue.worker')->runNextJob('redis', 'default', new WorkerOptions);
echo 'Queue size: ', Queue::size('default'), PHP_EOL; // no tasks left
echo 'Redis contents:', PHP_EOL;
dump(Redis::keys('*')); // unique id is still there
php poc.php
Output
Queue size: 0
Redis contents:
array:1 [
0 => "laravel_database_laravel_cache_:laravel_unique_job:MyJobjob-for-1"
] // poc.php:95
Expected result
The unique lock has been removed.
Actual result
A stale unique lock still exists.
naquad
29th Jan 2024 @ 11:00
10.27.0
8.1.11
MySQL
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.
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.
GrahamCampbell
10th Oct 2023 @ 11:56
LiveComponent CI has failures on PHP 8.3 / high dependency
Symfony 7.1 introduces a new TypeInfo component that will partially replace PropertyInfo, and triggers a lot of deprecations.
We use this in two places : LivePropMetadata(/Factory) and in the Hydrate/Dehydate methods
Original PR: https://github.com/symfony/symfony/pull/52510 Documentation (wip): https://github.com/symfony/symfony-docs/pull/19554
That means that we must find a way to handle both for a time, so any good idea very welcome :)
CI Fail examples here: https://github.com/symfony/ux/actions/runs/8613628361/job/23605334525#step:7:122
Remaining direct deprecation notices (2793)
705x: Since symfony/property-info 7.1: The "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\PropertyInfoExtractor::getType()" instead.
126x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
110x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
...
705x: Since symfony/property-info 7.1: The "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor::getType()" instead.
126x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
110x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
...
691x: Since symfony/property-info 7.1: The "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getTypes()" method is deprecated, use "Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor::getType()" instead.
112x in LiveComponentHydratorTest::testCanDehydrateAndHydrateComponentWithTestCases from Symfony\UX\LiveComponent\Tests\Integration
110x in QueryStringPropsExtractorTest::testExtract from Symfony\UX\LiveComponent\Tests\Functional\Util
102x in LiveComponentHydratorTest::testCoerceFalseyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
30x in LiveComponentHydratorTest::testCoerceTruthyValuesForScalarTypes from Symfony\UX\LiveComponent\Tests\Integration
20x in ComponentWithFormTest::testHandleCheckboxChanges from Symfony\UX\LiveComponent\Tests\Functional\Form
...
If anyone has some time / motivation to look at this ❤️ ?
smnandre
9th Apr 2024 @ 16:49
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.
stof
23rd Oct 2018 @ 15:58
filament/filament
v3.2.16
v10.41.0
No response
PHP8.2.15
KeyValue::make('meta')
->reorderable()
This should reorder the key/values and save them in the db as such. However when you change the order and reload the page or go back to the edit page. The ordering has not changed
The Ordering set by the user should be respected
https://github.com/sandersjj/filament-issue
No response
sandersjj
28th Jan 2024 @ 21:18
10.47.1
8.3.3
mysql Ver 8.0.28 for Linux on x86_64 (MySQL Community Server - GPL)
I noticed a lazy violation exception in production, and I had created a test to reproduce the issue but the test passed. After I added the following code to my TestCase ($this->withoutExceptionHandling();
), the test started to fail, and a bunch of other tests failed. I think "LazyLoadingViolationException" should be reported during tests (this is the perfect moment to catch these errors).
However they get correctly reported, but silently in the logs.
That may be a confusion/misunderstanding over what is the purpose of handling exceptions during feature tests (I did not find any usable information in the documentation about the why).
I was also surprised to have detected other "hidden" exceptions since I disabled exception handling (but that is outside the scope of this issue).
With a model with a one to many relationship (example shopping list -> items), controller loops through the items, and the tests should ensure 2 or more items are attached to the tested model (shopping list).
// app/app/Providers/AppServiceProvider.php
declare(strict_types=1);
namespace App\Providers;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;
use Sentry\Laravel\Integration;
final class AppServiceProvider extends ServiceProvider
{
public function boot(): void
{
Model::preventLazyLoading();
if (App::isProduction()) {
Model::handleLazyLoadingViolationUsing(Integration::lazyLoadingViolationReporter());
}
}
}
// app/tests/TestCase.php
declare(strict_types=1);
namespace Tests;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Http;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
use LazilyRefreshDatabase;
protected bool $seed = true;
protected function setUp(): void
{
parent::setUp();
$this->withoutVite();
$this->withoutMix();
$this->withoutExceptionHandling(); // When this line is commented, the test below does not fail (not wanted)
Http::preventStrayRequests();
}
}
// app/tests/Feature/Http/Controllers/ShoppingListCopyControllerTest.php
declare(strict_types=1);
namespace Tests\Feature\Http\Controllers;
use App\Models\Aisle;
use App\Models\Item;
use App\Models\ShoppingList;
use App\Models\Subscription;
use App\Models\User;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
final class ShoppingListCopyControllerTest extends TestCase
{
use WithFaker;
public function testMemberDoesntGetItemsOwnerAisleWhenDuplicatingShoppingList(): void
{
$user = User::factory()
->has(Subscription::factory()->standard())
->create();
$shoppingList = ShoppingList::factory()->for($user, "author")
->has(Item::factory()->for(Aisle::factory()->for($user)))
->has(Item::factory()->for(Aisle::factory()->for($user)))
->has(User::factory()->has(Subscription::factory()->standard()), "members")
->create();
$member = $shoppingList->members->first();
assert($member instanceof User);
$this->actingAs($member)
->post(route("shopping-list.copy.store", $shoppingList), [
"name" => $this->faker->name(),
])
->assertValid();
}
}
// app/app/Http/Controllers/ShoppingListCopyController.php
declare(strict_types=1);
namespace App\Http\Controllers;
use App\Http\Requests\StoreShoppingListCopyRequest;
use App\Models\Item;
use App\Models\ShoppingList;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Facades\DB;
final class ShoppingListCopyController extends Controller
{
public function store(StoreShoppingListCopyRequest $request, ShoppingList $shoppingList): RedirectResponse
{
$user = $request->user();
$duplicatedShoppingList = $shoppingList->replicate();
\assert($duplicatedShoppingList instanceof ShoppingList);
DB::beginTransaction();
$duplicatedShoppingList->name = $request->string("name")->toString();
$duplicatedShoppingList->author()->associate($user);
$duplicatedShoppingList->save();
$duplicatedItems = $shoppingList
->items
->map(function (Item $item) use ($user): Item {
$duplicatedItem = $item->replicate();
if (!$item->aisle?->user?->is($user)) { // lazy loading violation here
$duplicatedItem->aisle()->dissociate();
}
return $duplicatedItem;
});
$duplicatedShoppingList
->items()
->saveMany($duplicatedItems);
DB::commit();
return redirect()->route("shopping-list.show", $duplicatedShoppingList);
}
}
// app/app/Exceptions/Handler.php
declare(strict_types=1);
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Support\Facades\App;
use Sentry\Laravel\Integration;
use Throwable;
final class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.>
*/
protected $dontReport = [];
protected $dontFlash = [
"current_password",
"password",
"password_confirmation",
];
public function register(): void
{
$this->reportable(function (Throwable $e): void {
/**
* @see https://docs.sentry.io/platforms/php/guides/laravel/#install
*/
if (!App::environment("local")) {
Integration::captureUnhandledException($e);
}
});
}
}
Edit: I had to explicitly list which exceptions the framework should handle so that all new exceptions are not handled and I can decide which one should be. In my opinion this should be done behind the scene so that everything that can be asserted (validation, authorization, ...) is handled by default and everything that is not assertable (lazy loading violations etc...) keep popping up in the CLI.
This code below produces the results I expect, so that new missing attributes or violation exceptions gets detected.
// app/tests/TestCase.php
declare(strict_types=1);
namespace Tests;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Testing\LazilyRefreshDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
use Illuminate\Support\Facades\Http;
use Illuminate\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\HttpException;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
use LazilyRefreshDatabase;
protected bool $seed = true;
protected function setUp(): void
{
parent::setUp();
$this->withoutVite();
$this->withoutMix();
$this->handleExceptions([
AuthorizationException::class,
HttpException::class,
ValidationException::class,
ModelNotFoundException::class,
]);
Http::preventStrayRequests();
}
}
khalyomede
8th Mar 2024 @ 21:08
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
KKSzymanowski
28th Sep 2022 @ 21:53
2.2.7
10.40.0
8.2.14
Swoole
5.1.1
No response
Same as #784, #748.
When using Route::bind()
and URL::defaults()
with Octane, it seems that UrlGenerator
keeps the same instance of RouteUrlGenerator
, and so the defaults are cached between requests.
Especially, I believe the issue happens when we use App\Http\Middleware\Authenticate
to handle login sessions.
I created a public repo gazzoy/laravel-octane-urlgenerator-issue with a fresh Laravel v10.40.0, Octane v2.2.7(swoole), Sail v1.27.0(php8.2), and the smallest code to reproduce the issue.
gazzoy/laravel-octane-urlgenerator-issue/.env
.$ cd gazzoy/laravel-octane-urlgenerator-issue
$ docker run --rm \
-u "$(id -u):$(id -g)" \
-v "$(pwd):/var/www/html" \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs
$ ./vendor/bin/sail build --no-cache
$ ./vendor/bin/sail up -d
$ ./vendor/bin/sail artisan migrate:refresh --seed
open your browser with:
http://localhost/sample/paul/login
It should show a page with a text "login page for paul" which is expected.
open below url on the same browser:
http://localhost/sample/john/home
It redirects to http://localhost/sample/paul/login
which doesn't make sense to me. Because, as of I understood, if Route::bind()
and URL::defaults()
work fine, we should be redirected to http://localhost/sample/john/login
. Thefore, I believe it seems URL::defaults() keeps it states?
Having said that, I'm not too sure its actually Octane issue, so please let me know if this is not the case.
Just to clarify, my public repo has 3 commits as follows, but the first and second commits were just installing Laravel and Octane so you should be able to ignore it. The third commit is actually my original code to reproduce the issue.
Please let me know if you have any questions.
gazzoy
13th Jan 2024 @ 09:27
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
$fillable
and $guarded
from a model that use uses LogsActivity
Model::unguard();
in AppServiceProvider
in the boot
method public function getActivitylogOptions() : LogOptions
{
return LogOptions::defaults()->logUnguarded();
}
Expected behavior Some changed properties should be logged but none are
Versions (please complete the following information)
colinmackinlay
20th Nov 2022 @ 12:31
AshAllenDesign\FaviconFetcher\Drivers\HttpDriver::convertToAbsoluteUrl(): Argument #2 ($faviconUrl) must be of type string, null given, called in /Users/tgugnani/Code/thehome/vendor/ashallendesign/favicon-fetcher/src/Drivers/HttpDriver.php on line 189
When trying to fetch favicon from a URL which does not have a href tag in it, exception is thrown. Can we modify the code so that fails gracefully.
tushargugnani
8th Mar 2024 @ 07:36
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.
brendt
20th Dec 2018 @ 13:41
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)
stof
23rd Oct 2018 @ 15:34
protected $listeners = [
'sweetalertConfirmed',
'sweetalertDenied',
];
public function logout()
{
sweetalert()
->timer(0)
->showDenyButton()
->addInfo('confirm or deny action');
}
public function sweetalertConfirmed(array $payload)
{
auth()->logout();
sweetalert()->addSuccess('sweetalert was confirmed');
}
public function sweetalertDenied(array $payload)
{
sweetalert()->addError('sweetalert was denied');
}
i have code for laravel 10 and livewire 3 and get Uncaught TypeError: Livewire.components is undefined when i click button logout, here my button logout:
<a wire:click.prevent="logout" href="#" class="nav_link" data-bs-toggle="tooltip" data-bs-title="Logout">
<i class='bx bx-log-out nav_icon'></i>
<span class="nav_name">Logout</span>
</a>
how can fix this code
andhikapepe
12th Dec 2023 @ 05:38
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.
Gummibeer
20th Oct 2021 @ 10:03
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
alexchuin
18th Oct 2022 @ 12:51
11.0.7
8.3.4
No response
As found out in #50120 - the php artisan schedule:list
is broken for fluent-style scheduling entries.
The scheduling still works as expected, but the list is displayed incorrectly.
Using the example from the docs (https://laravel.com/docs/11.x/scheduling#between-time-constraints):
$schedule->command('emails:send')
->hourly()
->between('7:00', '22:00');
php artisan schedule:list
:
0 * * * * php artisan emails:send ......................... Next Due: in 8 Minutes
As you can see the configuration is displayed as a seemingly random value, in this case just hourly
.
Related Laracasts topic:
https://laracasts.com/discuss/channels/laravel/schedule-between-not-working-as-expected
add
$schedule->command('emails:send')
->hourly()
->between('7:00', '22:00');
to routes/console.php
and launch
php artisan schedule:list
raveren
20th Mar 2024 @ 10:50
For some reason, our test suite is super slow. We should look into this and try to decrease memory usage and speed it up.
Parallel run:
Tests: 316 passed (785 assertions)
Duration: 13.64s
Parallel: 10 processes
Regular run:
Tests: 316 passed (785 assertions)
Duration: 96.30s
driesvints
29th Dec 2023 @ 10:43
filament/filament
v3.2
v11
No response
PHP 8.3
If we configure the panel to use multiple domain, php artisan optimize
fails
Unable to prepare route [admin/login] for serialization. Another route has already been assigned name [filament.admin.auth.login].
We should be allowed to use multiple domains.
https://github.com/declum/example-repo
No response
declum
13th Mar 2024 @ 15:51
Originally posted by indyjonesnl January 10, 2024
$lodgingBusiness = Schema::lodgingBusiness()
->openingHours(
Schema::openingHoursSpecification()
->dayOfWeek([Schema::dayOfWeek()::Monday])
->opens(new DateTime('09:00:00'))
->closes(new DateTime('17:00:00'))
)
->checkinTime(new DateTime('14:00:00'))
->checkoutTime(new DateTime('11:00:00'))
This results in the current date + time being included in the output "opens":"2024-01-10T09:00:00+00:00","closes":"2024-01-10T17:00:00+00:00"
and ..."checkinTime":"2024-01-10T14:00:00+00:00","checkoutTime":"2024-01-10T11:00:00+00:00"...
While the Schema should contain only the time, formatted as 14:30:00+08:00
.
Can someone point me in the right direction?
Gummibeer
11th Jan 2024 @ 13:12
filament/filament
3.2.34
v10.45.1
v3.4.6
8.3.2
If you have dynamic Tooltips like this:
<?php
TextColumn::make('text')
->tooltip(fn(TextColumn $column, ?string $state): ?string =>
strlen($state) <= $column->getCharacterLimit()
? null
: $state)
And the state changes so that null
would be returned the tooltip will not be disappear but still show the old value.
This can happen if you use, for example, the filament/spatie-laravel-translatable-plugin
package and switch languages.
The Tooltip should not appear with the old value again if a falsify value is returned from the evaluation function.
First have a evaluation function that returns a string for the tooltip, than dynamically change something to not full fill the condition and return false
, null
or ''
.
In the Repo:
php artisan migrate --seed
ResourcePath:
app/Filament/Resources/Blog/PostResource.php:43
https://github.com/thettler/demo/tree/tooltip-not-disappear
No response
thettler
27th Feb 2024 @ 15:42
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?)
pimjansen
2nd Jun 2023 @ 12:24
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 ;-)
krisc78
9th Mar 2023 @ 14:49
public function bell()
{
$this->count += 1;
flash()->addInfo('Your information has been saved and a confirmation email has been sent.');
}
This flash message doesn't show up until I reload the page If I reload the page then what's is the point of using livewire
codebyshami
17th Nov 2023 @ 01:19
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..
bluec
7th Nov 2018 @ 13:44