-
Notifications
You must be signed in to change notification settings - Fork 61
Upgrade php-http integration #257
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
Changes from all commits
465c35c
3113dc3
156058d
a3559b1
342e4e5
2459eb1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ vendor/ | |
composer.lock | ||
phpunit.xml | ||
doc/_build/ | ||
puli.json | ||
.puli/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,20 +20,22 @@ | |
"homepage": "https://github.com/friendsofsymfony/FOSHttpCache/contributors" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"require": { | ||
"php": ">=5.4.8", | ||
"php": "^5.5.9||^7.0.0", | ||
"symfony/event-dispatcher": "^2.3||^3.0", | ||
"symfony/options-resolver": "^2.3||^3.0", | ||
"psr/http-message-implementation": "~1.0", | ||
"php-http/adapter-implementation": "^0.1.0", | ||
"php-http/discovery": "^0.1.1", | ||
"php-http/message-decorator": "^0.1.0" | ||
"php-http/client-implementation": "^1.0.0", | ||
"php-http/discovery": "^0.6.0", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if the discovery is not usable without running a puli cli command or adding that command to the project's post-install commands in composer, does it make sense to require the discovery at all? or should we just document how to use discovery and puli for 0-config when wanted? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what I would like to achieve: php-http/discovery#33 |
||
"php-http/message": "^0.2.1", | ||
"puli/cli": "^1.0.0-beta8" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding Puli as a dependency so php-http/discovery works out of the box. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rather add this as a development dependency and document that Puli is necessary. At least it seemed to me as a recommendation from Puli. Maybe @webmozart could help in in this question. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and puli is only required when not injecting a http client explicitly. maybe we should move discovery to optional. does discovery only work with puli but not require it? that would feel wrong to me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dbu Yes, Discovery should be optional with FOSHttpCache. We can make it so in two ways:
My beef with 2 and @sagikazarmark’s idea to have users install Puli is that it becomes a lot more work for users to get started with FOSHttpCache. For discovery’s Puli dependency, see php-http/discovery#36. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, Puli is not optional. All the relevant Puli dependencies are required in the discover package. The cli is something that is up to the user: it can be installed as a phar globally in the prefix, or installed with composer in the application. I guess there is nothing wrong in adding it as a dependency here. But I guess some time in the future having puli.phar in the users prefix will be as common as composer. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dbu No problem. 😉 How will we then handle Discovery here?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no questions asked 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, sorry, missed the question, I thought it's still discovery-puli. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. imho it would make more sense if php-http/discovery would have the cli as
requirement than we have here. then discovery could be either suggestion or
require, but only one thing not two.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
}, | ||
"require-dev": { | ||
"mockery/mockery": "~0.9.1", | ||
"monolog/monolog": "~1.0", | ||
"php-http/guzzle6-adapter": "^0.1.0", | ||
"guzzlehttp/psr7": "^1.0", | ||
"monolog/monolog": "^1.0", | ||
"php-http/guzzle6-adapter": "^0.3.1", | ||
"php-http/mock-client": "~0.1", | ||
"symfony/process": "^2.3||^3.0", | ||
"symfony/http-kernel": "^2.3||^3.0" | ||
}, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this needed because of puli dependency? could it be avoided by using
^1.0.0@beta
or similar?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter, it is not applied in packages where this is installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know, but while rather remote because of the "prefer-stable" flag, it looked like it might cause other package versions to be pulled in on travis tests on this repo as opposed to what will be pulled in on project installs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the time being php http packages are mostly unstable as well, so you are right, without relying on development versions, not the same packages will be installed. Wonder how we could improve that until stable versions are out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
minimum-stability
is necessary because some of the php-http packages themselves require unstable versions of other php-http packages. If your minimum-stability is stable (the default) Composer won’t find them.When stable versions are available, they will be installed instead: see
"prefer-stable": true
one line below.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance those will be stable in the near future (by the time 2.0 of FOSHttpCache is stable)?
Otherwise might have to document which packages are unstable in order for people to specify every single one in project install to avoid having to set
minimum-stability
to dev.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the plan (since we are the author of php-http packages as well 😄 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrerom Definitely. FOSHttpCache 2.0 will not ship before we can remove the
minimum-stability
flag.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍