Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Tweak phpdocumentor dependency to avoid install conflicts #421

Merged

Conversation

erayd
Copy link
Collaborator

@erayd erayd commented May 3, 2017

What

  • Change phpdocumentor/phpdocumentor require-dev dependency from ~2 to ^2.7.

Why

@shmax
Copy link
Collaborator

shmax commented May 3, 2017

LGTM

Copy link
Collaborator

@bighappyface bighappyface left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@bighappyface bighappyface merged commit d7fcdcb into justinrainbow:6.0.0-dev May 4, 2017
@erayd erayd deleted the bugfix-420-phpdocumentor branch May 4, 2017 19:53
erayd added a commit to erayd/json-schema that referenced this pull request May 4, 2017
bighappyface pushed a commit that referenced this pull request May 16, 2017
* Split $objectDefinition into $schema and $properties (#411)

Object validation attempts to use a single variable to store both the
object definition, and its properties. This causes validation to be
incomplete where "properties" is not set, but "additionalProperties" is.

This commit fixes both bugs in issue #353.

* Issue-414: Allow The Option of T or space for Date time. (#415)

* Testcase for minProperties with properties defined (#416)

+ Fix Test

* Tweak phpdocumentor dependency to avoid install conflicts (#421)

* [BUGFIX] Cast empty schema arrays to object (#409)

* Cast root to object

* Use function_exists to allow polyfill compatibility

* Move array->object conversion to SchemaConstraint & SchemaStorage

Fixes issue #408

* fix bug when applying defaults for array items when the schema is for (#405)

all items and add support for minItems when applying defaults

* [BUGFIX] Split "uri" format into "uri" & "uri-reference", fix meta-schema bug (#419)

* Split "uri" format into "uri" and "uri-reference"

* Correct format for id & $ref in draft-03/04 meta-schemas

See json-schema-org/JSON-Schema-Test-Suite#177 (comment)
@chocopowwwa
Copy link

chocopowwwa commented May 18, 2017

I'm still having the issue, it breaks on phpdocumentor 2.9.0, here's my steps to reproduce the issue.
Latest commit 9225c96

git clone https://github.com/justinrainbow/json-schema.git
git checkout origin/6.0.0-dev
composer install

to solve the issue, change phpdocumentor/phpdocumentor require-dev dependency from ^2.7 to ^2.9

but didn't pass the test :|

@erayd
Copy link
Collaborator Author

erayd commented May 18, 2017

@chocopowwwa That's really weird - this problem is definitely solved on Travis (see here).

Which PHP version are you using?

Can you please confirm the commit hash of origin/6.0.0-dev that you are using to test?

@chocopowwwa
Copy link

Hi, here's my details:
( Sorry i put the wrong commit hash up there )

Commit Hash:

git rev-parse HEAD
2d404b8

PHP 7.1.5 (cli) (built: May 9 2017 16:55:02) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Xdebug v2.5.3, Copyright (c) 2002-2017, by Derick Rethans

Composer version 1.4.2 2017-05-17 08:17:52

$ composer install
  Problem 1
    - Conclusion: don't install phpdocumentor/phpdocumentor v2.9.0
    - phpdocumentor/phpdocumentor v2.7.0 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.7.1 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.8.0 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.8.1 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.8.2 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.8.3 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.8.4 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - phpdocumentor/phpdocumentor v2.8.5 requires phpdocumentor/fileset ~1.0 -> satisfiable by phpdocumentor/fileset[1.0.0].
    - Conclusion: don't install phpdocumentor/fileset 1.0.0|install phpdocumentor/phpdocumentor v2.9.0
    - Installation request for phpdocumentor/phpdocumentor ^2.7 -> satisfiable by phpdocumentor/phpdocumentor[v2.7.0, v2.7.1, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4, v2.8.5, v2.9.0].

@chocopowwwa
Copy link

ahh okay, turns out i'm using different phpunit version

mine is 5.7.19
tested using PHPUnit 4.8.35 works fine, my bad.

@erayd
Copy link
Collaborator Author

erayd commented May 18, 2017

That would do it ;-). PHPUnit 5 isn't compatible with PHP 5.3 unfortunately, so this library is stuck with PHPUnit 4.8.

@erayd
Copy link
Collaborator Author

erayd commented May 18, 2017

Just to clarify, before I assume this is resolved - am I correct in my understanding that you had manually changed the PHPUnit dependency version in composer.json#/require-dev, and the install failure occured only after you had made that change (i.e. doing a normal install with no modifications worked)?

@chocopowwwa
Copy link

nope, i run phpunit 5 from my composer global
./vendor/bin/phpunit should do the work

the install error caused by phpdocumentor/phpdocumentor : ^2.7 dependency
after i edit manually phpdocumentor/phpdocumentor to ^2.9 the installation works, and also it pass the test

@erayd
Copy link
Collaborator Author

erayd commented May 18, 2017

OK - so the install problem is still there on your system, when using phpdocumentor/phpdocumentor : ^2.7?

Are you forcing any other package versions?

@chocopowwwa
Copy link

@erayd
i tested:
-> ^2.7 : error
-> ^2.8 : error
-> ^2.9 : no error

are you able reproduce the issue?

@erayd
Copy link
Collaborator Author

erayd commented May 24, 2017

@chocopowwwa I have not managed to reproduce this since I fixed it the first time around, either locally on my dev system or on Travis. I'll have another crack at this tomorrow.

In the meantime, any detail you can provide regarding your environment would be extremely helpful - in particular, anything​ that deviates from defaults.

As a temporary workaround, you can simply remove phpdocumentor completely. This will prevent you from building the API documentation, but nothing else, and the API docs are a complete mess at the moment anyway - sorting the documentation is one of the many things on my to-do list.

@erayd
Copy link
Collaborator Author

erayd commented May 24, 2017

@chocopowwwa I'm still not able to reproduce this. Could you please run the script below exactly as it appears here, and paste the full output:

php --version
composer --version
cd /tmp
git clone https://github.com/justinrainbow/json-schema.git
cd json-schema
git checkout 6.0.0-dev
grep phpdocumentor composer.json
composer install
rm -rf vendor composer.lock
git checkout 5.x.x
grep phpdocumentor composer.json
composer install

@chocopowwwa
Copy link

https://gist.github.com/chocopowwwa/8b3fe8cf246039cefdf0fbf91c805003
i'm sorry @erayd its all fine, on 6.0.0-dev but it breaks on origin/6.0.0-dev, that's kinda weird

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants