Comments (3)
Seeing the same issue with a fresh install of prettier and prettier-php here!
If I point npx prettier --check ./sites/templates
(templates being a directory that only contains PHP files) I'm getting a warning that the directory contains no files the could be checked with prettier.
This appears to be a new behavior since the prettier 3 upgrade. If I drop my version requirements in my package.json to the following the plugin behaves as intended.
{ "prettier": "^2.8.4", "@prettier/plugin-php": "^0.19.7", }
Halp? 🥺
from plugin-php.
The reason for this is most likely that you're either missing the PHP plugin, or you're not specifying that it should be used explicitly (the "plugin search" feature has been removed in Prettier v3, see #2215 for details).
from plugin-php.
Should have been fixed in Prettier core. https://prettier.io/blog/2023/11/13/3.1.0#process-files-only-supported-by-plugins-15433httpsgithubcomprettierprettierpull15433-by-sosukesuzukihttpsgithubcomsosukesuzuki
from plugin-php.
Related Issues (20)
- Unexpected syntax error with multi-level scope resolution HOT 1
- Dollar sign from variable name swallowed in double quoted Strings HOT 1
- Final class constants (aka. `final public const`) should stay final on PHP >= 8.1 HOT 2
- Recommended configuration for using plugin-blade together with plugin-php? HOT 3
- SyntaxError: Parse Error : syntax error, unexpected '::' (T_DOUBLE_COLON)
- Prettier 3 support HOT 16
- InvalidDocError on Laravel-generated `config/app.php` HOT 3
- Plugin detection issue with prettier v3 HOT 7
- Ignored unknown option: phpVersion, braceStyle HOT 2
- Backward compatibility for CommonJS
- Class and method braces with no body split onto multiple lines HOT 1
- Brackets vanish in Recursive IIFE
- Attributes removed since 0.19.2 if method argument has an attribute with attributes in them and arrays and some new lines
- Comments in attributes (e.g. for an array item) are weirdly moved to somewhere completely else
- Some comment positions inside attributes can result in prettier failing with an exception
- Docs: specify if prettier follow psr-12 or something else
- Syntax error when attributes are defined to enum cases
- PHP 8.3 support HOT 4
- [bug] singleQuote option from API call does not work on latest release
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-php.