Skip to content

Conversation

@palex-fpt
Copy link

No description provided.

@travisbot
Copy link

This pull request passes (merged e130386 into a06ebdd).

@naderman
Copy link
Member

Isn't that what we have conflicts for? On the other hand this is probably faster than solving conflict rules.

@palex-fpt
Copy link
Author

It is synonym for conflicts. But from repository side it is easier to add '<>' constraint to 'require' section, than build 'conflicts' section.

@stof
Copy link
Contributor

stof commented Jun 19, 2012

I don't see where you handle such rules in the solver

@Seldaek
Copy link
Member

Seldaek commented Jun 19, 2012

Do we really want to support <> and !=? I would only support the latter, because I don't think everyone knows <>, and having two operators that do the same is not especially useful.

@naderman
Copy link
Member

@stof conflict rules are created from package links in the RuleSetGenerator. However this here would only change which packages are returned by whatProvides in the Pool, which should be better performance wise.

As for the operator I don't really mind either way. But I guess it'd be cleaner to have just one operator. At the same time someone trying to use <> might be confused why it doesn't work.

@stof
Copy link
Contributor

stof commented Jun 19, 2012

@naderman does the pool already support this operator without any change ?

@naderman
Copy link
Member

Oh I thought that was in this PR, but it is not, you're right.

The code to handle !=/<> would need to be added to src/Composer/Package/LinkConstraint/VersionConstraint.php

@Seldaek
Copy link
Member

Seldaek commented Jun 19, 2012

It uses version constraint which supports both operators so I guess it's
fine as is.

@naderman
Copy link
Member

If you look at its code, I don't think it correctly does.

@Seldaek
Copy link
Member

Seldaek commented Jun 19, 2012

Err I meant to say the VersionConstraint class uses version_compare, which handles != and <>. Damn heat :)

@naderman
Copy link
Member

Well it doesn't just use version compare, as it compares ranges of versions with each other, so the code needs to be extended to handle != and <> correctly.

@travisbot
Copy link

This pull request fails (merged c6bafe04 into a06ebdd).

@palex-fpt
Copy link
Author

Check tests please. I hope I did right assumption about matching behavior.

Copy link
Contributor

Choose a reason for hiding this comment

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

you can remove the braces. They are not needed

@naderman
Copy link
Member

Matching behaviour looks correct to me.

@travisbot
Copy link

This pull request passes (merged 9f08764 into a06ebdd).

Seldaek added a commit that referenced this pull request Jun 22, 2012
Add '<>' operator to Version Parser
@Seldaek Seldaek merged commit 4fcc114 into composer:master Jun 22, 2012
@Seldaek
Copy link
Member

Seldaek commented Jun 22, 2012

Merged, thanks!

digitalkaoz pushed a commit to digitalkaoz/composer that referenced this pull request Nov 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants