Trainings for Innowise PHP department
- It's highly recommended to use Ubuntu latest stable edition.
- Install
php 8.1
following instructions for your OS. - Install and enable at least
php-xml
extension. - Install Composer tool.
- If you are using GNU/Linux, run as the last Composer installation step:
mv composer.phar /usr/local/bin/composer chmod a+x /usr/local/bin/composer
- Optional steps if you don't yet have public/private keys for your GitHub account:
- Generate public/private keys for Github. You can use
ssh-keygen
command with parameters on GNU/Linux (pressEnter
for any prompt):
ssh-keygen -t ecdsa -b 521 -C "course_key" -f ~/.ssh/github_php_course
- Create
~/.ssh/config
file with following instructions:
# GitHub.com Host github.com UpdateHostKeys no PreferredAuthentications publickey IdentityFile ~/.ssh/github_php_course
- Copy ssh public key to your GitHub profile.
- Generate public/private keys for Github. You can use
- Identify yourself for GitHub:
git config --global user.name "Your Name"
git config --global user.email "your_email"
- You will be granted access to the repository with tasks.
- Clone the repository to your machine.
- Subscribe to the repository to be able to receive any notification on it.
- Create separate branch and folder in src/ and tests/ for each task.
- When you are ready to show your solution (task and tests), create Pull Request (PR).
- If you have errors reported by GitHub Actions, check their details and fix issues.
-
Use English for comments, class, properties, methods, functions, etc.
-
If you use files without class and namespace declaration, add your src file to includes.php file to be able to run tests.
-
Before creating PR run in your machine following commands
composer phpcs
to check code stylecomposer phplint
to perform static analyzecomposer phpunit
to run tests
-
Create PR only after all above commands run with green (success) return status.