Setup GitHub actions for PHP to run phpcs and phplint

preview_player
Показать описание
Linting and style checks are quick wins and you should not think too much about them. Just set it up and let it do its thing. I know everyone prefers a different coding style, but whatever style you use, style checks make it consistent for you and your team. So, just pick something and use it consistently.

This video walks you through setting up phpcs and phplint on your PHP project as a composer script. It then also covers adding those as GitHub actions so that you have style checks and linting with every commit.

Contents

00:00 Start
00:17 Introduction to linting and style checks
00:53 Looking at the project
01:40 Adding the tools
02:07 Verifying phpcs
02:26 Add phplint
04:33 Adding GitHub workflow
05:53 Add actions to the workflow
06:47 See it in action
07:37 Merge PR and closing
Рекомендации по теме
Комментарии
Автор

Found this video of yours randomly on my YouTube feed. Great content and your pace of explaining it also perfect. Keep making more of these videos Hussain!

thephpx
Автор

Thank you so much Hussain. Great video. Much appreciated.

LUDX-
Автор

This is really helpful.. thanks hussain

krishnakanth-iotm
Автор

Thank you so much Hussain. It's really helpful but I'm not having luck to complete this. When pushing my code I got this error "sh: 1: phplint: Permission denied". Any idea?

musaddiqktk
Автор

Hey Hussain, thank you for sharing this valuable information. Can we integrate PHP CodeSniffer into the pipeline of GIT to not allow the merge if code is violated ?

MK-orgb
Автор

I'm interested in learning how to deploy php app in gitlab, github, AWS EC2, azure, thanks for the video.

keithlungile
visit shbcf.ru