Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] add a notice when passing a routerInterface without warmupInterface in RouterCacheWarmer#24894

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@Simperfit
Copy link
Contributor

@SimperfitSimperfit commentedNov 10, 2017
edited
Loading

QA
Branch?master
Bug fix?yesish
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets#23403
LicenseMIT
Doc PRnone

I'm adding a test to RouterCacheWarmer since there were none.

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch 3 times, most recently fromf437cf8 to66d49f3CompareNovember 10, 2017 09:31
if ($this->routerinstanceof WarmableInterface) {
$this->router->warmUp($cacheDir);
}else {
trigger_error(sprintf('%s is not a instanceof %s, no warmUp has been triggered.',get_class($this->router), WarmableInterface::class), \E_USER_NOTICE);
Copy link
Member

Choose a reason for hiding this comment

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

IMHO we could trigger a deprecation now and throw a LogicException at the end.

Choose a reason for hiding this comment

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

Ddo we ever trigger a notice in the code base? This is suspicious to me :)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

We trigger warning but not notices you are right, I will change that with@chalasr's suggestion

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Since we are triggering a deprecation, we should go with master ?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, triggering/throwing does not fix a bug, it only enhances DX. This is for master in any case IMO

Copy link
Member

Choose a reason for hiding this comment

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

That's for 4.1 IMHO.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Rebase and throw added.

@nicolas-grekasnicolas-grekas changed the title[FrameworkBundle] add a notice when passing a routerInterface with wa…[FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmerNov 10, 2017
@SimperfitSimperfit changed the title[FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmer[FrameworkBundle] add a notice when passing a routerInterface without warmupInterface in RouterCacheWarmerNov 10, 2017
@chalasrchalasr added this to the4.1 milestoneNov 11, 2017
@chalasrchalasr added Feature and removed Bug labelsNov 11, 2017
@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch from66d49f3 to6656dbeCompareNovember 12, 2017 07:45
@SimperfitSimperfit changed the base branch from3.3 tomasterNovember 12, 2017 07:46
@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch 2 times, most recently from0458373 to6df98e5CompareNovember 12, 2017 07:57

return;
}else {
@trigger_error(sprintf('Passing a %s without implementing %s is deprecated since 4.1.', RouterInterface::class, WarmableInterface::class), \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.

I do not understand why we care about a deprecation if we immediately throw afterwards anyway.

Copy link
Member

Choose a reason for hiding this comment

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

We MUST NOT throw (we cannot do it until 5.0). We should have only the deprecation notice.


return;
}else {
@trigger_error(sprintf('Passing a %s without implementing %s is deprecated since 4.1.', RouterInterface::class, WarmableInterface::class), \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.

We MUST NOT throw (we cannot do it until 5.0). We should have only the deprecation notice.

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch from6df98e5 to4128cf8CompareNovember 19, 2017 21:12
@Simperfit
Copy link
ContributorAuthor

done@stof

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch from4128cf8 tocfd840fCompareNovember 19, 2017 21:13
@Simperfit
Copy link
ContributorAuthor

I will update the Changelog

@Simperfit
Copy link
ContributorAuthor

Travis failure seems unrelated

$router->warmUp($cacheDir);

return;
}else {
Copy link
Member

Choose a reason for hiding this comment

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

no need for theelse as the previousif returns anyway

Simperfit reacted with thumbs up emoji
@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch fromcfd840f to060f65aCompareDecember 3, 2017 17:08
@Simperfit
Copy link
ContributorAuthor

This has been updated@stof@xabbuh

@Simperfit
Copy link
ContributorAuthor

Status: Needs Review

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch 4 times, most recently from6e94f29 to18453aaCompareDecember 6, 2017 14:01
* The`FileDumper::setBackup()` method is deprecated and will be removed in 5.0.
* The`TranslationWriter::disableBackup()` method is deprecated and will be removed in 5.0.

FrameworkBundle
Copy link
Member

Choose a reason for hiding this comment

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

Sorry for nitpicking@Simperfit, but could you please move this up sort entries alphabetically (makes searching for something much easier in the future with many more entries)?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

done

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch from18453aa to06faa74CompareDecember 7, 2017 09:17
@chalasr
Copy link
Member

Needs rebase

return;
}

@trigger_error(sprintf('Passing a %s without implementing %s is deprecated since 4.1.', RouterInterface::class, WarmableInterface::class), \E_USER_DEPRECATED);

Choose a reason for hiding this comment

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

since Symfony 4.1

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch from06faa74 to879a720CompareJanuary 5, 2018 12:22
@Simperfit
Copy link
ContributorAuthor

PR rebased

@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch from879a720 tob5d9048CompareJanuary 24, 2018 16:05
@SimperfitSimperfitforce-pushed thebugfix/decorating-router-might-miss-warmable-interface branch fromb5d9048 todaa7f02CompareJanuary 24, 2018 16:07
@Simperfit
Copy link
ContributorAuthor

PR Rebased

@Simperfit
Copy link
ContributorAuthor

@nicolas-grekas this one is ready.

@fabpot
Copy link
Member

Thank you@Simperfit.

@fabpotfabpot merged commitdaa7f02 intosymfony:masterJan 26, 2018
fabpot added a commit that referenced this pull requestJan 26, 2018
…terface without warmupInterface in RouterCacheWarmer (Simperfit)This PR was merged into the 4.1-dev branch.Discussion----------[FrameworkBundle] add a notice when passing a routerInterface without warmupInterface in RouterCacheWarmer| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yesish| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets |#23403| License       | MIT| Doc PR        | noneI'm adding a test to RouterCacheWarmer since there were none.Commits-------daa7f02 [FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmer
FrameworkBundle
---------------

* Using a`RouterInterface` that does not implement the`WarmableInterface` is not supported anymore.
Copy link
Contributor

Choose a reason for hiding this comment

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

This must mention that it is about RouterCacheWarmer. This has nothing to do with the RouterInterface itself.

symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestFeb 25, 2018
…ions (xabbuh)This PR was merged into the 4.1-dev branch.Discussion----------[FrameworkBundle] clarify changelog and upgrade instructions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |symfony/symfony#24894 (comment)| License       | MIT| Doc PR        |Commits-------a8df0aee92 clarify changelog and upgrade instructions
Tobion added a commit that referenced this pull requestFeb 25, 2018
…ions (xabbuh)This PR was merged into the 4.1-dev branch.Discussion----------[FrameworkBundle] clarify changelog and upgrade instructions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#24894 (comment)| License       | MIT| Doc PR        |Commits-------a8df0ae clarify changelog and upgrade instructions
@fabpotfabpot mentioned this pull requestMay 7, 2018
@SimperfitSimperfit deleted the bugfix/decorating-router-might-miss-warmable-interface branchJune 2, 2019 08:06
nicolas-grekas added a commit that referenced this pull requestJun 5, 2019
This PR was merged into the 5.0-dev branch.Discussion----------[Routing] remove deprecations| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->| BC breaks?    | yes     <!-- seehttps://symfony.com/bc -->| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->| Fixed tickets || License       | MIT| Doc PR        |Ref.#30249,#30286,#24894Commits-------5beb5f8 [Routing] remove deprecations
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@chalasrchalasrchalasr left review comments

@stofstofstof requested changes

@fabpotfabpotfabpot approved these changes

@xabbuhxabbuhxabbuh approved these changes

+1 more reviewer

@TobionTobionTobion left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

8 participants

@Simperfit@chalasr@fabpot@nicolas-grekas@stof@Tobion@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp