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
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
--network host --no-cache .

tests:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
defaults:
run:
working-directory: console
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:

cs-stan:
name: Coding Standards & Static Analysis
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
defaults:
run:
working-directory: console
Expand All @@ -162,8 +162,5 @@ jobs:
- name: Run psalm
run: composer psalm -- --output-format=github

- name: Run phpstan (src)
run: composer phpstan-src -- --error-format=github

- name: Run phpstan (tests)
run: composer phpstan-tests -- --error-format=github
- name: Run phpstan
run: composer phpstan -- --error-format=github
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This image provides the ability to build docs for CakePHP plugins
# Plugins should use a multi-stage Dockerfile so that they only deploy
# nginx without python and other build tooling.
FROM python:3.8-alpine
FROM python:3.11-alpine

LABEL Description="Create an image to deploy the CakePHP plugin docs"

Expand Down
14 changes: 5 additions & 9 deletions console/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,14 @@
"cs-fix": "phpcbf --parallel=16 -p ./src ./tests",
"test": "phpunit",
"test-coverage": "phpunit --coverage-clover=coverage.xml",
"stan-setup": "cp composer.json composer.backup && composer require --dev \"phpstan/phpstan:^1.0\" \"psalm/phar:^4.0\" && mv composer.backup composer.json",
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^1.10 psalm/phar:^5.13 && mv composer.backup composer.json",
"stan": [
"@phpstan-src",
"@phpstan-tests",
"@phpstan",
"@psalm"
],
"phpstan": [
"@phpstan-src",
"@phpstan-tests"
],
"phpstan-src": "php ./vendor/phpstan/phpstan/phpstan.phar analyse -l 8 -c ./phpstan.src.neon ./src",
"phpstan-tests": "php ./vendor/phpstan/phpstan/phpstan.phar analyse -l 8 -c ./phpstan.tests.neon ./tests",
"phpstan": "php ./vendor/phpstan/phpstan/phpstan.phar analyse",
"stan-baseline": "php ./vendor/phpstan/phpstan/phpstan.phar --generate-baseline",
"psalm-baseline": "php ./vendor/psalm/phar/psalm.phar --set-baseline=psalm-baseline.xml",
"psalm": "php ./vendor/psalm/phar/psalm.phar"
}
}
10 changes: 10 additions & 0 deletions console/phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
parameters:
level: 6
checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false
treatPhpDocTypesAsCertain: false
bootstrapFiles:
- tests/bootstrap.php
paths:
- src/
- tests/
3 changes: 0 additions & 3 deletions console/phpstan.src.neon

This file was deleted.

4 changes: 0 additions & 4 deletions console/phpstan.tests.neon

This file was deleted.

17 changes: 12 additions & 5 deletions console/psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.x-dev@">
<files psalm-version="5.13.1@086b94371304750d1c673315321a55d15fc59015">
<file src="src/Docs/Parser/ContentParser.php">
<RedundantCondition occurrences="2">
<code>!$node-&gt;attributes</code>
<code>!$node-&gt;attributes</code>
</RedundantCondition>
<PossiblyNullArgument>
<code>$anchor</code>
</PossiblyNullArgument>
<PossiblyNullPropertyFetch>
<code><![CDATA[$node->attributes->getNamedItem('id')->nodeValue]]></code>
</PossiblyNullPropertyFetch>
</file>
<file src="src/Index/Manager.php">
<PossiblyInvalidCast>
<code>end($aliases)</code>
</PossiblyInvalidCast>
</file>
</files>
3 changes: 3 additions & 0 deletions console/psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="psalm-baseline.xml"
findUnusedPsalmSuppress="true"
findUnusedBaselineEntry="true"
findUnusedCode="false"
>
<projectFiles>
<directory name="src" />
Expand Down
4 changes: 2 additions & 2 deletions console/src/Command/PopulateIndexCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,9 @@ protected function createBuildIndex(ConsoleIo $io, Manager $indexManager, string
];
$properties = [
'type' => ['type' => 'keyword', 'index' => false],
'priority' => ['type' => 'keyword', 'fielddata' => true],
'priority' => ['type' => 'keyword'],
'url' => ['type' => 'keyword', 'index' => false],
'page_url' => ['type' => 'keyword', 'fielddata' => true],
'page_url' => ['type' => 'keyword'],
'level' => ['type' => 'short'],
'max_level' => ['type' => 'short'],
'position' => ['type' => 'short'],
Expand Down
14 changes: 0 additions & 14 deletions console/tests/phpstan.php

This file was deleted.

6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
docutils==0.17.1
sphinx==4.3.1
sphinxcontrib-phpdomain==0.8.0
docutils==0.18.1
sphinx==6.2.1
sphinxcontrib-phpdomain==0.11.0
cakephpsphinx>=0.1.55,<1.0
2 changes: 1 addition & 1 deletion runtime.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build a small nginx container with just the static site in it.
FROM nginx:1.15-alpine
FROM nginx:1.25-alpine

# We also need PHP to update elastic search.
RUN apk add --update bash curl composer \
Expand Down