Composer get stuck while generating autoload files - composer-php

After an update to the new Composer version
a2a70380c14a20b3f611d849eae7342f2e35c763 2013-10-21 09:51:22
Composer get stuck while generating autoload files. CPU is running on 100%, but no files are generated.
I am using XAMPP PHP version 5.5.3. I didn't have any problem before.

Related

Running composer install doesn't resolve undefined type error in cloned Laravel project

I've cloned a Laravel project from Github, then I've run composer install for getting vendor folder. This folder has appeared but I also get weird red lines under each class that show Undefined Type errors. I also deleted the composer.lock and run composer update, but the errors are still there!
Is there any other thing that I should do?
The project was running perfectly, So I found out it was because of my IDE.
The VS Code wanted to validate code using php, and it is not finding php installed.
It's solved by setting php.validate.executablePath in Vs Code setting.
For more information: "Cannot validate the php file. The php program was not found"

Installing Composer and Packagers - first time

I have never used Composer, but I want to use PHPSpreadsheet package, and it is recommended that Composer is used.
I am on a MAC using XAMPP and Netbeans.
I have installed Composer, and I have run the following command to get and install the PHPSpreadsheet package.
php ../../Composer/composer.phar require phpoffice/phpspreadsheet
I am running this in my project folder, (hence the ../../ to where Composer.phar is located.
This downloads the files into a vendor folder in my project folder.
What should I do then? Do I need to keep it in the Vendor folder, or can I move into a folder of my choice?
Netbeans has Composer options in the menus, but as far as I can see, this is for creating dependencies rather than installing packages.
I know I am totally missing the point of Composer somewhere, but have spent hours just trying to get this work.
Many thanks
You should really start with the docs -> https://getcomposer.org/doc/01-basic-usage.md
You have to keep the vendor directory - this is where all dependencies are kept. If you require more packages - then they will be installed in that directory.
After requring the package you have to load it so the PHP will know all the classes. Composer comes with great autolader. It is located by default in vendor/autoload.php. So what you have to do now is to require this file in your project. After that all classes from composer packages will be loaded automaticaly each time you use them in the code :)
I hope this will help you with this great tool. Cheers.

Does Laravel autogenerates autoload files without runninq composer by user?

A strange thing happened on my server:
autoload files in vendor/composer directory were touched/regenerated without me or any other user running composer install, composer update, composer dump-autoload or any other commands. My main concern is that one of the files was generated with invalid data that crashed my whole site and it took a time to find the problem.
Are there any circumstances that Laravel does this automatically? (There may have been a network malfunction for a few minutes when this happened.) If yes, where can I read about this in the documentation? Is it possible to turn it off?

Installing Laravel Spark issue

I am trying to install Laravel Spark following the Spark installation procedure here: https://spark.laravel.com/docs/1.0/installation
I can get the packages and dependencies to install correctly ad without any issues using: spark new sparkapp --team-billing
however when I serve the page (on xampp) and go to the registration page the page does not render properly. What I see is a semi-processed template and with no css and javascript as below:
Any help would be greatly appreciated
It looks you haven't run gulp, which will compile the css and javascript into files that will then be applied to your webpage. Notice halfway down the installation docs for Spark, it says:
Note: Once Spark has been installed, don't forget to run npm install,
gulp, and php artisan migrate.
If you have tried running gulp, then make sure it doesn't result in an error. I've been having the same error and it's because gulp is not installing correctly.

fuelphp No composer autoloader found

I got error message when install fuelphp
No composer autoloader found. Please run composer to install the FuelPHP framework dependencies first!
Also i my composer is updated.
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
I am using PHP7 with a Vagrant environment.
Any idea about this error ?
It is not able to find installation of fuelphp. Most common issue is that index.php("public" or "public_html" folder) does not have the fuelphp's app, core and packages path set properly.
change DIR.'../ to DIR.'/../../(goes back one folder level)
There should be three of them.

Resources