The Yii Framework (version 1) is compatible with PHP 7.2 (as of 1.1.20) and can also use composer. However, as a legacy project many still run it on older PHP versions.
To run PHPStan against it, I am using a Docker image with PHP 7.2 and Composer.
# Should be running acme.sh v3 | |
~/.acme.sh/acme.sh --upgrade | |
# Set the default CA to LetsEncrypt | |
~/.acme.sh/acme.sh --set-default-ca --server letsencrypt | |
# Issue a certificate using AWS Route 53 | |
~/.acme.sh/acme.sh --issue --dns dns_aws -d example.com | |
# Install certificates and restart web server |
version: '3' | |
services: | |
phpminds-nginx: | |
image: phpminds/nginx:1.10 | |
restart: always | |
depends_on: | |
- db | |
ports: | |
- 8080:80 |
default: | |
suites: | |
api: | |
paths: [ "%paths.base%/features/api" ] | |
contexts: | |
- ApiContext: | |
entityManager: '@doctrine.orm.default_entity_manager' | |
routingExtension: '@twig.extension.routing' | |
extensions: |
The Yii Framework (version 1) is compatible with PHP 7.2 (as of 1.1.20) and can also use composer. However, as a legacy project many still run it on older PHP versions.
To run PHPStan against it, I am using a Docker image with PHP 7.2 and Composer.
These are some of my notes on writing integration tests for Symfony 3.4 as it was a task which had some gotchas and took me some time to get it working.
In order to access the container of a Symfony project, our PHPUnit tests should extend KernelTestCase
.
function bindMessageButton() { | |
"use strict"; | |
var $msgButton = $('a.msg'); | |
$msgButton.attr('href', '#'); | |
$msgButton.on('click', function (e) { | |
e.preventDefault(); | |
$msgButton.unbind(); | |
$msgButton.removeAttr('href'); // fix for double click jump | |
// ... do stuff ... |
class MyClass | |
{ | |
public function doStuff($param, array $optional = []) | |
{ | |
// some logic | |
return true; | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
I've used: centos/7
sudo yum install wget
For more information on remote debugging see Derick Rethan's 2011 post
For info on debugging PHP CLI with PhpStorm see Gary Hockin's post - DEBUGGING PHP COMMAND LINE (WITH PHP STORM & XDEBUG)
Connect to vagrant using an ssh tunnel and run phpunit through there. The same process applies when running a normal PHP CLI script.