Skip to content

Conversation

@javiereguiluz
Copy link
Member

Q A
Doc fix? yes
New docs? no
Applies to all
Fixed tickets #5844

I'm not sure if this is what @xabbuh was talking about in the related issue.

@javiereguiluz
Copy link
Member Author

Could I get a review for these changes? Thanks!

and decrypt the session as required::

// src/AppBundle/Session/EncryptedSessionProxy.php
namespace AppBundle/Session;
Copy link
Contributor

Choose a reason for hiding this comment

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

Namespaces use backslashes \

Copy link
Member Author

Choose a reason for hiding this comment

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

😱 Nice catch! Fixed. Thanks!

@HeahDude
Copy link
Contributor

I left some very minor comments but I like your changes 👍

use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference;
$container->setDefinition('app.session_handler', new Definition('AppBundle\Session\CustomSessionHandler'));
Copy link
Member

Choose a reason for hiding this comment

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

you can simply use register()

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm sorry but I don't understand this comment.

Copy link
Contributor

@ogizanagi ogizanagi Apr 18, 2016

Choose a reason for hiding this comment

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

@javiereguiluz :

- $container->setDefinition('app.session_handler', new Definition('AppBundle\Session\CustomSessionHandler')); + $container->register('app.session_handler', 'AppBundle\Session\CustomSessionHandler');

http://api.symfony.com/master/Symfony/Component/DependencyInjection/ContainerBuilder.html#method_register

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @ogizanagi! It's fixed now.

@javiereguiluz
Copy link
Member Author

I've fixed most of the issues reported by reviewers.

<!-- app/config/services.xml -->
<services>
<service id="app.session_handler" class="AppBundle\Session\CustomSessionHandler" />
</services>
Copy link
Member

Choose a reason for hiding this comment

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

I think we should use a complete XML example here and below.

Copy link
Member

Choose a reason for hiding this comment

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

So it should be:

<?xml version="1.0" encoding="UTF-8" ?> <container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services  http://symfony.com/schema/dic/services/services-1.0.xsd"> <services> <service id="app.session_handler" class="AppBundle\Session\CustomSessionHandler" /> </services> </container>
@xabbuh
Copy link
Member

xabbuh commented May 21, 2016

@javiereguiluz Apart from the XML config examples this looks ready to me.

@javiereguiluz
Copy link
Member Author

I've updated the examples to show the full XML config. Thanks!

@xabbuh
Copy link
Member

xabbuh commented May 21, 2016

👍

@xabbuh
Copy link
Member

xabbuh commented Jun 30, 2016

@wouterj
Copy link
Member

wouterj commented Jul 2, 2016

Thanks Javier, it looks great!

wouterj added a commit that referenced this pull request Jul 2, 2016
This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #5892). Discussion ---------- Updated the session proxy article | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | all | Fixed tickets | #5844 I'm not sure if this is what @xabbuh was talking about in the related issue. Commits ------- a09d1f2 Updated the session proxy article
@wouterj wouterj closed this Jul 2, 2016
@javiereguiluz javiereguiluz deleted the fix_5844 branch May 24, 2018 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

5 participants