Skip to content

Commit

Permalink
Improve docbuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jul 14, 2023
1 parent ff743d1 commit 1255e1c
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs
Submodule docs updated 165 files
1 change: 1 addition & 0 deletions src/ContextConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use Amp\Socket\SocketConnector;
use Throwable;

/** @internal */
final class ContextConnector implements SocketConnector
{
public function __construct(private DoHWrapper $doHWrapper, private LoggerGetter $loggerGetter, private bool $fromDns = false)
Expand Down
1 change: 1 addition & 0 deletions tests/danog/MadelineProto/DataCenterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

\define('MADELINEPROTO_TEST', 'pony');

/** @internal */
final class DataCenterTest extends AsyncTestCase
{
/**
Expand Down
1 change: 1 addition & 0 deletions tests/danog/MadelineProto/EntitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use danog\MadelineProto\StrTools;

/** @internal */
class EntitiesTest extends MadelineTestCase
{
public function testMb(): void
Expand Down
1 change: 1 addition & 0 deletions tests/danog/MadelineProto/FileIdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use const CURLOPT_POSTFIELDS;
use const CURLOPT_RETURNTRANSFER;

/** @internal */
class FileIdTest extends MadelineTestCase
{
/**
Expand Down
1 change: 1 addition & 0 deletions tests/danog/MadelineProto/MadelineTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use danog\MadelineProto\Logger;
use PHPUnit\Framework\TestCase;

/** @internal */
abstract class MadelineTestCase extends TestCase
{
/**
Expand Down
1 change: 1 addition & 0 deletions tests/danog/MadelineProto/WaveformTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use danog\MadelineProto\TL\TL;
use PHPUnit\Framework\TestCase;

/** @internal */
class WaveformTest extends TestCase
{
/**
Expand Down
7 changes: 4 additions & 3 deletions tests/makephar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ k
rm -f madeline.phar testing.madeline*

tail -F MadelineProto.log &

: '
echo "Testing with previous version..."
export ACTIONS_FORCE_PREVIOUS=1
cp tools/phar.php madeline.php
runTest
db mysql serialize
k

'
echo "Testing with new version (upgrade)..."
rm -f madeline-*phar madeline.version

Expand All @@ -172,7 +172,8 @@ echo -n "TESTING" > "madeline.version"
echo 0.0.0.0 phar.madelineproto.xyz > /etc/hosts
cp tools/phar.php madeline.php
export ACTIONS_PHAR=1
runTestSimple
#runTestSimple
runTest
cycledb
k

Expand Down
8 changes: 8 additions & 0 deletions tools/phpdoc.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php declare(strict_types=1);

use danog\MadelineProto\AbstractAPI;
use danog\MadelineProto\AbstractAPIFactory;
use danog\MadelineProto\AnnotationsBuilder;
use danog\MadelineProto\APIFactory;
Expand All @@ -15,6 +16,7 @@
use danog\MadelineProto\DocsBuilder;
use danog\MadelineProto\DoHConnector;
use danog\MadelineProto\GarbageCollector;
use danog\MadelineProto\InternalDoc;
use danog\MadelineProto\Lang;
use danog\MadelineProto\LightState;
use danog\MadelineProto\Magic;
Expand Down Expand Up @@ -44,6 +46,9 @@
require 'vendor/autoload.php';

$ignore = [ // Disallow list
AbstractAPI::class,
InternalDoc::class,

AnnotationsBuilder::class,
APIFactory::class,
APIWrapper::class,
Expand Down Expand Up @@ -100,6 +105,7 @@
|| str_starts_with($class, 'danog\\MadelineProto\\Loop\\Update')
|| str_starts_with($class, 'danog\\MadelineProto\\Loop\\Connection')
|| str_starts_with($class, 'danog\\MadelineProto\\MTProto\\')
|| str_starts_with($class, 'danog\\MadelineProto\\Namespace\\')
|| str_starts_with($class, 'danog\\MadelineProto\\MTProtoSession\\')
|| str_starts_with($class, 'danog\\MadelineProto\\PhpDoc\\')
|| str_starts_with($class, 'danog\\MadelineProto\\Stream\\')
Expand All @@ -113,6 +119,8 @@
return !$class->isTrait();
};

shell_exec("rm -rf ".__DIR__.'/../docs/docs/PHP/');

PhpDocBuilder::fromNamespace()
->setFilter($filter)
->setOutput(__DIR__.'/../docs/docs/PHP/')
Expand Down

0 comments on commit 1255e1c

Please sign in to comment.