Skip to content

Commit 5a77c1f

Browse files
Merge pull request #1 from NoumanAhmad448/dev
Create SECURITY.md
2 parents 82824a4 + 907f74d commit 5a77c1f

File tree

8 files changed

+3520
-3409
lines changed

8 files changed

+3520
-3409
lines changed

.github/workflows/tests.yml

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ on:
66
pull_request:
77
branches: [master]
88

9+
permissions:
10+
contents: write # Allows the workflow to push changes
11+
actions: read # Allows reading action logs
12+
pull-requests: write # Enables PR creation and updates
13+
914
jobs:
1015
tests:
1116
runs-on: ubuntu-latest
17+
strategy:
18+
matrix:
19+
laravel: [9.*, 10.*] # Laravel versions to test
20+
php: [8.1, 8.2, 8.3] # PHP versions to test
1221

1322
steps:
1423
- name: Checkout code
@@ -17,12 +26,53 @@ jobs:
1726
- name: Set up PHP
1827
uses: shivammathur/setup-php@v2
1928
with:
20-
php-version: "8.1"
29+
php-version: ${{ matrix.php }}
2130
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
2231
coverage: none
2332

24-
- name: Install dependencies
25-
run: composer install --prefer-dist --no-progress --no-suggest
33+
- name: Create Laravel ${{ matrix.laravel }}
34+
run: |
35+
composer create-project --prefer-dist laravel/laravel laravel-test-project "${{ matrix.laravel }}" --no-interaction
36+
mkdir -p laravel-test-project/packages/eren/laravel-commands
37+
38+
- name: updating laravel
39+
working-directory: laravel-test-project
40+
run: |
41+
composer update laravel/framework
42+
43+
- name: Laravel version
44+
working-directory: laravel-test-project
45+
run: composer show laravel/framework
46+
47+
- name: Copy Local Package
48+
run: rsync -av --exclude='laravel-test-project' ./ laravel-test-project/packages/eren/laravel-commands/
49+
50+
- name: checked copied files
51+
run: |
52+
ls -l laravel-test-project/packages/eren/laravel-commands/
53+
ls -l laravel-test-project/packages/eren/laravel-commands/src
54+
ls -l laravel-test-project/packages/eren/laravel-commands/src/Commands
55+
ls -l laravel-test-project/packages/eren/laravel-commands/src/Providers
56+
57+
- name: Link Local Package
58+
working-directory: laravel-test-project
59+
run: |
60+
composer config repositories.local '{"type": "path", "url": "packages/eren/laravel-commands", "options": {"symlink": true}}'
61+
composer require eren/laravel-commands --no-interaction --no-progress
62+
63+
- name: Prepare Laravel Environment
64+
working-directory: laravel-test-project
65+
run: |
66+
cp .env.example .env
67+
php artisan key:generate
68+
php artisan config:clear
69+
70+
- name: Modify phpunit.xml to Include Package Tests
71+
run: |
72+
# sed -i '/<\/testsuite>/i\ <directory suffix="Test.php">packages/eren/laravel-commands/src/Tests</directory>' phpunit.xml
73+
rsync -av --exclude='laravel-test-project' ./src/Tests/ laravel-test-project/tests/Feature
2674
27-
# - name: Run tests
28-
# run: ./vendor/bin/phpunit
75+
- name: Run Tests
76+
working-directory: laravel-test-project
77+
run: |
78+
php artisan test

SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
Use this section to tell people about which versions of your project are
6+
currently being supported with security updates.
7+
8+
| Version | Supported |
9+
| ------- | ------------------ |
10+
| 5.1.x | :white_check_mark: |
11+
| 5.0.x | :x: |
12+
| 4.0.x | :white_check_mark: |
13+
| < 4.0 | :x: |
14+
15+
## Reporting a Vulnerability
16+
17+
Use this section to tell people how to report a vulnerability.
18+
19+
Tell them where to go, how often they can expect to get an update on a
20+
reported vulnerability, what to expect if the vulnerability is accepted or
21+
declined, etc.

composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
"email": "nouman.laravel@outlook.com"
1515
}
1616
],
17-
"require": {
18-
"laravel/framework": "9.52.17"
19-
},
2017
"extra": {
2118
"laravel": {
2219
"providers": [

0 commit comments

Comments
 (0)