using prompt engineering techniques provide enhancement to the Claude service class in the Claude prompt class, creating functions commonly used in Laravel applications. For example, brand builder, seo product optimizer, video and or image captioner, automated chatbots #goodfirstissue
Found 72 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.
Hello,
if you plan an scheduled maintenance with an START and END date it will never appear on the dashboard. Only if you create them with an START date only it will appear. I think this is a bit confusing, because if i plan an schedule an weekly update, i want to declare an timeslot and dont want to enter again the cachet-scheduled-maintenance to enter an date at the end of my maintenance.
Can this function be controlled or changed?
Thanks
kash1983
27th Jan 2025 @ 09:33
When using the addToMediaFromURL method, I'm receiving a Could Not Load Image error on the server, but not locally (I'm using Laravel Vapor) and not with other image formats.
The code below is where the error is occuring and that code is receiving an absolute file path to the image in s3, which is available.
public function addToMediaLibrary($file_path) { $media = $this->addMediaFromUrl($file_path) ->toMediaCollection("", 's3'); return $media; }
As an example the file path when logged out is https://s3.sitesforsaas.com/tenants/d221c93a-3757-466c-bf83-b74a9ee64c04/sites/9cfc24c7-cb2a-4c5a-8c0f-73ecdc79c166/2024/09/4e9854b0-4f2d-4931-a726-01f557bd7fc6.webp
, but the error is looking for the image in local 'tmp' storage for some reason.
Could not load image at path
/tmp/storage/tenantd221c93a-3757-466c-bf83-b74a9ee64c04/media-library/temp/j7pNMerUdReNx9MfAG5rKjcmGHWu4i99/LM2UYMTcYU0BO8sLsTfeOBpS9eXximejlarge.webp`",
josiahmann
11th Sep 2024 @ 21:32
using prompt engineering techniques provide enhancement to the Gemini service class in the Gemini prompt class, creating functions commonly used in Laravel applications.
kwakuOfosuAgyeman
5th Jan 2025 @ 05:43
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
Laravel Version
12.x
PHP Version
8.4
Database Driver & Version
No response
Description
Premise: http post data often contains multiple values for the same key. This is needed to post the selection of checkbox widgets, select widgets with the multiple flag set, and others. Laravel's http client receives the post data and stores it internally as a keyed array, therefore the only way to post multiple values for a single key is to associate the key with an array of values:
Http::post('http://example.com/users', [
'name' => 'Steve',
'roles' => ['Network Administrator', 'Janitor'],
]);
This bug happens when the request includes both attached files, which forces it to be sent as multipart/form-data, and checkboxes or other input elements with multiple values. The source of the bug is PendingRequest::parseMultipartBodyFormat in the following code:
is_array($value) ? $value : ['name' => $key, 'contents' => $value]
This fails to handle multiple value arrays, such as ['Network Administrator', 'Janitor']
.
Steps To Reproduce
Use the Laravel Http client to make a POST request that includes both an attached file and a multiple-valued key. For example:
Http::attach(
'attachment', file_get_contents('photo.jpg'), 'photo.jpg', ['Content-Type' => 'image/jpeg']
)->post('http://example.com/users', [
'name' => 'Steve',
'roles' => ['Network Administrator', 'Janitor'],
]);
This mangles the multiple-valued key and results in InvalidArgumentException: A 'contents' key is required.
tobia
14th May 2025 @ 09:56
On the record update for an active incident, there needs to be a tie to the component to be update the current component status.
glipschitz
19th Jan 2025 @ 03:05
Bug description
Chrome, Firefox, and Safari now support setting the width
and height
attributes on <source>
elements within <picture>
elements. You can read more about this in the web.dev article on optimizing CLS. This enhancement allows browsers to better handle layout shifts and varying aspect ratios for responsive images.
How to reproduce
Current Behavior:
Currently, Statamic Responsive Images does not take advantage of this browser capability. As a result, when multiple sources are provided, the appropriate width
and height
attributes are not applied to <source>
elements, which may lead to layout shifts due to varying aspect ratios.
Proposed Enhancement:
Set appropriate width
and height
attributes on <source>
elements based on their aspect ratios.
Benefits:
- Improved Visual Stability: Reduce Cumulative Layout Shift (CLS) by providing browsers with the correct dimensions upfront.
- Better Performance: Modern browsers can allocate the correct space for images during page load.
- Enhanced Responsiveness: Accurately reflect different image aspect ratios for a more consistent user experience.
Environment
Environment
Application Name: local
Laravel Version: 11.41.3
PHP Version: 8.3.16
Composer Version: 2.8.5
Environment: development
Debug Mode: ENABLED
URL: local.test
Maintenance Mode: OFF
Timezone: Europe/Paris
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: NOT CACHED
Drivers
Broadcasting: null
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: redis
Session: file
Statamic
Addons: 3
Sites: 1
Stache Watcher: Disabled (auto)
Static Caching: Disabled
Version: 5.46.1 PRO
Statamic Addons
rias/statamic-redirect: 3.9.3
spatie/statamic-responsive-images: 5.2.1
statamic/seo-pro: 6.5.0
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
regex (default)
Additional details
Leveraging native width and height support on <source>
elements can lead to significant improvements in layout stability and overall performance on modern browsers. This enhancement would allow the package to better handle responsive images by using up-to-date browser capabilities.
Thanks for considering this enhancement!
jimblue
7th Feb 2025 @ 22:03
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
sawirricardo
2nd Jun 2023 @ 07:15
Is LDAP support planned? I saw there was a lot of interest in this with version 2. Would be nice to have this onboard for v3. There is a package available https://github.com/DirectoryTree/LdapRecord-Laravel https://chrispian.com/laravel-filament-tutorial-customize-login-to-use-ldap
julianstolp
11th Mar 2025 @ 14:11
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
I think it would be a good idea to add a publishable configuration file to this package, which allows a user to specify:
- Words specific to their application they want to treat as "unclean"
- Words specific to their application they want to allow
The configuration files that are currently used are very general and will work for most cases, but I can imagine some applications would want to block/allow certain words, where it makes sense to do it in userland rather than at the package level.
JonPurvis
4th Mar 2025 @ 23:52
I would love to see support for oAuth in Catchet. I know there are some other (closed) issues requesting the same functionality, but I think this would be a great addition for Catchet.
FoksVHox
28th Feb 2025 @ 08:29
Many of them are out of date, some by a few major versions!
It would be great to get these into good order and start keeping them up to date
simonhamp
24th Oct 2024 @ 11:53
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
- remove
$fillable
and$guarded
from a model that use usesLogsActivity
- call
Model::unguard();
inAppServiceProvider
in theboot
method - set
public function getActivitylogOptions() : LogOptions
{
return LogOptions::defaults()->logUnguarded();
}
- 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
colinmackinlay
20th Nov 2022 @ 12:31
This is a big one, but would resolve https://github.com/cachethq/cachet/issues/4425
- Opt components into being monitored.
- Needs some kind of configuration (what if a Header is required to access the URL? Frequency?)
- Add a cron job that runs every minute and checks the actively components.
- Track component availability.
- Dashboard to manage component monitors, track availability etc.
- API
jbrooksuk
4th Jan 2025 @ 18:12
Laravel Version
12.9.1
PHP Version
8.3.15
Database Driver & Version
No response
Description
When dynamically injecting a Logger in a class using dependency injection, the framework application container builds other dependencies.
If one of these dependencies has a problem in its constructor (like a deprecation warning), then when trying to get the deprecation logger, the error handler asks to the container for a LogManager
but ends up with a Logger
, which makes the call to $logger->channel
fail because a Logger
has no channel
method.
HandleExceptions.php :
try {
// HERE, asking for a LogManager, but getting a Logger instead
$logger = static::$app->make(LogManager::class);
} catch (Exception) {
return;
}
$this->ensureDeprecationLoggerIsConfigured();
$options = static::$app['config']->get('logging.deprecations') ?? [];
// HERE, the call to channel fails and throws an error
with($logger->channel('deprecations'), function ($log) use ($message, $file, $line, $level, $options) {
if ($options['trace'] ?? false) {
$log->warning((string) new ErrorException($message, 0, $level, $file, $line));
} else {
$log->warning(sprintf('%s in %s on line %s',
$message, $file, $line
));
}
});
I don't know why this happens as it was too complex for me to dig deeper inside the inner workings of the Application Container, but for sure this looks like a bug.
Steps To Reproduce
clone & run : (GET '/') https://github.com/hilnius/laravel-container-logger-issue
specific commit with the diff (based on a brand new 'laravel new' repository) https://github.com/hilnius/laravel-container-logger-issue/commit/e2903ff613be8174d42b0a3b20e933659138f2e3
hilnius
16th Apr 2025 @ 14:34
What happened?
I just installed package and complement for AI powered solution. When I create an issue to test it I get :
I had to change the links function like this to make it work for me:
public function links(): array
{
$rawText = Str::finish($this->rawText, 'ENDLINKS');
$textLinks = $this->between('LINKS', 'ENDLINKS', $rawText);
$textLinks = explode(PHP_EOL, $textLinks);
$links = [];
foreach ($textLinks as $textLink) {
$textLink = str_replace('\\', '\\\\', $textLink);
$textLink = str_replace('\\\\\\', '\\\\', $textLink);
$decodedLink = json_decode($textLink, true);
if ($decodedLink !== null) {
$links[$decodedLink['title']] = $decodedLink['url'];
}
}
return $links;
}
How to reproduce the bug
When I install the package in my project and use it with AI powered
Package Version
1.0
PHP Version
8.2.14
Laravel Version
11.14
Which operating systems does with happen with?
Windows
Notes
No response
bestmomo
21st Jul 2024 @ 10:57
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
Add in PHP 7.3 as Normalizer::normalize() argument for NFKC_Casefold normalization.
nicolas-grekas
7th Feb 2019 @ 10:11
Laravel Version
v12.14.1
PHP Version
8.4.6
Database Driver & Version
No response
Description
I am getting Guzzle exception instead of Laravel's Http exception on some errors.
Seems that head() method doesn't handle the exception that can occur in the send() method.
Steps To Reproduce
Run this code and Guzzle exception will be thrown.
\Illuminate\Support\Facades\Http::head('https://www.cursomeca.com/fi_leccion.php');
above code will throw GuzzleHttp\Exception\RequestException, but should throw Illuminate\Http\Client\ConnectionException
[2025-05-14 11:25:46] local.ERROR: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.cursomeca.com/fi_leccion.php {"userId":1,"exception":"[object] (GuzzleHttp\Exception\RequestException(code: 0): cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://www.cursomeca.com/fi_leccion.php at /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:276) [stacktrace] #0 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(205): GuzzleHttp\Handler\CurlFactory::createRejection() #1 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(157): GuzzleHttp\Handler\CurlFactory::finishError() #2 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(47): GuzzleHttp\Handler\CurlFactory::finish() #3 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke() #4 /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(48): GuzzleHttp\Handler\Proxy::{closure:GuzzleHttp\Handler\Proxy::wrapSync():27}() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1343): GuzzleHttp\Handler\Proxy::{closure:GuzzleHttp\Handler\Proxy::wrapStreaming():47}() #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1309): Illuminate\Http\Client\PendingRequest->{closure:{closure:Illuminate\Http\Client\PendingRequest::buildStubHandler():1330}:1331}() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1295): Illuminate\Http\Client\PendingRequest->{closure:{closure:Illuminate\Http\Client\PendingRequest::buildRecorderHandler():1307}:1308}() #8 /var/www/html/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(35): Illuminate\Http\Client\PendingRequest->{closure:{closure:Illuminate\Http\Client\PendingRequest::buildBeforeSendingHandler():1293}:1294}() #9 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php(38): GuzzleHttp\PrepareBodyMiddleware->__invoke() #10 /var/www/html/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(71): GuzzleHttp\Middleware::{closure:{closure:GuzzleHttp\Middleware::cookies():28}:29}() #11 /var/www/html/vendor/guzzlehttp/guzzle/src/Middleware.php(63): GuzzleHttp\RedirectMiddleware->__invoke() #12 /var/www/html/vendor/guzzlehttp/guzzle/src/HandlerStack.php(75): GuzzleHttp\Middleware::{closure:{closure:GuzzleHttp\Middleware::httpErrors():60}:61}() #13 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(333): GuzzleHttp\HandlerStack->__invoke() #14 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(169): GuzzleHttp\Client->transfer() #15 /var/www/html/vendor/guzzlehttp/guzzle/src/Client.php(189): GuzzleHttp\Client->requestAsync() #16 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(1141): GuzzleHttp\Client->request() #17 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(905): Illuminate\Http\Client\PendingRequest->sendRequest() #18 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/helpers.php(338): Illuminate\Http\Client\PendingRequest->{closure:Illuminate\Http\Client\PendingRequest::send():903}() #19 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(903): retry() #20 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/PendingRequest.php(786): Illuminate\Http\Client\PendingRequest->send() #21 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Client/Factory.php(535): Illuminate\Http\Client\PendingRequest->head() #22 /var/www/html/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(361): Illuminate\Http\Client\Factory->__call() #23 /var/www/html/routes/web.php(2187): Illuminate\Support\Facades\Facade::__callStatic() #24 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/CallableDispatcher.php(39): Illuminate\Routing\RouteFileRegistrar->{closure:/var/www/html/routes/web.php:2186}() #25 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(243): Illuminate\Routing\CallableDispatcher->dispatch() #26 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Route.php(214): Illuminate\Routing\Route->runCallable() #27 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(808): Illuminate\Routing\Route->run() #28 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(169): Illuminate\Routing\Router->{closure:Illuminate\Routing\Router::runRouteWithinStack():807}() #29 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(66): Illuminate\Pipeline\Pipeline->{closure:Illuminate\Pipeline\Pipeline::prepareDestination():167}() #30 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle() #31 /var/www/html/app/Http/Middleware/AddUserId.php(23): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #32 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\AddUserId->handle() #33 /var/www/html/app/Http/Middleware/ImpactMiddleware.php(22): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #34 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\ImpactMiddleware->handle() #35 /var/www/html/app/Http/Middleware/LogLandingPage.php(23): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #36 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\LogLandingPage->handle() #37 /var/www/html/app/Http/Middleware/RememberReferrer.php(22): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #38 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\RememberReferrer->handle() #39 /var/www/html/app/Http/Middleware/SetLocale.php(32): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #40 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\SetLocale->handle() #41 /var/www/html/app/Http/Middleware/GlobalMiddleware/LogoutUserFromAllDevices.php(32): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #42 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\GlobalMiddleware\LogoutUserFromAllDevices->handle() #43 /var/www/html/app/Http/Middleware/CheckIfBlocked.php(25): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #44 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\CheckIfBlocked->handle() #45 /var/www/html/app/Http/Middleware/HasOrderCookieSetter.php(30): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #46 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\HasOrderCookieSetter->handle() #47 /var/www/html/app/Http/Middleware/ReferringMiddleware.php(25): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #48 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\ReferringMiddleware->handle() #49 /var/www/html/app/Http/Middleware/SetReferrer.php(24): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #50 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\SetReferrer->handle() #51 /var/www/html/app/Http/Middleware/AdwordsLogger.php(22): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #52 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\AdwordsLogger->handle() #53 /var/www/html/app/Http/Middleware/RedirectSubdomains.php(45): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #54 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\RedirectSubdomains->handle() #55 /var/www/html/app/Http/Middleware/RemoveTrailingSlash.php(25): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #56 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): App\Http\Middleware\RemoveTrailingSlash->handle() #57 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #58 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Routing\Middleware\SubstituteBindings->handle() #59 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php(87): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #60 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle() #61 /var/www/html/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(48): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #62 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\View\Middleware\ShareErrorsFromSession->handle() #63 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(120): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #64 /var/www/html/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(63): Illuminate\Session\Middleware\StartSession->handleStatefulRequest() #65 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Session\Middleware\StartSession->handle() #66 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(36): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #67 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() #68 /var/www/html/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(74): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #69 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Cookie\Middleware\EncryptCookies->handle() #70 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(126): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #71 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(807): Illuminate\Pipeline\Pipeline->then() #72 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(786): Illuminate\Routing\Router->runRouteWithinStack() #73 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(750): Illuminate\Routing\Router->runRoute() #74 /var/www/html/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\Routing\Router->dispatchToRoute() #75 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\Routing\Router->dispatch() #76 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(169): Illuminate\Foundation\Http\Kernel->{closure:Illuminate\Foundation\Http\Kernel::dispatchToRouter():197}() #77 /var/www/html/vendor/mantas-done/laravel-apm/src/Middleware/DelayedWriter.php(12): Illuminate\Pipeline\Pipeline->{closure:Illuminate\Pipeline\Pipeline::prepareDestination():167}() #78 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Done\LaravelAPM\Middleware\DelayedWriter->handle() #79 /var/www/html/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(66): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #80 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Barryvdh\Debugbar\Middleware\InjectDebugbar->handle() #81 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(109): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #82 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance->handle() #83 /var/www/html/vendor/laravel/framework/src/Illuminate/Http/Middleware/TrustProxies.php(58): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #84 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(208): Illuminate\Http\Middleware\TrustProxies->handle() #85 /var/www/html/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(126): Illuminate\Pipeline\Pipeline->{closure:{closure:Illuminate\Pipeline\Pipeline::carry():183}:184}() #86 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\Pipeline\Pipeline->then() #87 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() #88 /var/www/html/public/index.php(51): Illuminate\Foundation\Http\Kernel->handle() #89 /var/www/html/server.php(22): require_once('...') #90 {main} "} {"user_id":1}
mantas-done
14th May 2025 @ 11:45
Provide updates to new functionalities in the v2 of the package.
kwakuOfosuAgyeman
5th Jan 2025 @ 05:45
Immediately after installing php-flasher/flasher-laravel, the application breaks with the following error:
foreach() argument must be of type array|object, bool given
Simply installing the package causes this fatal error.
Steps to Reproduce:
Create a fresh Laravel app.
Run:
composer require php-flasher/flasher-laravel
Load any page in the app — no usage of flasher() or flasher_render() yet.
Laravel crashes with a foreach() error.
dlopez525
11th Apr 2025 @ 18:20
Cachet would benefit from upgrading to Tailwind v4. This could lead to a really powerful theming system beyond the accents feature we currently have.
jbrooksuk
31st Jan 2025 @ 16:44
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
Octane Version
2.6.1
Laravel Version
11.41.3
PHP Version
8.3
What server type are you using?
Roadrunner
Server Version
2024.3.2
Database Driver & Version
No response
Description
ok this is in the borderline to be a bug but i write it anyway.
i am deploying using deployer , i suppose will happen for any Zero Downtime Deployments.
/releases/99/
/releases/100/
/releases/101/
and then a symbolic link from the latest release to /current
, all pretty standard.
the problem come when running artisan octane:start
vendor/laravel/octane/src/Commands/StartRoadRunnerCommand.php
will set roadrunner server with
'-o', 'server.command='.(new PhpExecutableFinder)->find().','.base_path(config('octane.roadrunner.command', 'vendor/bin/roadrunner-worker')),
where base_path(...) will resolve to /releases/101/
not to /current
so in next deployment e.g. (/releases/102/) , when we run artisan octane:reload
it will still use old /releases/101/
source code
(i checked and yes if i go back to /releases/101/
and make a change it will be present after artisan octane:reload
).
the solution is very simple, in config/octane.php
you just need to add:
'roadrunner'=>[
'command' => env('OCTANE_ROADRUNNER_WORKER_PATH', base_path('vendor/bin/roadrunner-worker')),
]
OCTANE_ROADRUNNER_WORKER_PATH=../../current
would be nice is this added to config/octane.php
, and maybe don't use base_path
or even better a option to provide the path in octane:start
Steps To Reproduce
deploy a octane laravel app using deployer , octane:reload will not work as expected
inikoo
13th Feb 2025 @ 14:32
Dashboard showing Operational
Front end showing no issues, but the status seems to still be linked to the incident even if it's closed as fixed
glipschitz
25th Jan 2025 @ 11:01
Description: I am using Flasher 2.0.1 in my Laravel 11 project and would like to know how to properly use the Flasher library in JavaScript. Additionally, I want to ensure that the JavaScript configuration is consistent with the settings defined in the flasher.php configuration file.
Details: Flasher Version: 2.0.1 Laravel Version: 11 Problem: Need guidance on using the Flasher library with JavaScript in a way that mirrors the configuration set in flasher.php.
raseldev99
16th Sep 2024 @ 04:50
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
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?
nicolas-grekas
8th Jul 2020 @ 18:35
Laravel Version
12.x
PHP Version
8.2
Database Driver & Version
No response
Description
When making a components with the php artisan make:component
command, if the provided component name contains a lowercase subfolder, for example php artisan make:component book/Form
, the created subfolder name is not recognised on a production Linux host.
The solution was to change App/Views/Components/book
to App/Views/Components/Book
.
Does it make sense to implement this constraint in the make:component
command, making the View subfolder name lcfirst
on creation?
Steps To Reproduce
Run command:
php artisan make:component book/Form
Place dd();
in the constructor of Form.php.
Deploy to Linux host with apache2.
The dd()
is not fired.
Rename App/Views/Components/book
to App/Views/Components/Book
and retry.
The dd()
is fired.
BhSimon
12th May 2025 @ 08:21
Sulu CMS separates its assets into assets/admin
and assets/website
, this means when installing Encore within a Sulu CMS install you will have to change a bunch of paths: https://docs.sulu.io/en/latest/cookbook/webpack-encore.html
This isn't my main issue, I think this is acceptable for an initial setup. But I do think we can improve what happens when you composer require a symfony bundle that provides stimulus controllers.
In the Sulu + Encore setup, the controllers.json
file lives in assets/website/controllers.json
. But since this path is hardcoded here:
The controllers.json is not updated automatically and there's no output telling you to manually do this either. So you're left a little lost in what is still missing. Also, figuring out what to manually add in controllers.json is quite tricky since most existing UX bundles don't document this manual setup.
Before I start hacking away at a PR, any suggestions how we can solve this properly? Or do we accept that this is not configurable and those who use custom paths just have to deal with it?
Thank you in advance.
rskuipers
27th Dec 2022 @ 21:16
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
KKSzymanowski
28th Sep 2022 @ 21:53
Allow to mark some authors as "verified" so they no longer have to go through the review process of submitting articles but can publish straight away.
Maybe let's also put a limit of 2 articles a day per author.
driesvints
9th Apr 2025 @ 06:53
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://[email protected]/team/project.git"
}
}
And npm-install-peers
breaks.
JWo1F
18th Dec 2017 @ 08:52
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
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
The docs aren't finished. This issue exists to track the missing pieces:
- App icons
- Context menus
- Dock
- Printing
- ProgressBar
- Queue
- Screens
- Settings
- Shell
- System
- Touch ID
- Testing
- Obfuscating and securing PHP code
- Build signing (#361)
- macOS
- Windows
- How to customise Electron / PR to NativePHP
- Security disclosures process
- Highlight current section
- Show ToC persistently on the right-hand side
- Sponsorship page
- Contributors page
- Show sponsors in sidebar
- Add next/previous section buttons to the bottom of pages
- Add Edit on GitHub link to pages
simonhamp
8th Sep 2024 @ 15:01
Bug description
Currently, the plugin calculates width/height incorrectly when swapping aspect ratios, leading to incorrect HTML output. When changing the aspect ratio of an image, the longest side should remain fixed, and the other side should be calculated accordingly.
How to reproduce
For an image of 3000x1688px as a source:
{{ responsive:image ratio="16/9" md:ratio="9/16" }}
it returns:
<picture>
<source [...] >
<source [...] >
<source [...] >
<img src="/img/asset/hash/image.jpg?w=3000&h=1688&s=9358bb54be5d388a9a2529a4196dcfc6" alt="" width="3000" height="1688">
</picture>
Now for the same image as source but with:
{{ responsive:image ratio="9/16" md:ratio="16/9" }}
it returns:
<picture>
<source [...] >
<source [...] >
<source [...] >
<img src="/img/asset/hash/image.jpg?w=3000&h=5333&s=6c5c0bb8447dbd7ff61a692f98b5f46d" alt="" width="3000" height="5333">
</picture>
The calculated aspect ratio is correct, but the dimensions are not. The generated values exceed the original image size.
In this last example, the correct height should be 3000px, and the width should be 1688px to ensure the image stays within its original dimensions.
Environment
Environment
Application Name: local
Laravel Version: 11.41.3
PHP Version: 8.3.14
Composer Version: 2.8.5
Environment: development
Debug Mode: ENABLED
URL: local.test
Maintenance Mode: OFF
Timezone: Europe/Paris
Locale: en
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: null
Cache: file
Database: sqlite
Logs: stack / single
Mail: smtp
Queue: redis
Session: file
Statamic
Addons: 3
Sites: 1
Stache Watcher: Disabled (auto)
Static Caching: Disabled
Version: 5.46.0 PRO
Statamic Addons
rias/statamic-redirect: 3.9.3
spatie/statamic-responsive-images: 5.2.1
statamic/seo-pro: 6.5.0
Installation
Fresh statamic/statamic site via CLI
Antlers Parser
regex (default)
jimblue
3rd Feb 2025 @ 23:33
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.
Erikvv
1st Feb 2018 @ 02:19
We need a method of migrating users from 2.4 to 3.x.
Things to consider:
- Migrate settings
- Migrate resources
- Migrate subscriptions / subscribers
- Migrate API Keys
AOB (please add to this list)
As a comment on the latter, once #183 is merged, we'll need to programmatically migrate users 2.4 API Keys to 3.x using something like the following
$v2ApiKey = $v2User->api_key;
$v3User->tokens()->create([
'name' => 'v2.4 API Key',
'token' => hash('sha256', $v2ApiKey),
'abilities' => ['*'],
'expires_at' => now()->addDays(90),
]);
@jbrooksuk We need to decide on the abilities
and expires_at
. IMO it makes sense to throw something into the upgrade documentation that old 2.4 API Keys will continue to work for up to 90 days. But if they want to use the API after that, then they'll need to generate a new API Token using the 3.x dashboard.
joelbutcher
15th Jan 2025 @ 18:19
When you install a UX package, if you have AssetMapper installed, we importmap:require
the packages you need. We should also importmap:remove
those when the package is uninstalled.
https://github.com/symfony/recipes/issues/1089#issuecomment-1885459144
weaverryan
10th Jan 2024 @ 19:05
v2.4 allows users to add Google 2FA to their account for an added layer of security. 3.x should also implement this in some way.
Things to consider
- How to generate the code
- How do verify via 2FA when this is enabled on a users account.
- Can admins reset 2FA for a user if they've lost their 2FA device?
- How should backup codes work?
joelbutcher
15th Jan 2025 @ 18:25
Add this field so it's easy to add an Unsplash ID to an article. If the ID was entered and the form is saved, immediately try to retrieve the image through the Unsplash API using the code from the SyncArticleImages command.
This will be superseded eventually by #701
driesvints
9th Apr 2025 @ 06:56
Describe the bug
When you attempt to dump a binary string or anything containing one (like an array or an object), Ray does not dump anything. It just fails silently.
Versions
Ray version (you can see this in "About Ray"): 2.8.1
You can use composer show
to get the version numbers of:
- spatie/ray package version: 1.41.2
- spatie/laravel-ray package version (if applicable): 1.37.1
PHP version: 8.2.17 Laravel version (if applicable): 11.18.1
To Reproduce
Add this in your code:
ray(hex2bin('ae0f3d'));
Expected behavior
Ray should display this (like the console when dump
is used):
b"®\x0F="
Desktop (please complete the following information):
- OS: MacOs
- Version: 14.6.1
sebj54
27th Aug 2024 @ 14:57
Discussed in https://github.com/spatie/schema-org/discussions/202
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
I tried the example config from the docs to a Laravel/Inertia/Vue app, and it don't work.
If use the code (HandleInertiaRequests.php): 'messages' => flash()->render([], 'array'),
Error: Flasher\Prime\Flasher::render(): Argument #1 ($presenter) must be of type string, array given, called in D:\Laragon6\www\mobi-care\app\Http\Middleware\HandleInertiaRequests.php on line 36
And changing it to: 'messages' => flash()->render('array'), it loads the page, but, I only see the notifications if i press F5, with its not the desired state.
brunonetadmin
18th Mar 2025 @ 17:16
Hi, I noticed this issue after trying to use the attachments while making use of this webhook package.
This issue has already surfaced once in issue 170 and continued in discussion 171, however it was not solved.
I have added log proof of this issue as previously asked on the older thread to indicate the differences between the Laravel request and the webhook call request. Full logs can be found in the attached files.
request()->all().log $this->webhookCall.log
Data from "request()->all()"
'attachment_details' => array ( 0 => array ( 'disposition' => 'inline', ), 1 => array ( 'content_id' => NULL, ), ), 'attachments' => array ( 0 => \Illuminate\Http\UploadedFile::__set_state(array( 'originalName' => 'image0.jpeg', 'mimeType' => 'image/jpeg', 'error' => 0, 'originalPath' => 'image0.jpeg', 'test' => false, 'hashName' => NULL, )), ),
Data from "$this->webhookCall"
'attachment_details' => array ( 0 => array ( 'disposition' => 'inline', ), 1 => array ( 'content_id' => NULL, ), ),
Code used to log this data
\Log::info('Request Data');
\Log::info(request()->all());
\Log::info('Webhook Call Data');
\Log::info(json_decode($this->webhookCall, true));
ryangalea7
10th Mar 2025 @ 16:39
Laravel Version
12.10.2
PHP Version
8.3.20
Database Driver & Version
No response
Description
Context
In config/cache.php
you can define a separate connection to use for locks:
https://github.com/laravel/laravel/blob/f6e4638ee6ca1cd40aa7c56311d89ea3d91a24f8/config/cache.php#L74-L78
This makes it possible to run cache:clear
without losing mutexes and atomic locks.
The lock_connection is used when calling
-
Cache::lock(...)->get()
-
Schedule::command(...)->withoutOverlapping()
It might be used in other contexts too, but those are the ones I'm aware of.
The problem
Schedule::command(...)->onOneServer()
creates the lock on the regular cache connection via https://github.com/laravel/framework/blob/bcc92201ab6d786477fed578cc2e3ea4c4e1b093/src/Illuminate/Console/Scheduling/CacheSchedulingMutex.php#L41-L46
Which means that cache:clear
will wipe those locks and allow another server to pick up the task.
Thoughts
I'm not familiar enough with the source to send a PR, and I don't know if there's a good reason for this behavior. Naively I would assume that onOneServer()
should use CacheEventMutex
in stead of CacheSchedulingMutex
(which is apparently only used in this context).
Steps To Reproduce
- Use a cache driver with a separate lock_connection
- Configure a scheduled job with
onOneServer()
, which calls sleep(60). - Run
schedule:run
- Observe where the lock is stored.
mortenscheel
30th Apr 2025 @ 12:25
Octane Version
2.5.9
Laravel Version
11
PHP Version
8.3
What server type are you using?
Swoole
Server Version
8.3
Database Driver & Version
No response
Description
Wildcard paths like config/**/*.php
in the watch
array of config/octane.php
aren't working properly.
Steps To Reproduce
- Install chokidar
- Run
octane:start --watch
(I'm using Swoole) - Modify a file in the
config
directory. Octane won't restart - Change
config/**/*.php
toconfig
in thewatch
array ofconfig/octane.php
- Restart Octane server
- Modify a file in the
config
directory. Octane will now correctly restart
Same problem with anything else using wildcards eg. database
(try modifying a seeder to test).
binaryfire
14th Nov 2024 @ 11:57
Laravel Version
12.14.1
PHP Version
8.4
Database Driver & Version
No response
Description
When using Model::automaticallyEagerLoadRelationships()
in combination with a relationship that uses withDefault()
(for example, a morphOne
wallet relationship), accessing the relationship in an Eloquent event like created
or saved
leads to Laravel returning a default (unsaved) related model. If you try to save this model (for instance, to initialize some data), it may be persisted without proper foreign key values, resulting in an integrity constraint violation (e.g., is null). holder_id
This is unintuitive and can easily cause hard-to-trace bugs in codebases that rely on eager loading and relationship defaults.
Example
Business Model:
class Business extends Model
{
public static function booted()
{
static::automaticallyEagerLoadRelationships();
}
public function wallet()
{
return $this->morphOne(Wallet::class, 'holder')
->withDefault([
'balance' => 0,
]);
}
}
Wallet Model:
class Wallet extends Model
{
public function holder()
{
return $this->morphTo();
}
}
In BusinessObserver:
public function created(Business $business)
{
// Access wallet and try to save it
$business->wallet->updateBalance();
// ...other logic
}
Result:
If the business does not have a wallet yet, $business->wallet
returns the default wallet (not saved, belonging to the business). If you try to call $business->wallet->save()
(possibly via updateBalance()
), Laravel attempts to insert it, but and are null, which causes: holder_id``holder_type
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'holder_id' cannot be null
Expected Behavior
Related models returned by withDefault()
should not be saved automatically unless all their required foreign keys are present. Alternatively, using automatic eager loading should not trigger the creation of a default related model that is not ready to be persisted.
Note:
When Model::automaticallyEagerLoadRelationships()
is not used, the relationship with withDefault()
works as expected and no integrity constraint violations occur.
Steps To Reproduce
- Enable in your model.
automaticallyEagerLoadRelationships
- Define a relationship with
withDefault
. - Within a model event, access and attempt to use/save the related model.
- Observe the failure if the related model was not created before the event handler.
veneliniliev
15th May 2025 @ 12:23
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
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 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
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
Hi 👋🏼!
I am coming here to gather some feedback on my idea before starting working on it.
Background
I wanted to create a POC of https://github.com/symfony/skeleton made for Sylius. I created a simple recipe for sylius/core-bundle
, then an example skeleton repo and I have found out my recipes does not work as another recipe already write files with the same name. Then, I noticed symfony/framework-bundle
is always put as the first recipe to be executed, and this is a thing I wish to be able to configure.
Goal
Somehow allow myself to make (in this POC case) sylius/core-bundle
as a first recipe to be executed. Of course, I can fork symfony/flex
, but it would be perfect to avoid this way.
Idea
The idea is simple, we allow configuring such list for example in this way:
{
...
"extra": {
"flex": {
"prioritized-recipes": [
"sylius/core-bundle",
"another/sylius-package",
...
]
}
}
...
}
In Flex
we could implement this +/- this way:
// symfony/framework-bundle recipe should always be applied first after the metapackages
// however, we allow to override it with a list of prioritized recipes
$recipes = $this->getPrioritizedRecipes();
$recipes = array_merge($recipes, [
'symfony/framework-bundle' => null,
]);
$packRecipes = [];
$metaRecipes = [];
instead current
// symfony/framework-bundle recipe should always be applied first after the metapackages
$recipes = [
'symfony/framework-bundle' => null,
];
$packRecipes = [];
$metaRecipes = [];
Why?
- In some projects, we may want to load our recipes before the Symfony's ones
- In frameworks based on Symfony (like Sylius) we need to set up the whole project in our own way, so
framework-bundle
as a first recipe to be executed makes it unable for us
Other options
I have not checked it yet, but I believe we can achieve the similar feature using Composer's Event Dispatcher. But first, I would like to hear if such a feature is welcomed. Or maybe you have a better idea how to solve this. I am open to provide such feature right after we agree on some solution.
jakubtobiasz
7th Nov 2022 @ 19:24
- standard tags
- input fields
- components
- patterns
Add code snippets for each block
willemvb
25th Jul 2016 @ 12:49
Octane Version
2.8.1
Laravel Version
10.48.28
PHP Version
8.3.16
What server type are you using?
Swoole
Server Version
6.0.1
Database Driver & Version
No response
Description
I'm using Envoyer to deploy a Laravel Octane application, taking advantage of its zero-downtime deployment features.
However, Octane currently does not support zero-downtime deployment because it does not follow symlink directories. It always remains in the actual directory (instead of the symlinked one) where the Octane server was initially started. When the outdated release directory is deleted, Octane continues running in that location, causing errors on every request and resulting in 500 response codes on the live application.
Error thrown:
Warning: require(/var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/bootstrap.php): Failed to open stream: No such file or directory in /var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/swoole-server on line 18
Fatal error: Uncaught Error: Failed opening required '/var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/bootstrap.php' (include_path='.:/usr/bin/[email protected]/8.3.16/share/[email protected]/pear') in /var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/swoole-server:18
Stack trace:
#0 /var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/swoole-server(95): {closure}(Array)
#1 [internal function]: {closure}(Object(Swoole\Http\Server), 0)
#2 /var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/swoole-server(170): Swoole\Server->start()
#3 {main}
thrown in /var/www/domain.com/releases/202502010200023/vendor/laravel/octane/bin/swoole-server on line 18
#1 [internal function]: {closure}(Object(Swoole\Http\Server), 1)
#1 [internal function]: {closure}(Object(Swoole\Http\Server), 3)
#1 [internal function]: {closure}(Object(Swoole\Http\Server), 2)
#1 [internal function]: {closure}(Object(Swoole\Http\Server), 4)
#1 [internal function]: {closure}(Object(Swoole\Http\Server), 5)
Steps To Reproduce
Use any 0-downtime deployment or test it manually using the following instructions:
- Use the Swoole driver as an example.
-
cd
one directory up from the project's base path. - Create a
current
symlink directory for your project using the command:ln -nsf ./octane-project-test ./current
- Start the Octane server:
php ./current/artisan octane:start
- Copy your project to another directory:
cp -R ./octane-project-test ./octane-project-test-new
- Activate the new release:
ln -nsf ./octane-project-test-new ./current
- Reload the Octane server:
php ./current/artisan octane:reload
- Remove the original project directory:
rm -rf ./octane-project-test
mikkpokk
2nd Mar 2025 @ 01:35
What about allowing displaying post-install messages again, eg when running this?
composer recipes the/package
nicolas-grekas
1st Jun 2022 @ 09:13
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
These messages aren't displayed: https://github.com/symfony/flex/blob/1.x/src/Configurator/DockerComposeConfigurator.php#L51
dunglas
7th Aug 2022 @ 09:33
Laravel Version
12.12.0
PHP Version
8.3.6
Database Driver & Version
No response
Description
After fixing #55026, there's a new issue when updating pivot tables with sync()
. Conditions set by wherePivot()
are no longer being applied, which results in more rows being updated than expected.
Steps To Reproduce
This is how I define my relationship:
public function texts(int $reportId):BelongsToMany{
return $this->belongsToMany(Text::class,'orders_texts','order_id','text_id')
->wherePivot('report_id',$reportId)
->using(OrderText::class)
->withPivot(
[
'report_id',
'included',
'content',
'status',
'comment'
]
)
->withTimestamps();
}
I then run the following code:
$order->texts(123)->sync(
[
1=>[
'included'=>true,
'content'=>'Test',
'status'=>null,
'comment'=>null
]
]
);
The query actually being run is the following:
update "orders_texts" set "content" = ?, "updated_at" = ? where "order_id" = ? and "text_id" = ?"
This is missing the report_id
condition which I set with wherePivot()
, so all the rows in orders_texts
with text_id=1
and order_id=5
(5 is the order ID) are being updated.
The query should include report_id
, ie:
update "orders_texts" set "content" = ?, "updated_at" = ? where "report_id" = ? and "order_id" = ? and "text_id" = ?"
cetetesoft
12th May 2025 @ 16:01
Let's try out Filament and move our own admin panels to it. This should provide us with a much more powerful admin backend.
driesvints
22nd Dec 2023 @ 09:06
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
Octane Version
v2.3.10
Laravel Version
v11.6.0
PHP Version
v8.3.6
What server type are you using?
FrankenPHP
Server Version
v1.1.4 PHP 8.3.6 Caddy v2.7.6
Database Driver & Version
Postgress
Description
Last week we updated our app previously using php-fpm
running on Forge to use Laravel Octane with FrankenPHP. Our site is mostly an API that handles analytics events (Like google analytics). It uses the default Laravel api
throttling.
In staging our app worked fine (30 req/sec same IP), but when deploying to production (1400 req/sec, different IPs) it started to fail, giving a lot of 429 Too Many Requests.
I quickly rolled back to php-fpm
and after a few hours tried again with the same problem. Rolled back and the next day I switched to Swoole and it worked perfectly without changing a single line of code nor having to redeploy anything. So I can confidently say that is NOT a bug in my code, but rather a bug with FrankenPHP or the Octane integration with FrankenPHP.
My theory is that the RateLimiter is not reseting between requests so it's shared between different users. So multiple different users trigger the rate limiter:
This is my Rate limiter configuration:
// AppServiceProvider
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
our production CACHE_STORE
is redis
. Throttling worked perfectly fine without octane and with octane but using Swoole. It failed with hundred of 429 Too Many Requests after installing FrankenPHP.
This is our bootstrap/app.php
:
<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use Illuminate\Support\Facades\App;
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
commands: __DIR__.'/../routes/console.php',
health: '/up',
then: function () {
Route::middleware('api')
->prefix('api')
->as('api.')
->domain(config('app.domain'))
->group(base_path('routes/api.php'));
Route::middleware('web')
->domain(config('app.domain'))
->group(base_path('routes/web.php'));
Route::middleware('web')
->domain(config('playsaurus.ads.domain'))
->group(base_path('routes/ads.php'));
}
)
->withMiddleware(function (Middleware $middleware) {
$middleware->throttleApi();
$middleware->redirectTo(
guests: '/login',
users: '/',
);
$middleware->web(append: [
\App\Http\Middleware\HandleInertiaRequests::class,
\Illuminate\Http\Middleware\AddLinkHeadersForPreloadedAssets::class,
]);
$middleware->api(append: [
\App\Http\Middleware\ConfigureLocale::class,
]);
$middleware->alias([
'localize' => \App\Http\Middleware\ConfigureLocale::class,
'embed' => \App\Http\Middleware\AllowsEmbeding::class,
]);
})
->withExceptions(function (Exceptions $exceptions) {
$exceptions->dontReport([
\App\Services\Announcements\InvalidVariantKey::class,
\App\Exceptions\CouponRedeemException::class,
]);
})->create();
Steps To Reproduce
It's difficult to reproduce. Because I can't test it in production because that would mean a lot of downtime for our users.
My theory is that it would be possible to reproduce from multiple different IPs. But since I don't have the means to test it, I don't know.
jhm-ciberman
14th May 2024 @ 00:15
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