Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixing tests #135

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

Merged
Merged

Conversation

@nilportugues
Copy link
Owner

@nilportugues nilportugues commented Jun 4, 2025

No description provided.

... done so far and provide feedback for Jules to continue.
This commit addresses several issues related to column alias generation:
1. **Standardized `SyntaxFactory::createColumn` behavior:**
 The `createColumn` method in `src/Syntax/SyntaxFactory.php` now consistently creates an alias if a string key is provided in the column definition array (e.g., `['my_alias' => 'column_name']`). This applies even if the alias string is the same as the column name. This change resolved multiple test failures where such aliases were expected but not generated by the previous, more restrictive logic.
2. **Fixed subquery alias derivation in `ColumnWriter`:**
 The `selectColumnToQuery` method in `src/Builder/Syntax/ColumnWriter.php` was updated to correctly handle subqueries (Select objects) passed with numeric keys.
 - Resolved a fatal error caused by an incorrect call to `Select::getFrom()`; it now correctly uses `Select::getTable()` to access the subquery's main table.
 - Implemented logic to derive the column alias from the subquery's main table's alias or name, if available. This fixed critical test failures where aliases like `AS "role"` were missing for subqueries.
These changes have significantly reduced the number of failing tests and resolved critical errors, paving the way for addressing the remaining specific test cases.
... done so far and provide feedback for Jules to continue.
@nilportugues nilportugues merged commit 0717100 into php81-upgrade-strict-types Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /