Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ jobs:
- name: Run tests
timeout-minutes: 5
run: |
pnpm prettier
composer run phpcs:ci
pnpm format
composer run phpstan:ci
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ composer.lock

# overrides for local tooling
/phpstan.neon
/phpstan-baseline.neon
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
->setParallelConfig(ParallelConfigFactory::detect(null, null, 2**18-1))
->setRules([
'@PhpCsFixer' => true,
'@PHP82Migration' => true,
'@PHP8x2Migration' => true,
'indentation_type' => true,

// Overrides for (opinionated) @PhpCsFixer and @Symfony rules:
Expand Down
4 changes: 2 additions & 2 deletions Building/admin/components/Block/AttachmentEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ protected function getAttachmentSet()
{
if (!$this->attachment_set instanceof SiteAttachmentSet) {
if ($this->getObject()->attachment instanceof SiteAttachment) {
$this->attachment_set =
$this->getObject()->attachment->attachment_set;
$this->attachment_set
= $this->getObject()->attachment->attachment_set;
} else {
$this->attachment_set = SwatDBClassMap::new(SiteAttachmentSet::class);
$this->attachment_set->setDatabase($this->app->db);
Expand Down
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@ pipeline {
}
}

stage('Check PHP Static Analysis') {
stage('Check Formatting') {
steps {
sh 'composer run phpstan:ci'
sh 'n -d exec engine pnpm format'
}
}

stage('Check Formatting') {
stage('Check PHP Static Analysis') {
steps {
sh 'n -d exec engine pnpm prettier'
sh 'composer run phpstan:ci'
}
}

}
}
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ block types found in `Building/views`.

## Installation

Make sure the silverorange composer repository is added to the `composer.json`
for the project and then run:

```sh
composer require silverorange/building
```
20 changes: 7 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
"email": "mike@silverorange.com"
}
],
"repositories": [
{
"type": "composer",
"url": "https://composer.silverorange.com",
"only": [
"silverorange/*"
]
}
],
"require": {
"php": ">=8.2",
"ext-mbstring": "*",
Expand All @@ -30,16 +21,19 @@
"silverorange/swat": "^7.9.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "3.64.0",
"phpstan/phpstan": "^1.12"
"friendsofphp/php-cs-fixer": "3.88.2",
"phpstan/phpstan": "^2.2",
"rector/rector": "^2.4"
},
"scripts": {
"phpcs": "./vendor/bin/php-cs-fixer check -v",
"phpcs:ci": "./vendor/bin/php-cs-fixer check --config=.php-cs-fixer.php --no-interaction --show-progress=none --diff --using-cache=no -vvv",
"phpcs:write": "./vendor/bin/php-cs-fixer fix -v",
"phpcs:fix": "./vendor/bin/php-cs-fixer fix -v",
"phpstan": "./vendor/bin/phpstan analyze",
"phpstan:ci": "./vendor/bin/phpstan analyze -vvv --no-progress --memory-limit 2G",
"phpstan:baseline": "./vendor/bin/phpstan analyze --generate-baseline"
"phpstan:baseline": "./vendor/bin/phpstan analyze --generate-baseline",
"rector": "./vendor/bin/rector --dry-run",
"rector:fix": "./vendor/bin/rector"
},
"autoload": {
"classmap": [
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
},
"type": "module",
"scripts": {
"prettier": "prettier --check .",
"prettier:write": "prettier --write ."
"format": "prettier --check .",
"format:fix": "prettier --write ."
},
"devDependencies": {
"prettier": "^3.5.3"
"prettier": "^3.8.4"
},
"packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
"packageManager": "pnpm@11.8.0+sha512.c1f5e7c4cb241c8f174b743851d82f42b802324afc8b0f116b96adb15aa06664948dde36960a3ba1079ba5b4b29dd0140135b94b5b5f5263592249d68e555f26"
}
13 changes: 0 additions & 13 deletions phpcs.xml

This file was deleted.

Empty file removed phpstan-baseline.neon
Empty file.
4 changes: 1 addition & 3 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
includes:
- phpstan-baseline.neon

parameters:
phpVersion: 80200
level: 1
paths:
- Building
editorUrl: '%%file%%:%%line%%'
editorUrlTitle: '%%file%%:%%line%%'
errorFormat: table
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading