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

add uri template to the package #343

Closed
wants to merge 8 commits into from
Closed

Conversation

@gmponos
Copy link
Member

@gmponos gmponos commented Jun 1, 2020

No description provided.

@gmponos gmponos marked this pull request as draft Jun 1, 2020
@gmponos gmponos marked this pull request as ready for review Jun 1, 2020
@gmponos gmponos requested review from Nyholm, sagikazarmark and Tobion Jun 1, 2020
@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 1, 2020

Hi.. are you interested into moving this in here?

@Nyholm
Copy link
Member

@Nyholm Nyholm commented Jun 1, 2020

What is the use case?

@GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Jun 1, 2020

Using it outside of Guzzle I guess?

src/UriTemplate.php Outdated Show resolved Hide resolved
src/UriTemplate.php Outdated Show resolved Hide resolved
src/UriTemplate.php Outdated Show resolved Hide resolved
src/UriTemplate.php Outdated Show resolved Hide resolved
@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 1, 2020

What is the use case?

I have various projects/packages that I am using it. So once guzzle v7 is out.. my migration path will be a little bit painful.

@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 1, 2020

btw this PR is a followup of this guzzle/guzzle#2440

@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 1, 2020

I have various projects/packages that I am using it. So once guzzle v7 is out.. my migration path will be a little bit painful.

so I just saw on the PR linked above that the phpleague added a UriTemplate.. you could say that someone could use that one.. but it feels weird though that we had to drop ours and I need to install an external package to migrate..

@gmponos gmponos changed the title WIP add uri template to the package add uri template to the package Jun 2, 2020
@ro0NL
Copy link

@ro0NL ro0NL commented Jun 10, 2020

im in the same boat as @gmponos

also phpleague comes with its own URI contract and what not; installing it specifically for this feature is not really worth it to me, as i already have a pure PSR7 package (guzzle :))

/**
* @return string|string[]|null
*/
public function expand(string $template, array $variables)

This comment has been minimized.

@ro0NL

ro0NL Jun 10, 2020

static would be nice btw :)

This comment has been minimized.

@gmponos

gmponos Jun 10, 2020
Author Member

I will give it a try

This comment has been minimized.

@gmponos

gmponos Jun 15, 2020
Author Member

done.. feedback is welcome.. :)

This comment has been minimized.

gmponos added 6 commits Jun 10, 2020
Copy link
Member

@Tobion Tobion left a comment

Uri templates has no relation to the PSR-7 package. You cannot even use UriInterface for this.
So to me this should be a separate package. Maybe guzzle/uri-template?

@ro0NL
Copy link

@ro0NL ro0NL commented Jun 15, 2020

ive no strong opionion on a separate package, but doesnt anything evolving around URIs more or less fit here? There's UriResolver, UriNormalizer.. and now UriTemplate :D

@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 15, 2020

There's UriResolver, UriNormalizer.. and now UriTemplate

That's what drove me submitting a PR here..

Neither I have strong arguments here...

I wouldn't mind creating a separate package under guzzle org related with it..
@Nyholm @sagikazarmark WDYT?

@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 27, 2020

Created this repo.. https://github.com/guzzle/uri-template

will try to during the weekend to move the code there..

Until then if you have any objections/concerns let me know.

@GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Jun 27, 2020

I assume the min php version for that repo will be 7.2?

@gmponos
Copy link
Member Author

@gmponos gmponos commented Jun 27, 2020

Yes.. that's my intention

@GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Jun 27, 2020

Sounds good to me. 👍

@GrahamCampbell
Copy link
Contributor

@GrahamCampbell GrahamCampbell commented Jul 1, 2020

This PR can be closed now?

@gmponos gmponos closed this Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.