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

[HttpKernel] Add#[Cache()] to describe the default HTTP cache headers on controllers#46880

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

Merged
chalasr merged 1 commit intosymfony:6.2fromnicolas-grekas:hk-cache-attr
Jul 12, 2022

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?6.2
Bug fix?no
New feature?yes
Deprecations?no
TicketsPart of#44705
LicenseMIT
Doc PR-

Extracted from#45415 (and modernized a lot).

I'd appreciate any help for porting the other attributes following this leading PR 🙏

derrabus and welcoMattic reacted with rocket emoji
@carsonbotcarsonbot added this to the6.2 milestoneJul 7, 2022
@carsonbotcarsonbot changed the title[HttpKernel] Add#[Cache] to describe the default HTTP cache headers on controllers[Cache][HttpKernel] Add# to describe the default HTTP cache headers on controllersJul 7, 2022
@nicolas-grekasnicolas-grekas changed the title[Cache][HttpKernel] Add# to describe the default HTTP cache headers on controllers[Cache][HttpKernel] Add#[Cache] to describe the default HTTP cache headers on controllersJul 7, 2022
@carsonbotcarsonbot changed the title[Cache][HttpKernel] Add#[Cache] to describe the default HTTP cache headers on controllers[HttpKernel] Add# to describe the default HTTP cache headers on controllersJul 7, 2022
@nicolas-grekasnicolas-grekas changed the title[HttpKernel] Add# to describe the default HTTP cache headers on controllers[HttpKernel] Add#[Cache()] to describe the default HTTP cache headers on controllersJul 7, 2022
@nicolas-grekasnicolas-grekasforce-pushed thehk-cache-attr branch 3 times, most recently frome993a98 to35e176aCompareJuly 7, 2022 15:42
@nicolas-grekasnicolas-grekasforce-pushed thehk-cache-attr branch 2 times, most recently from4a33e21 toa8efdeaCompareJuly 9, 2022 07:52
@nicolas-grekasnicolas-grekasforce-pushed thehk-cache-attr branch 4 times, most recently from421a733 toa63b607CompareJuly 12, 2022 07:44
}

$action =new \ReflectionFunction($controller(...));
$action =\is_array($controller) ?new \ReflectionMethod(...$controller) : (\is_string($controller) &&str_contains($controller,'::') ?new \ReflectionMethod($controller) :new \ReflectionFunction($controller(...)));
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Needed to work aroundphp/php-src#8982

@chalasr
Copy link
Member

Thank you@nicolas-grekas.

@chalasrchalasr merged commit96667d3 intosymfony:6.2Jul 12, 2022
@fabpotfabpot deleted the hk-cache-attr branchJuly 12, 2022 15:34
chalasr added a commit that referenced this pull requestJul 14, 2022
…stenerTest explicitly (derrabus)This PR was merged into the 6.2 branch.Discussion----------[HttpKernel] Declare properties used by CacheAttributeListenerTest explicitly| Q             | A| ------------- | ---| Branch?       | 6.2| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       | N/A| License       | MIT| Doc PR        | N/AA test case introduced by#46880 triggers deprecation notices on PHP 8.2 because none of the properties used is declared. This PR fixes the build by adding explicit property declarations.Commits-------f0d0799 [HttpKernel] Declare properties used by CacheAttributeListenerTest explicitly
@fabpotfabpot mentioned this pull requestOct 24, 2022
fabpot added a commit to sensiolabs/SensioFrameworkExtraBundle that referenced this pull requestNov 1, 2022
This PR was merged into the 6.1.x-dev branch.Discussion----------Check _cache type for compatibility with Symfony 6.2The new `#[Cache()]` attribute that is added to Symfony 6.2 (symfony/symfony#46880) is stored in the same request attribute `_cache`.Before this change, if the bundle is enabled and Symfony's Cache attribute is used, we get an error.```Call to a member function getSMaxAge() on array```This bugfix will ease migration when simultaneously usage of FrameworkExtraBundle and Symfony attributes is necessary.Commits-------0fd5fdf Check _cache type for compatibility with Symfony 6.2
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@derrabusderrabusderrabus left review comments

@weaverryanweaverryanweaverryan approved these changes

@GromNaNGromNaNGromNaN approved these changes

@chalasrchalasrchalasr approved these changes

@wouterjwouterjAwaiting requested review from wouterj

+2 more reviewers

@94noni94noni94noni left review comments

@HeahDudeHeahDudeHeahDude left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.2

Development

Successfully merging this pull request may close these issues.

8 participants

@nicolas-grekas@chalasr@weaverryan@GromNaN@94noni@derrabus@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp