Skip to content

Remove support for @prettier/plugin-php#152

Merged
thecrypticace merged 2 commits intomainfrom
fix/remove-plugin-php-support
Apr 28, 2023
Merged

Remove support for @prettier/plugin-php#152
thecrypticace merged 2 commits intomainfrom
fix/remove-plugin-php-support

Conversation

@thecrypticace
Copy link
Copy Markdown
Contributor

@thecrypticace thecrypticace commented Apr 28, 2023

Closes #149

The PHP prettier plugin doesn’t support working with inline HTML itself. We tried to get our prettier plugin to work by treating inline blocks as HTML and telling prettier to format them but this has introduced complications and results in errors in some files — especially those with mixed PHP inside HTML tags.

The correct way for this to work is for the PHP prettier plugin to introduce support for HTML itself and, if made to work with Prettier’s multi-language support, should theoretically run Tailwind’s prettier plugin to format classes automatically.

We were trying to be too clever here but ultimately fixing the problems would be the same as adding full HTML support to the PHP prettier plugin which is a significant undertaking and not something we're set to do.

@thecrypticace thecrypticace force-pushed the fix/remove-plugin-php-support branch from 75f16eb to f650759 Compare April 28, 2023 14:57
@thecrypticace thecrypticace merged commit dfc4f64 into main Apr 28, 2023
@thecrypticace thecrypticace deleted the fix/remove-plugin-php-support branch April 28, 2023 15:00
bronisMateusz pushed a commit to bronisMateusz/prettier-plugin-tailwindcss-drupal that referenced this pull request Apr 16, 2025
* Remove support for `@prettier/plugin-php`

* Update changelog
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.

Not working in combination with @prettier/plugin-php

1 participant