Skip to content
Open
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
6 changes: 0 additions & 6 deletions .doctrine-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
"slug": "0.2",
"maintained": false
},
{
"name": "0.2",
"branchName": "0.2.x",
"slug": "0.2",
"maintained": false
},
{
"name": "0.1",
"branchName": "0.1.x",
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ env:
jobs:
phpunit:
name: "PHPUnit"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@3.0.0"
uses: "doctrine/.github/.github/workflows/continuous-integration.yml@13.1.0"
with:
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]'
php-versions: '["7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"]'
secrets:
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
30 changes: 3 additions & 27 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,6 @@ on:
- "tests/**"

jobs:
static-analysis-phpstan:
name: "Static Analysis with PHPStan"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "8.1"

steps:
- name: "Checkout code"
uses: "actions/checkout@v3"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
composer-options: "${{ inputs.composer-options }}"

- name: "Run a static analysis with phpstan/phpstan"
run: "vendor/bin/phpstan analyse"
static-analysis:
name: "Static Analysis"
uses: "doctrine/.github/.github/workflows/phpstan.yml@13.1.0"
20 changes: 20 additions & 0 deletions .github/workflows/website-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Website config validation"

on:
pull_request:
branches:
- "*.x"
paths:
- ".doctrine-project.json"
- ".github/workflows/website-schema.yml"
push:
branches:
- "*.x"
paths:
- ".doctrine-project.json"
- ".github/workflows/website-schema.yml"

jobs:
json-validate:
name: "Validate JSON schema"
uses: "doctrine/.github/.github/workflows/website-schema.yml@7.2.2"
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
"require": {
"php": "^7.2 || ^8.0",
"doctrine/event-manager": "^1.0 || ^2.0",
"symfony/filesystem": "^4.1 || ^5.0 || ^6.0",
"symfony/finder": "^4.1 || ^5.0 || ^6.0",
"symfony/filesystem": "^4.1 || ^5.0 || ^6.0 || ^7.0 || ^8.0",
"symfony/finder": "^4.1 || ^5.0 || ^6.0 || ^7.0 || ^8.0",
"symfony/polyfill-mbstring": "^1.0",
"symfony/string": "^5.3 || ^6.0",
"symfony/string": "^5.3 || ^6.0 || ^7.0 || ^8.0",
"symfony/translation-contracts": "^1.1 || ^2.0 || ^3.0",
"twig/twig": "^2.9 || ^3.3"
},
Expand All @@ -41,8 +41,8 @@
"phpstan/phpstan-phpunit": "^1.2",
"phpstan/phpstan-strict-rules": "^1.4",
"phpunit/phpunit": "^7.5 || ^8.0 || ^9.0",
"symfony/css-selector": "4.4 || ^5.2 || ^6.0",
"symfony/dom-crawler": "4.4 || ^5.2 || ^6.0"
"symfony/css-selector": "4.4 || ^5.2 || ^6.0 || ^7.0 || ^8.0",
"symfony/dom-crawler": "4.4 || ^5.2 || ^6.0 || ^7.0 || ^8.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions lib/Nodes/Table/TableColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
use Doctrine\RST\Nodes\Node;
use LogicException;

use function mb_convert_encoding;
use function strlen;
use function trim;
use function utf8_encode;

final class TableColumn
{
Expand All @@ -27,7 +27,7 @@ final class TableColumn

public function __construct(string $content, int $colSpan)
{
$this->content = utf8_encode(trim($content));
$this->content = mb_convert_encoding(trim($content), 'UTF-8', 'ISO-8859-1');
$this->colSpan = $colSpan;
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Nodes/TableNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
use function implode;
use function ksort;
use function max;
use function mb_convert_encoding;
use function preg_match;
use function sprintf;
use function str_repeat;
use function strlen;
use function strpos;
use function substr;
use function trim;
use function utf8_decode;

class TableNode extends Node
{
Expand Down Expand Up @@ -136,7 +136,7 @@ public function pushContentLine(string $line): void
throw new LogicException('Cannot push data after TableNode is compiled');
}

$this->rawDataLines[$this->currentLineNumber] = utf8_decode($line);
$this->rawDataLines[$this->currentLineNumber] = mb_convert_encoding($line, 'ISO-8859-1', 'UTF-8');
$this->currentLineNumber++;
}

Expand Down
6 changes: 6 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ parameters:

ignoreErrors:
- '#Variable method call on Doctrine\\RST\\Nodes\\DocumentNode\.#'
-
message: '#Only booleans are allowed in a ternary operator condition, string given\.#'
path: lib/Span/SpanProcessor.php
-
message: '#Only booleans are allowed in an if condition, string given\.#'
path: lib/Span/SpanProcessor.php
Loading