Giter VIP home page Giter VIP logo

devdrops / php-toolbox Goto Github PK

View Code? Open in Web Editor NEW
39.0 2.0 6.0 227 KB

:whale: :elephant: A Docker image designed for PHP developers that care about code quality.

Home Page: https://hub.docker.com/r/devdrops/php-toolbox/

License: GNU General Public License v3.0

Dockerfile 17.11% Shell 42.71% Makefile 40.18%
docker php php-codesniffer php-toolbox php-cs-fixer behat phpunit phpmd composer phploc

php-toolbox's Introduction

devdrops/php-toolbox ๐Ÿณ ๐Ÿ˜

Hadolint status Trivy status Snyk Container status Docker Hub status

A Docker image designed for PHP developers that care about code quality.

Available on Docker Hub at devdrops/php-toolbox.

The Project

Each PHP version, starting from 7.4, have at least 2 tags: one version without Xdebug, and another with Xdebug.

The following tools are available:

Tool Description
PHP The PHP programming language.
PHPUnit PHPUnit is a programmer-oriented testing framework for PHP.
PHP_CodeSniffer PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.
PHP CBF PHP Code Beautifier and Fixer automatically correct coding standard violations.
PHP CS Fixer A tool to automatically fix PHP Coding Standards issues.
PHP Mess Detector Checks for bugs, suboptimal code, overcomplicated expressions, unused parameters etc.
Behat A php framework for autotesting your business expectations.
PHPStan PHPStan finds bugs in your code without writing tests.
composer-unused Show unused composer dependencies by scanning your code.
Psalm Prevent runtime errors and fix bugs automatically.
Pest The elegant PHP testing framework.
Rector Instant Upgrades and Automated Refactoring of any PHP 5.3+ code.
PHPArkitect Put your architectural rules under test!
phpspec A php toolset to drive emergent design by specification.
Codeception Codeception collects and shares best practices and solutions for testing PHP web applications.
Infection PHP Mutation Testing Framework
Deptrac Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects.
PhpMetrics PhpMetrics provides various metrics about PHP projects.
PDepend PHP_Depend software analyzer and metric tool.

Install

docker pull devdrops/php-toolbox

Usage

All tools can be accessed by executing:

docker run -ti --rm -v $(pwd):/code -w /code devdrops/php-toolbox:latest <CHOOSEN_TOOL>

Where <CHOOSEN_TOOL> is the binary you're looking for ๐Ÿ˜‰

Build it!

Clone this repository. Then, using a terminal window, go to it's root directory. Each version folder have it's own Makefile with the following commands (you can run make help to see a brief explanation of each command):

build                          Build the official tag.
debug                          Build only the image with Xdebug.
develop                        Build '*-dev' tag, including Xdebug.
hadolint                       Lint ./Dockerfile with Hadolint
help                           Print information of each Make task.
latest                         Build two images: 1. official tag, 2. official tag + Xdebug.
push                           Pushes to Docker Hub two images: 1. official tag, 2. official tag + Xdebug.
release                        Build and deploy official tags.
shellcheck                     Run shellcheck to scan sh files at ./helpers.

php-toolbox's People

Contributors

devdrops avatar kix avatar marc-casoliva 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

Watchers

 avatar  avatar

php-toolbox's Issues

PHP CS Fixer not working :(

Seems that running PHP CS Fixer does not makes any changes to the target files. Why?

Execution:

docker run -it -v $(pwd):/foo -w /foo devdrops/php-toolbox php-cs-fixer fix my/awesome/php/file.php

docker run -it -v $(pwd):/foo -w /foo devdrops/php-toolbox php-cs-fixer fix /foo/my/awesome/php/file.php

WARNING: Libzip >= 1.2.0 needed for encryption support

From the logs:

Configuring for:                                                                                                                                                 [131/409]
PHP Api Version:         20180731                                                                                                                                         
Zend Module Api No:      20180731                                                                                                                                         
Zend Extension Api No:   320180731                                                                                                                                        
checking for grep that handles long lines and -e... /bin/grep                                                                                                             
checking for egrep... /bin/grep -E                                                                                                                                        
checking for a sed that does not truncate output... /bin/sed                                                                                                              
checking for cc... cc                                                                                                                                                     
checking whether the C compiler works... yes                                                                                                                              
checking for C compiler default output file name... a.out                                                                                                                 
checking for suffix of executables...                                                                                                                                     
checking whether we are cross compiling... no                                                                                                                             
checking for suffix of object files... o                                                                                                                                  
checking whether we are using the GNU C compiler... yes                                                                                                                   
checking whether cc accepts -g... yes                                                                                                                                     
checking for cc option to accept ISO C89... none needed                                                                                                                   
checking how to run the C preprocessor... cc -E                                                                                                                           
checking for icc... no                                                                                                                                                    
checking for suncc... no                                                                                                                                                  
checking whether cc understands -c and -o together... yes                                                                                                                 
checking for system library directory... lib                                                                                                                              
checking if compiler supports -R... no                                                                                                                                    
checking if compiler supports -Wl,-rpath,... yes                                                                                                                          
checking build system type... x86_64-pc-linux-gnu                                                                                                                         
checking host system type... x86_64-pc-linux-gnu                                                                                                                          
checking target system type... x86_64-pc-linux-gnu                                                                                                                        
checking for PHP prefix... /usr/local                                                                                                                                     
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/e
xt -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.16 (ok)
checking for gawk... no
checking for nawk... nawk
checking if nawk is broken... no
checking for zip archive read/writesupport... yes, shared
checking for the location of libz... no
checking pcre install prefix... no
checking libzip... yes
checking for the location of zlib... /usr
checking for pkg-config... /usr/bin/pkg-config
checking for libzip... from pkgconfig: version 1.1.2 found in /usr/lib/x86_64-linux-gnu
checking for zip_open in -lzip... yes
checking for zip_file_set_encryption in -lzip... no
configure: WARNING: Libzip >= 1.2.0 needed for encryption support

The last message is warning about the current version of libzip, required for encryption support. Maybe libsodium?

Roadmap

Which tools?

  • PHP_CodeSniffer
  • PHP Mess Detector
  • PHP CS Fixer
  • Others?

How to run?

  • No matter where the code is
  • IDE compatible

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.