Install cakePHP 3.0 with composer issue - php

I used command to install new CakePHP project:
composer create-project --prefer-dist cakephp/app project-name
but it always display this error:
[RuntimeException]
Could not scan for classes inside "database/seeds" which does not appear to be a file nor a folder
Picture attached
Does anyone know how to solve this problem?

Related

How to start cloned rep Yii2

How can i start project cloned from bitbucket, based on Yii2, on my localhost?
Composer is installed.
When i clone it, composer update give me nothing. composer create-project --prefer-dist yiisoft/yii2-app-basic inside this project dont work, with error "folder is not empty".
When i use this command composer create-project --prefer-dist yiisoft/yii2-app-basic without clone rep, its work good, and i cant clone in just created folder?
How i can run cloned yii2 project on my localhost? Help pls. Sorry for my grammar.
Error after composer update (install)
Repository content.
Pluggins in install-plugins.bat
`php composer.phar require --prefer-dist mihaildev/yii2-ckeditor "*"
php composer.phar require kartik-v/yii2-widget-select2 "#dev"
php composer.phar require kartik-v/yii2-widget-datetimepicker "*"
php composer.phar require --prefer-dist yiisoft/yii2-imagine
php composer.phar require zelenin/yii2-slug-behavior "~1.5.1"
php composer.phar require --prefer-dist moonlandsoft/yii2-phpexcel "*"
php composer.phar require guzzlehttp/guzzle
php composer.phar require electrolinux/phpquery
UPD: Screen repository
It seems like, for some reason, the publisher of the repository added the dependencies to an extra file instead of them being added to the composer.json the usual way.
You can deal with this a couple of ways, both should give you the same results.
Option 1:
Install the Yii2 app into a new folder:
composer create-project --prefer-dist yiisoft/yii2-app-basic
Clone the repository you want to use into another folder.
Drag&drop the contents of the cloned repository into the Yii2 folder, it will overwrite the Yii2 files, preserving the ones that don't change and adding the ones that don't exist.
Add the extra dependencies, either by running the install-plugins.bat script or by hand running them one by one in the console.
Your project should be runnable now.
Option 2:
Clone the repository you want.
Copy the Yii2 composer.json into the root folder of the repository.
Run composer install
Add the extra dependencies, either by running the install-plugins.bat script or by hand running them one by one in the console.
Either way should give you the same results, you will end up having a vendor folder in the root of your project with all the dependencies, specified by composer.json and composer.lock that you need to run the project.

Laravel installed but nothing inside the folder

I ran following 3 sets of command in order to install laravel via command prompt :
1) composer
2) cd D:\xampp\htdocs\Laravel
3) composer create-project --prefer-dist laravel/laravel Laravel
It said that the download was successful , but when i opened the laravel folder , it is empty. So, i tried reinstalling it but it showed as below :
[InvalidArgumentException]
Project directory Laravel/ is not empty.
Any help on this ?
You should run:
composer dump-autoload
and if does not work you should:
re-install composer
and
composer create-project --prefer-dist laravel/laravel blog "5.8.*"
You should let composer installer create the folder for you.
Hence your updated list of commands would be:
CMD
cd D:\xampp\htdocs\
composer create-project --prefer-dist laravel/laravel demo_project
demo_project is the name of the folder/project name that would be created inside htdocs

Laravel 5.5 install

When I try to install Laravel 5.5 with laravel new project --dev
[Symfony\Component\Debug\Exception\FatalThrowableError]
Parse error: syntax error, unexpected '<<' (T_SL), expecting ']'
It is just me or because it is not release yet?
EDIT:
Btw, it is when I try to make php artisan key:generate... If I put any key in .env it works...
Thanks
composer create-project laravel/laravel blog "5.5.*" --prefer-dist
To install Laravel 5.5 you need launch composer create-project as usual and you need to set the “dev-develop” version of the laravel/laravel package:
composer create-project --prefer-dist laravel/laravel blog dev-develop
Where:
laravel/laravel: is the package for Laravel installation;
blog: is the new directory for your new project (you can change it);
dev-develop: is the next version of Laravel.
Yuo can find more information here
https://medium.com/#robertodev/how-to-install-laravel-5-5-dev-d721873a8c89
I had the same problem.
For me even
php artisan
did not work.
I fixed it with a simple
cd /my/project/folder
composer update
php artisan key:generate
in the console.
Hope this helps.
This is happening because of your Laravel Installer version. I have faced the same problem.
Run following command:
composer global update (it will update your Laravel Installer)
If you don't want to install again, then fix by following command:
composer update (from your project directory and it will update your project files)
Additional:
Sometimes, it may cause of Composer version. You can update your composer version by following command:
composer self-update
Then you can update your project files.
Hope this answer will help you.

Laravel 5 installing error

Steps I've done:
I created a folder named 'laravel_5'.
open 'cmd' then typed 'cd D:\xampp\htdocs\laravel_5'.
re-enter 'D:' to change directory.
now I'm in the directory 'D:\xampp\htdocs\laravel_5'.
I input the command 'composer create-project laravel/laravel --prefer-dist' found in the laravel website.
Error occurred:
When you create new project using composer, it will automatically create project folder for you.
Go to D:\xampp\htdocs and change your composer command to this:
composer create-project laravel/laravel laravel_5 --prefer-dist
Or
If you still facing problem while using composer to create laravel project then simply go to github and clone the repo or download the zip and do composer update within your application directory.
https://github.com/laravel/laravel.git

Difference between require and install vs create-project in composer

I don't get how the create-project works in composer. Lets take Laravel as example.
I can install this PHP framework with the following command:
composer create-project laravel/laravel --prefer-dist
This command installs the framework for me leaving me with a few folder in the root of my dir:
app
bootstrap
public
vendor
Plus some files.
But when I simply use the following composer command:
composer require laravel/laravel --prefer-dist
composer install
Then this only installs the vendor folder. No other files and folders are downloaded by composer.
How come? What is so different? How does composer know what other files to get when I use the create-project laravel/laravel command and why do I only get the vendor folder when I do require laravel/laravel?
require will add a dependency to the composer.json file and load it into the vendor directory as you have correctly noticed.
create-project on the other hand will clone the dependency, i.e. use the dependency as a template for a new project. Take a look at the repository behind laravel/laravel: https://github.com/laravel/laravel

Categories