wiki:members/GRIP-UQAM/PHP

Development

PHP Development Tools

Debug bar

Static analyzer

About

Lists of tools

Tools

Compiling PHP (to be able to use recent versions)

PHPBrew

  • phpbrew/phpbrew Useless in 2016-10 follow official dowload instructions instead (php phar)
    • 2017: alone in an otherwise empty composer.json with minimum-stability: dev
      $ composer req phpbrew/phpbrew:@dev
      $ composer req corneltek/cliframework ~2.0.0@stable
      $ composer req corneltek/getoptionkit ~2.0.0@stable
      
      • composer.json
        {
            "require": {
                "phpbrew/phpbrew": "@dev",
                "corneltek/cliframework": "~2.0.0@stable",
                "corneltek/getoptionkit": "~2.0.0@stable"
            },
            "minimum-stability": "dev"
        }
        
        *
        $ composer req phpbrew/phpbrew:1.20.2 corneltek/pearx:dev-master corneltek/curlkit:1.0.x-dev corneltek/getoptionkit:~2.0.0@stable
        
        • composer.json
          {
              "require": {
                  "phpbrew/phpbrew": "1.20.2",
                  "corneltek/pearx": "dev-master",
                  "corneltek/curlkit": "1.0.x-dev",
                  "corneltek/getoptionkit": "~2.0.0@stable"
              }
          }
          
  • yet to try:
    $ vendor/bin/phpbrew switch ...
    $ phpbrew ext install github:nikic/php-ast
    
  • Quick-Start
  • Extension-Installer
  • Cookbook
  • PHPBrew can also install some other utilities for PHP (see ...).

About

configure: error: Cannot find OpenSSL's libraries

Example

$ curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew
$ ./phpbrew
$ ./phpbrew init
Using root: /home/.../.phpbrew
Initialization successfully finished!
<=====================================================>
Phpbrew environment is initialized, required directories are created under

    /home/jean-bernard/.phpbrew

Paste the following line(s) to the end of your ~/.bashrc and start a
new shell, phpbrew should be up and fully functional from there:

    source /home/jean-bernard/.phpbrew/bashrc

To enable PHP version info in your shell prompt, please set PHPBREW_SET_PROMPT=1
in your `~/.bashrc` before you source `~/.phpbrew/bashrc`

    export PHPBREW_SET_PROMPT=1

To enable .phpbrewrc file searching, please export the following variable:

    export PHPBREW_RC_ENABLE=1


For further instructions, simply run `phpbrew` to see the help message.

Enjoy phpbrew at $HOME!!

<=====================================================>

# ./phpbrew install --with-openssl 7.0 +default -mcrypt +dbs +mb
# ./phpbrew install 7.0 +default -mcrypt +dbs +mb --with-openssl
$ ./phpbrew install 7.0 +default -mcrypt +dbs +mb -- --with-openssl
# env PHPBREW_PHP=php-7.0.11 ./phpbrew ext install github:nikic/php-ast php7
$ env PHPBREW_PHP=php-7.0.11 ./phpbrew ext install github:nikic/php-ast
$ ~/.phpbrew/php/php-7.0.11/bin/php -i |less
$ ~/.phpbrew/php/php-7.0.11/bin/php composer require etsy/phan
$ ~/.phpbrew/php/php-7.0.11/bin/php vendor/bin/phan --help

Help about PHP

Conferences

Web Articles

Books

Example code

PHP Syntax

php double colon class

What is new

What is new in php 7

PHP Security Programming

PHP Programming

Namespaces

Testing

BDD Testing

Unit Testing

Functional or acceptance testing

It's 2016 now and there's Mink. It even supports different engines from headless pure-PHP "browser" (without JavaScript), over Selenium (which needs a browser like Firefox or Chrome) to a headless "browser.js" in NPM, which DOES support JavaScript. http://stackoverflow.com/questions/199045/is-there-a-php-equivalent-of-perls-wwwmechanize

  • Something similar is available in Python.

Coding Standards

About Coding Standards

Detecting coding standards' violations

PHP_CodeSniffer

php-cs-fixer

Test framework

how to manage object dependencies

People

Last modified 18 months ago Last modified on May 15, 2017, 3:32:00 PM