I am looking how to upgrade the framework Symfony 2.8 to 3.4 using local directory.
My development environment doesn't have access to internet.
I've followed https://getcomposer.org/doc/05-repositories.md#path
I download Symfony 3.4 and deposit it in the same directory as Synfony 2.8
Frameworks
Symfony-2.8
Symfony-3.4
Then I configured the composer.json file (symfony 2.8) like this :
"repositories": [
{
"type": "path",
"url" : "/frameworks/symfony3-4"
}
],
"require": {
"/frameworks/symfony3-4": "*"
},
When I try the update :
Composer update
I have this error :
Problem 1
- The requested package ../symfony3-4 could not be found in any version, there
may be a typo in the package name.
Potential causes:
A typo in the package name
The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Do you have any suggestion to do it ?
use "symfony/symfony": "^3.0" in your require statement
Related
I am looking how to upgrade the framework Symfony 2.8 to 3.4 without internet.
Can I configure the composer.json to upgrade Symfony from a local repository?
My development environment doesn't have access to internet.
If you have symfony code locally - as well as any other vendor code - you can configure composer in order to update from local source
"repositories": [
{
"type": "vcs",
"url" : "/path/to/local/sf/code"
}
],
Please remember to get rid of this as soon as you're ready to retrieve the vendor from the internet.
I am a new developer working with ASP.NET 5 (ASP.NET Core). In VS2015 I created a new class library project targeting .NET Platform 5.4 (dotnet5.4), and added the AutoMapper NuGet package, version 4.2.0.
I am getting the following errors, basically for all the System packages:
3>C:\Users\Andrew\OneDrive\Development\Visual Studio\APT\src\Fideles.Service\project.json : .NET Platform 5.4 error NU1001: The dependency fx/Microsoft.CSharp could not be resolved.
3>C:\Users\Andrew\OneDrive\Development\Visual Studio\APT\src\Fideles.Service\project.json : .NET Platform 5.4 error NU1001: The dependency fx/System.Collections could not be resolved.
3>C:\Users\Andrew\OneDrive\Development\Visual Studio\APT\src\Fideles.Service\project.json : .NET Platform 5.4 error NU1001: The dependency fx/System.Collections.Concurrent could not be resolved.
But I think according to the NuGet package description it should be supported:
https://www.nuget.org/packages/AutoMapper/
As you can see from the screenshot these packages seem to be referenced twice; once correctly and once incorrectly with an fx/ prefix:
This is my project.json:
{
"version": "1.0.0-*",
"description": "Fideles.Services Class Library",
"authors": [ "Andrew" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-*",
"System.Collections": "4.0.11-beta-*",
"System.Linq": "4.0.1-beta-*",
"System.Runtime": "4.0.21-beta-*",
"System.Threading": "4.0.11-beta-*"
}
}
},
"dependencies": {
"AutoMapper": "4.2.0",
"Fideles.Common": "1.0.0-*",
"Fideles.Data": "1.0.0-*"
}
}
Any ideas? Thank you!
The issue is that dotnet5.4 isn't supported by AutoMapper 4.2.0. Depending on what you're targeting it may be possible to change dotnet5.4 to something else (dnxcore50 for example).
I have the same issue on a number of my own libraries and I'm waiting for netstandard to take care of all this.
If you don't mind interrupting your Visual Studio workflow you can get your application to build by doing the following.
Make sure you have the new dotnet CLI installed
(https://dotnet.github.io/getting-started/)
Run dotnet restore from the command line in your project folder
This sorted out the the build errors. I then deleted my lock files and ran Clean and Rebuild on the solution for good measure.
I'm trying to upgrade from Symfony 2.8 to Symfony 3, but I cannot update it from Composer.
I get this error :
hellogerard/jobby dev-master requires symfony/process ^2.7 -> satisfiable by symfony/process[v2.7.0 ... blabla bla v2.8.2]
When I look the composer.json file of this library I need, I see this :
"require": {
(...)
"symfony/process": "^2.7"
},
You can find the composer file of Jobby here : https://github.com/jobbyphp/jobby/blob/master/composer.json
The problem is that in Symfony 3, the symfony/process version is 3.0, and because of the "^2.7" on Jobby's composer.json, I cannot get it. I know that there is no backwards compatibilities problems with symfony/process, so how can I do to fix / ignore that problem ?
Regards
Create your own fork and make a pull request on the base repository.
If there is no BC-break using the requested package with symfony/process:3.0,
just change the package version from ^2.7 to ^3.0 or >=2.7 in your fork's composer.json.
EDIT
Then, tell composer to use your fork for installations, like this :
"repositories": [
{
"type": "vcs",
"url": "https://github.com/yourusername/jobby"
}
],
"require": {
"hellogerard/jobby": "dev-master"
}
See VCS Repositories documentation
I'm using symfony 2.4.0, and I want to install the EWZRecaptchaBundle to add a captcha to my forms, so I added this line to composer.json
"require": {
//...
"excelwebzone/recaptcha-bundle": "2.0.*"
//...
}
And I run this command
composer update
But it doesn't install the bundle successfully, and this is the error message I get, in the command
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package excelwebzone/recaptcha-bundle could not be found in
any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your min
imum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common
problems.
For the record, this is the Github link to the bundle I want to install :
https://github.com/excelwebzone/EWZRecaptchaBundle
Any idea??
Notes:
I use the command line as an Administrator.
I tested also with this line : ""excelwebzone/recaptcha-bundle": "dev-master"
The same result when I set minimum stability setting to : "dev" or "stable"
Try to use this require:
"excelwebzone/recaptcha-bundle": "dev-master"
Because 2.0.x-dev are in development now. or use old stable version:
"excelwebzone/recaptcha-bundle": "v1.0.0"
Victor you are completely right. However some might still encounter issues with the versioning.
You will still have an issue unless you use the exact 1.0 version.
So after doing the require:
composer require "excelwebzone/recaptcha-bundle"
you will have do add the version 1.0 like:
Please provide a version constraint for the excelwebzone/recaptcha-bundle requirement: 1.0.*
basically i have this composer.json file:
{
"name": "phpunit/phpunit",
"require": {
"phpunit/phpunit": "3.8.*#dev"
},
"authors": [
{
"name": "Sebastian Bergmann",
"email": "sebastian#phpunit.de"
}
]
}
and when I go to run "composer install" i get the following error:
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phpunit/phpunit 3.8.*#dev -> satisfiable by phpunit/phpunit[3.8.x-dev].
- phpunit/phpunit 3.8.x-dev requires phpunit/php-code-coverage 1.3.*#dev -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
I have no clue as to what that means? Thanks
Before actually answering your question:
You have called your project phpunit/phpunit and you have a require on phpunit/phpunit. That is a circular dependency. You should call your project something else.
Also, I doubt that you are "Sebastian Bergmann" so you should change the name of the author and email address in your composer file.
Ok, for you actual question, Composer by default won't install dev packages. You need to explicitly tell it to install dev packages by putting
"minimum-stability": "dev"
in your root composer.json file for your project, or change the require for PHPUnit to not use the dev package e.g.
"require": {
"phpunit/phpunit": "3.8.*"
},
Unless you are actively debugging an issue in another package, it's unlikely that you actually want to use a dev version of that package. You almost always want an actual tagged version.