Skip to content

Conversation

@alongosz
Copy link
Member

@alongosz alongosz commented Feb 18, 2025

🎫 Issue IBX-9587

Related PRs:

Description:

This is a follow-up to Symfony 6 upgrade (#138). Fixing issues that surfaced via the functional tests after merging full-stack app.

Issue 1: OPTIONS requests single-colon controller reference

OPTIONS requests controller mapper used obsolete single-colon controller reference that stopped working in Symfony 6.

Issue 2: Obsolete single-colon refresh session controller reference

SessionController::refreshSessionAction controller used obsolete single-colon reference as well.

Test & code quality issues
  • LocationTest created suffix using mismatched case in one place testCreatelocation instead of testCreateLocation which made tests fail on PostgreSQL instance (not visible in tests, noticed by accident). In short: it created testCreateLocation* remote ID but queried for testCreatelocation* remote ID, which doesn't work on case-sensitive PostgreSQL.
  • Made BookmarkTest testDeleteBookmarkReturnNotFound and testIsBookmarkedReturnsNotFound not rely on hard-coded pre-defined database ID, as it's quite volatile. Some other tests at some point make this Location bookmarked and thus running the same test without resetting the database is impossible. Instead I made these tests dependent on testDeleteBookmark to check it against just deleted bookmark.
  • Improved BookmarkTest code quality.

For QA:

Requires REST client.

Ad Issue 1. OPTIONS request
  1. Try executing OPTIONS REST request on any REST route, e.g. a Root one /api/ibexa/v2/
  2. Observe an error
Ad Issue 2. Session Refresh
  1. Create a new session using POST /api/ibexa/v2/user/sessions with a proper payload and copy created session ID
  2. Try executing POST /api/ibexa/v2/user/sessions/<your_session_identifier>/refresh
  3. Observe a fatal error

@alongosz alongosz changed the title ibx-9587-fix-rest-after-sf6-upgrade IBX-9587: Fixed failing REST requests after Symfony 6 upgrade Feb 18, 2025
@sonarqubecloud
Copy link

@alongosz alongosz marked this pull request as ready for review February 18, 2025 13:24
@alongosz alongosz requested a review from a team February 18, 2025 13:31
@konradoboza konradoboza requested a review from a team February 18, 2025 13:32
@adamwojs adamwojs merged commit f2b929d into main Feb 18, 2025
14 checks passed
@adamwojs adamwojs deleted the ibx-9587-fix-rest-after-sf6-upgrade branch February 18, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants