Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

Add symfony 3.0 support #394

Merged
merged 1 commit into from
Nov 17, 2015
Merged

Add symfony 3.0 support #394

merged 1 commit into from
Nov 17, 2015

Conversation

GuilhemN
Copy link
Contributor

This PR adds symfony 3.0 support.

"type": "vcs",
"url": "https://github.com/WouterJ/assetic"
}
],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Must be removed once kriswallsmith/assetic#772 is merged.

Copy link
Member

Choose a reason for hiding this comment

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

it is merged now

@GuilhemN
Copy link
Contributor Author

The build failure is unrelated to this PR.

@@ -26,16 +26,11 @@ matrix:
env: SYMFONY_VERSION=2.7.*
# Test against dev versions
- php: 5.6
env: DEPENDENCIES=dev
Copy link
Member

Choose a reason for hiding this comment

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

please don't remove the test against dev dependencies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we allow this test to fail ?

@GuilhemN GuilhemN changed the title [WIP] Add symfony 3.0 support Add symfony 3.0 support Nov 14, 2015
@GuilhemN
Copy link
Contributor Author

Do you want to wait until https://github.com/kriswallsmith/assetic is released?

@mmoreram
Copy link

This PR doesn't assure the compatibility with Symfony3 until you add the dependency with kriswallsmith/assetic to ^1.3.2 (not released yet)

@GuilhemN
Copy link
Contributor Author

There is no need to use this constraint as composer will manage this automatically.

@mmoreram
Copy link

Your composer file must manage its own dependencies. If you install this component using prefer-lowest, then version old assetic version will be installed, so it will not cover this feature.

ping @stof

@GuilhemN
Copy link
Contributor Author

If an user wants to use symfony 3.0, composer will only install the versions of the dependencies that are compatibles. If you use prefer-lowest, composer will install kriswallsmith/assetic 1.3.2 because this is the oldest version compatible.
If the user wants to use symfony 3.0 with kriswallsmith/assetic <1.3.2 composer will return an error.

@mmoreram
Copy link

Not agree.
This bundle cannot have external visibility of it's dependencies dependencies.
Accepting this PR you are saying (imagine that this PR is merged before 2.7.1)

  • Hey guys! If you install Symfony 3.0.0, you can use our version AsseticBundle 2.7.1.
  • Your bundle MUST ensure that this is right, no matter what happens outside.
  • This bundle allows kriswallsmith/assetic to be in version ^1.3.1, which has a deprecation element (Globals without interface)... and this will be not valid anymore in Symfony 3.0.0.

So, what you have to do here is increment your dependency with assetic library, and if other users need Symfony 2.x.x then composer will install maximum AsseticBundle 2.7.0

@GuilhemN
Copy link
Contributor Author

kriswallsmith/assetic wasn't compatible with sf3.0 before kriswallsmith/assetic#772 which resolves all the deprecations.

An example:

{
    "require": {
        "php":                            ">=5.3.9",
        "symfony/symfony":                "^3.0@dev",
        "symfony/assetic-bundle":         "^2.0",
        "kriswallsmith/assetic":          "^1.3"
    }
}

With this composer.json, if you run composer update --prefer-lowest, composer will install:

  • symfony/symfony 3.0.x-dev
  • symfony/assetic-bundle 2.7.1 (I suppose that this PR will be merged before 2.7.1)
  • kriswallsmith/assetic 1.3.2

Because if for example composer installs symfony/assetic-bundle 2.7.0, there would be a conflict between the composer.json of symfony/assetic-bundle and the version of symfony/symfony.
If composer installs kriswallsmith/assetic 1.3.1, there would be the same issue: a conflict between the composer.json of kriswallsmith/assetic and the version of symfony/symfony.

@stof
Copy link
Member

stof commented Nov 17, 2015

@mmoreram don't confuse Twig 2.x and Symfony 3. Symfony 3 still allows Twig 2

@stof
Copy link
Member

stof commented Nov 17, 2015

The remaining test failure on PHP 7 is because of sebastianbergmann/phpunit-mock-objects#267

@stof
Copy link
Member

stof commented Nov 17, 2015

Thank you @Ener-Getick.

@stof stof merged commit 1482825 into symfony:master Nov 17, 2015
stof added a commit that referenced this pull request Nov 17, 2015
This PR was merged into the 2.7-dev branch.

Discussion
----------

Add symfony 3.0 support

This PR adds symfony 3.0 support.

Commits
-------

1482825 Add symfony 3.0 support
@GuilhemN GuilhemN deleted the SF3 branch November 17, 2015 10:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants