Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-570: Fixed dependency on session storage services #41

Merged
merged 3 commits into from
Jul 5, 2021

Conversation

Steveb-p
Copy link
Contributor

Question Answer
JIRA issue IBX-570
Bug yes
New feature no
Target version 2.3
BC breaks no
Tests pass yes
Doc needed no

Follow up for #40.

This PR removes the dependency on session.storage.native and session.storage.php_bridge service definitions.

Specifically, those two services do not exist in the test environment for Symfony framework (instead possibly being replaced with their mock variants (see https://symfony.com/doc/current/components/http_foundation/session_testing.html, or not used at all - when SecurityBundle is not loaded).

See https://github.com/ibexa/product-catalog/runs/2930845606?check_suite_focus=true and https://github.com/ibexa/product-catalog/runs/2929836113?check_suite_focus=true for test failures.

Blocks product catalog tests.

TODO:

  • Implement feature / fix a bug.
  • Implement tests.
  • Fix new code according to Coding Standards ($ composer fix-cs).
  • Ask for Code Review.

@Steveb-p Steveb-p changed the title Fixed dependency on session storage services IBX-570: Fixed dependency on session storage services Jun 28, 2021
@Steveb-p Steveb-p requested review from webhdx, a team, adamwojs and mikadamczyk June 28, 2021 11:02
$this->assertContainerBuilderHasParameter('session.save_path', 'my_save_path');

$this->assertContainerBuilderNotHasService('session.storage.native');
$this->assertContainerBuilderNotHasService('session.storage.php_bridge');
Copy link
Contributor Author

@Steveb-p Steveb-p Jun 28, 2021

Choose a reason for hiding this comment

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

Note for reviewers: technically we might not care if those services are present, so those two assertions could be removed.

👍 / 👎 ?

Copy link
Member

Choose a reason for hiding this comment

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

Note for reviewers: technically we might not care if those services are present, so those two assertions could be removed.

/ ?

No strong feelings. Could stay to protect against merge-up mistakes, but maybe this is not that important.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be honest after some thought I think this should be moved before the test. The most important thing is that the compiler pass does not crash the app if the session services are not there, so what we want to have is confirmation that their absence is handled.

@Steveb-p
Copy link
Contributor Author

Superseded by #42 (checks service defininition presence similarly to this PR)

@Steveb-p Steveb-p closed this Jun 29, 2021
@Steveb-p Steveb-p reopened this Jul 2, 2021
$this->assertContainerBuilderHasParameter('session.save_path', 'my_save_path');

$this->assertContainerBuilderNotHasService('session.storage.native');
$this->assertContainerBuilderNotHasService('session.storage.php_bridge');
Copy link
Member

Choose a reason for hiding this comment

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

Note for reviewers: technically we might not care if those services are present, so those two assertions could be removed.

/ ?

No strong feelings. Could stay to protect against merge-up mistakes, but maybe this is not that important.

@sonarcloud
Copy link

sonarcloud bot commented Jul 5, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 6 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@Steveb-p Steveb-p changed the base branch from master to 2.3 July 5, 2021 08:20
@Steveb-p Steveb-p merged commit 92df581 into 2.3 Jul 5, 2021
@Steveb-p Steveb-p deleted the fix-session-storage branch July 5, 2021 10:06
@Steveb-p
Copy link
Contributor Author

Steveb-p commented Jul 5, 2021

Merged into master in d8d0fe6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants