Skip to content

[Hackday] [2.7] Add a deprecation note about TypeTestCase #12605 #12625

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Symfony\Bridge\Propel1\Form\PropelExtension;
use Symfony\Bridge\Propel1\Tests\Fixtures\TranslatableItemI18n;
use Symfony\Bridge\Propel1\Tests\Fixtures\TranslatableItem;
use Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase;
use Symfony\Component\Form\Test\TypeTestCase;

class TranslationCollectionTypeTest extends TypeTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@
*/
abstract class TypeTestCase extends BaseTypeTestCase
{
protected function setUp()
{
trigger_error('Abstract class "Symfony\Component\Form\Tests\TypeTestCase" is deprecated since version 2.3 and will be removed in 3.0. Use "Symfony\Component\Form\Test\TypeTestCase" instead.', E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

You should call parent::setUp();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@nicolas-grekas - is this really needed? as this is test phpunit will catch this trigger.
so it shouldn't matter that this won't work?

Copy link
Member

Choose a reason for hiding this comment

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

@jzawadzki I think it should be possible to execute tests nonetheless when ignoring the deprecation warnings in PHPUnit which won't work without the setUp() call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@xabbuh @nicolas-grekas ok, you're right - added

parent::setUp();
}
}