Skip to content

Commit

Permalink
Merge remote-tracking branch 'intertelesa/itl' into support-php81
Browse files Browse the repository at this point in the history
  • Loading branch information
smarthall committed Dec 22, 2023
2 parents 0154729 + 90bac38 commit c068ce4
Show file tree
Hide file tree
Showing 1,227 changed files with 17,923 additions and 977 deletions.
50 changes: 49 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,52 @@ jobs:
- store_test_results:
path: /tmp/phpunit

test_8_0:
docker:
- image: circleci/php:8.0-node-browsers
steps:
- checkout
- run: sudo docker-php-ext-install sockets
- restore_cache:
keys:
- v3_composer_{{ .Branch }}
- run:
command: |
composer update --prefer-dist --no-progress --classmap-authoritative
- save_cache:
key: v3_composer_{{ .Branch }}
paths:
- ~/.composer/cache
- run:
command: |
mkdir -p /tmp/phpunit
PHPUNIT_FLAGS="--log-junit /tmp/phpunit/junit.xml" make -e test
- store_test_results:
path: /tmp/phpunit

test_8_0_lowest:
docker:
- image: circleci/php:8.0-node-browsers
steps:
- checkout
- run: sudo docker-php-ext-install sockets
- restore_cache:
keys:
- v3_composer_lowest_{{ .Branch }}
- run:
command: |
composer update --prefer-dist --no-progress --classmap-authoritative --prefer-lowest
- save_cache:
key: v3_composer_lowest_{{ .Branch }}
paths:
- ~/.composer/cache
- run:
command: |
mkdir -p /tmp/phpunit
PHPUNIT_FLAGS="--log-junit /tmp/phpunit/junit.xml" make -e lint phpunit
- store_test_results:
path: /tmp/phpunit

check_protocol:
docker:
- image: circleci/php:7.3-node-browsers
Expand All @@ -157,7 +203,7 @@ jobs:
autoupdate_protocol:
docker:
- image: circleci/php:7.3-node-browsers
- image: circleci/php:8.0-node-browsers
steps:
- checkout
- run: sudo docker-php-ext-install sockets
Expand Down Expand Up @@ -205,6 +251,8 @@ workflows:
- test_7_3_lowest
- test_7_4
- test_7_4_lowest
- test_8_0
- test_8_0_lowest
- check_protocol

nightly:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ phpunit:
./vendor/bin/phpunit $(PHPUNIT_FLAGS)

phpstan:
./vendor/bin/phpstan analyse --level=6 --configuration=phpstan.neon --memory-limit=1g gen-src src test
./vendor/bin/phpstan analyse --level=5 --configuration=phpstan.neon --memory-limit=1g gen-src src test
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
"require": {
"ext-json": "*",
"guzzlehttp/guzzle": "^6.3|^7.0",
"php": "~7.1|^8",
"php": "^7.2|^8.0",
"symfony/filesystem": ">=2.3",
"symfony/process": ">=3.3",
"wrench/wrench": "~2.0.10"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "~1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.2",
"nette/php-generator": "~2.1|~3.0",
"phpstan/phpstan": "^1.3",
"phpunit/phpunit": "^9.5"
Expand Down
36 changes: 36 additions & 0 deletions gen-src/ChromeDevtoolsProtocol/DevtoolsClientInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
use ChromeDevtoolsProtocol\Domain\DOMStorageDomainInterface;
use ChromeDevtoolsProtocol\Domain\DatabaseDomainInterface;
use ChromeDevtoolsProtocol\Domain\DebuggerDomainInterface;
use ChromeDevtoolsProtocol\Domain\DeviceAccessDomainInterface;
use ChromeDevtoolsProtocol\Domain\DeviceOrientationDomainInterface;
use ChromeDevtoolsProtocol\Domain\EmulationDomainInterface;
use ChromeDevtoolsProtocol\Domain\EventBreakpointsDomainInterface;
use ChromeDevtoolsProtocol\Domain\FedCmDomainInterface;
use ChromeDevtoolsProtocol\Domain\FetchDomainInterface;
use ChromeDevtoolsProtocol\Domain\HeadlessExperimentalDomainInterface;
use ChromeDevtoolsProtocol\Domain\HeapProfilerDomainInterface;
Expand All @@ -35,6 +38,7 @@
use ChromeDevtoolsProtocol\Domain\PageDomainInterface;
use ChromeDevtoolsProtocol\Domain\PerformanceDomainInterface;
use ChromeDevtoolsProtocol\Domain\PerformanceTimelineDomainInterface;
use ChromeDevtoolsProtocol\Domain\PreloadDomainInterface;
use ChromeDevtoolsProtocol\Domain\ProfilerDomainInterface;
use ChromeDevtoolsProtocol\Domain\RuntimeDomainInterface;
use ChromeDevtoolsProtocol\Domain\SchemaDomainInterface;
Expand Down Expand Up @@ -139,6 +143,14 @@ public function database(): DatabaseDomainInterface;
public function debugger(): DebuggerDomainInterface;


/**
* DeviceAccess domain.
*
* @experimental
*/
public function deviceAccess(): DeviceAccessDomainInterface;


/**
* DeviceOrientation domain.
*
Expand Down Expand Up @@ -181,6 +193,22 @@ public function domStorage(): DOMStorageDomainInterface;
public function emulation(): EmulationDomainInterface;


/**
* EventBreakpoints permits setting breakpoints on particular operations and events in targets that run JavaScript but do not have a DOM. JavaScript execution will stop on these operations as if there was a regular breakpoint set.
*
* @experimental
*/
public function eventBreakpoints(): EventBreakpointsDomainInterface;


/**
* This domain allows interacting with the FedCM dialog.
*
* @experimental
*/
public function fedCm(): FedCmDomainInterface;


/**
* A domain for letting clients substitute browser's network layer with client code.
*/
Expand Down Expand Up @@ -295,6 +323,14 @@ public function performance(): PerformanceDomainInterface;
public function performanceTimeline(): PerformanceTimelineDomainInterface;


/**
* Preload domain.
*
* @experimental
*/
public function preload(): PreloadDomainInterface;


/**
* Profiler domain.
*/
Expand Down
56 changes: 56 additions & 0 deletions gen-src/ChromeDevtoolsProtocol/DevtoolsClientTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,16 @@
use ChromeDevtoolsProtocol\Domain\DatabaseDomainInterface;
use ChromeDevtoolsProtocol\Domain\DebuggerDomain;
use ChromeDevtoolsProtocol\Domain\DebuggerDomainInterface;
use ChromeDevtoolsProtocol\Domain\DeviceAccessDomain;
use ChromeDevtoolsProtocol\Domain\DeviceAccessDomainInterface;
use ChromeDevtoolsProtocol\Domain\DeviceOrientationDomain;
use ChromeDevtoolsProtocol\Domain\DeviceOrientationDomainInterface;
use ChromeDevtoolsProtocol\Domain\EmulationDomain;
use ChromeDevtoolsProtocol\Domain\EmulationDomainInterface;
use ChromeDevtoolsProtocol\Domain\EventBreakpointsDomain;
use ChromeDevtoolsProtocol\Domain\EventBreakpointsDomainInterface;
use ChromeDevtoolsProtocol\Domain\FedCmDomain;
use ChromeDevtoolsProtocol\Domain\FedCmDomainInterface;
use ChromeDevtoolsProtocol\Domain\FetchDomain;
use ChromeDevtoolsProtocol\Domain\FetchDomainInterface;
use ChromeDevtoolsProtocol\Domain\HeadlessExperimentalDomain;
Expand Down Expand Up @@ -68,6 +74,8 @@
use ChromeDevtoolsProtocol\Domain\PerformanceDomainInterface;
use ChromeDevtoolsProtocol\Domain\PerformanceTimelineDomain;
use ChromeDevtoolsProtocol\Domain\PerformanceTimelineDomainInterface;
use ChromeDevtoolsProtocol\Domain\PreloadDomain;
use ChromeDevtoolsProtocol\Domain\PreloadDomainInterface;
use ChromeDevtoolsProtocol\Domain\ProfilerDomain;
use ChromeDevtoolsProtocol\Domain\ProfilerDomainInterface;
use ChromeDevtoolsProtocol\Domain\RuntimeDomain;
Expand Down Expand Up @@ -231,6 +239,18 @@ public function debugger(): DebuggerDomainInterface
}


public function deviceAccess(): DeviceAccessDomainInterface
{
if (!isset($this->domains['DeviceAccess'])) {
/** @var InternalClientInterface $this */
$this->domains['DeviceAccess'] = new DeviceAccessDomain($this);
}
/** @var DeviceAccessDomainInterface $domain */
$domain = $this->domains['DeviceAccess'];
return $domain;
}


public function deviceOrientation(): DeviceOrientationDomainInterface
{
if (!isset($this->domains['DeviceOrientation'])) {
Expand Down Expand Up @@ -303,6 +323,30 @@ public function emulation(): EmulationDomainInterface
}


public function eventBreakpoints(): EventBreakpointsDomainInterface
{
if (!isset($this->domains['EventBreakpoints'])) {
/** @var InternalClientInterface $this */
$this->domains['EventBreakpoints'] = new EventBreakpointsDomain($this);
}
/** @var EventBreakpointsDomainInterface $domain */
$domain = $this->domains['EventBreakpoints'];
return $domain;
}


public function fedCm(): FedCmDomainInterface
{
if (!isset($this->domains['FedCm'])) {
/** @var InternalClientInterface $this */
$this->domains['FedCm'] = new FedCmDomain($this);
}
/** @var FedCmDomainInterface $domain */
$domain = $this->domains['FedCm'];
return $domain;
}


public function fetch(): FetchDomainInterface
{
if (!isset($this->domains['Fetch'])) {
Expand Down Expand Up @@ -495,6 +539,18 @@ public function performanceTimeline(): PerformanceTimelineDomainInterface
}


public function preload(): PreloadDomainInterface
{
if (!isset($this->domains['Preload'])) {
/** @var InternalClientInterface $this */
$this->domains['Preload'] = new PreloadDomain($this);
}
/** @var PreloadDomainInterface $domain */
$domain = $this->domains['Preload'];
return $domain;
}


public function profiler(): ProfilerDomainInterface
{
if (!isset($this->domains['Profiler'])) {
Expand Down
51 changes: 51 additions & 0 deletions gen-src/ChromeDevtoolsProtocol/Domain/AccessibilityDomain.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@

use ChromeDevtoolsProtocol\ContextInterface;
use ChromeDevtoolsProtocol\InternalClientInterface;
use ChromeDevtoolsProtocol\Model\Accessibility\GetAXNodeAndAncestorsRequest;
use ChromeDevtoolsProtocol\Model\Accessibility\GetAXNodeAndAncestorsResponse;
use ChromeDevtoolsProtocol\Model\Accessibility\GetChildAXNodesRequest;
use ChromeDevtoolsProtocol\Model\Accessibility\GetChildAXNodesResponse;
use ChromeDevtoolsProtocol\Model\Accessibility\GetFullAXTreeRequest;
use ChromeDevtoolsProtocol\Model\Accessibility\GetFullAXTreeResponse;
use ChromeDevtoolsProtocol\Model\Accessibility\GetPartialAXTreeRequest;
use ChromeDevtoolsProtocol\Model\Accessibility\GetPartialAXTreeResponse;
use ChromeDevtoolsProtocol\Model\Accessibility\GetRootAXNodeRequest;
use ChromeDevtoolsProtocol\Model\Accessibility\GetRootAXNodeResponse;
use ChromeDevtoolsProtocol\Model\Accessibility\LoadCompleteEvent;
use ChromeDevtoolsProtocol\Model\Accessibility\NodesUpdatedEvent;
use ChromeDevtoolsProtocol\Model\Accessibility\QueryAXTreeRequest;
use ChromeDevtoolsProtocol\Model\Accessibility\QueryAXTreeResponse;
use ChromeDevtoolsProtocol\SubscriptionInterface;

class AccessibilityDomain implements AccessibilityDomainInterface
{
Expand Down Expand Up @@ -39,6 +46,15 @@ public function enable(ContextInterface $ctx): void
}


public function getAXNodeAndAncestors(
ContextInterface $ctx,
GetAXNodeAndAncestorsRequest $request
): GetAXNodeAndAncestorsResponse {
$response = $this->internalClient->executeCommand($ctx, 'Accessibility.getAXNodeAndAncestors', $request);
return GetAXNodeAndAncestorsResponse::fromJson($response);
}


public function getChildAXNodes(ContextInterface $ctx, GetChildAXNodesRequest $request): GetChildAXNodesResponse
{
$response = $this->internalClient->executeCommand($ctx, 'Accessibility.getChildAXNodes', $request);
Expand All @@ -60,9 +76,44 @@ public function getPartialAXTree(ContextInterface $ctx, GetPartialAXTreeRequest
}


public function getRootAXNode(ContextInterface $ctx, GetRootAXNodeRequest $request): GetRootAXNodeResponse
{
$response = $this->internalClient->executeCommand($ctx, 'Accessibility.getRootAXNode', $request);
return GetRootAXNodeResponse::fromJson($response);
}


public function queryAXTree(ContextInterface $ctx, QueryAXTreeRequest $request): QueryAXTreeResponse
{
$response = $this->internalClient->executeCommand($ctx, 'Accessibility.queryAXTree', $request);
return QueryAXTreeResponse::fromJson($response);
}


public function addLoadCompleteListener(callable $listener): SubscriptionInterface
{
return $this->internalClient->addListener('Accessibility.loadComplete', function ($event) use ($listener) {
return $listener(LoadCompleteEvent::fromJson($event));
});
}


public function awaitLoadComplete(ContextInterface $ctx): LoadCompleteEvent
{
return LoadCompleteEvent::fromJson($this->internalClient->awaitEvent($ctx, 'Accessibility.loadComplete'));
}


public function addNodesUpdatedListener(callable $listener): SubscriptionInterface
{
return $this->internalClient->addListener('Accessibility.nodesUpdated', function ($event) use ($listener) {
return $listener(NodesUpdatedEvent::fromJson($event));
});
}


public function awaitNodesUpdated(ContextInterface $ctx): NodesUpdatedEvent
{
return NodesUpdatedEvent::fromJson($this->internalClient->awaitEvent($ctx, 'Accessibility.nodesUpdated'));
}
}
Loading

0 comments on commit c068ce4

Please sign in to comment.