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

PHP 8.0 compatibility #98

Merged
merged 1 commit into from
Oct 28, 2020
Merged

PHP 8.0 compatibility #98

merged 1 commit into from
Oct 28, 2020

Conversation

jmsche
Copy link
Contributor

@jmsche jmsche commented Oct 20, 2020

Tests are also run against PHP7.4.

composer.json Outdated Show resolved Hide resolved
@jmsche
Copy link
Contributor Author

jmsche commented Oct 20, 2020

So, the tests pass, but Travis fails because of this deprecation:

Since symfony/twig-bundle 5.2: Accessing the "twig" service directly from the container is deprecated, use dependency injection instead.

However I can't find a way to get Twig Environment properly from the container, any idea about this?

@Kocal
Copy link
Member

Kocal commented Oct 20, 2020

You can inject \Twig\Environment in your constructor.

@maxhelias
Copy link

maxhelias commented Oct 20, 2020

@Kocal Not so easy for testing

@jmsche I'm not sure, but take a look at the class Symfony\Bundle\FrameworkBundle\Test\KernelTestCase and the service test.service_container. It might take a little work but I think it's a good lead.

@Kocal
Copy link
Member

Kocal commented Oct 20, 2020

@maxhelias yes that's not really easy in fact, I'm already helping @jmsche on Symfony Slack and I think we will use the test.service_container.

@jmsche
Copy link
Contributor Author

jmsche commented Oct 20, 2020

Finally Travis is green :)

Many thanks to @Kocal who helped me a lot :)

Copy link

@maxhelias maxhelias left a comment

Choose a reason for hiding this comment

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

Look good 👍

Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

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

Just one small comment - I think I might be missing a detail. Thanks for this - it looks great!

tests/EntrypointLookupIntegrityDataProviderInterface.php Outdated Show resolved Hide resolved
.travis.yml Show resolved Hide resolved
@jmsche jmsche closed this Oct 26, 2020
@jmsche jmsche reopened this Oct 26, 2020
@jmsche
Copy link
Contributor Author

jmsche commented Oct 27, 2020

Updated PR by renaming test interface & fixing symfony/flex branch name in Travis config.

Travis is green again! :)

@weaverryan
Copy link
Member

Thank you so much for this detailed work @jmsche!

@weaverryan weaverryan merged commit c879bc5 into symfony:master Oct 28, 2020
@jmsche jmsche deleted the php-8 branch June 1, 2022 15:13
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.

5 participants