Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

why is 'symfony/event-dispatcher' required dependency? #96

Closed
aldas opened this issue Jan 4, 2018 · 2 comments
Closed

why is 'symfony/event-dispatcher' required dependency? #96

aldas opened this issue Jan 4, 2018 · 2 comments

Comments

@aldas
Copy link
Contributor

aldas commented Jan 4, 2018

Why is 'symfony/event-dispatcher' marked as required dependency (https://github.com/influxdata/influxdb-php/blob/master/composer.json#L31)?

So I did little test - I will remove 'symfony/event-dispatcher' from dependencies and do composer install.

These are packages that are installed:

php5.6 ../composer.phar install --no-dev
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 4 installs, 0 updates, 0 removals
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing guzzlehttp/psr7 (1.4.2): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.3.0): Loading from cache

So another test with removing symfony from dev dependencies and replacing their phpunit-bridge with real phpunit my composer.json dependencies will look like

    "require": {
        "php": "^5.5 || ^7.0",
        "guzzlehttp/guzzle": "^6.0"
    },
    "require-dev": {
        "phpunit/phpunit": "^5.7"
    },

and this will get installed:

php5.6 ../composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 29 installs, 0 updates, 0 removals
  - Installing psr/http-message (1.0.1): Loading from cache
  - Installing guzzlehttp/psr7 (1.4.2): Loading from cache
  - Installing guzzlehttp/promises (v1.3.1): Loading from cache
  - Installing guzzlehttp/guzzle (6.3.0): Loading from cache
  - Installing webmozart/assert (1.2.0): Loading from cache
  - Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  - Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  - Installing phpdocumentor/reflection-docblock (3.3.2): Loading from cache
  - Installing phpunit/php-token-stream (1.4.12): Loading from cache
  - Installing symfony/yaml (v3.4.2): Loading from cache
  - Installing sebastian/version (2.0.1): Loading from cache
  - Installing sebastian/resource-operations (1.0.0): Loading from cache
  - Installing sebastian/recursion-context (2.0.0): Loading from cache
  - Installing sebastian/object-enumerator (2.0.1): Loading from cache
  - Installing sebastian/global-state (1.1.1): Loading from cache
  - Installing sebastian/exporter (2.0.0): Loading from cache
  - Installing sebastian/environment (2.0.0): Loading from cache
  - Installing sebastian/diff (1.4.3): Loading from cache
  - Installing sebastian/comparator (1.2.4): Loading from cache
  - Installing phpunit/php-text-template (1.2.1): Loading from cache
  - Installing doctrine/instantiator (1.0.5): Loading from cache
  - Installing phpunit/phpunit-mock-objects (3.4.4): Loading from cache
  - Installing phpunit/php-timer (1.0.9): Loading from cache
  - Installing phpunit/php-file-iterator (1.4.5): Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  - Installing phpunit/php-code-coverage (4.0.8): Loading from cache
  - Installing phpspec/prophecy (1.7.3): Loading from cache
  - Installing myclabs/deep-copy (1.7.0): Loading from cache
  - Installing phpunit/phpunit (5.7.26): Loading from cache
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
symfony/yaml suggests installing symfony/console (For validating YAML files using the lint command)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
Generating autoload files

so only 'symfony/yaml (v3.4.2)' is required through dependency in somewhere in phpunit

Maybe we could remove sympony deps and use phpunit. Looking at .travis.yml (https://github.com/influxdata/influxdb-php/blob/master/.travis.yml) it is little bit silly as it is more about testing sympfony than testing influxdb library. I could do PR for it

ps. I am aware that phpunit 5.7 does not support php5.5 officially.

@aldas aldas changed the title why is 'symfony/event-dispatcher' required depencency? why is 'symfony/event-dispatcher' required dependency? Jan 4, 2018
@gianarb
Copy link
Contributor

gianarb commented Jan 5, 2018

Hello @aldas, I would like to thank you for your analysis I think it was just an error that we made over time.

I agree with you that we should smartly manage our dependencies. Please feel free to open a PR.

@aldas
Copy link
Contributor Author

aldas commented Jan 10, 2018

Resolved with #97

@aldas aldas closed this as completed Jan 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants