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/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
php: ['7.2', '7.3', '7.4', '8.0']
php: ['7.2', '7.3', '7.4', '8.0', '8.1']

steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Yii Framework 2 apidoc extension Change Log
-----------------------

- Bug #313: Fix deprecation error `Method deprecated, use ::getParameters()` (mspirkov)
- Bug #317: Fix `trim` deprecation errors `Passing null to parameter #1 ($string) of type string is deprecated` (mspirkov)


3.0.7 February 13, 2025
Expand Down
4 changes: 2 additions & 2 deletions commands/ApiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ApiController extends BaseController
*/
public $guidePrefix = 'guide-';
/**
* @var string Repository url (e.g. "https://github.com/yiisoft/yii2"). Optional, used for resolving relative links
* @var string|null Repository url (e.g. "https://github.com/yiisoft/yii2"). Optional, used for resolving relative links
* within a repository (e.g. "[docs/guide/README.md](docs/guide/README.md)"). If you don't have such links you can
* skip this. Otherwise, skipping this will cause generation of broken links because they will be not resolved and
* left as is.
Expand Down Expand Up @@ -74,7 +74,7 @@ public function actionIndex(array $sourceDirs, $targetDir)
}
}

$renderer->repoUrl = rtrim($this->repoUrl, '/');
$renderer->repoUrl = $this->repoUrl !== null ? rtrim($this->repoUrl, '/') : null;

// search for files to process
if (($files = $this->searchFiles($sourceDirs)) === false) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"scrivo/highlight.php": "^9.0"
},
"require-dev": {
"phpunit/phpunit": "*"
"phpunit/phpunit": "^8.5"
},
"repositories": [
{
Expand Down
5 changes: 3 additions & 2 deletions models/ClassDoc.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class ClassDoc extends TypeDoc
{
/**
* @var string
* @var string|null
*/
public $parentClass;
/**
Expand Down Expand Up @@ -101,7 +101,8 @@ public function __construct($reflector = null, $context = null, $config = [])
return;
}

$this->parentClass = ltrim($reflector->getParent(), '\\');
$reflectorParent = $reflector->getParent();
$this->parentClass = $reflectorParent !== null ? ltrim($reflectorParent, '\\') : null;
if (empty($this->parentClass)) {
$this->parentClass = null;
}
Expand Down
Loading