Skip to content

Commit

Permalink
fix: Add an deprecated alias for IO to avoid a hard BC break
Browse files Browse the repository at this point in the history
  • Loading branch information
theofidry committed Oct 14, 2023
1 parent 7203f6a commit 6ad7d16
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/Input/IO.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/*
* This file is part of the Fidry\Console package.
*
* (c) Théo FIDRY <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace Fidry\Console\Input;

use function class_alias;
use function sprintf;
use function trigger_deprecation;

$alias = \Fidry\Console\Input\IO::class;
$newClass = \Fidry\Console\IO::class;

@trigger_deprecation(
'fidry/console',
'0.6.0',
sprintf(
'Using the class "%s" is deprecated. Use "%s" instead.',
$alias,
$newClass,
),
);

class_alias($newClass, $alias);

0 comments on commit 6ad7d16

Please sign in to comment.