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

Add redirect for reserved keywords #804

Closed
wants to merge 1 commit into from
Closed

Conversation

fredden
Copy link
Contributor

@fredden fredden commented Aug 21, 2023

When browsing to https://php.net/yield recently, I was surprised to see a message saying that "yield doesn't exist". The yield keyword does exist, but doesn't have a dedicated page so hasn't been indexed. This pull request adds a special case for this keyword so that it can be found by users.

I've also looked into how to get all keywords declared automatically. The best I can come up with today (without significant changes to how the search / look-up process works) is over on the 'systems' repository: php/systems#19

Update: I've now gone through all the reserved words listed on https://php.net/reserved and added these to this pull request.

@fredden fredden changed the title Add redirect for yield keyword Add redirect for reserved keywords Aug 21, 2023
'use' => 'language.namespaces.php',
'void' => 'language.types.void.php',
'xor' => 'language.operators.logical.php',
'yield from' => 'language.generators.syntax.php#control-structures.yield.from',
Copy link
Contributor

Choose a reason for hiding this comment

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

Are spaces allowed in this context?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

derickr added a commit that referenced this pull request Nov 29, 2023
@derickr
Copy link
Member

derickr commented Nov 29, 2023

Merged after a rebase, thanks!

@derickr derickr closed this Nov 29, 2023
@fredden fredden deleted the yield branch November 30, 2023 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants