hnv/psr-http-uploaded-file

There is no license information available for the latest version (2.1.3) of this package.

PSR-7 uploaded file implementation package

2.1.3 2022-11-09 17:47 UTC

This package is auto-updated.

Last update: 2024-05-09 20:50:48 UTC


README

requirements:
 - docker
 - docker compose
 - PHPStorm

actions plan:
 - get remote PHP server
 - drag all project dependencies
 - configure our IDE (PHPStorm) to use remote PHP server and run tests
 - run tests and be sure all tests are pathing

getting remote PHP server:
 - go into project root
 - edit .env, if it needs
 - up containers, running:
   $ docker-compose up -d
 - check them, running:
   $ docker container ls

project composer installation with docker:
 - view current docker containers list
   $ docker container ls
 - connect to current compose PHP container
   $ docker exec -it ${CONTAINER_ID} sh
 - use composer
   $ composer install/update

PHPStorm configure (register remote PHP server SSH connection):
 - go to File | Settings | Tools | SSH Configurations -> add new
 - docker is on host machine case:
       Host         : 0.0.0.0
       Port         : ${parameter from .env file}
       User name    : root
       Password     : root
 - docker is on virtual machine with NAT network case:
       add ports rule on VM
           Host         : PHP server virtual host, for example 127.0.0.10
           Host port    : PHP server virtual SSH port, for example 33
           Guest port   : ${parameter from .env file}

       Host         : PHP server virtual host, added into VM ports rules
       Port         : PHP server virtual SSH port, added into VM ports rules
       User name    : root
       Password     : root

PHPStorm configure (add remote interpreter):
 - go to File | Settings | Languages & Frameworks | PHP -> CLI Interpreters
 - add new, using SSH connection, added before

PHPStorm configure (add PHPUnit run configuration):
 - go to Run | Edit Configurations
 - add new, using PHPUnit template
 - parameters:
       Test scope   : Directory
       Directory    : local path to project "tests" directory
       Interpreter  : PHP remote interpreter, added before

running tests:
 - fire Run | Run
 - read