Skip to content

Commit 74ec5aa

Browse files
committed
PHP 8.0 support
1 parent f48be20 commit 74ec5aa

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ php:
55
- 7.2
66
- 7.3
77
- 7.4
8+
- 8.0
89

910
before_script:
1011
- wget http://getcomposer.org/composer.phar

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"require": {
1515
"php": ">=7.1",
1616
"phpfui/phpfui": "^6.0",
17-
"scrivo/highlight.php": "^9.17",
17+
"scrivo/highlight.php": ">=9.17",
1818
"phpdocumentor/reflection-docblock": ">=4.0",
1919
"gitonomy/gitlib": "^1.2",
2020
"cebe/markdown": "^1.2"
@@ -23,7 +23,7 @@
2323
"psr-0": {"PHPFUI\\InstaDoc\\": "src/"}
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "^7.0|>=8.0",
26+
"phpunit/phpunit": ">=7.0",
2727
"phpfui/html-unit-tester": "^1.0",
2828
"roave/security-advisories": "dev-master",
2929
"phpfui/phpunit-syntax-coverage": "^1.0"

src/PHPFUI/InstaDoc/Section/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function generate(\PHPFUI\InstaDoc\PageInterface $page, string $fullClass
1313

1414
if (! file_exists($fullClassPath))
1515
{
16-
$fullClassPath = $this->controller->getGitFileOffset() . $fullClassPath;
16+
$fullClassPath = $this->controller->getGitFileOffset() . '/' . $fullClassPath;
1717
}
1818
$ts = $this->controller->getParameter(\PHPFUI\InstaDoc\Controller::TAB_SIZE, 2);
1919

tests/SectionTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public function setUp() : void
4545
$this->fileManager->addNamespace('PHPFUI', './src', true);
4646
$this->fileManager->rescan();
4747
$this->controller = new \PHPFUI\InstaDoc\Controller($this->fileManager);
48+
$this->controller->setGitFileOffset('/src');
4849
}
4950

5051
public function testHaveSections() : void
@@ -70,9 +71,9 @@ public function testClassesGenerateValidHTML() : void
7071
{
7172
$this->controller->setParameters($this->controller->getClassParts($section));
7273

73-
foreach ([\PHPFUI\InstaDoc\Controller::DOC_PAGE, \PHPFUI\InstaDoc\Controller::FILE_PAGE, \PHPFUI\InstaDoc\Controller::GIT_PAGE] as $page)
74+
foreach ([\PHPFUI\InstaDoc\Controller::DOC_PAGE, \PHPFUI\InstaDoc\Controller::FILE_PAGE, \PHPFUI\InstaDoc\Controller::GIT_PAGE] as $type)
7475
{
75-
$this->controller->setParameter(\PHPFUI\InstaDoc\Controller::PAGE, $page);
76+
$this->controller->setParameter(\PHPFUI\InstaDoc\Controller::PAGE, $type);
7677
$page = $this->controller->display(\PHPFUI\InstaDoc\Controller::VALID_CLASS_PAGES, $this->controller->getPage());
7778
$this->assertValidHtml("{$page}");
7879
$this->assertNotWarningHtml("{$page}");

0 commit comments

Comments
 (0)