Prettier PHP Plugin

Last update: Jul 30, 2022
Prettier PHP

Prettier PHP Plugin

GitHub Workflow Status npm version Codecov Coverage Status code style: prettier Gitter Follow+Prettier+on+Twitter

Intro

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary.

This plugin adds support for the PHP language to Prettier.

Can this be used in production?

We're considering the plugin to be stable when pure PHP files are formatted. Formatting of files that contain mixed PHP and HTML is still considered unstable - please see open issues with the tag "inline" for details.

If you want to use the plugin in production, we recommend limiting its scope to pure PHP files.

Input

<?php
array_map(function($arg1,$arg2) use ( $var1, $var2 ) {
    return $arg1+$arg2/($var+$var2);
}, array("complex"=>"code","with"=>
    function() {return "inconsistent";}
,"formatting"=>"is", "hard" => "to", "maintain"=>true));

Output

<?php

array_map(
    function ($arg1, $arg2) use ($var1, $var2) {
        return $arg1 + $arg2 / ($var + $var2);
    },
    [
        "complex" => "code",
        "with" => function () {
            return "inconsistent";
        },
        "formatting" => "is",
        "hard" => "to",
        "maintain" => true,
    ]
);

Playground

You can give the plugin a try in our playground!

Install

yarn:

yarn add --dev prettier @prettier/plugin-php
# or globally
yarn global add prettier @prettier/plugin-php

npm:

npm install --save-dev prettier @prettier/plugin-php
# or globally
npm install --global prettier @prettier/plugin-php

Use

With Node.js

If you installed prettier as a local dependency, you can add prettier as a script in your package.json,

{
  "scripts": {
    "prettier": "prettier"
  }
}

and then run it via

yarn run prettier path/to/file.php --write
# or
npm run prettier -- path/to/file.php --write

If you installed globally, run

prettier path/to/file.php --write

In the Browser

This package exposes a standalone.js that can be used alongside Prettier's own standalone.js to make the PHP plugin work in browsers without a compile step.

First, grab both standalone scripts from an npm CDN like unpkg:

<script src="https://unpkg.com/prettier/standalone.js"></script>
<script src="https://unpkg.com/@prettier/plugin-php/standalone.js"></script>

Then use Prettier with PHP, just like this:

prettier.format(YOUR_CODE, {
  plugins: prettierPlugins,
  parser: "php"
});

See this code in action in this basic demo.

With Bundlers

Bundlers like webpack, Rollup or browserify automatically recognize how to handle the PHP plugin. Remember that even when using a bundler, you still have to use the standalone builds:

import prettier from "prettier/standalone";
import phpPlugin from "@prettier/plugin-php/standalone";

prettier.format(YOUR_CODE, {
  plugins: [phpPlugin],
  parser: "php"
});

Configuration

Prettier for PHP supports the following options. We recommend that all users set the phpVersion option.

Name Default Description
phpVersion "5.4" Allows specifying the PHP version you're using. If you're using PHP 7.1 or later, setting this option will make use of modern language features in the printed output. If you're using PHP 5.3 or lower, you'll have to set this option or Prettier will generate incompatible code.
printWidth 80 Same as in Prettier (see prettier docs)
tabWidth 4 Same as in Prettier (see prettier docs)
useTabs false Same as in Prettier (see prettier docs)
singleQuote false If set to "true", strings that use double quotes but do not rely on the features they add, will be reformatted. Example: "foo" -> 'foo', "foo $bar" -> "foo $bar".
trailingCommaPHP true If set to true, trailing commas will be added wherever possible.
If set to false, no trailing commas are printed.
braceStyle "psr-2" If set to "psr-2", prettier will move open brace for code blocks (classes, functions and methods) onto new line.
If set to "1tbs", prettier will move open brace for code blocks (classes, functions and methods) onto same line.
requirePragma false Same as in Prettier (see prettier docs)
insertPragma false Same as in Prettier (see prettier docs)

Ignoring code

A comment // prettier-ignore will exclude the next node in the abstract syntax tree from formatting.

For example:

matrix(
  1, 0, 0,
  0, 1, 0,
  0, 0, 1
);

// prettier-ignore
matrix(
  1, 0, 0,
  0, 1, 0,
  0, 0, 1
);

will be transformed to

matrix(1, 0, 0, 0, 1, 0, 0, 0, 1);

// prettier-ignore
matrix(
  1, 0, 0,
  0, 1, 0,
  0, 0, 1
)

Editor integration

Atom

The official prettier plugin for atom supports plugins.

VScode

The official prettier plugin for vscode supports plugins since Version 1.10.0. To enable it, install the extension and make sure the plugin is installed locally (in your project folder). After restarting VScode the plugin should work as expected.

PhpStorm / IntelliJ / Jetbrains IDE

  • Install prettier and plugin locally yarn add -D prettier @prettier/plugin-php
  • Open Settings (File, Settings)
  • Go to Plugins Section, Select Marketplace, Search for Prettier, Install Plugin, Restart IDE
  • Open Settings, Search for Prettier, select Prettier in left settings navigation
  • Check prettier package has auto-detected, should be something like myproject/node_modules/prettier
  • Update Run for Files to include .php, eg: {**/*,*}.{js,ts,jsx,tsx,php,json,scss,vue,md}
  • Tick the On Save button, if you want your files formatting updated on file save
  • Clock OK to save settings

Note: Just pressing save does not reformat your current file unless the file has been modified in some way, alternatively you can use the Prettier shortcut Ctrl+Alt+Shift+P

Sublime Text

Sublime Text support is available through Package Control and the JsPrettier plugin.

Vim

Regarding plugin support in the official plugin vim-prettier see this issue.

ALE

The linting plugin ALE has built-in support for prettier and its plugins. Just add prettier to your list of fixers. For example:

let g:ale_fixers={
  \'javascript': ['prettier'],
  \'json': ['prettier'],
  \'php': ['prettier'],
\}

Custom

Alternatively, adding the following to .vimrc will define a custom command :PrettierPhp that runs the plugin while preserving the cursor position and run it on save.

" Prettier for PHP
function PrettierPhpCursor()
  let save_pos = getpos(".")
  %! prettier --stdin --parser=php
  call setpos('.', save_pos)
endfunction
" define custom command
command PrettierPhp call PrettierPhpCursor()
" format on save
autocmd BufwritePre *.php PrettierPhp

Integration for other tools

PHP-CS-Fixer

See docs/recipes/php-cs-fixer for integration help, code can also be found in https://gist.github.com/Billz95/9d5fad3af728b88540fa831b73261733

Contributing

If you're interested in contributing to the development of Prettier for PHP, you can follow the CONTRIBUTING guide from Prettier, as it all applies to this repository too.

To test it out on a PHP file:

  • Clone this repository.
  • Run yarn.
  • Create a file called test.php.
  • Run yarn prettier test.php to check the output.

Maintainers


Christian Zosel

Evilebot Tnawi

GitHub

https://github.com/prettier/plugin-php
Comments
  • 1. Option for opening brace

    1st off I want to be clear - I think the default should still be to follow PSR2-like formatting standards

    With that in mind, from my own experience and now starting to look through other open-source php projects, it seems like one of the biggest differences in formatting standards is putting the opening brace for functions, classes, etc on a new line vs same line. I'm a little worried that not having this option might scare people off from using prettier/plugin-php.

    I was thinking of starting to work on a PR for adding an option to do this (defaulting to the PSR2 format of putting it on a new line), but wanted to open for discussion first.

    openingBraceNewLine = true (default)
    
    class Test
    {
      public function testMethod()
      {
      }
    }
    
    function testFunction()
    {
    }
    
    openingBraceNewLine = false
    
    
    class Test {
      public function testMethod() {
      }
    }
    
    function testFunction() {
    }
    
    Reviewed by mgrip at 2018-02-22 16:45
  • 2. Tracking Issue: PHP 8 Support

    Released with v0.17.0:

    • [x] nullsafepropertylookup
    • [x] named arguments
    • [x] match expression
    • [x] union types
    • [x] promoted properties

    Released with v0.17.4:

    • [x] attributes

    8.1 Support:

    • [x] enum:
    enum Suit {
        case Clubs;
        case Diamonds;
        case Hearts;
        case Spades;
    }
    
    • [x] readonly class parameters
    class ImutableData {
        public function __construct(
            public readonly string $key,
        ) {}
    }
    
    • [x] first class callable syntax - eg array_filter($in, trim(...));
    • [x] Intersection Types in function parameters:
    function generateSlug(HasTitle&HasId $post) {
        return strtolower($post->getTitle()) . $post->getId();
    }
    
    Reviewed by czosel at 2021-04-03 15:08
  • 3. Add build step for standalone version, resolves #842

    This pull request resolves #842, adding a standalone build to the Prettier PHP plugin.

    Build

    The standalone.js in the root of the package is generated through running:

    yarn run build-standalone
    

    Usage

    The standalone.js is "standalone" in the sense that it is bundled into one file with no Node.js-specific dependencies left. It does however not include Prettier itself. Prettier's standalone version has to be included on its own first (order matters):

    <script src="https://unpkg.com/prettier/standalone.js"></script>
    <script src="https://unpkg.com/@prettier/plugin-php/standalone.js"></script> <!-- does not exist yet -->
    

    The plugin registers as a global variable named prettier_pluginPhp. Using Prettier with it look like this:

    prettier.format(YOUR_CODE, {
      plugins: [prettier_pluginPhp],
      parser: ["php"]
    });
    

    Here's a demo.

    Transformations

    Things I instructed Rollup to do:

    • Mark the prettier module as external, so essentially all require("prettier") are replaced with the prettier global variable.
    • Add a shim for Node's assert module. I'm not sure why the strictEqual method should do nothing, but that's how it's done in Prettier.
    • Add a shim for Buffer.isBuffer() (used by the php-parser dependency).
    • Set process.arch to x32 (relevant for maximum float size).

    ToDo

    • [x] Write tests
    • [x] Add documentation to readme

    Considerations

    • [x] Name of the global? prettier_pluginPhp is not that catchy, suggestions are welcome.

      ✅ Resolved: Like Prettier's built-in plugins, the plugin is registered on the global prettierPlugins object as prettierPlugins.php.

    • [x] Minify? Prettier doesn't do it, therefore this pull request currently doesn't either.

      ✅ Resolved: Prettier does actually apply minification, not to their standalone.js, but to each of their plugins. This PR matches this behavior and minifies the standalone plugin.

    • [x] Add the generated standalone.js to the repo? Prettier does so.

      ❌ Rejected: I was wrong, Prettier actually does not.

    • [x] Is it reasonable to hardcode process.arch to x32? Doing a quick search, I found no way to detect a machine's architecture with browser-side JS with a reasonable amount of confidence. x32 should be a safe bet.

    • [x] Add documentation about how to use this plugin in bundlers? The standalone.js is not really suited for usage with bundlers. To avoid confusion, an additional section about using bundlers in the readme (i.e. "rewrite all prettier calls to prettier/standalone") could be reasonable.

      ✅ Resolved: No weird tips for bundler usage needed as this PR now also includes a pretty fool-proof way to integrate with bundlers.

    Reviewed by loilo at 2019-02-06 00:56
  • 4. Alpha release?

    https://github.com/prettier/plugin-php/issues/174#issuecomment-371190371

    Wanted to start a discussion on where people think the quality of this plugin is currently, and plans for rolling out more widely.

    For myself I've been running --debug-check on a codebase of ~1000 php files, and as of this morning am not getting any breaking errors 🎉

    Do people think its time to start publishing this as an alpha/beta release to encourage more people to start using and finding edge cases? I'm guessing that would mostly just entail bumping our package version to 0.1.0 and updating our README.md + documentation

    Reviewed by mgrip at 2018-03-08 17:54
  • 5. Proper support for flexible heredoc/nowdoc syntax

    Currently, the new flexible heredoc/nowdoc syntax is "destroyed" during formatting:

    $php73FlexibleNowdoc = <<<'EOD'
          Example of string
          spanning multiple lines
          using nowdoc syntax.
          EOD;
    

    is printed as

    $php73FlexibleNowdoc = <<<'EOD'
    Example of string
    spanning multiple lines
    using nowdoc syntax.
    turns into
    
    EOD;
    

    Also, there seems to be an extra linebreak before the end.

    Concerning expected behavior, I'd propose to leave the indentation the same way we find it. Thoughts?

    cc @evilebottnawi @loilo

    Reviewed by czosel at 2020-01-03 20:09
  • 6. Convert double quotes to single quotes

    ...if the string is "simple", i.e. doesn't use any features that require double quotes:

    • embedded variables
    • linebreaks
    • special characters like \n, \t, ", ', ... See http://php.net/manual/en/language.types.string.php#language.types.string.syntax.double

    Fixes #633

    Reviewed by czosel at 2018-09-14 17:32
  • 7. Strategy on adding new options

    I think we should discuss the general procedure on how we handle the wish to add new options.

    I started writing this as a comment to #118, but I'd like to discuss the "big picture" in a separate issue instead.

    To me, #118 is a nice example to prove @evilebottnawi 's point in the discussion about opening braces (#107, #108):

    I'm not against the option or not specifically this option, the only problem is that adding one option other will want more options, and each will complicate the maintenance of the project and deliver only problems

    In this case, I'd advise against introducing a new option, because the number of options we'd have to support if we allow configuration of "this type of" styling decision. Thinking about it from this standpoint, I'd even support your wish to revert the option we introduced about curly braces and add it back in when we've released a first stable version and the tool has been in use for a while - because then we have an actual community of user that will keep asking for specific options. I'd also like to cite two comments by @vjeux which might offer guidance:

    For prettier, I used a combination of my experience writing JavaScript for 10+ years, grepping through the millions of lines of the Facebook codebase to see which style was more popular, reading through various coding styles (eg Airbnb) and what are all the related eslint configs and finally feedback from people complaining that some pattern looked bad. My guiding principle was for the code generated by prettier to pass code review as if it was written by a human. I also tried to make all the decisions be as less controversial as possible.

    Also, one thing that really helped is to have someone to make the final decision. This way all the discussions could happen and were useful input but at the end of the day, only the things I wanted would go through. I found that there are a handful of useful tactics to manage those discussions:

    • Ask for specific snippets of code and try to find solutions for those. So many times people argue about very general things but in practice there are concrete fixes you can do for their use case.
    • Explicitly say that you're not going to make a decision right now on certain issues. One thing that people pick up quickly is to engage in places where the people involve the project are responding. Then once in a while you can sort issues by upvote/comments and figure out what are the most painful things and do a deep dive.
    • Avoid style trashing. Ideally, you should think deeply about each important style decision you are making and once you do it, actually commit to it. This way you can "close" the issue and whenever this subject comes up in the future say that you have reached a decision and are not looking to spend time thinking about it for now. This way you can focus on the things that still need to be fixed rather than going through the same discussions over an over again wasting everyone's time. This is hard to do in practice but if you can pull it off, it'll help a lot.

    (See https://github.com/prettier/plugin-php/issues/59#issuecomment-366744779)

    I'm gonna make a suggestion on how i could imagine we handle things, just to keep this issue actionable:

    • Until our first release, we don't add any custom options and remain PSR-2 compatible.

    After that:

    • We only consider a new option if there is a considerable amount of requests to add it
    • If necessary, we put the decision up to a vote after a short "cool-down" period

    That would also mean that we don't open anything that involves adding options for votes just yet. Of course we can (and should) vote on difficult stylistic decisions that go into the first version.

    What do you think?

    /cc @mgrip

    Reviewed by czosel at 2018-02-23 15:22
  • 8. Behavior change: Add trailing commas to array items

    I propose a behavior change to array formatting: Prettier should add a trailing comma to the last item in a multi-line array.

    Trailing commas are beneficial in that they make editing easier and make diffs smaller. But more importantly, the coding standards for several significant PHP projects (e.g. Drupal, Symfony and WordPress) require/recommend trailing commas.

    PSR-2 doesn’t address this topic, so I think changing this behavior to match common practice is consistent with Prettier’s goals.

    Current behavior:

    $array = [
        'item-in-array-example-1',
        'item-in-array-example-2',
        'item-in-array-example-3'
    ];
    

    Desired behavior:

    $array = [
        'item-in-array-example-1',
        'item-in-array-example-2',
        'item-in-array-example-3',
    ];
    

    I hope this is easy to implement since the main Prettier project already has a config option for trailing comma.

    For reference, these project coding standards all recommend trailing commas:

    Reviewed by gouch at 2018-07-25 21:55
  • 9. If plain html code is provided, empty lines are added

    I have alot of php files that contain pure html code.

    Prettier PHP takes those files and adds plain empty html lines between every line.

    Before:

    <section class="[ c-social-foot ]  [ has-text-centered ]">
      <div class="[ container  is-fluid ]">
        <div class="[ columns  is-centered ]">
          <div class="[ column ]">
    

    After

    <section class="[ c-social-foot ]  [ has-text-centered ]">
    
      <div class="[ container  is-fluid ]">
    
        <div class="[ columns  is-centered ]">
    
          <div class="[ column ]">
    

    This is very odd, it should remain as it was.

    Reviewed by vielhuber at 2018-09-23 22:59
  • 10. Force array/list shorthand notation

    Force the use of shorthand array's, (available since php 5.4)

    Reasoning:

    The old syntax looks like a method call, not like an array. The new syntax is shorter and improves readability as it looks like an array.

    Other issues regarding array's use the shorthand notation in their example code, indicating a preference towards shorthand.

    Input:

    $my_array = array(1, 2, 3);
    

    Desired output:

    $my_array = [1, 2, 3];
    
    Reviewed by bfanger at 2019-01-30 12:13
  • 11. Implement Syntax Errors Matching Prettier Conventions, fixes #956

    This PR changes the structure of SyntaxErrors thrown from the PHP plugin towards Prettier in such a way that Prettier knows how to handle them, as explained in #956.

    The small refactoring in the tests_config folder is a necessity for the added test that covers the new behavior, as this test is not matching the structure of the other run_spec() tests.

    Reviewed by loilo at 2019-02-14 00:51
  • 12. build(deps-dev): bump @babel/preset-env from 7.18.6 to 7.18.10

    Bumps @babel/preset-env from 7.18.6 to 7.18.10.

    Release notes

    Sourced from @​babel/preset-env's releases.

    v7.18.9 (2022-07-18)

    :bug: Bug Fix

    • babel-plugin-transform-modules-systemjs, babel-types
    • babel-generator

    :nail_care: Polish

    :house: Internal

    • babel-core, babel-helper-remap-async-to-generator, babel-helpers, babel-parser, babel-plugin-transform-block-scoping, babel-preset-env
    • babel-helper-create-class-features-plugin, babel-helper-member-expression-to-functions, babel-helper-remap-async-to-generator, babel-helper-replace-supers, babel-helper-wrap-function, babel-helpers, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining, babel-plugin-proposal-decorators, babel-plugin-proposal-object-rest-spread, babel-plugin-proposal-optional-chaining, babel-plugin-transform-block-scoping, babel-plugin-transform-classes, babel-traverse, babel-types

    :running_woman: Performance

    Committers: 5

    v7.18.8 (2022-07-08)

    Thanks @​dbacarel for your first PR!

    :eyeglasses: Spec Compliance

    • babel-parser, babel-types

    :bug: Bug Fix

    • babel-plugin-transform-parameters
    • babel-plugin-transform-classes
    • babel-plugin-transform-for-of, babel-plugin-transform-spread, babel-traverse, babel-types
    • babel-helper-module-transforms, babel-plugin-transform-modules-commonjs

    :memo: Documentation

    ... (truncated)

    Changelog

    Sourced from @​babel/preset-env's changelog.

    v7.18.10 (2022-08-01)

    :rocket: New Feature

    • babel-helper-string-parser, babel-types

    :bug: Bug Fix

    • babel-parser
    • babel-helper-string-parser, babel-parser
    • babel-plugin-transform-typescript
    • babel-plugin-transform-react-jsx
    • babel-generator
    • babel-helper-wrap-function, babel-plugin-transform-async-to-generator, babel-traverse

    :house: Internal

    :microscope: Output optimization

    • babel-plugin-proposal-export-default-from

    v7.18.9 (2022-07-18)

    :bug: Bug Fix

    • babel-plugin-transform-modules-systemjs, babel-types
    • babel-generator

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-08-01 23:05
  • 13. build(deps-dev): bump eslint from 8.19.0 to 8.21.0

    Bumps eslint from 8.19.0 to 8.21.0.

    Release notes

    Sourced from eslint's releases.

    v8.21.0

    Features

    • 7b43ea1 feat: Implement FlatESLint (#16149) (Nicholas C. Zakas)
    • 92bf49a feat: improve the key width calculation in key-spacing rule (#16154) (Nitin Kumar)
    • c461542 feat: add new allowLineSeparatedGroups option to the sort-keys rule (#16138) (Nitin Kumar)
    • 1cdcbca feat: add deprecation warnings for legacy API in RuleTester (#16063) (Nitin Kumar)

    Bug Fixes

    • 0396775 fix: lines-around-comment apply allowBlockStart for switch statements (#16153) (Nitin Kumar)

    Documentation

    • 2aadc93 docs: add anchors to headings inside docs content (#16134) (Strek)

    Chores

    • 8892511 chore: Upgrade to Espree 9.3.3 (#16173) (Brandon Mills)
    • 1233bee chore: switch to eslint-plugin-node's maintained fork (#16150) (唯然)
    • 97b95c0 chore: upgrade puppeteer v13 (#16151) (唯然)

    v8.20.0

    Features

    Bug Fixes

    • 30be0ed fix: no-warning-comments rule escapes special RegEx characters in terms (#16090) (Lachlan Hunt)
    • bfe5e88 fix: ignore spacing before ] and } in comma-spacing (#16113) (Milos Djermanovic)

    Documentation

    • 845c4f4 docs: Add website team details (#16115) (Nicholas C. Zakas)
    • 5a0dfdb docs: Link to blog post in no-constant-binary-expression (#16112) (Jordan Eldredge)
    • bc692a9 docs: remove install command (#16084) (Strek)
    • 49ca3f0 docs: don't show toc when content not found (#16095) (Amaresh S M)
    • ba19e3f docs: enhance 404 page UI (#16097) (Amaresh S M)
    • a75d3b4 docs: remove unused meta.docs.category field in working-with-rules page (#16109) (Brandon Scott)
    • cdc0206 docs: add formatters page edit link (#16094) (Amaresh S M)
    • 4d1ed22 docs: preselect default theme (#16098) (Strek)
    • 4b79612 docs: add missing correct/incorrect containers (#16087) (Milos Djermanovic)
    • 09f6acb docs: fix UI bug on rules index and details pages (#16082) (Deepshika S)
    • f5db264 docs: remove remaining duplicate rule descriptions (#16093) (Milos Djermanovic)
    • 32a6b2a docs: Add scroll behaviour smooth (#16056) (Amaresh S M)

    Chores

    • bbf8df4 chore: Mark autogenerated release blog post as draft (#16130) (Nicholas C. Zakas)
    • eee4306 chore: update internal lint dependencies (#16088) (Bryan Mishkin)
    • 9615a42 chore: update formatter examples template to avoid markdown lint error (#16085) (Milos Djermanovic)
    • 62541ed chore: fix markdown linting error (#16083) (唯然)
    Changelog

    Sourced from eslint's changelog.

    v8.21.0 - August 1, 2022

    • 7b43ea1 feat: Implement FlatESLint (#16149) (Nicholas C. Zakas)
    • 8892511 chore: Upgrade to Espree 9.3.3 (#16173) (Brandon Mills)
    • 92bf49a feat: improve the key width calculation in key-spacing rule (#16154) (Nitin Kumar)
    • c461542 feat: add new allowLineSeparatedGroups option to the sort-keys rule (#16138) (Nitin Kumar)
    • 1cdcbca feat: add deprecation warnings for legacy API in RuleTester (#16063) (Nitin Kumar)
    • 0396775 fix: lines-around-comment apply allowBlockStart for switch statements (#16153) (Nitin Kumar)
    • 2aadc93 docs: add anchors to headings inside docs content (#16134) (Strek)
    • 1233bee chore: switch to eslint-plugin-node's maintained fork (#16150) (唯然)
    • 97b95c0 chore: upgrade puppeteer v13 (#16151) (唯然)

    v8.20.0 - July 16, 2022

    • bbf8df4 chore: Mark autogenerated release blog post as draft (#16130) (Nicholas C. Zakas)
    • 845c4f4 docs: Add website team details (#16115) (Nicholas C. Zakas)
    • 5a0dfdb docs: Link to blog post in no-constant-binary-expression (#16112) (Jordan Eldredge)
    • bc692a9 docs: remove install command (#16084) (Strek)
    • 30be0ed fix: no-warning-comments rule escapes special RegEx characters in terms (#16090) (Lachlan Hunt)
    • ca83178 feat: catch preprocess errors (#16105) (JounQin)
    • 49ca3f0 docs: don't show toc when content not found (#16095) (Amaresh S M)
    • ba19e3f docs: enhance 404 page UI (#16097) (Amaresh S M)
    • bfe5e88 fix: ignore spacing before ] and } in comma-spacing (#16113) (Milos Djermanovic)
    • a75d3b4 docs: remove unused meta.docs.category field in working-with-rules page (#16109) (Brandon Scott)
    • cdc0206 docs: add formatters page edit link (#16094) (Amaresh S M)
    • 4d1ed22 docs: preselect default theme (#16098) (Strek)
    • 4b79612 docs: add missing correct/incorrect containers (#16087) (Milos Djermanovic)
    • 09f6acb docs: fix UI bug on rules index and details pages (#16082) (Deepshika S)
    • f5db264 docs: remove remaining duplicate rule descriptions (#16093) (Milos Djermanovic)
    • 32a6b2a docs: Add scroll behaviour smooth (#16056) (Amaresh S M)
    • eee4306 chore: update internal lint dependencies (#16088) (Bryan Mishkin)
    • 9615a42 chore: update formatter examples template to avoid markdown lint error (#16085) (Milos Djermanovic)
    • 62541ed chore: fix markdown linting error (#16083) (唯然)
    Commits
    • 9c53ed4 8.21.0
    • fd404a5 Build: changelog update for 8.21.0
    • 7b43ea1 feat: Implement FlatESLint (#16149)
    • 8892511 chore: Upgrade to Espree 9.3.3 (#16173)
    • 92bf49a feat: improve the key width calculation in key-spacing rule (#16154)
    • c461542 feat: add new allowLineSeparatedGroups option to the sort-keys rule (#16138)
    • 1cdcbca feat: add deprecation warnings for legacy API in RuleTester (#16063)
    • 0396775 fix: lines-around-comment apply allowBlockStart for switch statements (#16153)
    • 2aadc93 docs: add anchors to headings inside docs content (#16134)
    • 1233bee chore: switch to eslint-plugin-node's maintained fork (#16150)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-08-01 23:04
  • 14. build(deps-dev): bump eslint-plugin-jest from 26.5.3 to 26.7.0

    Bumps eslint-plugin-jest from 26.5.3 to 26.7.0.

    Release notes

    Sourced from eslint-plugin-jest's releases.

    v26.7.0

    26.7.0 (2022-07-29)

    Features

    • create prefer-mock-promise-shorthand rule (#1167) (d965592)

    v26.6.0

    26.6.0 (2022-07-14)

    Features

    Changelog

    Sourced from eslint-plugin-jest's changelog.

    26.7.0 (2022-07-29)

    Features

    • create prefer-mock-promise-shorthand rule (#1167) (d965592)

    26.6.0 (2022-07-14)

    Features

    Commits
    • 15488cc chore(release): 26.7.0 [skip ci]
    • d965592 feat: create prefer-mock-promise-shorthand rule (#1167)
    • 7a77bfd refactor(valid-expect): eliminate duplicate check (#1179)
    • 5934b3b refactor(prefer-called-with): rename name data property to matcherName (#...
    • 7b7f7bc chore: change rules to always report on matcher even when modifier is present...
    • 6d1663e chore(deps): lock file maintenance
    • 69f82a8 chore(deps): lock file maintenance
    • 6fb1fcc docs: update ESLint logo (#1171)
    • 5bb8d1b chore(deps): update yarn to v3.2.2 (#1170)
    • 78a7141 chore(deps): lock file maintenance
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-08-01 23:04
  • 15. build(deps-dev): bump rollup from 2.75.7 to 2.77.2

    Bumps rollup from 2.75.7 to 2.77.2.

    Release notes

    Sourced from rollup's releases.

    v2.77.2

    2022-07-27

    Bug Fixes

    • Avoid a rendering failure when mixing outputs with inlined and non-inlined dynamic imports (#4589)

    Pull Requests

    v2.77.1

    2.77.1

    2022-07-26

    Bug Fixes

    • Ensure IIFE output generates a global variable when generating ES5 (#4588)

    Pull Requests

    v2.77.0

    2022-07-15

    Features

    • Introduce maxParallelFileOps to limit both read and write operations, default to 20 and replaces maxParallelFileRead (#4570)

    Bug Fixes

    • Avoid including variables referenced from return statements that are never reached (#4573)

    Pull Requests

    v2.76.0

    2022-07-08

    Features

    • Allow setting a sourcmapBaseUrl for absolute paths in sourcemaps (#4527)

    ... (truncated)

    Changelog

    Sourced from rollup's changelog.

    2.77.2

    2022-07-27

    Bug Fixes

    • Avoid a rendering failure when mixing outputs with inlined and non-inlined dynamic imports (#4589)

    Pull Requests

    2.77.1

    2022-07-26

    Bug Fixes

    • Ensure IIFE output generates a global variable when generating ES5 (#4588)

    Pull Requests

    2.77.0

    2022-07-15

    Features

    • Introduce maxParallelFileOps to limit both read and write operations, default to 20 and replaces maxParallelFileRead (#4570)

    Bug Fixes

    • Avoid including variables referenced from return statements that are never reached (#4573)

    Pull Requests

    2.76.0

    2022-07-08

    Features

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-07-27 23:03
  • 16. build(deps): bump terser from 5.10.0 to 5.14.2

    Bumps terser from 5.10.0 to 5.14.2.

    Changelog

    Sourced from terser's changelog.

    v5.14.2

    • Security fix for RegExps that should not be evaluated (regexp DDOS)
    • Source maps improvements (#1211)
    • Performance improvements in long property access evaluation (#1213)

    v5.14.1

    • keep_numbers option added to TypeScript defs (#1208)
    • Fixed parsing of nested template strings (#1204)

    v5.14.0

    • Switched to @​jridgewell/source-map for sourcemap generation (#1190, #1181)
    • Fixed source maps with non-terminated segments (#1106)
    • Enabled typescript types to be imported from the package (#1194)
    • Extra DOM props have been added (#1191)
    • Delete the AST while generating code, as a means to save RAM

    v5.13.1

    • Removed self-assignments (varname=varname) (closes #1081)
    • Separated inlining code (for inlining things into references, or removing IIFEs)
    • Allow multiple identifiers with the same name in var destructuring (eg var { a, a } = x) (#1176)

    v5.13.0

    • All calls to eval() were removed (#1171, #1184)
    • source-map was updated to 0.8.0-beta.0 (#1164)
    • NavigatorUAData was added to domprops to avoid property mangling (#1166)

    v5.12.1

    • Fixed an issue with function definitions inside blocks (#1155)
    • Fixed parens of new in some situations (closes #1159)

    v5.12.0

    • TERSER_DEBUG_DIR environment variable
    • @​copyright comments are now preserved with the comments="some" option (#1153)

    v5.11.0

    • Unicode code point escapes (\u{abcde}) are not emitted inside RegExp literals anymore (#1147)
    • acorn is now a regular dependency
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    Reviewed by dependabot[bot] at 2022-07-20 19:27
  • 17. build(deps-dev): bump jest from 28.1.2 to 28.1.3

    Bumps jest from 28.1.2 to 28.1.3.

    Release notes

    Sourced from jest's releases.

    v28.1.3

    Features

    • [jest-leak-detector] Use native FinalizationRegistry when it exists to get rid of external C dependency (#12973)

    Fixes

    • [jest-changed-files] Fix a lock-up after repeated invocations (#12757)
    • [@jest/expect-utils] Fix deep equality of ImmutableJS OrderedSets (#12977)
    • [jest-mock] Add index signature support for spyOn types (#13013, #13020)
    • [jest-snapshot] Fix indentation of awaited inline snapshots (#12986)

    Chore & Maintenance

    • [*] Replace internal usage of pretty-format/ConvertAnsi with jest-serializer-ansi-escapes (#12935, #13004)
    • [docs] Update spyOn docs (#13000)

    New Contributors

    Full Changelog: https://github.com/facebook/jest/compare/v28.1.2...v28.1.3

    Changelog

    Sourced from jest's changelog.

    28.1.3

    Features

    • [jest-leak-detector] Use native FinalizationRegistry when it exists to get rid of external C dependency (#12973)

    Fixes

    • [jest-changed-files] Fix a lock-up after repeated invocations (#12757)
    • [@jest/expect-utils] Fix deep equality of ImmutableJS OrderedSets (#12977)
    • [jest-mock] Add index signature support for spyOn types (#13013, #13020)
    • [jest-snapshot] Fix indentation of awaited inline snapshots (#12986)

    Chore & Maintenance

    • [*] Replace internal usage of pretty-format/ConvertAnsi with jest-serializer-ansi-escapes (#12935, #13004)
    • [docs] Update spyOn docs (#13000)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    Reviewed by dependabot[bot] at 2022-07-13 23:03
A plugin manager for PocketMine-MP downloads plugin from PocketMine-MP official plugin repository

oh-my-pmmp A plugin manager for PocketMine-MP Getting Started Prerequisites Your server MUST RUN the latest version of PocketMine. Installation From P

Jul 24, 2022
Integrates the ClassicPress Plugin Directory and any plugin stored in GitHub (tagged with classicpress-plugin) in the ClassicPress Admin

ClassicPress Plugin Directory Adds a new screen in a ClassicPress Install where you can browse, install, activate, deactivate, update, delete and pagi

Jul 16, 2022
This Pocketmine-MP plugin is a plugin including a complete faction system.

SimpleFaction Simple faction plugin replacing FactionsPro which is no longer updated. Commands Command Name Command Description Available for /f help

Jun 24, 2022
SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

SpawnInLobby Pocketmine-MP plugin. With this plugin the player will always join the game at the default world spawn point

Jan 7, 2022
Ratio plugin is a luck plugin. The more lucky you are, the more you win!
Ratio plugin is a luck plugin. The more lucky you are, the more you win!

Ratio Ratio plugin is a luck plugin. The more lucky you are, the more you win Features When you break a block (Cobblestone), it gives/puts you somethi

Apr 25, 2022
actionMaster is a new faction plugin that aims at flexibility and customization of the plugin by the user and the developers.

FactionMaster is a new faction plugin that aims at flexibility and customization of the plugin by the user and the developers. It includes all the basic functionality of a faction plugin and data storage in MySQL or SQLITE. This is done by adding an extension system and a translation system. FactionMaster has a will of accessibility to the players and especially not to have to remember a lot of commands to play, all is done via interface.

Jul 29, 2022
Api.video-wordpress-plugin - The official api.video plugin for WordPress
Api.video-wordpress-plugin - The official api.video plugin for WordPress

api.video WordPress Plugin api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managin

May 24, 2022
Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Oct 3, 2020
BetterMobs - a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste

BetterMobsOverworld BetterMobs is a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste. MadoxMC Just Edited This plugin to Make 3 Compatible Plugins to add Mobs on your Overworld Worlds, NetherWorlds & EndWorlds, MadoxMC Idea.

May 25, 2022
BetterMobs is a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste.

BetterMobs is a plugin Remixed, by MadoxMC, the original plugin is maked by tgwaste. MadoxMC Just Edited This plugin to Make 3 Compatible Plugins to add Mobs on your Overworld Worlds, NetherWorlds & EndWorlds, MadoxMC Idea.

Jul 9, 2022
Opinionated version of Wikimedia composer-merge-plugin to work in pair with Bamarni composer-bin-plugin.

Composer Inheritance Plugin Opinionated version of Wikimedia composer-merge-plugin to work in pair with bamarni/composer-bin-plugin. Usage If you are

Jul 7, 2022
SublimeLinter 3 plugin for PHP, using php -l.

SublimeLinter-php This linter plugin for SublimeLinter provides an interface to php -l. It will be used with files that have the "PHP", "HTML", or "HT

Jul 13, 2022
This is a plugin written in PHP programming language and running on the PocketMine platform that works stably on the API 3.25.0 platform

This is a plugin written in PHP programming language and running on the PocketMine platform that works stably on the API 3.25.0 platform. It allows you to hear the sound

Jun 23, 2022
This repository contains the codebase PHP bridge using RoadRunner Jobs plugin.

RoadRunner Jobs Plugin This repository contains the codebase PHP bridge using RoadRunner Jobs plugin. Installation To install application server and J

Jul 26, 2022
Composer plugin for Repman - PHP Repository Manager

Repman Composer Plugin Composer plugin for Repman - PHP Repository Manager. Adds a mirror url for all your dependencies without need to update compose

Mar 14, 2022
Composer Plugin for automatically including files for easing function usage in php.

Php Inc Php inc is a composer plugin for automatically including certain files into composer's autoload and autoload-dev files config. Given a set of

Jan 11, 2022
This plugin can be embedded in PHP application to give the web application specific routes/href

Routes Plugin PHP This plugin can be embedded in PHP application to give the web application specific routes/href location and for entering specific/l

Jul 17, 2022
Comprehensive Plugin for composer to execute PHP Quality assurance Tools
Comprehensive Plugin for composer to execute PHP Quality assurance Tools

NOT MAINTANED ANYMORE The development of composer-plugin-qa was dropped in favor of phpqa which is actively maintained. The project use docker and can

Apr 30, 2021
A PocketMine-MP plugin that allows you to comfortably register events using a new piece of PHP 8 power — attributes.

AdvancedEvents This is a PocketMine-MP plugin that allows you to comfortably register events using a new piece of PHP 8 power — attributes. Inspired b

Jul 20, 2022