New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 #10481
Comments
Dealing with the warnings from composer diagnose command resolved this issue for me. |
I again encountered this issue on another project I was trying to update. My 'composer diagnose' command gave an all clear output:
Composer update gave the following output:
|
I'm such an idiot! The problem was starring me right in the face... |
Hi, I solved the problem following the laravel upgrade guide in https://laravel.com/docs/7.x/upgrade#symfony-5-related-upgrades. Laravel 7 utilizes the 5.x series of the Symfony components. Some minor changes to your application are required to accommodate this upgrade. Foremost a change of Exception to Throwable in my app/Exceptions/Handler.php |
i have same problem. can you help me how to fix this problem? thanks |
I'm facing the same problem. I cannot run any php artisan command. How did you guys fix it? |
If you still have not solved the issue then please copy paste the error here. |
Please what was the issue and how did you solve it? I seem to be having the same issue. |
bruh
|
I'm also getting same error while running composer install/update please lemme know how can i solve my error |
Getting this too all of a sudden! Anyone have an answer yet? |
i'm getting this too @Ifriqiya |
@boyfinstar @brightraudona @being-yash @prodkt What error(s) message(s) are you getting? Mine had to do with updating my exceptions handler.php file to use the Throwable interface. Running 'composer diagnose' might throw some light. |
In Collection.php line 11: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be c PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\FARIRAI\Desktop\Laravel-Adminator-QuickAdminPanel-master\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1277 |
tried running composer update but got the error below
In Collection.php line 11: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be c PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Users\FARIRAI\Desktop\Laravel-Adminator-QuickAdminPanel-master\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1277 |
I got the following error while updating the composer in xampp/htdocs folder. I have tried all the methods but nothing actually works. I urgently need help with this. Fatal error: Uncaught ReflectionException: Class App\Console\Kernel does not exist in C:\xampp\htdocs\vendor\laravel\framework\src\Illuminate\Container\Container.php:803 |
if u're working with an existing prooject try running |
composer update did not work
…On Mon, Sep 26, 2022 at 3:14 PM Satyam Khanna ***@***.***> wrote:
if u're working with an existing prooject try running
composer update
—
Reply to this email directly, view it on GitHub
<#10481 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWWNMS7N76URHC5KHPEW65TWAGOVFANCNFSM5MTIOUKQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
And... what was it ??? I am in a same boat and this is driving me crazy. |
@deepaksharma-507, What error(s) message(s) are you getting? Mine had to do with updating my exceptions handler.php file to use the Throwable interface. Running 'composer diagnose' might throw some light. |
Some one know what can i run the command composer or php artisan?? return me erating optimized autoload files
In bootstrap.php line 19: require(C:\NASA\xampp\htdocs\Easy-School\vendor\symfony\polyfill-intl-idn/bootstrap80.php): Failed to open stream: No such file or directory |
@Alukkee98 You might be missing a package polyfill-intl-idn. For any detailed error messages check your PHP log file. |
Sorry for late reply. Just like you mentioned the error was right in my face. I had few old versioned packages, upgrading them resolved my issue. |
i am facing the same issue here when i run composer update i get the message below Loading composer repositories with package information
In Collection.php line 11: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::off PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\xampp\htdocs\Projects\genie_capital-dev\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1349 |
I tried running composer update to run a downloaded project and got this error. C:\xampp\htdocs\Laravel-Library-Management-system-main>composer update
In Collection.php line 11: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExi Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255 C:\xampp\htdocs\Laravel-Library-Management-system-main>composer diagnose C:\xampp\htdocs\Laravel-Library-Management-system-main> |
@SadafShk04 - Follow this link to first fix the PSR-4 issue. |
Error with composer install Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1 |
so what is the solution?? |
i meet this proplem composer update not work
Warning: require(C:\xampp\php\www\MOE\moe_new_systemC:/xampp/php/pear/vendor.php): Failed to open stream: No such file or directory in C:\xampp\php\www\MOE\moe_new_system\artisan on line 18 Fatal error: Uncaught Error: Failed opening required 'C:\xampp\php\www\MOE\moe_new_systemC:/xampp/php/pear/vendor.php' (include_path='C:\xampp\php\PEAR') in C:\xampp\php\www\MOE\moe_new_system\artisan:18 |
How can I fix the above issue? |
Solved it - >app folder should have console/kernel folder |
not working |
|
@KarishmaSharma24 this issue has been closed. If you still require help, I recommend you open a new issue and fill out the requested details there. |
Dockerfile:
|
@roqueguardia looks like support for Enums was added only with PHP 8.1 so you need to update your Dockerfile accordingly. |
Hi all, have similar a issue that occurs only in a CI pipeline after I've added a file to my "autoload": {
"files": [
"app/Helpers/bcmath.php" <-- this was added
],
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
}, Locally it works fine after a one-time Step 8/18 : RUN composer install --optimize-autoloader
Generating optimized autoload files
> Google\Task\Composer::cleanup
Removing 272 google services
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
Script Illuminate\Foundation\ComposerScripts::postAutoloadDump handling the post-autoload-dump event terminated with an exception
In autoload_real.php line 41:
require(/var/www/html/laravelapp/vendor/composer/../../app/Helpers/bcmath.p
hp): Failed to open stream: No such file or directory Soooo while I was writing this I kind of figured it out myself lol )) The problem was in my Dockerfile: # this is how it was and didn't work
COPY composer* ./
RUN composer install --optimize-autoloader
COPY ./ ./
RUN chmod 777 /var/www/html/laravelapp/bootstrap
# this is how I've changed it so it works now (repo files copied before `composer dump-autoload` runs, so file exists)
COPY ./ ./
RUN composer install --optimize-autoloader
RUN chmod 777 /var/www/html/laravelapp/bootstrap Hope this will save someone a minute or two! |
Yes, I had to change the most part of my Dockerfile with new dependencies that supports PHP 8.2 and replace alpine:3.14 for php:8.2-alpine After that, It worked :) |
O Meu também está com este erro ao rodar composer intall, ou composer update apresenta a seguinte mensagem: Loading composer repositories with package information
Warning: require_once(C:\laragon\www\petshop/bootstrap/app.php): Failed to open stream: No such file or directory in C:\laragon\www\petshop\artisan on line 20 Fatal error: Uncaught Error: Failed opening required 'C:\laragon\www\petshop/bootstrap/app.php' (include_path='.;C:/laragon/etc/php/pear') in C:\laragon\www\petshop\artisan:20 |
@ThaisCp please check that some of your classes does not comply with PSR-4 - that means their namespace are not properly constructed and/or does not match the directory structure (like Then check that your project has a valid |
I was having the same issue I found that my project does not have artisan file in the root, so I copied the artisan executable from another Laravel project and everything start to work again. Make sure artisan file should not be included in the .gitignore it is placed when we install new Laravel project and cannot be installed by composer update or install, instead some scripts depends on artisan executable so make sure its availability in the project root. Please like if it solves the issue, so others can take the benefit. |
My
composer.json
:Output of
composer diagnose
:When I run this command:
I get the following output:
And I expected this to happen:
Generate optimised files and complete step, but instead, I can't run any artisan command.
The text was updated successfully, but these errors were encountered: