Skip to content

Commit

Permalink
Remove deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Nov 25, 2024
1 parent ce20da6 commit c192cbf
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/TokenStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ final class TokenStream
*/
public function __construct(
private array $tokens,
private ?Source $source = null,
private Source $source,
) {
if (null === $this->source) {
trigger_deprecation('twig/twig', '3.16', \sprintf('Not passing a "%s" object to "%s" constructor is deprecated.', Source::class, __CLASS__));

$this->source = new Source('', '');
}
}

public function __toString()
Expand Down

0 comments on commit c192cbf

Please sign in to comment.