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-9587: Fixed failing REST requests after Symfony 6 upgrade #145

Merged
merged 5 commits into from
Feb 18, 2025

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
@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