Skip to content

Added fallback on common classes. Puli is now optional #58

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

Closed
wants to merge 3 commits into from

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jun 10, 2016

This PR will make Puli optional as discussed in #55.

This is how discovery works

Step 1) Use puli,

  • If puli does not find anything then we are done.
  • If Puli is not installed we continue to step 2.

Step 2) See if we find any HttpClients

Step 3) Look for Guzzle factories, will succeed if php-http/message and guzzlehttp/psr7 is installed

Step 4) Look for Diactoros factories, will succeed if php-http/message and zendframework/zend-diactoros is installed

Changes:

  • When Puli is missing we will not throw a \RuntimeException anymore. There will be a NotFoundException.
  • The NotFoundException is moved from Http\Discovery to Http\Discovery\Exception

TODO

This is just a proof of concept. Do we like to go this way?

  • Add tests
  • Update documentation

This was referenced Jun 12, 2016
@Nyholm
Copy link
Member Author

Nyholm commented Jun 12, 2016

Closed in favor of #59

@Nyholm Nyholm closed this Jun 12, 2016
@Nyholm Nyholm deleted the optional-puli branch June 26, 2016 07:00
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.

1 participant