Closed bedoz closed 4 weeks ago
I was unable to install some dependencies due to their absence from the Packagist repository:
So I removed them from the composer.json
file.
I first installed laravel-lang/common
version 6.3 to make sure the installation was correct, then upgraded to version 6.4. There were no problems with the installation.
I also noticed that you have not installed the laravel-lang/lang
dependency version 14 to work with Laravel 10. This could also be the cause of the error.
composer require --dev laravel-lang/lang:^14.0
https://laravel-lang.com/packages-common.html#installation
I performed these steps on both Windows and Ubuntu (WSL).
I have not been able to reproduce the problem. Can you send me a detailed error log?
To do this, run the composer update -vv
console command.
Hi Andrey, sure mapo/* are private packages we wrote to extend laravel and backpack for laravel. you can remove these packages i also did it to find what package break my installation. I tried to add "laravel-lang/common": "^6.3.0" again and to install also "laravel-lang/lang": "^14.0" that was already installed as dependency of common package.
Removing "common" package my log is:
Adding "common" and "lang" package my log is:
In my composer.json in require-dev section i added:
"laravel-lang/common": "^6.3.0",
"laravel-lang/lang": "^14.0",
Does your application have a published config/localization.php
file?
No, no locatization.php file are in my config folder.
Ok. There's no configuration problem.
Looking at the log file, it seems that the problem may be either a lack of RAM to complete the dependency installation command or something with the application.
I ran the above example on a clean Laravel 10 project under PHP 8.3 on both Windows and Ubuntu.
Try deleting the vendor
folder and reinstalling the dependencies first:
rm -rf vendor
composer update
If you are developing a package, make sure that your files are not modified in the vendor folder.
Try the following steps:
rm -f storage/logs/laravel.log
php artisan package:discover
And after that, once the error appears, check the contents of the storage/logs/laravel.log
file.
Also, what version of Composer are you using?
composer --version
My version is:
$ composer --version
Composer version 2.7.7 2024-06-10 22:11:12
PHP version 8.3.9 (D:\modules\php\php.exe)
Run the "diagnose" command to get more detailed diagnostics output.
I tried to remove the vendor folder before, but anyway when install vendors it fail. The same thing happen on my AWS EC2 system on stage website with elasticbeanstalk where deploy recreate server from 0.
I also tried with php artisan package:discover
command from command line
A:\PhpstormProjects\elica(main -> origin)
λ rm -f storage/logs/laravel.log
A:\PhpstormProjects\elica(main -> origin)
λ php artisan package:discover
A:\PhpstormProjects\elica(main -> origin)
nothing happened and no log generated.
My composer version is:
A:\PhpstormProjects\elica(main -> origin)
λ composer --version
Composer version 2.7.7 2024-06-10 22:11:12
PHP version 8.1.18 (A:\laragon\bin\php\php-8.1.18-Win32-vs16-x64\php.exe)
Run the "diagnose" command to get more detailed diagnostics output.
I try now to update it again.
As a hard solution, you can restrict the Common version by making the following changes to your composer.json
file:
-"laravel-lang/common": "^6.3",
+"laravel-lang/common": "6.3.*",
After that, you need to run the composer update
console command.
But I'd like to find a reason for this behavior.
There's nothing suspicious.
I rolled back my PHP version to 8.1.29 and tried running the commands again. No errors:
A:\PhpstormProjects\elica(main -> origin) λ rm -f storage/logs/laravel.log A:\PhpstormProjects\elica(main -> origin) λ php artisan package:discover A:\PhpstormProjects\elica(main -> origin)
And how much RAM is allocated to the CLI process of PHP?
You can see this in the php.ini
file in the memory_limit
parameter or by running the php -i | grep memory_limit
console command.
For example:
My Windows:
memory_limit = 32768M
My Ubuntu (Windows WSL):
$ php -i | grep memory_limit
memory_limit => -1 => -1
Also upgrading to latest version no luck.
λ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading laravel-lang/models (1.0.0 => 1.0.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 0 removals
- Downloading laravel-lang/models (1.0.1)
- Upgrading laravel-lang/models (1.0.0 => 1.0.1): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code -1073741571
So i tried to update with "6.3.*" but no luck again:
λ composer update
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 3 removals
- Removing composer/class-map-generator (1.3.4)
- Removing composer/pcre (3.1.4)
- Removing laravel-lang/models (1.0.1)
- Downgrading laravel-lang/common (6.4.0 => 6.3.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 0 installs, 1 update, 3 removals
- Removing laravel-lang/models (1.0.1)
- Removing composer/pcre (3.1.4)
- Removing composer/class-map-generator (1.3.4)
- Downgrading laravel-lang/common (6.4.0 => 6.3.0): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code -1073741571
I had that config since 2 days ago without any issue. I can't give myself peace of mind how it could happen.
Memory Limit i have right now is:
A:\PhpstormProjects\elica(main -> origin)
λ php -i | grep memory_limit
memory_limit => -1 => -1
mh strage thing... i tried to remove other packages and keep "common" installed. Maybe a bug of package:discover i think. with less package installed it works again.
It's a very strange problem. I will come back later and try again to reproduce or find a logging method.
@bedoz, try replacing the vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php
file with the following (it has added try-catch to the build
method. It is responsible for processing packages in the package:discover
console command (vendor/laravel/framework/src/Illuminate/Foundation/Console/PackageDiscoverCommand.php:36
)):
And run the composer update
console command. See what it comes up with.
@bedoz, hi! Any luck with the problem?
Hi @andrey-helldar not at the moment... because the issue come first and also with that changes i have no log. i tried also adding a dd() as first line of that command, no luck, no dd printed.
i'm going to investigate more on this, these days.
thank you for your help, i'll keep you informed if i find something else.
Okay. I'll be waiting. I have not been able to reproduce the problem, but would like to know the cause of the problem.
There has been no activity on this issue for a long time, so we are closing it.
In case your problem is actual, you can create a new issue.
Thank you!
Lang Package Name
laravel-lang/common
Lang Package Version
6.4.0
Laravel Framework Version
10.48.15
PHP Version
8.1.18
Dependencies
"require": { "php": "^8.1", "backpack/crud": "^6.0", "backpack/filemanager": "^3.0", "backpack/logmanager": "^5.0", "backpack/permissionmanager": "^7.0", "backpack/pro": "^2.0", "backpack/revise-operation": "^2.0", "backpack/settings": "^3.1", "backpack/theme-coreuiv2": "^1.1", "barryvdh/laravel-dompdf": "^2.0", "cviebrock/eloquent-sluggable": "^10.0", "google/recaptcha": "^1.3", "guzzlehttp/guzzle": "^7.2", "laravel/fortify": "^1.17", "laravel/framework": "^10.10", "laravel/passport": "^v11.8.7", "laravel/sanctum": "^3.2", "laravel/tinker": "^2.8", "livewire/livewire": "^3.4", "maatwebsite/excel": "^3.1", "mapo/backpack-editorjs-field": "dev-main", "mapo/laravel-backpack-menu": "dev-multidomain", "mapo/laravel-backpack-translation-manager": "dev-Laravel-10", "mapo/laravel-multisite-on-folders": "dev-redirect-feature", "mapo/model-translation-sheet": "dev-Laravel-10", "mapo/qr-code-manager": "dev-Laravel-10", "mapo/seo-tools": "dev-multi-domain", "opcodesio/log-viewer": "^3.6", "opensearch-project/opensearch-php": "*", "ziming/json-field-for-backpack": "^1.1" }, "require-dev": { "backpack/generators": "^v4.0", "barryvdh/laravel-debugbar": "^3.8", "deployer/deployer": "^7.3", "fakerphp/faker": "^1.9.1", "jeroen-g/laravel-packager": "^2.9", "laravel-lang/common": "^6.3", "laravel/pint": "^1.0", "laravel/sail": "^1.18", "mockery/mockery": "^1.4.4", "nunomaduro/collision": "^7.0", "phpunit/phpunit": "^10.1", "spatie/laravel-ignition": "^2.0" },
Issue description
After composer update the php artisan discover package post deploy script fail with error 193. The manual command discovery package give a segmentation fault on unix system
Steps to reproduce
composer update