Skip to content

[3.0] [Validator] deprecations cleanup #15708

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 10 commits into from
Closed

[3.0] [Validator] deprecations cleanup #15708

wants to merge 10 commits into from

Conversation

TomasVotruba
Copy link
Contributor

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Please review.

@jakzal
Copy link
Contributor

jakzal commented Sep 8, 2015

Some code is comented out. It should be removed or fixed :)

// ));
//
// $this->assertTrue(is_callable($form->getConfig()->getOption('validation_groups')));
// }
Copy link
Member

Choose a reason for hiding this comment

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

these comments must be reverted (any non legacy test should be kept)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, forgotten testing

@TomasVotruba
Copy link
Contributor Author

@jakzal Thanks. I forgot it there, should be ready now.

All tests pass now, except 2.8 build. Btw, why it's there this Travis build for 3.0 branch?

@nicolas-grekas
Copy link
Member

The tests on 2.8 are for verifying that a PR on 3.0 does not break 2.8. This means you still have something to fix :) That can be by doing an other PR on 2.8 to exclude validator ~3.0.0 from form's composer.json. Or by figuring out the failure and finding an other, less radical, patch on 2.8 to make it compatible with your PR (which may not be possible).

@TomasVotruba
Copy link
Contributor Author

@nicolas-grekas This is my first bigger PR, so I'd rather go with:

PR on 2.8 to exclude validator ~3.0.0 from form's composer.json

Would that be ok?

$validator = $this->getMock('Symfony\Component\Validator\Validator\ValidatorInterface');

$listener = new ValidationListener($validator, $this->violationMapper);
$this->assertAttributeSame($validator, 'validator', $listener);
}

public function testValidatorInterfaceUntilSymfony24()
Copy link
Member

Choose a reason for hiding this comment

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

this test should be @group legacy in 2.8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: #15767

@nicolas-grekas
Copy link
Member

@TomasVotruba excluding 3.0 is an option only when there is no other option :)
But here, the issue is that 2.8 misses a few @group legacy annotations. In fact, ALL tests that you remove in this PR must now be annotated @group legacy in 2.8.
Please open an other sibling PR on 2.8.
Btw, rebase needed.

fabpot added a commit that referenced this pull request Sep 12, 2015
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] mark test as legacy

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Ref #15708 (comment)

Failing test are hhvm binaries: https://travis-ci.org/symfony/symfony/jobs/79951993#L530

Commits
-------

cf18a99 [Validator] mark test as legacy
@nicolas-grekas
Copy link
Member

rebase needed @TomasVotruba

@TomasVotruba
Copy link
Contributor Author

Mmm, rebased. There are some some new commits that keeps breaking it. Only 2.8 was failing, now is every branch. I don't have such a deep experience with Validator, when error message would help me to fix it.

I'm thinking of splitting to smaller PRs, that can be merged at once. What do you thing?

@fabpot
Copy link
Member

fabpot commented Sep 22, 2015

@TomasVotruba If you think it would be easier to manage smaller PRs, go for it.

@fabpot
Copy link
Member

fabpot commented Sep 30, 2015

I'm giving it a try in #16024

@fabpot fabpot closed this Sep 30, 2015
@TomasVotruba
Copy link
Contributor Author

@fabpot Thanks, I got busy recently.

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.

6 participants