deprecatedClassMessage example

/** * @deprecated tag:v6.6.0 - will be removed, use RoutingException::invalidRequestParameter instead */
#[Package('core')] class InvalidRequestParameterException extends RoutingException
{
    public function __construct(string $name)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use RoutingException::invalidRequestParameter instead')
        );

        parent::__construct(
            Response::HTTP_BAD_REQUEST,
            self::INVALID_REQUEST_PARAMETER_CODE,
            'The parameter "{{ parameter }}" is invalid.',
            ['parameter' => $name]
        );
    }
}
/** * @deprecated tag:v6.6.0 - will be removed, use MediaException::mediaFolderNotFound instead */
#[Package('buyers-experience')] class MediaFolderNotFoundException extends MediaException
{
    public function __construct(string $folderId)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use MediaException::mediaFolderNotFound instead')
        );

        parent::__construct(
            Response::HTTP_NOT_FOUND,
            self::MEDIA_FOLDER_NOT_FOUND,
            'Could not find media folder with id: "{{ folderId }}"',
            ['folderId' => $folderId]
        );
    }

    public function getErrorCode(): string
    {
/** * @deprecated tag:v6.6.0 - will be removed, use MediaException::missingFile instead */
#[Package('buyers-experience')] class MissingFileException extends MediaException
{
    public function __construct(string $mediaId)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use MediaException::missingFile instead')
        );

        parent::__construct(
            Response::HTTP_NOT_FOUND,
            self::MEDIA_MISSING_FILE,
            'Could not find file for media with id: "{{ mediaId }}"',
            ['mediaId' => $mediaId]
        );
    }

    public function getErrorCode(): string
    {

    private ?array $states = null;

    /** * @param array{maxAge?: int, states?: list<string>} $values */
    public function __construct(array $values)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0')
        );

        $this->maxAge = $values['maxAge'] ?? null;
        $this->states = $values['states'] ?? null;
    }

    public function getAliasName(): string
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0')
        );
/** * @deprecated tag:v6.6.0 - will be removed. Use StoreException::extensionInstallException instead. */
#[Package('merchant-services')] class ExtensionInstallException extends StoreException
{
    public function __construct(string $message, array $parameters = [], ?\Throwable $e = null)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'Use StoreException::extensionInstallException instead.')
        );

        parent::__construct(
            Response::HTTP_INTERNAL_SERVER_ERROR,
            StoreException::EXTENSION_INSTALL,
            $message,
            $parameters,
            $e
        );
    }
}
/** * @internal */
    public function __construct(
        private readonly AbstractSeoResolver $decorated,
        private readonly CacheInterface $cache
    ) {
    }

    public function getDecorated(): AbstractSeoResolver
    {
        Feature::triggerDeprecationOrThrow('v6.6.0.0', Feature::deprecatedClassMessage(self::class, 'v6.6.0.0'));

        return $this->decorated;
    }

    /** * @return ResolvedSeoUrl */
    public function resolve(string $languageId, string $salesChannelId, string $pathInfo): array
    {
        Feature::triggerDeprecationOrThrow('v6.6.0.0', Feature::deprecatedClassMessage(self::class, 'v6.6.0.0'));

        


    /** * @param array<string, mixed> $payload * * @return array<string, mixed> */
    public function convert(string $entityName, array $payload): array
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(__CLASS__, 'v6.6.0.0')
        );

        foreach ($this->converters as $converter) {
            $payload = $converter->convert($entityName$payload);
        }

        return $payload;
    }

    /** * @return iterable<ApiConverter> */

#[Package('merchant-services')] class ExtensionUpdateRequiresConsentAffirmationException extends StoreException
{
    public function __construct(
        string $message,
        array $parameters = [],
        ?\Throwable $e = null
    ) {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'Use StoreException::extensionUpdateRequiresConsentAffirmationException instead.')
        );

        parent::__construct(
            Response::HTTP_INTERNAL_SERVER_ERROR,
            StoreException::EXTENSION_UPDATE_REQUIRES_CONSENT_AFFIRMATION,
            $message,
            $parameters,
            $e
        );
    }

    

#[Package('core')] class StructDecoder implements DecoderInterface
{
    /** * @return array|mixed */
    public function decode(string $data, string $format, array $context = [])
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(__CLASS__, 'v6.6.0.0')
        );

        return $this->format($data);
    }

    public function supportsDecoding(string $format): bool
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(__CLASS__, 'v6.6.0.0')
        );

        
/** * @deprecated tag:v6.6.0 - will be removed, use MediaException::strategyNotFound instead */
#[Package('buyers-experience')] class StrategyNotFoundException extends MediaException
{
    public function __construct(string $strategyName)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use MediaException::strategyNotFound instead')
        );

        parent::__construct(
            Response::HTTP_NOT_FOUND,
            self::MEDIA_STRATEGY_NOT_FOUND,
            'No Strategy with name "{{ strategyName }}" found.',
            ['strategyName' => $strategyName]
        );
    }

    public function getErrorCode(): string
    {

#[Package('buyers-experience')] class FileExtensionNotSupportedException extends MediaException
{
    public function __construct(
        string $mediaId,
        string $extension
    ) {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use MediaException::fileExtensionNotSupported instead')
        );

        parent::__construct(
            Response::HTTP_BAD_REQUEST,
            self::MEDIA_FILE_TYPE_NOT_SUPPORTED,
            'The file extension "{{ extension }}" for media object with id {{ mediaId }} is not supported.',
            ['mediaId' => $mediaId, 'extension' => $extension]
        );
    }

    public function getErrorCode(): string
    {

#[Package('checkout')] class StateMachineStateNotFoundException extends StateMachineException
{
    public function __construct(
        string $stateMachineName,
        string $technicalPlaceName
    ) {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use StateMachineException::stateMachineStateNotFound instead')
        );

        parent::__construct(
            Response::HTTP_BAD_REQUEST,
            self::STATE_MACHINE_STATE_NOT_FOUND,
            'The place "{{ place }}" for state machine named "{{ stateMachine }}" was not found.',
            [
                'place' => $technicalPlaceName,
                'stateMachine' => $stateMachineName,
            ]
        );
    }

#[Package('core')] class LanguageNotFoundException extends RoutingException
{
    final public const LANGUAGE_NOT_FOUND_ERROR = 'FRAMEWORK__LANGUAGE_NOT_FOUND';

    public function __construct(?string $languageId)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use RoutingException::languageNotFound instead')
        );

        parent::__construct(
            Response::HTTP_PRECONDITION_FAILED,
            self::LANGUAGE_NOT_FOUND_ERROR,
            'The language "{{ languageId }}" was not found.',
            ['languageId' => $languageId]
        );
    }

    public function getStatusCode(): int
    {
/** * @deprecated tag:v6.6.0 - will be removed, use MediaException::thumbnailCouldNotBeSaved instead */
#[Package('buyers-experience')] class ThumbnailCouldNotBeSavedException extends MediaException
{
    public function __construct(string $url)
    {
        Feature::triggerDeprecationOrThrow(
            'v6.6.0.0',
            Feature::deprecatedClassMessage(self::class, 'v6.6.0.0', 'use MediaException::thumbnailCouldNotBeSaved instead')
        );

        parent::__construct(
            Response::HTTP_CONFLICT,
            self::MEDIA_THUMBNAIL_NOT_SAVED,
            'Thumbnail could not be saved to location: {{ location }}.',
            ['location' => $url]
        );
    }

    public function getErrorCode(): string
    {
/** * @deprecated tag:v6.6.0 - Use \Shopware\Core\Framework\App\AppException::actionButtonProcessException instead */
#[Package('core')] class ActionProcessException extends ShopwareHttpException
{
    public function __construct(
        private readonly string $actionId,
        string $errorMessage,
        ?\Throwable $e = null
    ) {
        Feature::triggerDeprecationOrThrow('v6.6.0.0', Feature::deprecatedClassMessage(self::class, 'v6.6.0.0'));

        parent::__construct(
            'The synchronous action process was interrupted due to the following error:' . \PHP_EOL . '{{ errorMessage }}',
            ['errorMessage' => $errorMessage],
            $e
        );
    }

    public function getErrorCode(): string
    {
        Feature::triggerDeprecationOrThrow('v6.6.0.0', Feature::deprecatedClassMessage(self::class, 'v6.6.0.0'));

        
Home | Imprint | This part of the site doesn't use cookies.