Skip to content

Commit fa5b09d

Browse files
committed
minor #161 Configure SCA through GH actions (phansys)
This PR was merged into the 3.x branch. Discussion ---------- |Q |A | |--- |---| |Branch |3.x| |Bug fix? |no | |New feature? |no | |BC breaks? |no | |Deprecations?|no | |Tests pass? |yes| |Fixed tickets|n/a| |License |MIT| |Doc PR |n/a| Commits ------- 2c1fd2d Configure SCA through GH actions
2 parents 0d7ad86 + 2c1fd2d commit fa5b09d

29 files changed

+247
-149
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.* export-ignore
22
*.md export-ignore
3-
tests export-ignore
4-
docs export-ignore
3+
Tests export-ignore
4+
Resources/doc export-ignore

.github/workflows/lint.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
on: [push, pull_request]
2+
3+
name: Lint
4+
5+
jobs:
6+
php-cs-fixer:
7+
name: PHP-CS-Fixer
8+
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: "Checkout"
13+
uses: actions/checkout@v2
14+
15+
- name: "Run PHP-CS-Fixer"
16+
uses: docker://oskarstark/php-cs-fixer-ga:2.16.1
17+
with:
18+
args: --ansi --verbose --diff --dry-run
19+
20+
composer-normalize:
21+
name: composer-normalize
22+
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: "Checkout"
27+
uses: actions/checkout@v2
28+
29+
- name: "Run composer-normalize"
30+
uses: docker://localheinz/composer-normalize-action:0.5.2
31+
with:
32+
args: --dry-run
33+
34+
yaml-files:
35+
name: YAML files
36+
37+
runs-on: ubuntu-latest
38+
39+
steps:
40+
- name: "Checkout"
41+
uses: actions/checkout@v2
42+
43+
- name: "Install Ruby 2.6"
44+
uses: actions/setup-ruby@v1
45+
with:
46+
ruby-version: '2.6'
47+
48+
- run: gem install yaml-lint
49+
50+
- name: "Linting..."
51+
run: make lint-yaml
52+
53+
xml-files:
54+
name: XML files
55+
56+
runs-on: ubuntu-latest
57+
58+
steps:
59+
- name: "Checkout"
60+
uses: actions/checkout@v2
61+
62+
- run: sudo apt-get update && sudo apt-get install libxml2-utils
63+
64+
- name: "Linting..."
65+
run: make lint-xml

.github/workflows/qa.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on: [push, pull_request]
2+
name: Quality assurance
3+
jobs:
4+
phpstan:
5+
name: PHPStan
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- name: PHPStan
10+
uses: "docker://oskarstark/phpstan-ga"
11+
env:
12+
REQUIRE_DEV: true
13+
with:
14+
args: analyse

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ cache:
4646
before_script:
4747
- if [ -f xdebug.ini ]; then phpenv config-rm xdebug.ini; fi
4848
- if [ "$GITHUB_OAUTH_TOKEN" != "" ]; then echo -e $GITHUB_OAUTH_TOKEN && composer config -g github-oauth.github.com $GITHUB_OAUTH_TOKEN; fi;
49+
- if [ 70100 -gt $(php -r 'echo PHP_VERSION_ID;') ]; then composer remove --dev "phpstan/phpstan" --no-update; fi;
4950
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;
5051
- if [ -n $INSTALL_VICH_UPLOADER_BUNDLE ]; then composer require "vich/uploader-bundle" --no-update; fi;
5152
- COMPOSER_MEMORY_LIMIT=-1 composer update --prefer-dist --no-interaction $COMPOSER_FLAGS

Component/TicketFeatures.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class TicketFeatures
99
private $features;
1010

1111
/**
12-
* @param array $features
1312
* @param string $messageClass TicketMessage class
1413
*/
1514
public function __construct(array $features, $messageClass)

Controller/TicketController.php

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ class TicketController extends Controller
2121
/**
2222
* Lists all Ticket entities.
2323
*
24-
* @param Request $request
25-
*
2624
* @return \Symfony\Component\HttpFoundation\Response
2725
*/
2826
public function indexAction(Request $request)
@@ -61,8 +59,6 @@ public function indexAction(Request $request)
6159
/**
6260
* Creates a new Ticket entity.
6361
*
64-
* @param Request $request
65-
*
6662
* @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
6763
*/
6864
public function createAction(Request $request)
@@ -157,8 +153,7 @@ public function showAction($ticketId)
157153
/**
158154
* Finds and displays a TicketInterface entity.
159155
*
160-
* @param Request $request
161-
* @param int $ticketId
156+
* @param int $ticketId
162157
*
163158
* @return \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
164159
*/
@@ -201,8 +196,7 @@ public function replyAction(Request $request, $ticketId)
201196
/**
202197
* Deletes a Ticket entity.
203198
*
204-
* @param Request $request
205-
* @param int $ticketId
199+
* @param int $ticketId
206200
*
207201
* @return \Symfony\Component\HttpFoundation\RedirectResponse
208202
*/
@@ -259,8 +253,6 @@ private function createDeleteForm($id)
259253
}
260254

261255
/**
262-
* @param TicketMessageInterface $message
263-
*
264256
* @return \Symfony\Component\Form\Form
265257
*/
266258
private function createMessageForm(TicketMessageInterface $message)

Entity/Traits/TicketMessageTrait.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ public function getMessage()
227227
/**
228228
* Set createdAt.
229229
*
230-
* @param \DateTime $createdAt
231-
*
232230
* @return $this
233231
*/
234232
public function setCreatedAt(\DateTime $createdAt)

Entity/Traits/TicketTrait.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,6 @@ public function getSubject()
334334
/**
335335
* Add message.
336336
*
337-
* @param TicketMessageInterface $message
338-
*
339337
* @return $this
340338
*/
341339
public function addMessage(TicketMessageInterface $message)
@@ -348,8 +346,6 @@ public function addMessage(TicketMessageInterface $message)
348346
/**
349347
* Remove message.
350348
*
351-
* @param TicketMessageInterface $message
352-
*
353349
* @return $this
354350
*/
355351
public function removeMessage(TicketMessageInterface $message)

EventListener/FileSubscriber.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ public static function getSubscribedEvents()
2323
];
2424
}
2525

26-
/**
27-
* @param VichEvent\Event $event
28-
*/
2926
public function postUpload(VichEvent\Event $event)
3027
{
3128
/** @var MessageAttachmentInterface $object */

Form/Type/TicketMessageType.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ public function __construct(UserManagerInterface $userManager, TicketFeatures $f
2828
$this->messageClass = $messageClass;
2929
}
3030

31-
/**
32-
* @param FormBuilderInterface $builder
33-
* @param array $options
34-
*/
3531
public function buildForm(FormBuilderInterface $builder, array $options)
3632
{
3733
$builder

0 commit comments

Comments
 (0)