Skip to content

Remove the internal tag from Core classes used in other packages #1486

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2023
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
3 changes: 0 additions & 3 deletions src/Core/src/AwsError/AwsError.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

namespace AsyncAws\Core\AwsError;

/**
* @internal
*/
final class AwsError
{
/**
Expand Down
3 changes: 0 additions & 3 deletions src/Core/src/AwsError/AwsErrorFactoryFromResponseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

use Symfony\Contracts\HttpClient\ResponseInterface;

/**
* @internal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the trait non-final because it is the only implementation of createFromResponse and so it might be useful for #1485 when implementing an error factory internally.

Alternatively, we could remove createFromResponse from the interface, inlining the extraction of the createFromContent arguments. A class with a custom logic in createFromContent is incompatible with the chain factory anyway because the chain factory performs this extraction on its own and then calls only createFromContent

*/
trait AwsErrorFactoryFromResponseTrait
{
public function createFromResponse(ResponseInterface $response): AwsError
Expand Down
3 changes: 0 additions & 3 deletions src/Core/src/AwsError/AwsErrorFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@

use Symfony\Contracts\HttpClient\ResponseInterface;

/**
* @internal
*/
interface AwsErrorFactoryInterface
{
public function createFromResponse(ResponseInterface $response): AwsError;
Expand Down
5 changes: 1 addition & 4 deletions src/Core/src/AwsError/JsonRestAwsErrorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
use AsyncAws\Core\Exception\UnexpectedValue;
use AsyncAws\Core\Exception\UnparsableResponse;

/**
* @internal
*/
class JsonRestAwsErrorFactory implements AwsErrorFactoryInterface
final class JsonRestAwsErrorFactory implements AwsErrorFactoryInterface
{
use AwsErrorFactoryFromResponseTrait;

Expand Down
5 changes: 1 addition & 4 deletions src/Core/src/AwsError/JsonRpcAwsErrorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
use AsyncAws\Core\Exception\UnexpectedValue;
use AsyncAws\Core\Exception\UnparsableResponse;

/**
* @internal
*/
class JsonRpcAwsErrorFactory implements AwsErrorFactoryInterface
final class JsonRpcAwsErrorFactory implements AwsErrorFactoryInterface
{
use AwsErrorFactoryFromResponseTrait;

Expand Down
5 changes: 1 addition & 4 deletions src/Core/src/AwsError/XmlAwsErrorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
use AsyncAws\Core\Exception\UnexpectedValue;
use AsyncAws\Core\Exception\UnparsableResponse;

/**
* @internal
*/
class XmlAwsErrorFactory implements AwsErrorFactoryInterface
final class XmlAwsErrorFactory implements AwsErrorFactoryInterface
{
use AwsErrorFactoryFromResponseTrait;

Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/Input.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
* Representation of a AWS Request.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*/
abstract class Input
{
Expand Down
4 changes: 1 addition & 3 deletions src/Core/src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
* Representation of an HTTP Request.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*/
class Request
final class Request
{
/**
* @var string
Expand Down
4 changes: 1 addition & 3 deletions src/Core/src/RequestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
* Contains contextual information alongside a request.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*/
class RequestContext
final class RequestContext
{
public const AVAILABLE_OPTIONS = [
'region' => true,
Expand Down
4 changes: 1 addition & 3 deletions src/Core/src/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@
* The response provides a facade to manipulate HttpResponses.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*/
class Response
final class Response
{
/**
* @var ResponseInterface
Expand Down
4 changes: 1 addition & 3 deletions src/Core/src/Signer/SigningContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
use AsyncAws\Core\Request;

/**
* @internal
*
* @author Jérémy Derussé <jeremy@derusse.com>
*/
class SigningContext
final class SigningContext
{
/**
* @var Request
Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/Stream/FixedSizeStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* A Stream decorator that return Chunk with the same exact size.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*/
final class FixedSizeStream implements RequestStream
{
Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/Stream/IterableStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* Convert an iterator into a Stream.
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of all these stream classes, this IterableStream could stay internal if the S3 signer uses the factory instead. but other special streams can only be used directly.

*/
final class IterableStream implements ReadOnceResultStream, RequestStream
{
Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/Stream/ReadOnceResultStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

/**
* Marker for ResultStream that can be read only once.
*
* @internal
*/
interface ReadOnceResultStream
{
Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/Stream/RequestStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*
* @extends \IteratorAggregate<string>
*/
interface RequestStream extends \IteratorAggregate
Expand Down
2 changes: 0 additions & 2 deletions src/Core/src/Stream/RewindableStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
* - hash
*
* @author Jérémy Derussé <jeremy@derusse.com>
*
* @internal
*/
final class RewindableStream implements RequestStream
{
Expand Down