-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #4182 Add the possibility to deprecate attributes and nodes o…
…n Node (fabpot) This PR was merged into the 3.x branch. Discussion ---------- Add the possibility to deprecate attributes and nodes on Node Commits ------- 18894cf Add the possibility to deprecate attributes and nodes on Node
- Loading branch information
Showing
4 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Twig. | ||
* | ||
* (c) Fabien Potencier | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Twig\Node; | ||
|
||
/** | ||
* Represents a deprecation for a named node or attribute on a Node. | ||
* | ||
* @author Fabien Potencier <fabien@symfony.com> | ||
*/ | ||
class NameDeprecation | ||
{ | ||
private $package; | ||
private $version; | ||
private $newName; | ||
|
||
public function __construct(string $package = '', string $version = '', string $newName = '') | ||
{ | ||
$this->package = $package; | ||
$this->version = $version; | ||
$this->newName = $newName; | ||
} | ||
|
||
public function getPackage(): string | ||
{ | ||
return $this->package; | ||
} | ||
|
||
public function getVersion(): string | ||
{ | ||
return $this->version; | ||
} | ||
|
||
public function getNewName(): string | ||
{ | ||
return $this->newName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters