Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[PhpUnitBridge] More accurate grouping #31730

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

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

greg0ire
Copy link
Contributor

Q A
Branch? 4.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Sometimes, you cannot easily know if code was written by a vendor or
directly in the application, for instance if the code comes from a file
in the cache. In that case, it is better not to classify the deprecation
as direct or indirect.

@jmsche please test this on your application when you can, I think you might be having that issue.

@jmsche
Copy link
Contributor

jmsche commented May 30, 2019

Hi there, it seems better to me :)

FYI using Symfony 4.3.0-beta1 (without the Twig fixes in form_div_layout.html.twig) here are the results:

Pre-patch:

Remaining direct deprecation notices (1)

  1x: Using an "if" condition on "for" tag is deprecated since Twig 2.10.0, use a "filter" filter or an "if" condition inside the "for" body instead (if your condition depends on a variable updated inside the loop).
    1x in EventControllerTest::testIndex from App\Tests\Controller\Admin

Post-patch:

Other deprecation notices (1)

  1x: Using an "if" condition on "for" tag is deprecated since Twig 2.10.0, use a "filter" filter or an "if" condition inside the "for" body instead (if your condition depends on a variable updated inside the loop).
    1x in EventControllerTest::testIndex from App\Tests\Controller\Admin

@greg0ire greg0ire force-pushed the more-accurate-grouping branch 2 times, most recently from a2a7612 to 0febb03 Compare May 30, 2019 13:31
@greg0ire greg0ire marked this pull request as ready for review May 30, 2019 14:27
@greg0ire greg0ire force-pushed the more-accurate-grouping branch 2 times, most recently from 116907f to d67f50c Compare May 30, 2019 14:31
@@ -18,6 +18,15 @@
*/
class Deprecation
{
private const PATH_TYPE_VENDOR = 'path_type_vendor';
private const PATH_TYPE_SELF = 'path_type_internal';
private const PATH_TYPE_UNDETERMINED = 'path_type_undetermined';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could have used an exception instead of 3-value return, but it did not feel "exceptional" enough. This is going to happen whenever a deprecation comes from the cache.

Copy link
Member

Choose a reason for hiding this comment

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

hello PHP 5.5, we cannot use these consts

Copy link
Member

Choose a reason for hiding this comment

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

fixed in 0c9b3c0

@chalasr chalasr added this to the 4.3 milestone May 30, 2019
@nicolas-grekas nicolas-grekas changed the title More accurate grouping [PhpUnitBridge] More accurate grouping May 31, 2019
@fabpot fabpot force-pushed the more-accurate-grouping branch from d67f50c to d9f0ba3 Compare June 26, 2019 08:11
@fabpot
Copy link
Member

fabpot commented Jun 26, 2019

Thank you @greg0ire.

@fabpot fabpot merged commit d9f0ba3 into symfony:4.3 Jun 26, 2019
fabpot added a commit that referenced this pull request Jun 26, 2019
This PR was squashed before being merged into the 4.3 branch (closes #31730).

Discussion
----------

[PhpUnitBridge] More accurate grouping

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

Sometimes, you cannot easily know if code was written by a vendor or
directly in the application, for instance if the code comes from a file
in the cache. In that case, it is better not to classify the deprecation
as direct or indirect.

@jmsche please test this on your application when you can, I think you might be having that issue.

Commits
-------

d9f0ba3 [PhpUnitBridge] More accurate grouping
@greg0ire greg0ire deleted the more-accurate-grouping branch June 26, 2019 09:43
@nicolas-grekas
Copy link
Member

This breaks the CI and I cannot reproduce locally (yet), for deps=low/high jobs:
https://travis-ci.org/symfony/symfony/jobs/550756898

Not a bug, just a side-effect of the CI.
I'm going to revert for now, please submit again.

@nicolas-grekas
Copy link
Member

Reverted in 4814fd3

nicolas-grekas added a commit that referenced this pull request Jun 26, 2019
nicolas-grekas added a commit that referenced this pull request Jun 26, 2019
* 4.3:
  Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)"
nicolas-grekas added a commit that referenced this pull request Jun 26, 2019
* 4.4:
  Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)"
nicolas-grekas added a commit that referenced this pull request Jun 26, 2019
nicolas-grekas added a commit that referenced this pull request Jun 26, 2019
* 4.3:
  Reject phpunit-bridge v5 for now
  Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)""
nicolas-grekas added a commit that referenced this pull request Jun 26, 2019
* 4.4:
  Reject phpunit-bridge v5 for now
  Revert "Revert "bug #31730 [PhpUnitBridge] More accurate grouping (greg0ire)""
@nicolas-grekas
Copy link
Member

Revert reverted because actually it's not the issue, I'm loosing my mind on because I cannot reproduce locally :)

@fabpot fabpot mentioned this pull request Jun 26, 2019
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