-
Notifications
You must be signed in to change notification settings - Fork 191
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
Make ancestorClass option consistency to underscore #351
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't just change an option like this.
We need to keep BC: add new option, deprecate old option. Then we can remove old option in the next major version.
I just add deprecation contracts as symfony way and allow the support for both options during the transition for avoid BC. Let me know if it suitable for you now |
@@ -55,7 +55,8 @@ | |||
{%- if matcher.isCurrent(item) %} | |||
{%- set classes = classes|merge([options.currentClass]) %} | |||
{%- elseif matcher.isAncestor(item, options.matchingDepth) %} | |||
{%- set classes = classes|merge([options.ancestorClass]) %} | |||
{# ancestorClass will be deprecated in future, use ancestor_class #} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this does not report the deprecation AFAICT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 24fa9c2
.github/workflows/build.yaml
Outdated
@@ -62,7 +62,7 @@ jobs: | |||
with: | |||
php-version: ${{ matrix.php }} | |||
- run: | | |||
sed -ri 's/"symfony\/(.+)": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json; | |||
sed -ri '/symfony\/deprecation-contracts/!s/"symfony\/(.+)\symfony\/deprecation-contracts/;": "(.+)"/"symfony\/\1": "'${{ matrix.symfony }}'"/' composer.json; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need a space between !
and s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you added it before the wrong s
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, let me know if there are something more needed to get this merged. I would like sent the next PR with the other options |
One month later, I still didn't receive feedback about why the PR is not merged or if I need to change something. |
I'm sorry to see your expectations about time disappointed. Unfortunately, there's no guarantee about that, since everyone is working in their free time. |
Please @stof there are any chance that this will be approved soon? I would like integrate the changes in other of my projects It should be quick to check for you. Thanks for your time. |
Should I fork this project and create a parallel project since maintainers doesn't have time to attend issues or resolve the pull request? I know that everybody is working in his free time here. But if main maintainers don't have time, the open source community dies, and the workaround is assign new people that wants to contribute, or in my side I only have the option to fork (which I don't like to do it, but if more time without response or progress I will have to initiate) |
The issue I have with accepting this PR is that I'm totally unsure about the effectiveness of the BC layer. There are 2 places impacted by this renaming:
And I'm even less sure about the effectiveness of the deprecation warnings for that second case. This means that this PR is risky, without much benefit (the existing name still works fine), while I only have limited free time dedicated to this project, and the same seems to be true for @garak |
…estor_class deprecation
First, thanks @stof for your time and quick response today.
I try to catch the deprecation in twig render here 4abbba4 The test is not fully working, I don't know exactly how to mock the deprecation, so I need a bit of help with that lines. Peer review and suggestions are appreciated.
I am not sure of this case, could you provide a example of project in that situation, so I can see the problem?
In theory, if this is released under a new version, they can use old version without BC until we can figure out how to address the problem.
The idea here when this PR gets accepted, is send more PR with the other names affected and close the issue of options consistency #171 |
@shakaran the whole point of using deprecations is to allow to release the change in a minor version (so without BC breaks) and having projects than migrate their code based on the warnings they get.
and fixing this consistency issue is about theoretical purity, not about actually making this package better for its user. The benefit of fixing this is small (it would help people learn the right option name without looking in the doc), but doing so at a high cost would be a no-go.
When using the symfony/phpunit-bridge deprecation reporting for the testsuite (which we do), you need to use the trait of that package to define deprecation expectations instead of relying on the |
Ok, minor release then (3.3) as pointed. As far it gets merged and released finally.
After this PR gets accepted I will provide the other cases and options rewriten with BC layer support of deprecations.
ok, I added, but it seems that for Symfony 4.4 with PHP 7.4 it breaks since no trait available |
@shakaran this is an issue in the way Symfony-specific jobs are configured. The phpunit-bridge should not be affected (it is a special component, that is not replaced by the monorepo package either) |
ok, then, it is good to merge, or do you need that I make more changes? Thanks |
@stof almost a year for get this merged. Please, could you consider it? Thanks, only remains your approve vote |
Applied renaming over the repo with:
grep -ril ancestorClass | xargs sed -i 's@ancestorClass@ancestor_class@g'