Skip to content

Commit d62616d

Browse files
authored
Merge pull request #10 from studio24/release/1.1
Release/1.1
2 parents c656137 + 1f03ee5 commit d62616d

39 files changed

+300
-269
lines changed

.github/workflows/php.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: PHP tests
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
10+
strategy:
11+
matrix:
12+
php: ['8.2', '8.3', '8.4']
13+
symfony: ['6.4', '7.3']
14+
15+
runs-on: ubuntu-latest
16+
17+
name: On PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }}
18+
steps:
19+
# https://github.com/marketplace/actions/checkout
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
# https://github.com/marketplace/actions/setup-php-action
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-versions }}
28+
extensions: mbstring, intl
29+
ini-values: post_max_size=256M, max_execution_time=180
30+
tools: composer
31+
32+
- name: Check PHP version
33+
run: php -v
34+
35+
- name: Validate composer.json and composer.lock
36+
run: composer validate
37+
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress
40+
41+
- name: Install Symfony ${{ matrix.symfony }} packages
42+
run: |
43+
composer update symfony/console:${{ matrix.symfony }}
44+
composer update symfony/stopwatch:${{ matrix.symfony }}
45+
46+
- name: Code lint PHP files
47+
run: ./vendor/bin/phplint
48+
49+
- name: Coding standards
50+
run: ./vendor/bin/phpcs
51+
52+
- name: PHPUnit
53+
run: ./vendor/bin/phpunit

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
vendor
2-
.phpunit.result.cache
32
package-lock.json
4-
tests/example/apollo
53
composer.lock
6-
var/cache/*
4+
var/cache/*
5+
.phpunit.cache
6+
.phpunit.result.cache
7+
.phplint.cache

.phpcs.xml.dist

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0"?>
2+
3+
<!-- see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
4+
<ruleset name="Studio 24">
5+
6+
<!-- One or more files and/or directories to check -->
7+
<file>src</file>
8+
<file>tests</file>
9+
10+
<!-- Ignore files that match this pattern -->
11+
<!-- <exclude-pattern>path/to/*</exclude-pattern> -->
12+
13+
<!-- Command line options -->
14+
<!-- see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
15+
<arg name="extensions" value="php" />
16+
<arg name="basepath" value="."/>
17+
<arg name="colors"/>
18+
<arg name="parallel" value="75"/>
19+
<arg value="np"/>
20+
21+
<!-- Coding standards rules to test for -->
22+
<rule ref="PSR12" />
23+
24+
<!-- Namespaces and classes MUST follow PSR-0.
25+
This means each class is in a file by itself, and is in a namespace of at least one level: a top-level vendor name. -->
26+
<!-- Exclude tests from this rule -->
27+
<rule ref="PSR1.Classes.ClassDeclaration">
28+
<exclude-pattern>tests/*</exclude-pattern>
29+
</rule>
30+
31+
</ruleset>

.phplint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
path: ./
2+
jobs: 10
3+
extensions:
4+
- php
5+
exclude:
6+
- vendor

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Key features:
1515

1616
## Requirements
1717

18-
* PHP 7.4+
18+
* PHP 8.2+
1919
* [Composer](https://getcomposer.org/)
2020

2121
## Installation
@@ -61,4 +61,4 @@ See [contributing](docs/contributing.md) for making changes to this repo.
6161

6262
Developed by [Simon R Jones](https://github.com/simonrjones/), HTML/CSS design system layout by Nicola Saunders.
6363

64-
Inspired by [GOVUK Design System](https://design-system.service.gov.uk/) and [Drizzle](https://github.com/cloudfour/drizzle).
64+
Inspired by [GOVUK Design System](https://design-system.service.gov.uk/) and [Drizzle](https://github.com/cloudfour/drizzle).

0 commit comments

Comments
 (0)