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

[HttpFoundation] Deprecate compatibility with PHP <5.4 sessions#24239

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

Closed
afurculita wants to merge3 commits intosymfony:3.4fromAlexanderForks:3.4

Conversation

@afurculita
Copy link
Contributor

@afurculitaafurculita commentedSep 17, 2017
edited
Loading

QA
Branch?3.4
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed tickets-
LicenseMIT
Doc PR-

This PR removes functionality added in Symfony 2.1 as a compatibility layer with sessions from PHP <5.4.

  • Fix tests

Koc and ro0NL reacted with thumbs up emoji
publicfunctionsetSaveHandler($saveHandler =null)
{
if (!$saveHandlerinstanceof AbstractProxy &&
!$saveHandlerinstanceof NativeSessionHandler &&
Copy link
Member

@nicolas-grekasnicolas-grekasSep 17, 2017
edited
Loading

Choose a reason for hiding this comment

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

should be reverted as that's a BC break, isn't it?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Nope, since Symfony 3.0,NativeSessionHandler always extends\SessionHandler. Thus now the rule!$saveHandler instanceof NativeSessionHandler is covered by!$saveHandler instanceof \SessionHandlerInterface

Tobion reacted with thumbs up emoji
@afurculitaafurculitaforce-pushed the3.4 branch 2 times, most recently from640661c to71a92a2CompareSeptember 17, 2017 15:24
*/

namespaceSymfony\Component\HttpFoundation\Session\Storage\Proxy;

Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't you add a deprecated notice here ?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I had one, but removed it becauseAbstractProxy is extended bySessionHandlerProxy and this will make the tests that useSessionHandlerProxy to not pass. I can't mark these tests aslegacy. What's a good solution to have a deprecation notice here and tests pass?

*
* @author Drak <drak@zikula.org>
*/
class SessionHandlerProxyextends AbstractProxyimplements \SessionHandlerInterface
Copy link
ContributorAuthor

@afurculitaafurculitaSep 17, 2017
edited
Loading

Choose a reason for hiding this comment

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

I would also move this class from theProxy folder toHandler. What do you think,@nicolas-grekas ?

Choose a reason for hiding this comment

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

That would need deprecating this class in favor of the new one, and allow triggering a deprecation in AbstractProxy also. LGTM.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think theSessionHandlerProxy can be deprecated as well. When we only support\SessionHandlerInterface anyway, the proxy does not provide any value anymore AFAIK. I was meant as a way to make\SessionHandlerInterface and others behave the same.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I was thinking the same. The extra methods thatSessionHandlerProxy is having can easily be moved toNativeSessionStorage as they are relevant only for a native session storage.

Copy link
Contributor

@sstoksstok left a comment

Choose a reason for hiding this comment

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

Some minor comments on the changelog, but it seems the HttpFoundation also has this rather strange commentary usage.

`TranslationDebugCommand`, `TranslationUpdateCommand`, `XliffLintCommand`
and `YamlLintCommand` classes have been marked as final

HttpKernel
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing capital in the sentence (see other lines in this file).

And each line is separated by a single white line.

* the `Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy::isWrapper()`
method has been deprecated and will be removed in 4.0. You can check explicitly if the proxy wraps
a `\SessionHandler` instance.
* `NativeSessionStorage::setSaveHandler()` now takes an instance of `\SessionHandlerInterface` as argument.
Copy link
Contributor

Choose a reason for hiding this comment

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

Duplicate header (wrong rebase?)


* `AssetsInstallCommand`, `CacheClearCommand`, `CachePoolClearCommand`,
`EventDispatcherDebugCommand`, `RouterDebugCommand`, `RouterMatchCommand`,
`TranslationDebugCommand`, `TranslationUpdateCommand`, `XliffLintCommand`
Copy link
Member

Choose a reason for hiding this comment

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

This header should beHttpFoundation

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed

@afurculitaafurculitaforce-pushed the3.4 branch 2 times, most recently from845d5a6 tof275707CompareSeptember 18, 2017 10:31
@afurculita
Copy link
ContributorAuthor

Comments addressed :)

and `YamlLintCommand` classes have been marked as final

HttpFoundation
----------

Choose a reason for hiding this comment

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

wrong number of dashes :)

@xabbuh
Copy link
Member

Please also update theUPGRADE-4.0.md file.

@afurculitaafurculitaforce-pushed the3.4 branch 2 times, most recently from415ddf0 to46c0740CompareSeptember 24, 2017 19:33
@afurculita
Copy link
ContributorAuthor

Ready for review. I've also deprecatedSessionHandlerProxy

Alexandru Furculitaand others added2 commitsSeptember 24, 2017 22:38
Signed-off-by: Alexandru Furculita <alex@furculita.net>
Signed-off-by: Alexandru Furculita <alex@furculita.net>
$storage =$this->getStorage();
$storage->setSaveHandler();
$this->assertInstanceOf('Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy',$storage->getSaveHandler());
$this->assertInstanceOf(SessionHandlerProxy::class,$storage->getSaveHandler());
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't change that to avoid conflicts unless the line needs to be touched anyway. so this should be reverted.

*
* @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler
* @param MetadataBag $metaBag MetadataBag
* @param AbstractProxy|\SessionHandlerInterface|null $handler
Copy link
Contributor

Choose a reason for hiding this comment

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

Argument types that are deprecated should be removed from the doc

* @param AbstractProxy|NativeSessionHandler|\SessionHandlerInterface|null $handler
* @param MetadataBag$metaBag MetadataBag
* @param array $options Session configuration options
* @param AbstractProxy|\SessionHandlerInterface|null $handler
Copy link
Contributor

Choose a reason for hiding this comment

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

same, AbstractProxy should not be documented anymore

@nicolas-grekas
Copy link
Member

@Tobion OK for you? Can I let you merge if yes?

@Tobion
Copy link
Contributor

Thank you@afurculita.

Tobion added a commit that referenced this pull requestSep 26, 2017
… sessions (afurculita)This PR was squashed before being merged into the 3.4 branch (closes#24239).Discussion----------[HttpFoundation] Deprecate compatibility with PHP <5.4 sessions| Q             | A| ------------- | ---| Branch?       | 3.4| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -This PR removes functionality added in Symfony 2.1 as a compatibility layer with sessions from PHP <5.4.- [x] Fix testsCommits-------3deb394 [HttpFoundation] Deprecate compatibility with PHP <5.4 sessions
@TobionTobion closed thisSep 26, 2017
@afurculitaafurculita deleted the 3.4 branchSeptember 26, 2017 12:26
@afurculitaafurculita restored the 3.4 branchSeptember 26, 2017 12:26
@Tobion
Copy link
Contributor

@afurculita could you work on a PR against master to remove the deprecated stuff? Would be much appreciated.

@afurculita
Copy link
ContributorAuthor

@Tobion already started it ;)

fabpot added a commit that referenced this pull requestSep 27, 2017
…5.4 sessions (afurculita)This PR was merged into the 4.0-dev branch.Discussion----------[HttpFoundation] Removed compatibility layer for PHP <5.4 sessions| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?  | yes| Deprecations? | no| Tests pass?   | yes| Fixed tickets | -| License       | MIT| Doc PR        | -This is a follow-up of#24239. This PR removes the compatibility layer added for sessions for PHP <5.4.Commits-------37d1a21 Removed compatibility layer for PHP <5.4 sessions
This was referencedOct 18, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof requested changes

+3 more reviewers

@TaluuTaluuTaluu left review comments

@TobionTobionTobion left review comments

@sstoksstoksstok left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

8 participants

@afurculita@xabbuh@nicolas-grekas@Tobion@Taluu@stof@sstok@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp