Skip to content

Align findSortedServices code with symfony PriorityTaggedServiceTrait#1413

Closed
norkunas wants to merge 2 commits intoapi-platform:2.1from
norkunas:patch
Closed

Align findSortedServices code with symfony PriorityTaggedServiceTrait#1413
norkunas wants to merge 2 commits intoapi-platform:2.1from
norkunas:patch

Conversation

@norkunas
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #1412
License MIT
Doc PR none

@meyerbaptiste
Copy link
Member

IMO you can directly copy/paste the trait from Symfony. IIRC we use sorting in the other compilation passes.

@sroze
Copy link
Contributor

sroze commented Oct 11, 2017

When using this compiler pass we know what the DependencyInjection component is here tho... so we could use this trait.

(beautiful copy/paste of my comment on the issue: #1412 (comment))

@meyerbaptiste
Copy link
Member

But we have to bump our minimum requirements @sroze.

@norkunas
Copy link
Contributor Author

I didn't find any other occurences for sorting services

@sroze
Copy link
Contributor

sroze commented Oct 11, 2017

This trait was introduced in Symfony 3.2. And we already have the following in our composer.json:

    "conflict": {
        "symfony/dependency-injection": "<3.3"
    },

@dunglas
Copy link
Member

dunglas commented Oct 11, 2017

@sroze is right, we should just use the trait!

@meyerbaptiste
Copy link
Member

I'm agree, but tests will fail with deps=low!

@dunglas
Copy link
Member

dunglas commented Oct 11, 2017

Indeed in 2.0 (which is only maintained for bugs and security fixes - and it's not the case here) https://github.com/api-platform/core/blob/2.0/composer.json#L47
But we can use the trait in 2.1: https://github.com/api-platform/core/blob/2.1/composer.json#L52

So I propose to use the trait and rebase this PR against 2.1.

@sroze
Copy link
Contributor

sroze commented Oct 11, 2017

Sounds good to me 👍

@meyerbaptiste
Copy link
Member

I didn't pay attention to the base branch! Let's do that!

@norkunas norkunas changed the base branch from 2.0 to 2.1 October 11, 2017 14:26
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.

4 participants