My problem is that not all server run PHP 5.6 or above.
So I need use a older version of CakePHP 3.1.* that support PHP 5.5.*/5.4.* .
The problem is the Composer install solution:
composer create-project --prefer-dist cakephp/app:3.1.9 demo
Gives me an error:
Could not find package cakephp/app with version 3.1.9
I have tried other version (3.1.11/12/10) without success.
Is there a way or do I need to download the releases manually from GitHub every time?
cakephp/app is a different repository from cakephp/cakephp. So it follows it's own versioning.
cakephp/app is a template/skeleton that you can use to create your app. While cakephp/cakephp is the main core.
Check below for the cakephp/app:
https://github.com/cakephp/app
https://github.com/cakephp/app/releases
I guess you could use the version 3.1.2 of cakephp/app that allows you to have PHP >= 5.4
https://github.com/cakephp/app/blob/3.1.2/composer.json#L8
Related
I am trying to create laravel project on windows but this problem show to me and
I try update the composer.
the php version is 8.0.6,
the composer version is 2.0.14,
the laravel version is 4.2.5,
Per comments on this Github issue this is a problem with the latest version of the Symfony Console component, which is 5.3.0. Composer is based on this library, but you can downgrade to the previous version 5.2.8 with this command:
composer global require symfony/console:5.2.x
And then force the update with:
composer global update
Instead of laravel new your-project-name you should use composer create-project laravel/laravel your-project-name 4.2.*
I try to install Laravel 5.5 version so I run command:
composer create-project laravel/laravel test 5.5.*
but I got this error:
If you see the top of image I run command php -v and its clear that version i 7.0.27
How to solve my issue?
You can try to update your composer:
composer update
Or try to use the full php7 path, example:
/path/to/your/php7 composer.phar create-project laravel/laravel test 5.5.*
Seem your XAMPP not installed properly. Uninstall existing XAMPP and manually delete the entire folder. (take backup of htdocs if there s some files as well PHPmyadmin DB backups). And download XAMPP from here and install it.
Install composer
and run this
composer create-project --prefer-dist laravel/laravel test
It's PHP7, so composer install Laravel 5.5 or higher by-default
I had this issue and the problem was that an after php upgrade there was still two php versions running almost together, so, in my case composer was using one version of php and laravel use the other. To solve that problem i uninstalled all php versions, update my php repositories and then i made a fresh install of php, composer and laravel.
Nowadays I have laravel 5.5 running with php 7.2 and i added laravel in enviroment variables so when i need to creaste a new project i use laravel new project_name
Hope this helps you!
Don't specify a version for project
composer create-project --prefer-dist laravel/laravel test
By any chance is the PHP require value in composer.json not "php": ">=7.0.0"
Try adding --prefer-dist and remove 5.5.*
Laravel requires PHP >= 7.0.0, you currently have version 5.6.
Install a newer version of PHP or use homestead.
Could not find package /laravel/laravel with stability stable.
So I've got that error when I tried to create new laravel project with the following command:
composer create-project --prefer-dist /laravel/laravel project
And if I try just laravel new project, I get:
laravel: command not found
However laravel is installed, and if I move to its installation folder (which is ~/.config/composer/vendor/laravel/installer), and I type:
php laravel new project
Then it works but I get bunch of * suggests installing *. For example:
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use psr7 bridging features (0.2.*).)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
And many more.
I'm on Linux Mint Cinnamon 64-bit, and LAMP.
Everything you need is covered in Laravel's extensive documentation.
Via Composer Create-Project
Alternatively, you may also install Laravel by issuing the Composer
create-project command in your terminal:
composer create-project --prefer-dist laravel/laravel blog
Note that there is no preceding slash in laravel/laravel.
For the installer to work, again you can refer to the documentation:
Via Laravel Installer
First, download the Laravel installer using Composer:
composer global require "laravel/installer" Make sure to place the
$HOME/.composer/vendor/bin directory (or the equivalent directory for
your OS) in your $PATH so the laravel executable can be located by
your system.
Once installed, the laravel new command will create a fresh Laravel
installation in the directory you specify. For instance, laravel new
blog will create a directory named blog containing a fresh Laravel
installation with all of Laravel's dependencies already installed:
laravel new blog
You can read more about changing your $PATH variable here
I want to install Laravel 4.2 installation some packages via Composer. However, I am getting an error
“failed to clone git#github.com:symphony/Translation.git.git was not found. Check that it is installed in your path env. ‘git’ is not recognized as an internal or external command”
I want to use version 4.2.0 which is an older version of laravel. I’m successful to download if I do not mention version number but not when I include version number.
I tried:
C:\xampp\htdocs\laravel composer create-project laravel/laravel newapp 4.2 –prefer-dist
Or
C:\xampp\htdocs\laravel composer create-project laravel/laravel newapp –prefer-dist 4.2.0
Or
C:\xampp\htdocs\laravel composer create-project laravel/laravel newapp –prefer-dist 4.2.*
Or
C:\xampp\htdocs\laravel composer create-project laravel/laravel {{newapp}} 4.2.* –prefer-dist *
All with same error...
What do I need to make it work? Do I need to install git but How? i have no idea thanks for your help.
Note:I have latest composer downloaded yesterday July 24
Why do you want to use an old and not updated version of Laravel?
The first one is the correct way to install Laravel with composer/create-project.
Can you try to clone the laravel/laravel repository and to run composer udpate?
Lynda was a good source of information for me to learn Laravel(4.2) and if I recall there was a course that went into detail on installing Laravel on Windows, I could be wrong but if you have Git installed already you will also need to add it as a variable in your Paths to be used in your prompts.
The link below should help you in setting the Paths to Git and they should be something along these lines.
;"C:\path\git\bin";"C:\path\git\cmd"
http://www.computerhope.com/issues/ch000549.htm
I bullishly downloaded and installed GIT not knowing option to choose (used command prompt option) as Romain suggested , reboot and retried and it worked. Lynda indeed have a chapter on installation but did not mention Git so following instruction failed. Note: only trying previous version failed, was ok for latest laravel 5 version before installation of Git. Thank you all...one day lost of trying and testing but happy ending :)
I have seen there is a new version of Laravel- 4.1 with new documentation in the laravel website. Few things have changed , really but i would like to continue using laravel version 4 for now. Is there any way i can do to install the version 4 and not 4.1 through composer? I'm asking that because version 4.1 is downloaded automatically whenever i run composer create-project laravel/laravel --pref destination in my terminal
You can specify version number after your destination
composer create-project laravel/laravel --prefer-dist 4.0
Composer documentation here
Even better if you add an asterisk after version number (4.2.*): the newest subversion will be installed e.g. 4.2.12 instead of 4.2.0
composer create-project laravel/laravel project-name --prefer-dist 4.2.*