simonchrz

simonchrz

Member Since 9 years ago

Quentic GmbH, Berlin

0 organizations

Experience Points
10
follower
Lessons Completed
40
follow
Lessons Completed
246
stars
Best Reply Awards
13
repos

4 contributions in the last year

simonchrz Most Used Languages
simonchrz GitHub Stats

13 Pinned

⚡ The Markup Job Queue bundle integrates with RabbitMQ (via https://github.com/videlalvaro/RabbitMqBundle) to provide automatic scheduling of recurring console commands (i.e cron) and commands to help with deployment
⚡ The php WhatsApp library
⚡ Integrate the CMF Routing component as a Symfony2 bundle: Have the chain router and the dynamic router available in Symfony2
⚡ Media management bundle on steroid for Symfony2
⚡ A classification bundle to help organize your entities: tag, category and taxonomy
⚡ OpenID library for PHP5
Jun
18
5 days ago
Activity icon
issue

simonchrz issue comment symfony/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41669
License MIT

By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

simonchrz
simonchrz

@nicolas-grekas added a test and everything seems "green". :-)

There still exist issues with other components using traits that doesn't exist anymore... but i think we could ignore this concerning this PR ?

push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

commit sha: f8a082daebdd4e02e74eba0861dc6e160cdfc18c

push time in 5 days ago
push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

simonchrz
simonchrz

Merge remote-tracking branch 'origin/4.4' into 4.4

commit sha: 0fe4665fccd99182c887c5d64ea7055088b90797

push time in 5 days ago
push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

runTestsInSeparateProcesses to avoid issues with phpunit output

commit sha: b5491bb8c107d4178872eec927ff0fd8fcb10aeb

push time in 5 days ago
push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

test uses sys_get_temp_dir now

commit sha: 22c222c01b2872fecb3387a740216bc48c7b271b

push time in 5 days ago
push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

[HttpFoundation] added test for SessionHandlerFactory fixed file:// DSN case

commit sha: 47a339761391dda1082c1183fd252610df5c2426

push time in 5 days ago
Jun
17
6 days ago
push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

commit sha: 1e5042ff78d0028a048562b0a2e3c8cdcce3199b

push time in 5 days ago
push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

simonchrz
simonchrz

Merge remote-tracking branch 'origin/4.4' into 4.4

commit sha: 1511e35b98ce4ee57fadae9e125e9ea39cb70e24

push time in 5 days ago
Activity icon
issue

simonchrz issue comment symfony/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41669
License MIT

By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

simonchrz
simonchrz

Hi, thanks for the PR! Could you please add a test case and squash the commits?

sure, could you please give me a hint where i can find tests for Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory so i could simple extend them ?

haven't found them here... https://github.com/symfony/symfony/tree/4.4/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler

Jun
11
1 week ago
open pull request

simonchrz wants to merge symfony/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41669
License MIT

By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

simonchrz
simonchrz

true, thanks for eagle eye 😉

pull request

simonchrz merge to symfony/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41669
License MIT

By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

Update src/Symfony/Component/HttpFoundation/Session/Storage/Handler/SessionHandlerFactory.php

Co-authored-by: Denis Brumann dbrumann@gmail.com

commit sha: 9e9346b4e2f64a3724a435900468d85ed3cf5b1c

push time in 1 week ago
Activity icon
fork

simonchrz forked PHPOffice/PHPWord

⚡ A pure PHP library for reading and writing word processing documents
simonchrz Updated
fork time in 1 week ago
pull request

simonchrz pull request symfony/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #41669
License MIT

By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

push

simonchrz push simonchrz/symfony

simonchrz
simonchrz

[HttpFoundation] allow savePath of NativeFileSessionHandler to be null

commit sha: 1996f55978f49cabd31d43233a2f0f4b231ae18d

push time in 1 week ago
Activity icon
fork

simonchrz forked symfony/symfony

⚡ The Symfony PHP framework
simonchrz MIT License Updated
fork time in 1 week ago
Activity icon
issue

simonchrz issue symfony/symfony

simonchrz
simonchrz

[HttpFoundation] SessionHandlerFactory doesn't support session.save_path setting of php.ini on NativeFileSessionHandler

Symfony version(s) affected: >=4.4

Description By introducing the great Symfony\Component\HttpFoundation\Session\Storage\Handler\SessionHandlerFactory it is possible to configure session handler via DSN. But if I want to use the NativeFileSessionHandler to use configured session.save_path of php.ini, it doesn't work as expected because the $savePath constructor param is an empty string (and not NULL) by using "file://" as DSN.

How to reproduce SessionHandlerFactory::createHandler('file://');

$savePath will be an empty string https://github.com/symfony/symfony/blob/4.4/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php#L33

Possible Solution

something like

$savePath = substr('file:///', 7);
return new StrictSessionHandler(new NativeFileSessionHandler($savePath === '' ? null: $savePath));

instead of

return new StrictSessionHandler(new NativeFileSessionHandler(substr($connection, 7)));

Additional context

May
19
1 month ago
started
started time in 1 month ago
Apr
14
2 months ago
started
started time in 2 months ago