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 PHP 7.4 support #22

Merged
merged 7 commits into from
Apr 27, 2023
Merged

Conversation

jonassiewertsen
Copy link
Contributor

I added PHP 7.4 support to Shiki, so tiptap-php does work with PHP 7.4 as well

https://github.com/spatie/shiki-php/releases/tag/1.3.0

@jonassiewertsen
Copy link
Contributor Author

Somehow PHP 7.4 is breaking the "Tests\DOMParser\TaskListTest"
https://github.com/spiegeltechlab/tiptap-php/runs/6688689946?check_suite_focus=true

@martindines
Copy link
Contributor

martindines commented Aug 30, 2022

Hi @jonassiewertsen

This fails because the sort behaviour for equal values changed in PHP 8 - see Stable Sorting RFC.

In PHP 7, the sort applied to extensions places the ListItem class before the TaskItem class, which the DOMParser relies on when determining which Node class to use.

An option could be to implement a stable sorting algorithm but that would come with a performance hit. I think a better solution would be to simply apply the priority property to the TaskItem and TaskList classes, to ensure they take priority over the ListItem and BulletList classes, and to update the documentation accordingly

Martin

@jonassiewertsen
Copy link
Contributor Author

Thanks for digging into this @martindines. I simply did not see your PR or message before.

The Unit Tests are looking good now:
https://github.com/spiegeltechlab/tiptap-php/actions/runs/3235745959

@timoisik timoisik merged commit 3d1ddac into ueberdosis:main Apr 27, 2023
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.

None yet

3 participants