I have an annoying error that doesn't let me do any composer install or server:start or cache:clear
I don't understand the error
[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]
You have requested a non-existent parameter "base_cdn".
and so it can't let me do anything.
And I have many other issues such as:
Problem 1
- Installation request for gregwar/image v2.0.20 -> satisfiable by gregwar/image[v2.0.20].
- gregwar/image v2.0.20 requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for gregwar/image-bundle v2.1.3 -> satisfiable by gregwar/image-bundle[v2.1.3].
- gregwar/image-bundle v2.1.3 requires ext-gd * -> the requested PHP extension gd is missing from your system.
I can't make a composer update as in the project it is forbidden to do (as good practice) but I only can make composer install.
So anyway, I'm lost. Anyone got an idea on this error?
You have requested a non-existent parameter "base_cdn".
This means you are using somewhere in your code a base_cdn parameter. You can search it in your project, it will be used surrounded by percent sign - %base_cdn%. So, you are using it somewhere but it's not defined anywhere, so all you need to do is to add base_cdn parameter to your parameters.yml file (in fact you should also add it to your parameters.yml.dist file as well)
EDIT: If you have it in your parameters.yml.dist already then most probably composer will ask you for base_cdn value after successfull composer install which currently can't be performed because of the gd issue. If, for some reason, composer will not ask for a value after composer install then just copy line with base_cdn from parameters.yml.dist to parameters.yml. Since parameters.yml is not stored in version control (or at least should not be stored) all your teammates will have to type in this value after composer install
gregwar/image v2.0.20 requires ext-gd * -> the requested PHP extension gd is missing from your system.
This means you are misssing gd php extension. To install it you will need to do something like apt-get install php-gd depending on what system you are working on.
Related
I'm using Laravel + VueJS to recreate a POS system from work. I needed to install sped-nfe package to work with it on a system for work.
This package requires many other packages in order to function properly, like ext-curl, ext-soap, ext-json.
As per instructions, I added
"nfephp-org/sped-nfe" : "^5.0"
to my composer.json.
When I ran composer install or composer update, the following error ocurred:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- nfephp-org/sped-nfe[v5.0.100, ..., v5.0.122] require ext-soap * -> it is missing from your system. Install or enable PHP's soap extension.
- Root composer.json requires nfephp-org/sped-nfe ^5.0 -> satisfiable by nfephp-org/sped-nfe[v5.0.100, ..., v5.0.122].
To enable extensions, verify that they are enabled in your .ini files:
- C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I'm using Windows and I'm not authorized to modify our local server nor the actual server, I was getting frustrated trying to find a solution to my problem - almost every answer would tell me to modify my php.ini or install curl with sudo apt-get - I arbitrarily decided to add the following lines to my composer.json:
"provide": {
"ext-curl":"*",
"ext-soap":"*"
},
Et voilĂ , composer update and composer install were working smoothly.
What's bothering me is, according to the composer documentation,
provide
Map of packages that are provided by this package. This is mostly
useful for implementations of common interfaces. A package could
depend on some virtual package e.g. psr/logger-implementation, any
library that implements this logger interface would list it in
provide. Implementors can then be found on Packagist.org.
Using provide with the name of an actual package rather than a virtual
one implies that the code of that package is also shipped, in which
case replace is generally a better choice. A common convention for
packages providing an interface and relying on other packages to
provide an implementation (for instance the PSR interfaces) is to use
a -implementation suffix for the name of the virtual package
corresponding to the interface package.
I am not providing this package, I simply wanted to require it but ended up putting it differently. Also, I've tried requiring it, but the error was still there.
Was this a good solution to my problem or should I do it differently?
Is there anything about this that I should worry?
Can someone explain the 'provide' syntax for me?
If you add a package or a PHP extension to the provide section, you tell composer that your package itself or the external system setup "provides" this one. The dependency resolver is fine with this.
This does not check further whether this dependency is actually properly resolved or not. Composer relies on your statement that this is not a lie ;) So, if you only add this to the section without properly providing that package, you cannot be sure that your application works properly.
In your example: the package you want to install requires the SOAP extension. It won't work properly without it. If you cannot install that extension on your server, you should not use this package.
I need help with creating a symfony project in ubuntu/eclipse i get a lot of warnings. i Use:
ubuntu: 15.04
eclipse: 4.5.0 mars
symfony feature: 1.1.0.20150705
I use Symfony Feature to create projects using a built in wizard.
Project details:
PHP version: 5.6
Symfony version: v2.7.3
Override composer.jason values: i use defaults
i get errors with app/bootstrap.php.cache
Maybe there is a good tutorial that might help me, but 'till now i haven't found one...
Maybe elipse isn't good for symfony project.
Here are some error messages:
!ENTRY com.dubture.composer.core 4 4 2015-08-06 20:49:38.196
!MESSAGE PHP Warning: require_once(/var/www/test3/app/bootstrap.php.cache): failed to open stream: No such file or directory in /var/www/test3/app/console on line 10
PHP Fatal error: require_once(): Failed opening required '/var/www/test3/app/bootstrap.php.cache' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/test3/app/console on line 10
and second
!ENTRY com.dubture.composer.core 4 4 2015-08-06 20:50:29.267
!MESSAGE Installing symfony/framework-standard-edition (v2.7.2)
- Installing symfony/framework-standard-edition (v2.7.2)
Loading from cache
Created project in test1
> SymfonyStandard\Composer::hookRootPackageInstall
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for sensiolabs/security-checker v2.0.5 -> satisfiable by sensiolabs/security-checker[v2.0.5].
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 2
- sensiolabs/security-checker v2.0.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- sensio/distribution-bundle v4.0.0 requires sensiolabs/security-checker ~2.0 -> satisfiable by sensiolabs/security-checker[v2.0.5].
- Installation request for sensio/distribution-bundle v4.0.0 -> satisfiable by sensio/distribution-bundle[v4.0.0].
thats a piece of the whole log file, those are the messages i get in gui.
Composer installation failed with an error (see second set of error messages) because it could not install all dependencies.
It says in the error message:
the requested PHP extension curl is missing from your system.
You need to install this extension for PHP to get all required files to get your project up and running.
When Symfony2 starts up, it need some of bootstrap cookies which will be removed, eventually. From my experience, 'bootstrap.php.cache' file existed for ACME bundle example pages, and It is not essential file.
The solution is simple.
You just need to create 'bootstrap.php.cache' file in /var/www/test3/app/ folder. The content of 'bootstrap.php.cache' can be blank.
touch bootstrap.php.cache
Hope this works well for you. Good luck!
It's possible that, you don't have right permission for read in these file, check this sudo chmod 755 in these file. If you haven't that file, create it how suggests YONGSOO KIM
The solution is simple. You just need to create bootstrap.php.cache
file in /var/www/test3/app/ folder. The content of bootstrap.php.cache
can be blank.
You can fix problem with versions of package sensiolabs/security-checker or generate bootstrap cache file like answer here https://stackoverflow.com/a/6884027/4356973
I want to install phpdocumentor to my Symfony 2.4 project, so I added this two lines to my composer.json:
"require": {
//my old requires
"phpdocumentor/template-abstract": "~1.2",
"phpdocumentor/phpdocumentor": "2.1.*#dev"
}
whene I execut php composer.phar update, i have these errors:
Problem 1
- phpdocumentor/template-abstract 1.2.1 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
- phpdocumentor/template-abstract 1.2 requires ext-xsl * -> the requested PHP extension xsl is missing from your system.
- Installation request for phpdocumentor/template-abstract ~1.2 -> satisfiable by phpdocumentor/template-abstract[1.2, 1.2.1].
although I installed php_xsl in my php extensions?!!
Thank you.
Ok I just answered this here.. might as well elucidate.
Basically you also need to enable the extension in the php.ini file used by PHP CLI as this is the one composer uses when you run it on the command line.
( Mine is at: C:\wamp\bin\php\php5.4.12\php.ini )
Good Luck.
#Mohamed: I was getting the same problem few days back but when I tried the following command it then worked successfully.This will update your composer.phar file.
php composer.phar self-update
I expected that
composer update videlalvaro/php-amqplib
would only update one dependency, but instead of that it updates all.
What am I missing?
PS: this dependency is defined as "videlalvaro/php-amqplib": "2.2.0" in composer.json
PPS: the composer version used is 3da05c68f9561fa822c522b1815435ff990493ff 2013-10-02 14:25:06
PPPS: the actual output:
$ composer.phar update videlalvaro/php-amqplib --no-dev
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- Installation request for symfony/icu == 1.2.0.0 -> satisfiable by symfony/icu[v1.2.0].
The command composer update videlalvaro/php-amqplib does just update that dependency. However it doesn't disable the other dependency checking that Composer does.
What the error message is complaining about is that the lib-icu is not available on your system. Apparently this would be solved by installing the PHP Intl extension.
You would see similar issues if you did a composer update on a project that required PHP 5.5 in one of it's requires, downgraded to PHP 5.4 and then ran composer update on a separate require, that didn't require PHP 5.5. Even though you wouldn't be updating the require that needs PHP 5.5, the requirements for that package would not be resolvable, and so Composer would fail.
In your case, even though you're just trying to update videlalvaro/php-amqplib to the latest version, the requirements for symfony/icu aren't met, and so the composer update fails.
Edit
To try to be helpful, I'm guessing you re-installed PHP since you last did an update, and either removed or forgot to install the PHP Intl extension. Composer can't satisfactorily satisfy the requirements your composer.json is setting, and so is defaulting to doing nothing, rather than knowingly doing an update where the requirements aren't met.
So basically, you need to install the PHP extensions that are required for your existing installed software to run, and then Composer will be able to update the single package you want to update, as well as meet the requirements for the other packages.
tl;dr:
You can list more than one dependency to update in one command:
composer update one/dependency second/dependency other/dependency
Story:
If you want to update only one dependency (composer update some/dependency), you may face an issue that request is not satisfiable due to some other dependency is installed in wrong version. And that one does not necessarily must be listed in your composer.json, it could be just dependency of some other dependency.
E.g. I wanted to update only and only google/apiclient, but calling composer update google/apiclient complained, that google/auth (dependency of apiclient) requires guzzlehttp/psr7 in version 1.2.3. I had 1.3.0 installed. The guzzlehttp/psr7 was not listed in my composer.json. What I had to do, was to call:
composer update guzzlehttp/psr7 google/apiclient
and that's it! Just update the package you want, and if composer tells you, that you need to update (or downgrade :-)) some other package, list it in the command.
I had a similar case due to security reasons on a GitHub repository.
I solved updating the dependency to a specific version like this:
composer require phpseclib/phpseclib:2.0.31
If you are working with virtual environments like docker containers (ddev, lando, etc..) before running it you should connect to the container with a:
ddev ssh
To overcome this kind of dependency problem during the update of a specific package you should specify all the specific packages versions before running their update altogether.
In your case something like this:
composer require videlalvaro/php-amqplib:2.2.0 --no-update
composer require symfony/icu:1.2.0 --no-update
composer require lib-icu:4.4 --no-update
composer update videlalvaro/php-amqplib symfony/icu lib-icu
I'm trying to create thumbnails with Avalanche-imagine bundle. I'm using OS X 10.7 Lion and MAMP PRO as Apache server.
When I call the filter in the twig file, I get a 500 error.
Here I put the path manually to check it:
<img src='{{'store/images/Pictures/P1000665.JPG' | apply_filter('my_thumb')}}'>
And I get this message:
GET
http://taller:8888/web/app_dev.php/media/cache/my_thumb/store/images/Pictures/P1000665.JPG 500
(Internal Server Error)
line 35, it's strange because my thumbnails are used far behind
I installed the bundle following this instructions: https://github.com/avalanche123/AvalancheImagineBundle
I have to say that I had several problems installing it because composer.phar gave me an error message:
"Problem 1
- symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- Installation request for symfony/icu 1.2.* -> satisfiable by symfony/icu[v1.2.0]."
I solved it adding this line in the composer.json requirements:
"symfony/icu": "1.0.*",
Once installed, I could install the AvalancheImageBundle with the composer.
Then I changed AppKernel as they said in the instruction with this line:
new Avalanche\Bundle\ImagineBundle\AvalancheImagineBundle(),
but I didn't change the autoload file, as I had to do when I installed FOSUserBundle. Do I have to add anything there?
I tried with this, but it didn't solved my problem:
$loader->add('imagine', __DIR__.'/../vendor/imagine/imagine/lib');
$loader->add('Avalanche123', __DIR__.'/../vendor'):
Additional info:
My proyect is in: Symfony2/proyecto/taller/here_are_web_app_vendor_and_src
My apache server aim to: Symfony2/proyecto/taller using the sortcut taller instead of localhost my url is like this:
http://taller:8888/web/app_dev.php/
My pictures are in the url: Symfony2/proyecto/taller/web/store/images/Pictures/test.jpg
witch url should I give to the filter? I think it is store/images/Pictures/test.jpg
The problem could be in the dependences of the bundle, because I put that line the composer.json?
Maybe should I write something in the autoload file? Any reference to vendor/imagine miss?
Also I tried to install liipImagine bundle, but I couldn't because it said that I had installed imagine 0.3.0 and I needed imagine 0.4.0. How can I uninstall imagine and install the new version to run liipimaginebudle?
appKernel:
As you can see, no references to imagine (I guess its integer in Avalanchebundle)
autoload:
(no references to avalanche?)
Here is where my pictures are located and you can see how Avalanche created the media folder:
This is my vendor file:
I don't know where is the problem, this is why I put so many information.
I solved the problem using LiipImagineBundle.
To install it first I deleted Avalanche reference in composer.json and everything else I wrote in appKernel.php, etc.
Then I did composer.phar update and it deleted also imagine/imagine 0.3.0 vendor library. Finally I installed LiipImagine via composer normally that installed a newer version of imagine/imagine, 0.4.0.