Code Monkey home page Code Monkey logo

php-short-array-syntax-converter's People

Contributors

dizyart avatar thomasbachem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-short-array-syntax-converter's Issues

Convert a whole directory recursively - WINDOWS

In Windows OS command line find command is not compatible with example presented in readme. But the same can be done with command below:

FOR /f "tokens=*" %a in ('dir *.php /S/B') DO php convert.php %a -w

Opposite conversion

Awesome. But I am actually looking to do the opposite. I want to convert [] to array()

Composer install is throwing a 404

homasbachem/php-short-array-syntax-converter from dist: The "https://api.github.com/repos/a-vasyliev/php-short-array-syntax-converter/zipball/59fde6c9a45543a39f2ce4787c5c1d83c9f50899" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing thomasbachem/php-short-array-syntax-converter (dev-master 59fde6c): Cloning 59fde6c9a4

                                                                                                                     
  [RuntimeException]                                                                                                 
  Failed to clone https://github.com/a-vasyliev/php-short-array-syntax-converter.git via https, ssh protocols, abor  
  ting.                                                                                                              
                                                                                                                     
  - https://github.com/a-vasyliev/php-short-array-syntax-converter.git                                               
    Cloning into '/home/mtersmitten/Documents/checkouts/Oefenweb/vagrants/app-x/www/oefenweb.dev-app/app/Vendor/tho  
  masbachem/php-short-array-syntax-converter'...                                                                     
    remote: Invalid username or password.                                                                            
    fatal: Authentication failed for 'https://github.com/a-vasyliev/php-short-array-syntax-converter.git/'           
                                                                                                                     
  - [email protected]:a-vasyliev/php-short-array-syntax-converter.git                                                   
    Cloning into '/home/mtersmitten/Documents/checkouts/Oefenweb/vagrants/app-x/www/oefenweb.dev-app/app/Vendor/tho  
  masbachem/php-short-array-syntax-converter'...                                                                     
    ERROR: Repository not found.                                                                                     
    fatal: Could not read from remote repository.                                                                    
                                                                                                                     
    Please make sure you have the correct access rights                                                              
    and the repository exists.                                                                                       

The maintainer and details also look a bit odd

Screenshot from 2019-05-20 11-03-50

Reverse process

Is there a way to do the reverse process?
Converting the shorthand syntax automatically to the old array()-style?

Kind regards,
Cedric

Incorrect windows command line

Thanks for this lovely script that saved me tons of hours and seems to make no mistakes.

Here is a fix for windows users:

FOR /f "tokens=*" %a in ('dir *.php /S/B') DO php convert.php %a -w

Should be:

FOR /f "tokens=*" %a in ('dir *.php /S/B') DO php convert.php -w "%a"

I just want to say thank you!

This converter saved my time! It helped me transform array literals to new syntax on huge codebase (literally millions lines of PHP code).
Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.