I am using Symfony 2.3.4
On my console i did composer create-project sylius/sylius --prefer-dist
Everything downloaded smoothly until it came to installing sensio/distribution-bundle
Composer throw out this error message
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/sensio/SensioDistributionBundle/zipball/4
a2c803dc8db79952ad5e71783c16178427bbc02" file could not be downloaded (HTTP
/1.1 404 Not Found)
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repos
itory-url="..."] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--n
o-scripts] [--no-progress] [--keep-vcs] [package] [directory] [version]
I tried :
Editing sylius/composer.json and modify "sensio/distribution-bundle": "2.3." to "sensio/distribution-bundle": "2.2.-dev"
Open a shell in C:\wamp\www\sylius. Rename app/config/parameters.yml.dist to parameters.yml, run php composer.phar update --prefer-dist, still having lots of errors about MongoDb
Is there any other way to install sylius?
How can i fix this?
Thanks heaps
It seems that sylius build in 0.1.0 is broken. If you want functional sylius installation you have to use dev-master version.
composer create-project sylius/sylius sylius dev-master
They fixed the issue! The problem was indeed with the Sylius build. Today i created a freshly installed Symfony2 onto my server, and did composer composer create-project sylius/sylius --prefer-dist
Sensio/SensioDistributionBundle installed correctly.
Steps to installed Sylius
1. composer create-project sylius/sylius --prefer-dist (this method download compressed file when available) or composer create-project -s dev sylius/sylius
make sure to enable php_info extension
create a database in php myadmin
cd sylius and then php app/console sylius:install
The last part of the installation will asked you for some parameters, the default option given works fine. Accustomed it to your config
I spend 48 hours trying to install sylius finally things got better now.
There is many issues with Sylius at the moment. Check Out And is really slow. I am still finding a way to speed things up. I took like 3 minutes to load when i clicked on Register.
If you got issued like MongDB not found, or any bundle not found, then surely there is a problem with the way you are trying to install Sylius. And Please at the moment do not cd sylius and composer update, it won't worked. I got told that they rearranged the bundle.
You can find more detailed Click here!
Please feel free to edit this post if you feel that there is something that i haven't talked about for sylius installation.
Thanks to Sylius Contributors!
Related
I have installed Composer on windows 7 with the Composer-Setup.exe.
I am trying to install Laravel via Composer on Windows 7. I've tried 2 different commands:
composer global require laravel/installer
and
composer create-project laravel/laravel blog --prefer-dist
but they don't work.
In the end, there always a message: "29 packages you are using are looking for funding"
When I type composer fund to find out, it says that:
Composer could not find a composer.json file in C:\Users\Administrators
Does any one have any solution or any useful link?
Your composer.json file have some packages which have paid licence. However composer do not prevent installing Laravel due to this.
As per logs Laravel has been successfully installed. Can you check at the destination folder.
Since a few days i cant install composer-packages anymore in my local docker container.
I create new composer.json with composer init and try to add a package with composer require fzaninotto/faker
Always i get the same error message
# composer require fzaninotto/faker
Using version ^1.9 for fzaninotto/faker
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
Failed to download fzaninotto/faker from dist: The zip extension and unzip command are both missing, skipping.
Your command-line PHP is using multiple ini files. Run `php --ini` to show them.
Now trying to download from source
- Installing fzaninotto/faker (v1.9.1): Cloning fc10d778e4 from cache
fc10d778e4b84d5bd315dad194661e091d307c6f is gone (history was rewritten?)
Installation failed, reverting ./composer.json to its original content.
[RuntimeException]
Failed to execute git checkout 'fc10d778e4b84d5bd315dad194661e091d307c6f' -- && git reset --hard 'fc10d778e4b84d5bd315dad194661e091d307c6f' --
fatal: failed to read object fc10d778e4b84d5bd315dad194661e091d307c6f: Operation not permitted
require [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...
First i guess my ssh key is the problem but i create a new one and add this to github with the same error.
Than i try it with composer clear and the problem don't resolved.
The problem come in EACH docker container and EACH composer packages... so i cant be a problem with single packages or container.
Have anyone an idea that i can do to use composer again?
If you're using Docker Desktop (Windows) and you updated to the latest version 2.2.0.4, then you get this issue.
Downgrade to the 2.2.0.3 and it should work again (at least it did for me).
See: https://forums.docker.com/t/issues-after-upgrading-docker-desktop-to-2-2-0-4/90589
To downgrade:
Uninstall Docker Desktop. Attention: it will delete your containers, save them before if you want to import them back
Go this page: https://docs.docker.com/docker-for-windows/release-notes/
Click Download under 2.2.0.3
Install Docker Desktop with the installer file
When started it will ask to upgrade to 2.2.0.4, just say "Skip this build"
I didn't have enough points to comment on the top answer but the Docker issue was just closed (like an hour ago!) and so simply updating Docker Desktop on Windows should fix it. Worked for me at least. Now I can install Drupal again!
i am working on multiple composer packages and a application which dose requries all the packages that i develop.
I would like to know how i can have a package with multiple version
stable version for production
development / master version for local development
i tried following config but it din't work
{
"minimum-stability" : "dev",
"require" : {
"varunsridharan/vsp-framework" : "^1.0",
"wponion/wponion" : "^1.0"
},
"require-dev" : {
"varunsridharan/vsp-framework" : "dev-master",
"wponion/wponion" : "dev-development"
}
}
When i run composer install or composer install --no-dev i get the below output
Loading composer repositories with package information
Updating dependencies
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- The requested package varunsridharan/vsp-framework ^1.0 exists as varunsridharan/vsp-framework[dev-master] but these are rejected by your constraint.
Problem 2
- The requested package wponion/wponion ^1.0 exists as wponion/wponion[dev-development] but these are rejected by your constraint.
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-author
itative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
Reason why composer has require and require-dev is to allow developers install packages that will allow them better debugging by using packages that are not suggested to be used in production. By adding a package on require-dev this package will not be required on production.
Ex. If you want to optimize you queries, see if you have any n+1 query problem etc you might want to install php-debugbar that will show you this info, but having this on production might expose your queries and will give sensitive info to bad guys.
Packages included on require will always be installed in development and in production and this is the reason you see the error The requested package xxxxx exists as xxxxx[dev-development] but these are rejected by your constraint.
To have different packages in DEV and PROD you need different composer.json files for each environment like #George said.
You can have one composer.json file that will be the production composer and one composer-dev.json that you can use for development.
On your local environment you will need to set value of COMPOSER env variable to composer-dev.json.
Simple way to do this is by running composer like this: COMPOSER=composer-other.json php composer.phar install
If you want to require a new packages you need to run the command twice, one time normally and one time by adding COMPOSER=composer-other.json before composer, to ensure that the package will be added both in dev and production.
P.S I do not know the reason why you need different packages for development and production, but it is suggested to have the same version of packages in dev and prod as having different versions might bring up bugs
You can try changing composer.json file in your dev environment. See Composer
COMPOSER=composer-dev.json php composer install
Reference Composer - specify `composer.json` path
I am totally new to laravel. I would like to use it in my project
I downloaded WAMP Stack 7.1.26-2 from http://bitnami.com and to my surprise,it already came with laravel pre-installed.
It is in the frameworks folder as in:C:\Bitnami\wampstack-7.1.26-2\frameworks
But my problem is that I do not kinow how to use laravel from there.It is not in the htdocs folder as I think it s supposed to be.
If I go to http://localhost I see only the bitnami welcome page
If i go to http://localhost/laravel ,it says PAGE NOT FOUND
I searched online for the answer but most of the time,it points me to this link:
https://docs.bitnami.com/google/apps/#laravel
But on that page, I see NOTHING relating to laravel.I cannot even find the word 'laravel' with a browser search.
If I run composer create-project laravel/laravel myproject --prefer-dist ,
I get this:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\o.o amoo>composer create-project laravel/laravel myproject --prefer-dist
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Bitnami/wampstack-
7.0.0RC7-/php/ext\php_solr.dll' - The specified module could not be found.
in Unknown on line 0
Installing laravel/laravel (v5.5.28)
- Installing laravel/laravel (v5.5.28): Loading from cache
Created project in myproject
> #php -r "file_exists('.env') || copy('.env.example', '.env');"
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Bitnami/wampstack-
7.0.0RC7-/php/ext\php_solr.dll' - The specified module could not be found.
in Unknown on line 0
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 73 installs, 0 updates, 0 removals
- Installing symfony/thanks (v1.1.0): Loading from cache
- Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
Invalid zip file, retrying...
- Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
Invalid zip file, retrying...
- Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
Failed to download symfony/polyfill-ctype from dist: 'C:\Users\o.o amoo\
myproject\vendor/symfony/polyfill-ctype/4199a310f6ba3768faedee6d521ec615' is not a zi
p archive.
Now trying to download from source
- Installing symfony/polyfill-ctype (v1.10.0): Cloning e3d8262452
[RuntimeException]
Failed to clone https://github.com/symfony/polyfill-ctype.git via https, ssh p
rotocols, aborting.
- https://github.com/symfony/polyfill-ctype.git
Cloning into 'C:\Users\o.o amoo\myproject\vendor\symfony\polyfill-ctype'...
fatal: unable to access 'https://github.com/symfony/polyfill-ctype.git/': Fa
iled to connect to github.com port 443: Timed out
- git#github.com:symfony/polyfill-ctype.git
Cloning into 'C:\Users\o.o amoo\myproject\vendor\symfony\polyfill-ctype'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
s] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<dir
ectory>] [<version>]
C:\Users\o.o amoo>
That made me soo confused.It did make a project called myproject was made in : C:\Users\o.o amoo>
but laravel couldn't be installed???
If I try php artisan serve I get:
Could not open input file:artisan
So with that,can I access myproject with laarvel if so,how?If not how come and what do I do?
Someone please point me in the right direction...
Thanks!!!
Alright let's start with why your project is installed in C:/Users it's because you use --prefer-dist in composer create-project laravel/laravel myproject --prefer-dist.
--prefer-dist: Reverse of --prefer-source, composer will install from dist if possible. This can speed up installs substantially on build
servers and other use cases where you typically do not run updates of
the vendors. It is also a way to circumvent problems with git if you
do not have a proper setup.
Second you run into errors maybe because you are in a directory that require additional rights, at least that's how it looks to me.
If you have installed Laravel correctly you should be able to navigate trough a terminal to the desired location, and either use laravel new BUT only if you are already in the directory that you want say C:/Code/myproject if you are still in C/Code you need to do laravel new myproject
If this doesn't work for you I would suggest you to verify that you installed everything according to the docs
And last but most important I want to mention 1 more thing for you, in Laravel it is really more convinient to use Homestead. You can read more for what is Homestead, how to install, configure and work with it here :
https://laravel.com/docs/5.8/homestead
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 :)