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

[GH-8313] Allow use of custom HTML-Tags in PHP #8315

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NReib
Copy link
Contributor

@NReib NReib commented Mar 11, 2025

  • register CustomHtmlExtension to x-php5 mimeType
  • UnknownAttribute hint used to be at wrong position in source when embedded in PHP

Example:
customs.json

{
	"elements": {
		"y-customdefined": {
			"attributes": {
				"exists": {}
			}
		}
	},
	"attributes": {"globaldefined": {}}
}

PHP script including custom tags, so far none of the tags defined in customs.json will be valid

<x-customnotdefined><?php echo 'test'; ?></x-customnotdefined>
<y-customdefined exists="" noexists=""><?php echo 'test'; ?></y-customdefined>
<y-customdefined exists=""></y-customdefined>
<y-customdefined globaldefined=""></y-customdefined>
<y-customdefined noexists=""><?php echo 'test'; ?></y-customdefined>

-register CustomHtmlExtension to x-php5 mimeType
-UnknownAttribute hint used to be at wrong position in source when
embedded in PHP

Example:
customs.json
```json
{
	"elements": {
		"y-customdefined": {
			"attributes": {
				"exists": {}
			}
		}
	},
	"attributes": {"globaldefined": {}}
}
```

PHP script including custom tags, so far none of the tags defined in customs.json will be valid
```php
<x-customnotdefined><?php echo 'test'; ?></x-customnotdefined>
<y-customdefined exists="" noexists=""><?php echo 'test'; ?></y-customdefined>
<y-customdefined exists=""></y-customdefined>
<y-customdefined globaldefined=""></y-customdefined>
<y-customdefined noexists=""><?php echo 'test'; ?></y-customdefined>

```
@mbien mbien added PHP [ci] enable extra PHP tests (php/php.editor) HTML [ci] enable web job labels Mar 11, 2025
@mbien mbien linked an issue Mar 11, 2025 that may be closed by this pull request
@matthiasblaesing matthiasblaesing added this to the NB26 milestone Mar 13, 2025
@matthiasblaesing
Copy link
Contributor

@NReib thank you for looking into this. The change looks sane to me and looks simple enough to merge without new tests. I manually verified the location by checking the demo document and checking the reported positions. While it is not perfect after this change, it is an improvement.

I cleared the tests for running, added this to the NB26 milestone, @mbien already took care for adding the necessary labels to let the right unittest suites run.

@mbien
Copy link
Member

mbien commented Mar 13, 2025

restarting the tests, since approving the test run will unfortunately not take the new labels into account.

@apache apache locked and limited conversation to collaborators Mar 13, 2025
@apache apache unlocked this conversation Mar 13, 2025
@matthiasblaesing
Copy link
Contributor

darn thanks @mbien

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

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

Looks sane to me. @NReib please indicate if it is ok to merge from your perspective.

@NReib
Copy link
Contributor Author

NReib commented Mar 13, 2025

@matthiasblaesing From what I saw so far it would be ok to merge. We will use this feature in the future at my work but probably after the next release. So maybe then I will gain more insights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HTML [ci] enable web job PHP [ci] enable extra PHP tests (php/php.editor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PHP] Allow use of custom HTML-Tags
3 participants