php artisan package:discover laravel project composer install
Why am I geting this error when I try to run composer install on my laravel project?
Illuminate\Foundation\ComposerScripts::postAutoloadDump @php artisan package:discover
In Request.php line 277:
Class 'Symfony\Component\HttpFoundation\FileBag' not found
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
See also questions close to this topic
-
React show blank page in a Laravel app
I have a Laravel and React App works fine on my local machine and I want to deploy the app on my VPS.
The first page of the app show a login page which is built with sample blade view. It works like a charm and let me in if the email and password are correct.
After the login the app will redirect the user to the react components, here on my VPS it will just display a blanc page !
Despite the
mix-laravel
generate anapp.js
file inside thepublic/js
folder and it contains my components and all the stuffs there. Also it's called by the app correctly !There is no errors, no warning and I have no clue what's going on. (I copy paste the project, is this may cause the problem ?) I appreciate any help guys.
-
Upload multiple large files to s3 using laravel
Anyone knows how to upload large multiple files to s3 with laravel 5? i tried to use streams but it works only for files less than 5M, here is my code:
foreach ($request->file('photos') as $file) { $filename = $file->getClientOriginalName(); $s3 = \Storage::disk('s3'); $filePath = '/uploads/' . $filename; $stream = fopen($file->getRealPath(), 'r+'); $s3->put($filePath, $stream); }
i tried to update settings in my php.ini as well like this but no change
upload_max_filesize = 50M
-
GET path not accepting 'dot' in it
I have router path with a '.' in it, my path is
downloads/pass.pkpass
I have defined the path in web.php as the following
$router->get('downloads/pass.pkpass', 'PassServerController@downloadPass');
but somehow it's not working. if I remove the '.' it's working fine. what might be the problem here?
It's was working before recently I updated lumen after that it's not working.
-
Connection refused to localhost when testing Satis
I have been trying to set up satis so I can create private packages for our company. I have set up a test environment locally which works well but when requiring one of these packages from a project using composer I get the error:
Warning: Accessing localhost over http which is an insecure protocol. The http://localhost:8001/packages.json file could not be downloaded: failed to open stream: Connection refused http://localhost:8001 could not be fully loaded, package information was loaded from the local cache and may be out of date.
I have changed my
composer.json
file to set thesecure-http
flag to false.Does anyone know how to fix this?
Thanks.
-
Composer update show this error: VirtualAlloc() failed: [0x00000008]
Composer worked find yesterday, but today after I trying install: composer require --prefer-dist "himiklab/yii2-recaptcha-widget" "*"
While run composer update command it show me error:
VirtualAlloc() failed: [0x00000008] VirtualAlloc() failed: [0x00000008] PHP Fatal error: Out of memory (allocated 956301312) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 84
Fatal error: Out of memory (allocated 956301312) (tried to allocate 201326600 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSet.php on line 84
I try update composer on my other projects, it is worked fine. After some researching I increased memory_limit: 4096M(also -1) in php.ini file. Then I tried to increase virtual memory in Computer->Properties, but still show error.
I try to run next command: composer update -vvv --profile, result in attached image Composer error
Any help would be greatly appreciated.
-
PHP doesn't find class from library that should be auto-loaded by Composer
PHP doesn't seem to find a class defined in a library which I'm trying to auto-load from Composer.
I'm messing around with PHP served by Apache 2.4, which I've had success with in the past, but introducing Composer into the mix has proven troublesome for me. I'm attempting to use an OAuth2 library for Slack, installed successfully using
composer require bramdevries/oauth2-slack
in the virtualhost's document root, such that the file structure looks like:+-- composer.json +-- composer.lock +-- index.php +-- vendor/ | +-- autoload.php | +-- composer/ | +-- bramdevries/ | | +-- <library files> | ... dependencies
This one library is the only one that I'm using thus far, and my
index.php
is the only source file in the entire document root that isn't a library insidecomposer/
. This project is, for all intents and purposes, about 3 lines of PHP code, shown below.From my understanding of the Composer documentation: since I'm using a library that provides its own
composer.json
, Composer should take care of generating all of the auto-loading stuff if I docomposer dump-autoload
(which, I gather, is unnecessary since Composer generates that stuff onupdate
,install
, etc).However, whenever I go to load my
index.php
in a browser, Apache2 responds with HTTP 500.Given the file structure above, here is the entirety of my
index.php
:<?php require "vendor/autoload.php"; $slack = new League\OAuth2\Client\Provider\Slack([ /* stuff */ ]); ?>
And here is the error found in
/var/log/apache2/error.log
:PHP Fatal error: Uncaught Error: Class 'League\\OAuth2\\Client\\Provider\\Slack' not found in <document_root>/index.php:3 Stack trace: #0 {main} thrown in <document_root>/index.php on line 3
So, I'm clearly doing something wrong, but what?
I've used Apache2 and PHP for a little while now (including a project for a pre-capstone CS project class this semester), but my working knowledge of PHP is limited to the functional aspects; I haven't messed much with its OOP aspects. Also, I'm familiar with dependency/package managers similar to Composer (specifically, NPM for Node.js), but not with Composer itself. TIA!
Edit: forgot to add – I've searched around enough that every link on the first couple pages of any given Google search with related terms shows up purple, and nothing I've tried thus far has worked for me, so I'm sure I'm just missing a step or something.