mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 08:05:53 +03:00
[GH-ISSUE #188] Unable to install 'mlehner/gelf-php' running 'composer.phar update' in Symfony 2.1 #63
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#63
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @svscorp on GitHub (May 2, 2013).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/188
Hello.
I'm trying to enable GELF logging in my Symfony 2.1 project.
Enabling this handler in config.yml I started to have this error:
Okay, probably I need to do:
... using '--dev' to install mlehner/gelf-php dependency of monolog stored in 'required-dev' option of monolog composer.json
After execution this command I got:
I tried to remove all vendors and run composer install. No result. Couldn't found any info about this issue.
So how to install monolog with this gelf-php? Even if I move this bundle to the 'require' option (instead of 'require-dev') - no result.
@svscorp commented on GitHub (May 2, 2013):
Even with command:
I've got the same exception. So what is wrong?
@stof commented on GitHub (May 2, 2013):
Why
-d vendor/monolog/monolog? Composer installs all dependencies of your project in the same vendor dir, not in nested vendor dirs.And to be able to use this handler, you have to add a requirement on
mlehner/gelf-phpin your composer.json. Monolog itself does not require it as it is only an optional dependency (it is needed only when using the GelfHandler), which is why it appears only as a suggestion@pborreli commented on GitHub (May 2, 2013):
it may not fix your problem but you should update (selfupdate) your composer before creation of any issue
@svscorp commented on GitHub (May 2, 2013):
Already done before sending my second message. And yes it not fix this problem.
@svscorp commented on GitHub (May 2, 2013):
@stof It is just to try. I tried it because monolog/composer.json contains:
So, it is logically to run it with --dev command, right?
@svscorp commented on GitHub (May 2, 2013):
@stof and the second reason. File monolog/tests/bootstrap.php contains this:
So if I run tests for monolog it try to access /monolog/vendor/...
So again it is logically for me, that probably author consider sub-vendor folder...
But yes, I thout about placing 'gelf' requirement in general composer.json, but didn't tried it before.
I gonna try. But this is unlogical :) If you put something into composer.json of a dependent module it is means it should automatically install this dependecy if I set --dev key.
@stof commented on GitHub (May 2, 2013):
@svscorp No. require-dev is only used in your root composer.json, not in your deps.
And when running the Monolog tests, you are expected to run composer with Monolog being the root package, not with monolog installed as a dependency.
@svscorp commented on GitHub (May 2, 2013):
@stof yep, it helps. Thanks!
@svscorp commented on GitHub (May 2, 2013):
@stof Yeah, but I ran composer update with dev key from root. That's the case.