[GH-ISSUE #76] Issues installing with composer require #27

Closed
opened 2026-03-04 23:23:50 +03:00 by kerem · 3 comments
Owner

Originally created by @nkakouros on GitHub (Nov 13, 2018).
Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/76

It is quite probable that this is due to my incompetence with composer and apologies in advance if it is the case.

I tried installing this project with composer using:

composer require yswery/dns

The output is:

Using version ^1.0 for yswery/dns
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 11 installs, 0 updates, 0 removals
  - Installing symfony/event-dispatcher (v4.1.7): Loading from cache
  - Installing react/promise (v2.7.0): Loading from cache
  - Installing evenement/evenement (v3.0.1): Loading from cache
  - Installing react/event-loop (v1.0.0): Loading from cache
  - Installing react/stream (v1.0.0): Loading from cache
  - Installing react/promise-timer (v1.5.0): Loading from cache
  - Installing react/cache (v0.5.0): Loading from cache
  - Installing react/dns (v0.4.16): Loading from cache
  - Installing react/datagram (v1.4.0): Loading from cache
  - Installing react/socket (v0.8.12): Loading from cache
  - Installing yswery/dns (v1.0): Loading from cache
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
react/event-loop suggests installing ext-event (~1.0 for ExtEventLoop)
Writing lock file
Generating autoload files

Then, I tried to run the example script that comes with the project (I edited the autoload.php path), using:

php vendor/yswery/dns/example/example.php

This fails with:

PHP Fatal error:  Class 'Psr\Log\AbstractLogger' not found in /home/nikos/vendor/yswery/dns/src/EchoLogger.php on line 22

I then deleted everything and git-cloned this repo, and run from inside the project folder composer install. That installed a whole lot more packages and example.php succeeded.

Am I doing sth wrong?

Originally created by @nkakouros on GitHub (Nov 13, 2018). Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/76 It is quite probable that this is due to my incompetence with composer and apologies in advance if it is the case. I tried installing this project with composer using: ``` composer require yswery/dns ``` The output is: ``` Using version ^1.0 for yswery/dns ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Package operations: 11 installs, 0 updates, 0 removals - Installing symfony/event-dispatcher (v4.1.7): Loading from cache - Installing react/promise (v2.7.0): Loading from cache - Installing evenement/evenement (v3.0.1): Loading from cache - Installing react/event-loop (v1.0.0): Loading from cache - Installing react/stream (v1.0.0): Loading from cache - Installing react/promise-timer (v1.5.0): Loading from cache - Installing react/cache (v0.5.0): Loading from cache - Installing react/dns (v0.4.16): Loading from cache - Installing react/datagram (v1.4.0): Loading from cache - Installing react/socket (v0.8.12): Loading from cache - Installing yswery/dns (v1.0): Loading from cache symfony/event-dispatcher suggests installing symfony/dependency-injection () symfony/event-dispatcher suggests installing symfony/http-kernel () react/event-loop suggests installing ext-event (~1.0 for ExtEventLoop) Writing lock file Generating autoload files ``` Then, I tried to run the [example](https://github.com/yswery/PHP-DNS-SERVER/blob/master/example/example.php) script that comes with the project (I edited the autoload.php path), using: ``` php vendor/yswery/dns/example/example.php ``` This fails with: ``` PHP Fatal error: Class 'Psr\Log\AbstractLogger' not found in /home/nikos/vendor/yswery/dns/src/EchoLogger.php on line 22 ``` I then deleted everything and git-cloned this repo, and run from inside the project folder `composer install`. That installed a whole lot more packages and `example.php` succeeded. Am I doing sth wrong?
kerem closed this issue 2026-03-04 23:23:50 +03:00
Author
Owner

@samuelwilliams commented on GitHub (Nov 13, 2018):

It seems to be a quirk with how Composer resolves dependencies. psr/log was not explicitly required by composer.json but came along with symfony/event-dispatcher as a dependency of a dependency. This does not seem to be a problem if you are cloning the repo, only if you are installing using composer. This next push will fix it.

<!-- gh-comment-id:438421256 --> @samuelwilliams commented on GitHub (Nov 13, 2018): It seems to be a quirk with how Composer resolves dependencies. `psr/log` was not explicitly required by `composer.json` but came along with `symfony/event-dispatcher` as a dependency of a dependency. This does not seem to be a problem if you are cloning the repo, only if you are installing using composer. This next push will fix it.
Author
Owner

@samuelwilliams commented on GitHub (Nov 13, 2018):

@tterranigma - Thanks for the issue, this has been fixed in v1.0.1

<!-- gh-comment-id:438423129 --> @samuelwilliams commented on GitHub (Nov 13, 2018): @tterranigma - Thanks for the issue, this has been fixed in v1.0.1
Author
Owner

@nkakouros commented on GitHub (Nov 13, 2018):

Alright! Is there a delay for it to appear on packagist?

<!-- gh-comment-id:438441583 --> @nkakouros commented on GitHub (Nov 13, 2018): Alright! Is there a delay for it to appear on packagist?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PHP-DNS-SERVER#27
No description provided.