Git Product home page Git Product logo

php7compatibility's Introduction

PHP7Compatibility

Build Status

This container propose to check the compatibility of your code with PHP 7.x

Usage

docker run --rm -v $(pwd):/app vfac/php7compatibility <version> <option> <path>

version

PHP Version used to check code compatibility: 7.0, 7.1, 7.2, 7.3, 7.4

For instance to check code of the current directory in PHP version 7.4 :

docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 .

option

memory_limit

With large source code, you could have an error message like:

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in /php7checker/vendor/squizlabs/php_codesniffer/src/Tokenizers/Tokenizer.php on line 1282

To prevent this error type, you can use the following option

-d memory_limit=512M

This option set temporary the memory limit php option to 512M

With a setting to 1Giga of memory:

docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 -d memory_limit=1G .

File extensions

You can limit the inspection of your code to specific extension file with the optiion

--extensions=php

Several extensions can be add, with a comma separation

--extensions=php,lib

Example

docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 --extensions=php .

Ignoring files and folders

The --ignore option can be useful to prevent a big scan of your code.

--ignore=vendor

Several paths can be add, with a comma separation

--ignore=vendor,tmp

Exemple

docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 --ignore=vendor .

path

Path to inspect into current directory. To inspect all files in current directory use .

docker run --rm -v $(pwd):/app vfac/php7compatibility 7.4 .

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.