VS Code: replace "array(...)" syntax with "[...]"

This page summarizes the projects mentioned and recommended in the original post on /r/PHP

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Rector

    Instant Upgrades and Automated Refactoring of any PHP 5.3+ code

  • I'd recommend using Rector for this kind of job. https://getrector.org/

  • PHP CS Fixer

    A tool to automatically fix PHP Coding Standards issues

  • The setup I currently have and hope that helps you, is having installed PHP-CS-Fixer along with this extension for VSCode to format the files on save (not doing the key combination or command "Format document with..." but maybe other extensions that use PHP-CS-Fixer could solve this problem), then you could use this useful configurator, there are plenty of rules you can set or select the predefined based on the given standards, the one you are looking for is "array_syntax" there you can export the selected rules and create a ".php-cs-fixer.php" file that has your configurations, set the path to the file on the extension settings and you should be ready to format flies con the fly (or you could use the command line to format a given directory and not file by file)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts