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
2 changes: 0 additions & 2 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'protected_to_private' => false,
'declare_strict_types' => false,
'header_comment' => ['header' => $fileHeader],
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
])
Expand Down
20 changes: 9 additions & 11 deletions examples/client/http_client_communication.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

/**
* HTTP Client Communication Example.
*
Expand All @@ -20,17 +29,6 @@
* Eg. symfony serve --passthru=examples/server/client-communication/server.php --no-tls
*/

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

require_once __DIR__.'/../../vendor/autoload.php';

use Mcp\Client;
Expand Down
20 changes: 9 additions & 11 deletions examples/client/http_discovery_calculator.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

/**
* HTTP Client Example.
*
Expand All @@ -12,17 +21,6 @@
* php -S localhost:8080 examples/server/http-discovery-calculator/server.php
*/

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

require_once __DIR__.'/../../vendor/autoload.php';

use Mcp\Client;
Expand Down
20 changes: 9 additions & 11 deletions examples/client/stdio_client_communication.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

/**
* STDIO Client Communication Example.
*
Expand All @@ -11,17 +20,6 @@
* Usage: php examples/client/stdio_client_communication.php
*/

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
* A collaboration between Symfony and the PHP Foundation.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

require_once __DIR__.'/../../vendor/autoload.php';

use Mcp\Client;
Expand Down
20 changes: 9 additions & 11 deletions examples/client/stdio_discovery_calculator.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
<?php

/**
* Simple STDIO Client Example.
*
* This example demonstrates how to use the MCP client with a STDIO transport
* to communicate with an MCP server running as a child process.
*
* Usage: php examples/client/stdio_discovery_calculator.php
*/

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand All @@ -20,6 +9,15 @@
* file that was distributed with this source code.
*/

/**
* Simple STDIO Client Example.
*
* This example demonstrates how to use the MCP client with a STDIO transport
* to communicate with an MCP server running as a child process.
*
* Usage: php examples/client/stdio_discovery_calculator.php
*/

require_once __DIR__.'/../../vendor/autoload.php';

use Mcp\Client;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/cached-discovery/server.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/elicitation/ElicitationHandlers.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/elicitation/server.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/usr/bin/env php
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/oauth-keycloak/McpElements.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/oauth-keycloak/server.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/oauth-microsoft/McpElements.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions examples/server/oauth-microsoft/server.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ parameters:
- tests/Unit/Capability/Discovery/SchemaGeneratorFixture.php
treatPhpDocTypesAsCertain: false
ignoreErrors:
-
message: "#^Method .*::test.*\\(\\) has no return type specified\\.$#"
-
identifier: missingType.iterableValue
path: tests/
Expand Down
2 changes: 0 additions & 2 deletions src/Event/ErrorEvent.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Event/NotificationEvent.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Event/RequestEvent.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Event/ResponseEvent.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Exception/ClientException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Elicitation/AbstractSchemaDefinition.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Elicitation/BooleanSchemaDefinition.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Elicitation/ElicitationSchema.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Elicitation/EnumSchemaDefinition.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Elicitation/NumberSchemaDefinition.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Elicitation/StringSchemaDefinition.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Enum/ElicitAction.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Request/ElicitRequest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Schema/Result/ElicitResult.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Server/NativeClock.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Server/Session/FileSessionStore.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Server/Session/InMemorySessionStore.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Server/Session/Psr16SessionStore.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
2 changes: 0 additions & 2 deletions src/Server/Session/Session.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/*
* This file is part of the official PHP MCP SDK.
*
Expand Down
Loading
Loading