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

Replace deprecated self::$container with self::getContainer() in tests #6571

Merged

Conversation

alexander-schranz
Copy link
Member

@alexander-schranz alexander-schranz commented Apr 28, 2022

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets fixes #
Related issues/PRs #6556
License MIT
Documentation PR sulu/sulu-docs#

What's in this PR?

Replace deprecated self:: with self::getContainer() in tests

Why?

The self::$container was removed and the container is now provided over symfony getContainer method.

*
* This function exist to keep compatibility to old tests.
*/
protected static function getContainer(): ContainerInterface
Copy link
Member Author

Choose a reason for hiding this comment

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

This conflicts with the symfony getContainer method and so need to be removed. Symfony ships the same implementation now https://github.com/symfony/symfony/blob/d11e41be6cb23016894c564d5c2b9ef3357ecaa7/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php#L100

@alexander-schranz alexander-schranz added the Bug Error or unexpected behavior of already existing functionality label Apr 28, 2022
@alexander-schranz alexander-schranz mentioned this pull request Apr 28, 2022
84 tasks
@alexander-schranz alexander-schranz changed the title Replace deprecated self:: with self::getContainer() in tests Replace deprecated self::$container with self::getContainer() in tests Apr 28, 2022
@wachterjohannes wachterjohannes merged commit 325340c into sulu:2.5 Apr 29, 2022
@alexander-schranz alexander-schranz deleted the enhancement/test-get-container branch April 29, 2022 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Error or unexpected behavior of already existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants