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

make the bundle Symfony 3 compatible, bump Symfony dependency to 2.6 #184

Merged
merged 10 commits into from
Dec 3, 2015

Conversation

craue
Copy link
Owner

@craue craue commented Jun 24, 2015

Two BC breaking changes are needed to make the bundle Symfony 3 compatible:

  • inject the request_stack service instead of request,
  • remove the scope from service definitions.

Because

  • the RequestStack class was introduced by Symfony 2.4 and
  • it's only possible to inject request into request-scoped services,

support for Symfony 2.3 needs to be dropped. Currently, Symfony 2.4 and 2.5 aren't maintained anymore, so it should be fine to support only at least 2.6.

@craue craue added this to the 3.0.0 milestone Jun 24, 2015
@craue craue mentioned this pull request Jun 25, 2015
31 tasks
@craue craue changed the title make the bundle Symfony 3 compatible make the bundle Symfony 3 compatible, bump Symfony dependency to 2.6 Jun 25, 2015
@patie
Copy link

patie commented Oct 12, 2015

@craue great work! is there any ETA for 3.0.0? thx

@craue
Copy link
Owner Author

craue commented Oct 13, 2015

@patie, I want to wait at least until Symfony 2.8 is released to ensure the bundle is fully compatible without triggering any deprecation notices.

@craue craue force-pushed the 3.0.x-make-symfony3-compatible branch 2 times, most recently from 0ff33ce to aaf70ed Compare October 13, 2015 12:32
@craue craue mentioned this pull request Dec 2, 2015
@craue craue force-pushed the 3.0.x-make-symfony3-compatible branch 4 times, most recently from f5012af to cdb074f Compare December 2, 2015 12:52
@craue
Copy link
Owner Author

craue commented Dec 2, 2015

Tests pass, the jobs only fail at the Coveralls data upload due to the outdated (and obviously unmaintained) satooshi/php-coveralls component.

Ready for review.

/ping @stof 😏

@@ -37,6 +38,15 @@ public function registerBundles() {

public function registerContainerConfiguration(LoaderInterface $loader) {
$loader->load($this->config);

if (class_exists('Symfony\Component\Asset\Package')) {
// enable assets to avoid fatal error "Call to a member function needsEnvironment() on a non-object in vendor/twig/twig/lib/Twig/Node/Expression/Function.php on line 25" with Symfony 3.0
Copy link

Choose a reason for hiding this comment

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

do you really need it ? Do you depend on AsseticBundle for your integration tests ?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I don't need Assetic for the tests, but got an error regarding "asset" being undefined. When trying locally now, it's gone. 😒 I'll remove this code.

@craue craue force-pushed the 3.0.x-make-symfony3-compatible branch from cdb074f to 5f2fd76 Compare December 2, 2015 15:58
env: SYMFONY_VERSION="2.4.*" SYMFONY_DEPRECATIONS_HELPER="weak"
- php: 5.6
env: SYMFONY_VERSION="2.5.*" SYMFONY_DEPRECATIONS_HELPER="weak"
- php: 5.6
env: SYMFONY_VERSION="2.6.*" SYMFONY_DEPRECATIONS_HELPER="weak"
- php: 5.6
env: SYMFONY_VERSION="2.8.*" SYMFONY_DEPRECATIONS_HELPER="weak"
Copy link

Choose a reason for hiding this comment

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

2.8 should not allow weak deprecations (otherwise, the code is not Symfony 3 ready)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Ah right, I forgot to remove it from that line. Done.

@craue craue force-pushed the 3.0.x-make-symfony3-compatible branch from 5f2fd76 to 4109e69 Compare December 2, 2015 16:06
@craue
Copy link
Owner Author

craue commented Dec 3, 2015

Worked around the issue with satooshi/php-coveralls making the build completely green now. 😎

@craue craue force-pushed the 3.0.x-make-symfony3-compatible branch 8 times, most recently from 8f8f131 to 41687c0 Compare December 3, 2015 17:33
@craue craue force-pushed the 3.0.x-make-symfony3-compatible branch from 41687c0 to c67560f Compare December 3, 2015 17:42
@craue
Copy link
Owner Author

craue commented Dec 3, 2015

Going to merge this soon if there are no further objections.

craue added a commit that referenced this pull request Dec 3, 2015
make the bundle Symfony 3 compatible, bump Symfony dependency to 2.6
@craue craue merged commit 9d63a03 into master Dec 3, 2015
@craue craue deleted the 3.0.x-make-symfony3-compatible branch December 3, 2015 21:19
@craue
Copy link
Owner Author

craue commented Dec 3, 2015

Thank you for your feedback, @stof.

@craue craue mentioned this pull request Dec 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants