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

[Bridges][Bundles] Convert to native return types #50846

Merged
merged 1 commit into from Jul 3, 2023

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Jul 2, 2023

Q A
Branch? 7.0
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

The first batch of many. This is I think the easiest one: bundles and bridges contain classes that almost never get extended by third party packages. As such, I've converted all types (including void) to native ones.

For the components, we should probably split up non-void types (easy merges) and void types (need close reviews).

@wouterj
Copy link
Member Author

wouterj commented Jul 2, 2023

For reference, commands to automate 90% of these changes:

# convert types
sed -i 's/ *"\*\*\/Tests\/"//' composer.json
composer u -o
SYMFONY_PATCH_TYPE_DECLARATIONS='force=2&php=8.2' php .github/patch-types.php
git checkout composer.json

# cleanup
git diff-tree --no-commit-id --name-only HEAD -r | xargs -L1 ./tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --rules phpdoc_trim_consecutive_blank_line_separation,no_superfluous_phpdoc_tags,ordered_imports,no_empty_phpdoc,no_whitespace_in_blank_line,no_extra_blank_lines,phpdoc_trim_consecutive_blank_line_separation
git diff-tree --no-commit-id --name-only HEAD -r | xargs -L1 sed -i ':a;N;$!ba;s/{\n\n/{\n/'

@nicolas-grekas
Copy link
Member

Thank you @wouterj.

@nicolas-grekas nicolas-grekas merged commit 06adee2 into symfony:7.0 Jul 3, 2023
3 of 9 checks passed
@wouterj wouterj deleted the convert-to-native-types branch July 3, 2023 13:10
@fabpot fabpot mentioned this pull request Oct 21, 2023
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.

None yet

3 participants